Transactions
execute-proxy-announced
Execute a proxy call that was announced and has passed its delay.
The delayed-proxy flow: a delegate added with delay > 0 first announces
the call's hash, waits out the delay (during which the real account can
veto), then anyone may dispatch the announced call with this intent. The
inner call is given as an intent op name plus its arguments and must hash
to exactly what was announced. Fails if the delay has not elapsed or no
matching announcement exists.
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | Proxy | Proxy.proxy_announced |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
delegate_ss58 | string | yes | Delegate that made the announcement. |
real_ss58 | string | yes | Account the call executes as (the delegation's grantor). |
inner_op | string | yes | Intent op name of the announced call (see btcli tools for the catalog). |
inner_args | object | yes | Arguments of the announced call, as a JSON object. |
force_proxy_type | string | no | Require the delegation to be exactly this proxy type instead of accepting any type that covers the call. |
Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.
CLI
Preview with --dry-run (shows fee, effects, and policy result without
submitting), then submit:
btcli tx execute-proxy-announced \
--delegate <ss58|name> \
--real <ss58|name> \
--inner-op <value> \
--inner-args '<json>' --dry-run
btcli tx execute-proxy-announced \
--delegate <ss58|name> \
--real <ss58|name> \
--inner-op <value> \
--inner-args '<json>' -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.ExecuteProxyAnnounced(delegate_ss58="5F...", real_ss58="5F...", inner_op="...", inner_args={...})
sub = bt.Subtensor()
plan = sub.plan(intent, wallet) # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
print(result.error.code, result.error.remediation)(bt.Subtensor is also the async client — async with bt.Subtensor() as client:
— see The client.) Or build the intent by op name, as
an agent would:
result = sub.execute_tool("execute_proxy_announced", {...}, wallet)On-chain implementation
Proxy.proxy_announced — pallets/proxy/src/lib.rs#L549:
#[pallet::call_index(9)]
#[pallet::weight({
let di = call.get_dispatch_info();
(T::WeightInfo::proxy_announced(T::MaxPending::get(), T::MaxProxies::get())
// AccountData for inner call origin accountdata.
.saturating_add(T::DbWeight::get().reads_writes(1, 1))
.saturating_add(di.call_weight),
DispatchClass::Normal)
})]
pub fn proxy_announced(
origin: OriginFor<T>,
delegate: AccountIdLookupOf<T>,
real: AccountIdLookupOf<T>,
force_proxy_type: Option<T::ProxyType>,
call: Box<<T as Config>::RuntimeCall>,
) -> DispatchResult {
ensure_signed(origin)?;
let delegate = T::Lookup::lookup(delegate)?;
let real = T::Lookup::lookup(real)?;
let def = Self::find_proxy(&real, &delegate, force_proxy_type)?;
let call_hash = T::CallHasher::hash_of(&call);
let now = T::BlockNumberProvider::current_block_number();
Self::edit_announcements(&delegate, |ann| {
ann.real != real
|| ann.call_hash != call_hash
|| now.saturating_sub(ann.height) < def.delay
})
.map_err(|_| Error::<T>::Unannounced)?;
Self::do_proxy(def, real, *call);
Ok(())
}Delegates to find_proxy.
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).