Skip to content

Commit 73e9387

Browse files
committed
feat(chain-extensions): add RemoveProxyV1 function ID and error code
Add FunctionId::RemoveProxyV1 (ID 14) and ProxyNotFound error code for proxy removal failures.
1 parent 24e87c6 commit 73e9387

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

chain-extensions/src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub enum FunctionId {
1919
RemoveStakeFullLimitV1 = 11,
2020
SetColdkeyAutoStakeHotkeyV1 = 12,
2121
AddProxyV1 = 13,
22+
RemoveProxyV1 = 14,
2223
}
2324

2425
#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, Debug)]
@@ -62,6 +63,8 @@ pub enum Output {
6263
ProxyDuplicate = 17,
6364
/// Cannot add self as proxy
6465
ProxyNoSelfProxy = 18,
66+
/// Proxy relationship not found
67+
ProxyNotFound = 19,
6568
}
6669

6770
impl From<DispatchError> for Output {
@@ -88,6 +91,7 @@ impl From<DispatchError> for Output {
8891
Some("TooMany") => Output::ProxyTooMany,
8992
Some("Duplicate") => Output::ProxyDuplicate,
9093
Some("NoSelfProxy") => Output::ProxyNoSelfProxy,
94+
Some("NotFound") => Output::ProxyNotFound,
9195
_ => Output::RuntimeError,
9296
}
9397
}

0 commit comments

Comments
 (0)