Skip to content

Commit

Permalink
feat: Add setter to nft (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello authored Aug 21, 2024
1 parent ac82253 commit 5c10081
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/zevm-app-contracts/contracts/xp-nft/xpNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 5c10081

Please sign in to comment.