Expand description
All traits often used in FRAME pallets.
Note that types implementing these traits can also be found in this module.
Modules§
- base2
- Types for a base-2 merkle tree used for checking and generating proofs within the
runtime. The
binary-merkle-tree
crate exposes all of these same functionality (and more), but this library is designed to work more easily with runtime native types, which simply need to implementEncode
/Decode
. - base16
- Types for a compact base-16 merkle trie used for checking and generating proofs within the
runtime. The
sp-trie
crate exposes all of these same functionality (and more), but this library is designed to work more easily with runtime native types, which simply need to implementEncode
/Decode
. It also exposes a runtime friendlyTrieError
type which can be use inside of a FRAME Pallet. - defensive_
prelude - Prelude module for all defensive traits to be imported at once.
- dynamic_
params - Types and traits for dynamic parameters.
- reality
- Traits concerned with modelling reality.
- schedule
- Traits and associated utilities for scheduling dispatchables in FRAME.
- tasks
- Contains the
Task
trait, which defines a general-purpose way for defining and executing service work, and supporting types. - tokens
- Traits for working with tokens and their associated datastructures.
- transaction_
extension - The transaction extension trait.
Macros§
- parameter_
types - Create new implementations of the
Get
trait.
Structs§
- Account
IdLookup - A lookup implementation returning the
AccountId
from aMultiAddress
. - Active
Issuance Of - A non-const
Get
implementation parameterised by aCurrency
impl which provides the result ofactive_issuance
. - Append
Zeros Input - Input that adds infinite number of zero after wrapped input.
- AsContains
- Adapter struct for turning an
OrderedMembership
impl into aContains
impl. - AsEnsure
Origin With Arg - Backing
- Some amount of backing from a group. The precise definition of what it means to “back” something is left flexible.
- BadOrigin
- An error type that indicates that the origin is invalid.
- Batch
Footprint - The resource footprint of a batch of messages.
- Batches
Footprints - The resource footprints of continuous subsets of messages.
- Binary
Merkle Tree Prover - Implements
VerifyExistenceProof
using a binary merkle tree. - Blake
Two256 - Blake2-256 Hash implementation.
- Call
Metadata - The function and pallet name of the Call.
- Checked
Reduce By - A
TryMorph
implementation to reduce a scalar by a particular amount, checking for underflow. - Class
Count Of - Clear
Filter Guard - Guard type for clearing all pushed constraints from a
FilterStack
and reinstating them when dropped. - Const
Bool - Const getter for a basic type.
- ConstI8
- Const getter for a basic type.
- Const
I16 - Const getter for a basic type.
- Const
I32 - Const getter for a basic type.
- Const
I64 - Const getter for a basic type.
- Const
I128 - Const getter for a basic type.
- Const
Int - Const getter for signed integers.
- ConstU8
- Const getter for a basic type.
- Const
U16 - Const getter for a basic type.
- Const
U32 - Const getter for a basic type.
- Const
U64 - Const getter for a basic type.
- Const
U128 - Const getter for a basic type.
- Const
Uint - Const getter for unsigned integers.
- Constant
Storage Price - Constant
Price
regardless of the givenFootprint
. - Convert
Into - A structure that performs standard conversion using the standard Rust conversion traits.
- Convert
ToValue - Adapter which turns a Get implementation into a Convert implementation which always returns in the same value no matter the input.
- Crate
Version - The version of a crate.
- Disabled
- Placeholder marking functionality disabled. Useful for disabling various (sub)features.
- Either
Of - “OR gate” implementation of
EnsureOrigin
,Success
type for bothL
andR
must be equal. - Either
OfDiverse - “OR gate” implementation of
EnsureOrigin
allowing for differentSuccess
types forL
andR
, with them combined using anEither
type. - Enqueue
With Origin - Adapter type to transform an
EnqueueMessage
with an origin into aHandleMessage
impl. - Ensure
Origin Equal OrHigher Privilege EnsureOrigin
implementation that checks that an origin has equal or higher privilege compared to the expectedOrigin
.- Equal
Privilege Only - Implementation of
PrivilegeCmp
that only checks for equal origins. - Equals
- An implementation of
Contains
which contains only equal members toT
. - Everything
But - A
Contains
implementation that contains everything except the values inExclude
. - Fake
Dispatchable - Dispatchable impl containing an arbitrary value which panics if it actually is dispatched.
- Filter
Stack Guard - Guard type for pushing a constraint to a
FilterStack
and popping when dropped. - Footprint
- The resource footprint of a bunch of blobs. We assume only the number of blobs and their total size in bytes matter.
- From
Contains - A
ContainsPair
implementation that has aContains
implementation for each member of the pair. - From
Contains Pair - Converter
struct
to use aContainsPair
implementation for aContains
bound. - GetDefault
- Implement Get by returning Default for any type that implements Default.
- Identity
- A structure that performs identity conversion.
- Identity
Lookup - A lookup implementation returning the input value.
- Implication
Parts - The implication in a transaction.
- Inside
Both - A
Contains
implementation which contains all members ofThese
which are also members ofThose
. - IsInVec
- Trivial utility for implementing
Contains
/OrderedMembership
with aVec
. - Keccak256
- Keccak-256 Hash implementation.
- Linear
Storage Price - A storage price that increases linearly with the number of elements and their size.
- Lookup
Error - An error that indicates that a lookup failed.
- MapSuccess
- A derivative
EnsureOrigin
implementation. It mutates theSuccess
result of anOriginal
implementation with a givenMutator
. - Morph
Into - Implementation of
Morph
which converts between types usingInto
. - Morph
With Upper Limit - A
TryMorph
implementation to enforce an upper limit for a result of the outer morphed type. - Never
Ensure Origin EnsureOrigin
implementation that always fails.- NoOp
Poll - NoOp polling is required if pallet-referenda functionality not needed.
- NoStorage
Version Set - Special marker struct used when
storage_version
is not defined for a pallet. - Noop
Service Queues - Services queues by doing nothing.
- Pallet
Info Data - Information regarding an instance of a pallet.
- Phantom
Data - Zero-sized type used to mark things that “act like” they own a
T
. - Queue
Footprint - The resource footprint of a queue.
- Reduce
By - Mutator which reduces a scalar by a particular amount.
- Replace
- Morpher to disregard the source value and replace with another.
- Replace
With Default - Morpher to disregard the source value and replace with the default of
V
. - Sixteen
Patricia Merkle Tree Existence Proof - Proof used by
SixteenPatriciaMerkleTreeProver
forVerifyExistenceProof
. - Sixteen
Patricia Merkle Tree Prover - Implements
VerifyExistenceProof
using a 16-patricia merkle tree. - Storage
Info - Metadata about storage from the runtime.
- Storage
MapShim - A shim for placing around a storage item in order to use it as a
StoredValue
. Ideally this wouldn’t be needed asStorageValue
s should blanket implementStoredValue
s, however this would break the ability to have custom impls ofStoredValue
. The other workaround is to implement it directly in the macro. - Storage
Version - The storage version of a pallet.
- Take
First - Implementation of
Morph
to retrieve just the first element of a tuple. - These
Except - A
Contains
implementation that contains all members ofThese
excepting any members inExcept
. - Total
Issuance Of - A non-const
Get
implementation parameterised by aCurrency
impl which provides the result oftotal_issuance
. - Tracked
Storage Key - Storage key with read/write tracking information.
- Trailing
Zero Input - Input that adds infinite number of zero after wrapped input.
- Transaction
Extension Metadata - Information about a
TransactionExtension
for the runtime metadata. - Transform
Origin - Transform the origin of an
EnqueueMessage
viaC::convert
. - TryConvert
Into - A structure that performs standard conversion using the standard Rust conversion traits.
- TryDecode
Entire Storage Error - A value could not be decoded.
- TryMap
Success - A derivative
EnsureOrigin
implementation. It mutates theSuccess
result of anOriginal
implementation with a givenMutator
, allowing the possibility of an error to be returned from the mutator. - TryMorph
Into - Implementation of
TryMorph
which attempts to convert between types usingTryInto
. - TryWith
Morphed Arg - TxBase
Implication - The base implication in a transaction.
- Variant
Count Of - Adapter for
Get<u32>
to accessVARIANT_COUNT
fromtrait pub trait VariantCount {
. - Withdraw
Reasons - Reasons for moving funds out of an account.
- Wrapper
Keep Opaque - A wrapper for any type
T
which implement encode/decode in a way compatible withVec<u8>
. - Wrapper
Opaque - A wrapper for any type
T
which implement encode/decode in a way compatible withVec<u8>
.
Enums§
- Balance
Status - Status of funds.
- Everything
- A
Contains
implementation that contains every value. - Execute
Overweight Error - Errors that can happen when attempting to execute an overweight message with
ServiceQueues::execute_overweight()
. - Existence
Requirement - Simple boolean for whether an account needs to be kept in existence.
- Nothing
- A
Contains
implementation that contains no value. - Poll
Status - Process
Message Error - Errors that can happen when attempting to process a message with
ProcessMessage::process_message()
. - Safe
Mode Error - The error type for
SafeMode
. - Same
OrOther - Return type used when we need to return one of two items, each of the opposite direction or
sign, with one (
Same
) being of the same type as theself
or primary argument of the function that returned it. - Signed
Imbalance - Either a positive or a negative imbalance.
- Transaction
Pause Error - The error type for
TransactionPause
. - Trie
Error - A runtime friendly error type for tries.
- TryState
Select - Which state tests to execute.
- Upgrade
Check Select - Select which checks should be run when trying a runtime upgrade upgrade.
Constants§
- STORAGE_
VERSION_ STORAGE_ KEY_ POSTFIX - The storage key postfix that is used to store the
StorageVersion
per pallet.
Traits§
- Account
IdConversion - This type can be converted into and possibly from an AccountId (which itself is generic).
- Account
Touch - Trait for touching/creating an asset account with a deposit taken from a designated depositor specified by the client.
- AppVerify
- Means of signature verification of an application key.
- Applyable
- An “executable” piece of information, used by the standard Substrate Executive in order to enact a piece of extrinsic information by marshalling and dispatching to a named function call.
- AsSystem
Origin Signer - Runtime Origin which includes a System Origin variant whose
AccountId
is the parameter. - AsTransaction
Authorized Origin - Interface to differentiate between Runtime Origins authorized to include a transaction into the block and dispatch it, and those who aren’t.
- AtLeast32
Bit - A meta trait for arithmetic.
- AtLeast32
BitUnsigned - A meta trait for arithmetic. Same as
AtLeast32Bit
, but also bounded to be unsigned. - Authorize
- A trait to allow calls to authorize themselves from the origin
None
. - Before
AllRuntime Migrations - Implemented by pallets, allows defining logic to run prior to any
OnRuntimeUpgrade
logic. - Blind
Checkable - A “checkable” piece of information, used by the standard Substrate Executive in order to check the validity of a piece of extrinsic information, usually by verifying the signature. Implement for pieces of information that don’t require additional context in order to be checked.
- Block
- Something which fulfills the abstract idea of a Substrate block. It has types for
Extrinsic
pieces of information as well as aHeader
. - Block
IdTo - Something that can convert a
BlockId
to a number or a hash. - Block
Number - Super trait with all the attributes for a block number.
- Block
Number Provider - Get current block number
- Build
Genesis Config - A trait to define the build function of a genesis config for both runtime and pallets.
- Caller
Trait - The trait implemented by the overarching enumeration of the different pallets’ origins.
Unlike
OriginTrait
impls, this does not include any kind of dispatch/call filter. Also, this trait is more flexible in terms of how it can be used: it is aParameter
andMember
, so it can be used as dispatchable parameters as well as in storage items. - Change
Members - Trait for type that can handle incremental changes to a set of account IDs.
- Check
Equal - Something that can be checked for equality and printed out to a debug channel if bad.
- Checkable
- Extract the digest type for a block.
A “checkable” piece of information, used by the standard Substrate Executive in order to
check the validity of a piece of extrinsic information, usually by verifying the signature.
Implement for pieces of information that require some additional context
Context
in order to be checked. - Checked
Add - Performs addition that returns
None
instead of wrapping around on overflow. - Checked
Conversion - Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
TryFrom
andTryInto
. - Checked
Div - Performs division that returns
None
instead of panicking on division by zero and instead of wrapping around on underflow and overflow. - Checked
Mul - Performs multiplication that returns
None
instead of wrapping around on underflow or overflow. - Checked
Shl - Performs a left shift that returns
None
on shifts larger than or equal to the type width. - Checked
Shr - Performs a right shift that returns
None
on shifts larger than or equal to the type width. - Checked
Sub - Performs subtraction that returns
None
instead of wrapping around on underflow. - Clear
- Trait for things that can be clear (have no bits set). For numeric types, essentially the same
as
Zero
. - Consideration
- Some sort of cost taken from account temporarily in order to offset the cost to the chain of
holding some data
Footprint
in state. - Contains
- A trait for querying whether a type can be said to “contain” a value.
- Contains
Length Bound - A trait for querying bound for the length of an implementation of
Contains
- Contains
Pair - A trait for querying whether a type can be said to “contain” a pair-value.
- Convert
- Infallible conversion trait. Generic over both source and destination types.
- Convert
Back - Reversing infallible conversion trait. Generic over both source and destination types.
- Currency
- Abstraction over a fungible assets system.
- Debug
?
formatting.- Defensive
- A trait to handle errors and options when you are really sure that a condition must hold, but
not brave enough to
expect
on it, or a default fallback value makes more sense. - Defensive
Max - Defensively calculates the maximum of two values.
- Defensive
Min - Defensively calculates the minimum of two values.
- Defensive
Option - Subset of methods similar to
Defensive
that can only work for aOption
. - Defensive
Result - Subset of methods similar to
Defensive
that can only work for aResult
. - Defensive
Saturating - A variant of
Defensive
with the same rationale, for the arithmetic operations where in case an infallible operation fails, it saturates. - Defensive
Truncate From - Construct an object by defensively truncating an input if the
TryFrom
conversion fails. - Defensive
Truncate Into - Defensively truncate a value and convert it into its bounded form.
- Disabled
Validators - Trait used to check whether a given validator is currently disabled and should not be participating in consensus (e.g. because they equivocated).
- Dispatch
Transaction - Single-function utility trait with a blanket impl over
TransactionExtension
in order to provide transaction dispatching functionality. We avoid implementing this directly on the trait since we never want it to be overriden by the trait implementation. - Dispatchable
- A lazy call (module function and argument values) that can be executed via its
dispatch
method. - Enqueue
Message - Can enqueue messages for multiple origins.
- Ensure
- Ensure
Add - Performs addition that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
AddAssign - Performs self addition that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
Div - Performs division that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
DivAssign - Performs self division that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
Fixed Point Number - Extends
FixedPointNumber
with the Ensure family functions. - Ensure
From - Similar to
TryFrom
but returning anArithmeticError
error. - Ensure
Into - Similar to
TryInto
but returning anArithmeticError
error. - Ensure
Mul - Performs multiplication that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
MulAssign - Performs self multiplication that returns
ArithmeticError
instead of wrapping around on overflow. - Ensure
Op - Meta trait that supports all immutable arithmetic
Ensure*
operations - Ensure
OpAssign - Meta trait that supports all assigned arithmetic
Ensure*
operations - Ensure
Origin - Some sort of check on the origin is performed by this object.
- Ensure
Origin With Arg - Some sort of check on the origin is performed by this object.
- Ensure
Sub - Performs subtraction that returns
ArithmeticError
instead of wrapping around on underflow. - Ensure
SubAssign - Performs self subtraction that returns
ArithmeticError
instead of wrapping around on underflow. - Estimate
Call Fee - Something that can estimate the fee of a (frame-based) call.
- Estimate
Next NewSession - Something that can estimate at which block scheduling of the next session will happen (i.e when we will try to fetch new validators).
- Estimate
Next Session Rotation - Something that can estimate at which block the next session rotation will happen (i.e. a new session starts).
- Execute
Block - Something that can execute a given block.
- Extension
Post Dispatch Weight Handler - A type that can handle weight refunds and incorporate extension weights into the call weight after dispatch.
- Extrinsic
Deprecated - Something that acts like an
Extrinsic
. - Extrinsic
Call - An extrinsic on which we can get access to call.
- Extrinsic
Like - Something that acts like an
Extrinsic
. - Extrinsic
Metadata - Implementor is an
Extrinsic
and provides metadata about this extrinsic. - Filter
Deprecated - Filter
Stack - Trait to add a constraint onto the filter.
- Find
Author - A trait for finding the author of a block header based on the
PreRuntime
digests contained within it. - Genesis
Build Deprecated - A trait to define the build function of a genesis config, T and I are placeholder for pallet trait and pallet instance.
- Get
- A trait for querying a single value from a type.
- GetBacking
- Retrieve the backing from an object’s ref.
- GetCall
Index - Gets the function index of the Call.
- GetCall
Metadata - Gets the metadata for the Call - function name and pallet name.
- GetCall
Name - Gets the function name of the Call.
- GetNode
Block Type - A marker trait for something that knows the type of the node block.
- GetRuntime
Block Type - A marker trait for something that knows the type of the runtime block.
- GetStorage
Version - Provides information about a pallet’s storage versions.
- Handle
Lifetime - A simple, generic one-parameter event notifier/handler.
- Handle
Message - Handles incoming messages for a single origin.
- Hash
- Abstraction around hashing
- Hash
Output - Super trait with all the attributes for a hashing output.
- Header
- Something which fulfills the abstract idea of a Substrate header. It has types for a
Number
, aHash
and aHashing
. It provides access to anextrinsics_root
,state_root
andparent_hash
, as well as adigest
and a blocknumber
. - Hooks
- The pallet hooks trait. This is merely an umbrella trait for:
- Identify
Account - Some type that is able to be collapsed into an account ID. It is not possible to recreate the original value from the account ID.
- Imbalance
- A trait for a not-quite Linear Type that tracks an imbalance.
- Implication
- Interface of implications in the transaction extension pipeline.
- Incrementable
- A trait representing an incrementable type.
- Inherent
Builder - Interface for types capable of constructing an inherent extrinsic.
- Initialize
Members - Trait for type that can handle the initialization of account IDs at genesis.
- Inspect
Lockable Currency - A inspect interface for a currency whose accounts can have liquidity restrictions.
- Instance
- An instance of a pallet in the storage.
- Instance
Filter - Simple trait for providing a filter over a reference to some type, given an instance of itself.
- Integer
Square Root - A trait implementing integer square root.
- Integrity
Test - See
Hooks::integrity_test
. - IsInherent
- A trait to check if an extrinsic is an inherent.
- IsMember
- Determine if a
MemberId
is a valid member. - IsSub
Type - Something that can be checked to be a of sub type
T
. - IsType
- Trait to be used when types are exactly same.
- KeyOwner
Proof System - Something which can compute and check proofs of a historical key owner and return full identification data of that key owner.
- Lateness
- Trait to be used by block producing consensus engine modules to determine how late the current block is (e.g. in a slot-based proposal mechanism how many slots were skipped since the previous block).
- Lazy
- A lazy value.
- Len
- Anything that can have a
::len()
method. - Lockable
Currency - A currency whose accounts can have liquidity restrictions.
- Locker
- Trait to handle NFT locking mechanism to ensure interactions with the asset can be implemented downstream to extend logic of Uniques/Nfts current functionality.
- Lookup
- Means of changing one type into another in a manner dependent on the source type.
- Maybe
Consideration - An extension of the
Consideration
trait that allows for the management of tickets that may represent no cost. While theMaybeConsideration
still requires proper handling, it introduces the ability to determine if a ticket represents no cost and can be safely forgotten without any side effects. - Maybe
Convert - Fallible conversion trait returning an Option. Generic over both source and destination types.
- Maybe
Convert Back - Reversing fallible conversion trait returning an Option. Generic over both source and destination types.
- Maybe
Display - A type that implements Display when in std environment.
- Maybe
Equivalence - Definition for a bi-directional, fallible conversion between two types.
- Maybe
From Str - A type that implements FromStr when in std environment.
- Maybe
Hash - A type that implements Hash when in std environment.
- Maybe
Serialize - A type that implements Serialize when in std environment or serde feature is activated.
- Maybe
Serialize Deserialize - A type that implements Serialize, DeserializeOwned and Debug when in std environment or serde feature is activated.
- Member
- A type that can be used in runtime structures.
- Morph
- Extensible conversion trait. Generic over only source type, with destination type being associated.
- Named
Reservable Currency - Offchain
Worker - Off-chain computation trait.
- OnFinalize
- See
Hooks::on_finalize
. - OnGenesis
- A trait that will be called at genesis.
- OnIdle
- See
Hooks::on_idle
. - OnInitialize
- See
Hooks::on_initialize
. - OnKilled
Account - The account with the given id was reaped.
- OnNew
Account - Handler for when a new account has been created.
- OnPoll
- Periodically executes logic. Is not guaranteed to run within a specific timeframe and should only be used on logic that has no deadline.
- OnRuntime
Upgrade - See
Hooks::on_runtime_upgrade
. - OnTimestamp
Set - A trait which is called when the timestamp is set in the runtime.
- OnUnbalanced
- Handler for when some currency “account” decreased in balance for some reason.
- One
- Defines a multiplicative identity element for
Self
. - OneSession
Handler - A session handler for specific key type.
- Opaque
Keys - Opaque data type that may be destructured into a series of raw byte slices (which represent individual keys).
- Origin
Trait - Methods available on
frame_system::Config::RuntimeOrigin
. - Pallet
Error - Trait indicating that the implementing type is going to be included as a field in a variant of
the
#[pallet::error]
enum type. - Pallet
Info - Provides information about the pallet itself and its setup in the runtime.
- Pallet
Info Access - Provides information about the pallet itself and its setup in the runtime.
- Pallets
Info Access - Provide information about a bunch of pallets.
- Partial
Storage Info Trait - Similar to
StorageInfoTrait
, a trait to give partial information about storage. - Polling
- Post
Inherents - Provides a callback to execute logic after the all inherents.
- Post
Transactions - Provides a callback to execute logic before the all transactions.
- PreInherents
- Provides a callback to execute logic before the all inherents.
- Preimage
Provider - A interface for looking up preimages from their hash on chain.
- Preimage
Recipient - A interface for managing preimages to hashes on chain.
- Printable
- Trait for things which can be printed from the runtime.
- Privilege
Cmp - Something that can compare privileges of two origins.
- Process
Message - Can process messages from a specific origin.
- Proof
ToHashes - This trait is one strategy that can be used to benchmark a trie proof verification for the runtime. This strategy assumes that the majority complexity of verifying a merkle proof comes from computing hashes to recreate the merkle root. This trait converts the the proof, some bytes, to the number of hashes we expect to execute to verify that proof.
- Proving
Trie - An interface for creating, interacting with, and creating proofs in a merkle trie.
- Query
Preimage - A interface for looking up preimages from their hash on chain.
- Queue
Footprint Query - Provides information on queue footprint.
- Queue
Paused Query - Provides information on paused queues.
- Randomness
- A trait that is able to provide randomness.
- Ranked
Members - Ranked membership data structure.
- Ranked
Members Swap Handler - Handler that can deal with the swap of two members.
- Refund
Weight - A type that can handle weight refunds.
- Reservable
Currency - A currency where funds can be reserved from the user.
- Rewards
Reporter - Trait for reporting additional validator reward points
- Safe
Mode - Can put the runtime into a safe mode.
- Safe
Mode Notify - A trait to notify when the runtime enters or exits safe mode.
- Saturated
Conversion - Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
SaturatedFrom
andSaturatedInto
. - Saturating
- Saturating arithmetic operations, returning maximum or minimum values instead of overflowing.
- Scale
- Multiply and divide by a number that isn’t necessarily the same type. Basically just the same
as
Mul
andDiv
except it can be used for all basic numeric types. - Service
Queues - Can service queues and execute overweight messages.
- Signature
Payload - Something that acts like a
SignaturePayload
of anExtrinsic
. - Signed
Extension Deprecated - Means by which a transaction may be extended. This type embodies both the data and the logic that should be additionally associated with the transaction. It should be plain old data.
- Signed
Transaction Builder - Interface for types capable of constructing a signed transaction.
- Simple
BitOps - A meta trait for all bit ops.
- Sorted
Members - A trait for a set which can enumerate its members in order.
- Static
Lookup - Means of changing one type into another in a manner dependent on the source type.
This variant is different to
Lookup
in that it doesn’t (can cannot) require any context. - Storage
Info Trait - A trait to give information about storage.
- Storage
Instance - An instance of a storage in a pallet.
- Store
Preimage - A interface for managing preimages to hashes on chain.
- Stored
Map - An abstraction of a value stored within storage, but possibly as part of a larger composite item.
- Task
- A general-purpose trait which defines a type of service work (i.e., work to performed by an off-chain worker) including methods for enumerating, validating, indexing, and running tasks of this type.
- Time
- Transaction
Extension - Means by which a transaction may be extended. This type embodies both the data and the logic that should be additionally associated with the transaction. It should be plain old data.
- Transaction
Pause - Can pause specific transactions from being processed.
- TryCollect
- Try and collect into a collection
C
. - TryConvert
- Fallible conversion trait which returns the argument in the case of being unable to convert. Generic over both source and destination types.
- TryConvert
Back - Reversing fallible conversion trait which returns the argument in the case of being unable to convert back. Generic over both source and destination types.
- TryDecode
Entire Storage - Decode the entire data under the given storage type.
- TryDrop
- A type for which some values make sense to be able to drop without further consideration.
- TryMorph
- Extensible conversion trait. Generic over only source type, with destination type being associated.
- TryState
- Execute some checks to ensure the internal state of a pallet is consistent.
- Typed
Get - A trait for querying a single value from a type defined in the trait.
- Unchecked
OnRuntime Upgrade - This trait is intended for use within
VersionedMigration
to execute storage migrations without automatic version checks. Implementations should ensure migration logic is safe and idempotent. - Unfiltered
Dispatchable - Type that can be dispatched with an origin but without checking the origin filter.
- Unique
Saturated From - Just like
From
except that if the source value is too big to fit into the destination type then it’ll saturate the destination. - Unique
Saturated Into - Just like
Into
except that if the source value is too big to fit into the destination type then it’ll saturate the destination. - Unix
Time - Trait to deal with unix time.
- Validate
Unsigned - Provide validation for unsigned extrinsics.
- Validator
Registration - Implementors of this trait provide information about whether or not some validator has been registered with them. The Session module is an implementor.
- Validator
Set - A trait for online node inspection in a session.
- Validator
SetWith Identification ValidatorSet
combined with an identification.- Variant
Count - Trait to get the number of variants in any enum.
- Verify
- Means of signature verification.
- Verify
Existence Proof - Something that can verify the existence of some data in a given proof.
- Verify
Seal - A trait for verifying the seal of a header and returning the author.
- Vested
Transfer - A vested transfer over a currency. This allows a transferred amount to vest over time.
- Vesting
Schedule - A vesting schedule over a currency. This allows a particular currency to have vesting limits applied to it.
- Vote
Tally - Whitelisted
Storage Keys - Allows a pallet to specify storage keys to whitelist during benchmarking. This means those keys will be excluded from the benchmarking performance calculation.
- Zero
- Defines an additive identity element for
Self
.
Functions§
- checked_
pow - Raises a value to the power of exp, returning
None
if an overflow occurred. - ensure_
pow - Raises a value to the power of exp, returning
ArithmeticError
if an overflow occurred.
Type Aliases§
- Allow
All Deprecated - Bounded
Inline - DenyAll
Deprecated - Dispatch
Info Of - Shortcut to reference the
Info
type of aDispatchable
. - Dispatch
Origin Of - Shortcut to reference the
RuntimeOrigin
type of aDispatchable
. - Ensure
OneOf Deprecated - “OR gate” implementation of
EnsureOrigin
allowing for differentSuccess
types forL
andR
, with them combined using anEither
type. - Fetch
Result - Hashing
For - Extract the hashing type for a block.
- Lock
Identifier - An identifier for a lock. Used for disambiguating different locks so that they can be individually replaced or removed.
- Number
For - Extract the number type for a block.
- Post
Dispatch Info Of - Shortcut to reference the
PostInfo
type of aDispatchable
. - Validate
Result - Shortcut for the result value of the
validate
function.
Derive Macros§
- Debug
- Derive macro generating an impl of the trait
Debug
.