Skip to content

Commit 61d2b8a

Browse files
authored
Merge pull request #2 from emo-eth/update-create2-helpers
chore: Update create2-helpers to work with new foundry
2 parents 025b17d + 0b7e119 commit 61d2b8a

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

foundry.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ bytecode_hash = "none"
77
remappings = [
88
"forge-std/=dependencies/forge-std-1.9.6/src/",
99
"solady/=dependencies/solady-0.1.12/src/",
10-
"create2-helpers/=dependencies/create2-helpers-0.4.0/src/",
10+
"create2-helpers/=dependencies/create2-helpers-0.5.0/src/",
1111
"@openzeppelin-contracts/=dependencies/@openzeppelin-contracts-5.2.0/src/",
1212
"@openzeppelin-contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
1313
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.2.0/",
@@ -34,7 +34,7 @@ multline_func_header = "all"
3434
[dependencies]
3535
forge-std = "1.9.6"
3636
solady = "0.1.12"
37-
create2-helpers = "0.4.0"
37+
create2-helpers = "0.5.0"
3838
"@openzeppelin-contracts" = "5.2.0"
3939
"@openzeppelin-contracts-upgradeable" = "5.2.0"
4040

script/Deploy.s.sol

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ pragma solidity ^0.8.20;
33

44
import { BaseCreate2Script } from "create2-helpers/BaseCreate2Script.sol";
55
import { Script, console2 } from "forge-std/Script.sol";
6-
import { console } from "forge-std/console.sol";
76
import {
87
MINIMAL_PROXY_OZ_ADDRESS,
98
MINIMAL_PROXY_OZ_SALT,
@@ -19,16 +18,16 @@ import { MinimalUpgradeableProxySolady } from "src/MinimalUpgradeableProxySolady
1918
contract Deploy is BaseCreate2Script {
2019

2120
function run() public {
22-
console.log("ProxyFactory initcode hash:");
23-
console.logBytes32(
21+
console2.log("ProxyFactory initcode hash:");
22+
console2.logBytes32(
2423
keccak256(abi.encodePacked(type(DeterministicProxyFactory).creationCode))
2524
);
26-
console.log("MinimalUpgradeableProxySolady initcode hash:");
27-
console.logBytes32(
25+
console2.log("MinimalUpgradeableProxySolady initcode hash:");
26+
console2.logBytes32(
2827
keccak256(abi.encodePacked(type(MinimalUpgradeableProxySolady).creationCode))
2928
);
30-
console.log("MinimalUpgradeableProxyOZ initcode hash:");
31-
console.logBytes32(
29+
console2.log("MinimalUpgradeableProxyOZ initcode hash:");
30+
console2.logBytes32(
3231
keccak256(abi.encodePacked(type(MinimalUpgradeableProxyOZ).creationCode))
3332
);
3433

@@ -37,13 +36,15 @@ contract Deploy is BaseCreate2Script {
3736
for (uint256 i = 0; i < networks.length; i++) {
3837
rpcUrls[i] = getChain(networks[i]).rpcUrl;
3938
}
40-
runOnNetworks(this._run, rpcUrls);
39+
runOnNetworks(_run, rpcUrls);
4140
}
4241

43-
function _run() public {
42+
function _run() internal {
43+
console2.log("Deploying DeterministicProxyFactory");
4444
address proxyFactoryAddr = _create2IfNotDeployed(
4545
deployer, PROXY_FACTORY_SALT, type(DeterministicProxyFactory).creationCode
4646
);
47+
console2.log("Deployed DeterministicProxyFactory to address:", proxyFactoryAddr);
4748
require(
4849
proxyFactoryAddr == PROXY_FACTORY_ADDRESS,
4950
"Deployed DeterministicProxyFactory to wrong address"

soldeer.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ integrity = "498747bedc3f757976da0b6125d26a63e79bb2b4dbabd8ecd2547e809a2fa27e"
1414

1515
[[dependencies]]
1616
name = "create2-helpers"
17-
version = "0.4.0"
18-
url = "https://soldeer-revisions.s3.amazonaws.com/create2-helpers/0_4_0_22-03-2025_01:31:56_create2-helpers.zip"
19-
checksum = "2693981e7f6ce53687f5b2bda8d63e6523d2b47427cfe746552a8848f6c20163"
20-
integrity = "3991c62c03ff7933891a99b2b5305eb86b73cba83c0acd88c120bd6ae75f741b"
17+
version = "0.5.0"
18+
url = "https://soldeer-revisions.s3.amazonaws.com/create2-helpers/0_5_0_13-05-2025_17:05:02_create2-helpers.zip"
19+
checksum = "2e68e7866282a2801318145d610ea6f8bc64f5a591e1b57a27dd7d49b7adad65"
20+
integrity = "a18fe8aa906f2840378580388d61d032095410791ce6dff1f9a86754a6755d44"
2121

2222
[[dependencies]]
2323
name = "forge-std"

0 commit comments

Comments
 (0)