Utility¶
Calls¶
as_derivative¶
Send a call through an indexed pseudonym of the sender.
Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call.
NOTE: If you need to ensure that any account-based filtering is not honored (i.e.
because you expect proxy
to have been used prior in the call stack and you do not want
the call restrictions to apply to any sub-accounts), then use as_multi_threshold_1
in the Multisig pallet instead.
NOTE: Prior to version *12, this was called as_limited_sub
.
The dispatch origin for this call must be Signed.
Attributes¶
Name | Type |
---|---|
index | u16 |
call | Box<<T as Config>::Call> |
Python¶
call = substrate.compose_call(
'Utility', 'as_derivative', {'call': 'Call', 'index': 'u16'}
)
batch¶
Send a batch of dispatch calls.
May be called from any origin.
calls
: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit
(available in constant metadata).
If origin is root then call are dispatch without checking origin filter. (This includes
bypassing frame_system::Config::BaseCallFilter
).
# <weight> - Complexity: O(C) where C is the number of calls to be batched. # </weight>
This will return Ok
in all circumstances. To determine the success of the batch, an
event is deposited. If a call failed and the batch was interrupted, then the
BatchInterrupted
event is deposited, along with the number of successful calls made
and the error of the failed call. If all were successful, then the BatchCompleted
event is deposited.
Attributes¶
Name | Type |
---|---|
calls | Vec<<T as Config>::Call> |
Python¶
call = substrate.compose_call(
'Utility', 'batch', {'calls': ['Call']}
)
batch_all¶
Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed.
May be called from any origin.
calls
: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit
(available in constant metadata).
If origin is root then call are dispatch without checking origin filter. (This includes
bypassing frame_system::Config::BaseCallFilter
).
# <weight> - Complexity: O(C) where C is the number of calls to be batched. # </weight>
Attributes¶
Name | Type |
---|---|
calls | Vec<<T as Config>::Call> |
Python¶
call = substrate.compose_call(
'Utility', 'batch_all', {'calls': ['Call']}
)
dispatch_as¶
Dispatches a function call with a provided origin.
The dispatch origin for this call must be Root.
# <weight>
- O(1).
- Limited storage reads.
- One DB write (event).
- Weight of derivative call
execution + T::WeightInfo::dispatch_as().
# </weight>
Attributes¶
Name | Type |
---|---|
as_origin | Box<T::PalletsOrigin> |
call | Box<<T as Config>::Call> |
Python¶
call = substrate.compose_call(
'Utility', 'dispatch_as', {
'as_origin': {
'CumulusXcm': {
'Relay': None,
'SiblingParachain': 'u32',
},
'PolkadotXcm': {
'Response': {
'interior': {
'Here': None,
'X1': {
'AccountId32': {
'id': '[u8; 32]',
'network': 'scale_info::135',
},
'AccountIndex64': {
'index': 'u64',
'network': 'scale_info::135',
},
'AccountKey20': {
'key': '[u8; 20]',
'network': 'scale_info::135',
},
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': {
'id': 'scale_info::137',
'part': 'scale_info::138',
},
},
'X2': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X3': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X4': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X5': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X6': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X7': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X8': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
},
'parents': 'u8',
},
'Xcm': {
'interior': {
'Here': None,
'X1': {
'AccountId32': {
'id': '[u8; 32]',
'network': 'scale_info::135',
},
'AccountIndex64': {
'index': 'u64',
'network': 'scale_info::135',
},
'AccountKey20': {
'key': '[u8; 20]',
'network': 'scale_info::135',
},
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': {
'id': 'scale_info::137',
'part': 'scale_info::138',
},
},
'X2': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X3': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X4': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X5': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X6': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X7': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
'X8': (
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
{
'AccountId32': 'InnerStruct',
'AccountIndex64': 'InnerStruct',
'AccountKey20': 'InnerStruct',
'GeneralIndex': 'u128',
'GeneralKey': 'Bytes',
'OnlyChild': None,
'PalletInstance': 'u8',
'Parachain': 'u32',
'Plurality': 'InnerStruct',
},
),
},
'parents': 'u8',
},
},
'Void': (),
'system': {
'None': None,
'Root': None,
'Signed': 'AccountId',
},
None: None,
},
'call': 'Call',
}
)
force_batch¶
Send a batch of dispatch calls.
Unlike batch
, it allows errors and won't interrupt.
May be called from any origin.
calls
: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit
(available in constant metadata).
If origin is root then call are dispatch without checking origin filter. (This includes
bypassing frame_system::Config::BaseCallFilter
).
# <weight> - Complexity: O(C) where C is the number of calls to be batched. # </weight>
Attributes¶
Name | Type |
---|---|
calls | Vec<<T as Config>::Call> |
Python¶
call = substrate.compose_call(
'Utility', 'force_batch', {'calls': ['Call']}
)
Events¶
BatchCompleted¶
Batch of dispatches completed fully with no error.
Attributes¶
No attributes
BatchCompletedWithErrors¶
Batch of dispatches completed but has errors.
Attributes¶
No attributes
BatchInterrupted¶
Batch of dispatches did not complete fully. Index of first failing dispatch given, as well as the error.
Attributes¶
Name | Type | Composition |
---|---|---|
index | u32 |
u32 |
error | DispatchError |
{'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer')} |
DispatchedAs¶
A call was dispatched.
Attributes¶
Name | Type | Composition |
---|---|---|
result | DispatchResult |
{'Ok': (), 'Err': {'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer')}} |
ItemCompleted¶
A single item within a Batch of dispatches has completed with no error.
Attributes¶
No attributes
ItemFailed¶
A single item within a Batch of dispatches has completed with error.
Attributes¶
Name | Type | Composition |
---|---|---|
error | DispatchError |
{'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer')} |
Constants¶
batched_calls_limit¶
The limit on the number of batched calls.
Value¶
10922
Python¶
constant = substrate.get_constant('Utility', 'batched_calls_limit')
Errors¶
TooManyCalls¶
Too many calls batched.