tx · 5fgFeiytuhktSbJ3t2nwZiv7TFTKBgvcgAi1o2bFCKt2

3N1q2ieDU25PkmLZxFZrdGxETB1vWeLQo4y:  -0.01000000 Waves

2022.02.17 17:38 [1927748] smart account 3N1q2ieDU25PkmLZxFZrdGxETB1vWeLQo4y > SELF 0.00000000 Waves

{ "type": 13, "id": "5fgFeiytuhktSbJ3t2nwZiv7TFTKBgvcgAi1o2bFCKt2", "fee": 1000000, "feeAssetId": null, "timestamp": 1645108761104, "version": 2, "chainId": 84, "sender": "3N1q2ieDU25PkmLZxFZrdGxETB1vWeLQo4y", "senderPublicKey": "EgxqmjPExKP8GAbJQALcx5po8T3xyXNAKUPuvben5unh", "proofs": [ "4S9CKTAibvmohaJcvQTUYJoTrMEuBF5ePTQckPSaPRdhvZPsfrCeA7vJVYQptgtjDG8zCQ2pS95wh5zoiG9FZcC4" ], "script": "base64:AAIFAAAAAAAAAAkIAhIFCgMICAgAAAAGAAAAABFjZXJ0U3RhdHVzUmV2b2tlZAIAAAAHUkVWT0tFRAAAAAAQY2VydFN0YXR1c0FjdGl2ZQIAAAAGQUNUSVZFAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAAA10cnlHZXROZnRJbmZvAAAAAQAAAAdhc3NldElkBAAAAAF4BAAAAAckbWF0Y2gwCQAD7AAAAAEFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAgFAAAABWFzc2V0AAAACHF1YW50aXR5CQAAAgAAAAECAAAADkludmFsaWQgTkZUIGlkBQAAAAF4AQAAABFkb2VzQWRkcmVzc093bk5mdAAAAAIAAAAHYXNzZXRJZAAAAAdhZGRyZXNzAwkBAAAAAiE9AAAAAgkAA/AAAAACCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUA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X25mdElkBQAAAAVuZnRJZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAGX293bmVyBQAAAAhuZnRPd25lcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAHX2FydGlzdAUAAAANYXJ0aXN0QWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAHX3N0YXR1cwUAAAAQY2VydFN0YXR1c0FjdGl2ZQUAAAADbmlsCQAETgAAAAIFAAAACnJldm9rZURhdGEFAAAACmNyZWF0ZURhdGEJAAACAAAAAQkAASwAAAACAgAAABdUaGUgTkZUIGlzbid0IG93bmVkIGJ5IAUAAAAIbmZ0T3duZXIAAAAAnCPX7w==", "height": 1927748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9T7AzoNsvxmEAz51mhk7dtbKEVxkQ9NF45Sc8mR3etZb Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "REVOKED"
5+
6+let b = "ACTIVE"
7+
8+func c (d) = valueOrElse(getString(this, d), "")
9+
10+
11+func e (f) = {
12+ let g = {
13+ let h = assetInfo(f)
14+ if ($isInstanceOf(h, "Asset"))
15+ then {
16+ let i = h
17+ i.quantity
18+ }
19+ else throw("Invalid NFT id")
20+ }
21+ g
22+ }
23+
24+
25+func j (f,k) = if ((assetBalance(Address(fromBase58String(k)), f) != 1))
26+ then false
27+ else true
28+
29+
30+func l (m) = {
31+ let n = c(("cert_" + m))
32+ if ((n != ""))
33+ then [StringEntry((("cert_" + n) + "_status"), a)]
34+ else nil
35+ }
36+
37+
38+@Callable(o)
39+func createCert (p,m,q) = {
40+ let n = toBase58String(o.transactionId)
41+ let r = fromBase58String(m)
42+ let s = e(r)
43+ if ((s != 1))
44+ then throw("This is not an NFT!")
45+ else if (j(r, p))
46+ then {
47+ let t = l(m)
48+ let u = [StringEntry(("cert_" + m), n), StringEntry((("cert_" + n) + "_nftId"), m), StringEntry((("cert_" + n) + "_owner"), p), StringEntry((("cert_" + n) + "_artist"), q), StringEntry((("cert_" + n) + "_status"), b)]
49+ (t ++ u)
50+ }
51+ else throw(("The NFT isn't owned by " + p))
52+ }
53+
54+

github/deemru/w8io/169f3d6 
21.55 ms