Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosecki123/efd4138fbca88c4492d372e30254c834 to your computer and use it in GitHub Desktop.
Save kosecki123/efd4138fbca88c4492d372e30254c834 to your computer and use it in GitHub Desktop.
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