Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generic Code
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