# remove-proxy-announcement (/docs/tx/remove-proxy-announcement)

Signed by the delegate that announced the call. Returns the announcement
deposit. Prefer this over `reject_proxy_announcement` when the real
account is a keyless pure proxy (it has no key to sign a reject).

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

## Parameters [#parameters]

| Parameter   | Type   | Required | Description                                                        |
| ----------- | ------ | -------- | ------------------------------------------------------------------ |
| `real_ss58` | string | yes      | Account the announcement targeted (the delegation's grantor).      |
| `call_hash` | string | yes      | Hash previously passed to announce\_proxy\_call (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 remove-proxy-announcement \
  --real <ss58|name> \
  --call-hash <value> --dry-run
btcli tx remove-proxy-announcement \
  --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.RemoveProxyAnnouncement(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("remove_proxy_announcement", {...}, wallet)
```

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

`Proxy.remove_announcement` — [`pallets/proxy/src/lib.rs#L539`](/code/pallets/proxy/src/lib.rs#L534-L549):

```rust
#[pallet::call_index(7)]
#[pallet::weight(T::WeightInfo::remove_announcement(
    T::MaxPending::get(),
    T::MaxProxies::get()
))]
pub fn remove_announcement(
    origin: OriginFor<T>,
    real: AccountIdLookupOf<T>,
    call_hash: CallHashOf<T>,
) -> DispatchResult {
    let who = ensure_signed(origin)?;
    let real = T::Lookup::lookup(real)?;
    Self::edit_announcements(&who, |ann| ann.real != real || ann.call_hash != 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)).
