Skip to content

Commit

Permalink
refactor:add artifacts + use ir-minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Oct 11, 2024
1 parent eeb08fb commit c3efddc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
evm_version = "cancun" # See https://www.evmdiff.com/features?name=PUSH0&kind=opcode
gas_reports = ["*"]
optimizer = true
optimizer_runs = 1_000_000
optimizer_runs = 800
out = "out"
script = "scripts"
solc = "0.8.27"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"test": "yarn run test:forge",
"test:gas:forge": "forge test --gas-report",
"test:gas": "yarn test:gas:forge",
"coverage:forge": "forge coverage",
"coverage:forge": "forge coverage --ir-minimum",
"coverage": "yarn run coverage:forge",
"coverage:report": "forge coverage --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage/foundry && mv lcov.info coverage/foundry",
"coverage:report": "forge coverage --ir-minimum --report lcov && genhtml lcov.info --branch-coverage --output-dir coverage/foundry && mv lcov.info coverage/foundry",
"deploy:forge": "forge script scripts/solidity/Deploy.s.sol --broadcast --rpc-url http://localhost:8545",
"lint:sol": "yarn solhint 'contracts/**/*.sol' && forge fmt --check",
"lint:sol-fix": "yarn prettier --write 'contracts/**/*.sol' && yarn solhint 'contracts/**/*.sol' --fix --noPrompt && forge fmt",
Expand Down
22 changes: 22 additions & 0 deletions test/mocks/Counter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;

contract Counter {
uint256 private _number;

function incrementNumber() public {
_number++;
}

function decrementNumber() public {
_number--;
}

function getNumber() public view returns (uint256) {
return _number;
}

function revertOperation() public pure {
revert("Counter: Revert operation");
}
}
2 changes: 1 addition & 1 deletion test/mocks/MockOracle.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.27;

import "contracts/interfaces/oracles/IOracle.sol";

Expand Down

0 comments on commit c3efddc

Please sign in to comment.