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§

source

type FeeCalculator: FeeCalculator

Calculator for current gas price.

source

type GasWeightMapping: GasWeightMapping

Maps Ethereum gas to Substrate weight.

source

type WeightPerGas: Get<Weight>

Weight corresponding to a gas unit.

source

type BlockHashMapping: BlockHashMapping

Block number to block hash.

source

type CallOrigin: EnsureAddressOrigin<Self::RuntimeOrigin>

Allow the origin to call on behalf of given address.

source

type WithdrawOrigin: EnsureAddressOrigin<Self::RuntimeOrigin, Success = Self::AccountId>

Allow the origin to withdraw on behalf of given address.

source

type AddressMapping: AddressMapping<Self::AccountId>

Mapping from address to account id.

source

type Currency: Currency<Self::AccountId> + Inspect<Self::AccountId>

Currency type for withdraw and balance storage.

source

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

The overarching event type.

source

type PrecompilesType: PrecompileSet

Precompiles associated with this EVM engine.

source

type PrecompilesValue: Get<Self::PrecompilesType>

source

type ChainId: Get<u64>

Chain ID of EVM.

source

type BlockGasLimit: Get<U256>

The block gas limit. Can be a simple constant, or an adjustment algorithm in another pallet.

source

type Runner: Runner<Self>

EVM execution runner.

source

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

source

type OnCreate: OnCreate<Self>

Called on create calls, used to record owner

source

type FindAuthor: FindAuthor<H160>

Find author for the current block.

source

type GasLimitPovSizeRatio: Get<u64>

Gas limit Pov size ratio.

source

type SuicideQuickClearLimit: Get<u32>

Define the quick clear limit of storage clearing when a contract suicides. Set to 0 to disable it.

source

type Timestamp: Time

Get the timestamp for the current block.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Provided Methods§

source

fn config() -> &'static EvmConfig

EVM config used in the module.

Object Safety§

This trait is not object safe.

Implementors§