runtime-calls.md
-
Hugo Trentesaux authored
* adds event documentation * wip more compact * improve runtime events doc * add runtime events doc
Hugo Trentesaux authored* adds event documentation * wip more compact * improve runtime events doc * add runtime events doc
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 80 user calls from 23 pallets.
Account - 1
unlink_identity - 0
unlink_identity()
unlink the identity associated with the account
Scheduler - 2
schedule - 0
schedule(when, maybe_periodic, priority, call)
when: T::BlockNumber
maybe_periodic: Option<schedule::Period<T::BlockNumber>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Anonymously schedule a task.
cancel - 1
cancel(when, index)
when: T::BlockNumber
index: u32
Cancel an anonymously scheduled task.
schedule_named - 2
schedule_named(id, when, maybe_periodic, priority, call)
id: TaskName
when: T::BlockNumber
maybe_periodic: Option<schedule::Period<T::BlockNumber>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Schedule a named task.
cancel_named - 3
cancel_named(id)
id: TaskName
Cancel a named scheduled task.
schedule_after - 4
schedule_after(after, maybe_periodic, priority, call)
after: T::BlockNumber
maybe_periodic: Option<schedule::Period<T::BlockNumber>>
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)
id: TaskName
after: T::BlockNumber
maybe_periodic: Option<schedule::Period<T::BlockNumber>>
priority: schedule::Priority
call: Box<<T as Config>::RuntimeCall>
Schedule a named task after a delay.
Babe - 3
report_equivocation - 0
report_equivocation(equivocation_proof, key_owner_proof)
equivocation_proof: Box<EquivocationProof<T::Header>>
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)
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.
set_balance_deprecated - 1
set_balance_deprecated(who, new_free, old_reserved)
who: AccountIdLookupOf<T>
new_free: T::Balance
old_reserved: T::Balance
Set the regular balance of a given account; it also takes a reserved balance but this must be the same as the account's current reserved balance.
The dispatch origin for this call is root
.
WARNING: This call is DEPRECATED! Use force_set_balance
instead.
transfer_keep_alive - 3
transfer_keep_alive(dest, value)
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)
dest: AccountIdLookupOf<T>
keep_alive: bool
Transfer the entire transferable balance from the caller account.