Skip to content

Commit

Permalink
update solidity version
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Jul 1, 2024
1 parent fd25c20 commit edd29c8
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/Increment counter number.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26276
26304
2 changes: 1 addition & 1 deletion .forge-snapshots/Set counter number.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26363
26394
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
FOUNDRY_PROFILE: ${{ github.event_name == 'push' && 'ci' || 'pr' }}

jobs:
test:
forge-test:
strategy:
fail-fast: true

Expand Down
4 changes: 2 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion script/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import "forge-std/Script.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {ICounter} from "./interface/ICounter.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/interface/ICounter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;
pragma solidity 0.8.26;

interface ICounter {
/// @return The current number
Expand Down
11 changes: 8 additions & 3 deletions test/Counter.t.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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");
}
}
2 changes: 1 addition & 1 deletion test/util/TestHelpers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import "forge-std/Test.sol";

Expand Down

0 comments on commit edd29c8

Please sign in to comment.