Trait pallet_gear::pallet::Config

source ·
pub trait Config:
    Config
    + Config
    + Config
    + Config {
Show 25 associated items type RuntimeEvent: From<Event<Self>> + TryInto<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>; type WeightInfo: WeightInfo; type Schedule: Get<Schedule<Self>>; type OutgoingLimit: Get<u32>; type OutgoingBytesLimit: Get<u32>; type PerformanceMultiplier: Get<Percent>; type DebugInfo: DebugInfo; type CodeStorage: CodeStorage; type ProgramStorage: ProgramStorage<BlockNumber = BlockNumberFor<Self>, Error = DispatchError, AccountId = Self::AccountId>; type MailboxThreshold: Get<u64>; type ReservationsLimit: Get<u64>; type Messenger: Messenger<BlockNumber = BlockNumberFor<Self>, Capacity = u32, OutputError = DispatchError, MailboxFirstKey = Self::AccountId, MailboxSecondKey = MessageId, MailboxedMessage = UserStoredMessage, QueuedDispatch = StoredDispatch, DelayedDispatch = StoredDelayedDispatch, WaitlistFirstKey = ProgramId, WaitlistSecondKey = MessageId, WaitlistedMessage = StoredDispatch, DispatchStashKey = MessageId>; type GasProvider: GasProvider<ExternalOrigin = Self::AccountId, NodeId = GasNodeId<MessageId, ReservationId>, Balance = u64, Funds = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, Error = DispatchError>; type BlockLimiter: BlockLimiter<Balance = GasBalanceOf<Self>>; type Scheduler: Scheduler<BlockNumber = BlockNumberFor<Self>, Cost = u64, Task = VaraScheduledTask<Self::AccountId>>; type QueueRunner: QueueRunner<Gas = GasBalanceOf<Self>>; type ProgramRentFreePeriod: Get<BlockNumberFor<Self>>; type ProgramResumeMinimalRentPeriod: Get<BlockNumberFor<Self>>; type ProgramRentCostPerBlock: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>; type ProgramResumeSessionDuration: Get<BlockNumberFor<Self>>; type ProgramRentEnabled: Get<bool>; type ProgramRentDisabledDelta: Get<BlockNumberFor<Self>>; type BuiltinDispatcherFactory: BuiltinDispatcherFactory; type RentPoolId: Get<Option<<Self as Config>::AccountId>>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self>> + TryInto<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

Because this pallet emits events, it depends on the runtime’s definition of an event.

source

type Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>

The generator used to supply randomness to programs through seal_random

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type Schedule: Get<Schedule<Self>>

Cost schedule and limits.

source

type OutgoingLimit: Get<u32>

The maximum amount of messages that can be produced in during all message executions.

source

type OutgoingBytesLimit: Get<u32>

The maximum amount of bytes in outgoing messages during message execution.

source

type PerformanceMultiplier: Get<Percent>

Performance multiplier.

source

type DebugInfo: DebugInfo

source

type CodeStorage: CodeStorage

Implementation of a storage for program binary codes.

source

type ProgramStorage: ProgramStorage<BlockNumber = BlockNumberFor<Self>, Error = DispatchError, AccountId = Self::AccountId>

Implementation of a storage for programs.

source

type MailboxThreshold: Get<u64>

The minimal gas amount for message to be inserted in mailbox.

This gas will be consuming as rent for storing and message will be available for reply or claim, once gas ends, message removes.

Messages with gas limit less than that minimum will not be added in mailbox, but will be seen in events.

source

type ReservationsLimit: Get<u64>

Amount of reservations can exist for 1 program.

source

type Messenger: Messenger<BlockNumber = BlockNumberFor<Self>, Capacity = u32, OutputError = DispatchError, MailboxFirstKey = Self::AccountId, MailboxSecondKey = MessageId, MailboxedMessage = UserStoredMessage, QueuedDispatch = StoredDispatch, DelayedDispatch = StoredDelayedDispatch, WaitlistFirstKey = ProgramId, WaitlistSecondKey = MessageId, WaitlistedMessage = StoredDispatch, DispatchStashKey = MessageId>

Messenger.

source

type GasProvider: GasProvider<ExternalOrigin = Self::AccountId, NodeId = GasNodeId<MessageId, ReservationId>, Balance = u64, Funds = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, Error = DispatchError>

Implementation of a ledger to account for gas creation and consumption

source

type BlockLimiter: BlockLimiter<Balance = GasBalanceOf<Self>>

Block limits.

source

type Scheduler: Scheduler<BlockNumber = BlockNumberFor<Self>, Cost = u64, Task = VaraScheduledTask<Self::AccountId>>

Scheduler.

source

type QueueRunner: QueueRunner<Gas = GasBalanceOf<Self>>

Message Queue processing routing provider.

source

type ProgramRentFreePeriod: Get<BlockNumberFor<Self>>

The free of charge period of rent.

source

type ProgramResumeMinimalRentPeriod: Get<BlockNumberFor<Self>>

The minimal amount of blocks to resume.

source

type ProgramRentCostPerBlock: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

The program rent cost per block.

source

type ProgramResumeSessionDuration: Get<BlockNumberFor<Self>>

The amount of blocks for processing resume session.

source

type ProgramRentEnabled: Get<bool>

The flag determines if program rent mechanism enabled.

source

type ProgramRentDisabledDelta: Get<BlockNumberFor<Self>>

The constant defines value that is added if the program rent is disabled.

source

type BuiltinDispatcherFactory: BuiltinDispatcherFactory

The builtin dispatcher factory.

source

type RentPoolId: Get<Option<<Self as Config>::AccountId>>

The account id of the rent pool if any.

Object Safety§

This trait is not object safe.

Implementors§