pub type Module<T> = Pallet<T>;
👎Deprecated: use Pallet instead
Expand description

Type alias to Pallet, to be used by construct_runtime.

Generated by pallet attribute macro.

Aliased Type§

struct Module<T>(/* private fields */);

Implementations§

source§

impl<T: Config> Pallet<T>

source

pub fn reap_page( origin: OriginFor<T>, message_origin: MessageOriginOf<T>, page_index: u32 ) -> DispatchResult

Remove a page which has no more messages remaining to be processed or is stale.

source

pub fn execute_overweight( origin: OriginFor<T>, message_origin: MessageOriginOf<T>, page: u32, index: T::Size, weight_limit: Weight ) -> DispatchResultWithPostInfo

Execute an overweight message.

Temporary processing errors will be propagated whereas permanent errors are treated as success condition.

  • origin: Must be Signed.
  • message_origin: The origin from which the message to be executed arrived.
  • page: The page in the queue in which the message to be executed is sitting.
  • index: The index into the queue of the message to be executed.
  • weight_limit: The maximum amount of weight allowed to be consumed in the execution of the message.

Benchmark complexity considerations: O(index + weight_limit).

source§

impl<T: Config> Pallet<T>

source

pub fn do_execute_overweight( origin: MessageOriginOf<T>, page_index: u32, index: T::Size, weight_limit: Weight ) -> Result<Weight, Error<T>>

Try to execute a single message that was marked as overweight.

The weight_limit is the weight that can be consumed to execute the message. The base weight of the function it self must be measured by the caller.

source

pub fn debug_info() -> String

Print the pages in each queue and the messages in each page.

Processed messages are prefixed with a * and the current beginning page with a >.

Example output
queue Here:
  page 0: []
> page 1: []
  page 2: ["\0weight=4", "\0c", ]
  page 3: ["\0bigbig 1", ]
  page 4: ["\0bigbig 2", ]
  page 5: ["\0bigbig 3", ]

Trait Implementations§

source§

impl<T: Config> Callable<T> for Pallet<T>

source§

impl<T> Clone for Pallet<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Pallet<T>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Config> EnqueueMessage<<<T as Config>::MessageProcessor as ProcessMessage>::Origin> for Pallet<T>

§

type MaxMessageLen = MaxMessageLen<<<T as Config>::MessageProcessor as ProcessMessage>::Origin, <T as Config>::Size, <T as Config>::HeapSize>

The maximal length any enqueued message may have.
source§

fn enqueue_message( message: BoundedSlice<'_, u8, Self::MaxMessageLen>, origin: <T::MessageProcessor as ProcessMessage>::Origin )

Enqueue a single message from a specific origin.
source§

fn enqueue_messages<'a>( messages: impl Iterator<Item = BoundedSlice<'a, u8, Self::MaxMessageLen>>, origin: <T::MessageProcessor as ProcessMessage>::Origin )

Enqueue multiple messages from a specific origin.
source§

fn sweep_queue(origin: MessageOriginOf<T>)

Any remaining unprocessed messages should happen only lazily, not proactively.
source§

fn footprint(origin: MessageOriginOf<T>) -> Footprint

Return the state footprint of the given queue.
source§

impl<T: Config> GetStorageVersion for Pallet<T>

§

type CurrentStorageVersion = NoStorageVersionSet

This will be filled out by the pallet macro. Read more
source§

fn current_storage_version() -> Self::CurrentStorageVersion

Returns the current storage version as supported by the pallet.
source§

fn on_chain_storage_version() -> StorageVersion

Returns the on-chain storage version of the pallet as stored in the storage.
source§

impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn integrity_test()

Check all compile-time assumptions about crate::Config.

source§

fn on_initialize(_n: BlockNumberFor<T>) -> Weight

Block initialization hook. This is called at the very beginning of block execution. Read more
source§

fn on_finalize(_n: BlockNumber)

Block finalization hook. This is called at the very end of block execution. Read more
source§

fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight

Hook to consume a block’s idle time. This will run when the block is being finalized (before Hooks::on_finalize). Read more
source§

fn on_runtime_upgrade() -> Weight

Hook executed when a code change (aka. a “runtime upgrade”) is detected by FRAME. Read more
source§

fn offchain_worker(_n: BlockNumber)

Implementing this function on a pallet allows you to perform long-running tasks that are dispatched as separate threads, and entirely independent of the main wasm runtime. Read more
source§

impl<T: Config> IntegrityTest for Pallet<T>

source§

impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn offchain_worker(n: BlockNumberFor<T>)

This function is being called after every block import (when fully synced). Read more
source§

impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

impl<T: Config> OnGenesis for Pallet<T>

source§

fn on_genesis()

Something that should happen at genesis.
source§

impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn on_idle(n: BlockNumberFor<T>, remaining_weight: Weight) -> Weight

source§

impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

impl<T: Config> OnRuntimeUpgrade for Pallet<T>

source§

impl<T: Config> PalletInfoAccess for Pallet<T>

source§

fn index() -> usize

Index of the pallet as configured in the runtime.
source§

fn name() -> &'static str

Name of the pallet as configured in the runtime.
source§

fn module_name() -> &'static str

Name of the Rust module containing the pallet.
source§

fn crate_version() -> CrateVersion

Version of the crate containing the pallet.
source§

impl<T: Config> PalletsInfoAccess for Pallet<T>

source§

fn count() -> usize

The number of pallets’ information that this type represents. Read more
source§

fn infos() -> Vec<PalletInfoData>

All of the pallets’ information that this type represents.
source§

impl<T> PartialEq<Pallet<T>> for Pallet<T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Config> ServiceQueues for Pallet<T>

source§

fn execute_overweight( weight_limit: Weight, (message_origin, page, index): Self::OverweightMessageAddress ) -> Result<Weight, ExecuteOverweightError>

Execute a single overweight message.

The weight limit must be enough for execute_overweight and the message execution itself.

§

type OverweightMessageAddress = (<<T as Config>::MessageProcessor as ProcessMessage>::Origin, u32, <T as Config>::Size)

Addresses a specific overweight message.
source§

fn service_queues(weight_limit: Weight) -> Weight

Service all message queues in some fair manner. Read more
source§

impl<T: Config> StorageInfoTrait for Pallet<T>

source§

impl<T: Config> WhitelistedStorageKeys for Pallet<T>

source§

fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>

Returns a Vec<TrackedStorageKey> indicating the storage keys that should be whitelisted during benchmarking. This means that those keys will be excluded from the benchmarking performance calculation.
source§

impl<T> Eq for Pallet<T>