Type Definition frame_system::pallet::Module

source · []
pub type Module<T> = Pallet<T>;
Expand description

Type alias to Pallet, to be used by construct_runtime.

Generated by pallet attribute macro.

Implementations

👎 Deprecated:

Use inc_consumers instead

Increment the reference counter on an account.

👎 Deprecated:

Use dec_consumers instead

Decrement the reference counter on an account. This MUST only be done once for every time you called inc_consumers on who.

👎 Deprecated:

Use consumers instead

The number of outstanding references for the account who.

👎 Deprecated:

Use !is_provider_required instead

True if the account has no outstanding references.

Increment the reference counter on an account.

The account who’s providers must be non-zero or this will return an error.

Decrement the reference counter on an account. This MUST only be done once for every time you called inc_consumers on who.

The number of outstanding references for the account who.

Increment the reference counter on an account.

The account who’s providers must be non-zero or this will return an error.

Decrement the reference counter on an account. This MUST only be done once for every time you called inc_consumers on who.

The number of outstanding references for the account who.

True if the account has some outstanding references.

Deposits an event into this block’s event record.

Deposits an event into this block’s event record adding this event to the corresponding topic indexes.

This will update storage entries that correspond to the specified topics. It is expected that light-clients could subscribe to this topics.

Gets the index of extrinsic that is currently executing.

Gets extrinsics count.

Inform the system pallet of some additional weight that should be accounted for, in the current block.

NOTE: use with extra care; this function is made public only be used for certain pallets that need it. A runtime that does not have dynamic calls should never need this and should stick to static weights. A typical use case for this is inner calls or smart contract calls. Furthermore, it only makes sense to use this when it is presumably cheap to provide the argument weight; In other words, if this function is to be used to account for some unknown, user provided call’s weight, it would only make sense to use it if you are sure you can rapidly compute the weight of the inner call.

Even more dangerous is to note that this function does NOT take any action, if the new sum of block weight is more than the block weight limit. This is what the unchecked.

Another potential use-case could be for the on_initialize and on_finalize hooks.

Start the execution of a particular block.

Remove temporary “environment” entries in storage, compute the storage root and return the resulting header for this block.

Deposits a log and ensures it matches the block’s log data.

  • O(1)
  • 1 storage write (codec O(1))

Get the basic externalities for this pallet, useful for tests.

Set the block number to something in particular. Can be used as an alternative to initialize for tests that don’t need to bother with the other environment entries.

Sets the index of extrinsic that is currently executing.

Set the parent hash number to something in particular. Can be used as an alternative to initialize for tests that don’t need to bother with the other environment entries.

Set the current block weight. This should only be used in some integration tests.

Reset events. Can be used as an alternative to initialize for tests that don’t need to bother with the other environment entries.

Return the chain’s current runtime version.

Retrieve the account transaction counter from storage.

Increment a particular account’s nonce by 1.

Note what the extrinsic data of the current extrinsic index is.

This is required to be called before applying an extrinsic. The data will used in Self::finalize to calculate the correct extrinsics root.

To be called immediately after an extrinsic has been applied.

To be called immediately after note_applied_extrinsic of the last extrinsic of the block has been called.

To be called immediately after finishing the initialization of the block (e.g., called on_initialize for all pallets).

An account is being created.

Determine whether or not it is possible to update the code.

Checks the given code if it is a valid runtime wasm blob by instantianting it and extracting the runtime version of it. It checks that the runtime version of the old and new runtime has the same spec name and that the spec version is increasing.