tx · 8VytVK5dwDaBeQxQLEvUXteFUEK9x1Dt8f4eDHNiF2ob

3MsnFBX1La8i9WoAQetZcPaiQTqC4giPUde:  -0.01000000 Waves

2022.05.31 16:07 [2075877] smart account 3MsnFBX1La8i9WoAQetZcPaiQTqC4giPUde > SELF 0.00000000 Waves

{ "type": 13, "id": "8VytVK5dwDaBeQxQLEvUXteFUEK9x1Dt8f4eDHNiF2ob", "fee": 1000000, "feeAssetId": null, "timestamp": 1654002477076, "version": 2, "chainId": 84, "sender": "3MsnFBX1La8i9WoAQetZcPaiQTqC4giPUde", "senderPublicKey": "9tg59aPk9dET4s3sb4NY1zWHGtSKE7maNNvYe8aDBxZn", "proofs": [ "Jwx15XuQi12BEoer4UnSDQNZWWwzknKPwJCgj5SCqoeDKX3SpttKWioMh2DrjSgfoPduEhESgRfgxVgwcuhGLKx" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAABAAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAACkJBU0VfUFJJQ0UAAAAAAAL68IAAAAAABFBMVVMAAAAAAAAPQkABAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAUAAAANUEFZTUVOVF9BU1NFVAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAIcHJpY2VLZXkCAAAACmxhc3RfcHJpY2UEAAAACmludGVnZXJWYWwJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAAIcHJpY2VLZXkFAAAACkJBU0VfUFJJQ0UEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAI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AAAACCQAEtgAAAAEJAAGRAAAAAgUAAAAIc3BsaXR0ZXIAAAAAAAAAAAEFAAAAAmlkBAAAAAZpc3N1ZXIJAARCAAAABQUAAAAHTkZUTkFNRQkAASwAAAACAgAAAAxQT0tFTU9OX05GVF8JAAGkAAAAAQUAAAACaWQAAAAAAAAAAAEAAAAAAAAAAAAHBAAAAAhuZXdQcmljZQkAAGQAAAACBQAAAAppbnRlZ2VyVmFsBQAAAARQTFVTBAAAAANpZGEJAAQ4AAAAAQUAAAAGaXNzdWVyCQAETAAAAAIFAAAABmlzc3VlcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAARORlRfCQABpAAAAAEFAAAAAmlkAgAAAAFfBQAAAAx3YWxsZXRTdHJpbmcJAAJYAAAAAQUAAAADaWRhCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAADaWRhCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAhwcmljZUtleQUAAAAIbmV3UHJpY2UFAAAAA25pbAkAAAIAAAABAgAAAB5hbHJlYWR5IG1pbnRlZCBieSBzb21lb25lIGVsc2UJAAACAAAAAQIAAAAeV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQuCQAAAgAAAAECAAAADG91dCBvZiByYW5nZQAAAABIkQi5", "height": 2075877, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7kcZB1etse27pmqEC4gPaLvyTEHCmPMmhH9FKc3z9TzR Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
5+
6+let b = 50000000
7+
8+let c = 1000000
9+
10+func d (e) = {
11+ let f = a
12+ if ((size(e.payments) == 0))
13+ then throw("Payment not attached")
14+ else {
15+ let g = e.payments[0]
16+ let h = "last_price"
17+ let i = valueOrElse(getInteger(this, h), b)
18+ let j = g.assetId
19+ if ($isInstanceOf(j, "ByteVector"))
20+ then {
21+ let k = j
22+ if ((k == a))
23+ then (g.amount == i)
24+ else false
25+ }
26+ else throw("Wrong payment asset or min amount 50 USDN")
27+ }
28+ }
29+
30+
31+@Callable(e)
32+func mintPokemon (l) = {
33+ let m = toBase58String(e.caller.bytes)
34+ let h = "last_price"
35+ let i = valueOrElse(getInteger(this, h), b)
36+ if (if ((l > 0))
37+ then true
38+ else (151 >= l))
39+ then if (d(e))
40+ then {
41+ let n = (((toString(l) + "_") + m) + "_NFT")
42+ let o = valueOrElse(getString(this, n), "none")
43+ let p = ((toString(l) + "_w_") + m)
44+ let q = ("POKEMON_NFT_" + toString(l))
45+ let r = split("_", o)
46+ if (if ((o == "none"))
47+ then true
48+ else (parseInt(r[1]) != l))
49+ then {
50+ let s = Issue(q, ("POKEMON_NFT_" + toString(l)), 1, 0, false)
51+ let t = (i + c)
52+ let u = calculateAssetId(s)
53+[s, StringEntry(((("NFT_" + toString(l)) + "_") + m), toBase58String(u)), ScriptTransfer(e.caller, 1, u), IntegerEntry(h, t)]
54+ }
55+ else throw("already minted by someone else")
56+ }
57+ else throw("Wrong payment amount or asset.")
58+ else throw("out of range")
59+ }
60+
61+

github/deemru/w8io/169f3d6 
33.02 ms