functions.php
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 are disabled for different reasons (to be documented).
User calls
There are 53 user calls organized in 18 pallets.
2: Scheduler
0: schedule(when, maybe_periodic, priority, call)
Index
0
Documentation
Anonymously schedule a task.
Types of parameters
when: T::BlockNumber,
maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
priority: schedule::Priority,
call: Box<CallOrHashOf<T>>
1: cancel(when, index)
Index
1
Documentation
Cancel an anonymously scheduled task.
Types of parameters
when: T::BlockNumber,
index: u32
2: schedule_named(id, when, maybe_periodic, priority, call)
Index
2
Documentation
Schedule a named task.
Types of parameters
id: Vec<u8>,
when: T::BlockNumber,
maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
priority: schedule::Priority,
call: Box<CallOrHashOf<T>>
3: cancel_named(id)
Index
3
Documentation
Cancel a named scheduled task.
Types of parameters
id: Vec<u8>
4: schedule_after(after, maybe_periodic, priority, call)
Index
4
Documentation
Anonymously schedule a task after a delay.
Types of parameters
after: T::BlockNumber,
maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
priority: schedule::Priority,
call: Box<CallOrHashOf<T>>
5: schedule_named_after(id, after, maybe_periodic, priority, call)
Index
5
Documentation
Schedule a named task after a delay.
Types of parameters
id: Vec<u8>,
after: T::BlockNumber,
maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
priority: schedule::Priority,
call: Box<CallOrHashOf<T>>
3: Babe
0: report_equivocation(equivocation_proof, key_owner_proof)
Index
0
Documentation
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.
Types of parameters
equivocation_proof: Box<EquivocationProof<T::Header>>,
key_owner_proof: T::KeyOwnerProof
6: Balances
0: transfer(dest, value)
Index
0
Documentation
Transfer some liquid free balance to another account.
transfer
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.
Types of parameters
dest: <T::Lookup as StaticLookup>::Source,
value: T::Balance
3: transfer_keep_alive(dest, value)
Index
3
Documentation
Same as the transfer
call, but with a check that the transfer will not kill the
origin account.
99% of the time you want transfer
instead.
Types of parameters
dest: <T::Lookup as StaticLookup>::Source,
value: T::Balance
4: transfer_all(dest, keep_alive)
Index
4
Documentation
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). # - O(1). Just like transfer, but reading the user's transferable balance first. #
Types of parameters
dest: <T::Lookup as StaticLookup>::Source,
keep_alive: bool
10: AuthorityMembers
0: go_offline()
Index
0