-
Notifications
You must be signed in to change notification settings - Fork 119
Add basenames page to wagmi section #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
|
||
## Wagmi | ||
|
||
Before starting, make sure you have [set up Wagmi](/base-account/framework-integrations/wagmi/setup). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include required version here
|
||
[Learn more about useEnsName →](https://wagmi.sh/react/api/hooks/useEnsName) | ||
|
||
## Viem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include required version here too
import { useEnsName } from 'wagmi' | ||
import { base } from 'wagmi/chains' | ||
|
||
function App() { | ||
const result = useEnsName({ | ||
address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', | ||
chainId: base.id, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you run this to verify it works? I haven't tried the wagmi setup
import { base } from 'viem/chains' | ||
|
||
const client = createPublicClient({ | ||
chain: base, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This HAS to be mainnet. All ENS requests start on mainnet. Under the hood, this makes sense since we don't know if a User on Base is using a domain that lives on Optimism. So the ENS infrastructure routes resolutions requests from mainnet to the correct chain.
Review Error for stevieraykatz @ 2025-09-11 17:11:25 UTC |
Co-authored-by: katzman <[email protected]>
What changed? Why?
Basenames are ENSIP-19 compliant which makes the integration with wagmi/viem simple and straightforward. We added a guide to reflect this.