Skip to content

docs: document originOf, resolveAddress and the alias RPCs - #459

Draft
pecornilleau wants to merge 1 commit into
mainfrom
docs/origin-of-resolve-address
Draft

docs: document originOf, resolveAddress and the alias RPCs#459
pecornilleau wants to merge 1 commit into
mainfrom
docs/origin-of-resolve-address

Conversation

@pecornilleau

Copy link
Copy Markdown
Collaborator

Summary

The cross-runtime address-translation primitives were undocumented. This PR adds:

  • NAC usage (EVM to Michelson): an Address translation section with the Solidity interface for originOf / resolveAddress, the classification codes (Unknown / Native / Alias) and resolution codes (Recorded / Derived), when the kernel records an account's origin, short examples, and a failure-behavior entry.
  • NAC usage (Michelson to EVM): the same section for the gateway views, with the exact Michelson parameter and return types, result tables, and a VIEW "resolveAddress" snippet in the style of the existing staticcall_evm one.
  • Michelson RPC reference: an Alias RPCs section for tez_getTezosEthereumAddress / tez_getEthereumTezosAddress, noting they are served on the main JSON-RPC endpoint rather than under /tezlink.
  • Accounts and Aliases: a short Translating addresses paragraph cross-linking the three sections above.

All statements were checked against the kernel and node code (runtime_gateway.rs, enshrined_contracts.rs, the two runtime read_origin implementations, rpc_encodings.ml / services.ml). No gas figures were added, since the pages list none for the other gateway functions.

Test plan

  • npm run build passes (only pre-existing theme warnings)
  • npm run mocha passes
  • Maintainer read-through before requesting review

🤖 Generated with Claude Code

Add an Address translation section to both NAC usage pages describing
the originOf and resolveAddress gateway functions (Solidity interface
and Michelson view types, classification and resolution codes, when
origins are recorded, failure behavior). Document the
tez_getTezosEthereumAddress / tez_getEthereumTezosAddress JSON-RPC
methods on the Michelson RPC reference and cross-link everything from
Accounts and Aliases.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-etherlink Ready Ready Preview Sep 8, 2026 9:12am UTC

Request Review

@NicNomadic NicNomadic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first comment on the main page, I'm still reviewing the other pages


Michelson's `SOURCE` instruction returns the null address (`tz1Ke2h7sDdakHJQh8WX4Z372du1KChsksyU`) for operations originating from cross-interface calls — not the actual alias address. This is because Michelson requires the source to be a user account.

## Translating addresses

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be part of the same section as the 2 above subsections:

Suggested change
## Translating addresses
### Translating addresses


## Alias RPCs

EVM nodes<!--TXN--> also expose two Etherlink<!--TX-->-specific JSON-RPC methods that compute the alias of an address (see [Accounts and Aliases](/overview/accounts-and-aliases#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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All RPCs served by the node are Tezos X-specific, no need to mention that (and indeed, these don't seem to be EVM-specific):

Suggested change
EVM nodes<!--TXN--> also expose two Etherlink<!--TX-->-specific JSON-RPC methods that compute the alias of an address (see [Accounts and Aliases](/overview/accounts-and-aliases#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.
EVM nodes<!--TXN--> also expose two JSON-RPC methods that compute the alias of an address (see [Accounts and Aliases](/overview/accounts-and-aliases#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.

@NicNomadic

Copy link
Copy Markdown
Collaborator

LGTM modulo the open threads above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants