Skip to content

Commit

Permalink
added isTradeable property to nft
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed Feb 27, 2024
1 parent 3ebe480 commit 5bf40bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/foundry/contracts/ATXDAOPartnershipNft.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -24,6 +27,7 @@ abstract contract ATXDAOPartnershipNft is ERC721URIStorage, AccessControl {
}

mintUri = newMintUri;
s_isTradeable = isTradeable;
}

function _checkAuthorized(
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 5bf40bf

Please sign in to comment.