Skip to content

Releases: ensdomains/go-ens

Release list

v4.0.0

Choose a tag to compare

@yashgo0018 yashgo0018 released this 17 Aug 04:17
e7685c0

First release of the ENS-maintained Go library. Package-level reads go through the Universal Resolver, so ENSIP-10 wildcards and ERC-3668 CCIP-Read work. Write and management APIs are unchanged.

This is a breaking major version relative to v3.6.0. Upgrade guide: MIGRATION.md.

Install:

go get github.com/ensdomains/go-ens/v4

Added

  • Universal Resolver client (NewUniversalResolver) bound to the canonical proxy 0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe on Ethereum mainnet and Sepolia
  • Functional options: WithAddress, WithHTTPClient, WithMaxHops
  • UniversalResolver read helpers: Resolve, ResolveAddress, Reverse, Text, Contenthash, MultiAddress
  • ccipread package: ERC-3668 client that follows OffchainLookup reverts, with a 4-hop cap aligned with viem/ethers
  • Typed Universal Resolver errors (ResolverNotFoundError, HTTPGatewayError, ReverseAddressMismatchError, …) plus sentinels ErrUnregistered and ErrNoAddress
  • UnknownChainError when the default constructor is used on a chain without a known UR deployment
  • DNSEncode for the DNS wire format the Universal Resolver expects (ENSIP-10)
  • ENSIP-15 normalisation via github.com/adraffy/go-ens-normalize
  • CoinTypeETH (60) constant

Changed

  • Module path: github.com/wealdtech/go-ens/v3github.com/ensdomains/go-ens/v4
  • context.Context is required on Resolve, ReverseResolve, Format, PublicResolverAddress, Name.Address, and DeriveTokenID
  • Those reads resolve through the Universal Resolver instead of walking the registry
  • Names are normalised with ENSIP-15 (stricter than v3 IDNA; some namehashes differ)
  • Reverse resolution requires a primary name that forward-resolves back to the queried address
  • Minimum Go version is 1.25.0
  • github.com/ethereum/go-ethereum is 1.17.5

Security

  • CCIP-Read gateway URLs are restricted to http/https; redirects are not followed; response bodies are capped at 16 MiB
  • Bump golang.org/x/crypto to 0.55.0, golang.org/x/net to 0.58.0, and github.com/consensys/gnark-crypto to 0.18.1

Full notes: CHANGELOG.md