pub trait Config: Config {
    type TimestampProvider: Time;
    type InvokeTransactionFilter: TransactionFilter<InvokeTransaction>;
    type DeclareTransactionFilter: TransactionFilter<DeclareTransaction>;
    type DeployAccountTransactionFilter: TransactionFilter<DeployAccountTransaction>;
    type UnsignedPriority: Get<TransactionPriority>;
    type TransactionLongevity: Get<TransactionLongevity>;
    type DisableTransactionFee: Get<bool>;
    type DisableNonceValidation: Get<bool>;
    type ProtocolVersion: Get<u8>;
    type ProgramHash: Get<Felt252Wrapper>;
    type ExecutionConstants: Get<Arc<VersionedConstants>>;
}
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. Configure the pallet by specifying the parameters and types on which it depends. We’re coupling the starknet pallet to the tx payment pallet to be able to override the fee mechanism and comply with starknet which uses an ER20 as fee token

Required Associated Types§

source

type TimestampProvider: Time

The block time

source

type InvokeTransactionFilter: TransactionFilter<InvokeTransaction>

Custom transaction filter for Invoke txs

source

type DeclareTransactionFilter: TransactionFilter<DeclareTransaction>

Custom transaction filter for Declare txs

source

type DeployAccountTransactionFilter: TransactionFilter<DeployAccountTransaction>

Custom transaction filter for DeployAccount txs

source

type UnsignedPriority: Get<TransactionPriority>

A configuration for base priority of unsigned transactions.

This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions.

source

type TransactionLongevity: Get<TransactionLongevity>

A configuration for longevity of transactions.

This is exposed so that it can be tuned for particular runtime to set how long transactions are kept in the mempool.

source

type DisableTransactionFee: Get<bool>

A bool to disable transaction fees and make all transactions free

source

type DisableNonceValidation: Get<bool>

A bool to disable Nonce validation

source

type ProtocolVersion: Get<u8>

source

type ProgramHash: Get<Felt252Wrapper>

source

type ExecutionConstants: Get<Arc<VersionedConstants>>

Implementors§