From 5bf40bf4496e23368795eccb8e6e1c103c18ece0 Mon Sep 17 00:00:00 2001 From: Jacob Homanics Date: Tue, 27 Feb 2024 01:09:57 -0600 Subject: [PATCH] added isTradeable property to nft --- packages/foundry/contracts/ATXDAOPartnershipNft.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/foundry/contracts/ATXDAOPartnershipNft.sol b/packages/foundry/contracts/ATXDAOPartnershipNft.sol index f150bb6..c657a88 100644 --- a/packages/foundry/contracts/ATXDAOPartnershipNft.sol +++ b/packages/foundry/contracts/ATXDAOPartnershipNft.sol @@ -13,9 +13,12 @@ abstract contract ATXDAOPartnershipNft is ERC721URIStorage, AccessControl { string mintUri; uint256 mintCount; + bool s_isTradeable; + constructor( address[] memory admins, string memory newMintUri, + bool isTradeable, string memory name, string memory symbol ) ERC721(name, symbol) { @@ -24,6 +27,7 @@ abstract contract ATXDAOPartnershipNft is ERC721URIStorage, AccessControl { } mintUri = newMintUri; + s_isTradeable = isTradeable; } function _checkAuthorized( @@ -32,7 +36,7 @@ abstract contract ATXDAOPartnershipNft is ERC721URIStorage, AccessControl { uint256 tokenId ) internal view override { if (!hasRole(DEFAULT_ADMIN_ROLE, spender)) { - super._checkAuthorized(owner, spender, tokenId); + if (s_isTradeable) super._checkAuthorized(owner, spender, tokenId); } }