A comprehensive test suite for ENS name resolution across multiple programming languages and libraries. The goal is to provide a stable, reproducible set of test cases that library maintainers and integrators can use to validate their ENS implementations.
- Project structure defined
- Git repo initialized
- Bun workspace monorepo setup
- Root package.json with scripts
- test-cases.json with all cases
- Shared types and helpers (
shared/) - Reference implementation (viem-v2)
- Results aggregation script
- Test cases configured with real expected values
- Foundry project setup for resolver contracts (
contracts/)
- Gateway setup for CCIP-Read tests
-
forward-base-offchain- CCIP-Read resolver for offchain Base address -
reverse-eth-offchain- CCIP-Read reverse resolution -
reverse-l2-base- L2 reverse resolution via L1 -
forward-wildcard- Wildcard resolver onintegration-tests.eth -
forward-dns- DNS name with DNSSEC
- viem-v1
- ethers-v5
- ethers-v6
- ensjs-v3
- web3js-v4
- web3py
- ens-py
- alloy
- ethers-rs
- go-ens
- web3swift
| ID | Category | Status | Input | Expected |
|---|---|---|---|---|
forward-eth-onchain |
Forward | Ready | integration-tests.eth |
0xeE9eeaAB0Bb7D9B969D701f6f8212609EDeA252E |
forward-base-onchain |
Forward | Ready | integration-tests.eth |
0xeE9eeaAB0Bb7D9B969D701f6f8212609EDeA252E |
forward-base-offchain |
Forward | Pending | greg.offchaindemo.eth |
0x8764f2939aE6d4EcB5baD2cdB7e2B81aA153bd1 |
forward-text-avatar |
Forward | Ready | gregskril.eth |
NFT avatar |
forward-text-description |
Forward | Ready | gtest.eth |
Hybrid resolver description |
forward-contenthash |
Forward | Ready | gregskril.eth |
ipfs://bafybei... |
reverse-eth-onchain |
Reverse | Ready | 0xeE9eeaAB0Bb7D9B969D701f6f8212609EDeA252E |
devrel.enslabs.eth |
reverse-eth-offchain |
Reverse | Pending | 0x779981590E7Ccc0CFAe8040Ce7151324747cDb97 |
burner.offchaindemo.eth |
reverse-l2-base |
Reverse | Pending | 0x179A862703a4adfb29896552DF9e307980D19285 |
greg.base.eth |
forward-wildcard |
Forward | Pending | *.integration-tests.eth |
TBD |
forward-dns |
Forward | Pending | TBD | TBD |
resolution-tests/
├── README.md
├── plan.md # This file
├── CLAUDE.md
├── .env.example
├── .gitignore
├── package.json # Workspace root
├── tsconfig.json # Root TS config
├── tsconfig.base.json # Shared TS config for packages
├── foundry.toml # Foundry configuration
├── test-cases.json # Single source of truth
├── shared/ # Shared TS types and helpers
│ ├── types.ts
│ └── index.ts
├── contracts/ # ENS resolver contracts (Foundry)
│ ├── src/ # Resolver implementations
│ ├── test/ # Solidity tests
│ ├── script/ # Deployment scripts
│ └── lib/ # Dependencies (forge-std)
├── gateway/ # Static CCIP-Read responses
│ └── README.md
├── scripts/
│ ├── run-tests.ts # Auto-discovers and runs packages
│ └── aggregate-results.ts
├── results/
│ └── .gitkeep
└── packages/
├── viem-v2/ # Reference implementation
└── ...
test-cases.jsondefines all test cases (single source of truth)shared/provides types and helpers for TypeScript packages- Each library package reads test cases and runs tests
- Each package outputs
results.jsonin standardized format scripts/run-tests.tsgenerates feature support table toresults/latest.md
RPC_URL- Ethereum mainnet RPC endpoint (required)
For offchain test cases, we use static JSON files hosted on GitHub's raw CDN.
The resolver contract should use a gateway URL like:
https://raw.githubusercontent.com/{org}/{repo}/main/gateway/{sender}/{data}.json
Each response file contains:
{"data": "0x...abi-encoded-response..."}- Deploy or configure CCIP-Read resolver for offchain test names
- Set gateway URL to point to this repo's
gateway/folder - Pre-compute calldata for each offchain test case
- Create corresponding JSON files with ABI-encoded responses
# Install dependencies (workspace)
bun install
# Run all tests (generates results/latest.md)
bun run test
# Run specific language
bun run test:typescript
bun run test:python
bun run test:rustThe contracts/ directory contains Foundry-based ENS resolver contracts. These are applied to the names in test-cases.json to test various resolution scenarios.
forge build # Compile contracts
forge test # Run Solidity tests
forge script <script> # Run deployment scripts- Create folder:
packages/{library-version}/ - Add
package.jsonwith dependencies - Add
tsconfig.jsonextending../../tsconfig.base.json - Import from
../../../sharedfor types and helpers - Output results to
results.json - Run
bun installfrom root
- Create folder:
packages/{library-version}/ - Add appropriate manifest (Cargo.toml, pyproject.toml, go.mod)
- Read test cases from
../../test-cases.json - Output results to
results.jsonin standardized format - The test runner auto-discovers packages by their manifest file