Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,8 @@ function _guard(bytes32 salt) internal view returns (bytes32 guardedSalt) {
} else {
// For the non-pseudo-random cases, the salt value `salt` is hashed to prevent the safeguard mechanisms
// from being bypassed. Otherwise, the salt value `salt` is not modified.
guardedSalt = (salt != _generateSalt())
? keccak256(abi.encode(salt))
: salt;
guardedSalt =
(salt != _generateSalt()) ? keccak256(abi.encode(salt)) : salt;
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"author": "pcaversaccio (https://pcaversaccio.com), Matt Solomon (https://mattsolomon.dev)",
"license": "AGPL-3.0-only",
"packageManager": "pnpm@10.32.0",
"packageManager": "pnpm@10.32.1",
"scripts": {
"clean": "hardhat clean && forge clean",
"test": "forge test --out forge-artifacts",
Expand Down Expand Up @@ -275,7 +275,7 @@
"hardhat-contract-sizer": "^2.10.1",
"hardhat-gas-reporter": "^2.3.0",
"prettier": "^3.8.1",
"prettier-plugin-solidity": "^2.2.1",
"prettier-plugin-solidity": "^2.3.0",
"solhint": "^6.0.3",
"ts-node": "^10.9.2",
"typechain": "^8.3.2",
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions test/public/CREATE2/CreateX.deployCreate2Clone_2Args.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ contract CreateX_DeployCreate2Clone_2Args_Public_Test is BaseTest {

ImplementationContract internal implementationContract = new ImplementationContract();
address internal implementation = address(implementationContract);
bytes32 internal codeHash =
keccak256(
abi.encodePacked(
hex"36_3d_3d_37_3d_3d_3d_36_3d_73",
implementation,
hex"5a_f4_3d_82_80_3e_90_3d_91_60_2b_57_fd_5b_f3"
)
);
bytes32 internal codeHash = keccak256(
abi.encodePacked(
hex"36_3d_3d_37_3d_3d_3d_36_3d_73",
implementation,
hex"5a_f4_3d_82_80_3e_90_3d_91_60_2b_57_fd_5b_f3"
)
);

/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* TESTS */
Expand Down
15 changes: 7 additions & 8 deletions test/public/CREATE2/CreateX.deployCreate2Clone_3Args.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ contract CreateX_DeployCreate2Clone_3Args_Public_Test is BaseTest {

ImplementationContract internal implementationContract = new ImplementationContract();
address internal implementation = address(implementationContract);
bytes32 internal codeHash =
keccak256(
abi.encodePacked(
hex"36_3d_3d_37_3d_3d_3d_36_3d_73",
implementation,
hex"5a_f4_3d_82_80_3e_90_3d_91_60_2b_57_fd_5b_f3"
)
);
bytes32 internal codeHash = keccak256(
abi.encodePacked(
hex"36_3d_3d_37_3d_3d_3d_36_3d_73",
implementation,
hex"5a_f4_3d_82_80_3e_90_3d_91_60_2b_57_fd_5b_f3"
)
);

// To avoid any stack-too-deep errors, we use an `internal` state variable for the snapshot ID.
uint256 internal snapshotId;
Expand Down
5 changes: 3 additions & 2 deletions test/public/CREATE3/CreateX.deployCreate3AndInit_3Args.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3AndInit_3Args_Public_Test is BaseTest {
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE3` address
// and some further contract deployment addresses and variables.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3AndInit_4Args_CustomiseRefundAddress_Public_Test i
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE3` address
// and some further contract deployment addresses and variables.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3AndInit_4Args_CustomiseSalt_Public_Test is BaseTes
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE2` address
// and some further contract deployment addresses and variables.
Expand Down
5 changes: 3 additions & 2 deletions test/public/CREATE3/CreateX.deployCreate3AndInit_5Args.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3AndInit_5Args_Public_Test is BaseTest {
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE2` address
// and some further contract deployment addresses and variables.
Expand Down
5 changes: 3 additions & 2 deletions test/public/CREATE3/CreateX.deployCreate3_1Arg.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3_1Arg_Public_Test is BaseTest {
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE3` address
// and some further contract deployment addresses and variables.
Expand Down
5 changes: 3 additions & 2 deletions test/public/CREATE3/CreateX.deployCreate3_2Args.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ contract CreateX_DeployCreate3_2Args_Public_Test is BaseTest {
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

// The `keccak256`-hashed `CREATE3` proxy contract creation bytecode.
bytes32 internal proxyInitCodeHash =
keccak256(abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"));
bytes32 internal proxyInitCodeHash = keccak256(
abi.encodePacked(hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3")
);

// To avoid any stack-too-deep errors, we use `internal` state variables for the precomputed `CREATE3` address
// and some further contract deployment addresses and variables.
Expand Down
Loading