-
* remove unused deps * fix #241 * remove sp_std dependency https://github.com/paritytech/polkadot-sdk/issues/2101# This is the commit message #2: * update metadata * clean Cargo.toml * run benchmarks * update node * update crates
* remove unused deps * fix #241 * remove sp_std dependency https://github.com/paritytech/polkadot-sdk/issues/2101# This is the commit message #2: * update metadata * clean Cargo.toml * run benchmarks * update node * update crates
Runtime calls
Calls are categorized according to the dispatch origin they require:
- User calls: the dispatch origin for this kind of call must be signed by the transactor. This is the only call category that can be submitted with an extrinsic.
- Root calls: This kind of call requires a special origin that can only be invoked through on-chain governance mechanisms.
- Inherent calls: This kind of call is invoked by the author of the block itself (usually automatically by the node).
- Disabled calls: These calls can not be called directly, they are reserved for internal use by other runtime calls.
User calls
There are 86 user calls from 21 pallets.
Account - 1
unlink_identity - 0
unlink_identity()
Taking 0.0111 % of a block.
Unlink the identity associated with the account.
Scheduler - 2
schedule - 0
schedule(when, maybe_periodic, priority, call)
Taking 0.0122 % of a block.
when: BlockNumberFor<T>
maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Anonymously schedule a task.
cancel - 1
cancel(when, index)
Taking 0.0236 % of a block.
when: BlockNumberFor<T>
index: u32
Cancel an anonymously scheduled task.
schedule_named - 2
schedule_named(id, when, maybe_periodic, priority, call)
Taking 0.0189 % of a block.
id: TaskName
when: BlockNumberFor<T>
maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Schedule a named task.
cancel_named - 3
cancel_named(id)
Taking 0.0248 % of a block.
id: TaskName
Cancel a named scheduled task.
schedule_after - 4
schedule_after(after, maybe_periodic, priority, call)
No weight available.
after: BlockNumberFor<T>
maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Anonymously schedule a task after a delay.
schedule_named_after - 5
schedule_named_after(id, after, maybe_periodic, priority, call)
No weight available.
id: TaskName
after: BlockNumberFor<T>
maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Schedule a named task after a delay.
set_retry - 6
set_retry(task, retries, period)
Taking 0.012 % of a block.
task: TaskAddress<BlockNumberFor<T>>
retries: u8
period: BlockNumberFor<T>
Set a retry configuration for a task so that, in case its scheduled run fails, it will
be retried after period
blocks, for a total amount of retries
retries or until it
succeeds.
Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying.
Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic
clones of the original task. Their retry configuration will be derived from the
original task's configuration, but will have a lower value for remaining
than the
original total_retries
.
set_retry_named - 7
set_retry_named(id, retries, period)
Taking 0.0132 % of a block.
id: TaskName
retries: u8
period: BlockNumberFor<T>
Set a retry configuration for a named task so that, in case its scheduled run fails, it
will be retried after period
blocks, for a total amount of retries
retries or until
it succeeds.
Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying.
Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic
clones of the original task. Their retry configuration will be derived from the
original task's configuration, but will have a lower value for remaining
than the
original total_retries
.
cancel_retry - 8
cancel_retry(task)
Taking 0.012 % of a block.
task: TaskAddress<BlockNumberFor<T>>
Removes the retry configuration of a task.
cancel_retry_named - 9
cancel_retry_named(id)
Taking 0.0132 % of a block.
id: TaskName
Cancel the retry configuration of a named task.
Babe - 3
report_equivocation - 0
report_equivocation(equivocation_proof, key_owner_proof)
No weight available.
equivocation_proof: Box<EquivocationProof<HeaderFor<T>>>
key_owner_proof: T::KeyOwnerProof
Report authority equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.
Balances - 6
transfer_allow_death - 0
transfer_allow_death(dest, value)
Taking 0.0199 % of a block.
dest: AccountIdLookupOf<T>
value: T::Balance
Transfer some liquid free balance to another account.
transfer_allow_death
will set the FreeBalance
of the sender and receiver.
If the sender's account is below the existential deposit as a result
of the transfer, the account will be reaped.
The dispatch origin for this call must be Signed
by the transactor.
transfer_keep_alive - 3
transfer_keep_alive(dest, value)
Taking 0.0125 % of a block.
dest: AccountIdLookupOf<T>
value: T::Balance
Same as the transfer_allow_death
call, but with a check that the transfer will not
kill the origin account.
99% of the time you want transfer_allow_death
instead.
transfer_all - 4
transfer_all(dest, keep_alive)
Taking 0.0129 % of a block.
dest: AccountIdLookupOf<T>
keep_alive: bool
Transfer the entire transferable balance from the caller account.
NOTE: This function only attempts to transfer transferable balances. This means that
any locked, reserved, or existential deposits (when keep_alive
is true
), will not be
transferred by this function. To ensure that this function results in a killed account,
you might need to prepare the account by removing any reference counters, storage
deposits, etc...
The dispatch origin of this call must be Signed.
-
dest
: The recipient of the transfer. -
keep_alive
: A boolean to determine if thetransfer_all
operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true).
force_set_balance - 8
force_set_balance(who, new_free)
No weight available.
who: AccountIdLookupOf<T>
new_free: T::Balance
Upgrade a specified account.
-
origin
: Must beSigned
. -
who
: The account to be upgraded.
This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn). Set the regular balance of a given account.
The dispatch origin for this call is root
.
force_adjust_total_issuance - 9
force_adjust_total_issuance(direction, delta)
Taking 0.0048 % of a block.
direction: AdjustmentDirection
delta: T::Balance
Adjust the total issuance in a saturating way.
Can only be called by root and always needs a positive delta
.
Example
burn - 10
burn(value, keep_alive)
No weight available.
value: T::Balance
keep_alive: bool
Burn the specified liquid free balance from the origin account.
If the origin's account ends up below the existential deposit as a result
of the burn and keep_alive
is false, the account will be reaped.
Unlike sending funds to a burn address, which merely makes the funds inaccessible,
this burn
operation will reduce total issuance by the amount burned.
OneshotAccount - 7
create_oneshot_account - 0
create_oneshot_account(dest, value)
Taking 0.012 % of a block.
dest: <T::Lookup as StaticLookup>::Source
value: BalanceOf<T>
Create an account that can only be consumed once
-
dest
: The oneshot account to be created. -
balance
: The balance to be transfered to this oneshot account.
Origin account is kept alive.
consume_oneshot_account - 1
consume_oneshot_account(block_height, dest)
Taking 0.0197 % of a block.
block_height: BlockNumberFor<T>
dest: Account<<T::Lookup as StaticLookup>::Source>
Consume a oneshot account and transfer its balance to an account
-
block_height
: Must be a recent block number. The limit isBlockHashCount
in the past. (this is to prevent replay attacks) -
dest
: The destination account. -
dest_is_oneshot
: If set totrue
, then a oneshot account is created atdest
. Else,dest
has to be an existing account.
consume_oneshot_account_with_remaining - 2
consume_oneshot_account_with_remaining(block_height, dest, remaining_to, balance)
Taking 0.0268 % of a block.
block_height: BlockNumberFor<T>
dest: Account<<T::Lookup as StaticLookup>::Source>
remaining_to: Account<<T::Lookup as StaticLookup>::Source>
balance: BalanceOf<T>
Consume a oneshot account then transfer some amount to an account, and the remaining amount to another account.
-
block_height
: Must be a recent block number. The limit isBlockHashCount
in the past. (this is to prevent replay attacks) -
dest
: The destination account. -
dest_is_oneshot
: If set totrue
, then a oneshot account is created atdest
. Else,dest
has to be an existing account. -
dest2
: The second destination account. -
dest2_is_oneshot
: If set totrue
, then a oneshot account is created atdest2
. Else,dest2
has to be an existing account. -
balance1
: The amount transfered todest
, the leftover being transfered todest2
.
SmithMembers - 10
invite_smith - 0
invite_smith(receiver)
Taking 0.0235 % of a block.
receiver: T::IdtyIndex
Invite a member of the Web of Trust to attempt becoming a Smith.
accept_invitation - 1
accept_invitation()
Taking 0.0127 % of a block.
Accept an invitation to become a Smith (must have been invited first).
certify_smith - 2
certify_smith(receiver)
Taking 0.0279 % of a block.
receiver: T::IdtyIndex
Certify an invited Smith, which can lead the certified to become a Smith.
AuthorityMembers - 11
go_offline - 0
go_offline()
Taking 0.0167 % of a block.
Request to leave the set of validators two sessions later.
go_online - 1
go_online()
Taking 0.0189 % of a block.
Request to join the set of validators two sessions later.
set_session_keys - 2
set_session_keys(keys)
Taking 0.0249 % of a block.
keys: T::Keys
Declare new session keys to replace current ones.
remove_member_from_blacklist - 4
remove_member_from_blacklist(member_id)
Taking 0.0114 % of a block.
member_id: T::MemberId
Remove a member from the blacklist. remove an identity from the blacklist
Grandpa - 16
report_equivocation - 0
report_equivocation(equivocation_proof, key_owner_proof)
No weight available.
equivocation_proof: Box<EquivocationProof<T::Hash, BlockNumberFor<T>>>
key_owner_proof: T::KeyOwnerProof
Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.
UpgradeOrigin - 21
dispatch_as_root_unchecked_weight - 1
dispatch_as_root_unchecked_weight(call, weight)
No weight available.
call: Box<<T as Config>::Call>
weight: Weight
Dispatches a function call from root origin. This function does not check the weight of the call, and instead allows the caller to specify the weight of the call.
The weight of this call is defined by the caller.
Preimage - 22
note_preimage - 0
note_preimage(bytes)
Taking 0.2947 % of a block.
bytes: Vec<u8>
Register a preimage on-chain.
If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage.
unnote_preimage - 1
unnote_preimage(hash)
Taking 0.0184 % of a block.
hash: T::Hash
Clear an unrequested preimage from the runtime storage.
If len
is provided, then it will be a much cheaper operation.
-
hash
: The hash of the preimage to be removed from the store. -
len
: The length of the preimage ofhash
.
request_preimage - 2
request_preimage(hash)
Taking 0.0129 % of a block.
hash: T::Hash
Request a preimage be uploaded to the chain without paying any fees or deposits.
If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands.
unrequest_preimage - 3
unrequest_preimage(hash)
Taking 0.0184 % of a block.
hash: T::Hash
Clear a previously made request for a preimage.
NOTE: THIS MUST NOT BE CALLED ON hash
MORE TIMES THAN request_preimage
.
ensure_updated - 4
ensure_updated(hashes)
Taking 19.3634 % of a block.
hashes: Vec<T::Hash>
Ensure that the a bulk of pre-images is upgraded.
The caller pays no fee if at least 90% of pre-images were successfully updated.
TechnicalCommittee - 23
execute - 1
execute(proposal, length_bound)
Taking 0.0061 % of a block.
proposal: Box<<T as Config<I>>::Proposal>
length_bound: u32
Dispatch a proposal from a member using the Member
origin.
Origin must be a member of the collective.
Complexity:
-
O(B + M + P)
where: -
B
isproposal
size in bytes (length-fee-bounded) -
M
members-count (code-bounded) -
P
complexity of dispatchingproposal
propose - 2
propose(threshold, proposal, length_bound)
No weight available.
threshold: MemberCount
proposal: Box<<T as Config<I>>::Proposal>
length_bound: u32
Add a new proposal to either be voted on or executed directly.
Requires the sender to be member.
threshold
determines whether proposal
is executed directly (threshold < 2
)
or put up for voting.
Complexity
-
O(B + M + P1)
orO(B + M + P2)
where:-
B
isproposal
size in bytes (length-fee-bounded) -
M
is members-count (code- and governance-bounded) - branching is influenced by
threshold
where:-
P1
is proposal execution complexity (threshold < 2
) -
P2
is proposals-count (code-bounded) (threshold >= 2
)
-
-
vote - 3
vote(proposal, index, approve)
Taking 0.0129 % of a block.
proposal: T::Hash
index: ProposalIndex
approve: bool
Add an aye or nay vote for the sender to the given proposal.
Requires the sender to be a member.
Transaction fees will be waived if the member is voting on any particular proposal for the first time and the call is successful. Subsequent vote changes will charge a fee. Complexity
-
O(M)
whereM
is members-count (code- and governance-bounded)
close - 6
close(proposal_hash, index, proposal_weight_bound, length_bound)
No weight available.
proposal_hash: T::Hash
index: ProposalIndex
proposal_weight_bound: Weight
length_bound: u32
Close a vote that is either approved, disapproved or whose voting period has ended.
May be called by any signed account in order to finish voting and close the proposal.
If called before the end of the voting period it will only close the vote if it is has enough votes to be approved or disapproved.
If called after the end of the voting period abstentions are counted as rejections unless there is a prime member set and the prime member cast an approval.
If the close operation completes successfully with disapproval, the transaction fee will be waived. Otherwise execution of the approved operation will be charged to the caller.
-
proposal_weight_bound
: The maximum amount of weight consumed by executing the closed proposal. -
length_bound
: The upper bound for the length of the proposal in storage. Checked viastorage::read
so it issize_of::<u32>() == 4
larger than the pure length.
Complexity
-
O(B + M + P1 + P2)
where:-
B
isproposal
size in bytes (length-fee-bounded) -
M
is members-count (code- and governance-bounded) -
P1
is the complexity ofproposal
preimage. -
P2
is proposal-count (code-bounded)
-
UniversalDividend - 30
claim_uds - 0
claim_uds()
Taking 0.0218 % of a block.
Claim Universal Dividends.
transfer_ud - 1
transfer_ud(dest, value)
Taking 0.021 % of a block.
dest: <T::Lookup as StaticLookup>::Source
value: BalanceOf<T>
Transfer some liquid free balance to another account, in milliUD.
transfer_ud_keep_alive - 2
transfer_ud_keep_alive(dest, value)
Taking 0.0135 % of a block.
dest: <T::Lookup as StaticLookup>::Source
value: BalanceOf<T>
Transfer some liquid free balance to another account in milliUD and keep the account alive.
Identity - 41
create_identity - 0
create_identity(owner_key)
Taking 0.0856 % of a block.
owner_key: T::AccountId
Create an identity for an existing account
-
owner_key
: the public key corresponding to the identity to be created
The origin must be allowed to create an identity.
confirm_identity - 1
confirm_identity(idty_name)
Taking 0.0327 % of a block.
idty_name: IdtyName
Confirm the creation of an identity and give it a name
-
idty_name
: the name uniquely associated to this identity. Must match the validation rules defined by the runtime.
The identity must have been created using create_identity
before it can be confirmed.
change_owner_key - 3
change_owner_key(new_key, new_key_sig)
Taking 0.0424 % of a block.
new_key: T::AccountId
new_key_sig: T::Signature
Change identity owner key.
-
new_key
: the new owner key. -
new_key_sig
: the signature of the encoded form ofIdtyIndexAccountIdPayload
. Must be signed bynew_key
.
The origin should be the old identity owner key.
revoke_identity - 4
revoke_identity(idty_index, revocation_key, revocation_sig)
Taking 0.0399 % of a block.
idty_index: T::IdtyIndex
revocation_key: T::AccountId
revocation_sig: T::Signature
Revoke an identity using a revocation signature
-
idty_index
: the index of the identity to be revoked. -
revocation_key
: the key used to sign the revocation payload. -
revocation_sig
: the signature of the encoded form ofRevocationPayload
. Must be signed byrevocation_key
.
Any signed origin can execute this call.
fix_sufficients - 7
fix_sufficients(owner_key, inc)
Taking 0.0113 % of a block.
owner_key: T::AccountId
inc: bool
Change sufficient reference count for a given key.
This function allows a privileged root origin to increment or decrement the sufficient reference count associated with a specified owner key.
-
origin
- The origin of the call. It must be root. -
owner_key
- The account whose sufficient reference count will be modified. -
inc
- A boolean indicating whether to increment (true
) or decrement (false
) the count.
link_account - 8
link_account(account_id, payload_sig)
Taking 0.0155 % of a block.
account_id: T::AccountId
payload_sig: T::Signature
Link an account to an identity.
This function links a specified account to an identity, requiring both the account and the identity to sign the operation.
-
origin
- The origin of the call, which must have an associated identity index. -
account_id
- The account ID to link, which must sign the payload. -
payload_sig
- The signature with the linked identity.
Certification - 43
add_cert - 0
add_cert(receiver)
Taking 0.0356 % of a block.
receiver: T::IdtyIndex
Add a new certification.
renew_cert - 3
renew_cert(receiver)
Taking 0.0292 % of a block.
receiver: T::IdtyIndex
Renew an existing certification.
del_cert - 1
del_cert(issuer, receiver)
Taking 0.0257 % of a block.
issuer: T::IdtyIndex
receiver: T::IdtyIndex
Remove one certification given the issuer and the receiver.
-
origin
: Must beRoot
.
remove_all_certs_received_by - 2
remove_all_certs_received_by(idty_index)
Taking 6.846 % of a block.
idty_index: T::IdtyIndex
Remove all certifications received by an identity.
-
origin
: Must beRoot
.
Distance - 44
request_distance_evaluation - 0
request_distance_evaluation()
Taking 0.0389 % of a block.
Request evaluation of the caller's identity distance.
This function allows the caller to request an evaluation of their distance. A positive evaluation will lead to claiming or renewing membership, while a negative evaluation will result in slashing for the caller.
request_distance_evaluation_for - 4
request_distance_evaluation_for(target)
Taking 0.0399 % of a block.
target: T::IdtyIndex
Request evaluation of a target identity's distance.
This function allows the caller to request an evaluation of a specific target identity's distance. This action is only permitted for unvalidated identities.
update_evaluation - 1
update_evaluation(computation_result)
Taking 0.0341 % of a block.
computation_result: ComputationResult
Push an evaluation result to the pool.
This inherent function is called internally by validators to push an evaluation result to the evaluation pool.
force_update_evaluation - 2
force_update_evaluation(evaluator, computation_result)
Taking 0.0192 % of a block.
evaluator: <T as frame_system::Config>::AccountId
computation_result: ComputationResult
Force push an evaluation result to the pool.
It is primarily used for testing purposes.
-
origin
: Must beRoot
.
force_valid_distance_status - 3
force_valid_distance_status(identity)
Taking 0.027 % of a block.
identity: <T as pallet_identity::Config>::IdtyIndex
Force set the distance evaluation status of an identity.
It is primarily used for testing purposes.
-
origin
: Must beRoot
.
AtomicSwap - 50
create_swap - 0
create_swap(target, hashed_proof, action, duration)
No weight available.
target: T::AccountId
hashed_proof: HashedProof
action: T::SwapAction
duration: BlockNumberFor<T>
Register a new atomic swap, declaring an intention to send funds from origin to target
on the current blockchain. The target can claim the fund using the revealed proof. If
the fund is not claimed after duration
blocks, then the sender can cancel the swap.
The dispatch origin for this call must be Signed.
-
target
: Receiver of the atomic swap. -
hashed_proof
: The blake2_256 hash of the secret proof. -
balance
: Funds to be sent from origin. -
duration
: Locked duration of the atomic swap. For safety reasons, it is recommended that the revealer uses a shorter duration than the counterparty, to prevent the situation where the revealer reveals the proof too late around the end block.
claim_swap - 1
claim_swap(proof, action)
No weight available.
proof: Vec<u8>
action: T::SwapAction
Claim an atomic swap.
The dispatch origin for this call must be Signed.
-
proof
: Revealed proof of the claim. -
action
: Action defined in the swap, it must match the entry in blockchain. Otherwise the operation fails. This is used for weight calculation.
cancel_swap - 2
cancel_swap(target, hashed_proof)
No weight available.
target: T::AccountId
hashed_proof: HashedProof
Cancel an atomic swap. Only possible after the originally set duration has passed.
The dispatch origin for this call must be Signed.
-
target
: Target of the original atomic swap. -
hashed_proof
: Hashed proof of the original atomic swap.
Multisig - 51
as_multi_threshold_1 - 0
as_multi_threshold_1(other_signatories, call)
Taking 0.005 % of a block.
other_signatories: Vec<T::AccountId>
call: Box<<T as Config>::RuntimeCall>
Immediately dispatch a multi-signature call using a single approval from the caller.
The dispatch origin for this call must be Signed.
-
other_signatories
: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. -
call
: The call to be executed.
Result is equivalent to the dispatched result.
Complexity O(Z + C) where Z is the length of the call and C its execution weight.
as_multi - 1
as_multi(threshold, other_signatories, maybe_timepoint, call, max_weight)
No weight available.
threshold: u16
other_signatories: Vec<T::AccountId>
maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>>
call: Box<<T as Config>::RuntimeCall>
max_weight: Weight
Register approval for a dispatch to be made from a deterministic composite account if
approved by a total of threshold - 1
of other_signatories
.
If there are enough, then dispatch the call.
Payment: DepositBase
will be reserved if this is the first approval, plus
threshold
times DepositFactor
. It is returned once this dispatch happens or
is cancelled.
The dispatch origin for this call must be Signed.
-
threshold
: The total number of approvals for this dispatch before it is executed. -
other_signatories
: The accounts (other than the sender) who can approve this dispatch. May not be empty. -
maybe_timepoint
: If this is the first approval, then this must beNone
. If it is not the first approval, then it must beSome
, with the timepoint (block number and transaction index) of the first approval transaction. -
call
: The call to be executed.
NOTE: Unless this is the final approval, you will generally want to use
approve_as_multi
instead, since it only requires a hash of the call.
Result is equivalent to the dispatched result if threshold
is exactly 1
. Otherwise
on success, result is Ok
and the result from the interior call, if it was executed,
may be found in the deposited MultisigExecuted
event.
Complexity
-
O(S + Z + Call)
. - Up to one balance-reserve or unreserve operation.
- One passthrough operation, one insert, both
O(S)
whereS
is the number of signatories.S
is capped byMaxSignatories
, with weight being proportional. - One call encode & hash, both of complexity
O(Z)
whereZ
is tx-len. - One encode & hash, both of complexity
O(S)
. - Up to one binary search and insert (
O(logS + S)
). - I/O: 1 read
O(S)
, up to 1 mutateO(S)
. Up to one remove. - One event.
- The weight of the
call
. - Storage: inserts one item, value size bounded by
MaxSignatories
, with a deposit taken for its lifetime ofDepositBase + threshold * DepositFactor
.
approve_as_multi - 2
approve_as_multi(threshold, other_signatories, maybe_timepoint, call_hash, max_weight)
No weight available.
threshold: u16
other_signatories: Vec<T::AccountId>
maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>>
call_hash: [u8; 32]
max_weight: Weight
Register approval for a dispatch to be made from a deterministic composite account if
approved by a total of threshold - 1
of other_signatories
.
Payment: DepositBase
will be reserved if this is the first approval, plus
threshold
times DepositFactor
. It is returned once this dispatch happens or
is cancelled.
The dispatch origin for this call must be Signed.
-
threshold
: The total number of approvals for this dispatch before it is executed. -
other_signatories
: The accounts (other than the sender) who can approve this dispatch. May not be empty. -
maybe_timepoint
: If this is the first approval, then this must beNone
. If it is not the first approval, then it must beSome
, with the timepoint (block number and transaction index) of the first approval transaction. -
call_hash
: The hash of the call to be executed.
NOTE: If this is the final approval, you will want to use as_multi
instead.
Complexity
-
O(S)
. - Up to one balance-reserve or unreserve operation.
- One passthrough operation, one insert, both
O(S)
whereS
is the number of signatories.S
is capped byMaxSignatories
, with weight being proportional. - One encode & hash, both of complexity
O(S)
. - Up to one binary search and insert (
O(logS + S)
). - I/O: 1 read
O(S)
, up to 1 mutateO(S)
. Up to one remove. - One event.
- Storage: inserts one item, value size bounded by
MaxSignatories
, with a deposit taken for its lifetime ofDepositBase + threshold * DepositFactor
.
cancel_as_multi - 3
cancel_as_multi(threshold, other_signatories, timepoint, call_hash)
Taking 0.0123 % of a block.
threshold: u16
other_signatories: Vec<T::AccountId>
timepoint: Timepoint<BlockNumberFor<T>>
call_hash: [u8; 32]
Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success.
The dispatch origin for this call must be Signed.
-
threshold
: The total number of approvals for this dispatch before it is executed. -
other_signatories
: The accounts (other than the sender) who can approve this dispatch. May not be empty. -
timepoint
: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. -
call_hash
: The hash of the call to be executed.
Complexity
-
O(S)
. - Up to one balance-reserve or unreserve operation.
- One passthrough operation, one insert, both
O(S)
whereS
is the number of signatories.S
is capped byMaxSignatories
, with weight being proportional. - One encode & hash, both of complexity
O(S)
. - One event.
- I/O: 1 read
O(S)
, one remove. - Storage: removes one item.
ProvideRandomness - 52
request - 0
request(randomness_type, salt)
Taking 0.0404 % of a block.
randomness_type: RandomnessType
salt: H256
Request randomness.
Proxy - 53
proxy - 0
proxy(real, force_proxy_type, call)
Taking 0.0062 % of a block.
real: AccountIdLookupOf<T>
force_proxy_type: Option<T::ProxyType>
call: Box<<T as Config>::RuntimeCall>
Dispatch the given call
from an account that the sender is authorised for through
add_proxy
.
The dispatch origin for this call must be Signed.
Parameters:
-
real
: The account that the proxy will make a call on behalf of. -
force_proxy_type
: Specify the exact proxy type to be used and checked for this call. -
call
: The call to be made by thereal
account.
add_proxy - 1
add_proxy(delegate, proxy_type, delay)
Taking 0.0121 % of a block.
delegate: AccountIdLookupOf<T>
proxy_type: T::ProxyType
delay: BlockNumberFor<T>
Register a proxy account for the sender that is able to make calls on its behalf.
The dispatch origin for this call must be Signed.
Parameters:
-
proxy
: The account that thecaller
would like to make a proxy. -
proxy_type
: The permissions allowed for this proxy account. -
delay
: The announcement period required of the initial proxy. Will generally be zero.
remove_proxy - 2
remove_proxy(delegate, proxy_type, delay)
Taking 0.0121 % of a block.
delegate: AccountIdLookupOf<T>
proxy_type: T::ProxyType
delay: BlockNumberFor<T>
Unregister a proxy account for the sender.
The dispatch origin for this call must be Signed.
Parameters:
-
proxy
: The account that thecaller
would like to remove as a proxy. -
proxy_type
: The permissions currently enabled for the removed proxy account.
remove_proxies - 3
remove_proxies()
Taking 0.012 % of a block.
Unregister all proxy accounts for the sender.
The dispatch origin for this call must be Signed.
WARNING: This may be called on accounts created by pure
, however if done, then
the unreserved fees will be inaccessible. All access to this account will be lost.
create_pure - 4
create_pure(proxy_type, delay, index)
Taking 0.0121 % of a block.
proxy_type: T::ProxyType
delay: BlockNumberFor<T>
index: u16
Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
initialize it with a proxy of proxy_type
for origin
sender.
Requires a Signed
origin.
-
proxy_type
: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissiveProxyType
possible to allow for maximum flexibility. -
index
: A disambiguation index, in case this is called multiple times in the same transaction (e.g. withutility::batch
). Unless you're usingbatch
you probably just want to use0
. -
delay
: The announcement period required of the initial proxy. Will generally be zero.
Fails with Duplicate
if this has already been called in this transaction, from the
same sender, with the same parameters.
Fails if there are insufficient funds to pay for deposit.
kill_pure - 5
kill_pure(spawner, proxy_type, index, height, ext_index)
Taking 0.012 % of a block.
spawner: AccountIdLookupOf<T>
proxy_type: T::ProxyType
index: u16
height: BlockNumberFor<T>
ext_index: u32
Removes a previously spawned pure proxy.
WARNING: All access to this account will be lost. Any funds held in it will be inaccessible.
Requires a Signed
origin, and the sender account must have been created by a call to
pure
with corresponding parameters.
-
spawner
: The account that originally calledpure
to create this account. -
index
: The disambiguation index originally passed topure
. Probably0
. -
proxy_type
: The proxy type originally passed topure
. -
height
: The height of the chain when the call topure
was processed. -
ext_index
: The extrinsic index in which the call topure
was processed.
Fails with NoPermission
in case the caller is not a previously created pure
account whose pure
call has corresponding parameters.