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§
sourcetype RuntimeEvent: From<Event<Self>> + TryInto<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
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.
sourcetype Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>
type Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>
The generator used to supply randomness to programs through seal_random
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype OutgoingLimit: Get<u32>
type OutgoingLimit: Get<u32>
The maximum amount of messages that can be produced in during all message executions.
sourcetype OutgoingBytesLimit: Get<u32>
type OutgoingBytesLimit: Get<u32>
The maximum amount of bytes in outgoing messages during message execution.
sourcetype PerformanceMultiplier: Get<Percent>
type PerformanceMultiplier: Get<Percent>
Performance multiplier.
type DebugInfo: DebugInfo
sourcetype CodeStorage: CodeStorage
type CodeStorage: CodeStorage
Implementation of a storage for program binary codes.
sourcetype ProgramStorage: ProgramStorage<BlockNumber = BlockNumberFor<Self>, Error = DispatchError, AccountId = Self::AccountId>
type ProgramStorage: ProgramStorage<BlockNumber = BlockNumberFor<Self>, Error = DispatchError, AccountId = Self::AccountId>
Implementation of a storage for programs.
sourcetype MailboxThreshold: Get<u64>
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.
sourcetype ReservationsLimit: Get<u64>
type ReservationsLimit: Get<u64>
Amount of reservations can exist for 1 program.
sourcetype 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 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.
sourcetype 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 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
sourcetype BlockLimiter: BlockLimiter<Balance = GasBalanceOf<Self>>
type BlockLimiter: BlockLimiter<Balance = GasBalanceOf<Self>>
Block limits.
sourcetype Scheduler: Scheduler<BlockNumber = BlockNumberFor<Self>, Cost = u64, Task = VaraScheduledTask<Self::AccountId>>
type Scheduler: Scheduler<BlockNumber = BlockNumberFor<Self>, Cost = u64, Task = VaraScheduledTask<Self::AccountId>>
Scheduler.
sourcetype QueueRunner: QueueRunner<Gas = GasBalanceOf<Self>>
type QueueRunner: QueueRunner<Gas = GasBalanceOf<Self>>
Message Queue processing routing provider.
sourcetype ProgramRentFreePeriod: Get<BlockNumberFor<Self>>
type ProgramRentFreePeriod: Get<BlockNumberFor<Self>>
The free of charge period of rent.
sourcetype ProgramResumeMinimalRentPeriod: Get<BlockNumberFor<Self>>
type ProgramResumeMinimalRentPeriod: Get<BlockNumberFor<Self>>
The minimal amount of blocks to resume.
sourcetype ProgramRentCostPerBlock: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type ProgramRentCostPerBlock: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The program rent cost per block.
sourcetype ProgramResumeSessionDuration: Get<BlockNumberFor<Self>>
type ProgramResumeSessionDuration: Get<BlockNumberFor<Self>>
The amount of blocks for processing resume session.
sourcetype ProgramRentEnabled: Get<bool>
type ProgramRentEnabled: Get<bool>
The flag determines if program rent mechanism enabled.
sourcetype ProgramRentDisabledDelta: Get<BlockNumberFor<Self>>
type ProgramRentDisabledDelta: Get<BlockNumberFor<Self>>
The constant defines value that is added if the program rent is disabled.
sourcetype BuiltinDispatcherFactory: BuiltinDispatcherFactory
type BuiltinDispatcherFactory: BuiltinDispatcherFactory
The builtin dispatcher factory.
sourcetype RentPoolId: Get<Option<<Self as Config>::AccountId>>
type RentPoolId: Get<Option<<Self as Config>::AccountId>>
The account id of the rent pool if any.