Skip to content

Commit

Permalink
Resolver ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 28, 2023
1 parent e15c5f8 commit 10a0244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/ens/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Contract, utils, constants } from 'ethers'

// ENS Registry ABI (simplified version)
const ensRegistryAbi = ['function resolver(bytes32 node) external view returns (address)']
const resolverAbi = ['function addr(bytes32 node) external view returns (address)']

export const customResolveName = async (
registryAddress: string,
Expand All @@ -17,7 +18,7 @@ export const customResolveName = async (
return undefined
}

const resolver = new Contract(resolverAddress, ensRegistryAbi, rpcProvider)
const resolver = new Contract(resolverAddress, resolverAbi, rpcProvider)
const address = await resolver.addr(namehash)

return address || undefined
Expand Down

0 comments on commit 10a0244

Please sign in to comment.