From 17dfae63ffb756a35b8d25a178ee153b85daa38f Mon Sep 17 00:00:00 2001 From: minaminao Date: Thu, 12 Sep 2024 01:03:28 +0900 Subject: [PATCH] update forge-std --- foundry.toml | 2 ++ lib/forge-std | 2 +- src/HuffChallenge/challenge4/Challenge4.t.sol | 4 ++-- src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/foundry.toml b/foundry.toml index bb60e09..fdb1129 100644 --- a/foundry.toml +++ b/foundry.toml @@ -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: " 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. ] diff --git a/lib/forge-std b/lib/forge-std index 6d27cc0..1714bee 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 6d27cc06fb2668965cbbc533d6ac3385c91a19a3 +Subproject commit 1714bee72e286e73f76e320d110e0eaf5c4e649d diff --git a/src/HuffChallenge/challenge4/Challenge4.t.sol b/src/HuffChallenge/challenge4/Challenge4.t.sol index 79319c4..f87ed53 100644 --- a/src/HuffChallenge/challenge4/Challenge4.t.sol +++ b/src/HuffChallenge/challenge4/Challenge4.t.sol @@ -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))); diff --git a/src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol b/src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol index d9d3e2f..c1afb65 100644 --- a/src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol +++ b/src/QuillCTF2022/CollatzPuzzle/CollatzPuzzleSolved.t.sol @@ -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); } }