diff --git a/.forge-snapshots/Increment counter number.snap b/.forge-snapshots/Increment counter number.snap index 1d3d6fb..64cea38 100644 --- a/.forge-snapshots/Increment counter number.snap +++ b/.forge-snapshots/Increment counter number.snap @@ -1 +1 @@ -26276 \ No newline at end of file +26304 \ No newline at end of file diff --git a/.forge-snapshots/Set counter number.snap b/.forge-snapshots/Set counter number.snap index c013c6c..44d33ec 100644 --- a/.forge-snapshots/Set counter number.snap +++ b/.forge-snapshots/Set counter number.snap @@ -1 +1 @@ -26363 \ No newline at end of file +26394 \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 12fc339..8733259 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ env: FOUNDRY_PROFILE: ${{ github.event_name == 'push' && 'ci' || 'pr' }} jobs: - test: + forge-test: strategy: fail-fast: true diff --git a/foundry.toml b/foundry.toml index 88deca3..9bfa095 100644 --- a/foundry.toml +++ b/foundry.toml @@ -4,8 +4,8 @@ out = "out" libs = ["lib"] optimizer = true optimizer_runs = 999999 -via_ir = true -solc = "0.8.23" +via_ir = false +solc = "0.8.26" verbosity = 2 ffi = true fs_permissions = [ diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index eba43ad..d906e6d 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.26; import "forge-std/Script.sol"; diff --git a/src/Counter.sol b/src/Counter.sol index 971baf7..0c2d393 100644 --- a/src/Counter.sol +++ b/src/Counter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.26; import {ICounter} from "./interface/ICounter.sol"; diff --git a/src/interface/ICounter.sol b/src/interface/ICounter.sol index 709181b..bee2abe 100644 --- a/src/interface/ICounter.sol +++ b/src/interface/ICounter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.26; interface ICounter { /// @return The current number diff --git a/test/Counter.t.sol b/test/Counter.t.sol index 2341ab0..a561f2a 100644 --- a/test/Counter.t.sol +++ b/test/Counter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.26; import "forge-std/Test.sol"; import "test/util/TestHelpers.sol"; @@ -27,9 +27,14 @@ contract CounterTest_Deployed is Deployed, GasSnapshot { assertEq(counter.number(), 11); } - function testFuzz_SetsNumber(uint256 x) public { + function test_fuzz_SetsNumber(uint256 x) public { counter.setNumber(x); - snapLastCall("Set counter number"); assertEq(counter.number(), x); } + + function test_SetNumber_gas() public { + uint256 x = 100; + counter.setNumber(x); + snapLastCall("Set counter number"); + } } diff --git a/test/util/TestHelpers.sol b/test/util/TestHelpers.sol index e439478..72594a3 100644 --- a/test/util/TestHelpers.sol +++ b/test/util/TestHelpers.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.26; import "forge-std/Test.sol";