Type Alias pallet_evm::pallet::Module
source · pub type Module<T> = Pallet<T>;
👎Deprecated: use
Pallet
insteadExpand description
Type alias to Pallet
, to be used by construct_runtime
.
Generated by pallet
attribute macro.
Aliased Type§
struct Module<T>(/* private fields */);
Implementations
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn withdraw(
origin: OriginFor<T>,
address: H160,
value: BalanceOf<T>
) -> DispatchResult
pub fn withdraw( origin: OriginFor<T>, address: H160, value: BalanceOf<T> ) -> DispatchResult
Withdraw balance from EVM into currency/balances pallet.
sourcepub fn call(
origin: OriginFor<T>,
source: H160,
target: H160,
input: Vec<u8>,
value: U256,
gas_limit: u64,
max_fee_per_gas: U256,
max_priority_fee_per_gas: Option<U256>,
nonce: Option<U256>,
access_list: Vec<(H160, Vec<H256>)>
) -> DispatchResultWithPostInfo
pub fn call( origin: OriginFor<T>, source: H160, target: H160, input: Vec<u8>, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, access_list: Vec<(H160, Vec<H256>)> ) -> DispatchResultWithPostInfo
Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
sourcepub fn create(
origin: OriginFor<T>,
source: H160,
init: Vec<u8>,
value: U256,
gas_limit: u64,
max_fee_per_gas: U256,
max_priority_fee_per_gas: Option<U256>,
nonce: Option<U256>,
access_list: Vec<(H160, Vec<H256>)>
) -> DispatchResultWithPostInfo
pub fn create( origin: OriginFor<T>, source: H160, init: Vec<u8>, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, access_list: Vec<(H160, Vec<H256>)> ) -> DispatchResultWithPostInfo
Issue an EVM create operation. This is similar to a contract creation transaction in Ethereum.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn is_account_empty(address: &H160) -> bool
pub fn is_account_empty(address: &H160) -> bool
Check whether an account is empty.
sourcepub fn is_account_suicided(address: &H160) -> bool
pub fn is_account_suicided(address: &H160) -> bool
Check whether an account is a suicided contract
pub fn iter_account_storages(address: &H160) -> KeyPrefixIterator<H256>
sourcepub fn remove_account_if_empty(address: &H160)
pub fn remove_account_if_empty(address: &H160)
Remove an account if its empty.
sourcepub fn remove_account(address: &H160)
pub fn remove_account(address: &H160)
Remove an account.
sourcepub fn create_account(address: H160, code: Vec<u8>)
pub fn create_account(address: H160, code: Vec<u8>)
Create an account.
sourcepub fn account_code_metadata(address: H160) -> CodeMetadata
pub fn account_code_metadata(address: H160) -> CodeMetadata
Get the account metadata (hash and size) from storage if it exists, or compute it from code and store it if it doesn’t exist.
sourcepub fn account_basic(address: &H160) -> (Account, Weight)
pub fn account_basic(address: &H160) -> (Account, Weight)
Get the account basic in EVM format.
Get the author using the FindAuthor trait.
Trait Implementations
impl<T> Eq for Pallet<T>
source§impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Something that should happen before runtime migrations are executed.
source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type InCodeStorageVersion = NoStorageVersionSet
type InCodeStorageVersion = NoStorageVersionSet
source§fn in_code_storage_version() -> Self::InCodeStorageVersion
fn in_code_storage_version() -> Self::InCodeStorageVersion
Returns the in-code storage version as specified in the
storage_version
attribute, or
[NoStorageVersionSet
] if the attribute is missing.source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
Returns the storage version of the pallet as last set in the actual on-chain storage.
§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
👎Deprecated: This method has been renamed to
in_code_storage_version
and will be removed after March 2024.DEPRECATED: Use [
Self::current_storage_version
] instead. Read moresource§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
This function is being called after every block import (when fully synced). Read more
source§impl<T> PartialEq for Pallet<T>
impl<T> PartialEq for Pallet<T>
source§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
source§fn module_name() -> &'static str
fn module_name() -> &'static str
Name of the Rust module containing the pallet.
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Version of the crate containing the pallet.
source§impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
See [
Hooks::on_initialize
].source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
See [
Hooks::on_finalize
].source§impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
source§fn on_genesis()
fn on_genesis()
Something that should happen at genesis.
source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
See [
Hooks::on_runtime_upgrade
].source§impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
Block initialization hook. This is called at the very beginning of block execution. Read more
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
Block finalization hook. This is called at the very end of block execution. Read more
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hook to consume a block’s idle time. This will run when the block is being finalized (before
[
Hooks::on_finalize
]). Read more§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
A hook to run logic after inherent application. Read more
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hook executed when a code change (aka. a “runtime upgrade”) is detected by the FRAME
Executive
pallet. Read more§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
Implementing this function on a pallet allows you to perform long-running tasks that are
dispatched as separate threads, and entirely independent of the main blockchain execution. Read more
§fn integrity_test()
fn integrity_test()
Check the integrity of this pallet’s configuration. Read more
source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Returns a
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.