mirror of
https://github.com/rjNemo/epicNFT
synced 2026-06-12 12:46:39 +00:00
send minted nft event
This commit is contained in:
parent
25f0e40cc8
commit
30938ddb57
1 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ contract EpicNFT is ERC721URIStorage {
|
||||||
using Counters for Counters.Counter;
|
using Counters for Counters.Counter;
|
||||||
Counters.Counter private _tokenIds;
|
Counters.Counter private _tokenIds;
|
||||||
|
|
||||||
|
event NewEpicNFTMinted(address sender, uint256 tokenID);
|
||||||
|
|
||||||
constructor() ERC721("SquareNFT", "SQUARE") {
|
constructor() ERC721("SquareNFT", "SQUARE") {
|
||||||
console.log("My first NFT contract! EPIC!!!");
|
console.log("My first NFT contract! EPIC!!!");
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +124,7 @@ contract EpicNFT is ERC721URIStorage {
|
||||||
_setTokenURI(tokenID, tokenUri);
|
_setTokenURI(tokenID, tokenUri);
|
||||||
console.log("NFT %s minted to %s", tokenID, msg.sender);
|
console.log("NFT %s minted to %s", tokenID, msg.sender);
|
||||||
_tokenIds.increment();
|
_tokenIds.increment();
|
||||||
|
emit NewEpicNFTMinted(msg.sender, tokenID);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pickRandomWord(
|
function pickRandomWord(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue