tx · 3YiU9BnPdNzW4Ho1Kyrm4UcAiRCEPLT9pv4A2jKmZXnr

3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K:  -0.01000000 Waves

2023.04.10 02:17 [2527693] smart account 3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K > SELF 0.00000000 Waves

{ "type": 13, "id": "3YiU9BnPdNzW4Ho1Kyrm4UcAiRCEPLT9pv4A2jKmZXnr", "fee": 1000000, "feeAssetId": null, "timestamp": 1681082264049, "version": 2, "chainId": 84, "sender": "3N1Qtfgygwf49ZA37QSYgttS65GrhwP2G1K", "senderPublicKey": "EmiaRZ1fThYPQZXyrxxNVY94jfkr3cMCNJyk2GJZ768L", "proofs": [ "5b6tLXRGNKyT2XfMncL47BAnfQ3ySTxsGCBPDSryLWdRBaovm4jFcmueq5KosDVx16jYDnjCyELdSmPAHiLFWf8R" ], "script": "base64:BgIHCAISAwoBCAMADnRvdGFsTWludGVkS2V5Ag50b3RhbE1pbnRlZEtleQEVdHJ5R2V0SW50ZWdlckV4dGVybmFsAgdhZGRyZXNzA2tleQQHJG1hdGNoMAkAmggCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDXRyeUdldEludGVnZXIBA2tleQkBFXRyeUdldEludGVnZXJFeHRlcm5hbAIFBHRoaXMFA2tleQEBaQEHbWludE5GVAENaXBmc0ltYWdlSGFzaAQDcG10AwkAAAIJAJADAQgFAWkIcGF5bWVudHMAAQkAkQMCCAUBaQhwYXltZW50cwAACQACAQIeUG9yIGZhdm9yLCBjaGVxdWUgbyBwYWdhbWVudG8hAwkBCWlzRGVmaW5lZAEIBQNwbXQHYXNzZXRJZAkAAgECFFBvciBmYXZvciwgc8OzIHdhdmVzAwkAZgIAAggFA3BtdAZhbW91bnQJAAIBAilQb3IgZmF2b3IsIHBlbG8gbWVub3MgMiB1bmlkYWRlcyBkZSB3YXZlcwQJcmVjaXBpZW50CAUBaQZjYWxsZXIEDGFtb3VudE1pbnRlZAkAZAIJAQ10cnlHZXRJbnRlZ2VyAQUOdG90YWxNaW50ZWRLZXkAAQQFYXNzZXQJAMIIBQkArAICAgdKVi1ORlQtCQCkAwEFDGFtb3VudE1pbnRlZAIPTkZUIGRvIHPDrW1ib2xvAAEAAAcEB2Fzc2V0SWQJALgIAQUFYXNzZXQJAMwIAgUFYXNzZXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQDYBAEFB2Fzc2V0SWQCBV9pcGZzBQ1pcGZzSW1hZ2VIYXNoCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ50b3RhbE1pbnRlZEtleQUMYW1vdW50TWludGVkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudAABBQdhc3NldElkBQNuaWwAMYQEiw==", "height": 2527693, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HdZo8EowK54MQJKT7m5btAKF8p1ErPNMBVZF5XE6sPj6 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let totalMintedKey = "totalMintedKey"
5+
6+func tryGetIntegerExternal (address,key) = match getInteger(address, key) {
7+ case b: Int =>
8+ b
9+ case _ =>
10+ 0
11+}
12+
13+
14+func tryGetInteger (key) = tryGetIntegerExternal(this, key)
15+
16+
17+@Callable(i)
18+func mintNFT (ipfsImageHash) = {
19+ let pmt = if ((size(i.payments) == 1))
20+ then i.payments[0]
21+ else throw("Por favor, cheque o pagamento!")
22+ if (isDefined(pmt.assetId))
23+ then throw("Por favor, só waves")
24+ else if ((2 > pmt.amount))
25+ then throw("Por favor, pelo menos 2 unidades de waves")
26+ else {
27+ let recipient = i.caller
28+ let amountMinted = (tryGetInteger(totalMintedKey) + 1)
29+ let asset = Issue(("JV-NFT-" + toString(amountMinted)), "NFT do símbolo", 1, 0, false)
30+ let assetId = calculateAssetId(asset)
31+[asset, StringEntry((toBase58String(assetId) + "_ipfs"), ipfsImageHash), IntegerEntry(totalMintedKey, amountMinted), ScriptTransfer(recipient, 1, assetId)]
32+ }
33+ }
34+
35+

github/deemru/w8io/026f985 
16.04 ms