Trait pallet_evm::pallet::DefaultConfig
source · pub trait DefaultConfig: DefaultConfig {
Show 20 associated items
type FeeCalculator: FeeCalculator;
type GasWeightMapping: GasWeightMapping;
type WeightPerGas: Get<Weight>;
type CallOrigin;
type CreateOriginFilter;
type CreateInnerOriginFilter;
type WithdrawOrigin;
type AddressMapping;
type RuntimeEvent;
type PrecompilesType: PrecompileSet;
type PrecompilesValue: Get<Self::PrecompilesType>;
type ChainId: Get<u64>;
type BlockGasLimit: Get<U256>;
type OnChargeTransaction;
type OnCreate;
type FindAuthor: FindAuthor<H160>;
type GasLimitPovSizeRatio: Get<u64>;
type GasLimitStorageGrowthRatio: Get<u64>;
type WeightInfo: WeightInfo;
// Provided method
fn config() -> &'static EvmConfig { ... }
}
Expand description
Based on Config
. Auto-generated by
#[pallet::config(with_default)]
.
Can be used in tandem with
#[register_default_config]
and
#[derive_impl]
to derive test config traits
based on existing pallet config traits in a safe and developer-friendly way.
See here for more information and caveats about
the auto-generated DefaultConfig
trait and how it is generated.
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 CallOrigin
type CallOrigin
Allow the origin to call on behalf of given address.
sourcetype CreateOriginFilter
type CreateOriginFilter
Allow the source address to deploy contracts directly via CREATE calls.
sourcetype CreateInnerOriginFilter
type CreateInnerOriginFilter
Allow the source address to deploy contracts via CALL(CREATE) calls.
sourcetype WithdrawOrigin
type WithdrawOrigin
Allow the origin to withdraw on behalf of given address.
sourcetype AddressMapping
type AddressMapping
Mapping from address to account id.
sourcetype RuntimeEvent
type 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
type OnChargeTransaction
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 GasLimitStorageGrowthRatio: Get<u64>
type GasLimitStorageGrowthRatio: Get<u64>
Gas limit storage growth ratio.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.