IdleScheduler
Calls
schedule_task
Attributes
Python
call = substrate.compose_call(
'IdleScheduler', 'schedule_task', {
'task': {
'EvmTask': {
'Remove': {
'caller': '[u8; 20]',
'contract': '[u8; 20]',
'maintainer': '[u8; 20]',
},
'Schedule': {
'from': '[u8; 20]',
'gas_limit': 'u64',
'input': 'Bytes',
'storage_limit': 'u32',
'target': '[u8; 20]',
'value': 'u128',
},
},
},
}
)
Events
TaskAdded
Attributes
Name |
Type |
Composition |
task_id |
Nonce |
u32 |
task |
T::Task |
{'EvmTask': {'Schedule': {'from': '[u8; 20]', 'target': '[u8; 20]', 'input': 'Bytes', 'value': 'u128', 'gas_limit': 'u64', 'storage_limit': 'u32'}, 'Remove': {'caller': '[u8; 20]', 'contract': '[u8; 20]', 'maintainer': '[u8; 20]'}}} |
TaskDispatched
Attributes
Name |
Type |
Composition |
task_id |
Nonce |
u32 |
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
NextTaskId
Python
result = substrate.query(
'IdleScheduler', 'NextTaskId', []
)
Return value
'u32'
PreviousRelayBlockNumber
Python
result = substrate.query(
'IdleScheduler', 'PreviousRelayBlockNumber', []
)
Return value
'u32'
Tasks
Python
result = substrate.query(
'IdleScheduler', 'Tasks', ['u32']
)
Return value
{
'EvmTask': {
'Remove': {
'caller': '[u8; 20]',
'contract': '[u8; 20]',
'maintainer': '[u8; 20]',
},
'Schedule': {
'from': '[u8; 20]',
'gas_limit': 'u64',
'input': 'Bytes',
'storage_limit': 'u32',
'target': '[u8; 20]',
'value': 'u128',
},
},
}
Constants
DisableBlockThreshold
Value
6
Python
constant = substrate.get_constant('IdleScheduler', 'DisableBlockThreshold')
MinimumWeightRemainInBlock
Value
{'proof_size': 1048576, 'ref_time': 10000000000}
Python
constant = substrate.get_constant('IdleScheduler', 'MinimumWeightRemainInBlock')