Skip to content

Commit

Permalink
fix: turbo clean dependencies + gas report underflow + test snapshots (
Browse files Browse the repository at this point in the history
  • Loading branch information
vdrg authored Nov 21, 2024
1 parent 7947764 commit 11b32fa
Show file tree
Hide file tree
Showing 10 changed files with 387 additions and 370 deletions.
4 changes: 2 additions & 2 deletions packages/gas-report/src/GasReporter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ contract GasReporter is Test {
function endGasReport() internal {
uint256 gas = gasleft();
if (!vm.envOr("GAS_REPORTER_ENABLED", false)) return;
// subtract 160 gas used by the GasReporter itself
// subtract 159 gas used by the GasReporter itself
// add 1 gas so we can later check that this is set
uint256 gasUsed = __currentGasReportValue - gas - 160 + 1;
uint256 gasUsed = __currentGasReportValue - gas - 159 + 1;
require(gasUsed > 0, "gas report didn't use gas");
__gasReports[__currentGasReportName] = gasUsed;
__gasReportNames.push(__currentGasReportName);
Expand Down
36 changes: 18 additions & 18 deletions packages/schema-type/gas-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,108 +3,108 @@
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint8",
"gasUsed": 124
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint32",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint256",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: int8",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: int32",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: int256",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bytes1",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bytes4",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bytes32",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bool",
"gasUsed": 123
"gasUsed": 122
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: address",
"gasUsed": 165
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint8[]",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint32[]",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: uint256[]",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: int256[]",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bytes32[]",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: bytes",
"gasUsed": 166
"gasUsed": 164
},
{
"file": "test/solidity/SchemaType.t.sol:SchemaTypeTest",
"test": "testGas",
"name": "getStaticByteLength: string",
"gasUsed": 166
"gasUsed": 164
}
]
Loading

0 comments on commit 11b32fa

Please sign in to comment.