diff --git a/test/hts-precompile/token-managment/tokenManagmentContract.js b/test/hts-precompile/token-managment/tokenManagmentContract.js index d33ecf141..5c056fcf1 100644 --- a/test/hts-precompile/token-managment/tokenManagmentContract.js +++ b/test/hts-precompile/token-managment/tokenManagmentContract.js @@ -704,11 +704,11 @@ describe('TokenManagmentContract Test Suite', function () { it('should not be able to pause the token with different PAUSE key', async function () { const pauseTokenTx = await tokenManagmentContract - .connect(signers[1]) - .pauseTokenPublic(tokenAddress); + .connect(signers[1]) + .pauseTokenPublic(tokenAddress); const unpauseTokenTx = await tokenManagmentContract - .connect(signers[1]) - .unpauseTokenPublic(tokenAddress); + .connect(signers[1]) + .unpauseTokenPublic(tokenAddress); await utils.expectToFail(pauseTokenTx, Constants.CALL_EXCEPTION); await utils.expectToFail(unpauseTokenTx, Constants.CALL_EXCEPTION); @@ -816,26 +816,22 @@ describe('TokenManagmentContract Test Suite', function () { it('should not be able to wipe the token with different WIPE key', async function () { const wipeAmount = 3; await tokenTransferContract.transferTokensPublic( - tokenAddress, - [signers[0].address, signers[1].address], - [-wipeAmount, wipeAmount] + tokenAddress, + [signers[0].address, signers[1].address], + [-wipeAmount, wipeAmount] ); // await until the new balance is settled for signers[1] await pollForNewERC20Balance( - erc20Contract, - tokenAddress, - signers[1].address, - 0n + erc20Contract, + tokenAddress, + signers[1].address, + 0n ); const wipeTokenTx = await tokenManagmentContract - .connect(signers[1]) - .wipeTokenAccountPublic( - tokenAddress, - signers[1].address, - wipeAmount - ); + .connect(signers[1]) + .wipeTokenAccountPublic(tokenAddress, signers[1].address, wipeAmount); await utils.expectToFail(wipeTokenTx, Constants.CALL_EXCEPTION); }); @@ -950,17 +946,17 @@ describe('TokenManagmentContract Test Suite', function () { it('should not be able to freeze the token with different FREEZE key', async function () { const freezeTokenTx = await tokenManagmentContract - .connect(signers[1]) - .freezeTokenPublic( - tokenAddress, - await tokenCreateContract.getAddress() - ); + .connect(signers[1]) + .freezeTokenPublic( + tokenAddress, + await tokenCreateContract.getAddress() + ); const unfreezeTokenTx = await tokenManagmentContract - .connect(signers[1]) - .unfreezeTokenPublic( - tokenAddress, - await tokenCreateContract.getAddress() - ); + .connect(signers[1]) + .unfreezeTokenPublic( + tokenAddress, + await tokenCreateContract.getAddress() + ); await utils.expectToFail(freezeTokenTx, Constants.CALL_EXCEPTION); await utils.expectToFail(unfreezeTokenTx, Constants.CALL_EXCEPTION); @@ -1035,22 +1031,20 @@ describe('TokenManagmentContract Test Suite', function () { }); it('should be able to perform admin action with TokenManagementContract as ADMIN key', async function () { - console.log(tokenAddress); - const updatedKey = updateTokenInfoValues( - utils.KeyValueType.CONTRACT_ID, - await tokenTransferContract.getAddress() + utils.KeyValueType.CONTRACT_ID, + await tokenTransferContract.getAddress() ); const updateTokenKeyTx = await tokenManagmentContract - .connect(signers[1]) - .updateTokenKeysPublic(tokenAddress, [ - [utils.KeyType.SUPPLY, updatedKey], - ]); + .connect(signers[1]) + .updateTokenKeysPublic(tokenAddress, [ + [utils.KeyType.SUPPLY, updatedKey], + ]); expect( - (await updateTokenKeyTx.wait()).logs.filter( - (e) => e.fragment.name === Constants.Events.ResponseCode - )[0].args.responseCode + (await updateTokenKeyTx.wait()).logs.filter( + (e) => e.fragment.name === Constants.Events.ResponseCode + )[0].args.responseCode ).to.eq(TX_SUCCESS_CODE); }); }); diff --git a/test/multicall/Multicall.js b/test/multicall/Multicall.js index 5700cd4e6..1e2cf77e9 100644 --- a/test/multicall/Multicall.js +++ b/test/multicall/Multicall.js @@ -263,9 +263,11 @@ describe('Multicall Test Suite', function () { expect(bytes).to.gte(42624); }); - it('should NOT be able to aggregate 115 calls to processLongOutput', async function () { - const n = 115; - const maxDataSize = 25 * 1024 * 2; // 25 kb + it('should NOT be able to aggregate 585 calls to processLongOutput', async function () { + // @note: since mirror-node@v0.105.0, the maximum data size was increased to 128 KiB. + const maxDataSize = 128 * 1024 * 2; // 262144 characters - 128 KiB + const n = 585; // 262218 characters ~ 128.03 KiB + let hasError = false; try { await multicallProcessLongOutput(n); @@ -275,7 +277,7 @@ describe('Multicall Test Suite', function () { expect(e.message).to.exist; // Output is too large and the call is reverted. - // The call exceeded the call size limit of 25KB + // The call exceeded the call size limit of 128 KiB const EXPECTED_ERROR_MESSAGE = `exceeds ${maxDataSize} characters`; expect(e.message).to.contain(EXPECTED_ERROR_MESSAGE); }