diff --git a/common/src/lib.rs b/common/src/lib.rs index 658f8b2e01..557fc3199e 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -160,6 +160,7 @@ pub enum ProxyType { SwapHotkey, SubnetLeaseBeneficiary, // Used to operate the leased subnet RootClaim, + CancelProxy, // Only allows rejecting proxy announcements for time-delayed proxies } impl TryFrom for ProxyType { @@ -185,6 +186,7 @@ impl TryFrom for ProxyType { 15 => Ok(Self::SwapHotkey), 16 => Ok(Self::SubnetLeaseBeneficiary), 17 => Ok(Self::RootClaim), + 18 => Ok(Self::CancelProxy), _ => Err(()), } } @@ -211,6 +213,7 @@ impl From for u8 { ProxyType::SwapHotkey => 15, ProxyType::SubnetLeaseBeneficiary => 16, ProxyType::RootClaim => 17, + ProxyType::CancelProxy => 18, } } } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 59784e6294..348d5d045f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -751,6 +751,10 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::SubtensorModule(pallet_subtensor::Call::claim_root { .. }) ), + ProxyType::CancelProxy => matches!( + c, + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) + ), } } fn is_superset(&self, o: &Self) -> bool {