-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve natspec for constructCreate2Salt
chore: remove underscore from function name test: constructCreate2Salt function build: set ffi true in test foundry profile
- Loading branch information
1 parent
32cbe90
commit 3f3c439
Showing
4 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity >=0.8.19 <0.9.0; | ||
|
||
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; | ||
import { PRBTest } from "@prb/test/src/PRBTest.sol"; | ||
|
||
import { BaseScript } from "script/Base.s.sol"; | ||
|
||
contract BaseScript_Test is PRBTest { | ||
using Strings for uint256; | ||
|
||
BaseScript internal baseScript = new BaseScript(); | ||
|
||
function test_ConstructCreate2Salt() public { | ||
string memory chainId = block.chainid.toString(); | ||
string memory version = "1.1.1"; | ||
string memory salt = string.concat("ChainID ", chainId, ", Version ", version); | ||
|
||
bytes32 actualSalt = baseScript.constructCreate2Salt(); | ||
bytes32 expectedSalt = bytes32(abi.encodePacked(salt)); | ||
assertEq(actualSalt, expectedSalt, "CREATE2 salt mismatch"); | ||
} | ||
} |