File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ contract Deployer is TwoStepOwnable {
105
105
mstore (add (ptr, initCode.length ), _feeCollector)
106
106
deployed := create (callvalue (), ptr, add (initCode.length , 0x20 ))
107
107
}
108
- if (deployed == address (0 ) || deployed.code.length == 0 ) {
108
+ if (
109
+ deployed == address (0 )
110
+ || deployed.codehash == 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
111
+ ) {
109
112
revert DeployFailed ();
110
113
}
111
114
emit Deployed (newNonce, deployed);
@@ -133,7 +136,10 @@ contract Deployer is TwoStepOwnable {
133
136
unchecked {
134
137
for (uint64 i = nonce; i != 0 ; -- i) {
135
138
address instance = AddressDerivation.deriveContract (address (this ), i);
136
- if (! isUnsafe[instance] && instance.code.length > 0 ) {
139
+ if (
140
+ ! isUnsafe[instance]
141
+ && instance.codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
142
+ ) {
137
143
return instance;
138
144
}
139
145
}
You can’t perform that action at this time.
0 commit comments