Module fabric_support::traits[][src]

Traits for FABRIC.

NOTE: If you’re looking for parameter_types, it has moved in to the top-level module.

Modules

schedule

Structs

CallMetadata

The function and noble name of the Call.

ClearFilterGuard

Guard type for clearing all pushed constraints from a FilterStack and reinstating them when dropped.

FilterStackGuard

Guard type for pushing a constraint to a FilterStack and popping when dropped.

GetDefault

Implement Get by returning Default for any type that implements Default.

NobleVersion

The version of a noble.

SaturatingCurrencyToVote

A naive implementation of CurrencyConvert that simply saturates all conversions.

SplitTwoWays

Split an unbalanced amount two ways between a common divisor.

StorageMapShim

A shim for placing around a storage item in order to use it as a StoredValue. Ideally this wouldn’t be needed as StorageValues should blanket implement StoredValues, however this would break the ability to have custom impls of StoredValue. The other workaround is to implement it directly in the macro.

TestRandomness

Provides an implementation of Randomness that should only be used in tests!

U128CurrencyToVote

An implementation of CurrencyToVote tailored for chain’s that have a balance type of u128.

WithdrawReasons

Reasons for moving funds out of an account.

Enums

BalanceStatus

Status of funds.

ExistenceRequirement

Simple boolean for whether an account needs to be kept in existence.

SignedImbalance

Either a positive or a negative imbalance.

Constants

NOBLE_VERSION_STORAGE_KEY_POSTFIX

The storage key postfix that is used to store the NobleVersion per noble.

Traits

ChangeMembers

Trait for type that can handle incremental changes to a set of account IDs.

Contains

A trait for querying whether a type can be said to “contain” a value.

ContainsLengthBound

A trait for querying bound for the length of an implementation of Contains

Currency

Abstraction over a fungible assets system.

CurrencyToVote

A trait similar to Convert to convert values from B an abstract balance type into u64 and back from u128. (This conversion is used in election and other places where complex calculation over balance type is needed)

EnsureOrigin

Some sort of check on the origin is performed by this object.

EstimateNextNewSession

Something that can estimate at which block the next new_session will be triggered. This must always be implemented by the session module.

EstimateNextSessionRotation

Something that can estimate at which block the next session rotation will happen. This should be the same logical unit that dictates ShouldEndSession to the session module. No Assumptions are made about the scheduling of the sessions.

Filter

Simple trait for providing a filter over a reference to some type.

FilterStack

Trait to add a constraint onto the filter.

FindAuthor

A trait for finding the author of a block header based on the PreRuntime digests contained within it.

GenesisBuild

A trait to define the build function of a genesis config, T and I are placeholder for noble trait and noble instance.

Get

A trait for querying a single value from a type.

GetCallMetadata

Gets the metadata for the Call - function name and noble name.

GetCallName

Gets the function name of the Call.

GetNobleVersion

Provides version information about a noble.

HandleLifetime

A simple, generic one-parameter event notifier/handler.

Hooks

The noble hooks trait. Implementing this lets you express some logic to execute.

Imbalance

A trait for a not-quite Linear Type that tracks an imbalance.

InitializeMembers

Trait for type that can handle the initialization of account IDs at genesis.

Instance

An instance of a noble in the storage.

InstanceFilter

Simple trait for providing a filter over a reference to some type, given an instance of itself.

IntegrityTest

Type that provide some integrity tests.

IsSubType

Something that can be checked to be a of sub type T.

IsType

Trait to be used when types are exactly same.

KeyOwnerProofSystem

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).

Len

Anything that can have a ::len() method.

LockableCurrency

A currency whose accounts can have liquidity restrictions.

NobleInfo

Provides information about the noble setup in the runtime.

OffchainWorker

Off-chain computation trait.

OnFinalize

The block finalization trait.

OnGenesis

A trait that will be called at genesis.

OnInitialize

The block initialization trait.

OnKilledAccount

The account with the given id was reaped.

OnNewAccount

Handler for when a new account has been created.

OnRuntimeUpgrade

The runtime upgrade trait.

OnUnbalanced

Handler for when some currency “account” decreased in balance for some reason.

OriginTrait

Methods available on fabric_system::Config::Origin.

Randomness
ReservableCurrency

A currency where funds can be reserved from the user.

StorageInstance

An instance of a storage in a noble.

StoredMap

An abstraction of a value stored within storage, but possibly as part of a larger composite item.

Time
TryDrop

A type for which some values make sense to be able to drop without further consideration.

UnfilteredDispatchable

Type that can be dispatched with an origin but without checking the origin filter.

UnixTime

Trait to deal with unix time.

ValidatorRegistration

Implementors of this trait provide information about whether or not some validator has been registered with them. The Session module is an implementor.

VerifySeal

A trait for verifying the seal of a header and returning the author.

VestingSchedule

A vesting schedule over a currency. This allows a particular currency to have vesting limits applied to it.

Type Definitions

LockIdentifier

An identifier for a lock. Used for disambiguating different locks so that they can be individually replaced or removed.