We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 701deb3 commit f812f69Copy full SHA for f812f69
src/stylus/StylusDeployer.sol
@@ -75,9 +75,16 @@ contract StylusDeployer {
75
// initialize - this will fail if the program wasn't activated by this point
76
// we check if initData exists to avoid calling contracts unnecessarily
77
if (initData.length != 0) {
78
- (bool success,) = address(newContractAddress).call{value: initValue}(initData);
+ (bool success, bytes32 memory data) =
79
+ address(newContractAddress).call{value: initValue}(initData);
80
if (!success) {
- revert ContractInitializationError(newContractAddress);
81
+ if (data.length > 0) {
82
+ assembly {
83
+ revert(add(data, 32), mload(data))
84
+ }
85
+ } else {
86
+ revert ContractInitializationError(newContractAddress);
87
88
}
89
} else if (initValue != 0) {
90
// if initValue exists init data should too
0 commit comments