Skip to content
LogoLogo

tevm get-ens-address

tevm get-ens-address runs this operation: Resolve an ENS name to an address. Reach for it when you need the operation from a terminal, CI job, or shell script.

Working example

The commands below were run with @tevm/cli@1.0.0-rc.151. They create their own local prerequisites or use the named public endpoint, so no hidden process is required.

npm install --global @tevm/cli@1.0.0-rc.151
tevm get-ens-address --name vitalik.eth --universal-resolver-address 0xeeeeeeee14d718c2b47d9923deab1335e144eeee --rpc https://ethereum-rpc.publicnode.com --run --json

Output captured from the final command:

{
  "ok": true,
  "command": "get-ens-address",
  "result": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

Arguments and flags

The command schema in packages/tevm-cli/src/commands/getEnsAddress.tsx exposes:

KindSyntaxDescription
Flag--name [name]ENS name to resolve (env: TEVM_NAME)
Flag--block-tag [block-tag]Block tag (latest, pending, etc.) (env: TEVM_BLOCK_TAG)
Flag--block-number [block-number]Block number to query at (env: TEVM_BLOCK_NUMBER)
Flag--universal-resolver-address [universal-resolver-address]Address of ENS Universal Resolver (env: TEVM_UNIVERSAL_RESOLVER_ADDRESS)
Flag-r, --runRun directly without interactive parameter editing (env: TEVM_RUN) (default: false)
Flag--rpc [rpc]RPC endpoint (env: TEVM_RPC)
Flag--jsonEmit the stable machine-readable JSON envelope (env: TEVM_JSON) (default: false)
Flag-h, --helpShow help

--json and --session <name> are global options accepted before routing. See the CLI overview for their environment-variable forms and execution model.

Neighbours

CLI overview · tevm get-chain-id · tevm get-ens-name