File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ contract DeployScript is Script {
11
11
address public proxyLoaderOwner = 0xDdF32240B4ca3184De7EC8f0D5Aba27dEc8B7A5C ;
12
12
address public expectedDeployAddress = 0x658ce9D45885BCE9682e5c07c9E7982610c7aB37 ;
13
13
14
- bytes32 public proxySalt = 0 ; // TODO
15
- address public proxyAddress = address ( 0 ); // TODO
14
+ bytes32 public proxySalt = 0x0000000000000000000000000000000000000000d0cdac1fc979ce15f752cd13 ;
15
+ address public proxyAddress = 0x0000000000Fe335F59B373055a9865eE4c2cFb3e ;
16
16
17
17
function run () public {
18
18
address proxyLoader = address (new AlchemyProxyLoader {salt: 0 }(proxyLoaderOwner));
Original file line number Diff line number Diff line change @@ -64,12 +64,24 @@ contract AlchemyProxyLoaderTest is Test {
64
64
assertEq (predicted, 0x39A37979BB4a14e3Cdd1D7Ba8475f588f5b13E5F );
65
65
}
66
66
67
- function test_getDeployedProxyInitcode () public pure {
67
+ function test_getDeployedProxyInitcode () public {
68
+ vm.startPrank (CREATE2_FACTORY);
69
+
68
70
bytes32 bytecodeHash = keccak256 (
69
71
abi.encodePacked (
70
- type (ERC1967Proxy ).creationCode, abi.encode (address (0xea8ea085589afBA8C5DA2808F150AC14fA10BA78 ), "" )
72
+ type (ERC1967Proxy ).creationCode, abi.encode (address (0x39A37979BB4a14e3Cdd1D7Ba8475f588f5b13E5F ), "" )
73
+ )
74
+ );
75
+ assertEq (bytecodeHash, 0x6baa9034371dd10a8709f2482eb766c1feb485e65df35a46ecc2b43539ca54ec );
76
+ address proxyLoader =
77
+ address (new AlchemyProxyLoader {salt: 0 }(address (0xDdF32240B4ca3184De7EC8f0D5Aba27dEc8B7A5C )));
78
+ console.logAddress (proxyLoader);
79
+
80
+ address proxy = address (
81
+ new ERC1967Proxy {salt: 0x0000000000000000000000000000000000000000d0cdac1fc979ce15f752cd13 }(
82
+ address (0x39A37979BB4a14e3Cdd1D7Ba8475f588f5b13E5F ), ""
71
83
)
72
84
);
73
- assertEq (bytecodeHash, 0xfffaf8b8e37203f5fe0847c9dd2263b193696d77f7dd48fd0cc06ba44478620b );
85
+ assertEq (proxy, 0x0000000000Fe335F59B373055a9865eE4c2cFb3e );
74
86
}
75
87
}
You can’t perform that action at this time.
0 commit comments