Created
March 28, 2021 23:42
-
-
Save Filip3Dev/9d32f54f35719f3b748c36ba75a4833a to your computer and use it in GitHub Desktop.
Revisions
-
Filip3Dev created this gist
Mar 28, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ pragma solidity 0.8.0; import "https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-metadata.sol"; import "https://github.com/0xcert/ethereum-erc721/src/contracts/ownership/ownable.sol"; contract Asgard is NFTokenMetadata, Ownable { uint256 private count = 0; mapping(address => uint256) tokens; constructor() { nftName = "Asgard Market"; nftSymbol = "ASG"; } function getCount() public view returns (uint256){ return count; } function mint( address _to, string calldata _uri) external onlyOwner { uint256 tokenId = count+1; tokens[_to] = tokenId; count = tokenId; super._mint(_to, tokenId); super._setTokenUri(tokenId, _uri); } }