call
Call v210 → v323, v326 → current #1Issues an EVM call operation like an Ethereum message call .
View calls on chainCall Workflow
This diagram shows the call execution flow: starting with call, passing through validation
(signature, nonce, mortality, fee payment), then pre-dispatch checks, followed by dispatch which emits events: Log, Executed, ExecutedFailed and modifies storage: AccountStorages, and finally post-dispatch where ExtrinsicSuccess is emitted and fees are settled.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Click items to navigate. Pan and zoom to explore.
Used by: developers
The Big Picture
Core EVM interaction - equivalent to eth_call/eth_sendTransaction.
Use Cases
- Call contract functions
- Interact with DeFi
- Transfer ERC-20 tokens
From Chain Metadata
Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
Migration Notes
v323 v326 Breaking
added field authorization_list (Vec<AuthorizationListItem>)
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | source | H160 | source: 20-byte address (Ethereum-style) |
| 1 | target | H160 | target: 20-byte address (Ethereum-style) |
| 2 | input | Vec<u8> Vec | input (Vec<u8>) |
| 3 | value | U256 | value: 256-bit unsigned integer (Ethereum-style) |
| 4 | gas_limit | u64 | gas_limit (u64) |
| 5 | max_fee_per_gas | U256 | max_fee_per_gas: 256-bit unsigned integer (Ethereum-style) |
| 6 | max_priority_fee_per_gas | Option Option<U256> | max_priority_fee_per_gas: optional 256-bit unsigned integer (Ethereum-style) |
| 7 | nonce | Option Option<U256> | nonce: optional 256-bit unsigned integer (Ethereum-style) |
| 8 | access_list | Vec<(H160, Vec<H256>)> Vec | access_list (Vec<(H160, Vec<H256>)>) |
| 9 | authorization_list | Vec<AuthorizationListItem> Vec AuthorizationList | authorization_list (Vec<AuthorizationListItem>) |
Permissions
Origin
Unknown
Required Role
Permission data inferred from metadata. May be incomplete.
Requirements
- Target contract exists
- Sufficient gas
- Balance for value + gas
Effects
Events Emitted
Storage Modified
Postconditions
- Contract executed
- State changes applied if successful
Side Effects
- May emit EVM.Executed/ExecutedFailed
- May emit EVM.Log events
Code Examples
// ----------------------------------------------------------------------
// HEADS UP: 2 args below have a complex type with no usable default.
// Look for `undefined as any` and replace them with real values
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Build call call (typed, named args)
const source = "0x0000000000000000000000000000000000000000";
const target = "0x0000000000000000000000000000000000000000";
const input = Binary.fromOpaque(new Uint8Array(0));
const value = undefined as any /* U256 — replace with real value */;
const gas_limit = 0n;
const max_fee_per_gas = undefined as any /* U256 — replace with real value */;
const max_priority_fee_per_gas = undefined;
const nonce = undefined;
const access_list = [] as [];
const authorization_list = [] as [];
const tx = api.tx.EVM.call({
source,
target,
input,
value,
gas_limit,
max_fee_per_gas,
max_priority_fee_per_gas,
nonce,
access_list,
authorization_list,
});Version History
v210 block 4,345,556 9 args
v326 block 6,608,228 10 args Current
Runtime Info
- Pallet Index
- 22
- Call Index
- 1
- First Version
- v210
- Current Version
- v411