The IProtocolToken interface contains the minimal set of functions that must be implemented in order for an ERC721 token to be compatible with the protocol.
The token must also override the _beforeTokenTransfer function and add a call to the checkAllRules hook defined in the IProtocolTokenHandler interface (using the handler address set in the above functions).
Example:
Copy
Ask AI
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override { /// Rule Processor Module Check require(IProtocolTokenHandler(address(handler)).checkAllRules(balanceOf(from), balanceOf(to), from, to, _msgSender(), amount)); super._beforeTokenTransfer(from, to, amount); }
The protocol relies on ERC721 tokens inheriting ERC165 interface standard. If your token does not inherit ERC165 rules that rely on pricing may not function as intended.