Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): Bump @hashgraph/hedera-local from 2.25.2 to 2.26.2 #799

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 103 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"prepare": "husky install"
},
"devDependencies": {
"@hashgraph/hedera-local": "^2.25.2",
"@hashgraph/hedera-local": "^2.26.2",
"@hashgraph/sdk": "^2.45.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.7",
"@nomicfoundation/hardhat-foundry": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion test/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const Contract = {
};

const CALL_EXCEPTION = 'CALL_EXCEPTION';
const CONTRACT_REVERT_EXECUTED_CODE = -32008;
const CONTRACT_REVERT_EXECUTED_CODE = 3;
const GAS_LIMIT_1_000_000 = { gasLimit: 1_000_000 };
const GAS_LIMIT_10_000_000 = { gasLimit: 10_000_000 };
const GAS_LIMIT_800000 = { gasLimit: 800000 };
Expand Down
70 changes: 32 additions & 38 deletions test/hts-precompile/token-managment/tokenManagmentContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});
});
Expand Down
10 changes: 6 additions & 4 deletions test/multicall/Multicall.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected], 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);
Expand All @@ -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);
}
Expand Down
Loading