Skip to content

Commit

Permalink
update forge-std
Browse files Browse the repository at this point in the history
minaminao committed Sep 11, 2024
1 parent b3bfd97 commit 17dfae6
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -8,8 +8,10 @@ evm_version = "cancun"

ignored_error_codes = [
"license", # warning[1878]: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
3628, # Warning (3628): This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
3860, # Warning (3860): Contract initcode size is X bytes and exceeds Y bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
5159, # Warning (5159): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
5574, # Warning (5574): Contract code size is 24870 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
9302, # Warning (9302): Return value of low-level calls not used.
]

4 changes: 2 additions & 2 deletions src/HuffChallenge/challenge4/Challenge4.t.sol
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ contract Challenge4Test is Test {
reversooor = HuffDeployer.config().deploy("HuffChallenge/challenge4/Challenge4");
}

function testReverseDeterministic() public {
function testReverseDeterministic() public view {
_reverseCase("", "");
_reverseCase("a", "a");
_reverseCase("abc", "cba");
@@ -399,7 +399,7 @@ contract Challenge4Test is Test {
_reverseCase(hex"7782d616ad0decf57a2ac92e42", hex"422ec92a7af5ec0dad16d68277");
}

function _reverseCase(bytes memory _in, bytes memory _expectedOut) internal {
function _reverseCase(bytes memory _in, bytes memory _expectedOut) internal view {
(bool success, bytes memory retData) = reversooor.staticcall(_in);
assertTrue(success);
assertEq(retData, _expectedOut, string(abi.encodePacked("meant to reverse: ", _in)));
2 changes: 1 addition & 1 deletion src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ contract CollatzPuzzleSolved is Test {
solution = ICollatzPuzzle(HuffDeployer.deploy("/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolution"));
}

function testSolution() public {
function testSolution() public view {
assertEq(puzzle.callMe(address(solution)), true);
}
}

0 comments on commit 17dfae6

Please sign in to comment.