feat: add direct Base L2 support for Basenames (*.base.eth) - #20
vickcharles wants to merge 3 commits into
Conversation
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)
|
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 |
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.
Hi @eth-limo! Thanks for the review. |
|
Thanks again for this contribution! This PR predates the ENSv2 refactor (#52) and no longer compiles against |
* 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>
Summary
Changes
BasenamesServiceto query Base L2 resolver at0xC6d566A56A1aFf6508b41f6c90ff131615583BCDIConfigurationBaseinterface for Base RPC configurationNameServiceFactoryto route*.base.ethtoBasenamesServiceBASE_RPC_ENDPOINTenvironment variable (defaults tohttps://mainnet.base.org)Context
Coinbase's CCIP gateway at
api.coinbase.com/api/v1/domain/resolver/resolveDomaindoesn't return contenthash records for Basenames, preventing dwebsites from loading via eth.limo. This PR adds direct L2 resolution as a workaround.Test plan
vickler.base.eth- successfully resolves contenthash toipfs://bafybeifoze5lboyc7nxlqv2bfbd4irrxk3jj5qi7udsm2gklv3uq7qosde