Skip to content

duongja/ENSCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ensctl

ensctl is a TypeScript CLI for inspecting and debugging ENS names with an operator-first workflow.

Commands

npm run dev -- resolve vitalik.eth
npm run dev -- inspect vitalik.eth
npm run dev -- doctor vitalik.eth
npm run dev -- ccip trace test.offchaindemo.eth

Useful flags:

--chain mainnet|sepolia
--rpc-url https://...
--json

For heavier commands like inspect, doctor, and ccip trace, using a dedicated RPC is recommended so you do not inherit rate limits from shared public endpoints.

Examples:

npm run dev -- resolve vitalik.eth --record addr
npm run dev -- resolve raffy.eth --record text --key url
npm run dev -- inspect nick.eth --json
npm run dev -- doctor foo.bar.eth
npm run dev -- ccip trace test.offchaindemo.eth --record addr --json

Declarative config

Use an ens.yaml file to describe the resolver and records you want to manage:

version: 1
chain: mainnet

names:
  - name: example.eth
    resolver: 0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63
    records:
      addr: 0x000000000000000000000000000000000000dEaD
      avatar: https://example.com/avatar.png
      contenthash: null
      text:
        url: https://example.com
        email: hello@example.com
        notice: null

Then plan and apply it:

npm run dev -- plan -f ens.example.yaml --rpc-url https://ethereum-rpc.publicnode.com
npm run dev -- diff -f ens.example.yaml --rpc-url https://ethereum-rpc.publicnode.com
ENSCTL_PRIVATE_KEY=0x... npm run dev -- apply -f ens.example.yaml --rpc-url https://ethereum-rpc.publicnode.com --yes

Current scope:

  • set registry resolver for unwrapped names
  • set ETH addr record
  • set avatar text record
  • set arbitrary text records
  • set contenthash

Current limitations:

  • wrapped-name resolver changes are not implemented yet
  • new node creation is not implemented yet
  • apply uses ENSCTL_PRIVATE_KEY for signing

Development

npm install
npm run typecheck
npm run test
npm run build

ENSCLI

About

CLI Tool for ENS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors