// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts@4.4.0/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts@4.4.0/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts@4.4.0/access/Ownable.sol"; // ___________ .__ __ ____ __. // \__ ___/___ | | ____ _______/ |_ ____ | |/ _|____ ___.__. // | |_/ __ \| | _/ __ \ / ___/\ __\/ _ \ | <_/ __ < | | // | |\ ___/| |_\ ___/ \___ \ | | ( <_> ) | | \ ___/\___ | // |____| \___ >____/\___ >____ > |__| \____/ |____|__ \___ > ____| // \/ \/ \/ \/ \/\/ contract TelestoKey is ERC721, ERC721Enumerable, Ownable { string private _metadataDataURI="ipfs://QmYVoNsLLGFkzKMY1P9avv2o7wUVkSNUiXX9ArUYnE1Pw4/"; uint256 private _totalSupply = 3; constructor() ERC721("TelestoKey", "TELOKEY") {} function uri(uint256 tokenId) public view virtual returns (string memory) { return string( abi.encodePacked(_baseURI(), Strings.toString(tokenId),".json") ); } function tokenURI (uint256 tokenId) public override view virtual returns (string memory) { return string( abi.encodePacked(_baseURI(), Strings.toString(tokenId),".json") ); } function _baseURI() internal view override returns (string memory) { return _metadataDataURI; } function updateBaseURI(string memory URI) public onlyOwner { _metadataDataURI=URI; } function updateSupply(uint256 SUPPLY) public onlyOwner { _totalSupply=SUPPLY; } function decimals() pure public returns(uint8){ return 1; } function safeMint(address to,uint256 tokenId) public onlyOwner { _safeMint(to,tokenId); } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function totalSupply() public view override returns (uint256) { return _totalSupply; } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }