Created
May 9, 2022 23:20
-
-
Save ilamanov/fd837cbdce426da96d61bbcd55da4a0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract OKPC is ERC721A { | |
address public metadataAddress; | |
function setMetadataAddress(address addr) external onlyOwner { | |
if (addr == address(0)) revert InvalidAddress(); | |
metadataAddress = addr; | |
emit MetadataAddressUpdated(addr); | |
} | |
function tokenURI(uint256 pcId) public view override returns (string memory) { | |
if (!_exists(pcId)) revert OKPCNotFound(); | |
return IOKPCMetadata(metadataAddress).tokenURI(pcId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment