ENS
ENS gives gardens and gardeners names under greengoods.eth. A garden asks
for its name when it's minted (best-effort: without the module or a slug the step is skipped, and a
failed registration is caught with its fee queued for refund), and a gardener can claim one for
their profile. Instead of an address,
each carries a human-readable identity that resolves across the ecosystem. The module wires the
registry, the cross-chain receiver, and the resolution paths that make those names work.
How it flows
Names are registered on Arbitrum and settled on Ethereum, where greengoods.eth lives. A
delivered message is not a registered name:
- The receiver skips a name that is invalid, already taken, or whose owner already has one, and
emits
NameRegistrationSkipped. - When the ENS registry, resolver, or NameWrapper call reverts, the receiver emits
ENSRegistrationFailed, and still records the name and emitsNameRegistered.
So name.greengoods.eth can stay unresolved after a successful CCIP message. Resolve the name, or
look for those two events, before treating it as live.
Where it lives in the code
| Layer | Source |
|---|---|
| Registry (Arbitrum sender) | packages/contracts/src/registries/ENS.sol |
| Receiver (Ethereum) | packages/contracts/src/registries/ENSReceiver.sol, which validates the CCIP message, records the name, and sets the ENS records in a try/catch |
| Mint-time request | packages/contracts/src/tokens/Garden.sol, which skips the step without a module or slug, catches a failed registration, and queues the fee for refund |
| Resolution hooks | packages/shared/src/hooks/ens |
| Recorded components | The greenGoodsENS and ensReceiver fields in the deployment record |
Checked-in deployment projection
| Network | Status | Recorded components |
|---|---|---|
Sepolia Testnet (11155111) | Deployed | ensReceiver, greenGoodsENS |
Arbitrum One (42161) | Deployed | ensReceiver (on Ethereum Mainnet), greenGoodsENS |
Networks without recorded components are omitted; per-network state lives in the deployment status projection.
A deployment artifact does not by itself prove product activation, live indexing, or partner-service health. This projection regenerates from checked-in artifacts via node scripts/docs/generate.mjs.
Working with it locally
The fork mode (bun run dev -- fork) runs a local fork of
Arbitrum One, so recorded name state resolves locally; registering new names against mainnet ENS
needs the real chain.
Canonical upstream docs
- ENS documentation for names, resolvers, and cross-chain resolution.
- ens.domains for the app.
- Offchain and L2 resolvers for CCIP Read, which the Green Goods resolver relies on to answer from its own registry.
- ens-contracts for the core protocol contracts.
Next steps
- Tokenbound Accounts covers the garden accounts a name stands for.
- Architecture shows where names fit next to the other modules.
- Deployments & Addresses lists the recorded ENS contracts per chain.