Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8> for ProxyType {
Expand All @@ -185,6 +186,7 @@ impl TryFrom<u8> for ProxyType {
15 => Ok(Self::SwapHotkey),
16 => Ok(Self::SubnetLeaseBeneficiary),
17 => Ok(Self::RootClaim),
18 => Ok(Self::CancelProxy),
_ => Err(()),
}
}
Expand All @@ -211,6 +213,7 @@ impl From<ProxyType> for u8 {
ProxyType::SwapHotkey => 15,
ProxyType::SubnetLeaseBeneficiary => 16,
ProxyType::RootClaim => 17,
ProxyType::CancelProxy => 18,
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,10 @@ impl InstanceFilter<RuntimeCall> 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 {
Expand Down