A tutorial that teaches how to integrate Basenames to your wagmi/viem App
abis
and a file named L2ResolverAbi.ts within it.
Next, add the following placeholder code to the L2ResolverAbi.ts
file:
convertReverseNodeToBytes()
: This function is creating the reverse node so we can look up a name given an address. Each address gets its own reverse record in our registry that’s created in a deterministic way.
You can see the implementation of convertReverseNodeToBytes()
in the OnchainKit repo
BasenameTextRecordKeys
: Metadata (e.g., github, twitter, etc.) are stored as text records so we can look them up based on the enum key.page.tsx
file to display Basename information on the server and client side.
Here’s how to set it up: