EVM::Call

Variant 344 v393

pallet_evm::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (6)

IndexNameFieldsDocs
0withdraw
address: H160
value: u64
Withdraw balance from EVM into currency/balances pallet.
1call
source: H160
target: H160
input: Vec<u8>
value: U256
gas_limit: u64
max_fee_per_gas: U256
max_priority_fee_per_gas: Option
nonce: Option
authorization_list: Vec<AuthorizationListItem>
Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
2create
source: H160
init: Vec<u8>
value: U256
gas_limit: u64
max_fee_per_gas: U256
max_priority_fee_per_gas: Option
nonce: Option
authorization_list: Vec<AuthorizationListItem>
Issue an EVM create operation. This is similar to a contract creation transaction in Ethereum.
3create2
source: H160
init: Vec<u8>
salt: H256
value: U256
gas_limit: u64
max_fee_per_gas: U256
max_priority_fee_per_gas: Option
nonce: Option
authorization_list: Vec<AuthorizationListItem>
Issue an EVM create2 operation.
4set_whitelist
5disable_whitelist
disabled: bool

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 6 possible variants.
Size
variable (1+ bytes)

Examples

withdraw = withdraw(address, value)
0x00<field0><field1>
00 Variant index 0 = withdraw
field 0 address: H160
field 1 value: u64
call = call(source, target, input, value, gas_limit, max_fee_per_gas, max_priority_fee_per_gas, nonce, access_list, authorization_list)
0x01<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9>
01 Variant index 1 = call
field 0 source: H160
field 1 target: H160
field 2 input: Vec<u8>
field 3 value: U256
field 4 gas_limit: u64
field 5 max_fee_per_gas: U256
field 6 max_priority_fee_per_gas: Option
field 7 nonce: Option
field 8 access_list: Vec<(H160, Vec<H256>)>
field 9 authorization_list: Vec<AuthorizationListItem>
create = create(source, init, value, gas_limit, max_fee_per_gas, max_priority_fee_per_gas, nonce, access_list, authorization_list)
0x02<field0><field1><field2><field3><field4><field5><field6><field7><field8>
02 Variant index 2 = create
field 0 source: H160
field 1 init: Vec<u8>
field 2 value: U256
field 3 gas_limit: u64
field 4 max_fee_per_gas: U256
field 5 max_priority_fee_per_gas: Option
field 6 nonce: Option
field 7 access_list: Vec<(H160, Vec<H256>)>
field 8 authorization_list: Vec<AuthorizationListItem>

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode EVM::Call — variant "withdraw"
const value = registry.createType("EVM::Call", { withdraw: { address: 0, value: 1_000_000_000n } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
344
Kind
Variant
Path
pallet_evm::pallet::Call
Runtime
v393