always return value (for reverts)
@@ -14,6 +14,14 @@ contract FranklinProxy is FranklinCommon {
exitor = _exitor;
}
+ function x() public payable
+ returns (bytes)
+ {
+ callExternal(depositor);
+ //revert("hello");
+ //return "test";
+ }
+
function deposit(uint256[2] memory, uint128) public payable {
callExternal(depositor);
}
@@ -88,7 +96,8 @@ contract FranklinProxy is FranklinCommon {
let retVal := delegatecall(sub(gas, 2000), callee, memoryPointer, calldatasize, newFreeMemoryPointer, 0x40)
let retDataSize := returndatasize
returndatacopy(newFreeMemoryPointer, 0, retDataSize)
- switch retVal case 0 { revert(0,0) } default { return(newFreeMemoryPointer, retDataSize) }
+ //switch retVal case 0 { return(newFreeMemoryPointer, returndatasize) } default { return(newFreeMemoryPointer, retDataSize) }
+ return(newFreeMemoryPointer, retDataSize)
}
}
}
\ No newline at end of file
