Type Alias pallet_evm::pallet::Module

source ·
pub type Module<T> = Pallet<T>;
👎Deprecated: use Pallet instead
Expand 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>

source

pub fn withdraw( origin: OriginFor<T>, address: H160, value: BalanceOf<T> ) -> DispatchResult

Withdraw balance from EVM into currency/balances pallet.

source

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.

source

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

pub fn create2( origin: OriginFor<T>, source: H160, init: Vec<u8>, salt: H256, 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 create2 operation.

source§

impl<T: Config> Pallet<T>

source

pub fn is_account_empty(address: &H160) -> bool

Check whether an account is empty.

source

pub fn is_account_suicided(address: &H160) -> bool

Check whether an account is a suicided contract

source

pub fn iter_account_storages(address: &H160) -> KeyPrefixIterator<H256>

source

pub fn remove_account_if_empty(address: &H160)

Remove an account if its empty.

source

pub fn remove_account(address: &H160)

Remove an account.

source

pub fn create_account(address: H160, code: Vec<u8>)

Create an account.

source

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.

source

pub fn account_basic(address: &H160) -> (Account, Weight)

Get the account basic in EVM format.

source

pub fn find_author() -> H160

Get the author using the FindAuthor trait.

Trait Implementations

source§

impl<T> Eq for Pallet<T>

source§

impl<T> Clone for Pallet<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn on_idle(n: BlockNumberFor<T>, remaining_weight: Weight) -> Weight

See [Hooks::on_idle].
source§

impl<T: Config> Callable<T> for Pallet<T>

source§

impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>

source§

fn before_all_runtime_migrations() -> Weight

Something that should happen before runtime migrations are executed.
source§

impl<T: Config> GetStorageVersion for Pallet<T>

§

type InCodeStorageVersion = NoStorageVersionSet

This type is generated by the pallet macro. Read more
source§

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

Returns the storage version of the pallet as last set in the actual on-chain storage.
§

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 more
source§

impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn offchain_worker(n: BlockNumberFor<T>)

This function is being called after every block import (when fully synced). Read more
source§

impl<T> Debug for Pallet<T>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> PartialEq for Pallet<T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Config> PalletInfoAccess for Pallet<T>

source§

fn index() -> usize

Index of the pallet as configured in the runtime.
source§

fn name() -> &'static str

Name of the pallet as configured in the runtime.
source§

fn name_hash() -> [u8; 16]

Two128 hash of name.
source§

fn module_name() -> &'static str

Name of the Rust module containing the pallet.
source§

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>

source§

fn on_initialize(n: BlockNumberFor<T>) -> Weight

See [Hooks::on_initialize].
source§

impl<T: Config> StorageInfoTrait for Pallet<T>

source§

fn storage_info() -> Vec<StorageInfo>

source§

impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn on_finalize(n: BlockNumberFor<T>)

See [Hooks::on_finalize].
source§

impl<T: Config> PalletsInfoAccess for Pallet<T>

source§

fn count() -> usize

The number of pallets’ information that this type represents. Read more
source§

fn infos() -> Vec<PalletInfoData>

All of the pallets’ information that this type represents.
source§

impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

source§

fn on_poll(n: BlockNumberFor<T>, weight: &mut WeightMeter)

Code to execute every now and then at the beginning of the block after inherent application. Read more
source§

impl<T: Config> OnGenesis for Pallet<T>

source§

fn on_genesis()

Something that should happen at genesis.
source§

impl<T: Config> OnRuntimeUpgrade for Pallet<T>

source§

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>

§

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)

Block finalization hook. This is called at the very end of block execution. Read more
§

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)

A hook to run logic after inherent application. Read more
§

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)

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()

Check the integrity of this pallet’s configuration. Read more
source§

impl<T: Config> WhitelistedStorageKeys for Pallet<T>

source§

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.
source§

impl<T: Config> IntegrityTest for Pallet<T>

source§

fn integrity_test()

See [Hooks::integrity_test].