Created
May 7, 2018 00:18
-
-
Save kosecki123/efd4138fbca88c4492d372e30254c834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function canExecute(bytes _serializedTransaction) public view returns(bool) { | |
address conditionalDest; | |
assembly { | |
conditionalDest := mload(add(_serializedTransaction, 320)) | |
} | |
if (conditionalDest == 0x0) { //no conditional address set = no need to check | |
return true; | |
} | |
bytes memory conditionalCallData = getCallData(_serializedTransaction, 384); | |
return callWithData(conditionalDest, conditionalCallData) == 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment