# announce-proxy-call (/docs/tx/announce-proxy-call)

A delegate whose grant has `delay` > 0 must publish the call hash here
and wait before `execute_proxy_announced` can reveal and run it. The
chain stores only the hash; keep the plaintext locally (the CLI's
protected-account store does this). The deposit reserved for the
announcement is returned when the call is executed, removed, or rejected.

| Signer    | Origin                                 | Pallet | Wraps                                                        |
| --------- | -------------------------------------- | ------ | ------------------------------------------------------------ |
| `coldkey` | signed account (pallet role may apply) | Proxy  | [`Proxy.announce`](/code/pallets/proxy/src/lib.rs#L478-L522) |

## Parameters [#parameters]

| Parameter   | Type   | Required | Description                                                                                                       |
| ----------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `real_ss58` | string | yes      | Account the future call will execute as (the delegation's grantor).                                               |
| `call_hash` | string | yes      | Blake2-256 hash of the exact call bytes that will later be passed to execute\_proxy\_announced (0x-prefixed hex). |

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx announce-proxy-call \
  --real <ss58|name> \
  --call-hash <value> --dry-run
btcli tx announce-proxy-call \
  --real <ss58|name> \
  --call-hash <value> -w my_coldkey
```

## Python [#python]

```python
import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.AnnounceProxyCall(real_ss58="5F...", call_hash="...")

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](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("announce_proxy_call", {...}, wallet)
```

## On-chain implementation [#on-chain-implementation]

`Proxy.announce` — [`pallets/proxy/src/lib.rs#L480`](/code/pallets/proxy/src/lib.rs#L478-L522):

```rust
#[pallet::call_index(6)]
#[pallet::weight(T::WeightInfo::announce(T::MaxPending::get(), T::MaxProxies::get()))]
pub fn announce(
    origin: OriginFor<T>,
    real: AccountIdLookupOf<T>,
    call_hash: CallHashOf<T>,
) -> DispatchResult {
    let who = ensure_signed(origin)?;
    let real = T::Lookup::lookup(real)?;
    Proxies::<T>::get(&real)
        .0
        .into_iter()
        .find(|x| x.delegate == who)
        .ok_or(Error::<T>::NotProxy)?;

    let announcement = Announcement {
        real: real.clone(),
        call_hash,
        height: T::BlockNumberProvider::current_block_number(),
    };

    Announcements::<T>::try_mutate(&who, |(pending, deposit)| {
        pending
            .try_push(announcement)
            .map_err(|_| Error::<T>::TooMany)?;
        let new_deposit = Self::rejig_deposit(
            &who,
            *deposit,
            T::AnnouncementDepositBase::get(),
            T::AnnouncementDepositFactor::get(),
            pending.len(),
        )?
        .ok_or(Error::<T>::AnnouncementDepositInvariantViolated)?;

        *deposit = new_deposit;
        Ok::<(), DispatchError>(())
    })?;

    Self::deposit_event(Event::Announced {
        real,
        proxy: who,
        call_hash,
    });
    Ok(())
}
```

Every file is browsable under [/code](/code) exactly as built into the runtime, or as plain text under `/code/raw/<path>` (index: [`/code/index.json`](/code/index.json)).
