Created
July 16, 2015 11:36
-
-
Save simondlr/b74e40039e570747b6e2 to your computer and use it in GitHub Desktop.
Generic Code
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 Generic is owned { | |
function() { | |
if(functions[msg.sig] != 0x0) { | |
functions[msg.sig].callcode(msg.data); | |
} | |
} | |
function changeMapping(bytes4 _functionSignature, address _addrOfFunction) { | |
if(msg.sender == owner) { | |
functions[_functionSignature] = _addrOfFunction; | |
} | |
} | |
mapping (bytes4 => address) functions; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment