Trait pallet_starknet::pallet::Config
source · 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§
sourcetype TimestampProvider: Time
type TimestampProvider: Time
The block time
sourcetype InvokeTransactionFilter: TransactionFilter<InvokeTransaction>
type InvokeTransactionFilter: TransactionFilter<InvokeTransaction>
Custom transaction filter for Invoke txs
sourcetype DeclareTransactionFilter: TransactionFilter<DeclareTransaction>
type DeclareTransactionFilter: TransactionFilter<DeclareTransaction>
Custom transaction filter for Declare txs
sourcetype DeployAccountTransactionFilter: TransactionFilter<DeployAccountTransaction>
type DeployAccountTransactionFilter: TransactionFilter<DeployAccountTransaction>
Custom transaction filter for DeployAccount txs
sourcetype UnsignedPriority: Get<TransactionPriority>
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.
sourcetype TransactionLongevity: Get<TransactionLongevity>
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.
sourcetype DisableTransactionFee: Get<bool>
type DisableTransactionFee: Get<bool>
A bool to disable transaction fees and make all transactions free
sourcetype DisableNonceValidation: Get<bool>
type DisableNonceValidation: Get<bool>
A bool to disable Nonce validation