Sudo
Calls
remove_key
Attributes
No attributes
Python
call = substrate.compose_call(
'Sudo', 'remove_key', {}
)
set_key
Attributes
Name |
Type |
new |
AccountIdLookupOf<T> |
Python
call = substrate.compose_call(
'Sudo', 'set_key', {
'new': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
}
)
sudo
Attributes
Name |
Type |
call |
Box<<T as Config>::RuntimeCall> |
Python
call = substrate.compose_call(
'Sudo', 'sudo', {'call': 'Call'}
)
sudo_as
Attributes
Name |
Type |
who |
AccountIdLookupOf<T> |
call |
Box<<T as Config>::RuntimeCall> |
Python
call = substrate.compose_call(
'Sudo', 'sudo_as', {
'call': 'Call',
'who': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
}
)
sudo_unchecked_weight
Attributes
Name |
Type |
call |
Box<<T as Config>::RuntimeCall> |
weight |
Weight |
Python
call = substrate.compose_call(
'Sudo', 'sudo_unchecked_weight', {
'call': 'Call',
'weight': {
'proof_size': 'u64',
'ref_time': 'u64',
},
}
)
Events
KeyChanged
Attributes
Name |
Type |
Composition |
old |
Option<T::AccountId> |
(None, 'AccountId') |
new |
T::AccountId |
AccountId |
KeyRemoved
Attributes
No attributes
Sudid
Attributes
Name |
Type |
Composition |
sudo_result |
DispatchResult |
{'Ok': (), 'Err': {'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('FundsUnavailable', 'OnlyProvider', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported', 'CannotCreateHold', 'NotExpendable', 'Blocked'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer'), 'Exhausted': None, 'Corruption': None, 'Unavailable': None, 'RootNotAllowed': None}} |
SudoAsDone
Attributes
Name |
Type |
Composition |
sudo_result |
DispatchResult |
{'Ok': (), 'Err': {'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('FundsUnavailable', 'OnlyProvider', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported', 'CannotCreateHold', 'NotExpendable', 'Blocked'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer'), 'Exhausted': None, 'Corruption': None, 'Unavailable': None, 'RootNotAllowed': None}} |
Storage functions
Key
Python
result = substrate.query(
'Sudo', 'Key', []
)
Return value
'AccountId'
Errors
RequireSudo