-
-
Save kadenzipfel/a5d23fd9291c4d0dede4abbe13b92e72 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
contract Relayer { | |
mapping (bytes => bool) executed; | |
function relay(bytes _data) public { | |
// replay protection; do not call the same transaction twice | |
require(executed[_data] == 0, "Duplicate call"); | |
executed[_data] = true; | |
innerContract.call(bytes4(keccak256("execute(bytes)")), _data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment