tx · 4YX7ATwRW1hMtbgJGXHdBRnrWdQLBpnwWnjeRyQccXvu

3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K:  -0.01000000 Waves

2023.04.10 22:51 [2528932] smart account 3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K > SELF 0.00000000 Waves

{ "type": 13, "id": "4YX7ATwRW1hMtbgJGXHdBRnrWdQLBpnwWnjeRyQccXvu", "fee": 1000000, "feeAssetId": null, "timestamp": 1681156312867, "version": 2, "chainId": 84, "sender": "3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K", "senderPublicKey": "EmiaRZ1fThYPQZXyrxxNVY94jfkr3cMCNJyk2GJZ768L", "proofs": [ "66NcK16SZbJmJGFpd2NpnVnQDkzGVbuiBgHkNmNqHnA8RBt86kXkAyDdSM1BnCdkAVYFAKQqruxtr7quHPxCsR4R" ], "script": "base64:BgIHCAISAwoBCAMADnRvdGFsTWludGVkS2V5Ag50b3RhbE1pbnRlZEtleQEVdHJ5R2V0SW50ZWdlckV4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAmggCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDXRyeUdldEludGVnZXIBA2tleQkBFXRyeUdldEludGVnZXJFeHRlcm5hbAIFBHRoaXMFA2tleQEBaQEHbWludE5GVAENaXBmc0ltYWdlSGFzaAQDcG10AwkAAAIJAJADAQgFAWkIcGF5bWVudHMAAQkAkQMCCAUBaQhwYXltZW50cwAACQACAQIeUG9yIGZhdm9yLCBjaGVxdWUgbyBwYWdhbWVudG8hAwkBCWlzRGVmaW5lZAEIBQNwbXQHYXNzZXRJZAkAAgECFFBvciBmYXZvciwgc8OzIHdhdmVzAwkAZgIAAggFA3BtdAZhbW91bnQJAAIBAilQb3IgZmF2b3IsIHBlbG8gbWVub3MgMiB1bmlkYWRlcyBkZSB3YXZlcwQJcmVjaXBpZW50CAUBaQZjYWxsZXIEDGFtb3VudE1pbnRlZAkAZAIJAQ10cnlHZXRJbnRlZ2VyAQUOdG90YWxNaW50ZWRLZXkAAQQFYXNzZXQJAMIIBQkArAICAgdKVi1ORlQtCQCkAwEFDGFtb3VudE1pbnRlZAIPTkZUIGRvIHPDrW1ib2xvAAEAAAcEB2Fzc2V0SWQJALgIAQUFYXNzZXQJAMwIAgUFYXNzZXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkA2AQBBQdhc3NldElkBQ1pcGZzSW1hZ2VIYXNoCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ50b3RhbE1pbnRlZEtleQUMYW1vdW50TWludGVkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudAABBQdhc3NldElkBQNuaWwAocZSRw==", "height": 2528932, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KcCmKYcV43mdcBrU8XAbEf2GvSnX3rGwFVrJCWKJYCb Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let totalMintedKey = "totalMintedKey"
55
66 func tryGetIntegerExternal (address,key) = match getInteger(address, key) {
77 case b: Int =>
88 b
99 case _ =>
1010 0
1111 }
1212
1313
1414 func tryGetInteger (key) = tryGetIntegerExternal(this, key)
1515
1616
1717 @Callable(i)
1818 func mintNFT (ipfsImageHash) = {
1919 let pmt = if ((size(i.payments) == 1))
2020 then i.payments[0]
2121 else throw("Por favor, cheque o pagamento!")
2222 if (isDefined(pmt.assetId))
2323 then throw("Por favor, só waves")
2424 else if ((2 > pmt.amount))
2525 then throw("Por favor, pelo menos 2 unidades de waves")
2626 else {
2727 let recipient = i.caller
2828 let amountMinted = (tryGetInteger(totalMintedKey) + 1)
2929 let asset = Issue(("JV-NFT-" + toString(amountMinted)), "NFT do símbolo", 1, 0, false)
3030 let assetId = calculateAssetId(asset)
3131 [asset, StringEntry(toBase58String(assetId), ipfsImageHash), IntegerEntry(totalMintedKey, amountMinted), ScriptTransfer(recipient, 1, assetId)]
3232 }
3333 }
3434
3535

github/deemru/w8io/026f985 
30.02 ms