Skip to content

Commit

Permalink
update init utility functions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJonaseb11 committed Jun 3, 2024
1 parent db5ae1e commit 85996dd
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions smart_contract/contracts/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,38 @@ contract NFTMintDN404 is DN404, ERC20Permit, Ownable {
return _symbol;
}

// initialize tokenURI functionality - token metadata
function tokenURI(uint256 tokenId) public view override returns(string memory result) {
if (bytes(_baseURI).length != 0) {
result = string(abi.encodePacked(_baseURI, LibString.toString(tokenId));
}
}

// initialize allowlist mamagement functionality
function setAllowlist(bytes32 allowlistRoot_) public onlyOwner {
allowlistRoot = allowlistRoot_;
}

// initialize utility functions
function nftTotalSupply() public view returns(uint256) {
return _totalNFTSupply;
}

function nftBalanceOf(address owner) public view returns(uint256) {
return _balanceOfNFT(owner);
}

function previewNextTokenId() public view returns(uint256) {
return _nextTokenId;
}

function getURI() public view returns(string memory) {
return _baseURI;
}







Expand Down

0 comments on commit 85996dd

Please sign in to comment.