From 4e672b2d7ecf33f766fa58f7329d2821b542b8a3 Mon Sep 17 00:00:00 2001 From: Ceban Mihail Date: Mon, 15 Jan 2024 12:20:46 +0200 Subject: [PATCH] refactor: new registry address --- package.json | 2 +- src/constants.ts | 6 +++--- test/resolver.spec.ts | 14 ++++++-------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 4ab3056..4150631 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bns-resolver", - "version": "2.1.0", + "version": "2.1.1", "description": "The Blockprime Name Resolver Library", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/src/constants.ts b/src/constants.ts index a47e26d..372e157 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,7 +1,7 @@ export const BNS_REGISTRY_ADDRESS = { - 1: '0xa58234a10B1b4556792F3fAB29F2D2fdD1e99Be6', - 5: '0xa58234a10B1b4556792F3fAB29F2D2fdD1e99Be6', - 11155111: '0xa58234a10B1b4556792F3fAB29F2D2fdD1e99Be6', + 1: '0x5e15Be567B44800c88A5775Da5689b6A31e74705', + 5: '0x5e15Be567B44800c88A5775Da5689b6A31e74705', + 11155111: '0x5e15Be567B44800c88A5775Da5689b6A31e74705', } as Record; export const REGISTRY_ABI = [ diff --git a/test/resolver.spec.ts b/test/resolver.spec.ts index 6491dae..c996ba7 100644 --- a/test/resolver.spec.ts +++ b/test/resolver.spec.ts @@ -26,14 +26,14 @@ describe('BnsResolver', () => { describe('resolveName', () => { it('resolveName: test1.sxt - success resolution', async () => { - const addr = await bnsResolver.resolveName('max.sxt'); + const addr = await bnsResolver.resolveName('ion.eps'); expect(addr).toEqual( - getAddress('0x772b207659fbf9b33f5bc698694931946948054e') + getAddress('0xb305c1f2200a17E0502416B1746aB88C9B5C449f') ); }); it('resolveName: test2.sxt - name expired', async () => { - const addr = await bnsResolver.resolveName('test2.sxt'); + const addr = await bnsResolver.resolveName('abc2.sxt'); expect(addr).toEqual(null); }); @@ -46,11 +46,11 @@ describe('BnsResolver', () => { }); describe('lookupAddress', () => { - it('lookupAddress: 0x084B5B4967b6EaB4EeDc628C12c7E63292cD5FC6 - success resolution', async () => { + it('lookupAddress: 0xb305c1f2200a17E0502416B1746aB88C9B5C449f - success resolution', async () => { const addr = await bnsResolver.lookupAddress( - '0x772b207659fbf9b33f5bc698694931946948054e' + '0xb305c1f2200a17E0502416B1746aB88C9B5C449f' ); - expect(addr).toEqual('max.sxt'); + expect(addr).toEqual('ion.eps'); }); it('lookupAddress: 0xf2EA5Fd6538EAb3B0466f1b1A447C742d8b30eFe - expired', async () => { @@ -60,6 +60,4 @@ describe('BnsResolver', () => { expect(addr).toEqual(null); }); }); - - //@todo Finish tests when contracts are ready });