From d27cff308a3cf964d0e307183352efd07a42f712 Mon Sep 17 00:00:00 2001 From: Agusrodri Date: Mon, 6 May 2024 12:14:00 -0700 Subject: [PATCH] fix ts tests --- test/contracts/src/ERC20ExcessGas.sol | 2 +- .../dev/moonbase/test-fees/test-fee-multiplier-max.ts | 6 +++--- .../test-storage-growth/test-evm-create-storage-growth.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/contracts/src/ERC20ExcessGas.sol b/test/contracts/src/ERC20ExcessGas.sol index 73a5d0e8bb..6b86c61fb1 100644 --- a/test/contracts/src/ERC20ExcessGas.sol +++ b/test/contracts/src/ERC20ExcessGas.sol @@ -18,7 +18,7 @@ contract ERC20ExcessGas is ERC20WithInitialSupply { uint256 amount ) public override returns (bool) { // Consume gas to over Erc20XcmBridgeTransferGasLimit - for (uint i = 0; i < 2000; i++) { + for (uint i = 0; i < 2200; i++) { _gasHog += i; } diff --git a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts index 437c8d173b..735a888cb1 100644 --- a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts +++ b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts @@ -139,7 +139,7 @@ describeSuite({ blockNumber = (await context.polkadotJs().rpc.chain.getHeader()).number.toBigInt(); baseFeePerGas = (await context.viem().getBlock({ blockNumber: blockNumber })) .baseFeePerGas!; - expect(baseFeePerGas).to.equal(124_752_265_078_107n); + expect(baseFeePerGas).to.equal(124_752_134_188_357n); const rawSigned = await createEthersTransaction(context, { to: contractAddress, @@ -163,7 +163,7 @@ describeSuite({ ({ event }) => event.method == "ExtrinsicSuccess" )[0]; const weight = successEvent.event.data.dispatchInfo.weight.refTime.toBigInt(); - expect(weight).to.equal(2_378_300_000n); + expect(weight).to.equal(1_734_300_000n); const withdrawEvents = interactionResult?.events.filter( ({ event }) => event.method == "Withdraw" @@ -171,7 +171,7 @@ describeSuite({ expect(withdrawEvents?.length).to.equal(1); const withdrawEvent = withdrawEvents![0]; const amount = withdrawEvent.event.data.amount.toBigInt(); - expect(amount).to.equal(11_867_932_481_410_475_124n); + expect(amount).to.equal(11_867_920_029_606_778_124n); }, }); }, diff --git a/test/suites/dev/moonbase/test-storage-growth/test-evm-create-storage-growth.ts b/test/suites/dev/moonbase/test-storage-growth/test-evm-create-storage-growth.ts index 9adc303070..d2860e3e9a 100644 --- a/test/suites/dev/moonbase/test-storage-growth/test-evm-create-storage-growth.ts +++ b/test/suites/dev/moonbase/test-storage-growth/test-evm-create-storage-growth.ts @@ -12,7 +12,7 @@ describeSuite({ // (Account Code Size (112) + Length of the bytecode (550)) * Storage Growth Gas Ratio (366) // The length of the bytecode is in the generate Fibonacci.json // file at 'contract.evm.deployedBytecode.object' - const EXPECTED_STORAGE_GROWTH_GAS = 242_292; + const EXPECTED_STORAGE_GROWTH_GAS = 222_292; for (const txnType of TransactionTypes) { it({ id: `T0${TransactionTypes.indexOf(txnType) + 1}`, @@ -42,7 +42,7 @@ describeSuite({ }); expect(estimatedGas).toBeGreaterThanOrEqual(EXPECTED_STORAGE_GROWTH_GAS); - expect(estimatedGas).toBe(263644n); + expect(estimatedGas).toBe(226670n); }, });