Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions CallistoNFT_my.sol
Original file line number Diff line number Diff line change
Expand Up @@ -666,31 +666,31 @@ abstract contract EnumerableNFT is CallistoNFT, IEnumerableNFT {
contract NFT is EnumerableNFT, Ownable {
using Strings for uint256;

uint256 public cost = 0.05 ether;
uint256 public maxSupply = 1000;
uint256 public fees = 1000;
bool public paused = false;

constructor(
string memory _name,
string memory _symbol
) CallistoNFT(_name, _symbol, fees) {}
string memory _symbol,
uint256 _fees
) CallistoNFT(_name, _symbol, _fees) {}


// public
function mint(string memory tURI) public payable onlyOwner {
uint256 supply = totalSupply();
require(!paused, "Mint NFT is paused");
require(supply <= maxSupply);

//require(msg.sender == owner(), "Mint NFT only owner");
require(supply < maxSupply);

_safeMint(msg.sender, supply + 1, tURI);

}

function tokenURI(uint256 tURI) public view returns (string memory){
return _tokenURI[tURI];
function tokenURI(uint256 tokenId) public view returns (string memory){
return _tokenURI[tokenId];
}

function setTokenURI(uint256 tokenId, string memory tURI) public onlyOwner {
_tokenURI[tokenId] = tURI;
}

function walletOfOwner(address _owner)
Expand All @@ -706,8 +706,6 @@ contract NFT is EnumerableNFT, Ownable {
return tokenIds;
}

//only owner

function pause(bool _state) public onlyOwner {
paused = _state;
}
Expand Down