Skip to main content

Evm

Calls

call

Issue an EVM call operation. This is similar to a message call transaction in Ethereum.

Namespace

api.tx.evm.call

Type

function call(
source: H160,
target: H160,
input: Bytes,
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>)>
)

create

Issue an EVM create operation. This is similar to a contract creation transaction in Ethereum.

Namespace

api.tx.evm.create

Type

function create(
source: H160,
init: Bytes,
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>)>
)

create2

Issue an EVM create2 operation.

Namespace

api.tx.evm.create2

Type

function create2(
source: H160,
init: Bytes,
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>)>
)

withdraw

Withdraw balance from EVM into currency/balances pallet.

Namespace

api.tx.evm.withdraw

Type

function withdraw(
address: H160,
value: u128
)

Storage

accountCodes

Namespace

api.query.evm.accountCodes

Type

function accountCodes(
H160
): Bytes

accountStorages

Namespace

api.query.evm.accountStorages

Type

function accountStorages(
H160,
H256
): H256

Events

Created

A contract has been created at given address.

Namespace

api.events.evm.Created

Type

type Created = {
address: H160
}

CreatedFailed

A contract was attempted to be created, but the execution failed.

Namespace

api.events.evm.CreatedFailed

Type

type CreatedFailed = {
address: H160
}

Executed

A contract has been executed successfully with states applied.

Namespace

api.events.evm.Executed

Type

type Executed = {
address: H160
}

ExecutedFailed

A contract has been executed with errors. States are reverted with only gas fees applied.

Namespace

api.events.evm.ExecutedFailed

Type

type ExecutedFailed = {
address: H160
}

Log

Ethereum events from contracts.

Namespace

api.events.evm.Log

Type

type Log = {
log: EthereumLog
}

Errors

BalanceLow

Not enough balance to perform action

Namespace

api.errors.evm.BalanceLow

FeeOverflow

Calculating total fee overflowed

Namespace

api.errors.evm.FeeOverflow

GasLimitTooHigh

Gas limit is too high.

Namespace

api.errors.evm.GasLimitTooHigh

GasLimitTooLow

Gas limit is too low.

Namespace

api.errors.evm.GasLimitTooLow

GasPriceTooLow

Gas price is too low.

Namespace

api.errors.evm.GasPriceTooLow

InvalidNonce

Nonce is invalid

Namespace

api.errors.evm.InvalidNonce

PaymentOverflow

Calculating total payment overflowed

Namespace

api.errors.evm.PaymentOverflow

Reentrancy

EVM reentrancy

Namespace

api.errors.evm.Reentrancy

Undefined

Undefined error.

Namespace

api.errors.evm.Undefined

WithdrawFailed

Withdraw fee failed

Namespace

api.errors.evm.WithdrawFailed

undefined