Skip to content

Commit

Permalink
sapphire-contracts: Workaround for flaky gas padding test
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Jul 19, 2024
1 parent 380a981 commit 0117269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/test/gas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Gas Padding', function () {

tx = await contract.testConstantTime(1, 110000);
receipt = await tx.wait();
expect(receipt!.cumulativeGasUsed).eq(initialGasUsed + 10000n);
expect(receipt!.cumulativeGasUsed).gte(initialGasUsed + 10000n).lte(initialGasUsed + 10001n);

// Note: calldata isn't included in gas padding
// Thus when the value is 0 it will use 4 gas instead of 16 gas
Expand Down

0 comments on commit 0117269

Please sign in to comment.