diff --git a/wormchain/contracts/tools/__tests__/test_ntt_accountant.ts b/wormchain/contracts/tools/__tests__/test_ntt_accountant.ts index e10d611e34..07705c377f 100644 --- a/wormchain/contracts/tools/__tests__/test_ntt_accountant.ts +++ b/wormchain/contracts/tools/__tests__/test_ntt_accountant.ts @@ -51,7 +51,7 @@ if (process.env.INIT_SIGNERS_KEYS_CSV === "undefined") { * f. Ensure an transceiver registration to another transceiver with a known hub is saved * g. Ensure a duplicate registration is rejected * 3. Transfer VAAs - * a. Ensure a token can be sent from its hub endpoint + * a. Ensure a token can be sent from its hub transceiver * b. Ensure a token decimal shift works as expected * c. Ensure a token can be sent back to its hub transceiver * d. Ensure a token can be sent between non-hub transceivers @@ -526,7 +526,7 @@ describe("NTT Global Accountant Tests", () => { }); }); describe("3. Transfer VAAs", () => { - test("a. Ensure a token can be sent from its hub endpoint", async () => { + test("a. Ensure a token can be sent from its hub transceiver", async () => { const vaa = makeVAA( HUB_CHAIN, HUB_TRANSCEIVER, @@ -768,14 +768,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( HUB_CHAIN, ETH_WALLET_EMITTER, - "c83e3d2e000000000000000000000000bb807f76cda53b1b4256e1b6f33bb46be36508e3000000000000000000000000002a68f967bfa230780a385175d0c86ae4048d309612" + "9c23bd3b000000000000000000000000bb807f76cda53b1b4256e1b6f33bb46be36508e3000000000000000000000000002a68f967bfa230780a385175d0c86ae4048d309612" ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_hubs: {}, + all_transceiver_hubs: {}, } ); const hub = response.hubs.find( @@ -791,14 +791,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( SPOKE_CHAIN_A, BSC_WALLET_EMITTER, - `d0d292f1${chainToHex(HUB_CHAIN)}${ETH_WALLET_EMITTER}` + `18fc67c2${chainToHex(HUB_CHAIN)}${ETH_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -814,14 +814,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( SPOKE_CHAIN_B, ETH_WALLET_EMITTER, - `d0d292f1${chainToHex(HUB_CHAIN)}${ETH_WALLET_EMITTER}` + `18fc67c2${chainToHex(HUB_CHAIN)}${ETH_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -840,14 +840,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( HUB_CHAIN, ETH_WALLET_EMITTER, - `d0d292f1${chainToHex(SPOKE_CHAIN_A)}${BSC_WALLET_EMITTER}` + `18fc67c2${chainToHex(SPOKE_CHAIN_A)}${BSC_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -863,14 +863,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( HUB_CHAIN, ETH_WALLET_EMITTER, - `d0d292f1${chainToHex(SPOKE_CHAIN_B)}${ETH_WALLET_EMITTER}` + `18fc67c2${chainToHex(SPOKE_CHAIN_B)}${ETH_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -889,14 +889,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( SPOKE_CHAIN_A, BSC_WALLET_EMITTER, - `d0d292f1${chainToHex(SPOKE_CHAIN_B)}${ETH_WALLET_EMITTER}` + `18fc67c2${chainToHex(SPOKE_CHAIN_B)}${ETH_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -912,14 +912,14 @@ describe("NTT Global Accountant Tests", () => { const vaa = makeVAA( SPOKE_CHAIN_B, ETH_WALLET_EMITTER, - `d0d292f1${chainToHex(SPOKE_CHAIN_A)}${BSC_WALLET_EMITTER}` + `18fc67c2${chainToHex(SPOKE_CHAIN_A)}${BSC_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); const response = await cosmWasmClient.queryContractSmart( NTT_GA_ADDRESS, { - all_endpoint_peers: {}, + all_transceiver_peers: {}, } ); const peer = response.peers.find( @@ -933,7 +933,7 @@ describe("NTT Global Accountant Tests", () => { } } }); - test("a. Ensure a token can be sent from its hub endpoint", async () => { + test("a. Ensure a token can be sent from its hub transceiver", async () => { const beforeMetrics = await fetchGlobalAccountantMetrics(); const beforeEthBalance = await fetchGlobalAccountantBalance( HUB_CHAIN, @@ -968,7 +968,8 @@ describe("NTT Global Accountant Tests", () => { sequence, { transport: NodeHttpTransport(), - } + }, + 30000 ); await sleep(500); // avoid socket hang up const afterMetrics = await fetchGlobalAccountantMetrics(); @@ -1085,7 +1086,7 @@ describe("NTT Global Accountant Tests", () => { ).rejects.toThrow(); } }); - test("c. Ensure a token can be sent back to its hub endpoint", async () => { + test("c. Ensure a token can be sent back to its hub transceiver", async () => { const beforeMetrics = await fetchGlobalAccountantMetrics(); const beforeEthBalance = await fetchGlobalAccountantBalance( HUB_CHAIN, @@ -1120,7 +1121,8 @@ describe("NTT Global Accountant Tests", () => { sequence, { transport: NodeHttpTransport(), - } + }, + 30000 ); await sleep(500); // avoid socket hang up const afterMetrics = await fetchGlobalAccountantMetrics(); @@ -1162,7 +1164,7 @@ describe("NTT Global Accountant Tests", () => { ); expect(afterBscBalance).toBeLessThan(beforeBscBalance.valueOf()); }); - test("d. Ensure a token can be sent between non-hub endpoints", async () => { + test("d. Ensure a token can be sent between non-hub transceivers", async () => { const beforeMetrics = await fetchGlobalAccountantMetrics(); const beforeBscBalance = await fetchGlobalAccountantBalance( SPOKE_CHAIN_A, @@ -1197,7 +1199,8 @@ describe("NTT Global Accountant Tests", () => { sequence, { transport: NodeHttpTransport(), - } + }, + 30000 ); await sleep(500); // avoid socket hang up const afterMetrics = await fetchGlobalAccountantMetrics(); @@ -1241,7 +1244,7 @@ describe("NTT Global Accountant Tests", () => { beforePolygonBalance.valueOf() ); }); - test("e. Ensure a token sent from a source endpoint without a known hub is rejected", async () => { + test("e. Ensure a token sent from a source transceiver without a known hub is rejected", async () => { const beforeMetrics = await fetchGlobalAccountantMetrics(); const core = ethers_contracts.Implementation__factory.connect( CONTRACTS.DEVNET.ethereum.core, @@ -1283,13 +1286,13 @@ describe("NTT Global Accountant Tests", () => { ) ).rejects.toThrow(); }); - test("f. Ensure a token sent from a source chain without a known endpoint is rejected", async () => { + test("f. Ensure a token sent from a source chain without a known transceiver is rejected", async () => { { // init the locking hub const vaa = makeVAA( HUB_CHAIN, BSC_WALLET_EMITTER, - "c83e3d2e000000000000000000000000bb807f76cda53b1b4256e1b6f33bb46be36508e3000000000000000000000000002a68f967bfa230780a385175d0c86ae4048d309612" + "9c23bd3b000000000000000000000000bb807f76cda53b1b4256e1b6f33bb46be36508e3000000000000000000000000002a68f967bfa230780a385175d0c86ae4048d309612" ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); @@ -1335,13 +1338,13 @@ describe("NTT Global Accountant Tests", () => { ) ).rejects.toThrow(); }); - test("g. Ensure a token sent from a source chain without a matching endpoint is rejected", async () => { + test("g. Ensure a token sent from a source chain without a matching transceiver is rejected", async () => { { // set faux spoke registration to hub but not vice-versa const vaa = makeVAA( FAUX_SPOKE_CHAIN_A, ETH_WALLET_EMITTER, - `d0d292f1${chainToHex(HUB_CHAIN)}${BSC_WALLET_EMITTER}` + `18fc67c2${chainToHex(HUB_CHAIN)}${BSC_WALLET_EMITTER}` ); const result = await submitVAA(vaa); expect(result.code).toEqual(0); @@ -1387,7 +1390,7 @@ describe("NTT Global Accountant Tests", () => { ) ).rejects.toThrow(); }); - test("h. Ensure a token sent to a destination chain without a known endpoint is rejected", async () => { + test("h. Ensure a token sent to a destination chain without a known transceiver is rejected", async () => { const beforeMetrics = await fetchGlobalAccountantMetrics(); const core = ethers_contracts.Implementation__factory.connect( CONTRACTS.DEVNET.ethereum.core, @@ -1536,7 +1539,8 @@ describe("NTT Global Accountant Tests", () => { sequence, { transport: NodeHttpTransport(), - } + }, + 30000 ); await sleep(500); // avoid socket hang up const afterMetrics = await fetchGlobalAccountantMetrics();