From ccfb2f575c32df56af7c1ea762925e316a73dda3 Mon Sep 17 00:00:00 2001 From: Andres Aiello Date: Wed, 21 Aug 2024 15:43:35 -0300 Subject: [PATCH] feat: Add setter to nft --- .../contracts/xp-nft/xpNFT.sol | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol b/packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol index d5729c0..ec5cfd6 100644 --- a/packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol +++ b/packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol @@ -65,6 +65,17 @@ contract ZetaXP is ERC721Upgradeable, OwnableUpgradeable { return "1.0.0"; } + // Internal function to set the signer address + function setSignerAddress(address signerAddress_) external onlyOwner { + if (signerAddress_ == address(0)) revert InvalidAddress(); + signerAddress = signerAddress_; + } + + // Set the base URI for tokens + function setBaseURI(string calldata _uri) external onlyOwner { + baseTokenURI = _uri; + } + // The following functions are overrides required by Solidity. function tokenURI(uint256 tokenId) public view override(ERC721Upgradeable) returns (string memory) { _requireMinted(tokenId); @@ -157,11 +168,6 @@ contract ZetaXP is ERC721Upgradeable, OwnableUpgradeable { emit NFTUpdated(owner, tokenId, updateData.tag); } - // Set the base URI for tokens - function setBaseURI(string calldata _uri) external onlyOwner { - baseTokenURI = _uri; - } - function _transfer(address from, address to, uint256 tokenId) internal override { revert TransferNotAllowed(); }