feat: add function signature to remove token controllers on transfer functions
This commit is contained in:
parent
07ad6b672a
commit
9cf5a5ad9e
|
|
@ -145,6 +145,35 @@ contract FleekERC721 is ERC721, FleekAccessControl {
|
|||
return super.supportsInterface(interfaceId);
|
||||
}
|
||||
|
||||
function transferFrom(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
) public virtual override {
|
||||
super.transferFrom(from, to, tokenId);
|
||||
_clearTokenControllers(tokenId);
|
||||
}
|
||||
|
||||
function safeTransferFrom(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
) public virtual override {
|
||||
super.safeTransferFrom(from, to, tokenId, "");
|
||||
_clearTokenControllers(tokenId);
|
||||
}
|
||||
|
||||
function safeTransferFrom(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId,
|
||||
bytes memory data
|
||||
) public virtual override {
|
||||
super._safeTransfer(from, to, tokenId, data);
|
||||
_clearTokenControllers(tokenId);
|
||||
}
|
||||
|
||||
|
||||
function _baseURI() internal view virtual override returns (string memory) {
|
||||
return "data:application/json;base64,";
|
||||
}
|
||||
|
|
@ -218,4 +247,10 @@ contract FleekERC721 is ERC721, FleekAccessControl {
|
|||
delete _apps[tokenId];
|
||||
}
|
||||
}
|
||||
|
||||
function _clearTokenControllers(
|
||||
uint256 tokenId
|
||||
) internal {
|
||||
// TODO: Remove token controllers from AccessControl
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue