Skip to main content

RPC reference

EVM nodes provide the same RPCs as Tezos L1 nodes on their Michelson endpoint. The Michelson endpoint is served at the /tezlink sub-path of the node's base RPC URL (a legacy path name that may be renamed to /michelson in a future version). For example, a node running on the default port exposes the Michelson interface at http://localhost:8545/tezlink. For public endpoint URLs, see Michelson network information.

Refer to the RPC reference in the Octez documentation (also available as a set of OpenAPI descriptions).

Some Tezos RPCs have no handler on Etherlink and will return an error; others are registered but behave differently due to the different context (no delegation, no baking, no voting).

Not applicable​

The following L1 RPCs do not make sense in Etherlink so they don't have a handler in Etherlink and will always return an error if called:

  • Delegation — GET /context/contracts/<addr>/delegate and related staking/frozen-balance RPCs.
  • Baking and endorsing rights — GET /helpers/baking_rights, GET /helpers/endorsing_rights.
  • Voting and governance — all /context/votes/* RPCs.
  • Mempool operations — GET /chains/<chain>/mempool/pending_operations and related.
  • Block and protocol injection — POST /injection/block, POST /injection/protocol.

Not implemented​

The following L1 RPCs have no handler for the moment in Etherlink and return an error when called:

  • Tickets — GET /context/contracts/<addr>/ticket_balance, all_ticket_balances.
  • Script execution — POST /helpers/scripts/run_code, POST /helpers/scripts/trace_code, POST /helpers/scripts/run_script_view.

Differences from L1​

The following L1 RPCs exhibit different behavior in Etherlink, either temporarily (because not fully implemented) or permanently (because the context is different):

RPCDifference
GET /context/contracts/<addr>/counterReturns 0 for unallocated implicit accounts; Etherlink has no global counter. (#7960)
POST /helpers/scripts/simulate_operationPartial implementation; full simulation is not yet supported. (#7965)
POST /injection/operationThe async=true parameter is not yet honored; the node always waits for validation before returning. (#8007)
GET /versionReturns a stub value with an empty commit hash and date.
GET /context/issuance/expected_issuanceReturns dummy zero rewards; Etherlink has no token issuance.
POST /helpers/scripts/pack_dataUses a throwaway dummy context instead of the live chain state; results may differ for gas-sensitive encodings.
GET /context/constantsSeveral constants differ from mainnet: minimal_block_delay = 1 s (the protocol encoding cannot express sub-second periods; actual block cadence follows Etherlink blocks, down to 500 ms under load); hard_gas_limit_per_operation = 660,000 gas (the 30M EVM per-transaction gas cap converted at 22 milligas per EVM gas unit); cost_per_byte = 1 mutez.

Alias RPCs​

EVM nodes also expose two JSON-RPC methods that compute the alias of an address (see Accounts and Aliases). They are served on the node's JSON-RPC endpoint (the base URL, alongside the eth_* methods), not under /tezlink. The alias is derived from the address alone, so these methods work for any address, whether or not it has been used on chain.

MethodParameterResult
tez_getTezosEthereumAddressA Michelson address (tz1…, tz2…, tz3…, or KT1…)Its EVM alias (0x…)
tez_getEthereumTezosAddressAn EVM address (0x…)Its Michelson alias (KT1…)

For example:

curl --request POST \
--url http://localhost:8545 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "tez_getEthereumTezosAddress",
"params": ["0x1234567890abcdef1234567890abcdef12345678"]
}
'
{
"jsonrpc": "2.0",
"result": "KT1CYcsqu3TnW3aA2hYL62ZCtcA484yCG4Zq",
"id": 1
}
arrow icon

Prev

Smart contracts

Next

arrow icon
Dapps