File tree 3 files changed +24
-4
lines changed
lib/go/contracts/internal/assets
3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ access(all) contract ExampleNFT: NonFungibleToken {
26
26
/// The standard paths for the collection are stored in the collection resource type
27
27
access (all) let MinterStoragePath : StoragePath
28
28
29
+ /// Event to show when an NFT is minted
30
+ access (all) event Minted (
31
+ type : String ,
32
+ id : UInt64 ,
33
+ uuid : UInt64 ,
34
+ minterAddress : Address ?,
35
+ minterUUID : UInt64 ,
36
+ name : String ,
37
+ description : String
38
+ )
39
+
29
40
/// We choose the name NFT here, but this type can have any name now
30
41
/// because the interface does not require it to have a specific name any more
31
42
access (all) resource NFT : NonFungibleToken .NFT {
@@ -396,6 +407,14 @@ access(all) contract ExampleNFT: NonFungibleToken {
396
407
metadata : metadata,
397
408
)
398
409
410
+ emit Minted (type : newNFT.getType ().identifier,
411
+ id : newNFT.id,
412
+ uuid : newNFT.uuid,
413
+ minterAddress : self .owner? .address,
414
+ minterUUID : self .uuid,
415
+ name : name,
416
+ description : description)
417
+
399
418
return <- newNFT
400
419
}
401
420
}
Original file line number Diff line number Diff line change 132
132
"mainnet" : {
133
133
"mainnet-nft" : [
134
134
" MetadataViews" ,
135
- " NonFungibleToken"
135
+ " NonFungibleToken" ,
136
+ " CrossVMMetadataViews"
136
137
]
137
138
}
138
139
}
You can’t perform that action at this time.
0 commit comments