Skip to content

feat: add direct Base L2 support for Basenames (*.base.eth) - #20

Closed
vickcharles wants to merge 3 commits into
ethlimo:mainfrom
vickcharles:feature/basenames-support
Closed

vickcharles wants to merge 3 commits into
ethlimo:mainfrom
vickcharles:feature/basenames-support

Conversation

@vickcharles

Copy link
Copy Markdown
Contributor

Summary

  • Adds native support for resolving contenthash records from Basenames (*.base.eth)
  • Queries Base L2 resolver directly, bypassing Coinbase CCIP gateway which doesn't return contenthash

Changes

  • Add BasenamesService to query Base L2 resolver at 0xC6d566A56A1aFf6508b41f6c90ff131615583BCD
  • Add IConfigurationBase interface for Base RPC configuration
  • Update NameServiceFactory to route *.base.eth to BasenamesService
  • Add BASE_RPC_ENDPOINT environment variable (defaults to https://mainnet.base.org)

Context

Coinbase's CCIP gateway at api.coinbase.com/api/v1/domain/resolver/resolveDomain doesn't return contenthash records for Basenames, preventing dwebsites from loading via eth.limo. This PR adds direct L2 resolution as a workaround.

Test plan

  • Tested locally with vickler.base.eth - successfully resolves contenthash to ipfs://bafybeifoze5lboyc7nxlqv2bfbd4irrxk3jj5qi7udsm2gklv3uq7qosde
  • Build passes

This adds native support for resolving contenthash records from
Basenames (*.base.eth) by querying the Base L2 resolver directly,
bypassing the Coinbase CCIP gateway which doesn't return contenthash.

Changes:
- Add BasenamesService to query Base L2 resolver at 0xC6d566A56A1aFf6508b41f6c90ff131615583BCD
- Add IConfigurationBase interface for Base RPC configuration
- Update NameServiceFactory to route *.base.eth to BasenamesService
- Add BASE_RPC_ENDPOINT environment variable (defaults to https://mainnet.base.org)
@vickcharles
vickcharles requested a review from eth-limo as a code owner January 8, 2026 13:19
@eth-limo

eth-limo commented Jan 13, 2026 •

Copy link
Copy Markdown
Member

Hi @vickcharles thank you for your submission. Our team will review this.

Were any LLM tools used for this commit?

Would you also please add the necessary test cases and specify the new environment variables in README.md?

@eth-limo eth-limo self-assigned this Jan 13, 2026
@eth-limo eth-limo added the enhancement New feature or request label Jan 13, 2026
vickcharles and others added 2 commits February 9, 2026 16:59
Add test cases for example.base.eth and norecord.base.eth, wire up
testBasenamesService in the integration test harness, and document
the BASE_RPC_ENDPOINT environment variable in README.
@vickcharles

Copy link
Copy Markdown
Contributor Author

Hi @vickcharles thank you for your submission. Our team will review this.

Were any LLM tools used for this commit?

Would you also please add the necessary test cases and specify the new environment variables in README.md?

Hi @eth-limo! Thanks for the review.

@Dwiib

Dwiib commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Thanks again for this contribution! This PR predates the ENSv2 refactor (#52) and no longer compiles against main, so we've rewritten it on top of current main in #63, preserving your authorship on the commit. The rewrite also looks up each name's resolver through the Basenames registry (instead of hardcoding the default L2Resolver), adds a BASE_L2_BYPASS_ENABLED flag, and lets RPC errors propagate rather than being cached as empty results. Superseded by #63.

@Dwiib Dwiib closed this Jul 16, 2026
eth-limo pushed a commit that referenced this pull request Aug 13, 2026
* feat: add direct Base L2 support for Basenames (*.base.eth)

Resolve contenthash records for Basenames by querying the Basenames
registry on Base L2 directly, bypassing the Coinbase CCIP gateway which
does not serve contenthash records.

- Add BasenamesService: looks up the name's resolver through the
  Basenames registry (rather than hardcoding the default L2Resolver)
  and reads contenthash from it; RPC errors propagate to the resolver
  failure path instead of being treated as an empty record
- Route *.base.eth in NameServiceFactory, gated behind
  BASE_L2_BYPASS_ENABLED (default true); when disabled, names fall
  back to standard L1 ENS resolution
- Add IConfigurationBase and BASE_RPC_ENDPOINT (default
  https://mainnet.base.org)
- Add integration test coverage and README documentation

Rewritten on top of current main from #20 (pre-ENSv2 interface).

Co-authored-by: Richard Dwi <richarddwi@pm.me>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* test: add live integration test script with Basenames scaffold

Ported from dweb-api's bin/integrationTests.sh (this fork never carried
it): resolves real names against a locally running server on mainnet.
The Basenames section is empty for now: no known *.base.eth name has a
contenthash on its registry-assigned resolver (existing records live on
the superseded default L2Resolver and are deliberately not honored).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Vickler Charles <charlesvikler@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants