Skip to content
ihategas.xyz

Interface ID

Runs offline

Calculate an ERC-165 interface identifier.

one per line, no argument names
Interface IDERC-165
0x80ac58cd

9 selectors XORed

  • 0x70a08231balanceOf(address)
  • 0x6352211eownerOf(uint256)
  • 0x42842e0esafeTransferFrom(address,address,uint256)
  • 0xb88d4fdesafeTransferFrom(address,address,uint256,bytes)
  • 0x23b872ddtransferFrom(address,address,uint256)
  • 0x095ea7b3approve(address,uint256)
  • 0xa22cb465setApprovalForAll(address,bool)
  • 0x081812fcgetApproved(uint256)
  • 0xe985e9c5isApprovedForAll(address,address)
The default above is ERC-721, which should give 0x80ac58cd. Order does not matter — XOR is commutative — but every function in the interface must be present.

About interface id

ERC-165 lets a contract answer whether it implements a given interface, and the identifier for that interface is simply every function selector in it XORed together. ERC-721 comes out as 0x80ac58cd, ERC-1155 as 0xd9b67a26. Order does not matter because XOR is commutative, but completeness does — miss one function and the identifier is wrong.

More developer tools