From 362afdf47e4aef80c4fdcb5e57ef6760f96aa5e8 Mon Sep 17 00:00:00 2001 From: Tarek Mohamed Abdalla Date: Wed, 15 Jan 2025 12:10:20 +0200 Subject: [PATCH] fix: fix tests --- ts-tests/tests/test-contract-storage.ts | 6 +++--- ts-tests/tests/test-execute.ts | 2 +- ts-tests/tests/test-gas.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ts-tests/tests/test-contract-storage.ts b/ts-tests/tests/test-contract-storage.ts index 66ff3f6ab7..d4212c3b9e 100644 --- a/ts-tests/tests/test-contract-storage.ts +++ b/ts-tests/tests/test-contract-storage.ts @@ -117,11 +117,11 @@ describeWithFrontier("Frontier RPC (Contract)", (context) => { const baseCost = 24029; // going from unset storage to some value (original = 0) - expect(tx1.gasUsed - baseCost).to.be.eq(20000); + expect(tx1.gasUsed - baseCost).to.be.eq(19993); // in London config, setting back the same value have cost of warm read - expect(tx2.gasUsed - baseCost).to.be.eq(100); + expect(tx2.gasUsed - baseCost).to.be.eq(93); // - the original storage didn't change in the current transaction // - the original storage is not zero (otherwise tx1) - expect(tx3.gasUsed - baseCost).to.be.eq(2900); + expect(tx3.gasUsed - baseCost).to.be.eq(2893); }); }); diff --git a/ts-tests/tests/test-execute.ts b/ts-tests/tests/test-execute.ts index afbf731588..138b5eedca 100644 --- a/ts-tests/tests/test-execute.ts +++ b/ts-tests/tests/test-execute.ts @@ -158,7 +158,7 @@ describeWithFrontier("Frontier RPC (RPC execution)", (context) => { }, ]); - expect(result.result).to.be.equal("0x30464"); + expect(result.result).to.be.equal("0x2e4b4"); }); step("should estimateGas with gas limit up to 10x block gas limit", async function () { diff --git a/ts-tests/tests/test-gas.ts b/ts-tests/tests/test-gas.ts index 7da474b7da..1c80dcaab4 100644 --- a/ts-tests/tests/test-gas.ts +++ b/ts-tests/tests/test-gas.ts @@ -129,7 +129,7 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { from: GENESIS_ACCOUNT, data: Test.bytecode, }); - expect(result).to.equal(197732); + expect(result).to.equal(189620); }); it("eth_estimateGas should ignore nonce", async function () { @@ -138,7 +138,7 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { data: Test.bytecode, nonce: 42, // Arbitrary nonce value }); - expect(result).to.equal(197732); + expect(result).to.equal(189620); }); it("tx gas limit below ETH_BLOCK_GAS_LIMIT", async function () { @@ -420,6 +420,6 @@ describeWithFrontier("Frontier RPC (Invalid opcode estimate gas)", (context) => }); // The actual estimated value is irrelevant for this test purposes, we just want to verify that // the binary search is not interrupted when an InvalidCode is returned by the evm. - expect(estimate).to.equal(85703); + expect(estimate).to.equal(85699); }); });