diff --git a/packages/ensjs/src/contracts/consts.ts b/packages/ensjs/src/contracts/consts.ts index 5d416a6b..586e8839 100644 --- a/packages/ensjs/src/contracts/consts.ts +++ b/packages/ensjs/src/contracts/consts.ts @@ -59,7 +59,7 @@ export const addresses = { address: '0x21745FF62108968fBf5aB1E07961CC0FCBeB2364', }, ensUniversalResolver: { - address: '0x9380F1974D2B7064eA0c0EC251968D8c69f0Ae31', + address: '0x20814C8e689187DfF7C93A9239ea22385d13b9F1', }, }, goerli: { diff --git a/packages/ensjs/src/functions/public/getRecords.test.ts b/packages/ensjs/src/functions/public/getRecords.test.ts index 9df260a9..3183419c 100644 --- a/packages/ensjs/src/functions/public/getRecords.test.ts +++ b/packages/ensjs/src/functions/public/getRecords.test.ts @@ -1,9 +1,17 @@ +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { addEnsContracts } from '../../index.js' import { deploymentAddresses, publicClient, } from '../../test/addTestContracts.js' import getRecords from './getRecords.js' +const mainnetPublicClient = createPublicClient({ + chain: addEnsContracts(mainnet), + transport: http('https://web3.ens.domains/v1/mainnet'), +}) + describe('getRecords()', () => { it('works', async () => { const result = await getRecords(publicClient, { @@ -68,4 +76,26 @@ describe('getRecords()', () => { } `) }) + it('works with oldest resolver - jessesum.eth', async () => { + const result = await getRecords(mainnetPublicClient, { + name: 'jessesum.eth', + records: { + texts: ['description', 'url'], + coins: ['60', 'etcLegacy', '0'], + }, + }) + expect(result).toMatchInlineSnapshot(` + { + "coins": [ + { + "id": 60, + "name": "eth", + "value": "0x8c4Eb6988A199DAbcae0Ce31052b3f3aC591787e", + }, + ], + "resolverAddress": "0x1da022710dF5002339274AaDEe8D58218e9D6AB5", + "texts": [], + } + `) + }) })