Trait pallet_evm::pallet::Config
source · pub trait Config: Config {
Show 22 associated items
type FeeCalculator: FeeCalculator;
type GasWeightMapping: GasWeightMapping;
type WeightPerGas: Get<Weight>;
type BlockHashMapping: BlockHashMapping;
type CallOrigin: EnsureAddressOrigin<Self::RuntimeOrigin>;
type WithdrawOrigin: EnsureAddressOrigin<Self::RuntimeOrigin, Success = Self::AccountId>;
type AddressMapping: AddressMapping<Self::AccountId>;
type Currency: Currency<Self::AccountId> + Inspect<Self::AccountId>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type PrecompilesType: PrecompileSet;
type PrecompilesValue: Get<Self::PrecompilesType>;
type ChainId: Get<u64>;
type BlockGasLimit: Get<U256>;
type Runner: Runner<Self>;
type OnChargeTransaction: OnChargeEVMTransaction<Self>;
type OnCreate: OnCreate<Self>;
type FindAuthor: FindAuthor<H160>;
type GasLimitPovSizeRatio: Get<u64>;
type SuicideQuickClearLimit: Get<u32>;
type Timestamp: Time;
type WeightInfo: WeightInfo;
// Provided method
fn config() -> &'static EvmConfig { ... }
}
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 FeeCalculator: FeeCalculator
type FeeCalculator: FeeCalculator
Calculator for current gas price.
sourcetype GasWeightMapping: GasWeightMapping
type GasWeightMapping: GasWeightMapping
Maps Ethereum gas to Substrate weight.
sourcetype WeightPerGas: Get<Weight>
type WeightPerGas: Get<Weight>
Weight corresponding to a gas unit.
sourcetype BlockHashMapping: BlockHashMapping
type BlockHashMapping: BlockHashMapping
Block number to block hash.
sourcetype CallOrigin: EnsureAddressOrigin<Self::RuntimeOrigin>
type CallOrigin: EnsureAddressOrigin<Self::RuntimeOrigin>
Allow the origin to call on behalf of given address.
sourcetype WithdrawOrigin: EnsureAddressOrigin<Self::RuntimeOrigin, Success = Self::AccountId>
type WithdrawOrigin: EnsureAddressOrigin<Self::RuntimeOrigin, Success = Self::AccountId>
Allow the origin to withdraw on behalf of given address.
sourcetype AddressMapping: AddressMapping<Self::AccountId>
type AddressMapping: AddressMapping<Self::AccountId>
Mapping from address to account id.
sourcetype Currency: Currency<Self::AccountId> + Inspect<Self::AccountId>
type Currency: Currency<Self::AccountId> + Inspect<Self::AccountId>
Currency type for withdraw and balance storage.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype PrecompilesType: PrecompileSet
type PrecompilesType: PrecompileSet
Precompiles associated with this EVM engine.
type PrecompilesValue: Get<Self::PrecompilesType>
sourcetype BlockGasLimit: Get<U256>
type BlockGasLimit: Get<U256>
The block gas limit. Can be a simple constant, or an adjustment algorithm in another pallet.
sourcetype OnChargeTransaction: OnChargeEVMTransaction<Self>
type OnChargeTransaction: OnChargeEVMTransaction<Self>
To handle fee deduction for EVM transactions. An example is this pallet being used by pallet_ethereum
where the chain implementing pallet_ethereum
should be able to configure what happens to the fees
Similar to OnChargeTransaction
of pallet_transaction_payment
sourcetype FindAuthor: FindAuthor<H160>
type FindAuthor: FindAuthor<H160>
Find author for the current block.
sourcetype GasLimitPovSizeRatio: Get<u64>
type GasLimitPovSizeRatio: Get<u64>
Gas limit Pov size ratio.
sourcetype SuicideQuickClearLimit: Get<u32>
type SuicideQuickClearLimit: Get<u32>
Define the quick clear limit of storage clearing when a contract suicides. Set to 0 to disable it.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.