Skip to content

Instantly share code, notes, and snippets.

@axic
Created March 17, 2017 15:54
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 axic/5d42693fab09acfa2fdd977f38805833 to your computer and use it in GitHub Desktop.
Save axic/5d42693fab09acfa2fdd977f38805833 to your computer and use it in GitHub Desktop.
contract ERC165 {
function interfaceID() constant returns (uint)
{
bytes4[] sigs = type(this).signatures;
uint mask = 0;
for (var i = 0; i < sigs.length; i++)
mask ^= uint(sigs[i]);
return mask;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment