Trait pallet_evm::AccountProvider
pub trait AccountProvider {
type AccountId;
type Nonce: AtLeast32Bit;
// Required methods
fn create_account(who: &Self::AccountId);
fn remove_account(who: &Self::AccountId);
fn account_nonce(who: &Self::AccountId) -> Self::Nonce;
fn inc_account_nonce(who: &Self::AccountId);
}
Expand description
The account provider interface abstraction layer.
Expose account related logic that pallet_evm
required to control accounts existence
in the network and their transactions uniqueness. By default, the pallet operates native
system accounts records that frame_system
provides.
The interface allow any custom account provider logic to be used instead of
just using frame_system
account provider. The accounts records should store nonce value
for each account at least.
Required Associated Types§
type AccountId
type AccountId
The account identifier type.
Represent the account itself in accounts records.
type Nonce: AtLeast32Bit
type Nonce: AtLeast32Bit
Account nonce type.
The number that helps to ensure that each transaction in the network is unique for particular account.
Required Methods§
fn create_account(who: &Self::AccountId)
fn create_account(who: &Self::AccountId)
Creates a new account in accounts records.
The account associated with new created address EVM.
fn remove_account(who: &Self::AccountId)
fn remove_account(who: &Self::AccountId)
Removes an account from accounts records.
The account associated with removed address from EVM.
fn account_nonce(who: &Self::AccountId) -> Self::Nonce
fn account_nonce(who: &Self::AccountId) -> Self::Nonce
Return current account nonce value.
Used to represent account basic information in EVM format.
fn inc_account_nonce(who: &Self::AccountId)
fn inc_account_nonce(who: &Self::AccountId)
Increment a particular account’s nonce value.
Incremented with each new transaction submitted by the account.