diff --git a/foundry.toml b/foundry.toml index 9bfa095..72d792d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -34,7 +34,10 @@ optimizer_runs = 200 fuzz.runs = 100 [fmt] -line_length = 160 +line_length = 120 +tab_width = 4 +quote_style = "single" +sort_imports = true number_underscore = "thousands" [rpc_endpoints] diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index d906e6d..2529d83 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.26; -import "forge-std/Script.sol"; +import 'forge-std/Script.sol'; -import {Counter} from "src/Counter.sol"; +import {Counter} from 'src/Counter.sol'; contract Deploy is Script { using stdJson for string; diff --git a/src/Counter.sol b/src/Counter.sol index 0c2d393..3362e98 100644 --- a/src/Counter.sol +++ b/src/Counter.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.26; -import {ICounter} from "./interface/ICounter.sol"; +import {ICounter} from './interface/ICounter.sol'; contract Counter is ICounter { uint256 public number; diff --git a/test/Counter.t.sol b/test/Counter.t.sol index a561f2a..9770497 100644 --- a/test/Counter.t.sol +++ b/test/Counter.t.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.26; -import "forge-std/Test.sol"; -import "test/util/TestHelpers.sol"; -import {GasSnapshot} from "forge-gas-snapshot/GasSnapshot.sol"; +import {GasSnapshot} from 'forge-gas-snapshot/GasSnapshot.sol'; +import 'forge-std/Test.sol'; +import 'test/util/TestHelpers.sol'; -import {Counter} from "src/Counter.sol"; +import {Counter} from 'src/Counter.sol'; abstract contract Deployed is Test, TestHelpers { Counter counter; @@ -23,7 +23,7 @@ contract CounterTest_Deployed is Deployed, GasSnapshot { function test_IncrementsNumber() public { counter.increment(); - snapLastCall("Increment counter number"); + snapLastCall('Increment counter number'); assertEq(counter.number(), 11); } @@ -35,6 +35,6 @@ contract CounterTest_Deployed is Deployed, GasSnapshot { function test_SetNumber_gas() public { uint256 x = 100; counter.setNumber(x); - snapLastCall("Set counter number"); + snapLastCall('Set counter number'); } } diff --git a/test/util/TestHelpers.sol b/test/util/TestHelpers.sol index 72594a3..934127f 100644 --- a/test/util/TestHelpers.sol +++ b/test/util/TestHelpers.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.26; -import "forge-std/Test.sol"; +import 'forge-std/Test.sol'; abstract contract TestHelpers is Test { Account internal DEPLOYER; constructor() { - DEPLOYER = makeAccount("DEPLOYER"); - vm.setEnv("PRIVATE_KEY", vm.toString(DEPLOYER.key)); + DEPLOYER = makeAccount('DEPLOYER'); + vm.setEnv('PRIVATE_KEY', vm.toString(DEPLOYER.key)); } }