public async Task LoadNFTFromNetwork() { if (!string.IsNullOrEmpty(Utxo)) { Loading = true; if (Utxo.Contains(':')) { NFT = await NFTFactory.GetNFT("", Utxo.Split(':')[0], wait : true); } else { NFT = await NFTFactory.GetNFT("", Utxo, wait : true); } if (NFT != null) { if (nftCard != null) { nftCard.LoadNFT(NFT); } } else { NFT = new ImageNFT(""); } Loading = false; } StateHasChanged(); }
private static async Task MintNFT() { Console.WriteLine("Minting NFT"); // create NFT object var nft = new ImageNFT(""); Console.WriteLine("Fill name:"); var data = Console.ReadLine(); if (!string.IsNullOrEmpty(data)) { nft.Name = data; } else { nft.Name = "My First NFT"; } Console.WriteLine("Fill Author:"); data = Console.ReadLine(); if (!string.IsNullOrEmpty(data)) { nft.Author = data; } else { nft.Author = "fyziktom"; } Console.WriteLine("Fill Description:"); data = Console.ReadLine(); if (!string.IsNullOrEmpty(data)) { nft.Description = data; } else { nft.Description = "This was created with VEDriversLite"; } Console.WriteLine("Fill Link:"); data = Console.ReadLine(); if (!string.IsNullOrEmpty(data)) { nft.Link = data; } else { nft.Link = "https://veframework.com/"; } Console.WriteLine("Fill Image Link:"); data = Console.ReadLine(); if (!string.IsNullOrEmpty(data)) { nft.ImageLink = data; } else { nft.ImageLink = "https://gateway.ipfs.io/ipfs/QmWTkVqaWn1ABZ1UMKL91pxxspzXW6yodJ9bjUn6nPLeHX"; } // send 10 VENFT to receiver with connected metadata var res = await account.MintNFT(nft); // or multimint with 5 coppies (mint 1 + 5); // var res = await account.MintMultiNFT(NFTHelpers.TokenId, nft, 5); Console.WriteLine("New TxId hash is: "); Console.WriteLine(res); }