tx · GYMPrUygr1fgojneq5Lc7JFS2f19ZhEXxWNzfp1FCrZk

3MyABRbZe7rU1YAxiXQ3yXAqE2ghuJygfYL:  -0.01000000 Waves

2022.03.05 15:45 [1950679] smart account 3MyABRbZe7rU1YAxiXQ3yXAqE2ghuJygfYL > SELF 0.00000000 Waves

{ "type": 13, "id": "GYMPrUygr1fgojneq5Lc7JFS2f19ZhEXxWNzfp1FCrZk", "fee": 1000000, "feeAssetId": null, "timestamp": 1646484337161, "version": 2, "chainId": 84, "sender": "3MyABRbZe7rU1YAxiXQ3yXAqE2ghuJygfYL", "senderPublicKey": "Ca9neMzCqZ7i7Pb8SwTd272Ys4f6jps97HaZzLNRvDnN", "proofs": [ "5MiD4k2d8fsDY36tPM8afRoN1AWwjML2ttAe1XhAnwzEfUqvDA5rdUwZ8HuwtFNq7kPchJK2Dt3wNExEyT9wX43J" ], "script": "base64:AAIFAAAAAAAAAAkIAhIFCgMICAgAAAAGAAAAABFjZXJ0U3RhdHVzUmV2b2tlZAIAAAAHUkVWT0tFRAAAAAAQY2VydFN0YXR1c0FjdGl2ZQIAAAAGQUNUSVZFAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAAA10cnlHZXROZnRJbmZvAAAAAQAAAAdhc3NldElkBAAAAAF4BAAAAAckbWF0Y2gwCQAD7AAAAAEFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAgFAAAABWFzc2V0AAAACHF1YW50aXR5CQAAAgAAAAECAAAADkludmFsaWQgTkZUIGlkBQAAAAF4AQAAABFkb2VzQWRkcmVzc093bk5mdAAAAAIAAAAHYXNzZXRJZAAAAAdhZGRyZXNzAwkBAAAAAiE9AAAAAgkAA/AAAAACCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAA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AAAAGX25mdElkBQAAAAVuZnRJZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAGX293bmVyBQAAAAhuZnRPd25lcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAHX2FydGlzdAUAAAANYXJ0aXN0QWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFY2VydF8FAAAABmNlcnRJZAIAAAAHX3N0YXR1cwUAAAAQY2VydFN0YXR1c0FjdGl2ZQUAAAADbmlsCQAETgAAAAIFAAAACnJldm9rZURhdGEFAAAACmNyZWF0ZURhdGEJAAACAAAAAQkAASwAAAACAgAAABdUaGUgTkZUIGlzbid0IG93bmVkIGJ5IAUAAAAIbmZ0T3duZXIAAAAAnCPX7w==", "height": 1950679, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none 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/026f985 
24.67 ms