-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Description
Out of a gitter conversation there came an idea of looking up authorization_table[msg.sig][msg.caller]
. For setting up such a table, it would be convenient to have function signature literals signature_hash(f(void))
that represents the signature hash.
contract C {
mapping (bytes4 => mapping (address => bool)) authorization_table;
modifier auth() {
if (!authorization_table[msg.sig][msg.caller]) throw;
_;
}
function interface() auth;
function allow_interface(address _somebody) auth {
authorization_table[signature_hash(interface(void))][_somebody] = true;
}
}
Metadata
Metadata
Assignees
Labels
No labels