tx · 6AcPVQK7EQauiUkXrJ5Pe4KqHVrkUg6g72DbhAAawUv5

3N7DTuzCPHKTKeB43pGc7my7J7mZwobNgcu:  -0.01000000 Waves

2022.03.05 15:46 [1950680] smart account 3N7DTuzCPHKTKeB43pGc7my7J7mZwobNgcu > SELF 0.00000000 Waves

{ "type": 13, "id": "6AcPVQK7EQauiUkXrJ5Pe4KqHVrkUg6g72DbhAAawUv5", "fee": 1000000, "feeAssetId": null, "timestamp": 1646484363498, "version": 2, "chainId": 84, "sender": "3N7DTuzCPHKTKeB43pGc7my7J7mZwobNgcu", "senderPublicKey": "3i5skBB15jhib9f9ZfNAEsC1W2r5bgB9qDHxpUvpXjij", "proofs": [ "3ZsNhGzuptX5YfadhRJFfopg2PCQRjo2gsB4CLfpLPUCZPuR1CDwowgkzbutmQjuYVFrZs71LVE55xph1vmRYUtK" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgUKAwgICBIHCgUICAgICAAAAA0BAAAADWtleUNvbGxlY3Rpb24AAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAAAxjb2xsZWN0aW9uSWQCAAAAAV8FAAAABmNhbGxlcgEAAAAaa2V5U3ViY29sbGVjdGlvbkNvbGxlY3Rpb24AAAADAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQAAAAKY29sbGVjdGlvbgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAGXN1YmNvbGxlY3Rpb25fY29sbGVjdGlvbl8FAAAADGNvbGxlY3Rpb25JZAIAAAABXwUAAAAGY2FsbGVyAgAAAAFfBQAAAApjb2xsZWN0aW9uAQAAAAlrZXlPblNhbGUAAAACAAAABmNhbGxlcgAAAAxjb2xsZWN0aW9uSWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAC2FydF9vbnNhbGVfBQAAAAxjb2xsZWN0a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ROAAAAAgUAAAANZGVsZXRlRW50cmllcwkBAAAAC2NvbGxlY3Rpb25zAAAABQUAAAAFYXJ0SWQFAAAAAWkFAAAACmNvbGxlY3Rpb24FAAAADXN1YmNvbGxlY3Rpb24FAAAABmNhbGxlcgAAAADHyU+B", "height": 1950680, "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+func a (b,c) = ((("collection_" + c) + "_") + b)
5+
6+
7+func d (b,c,e) = ((((("subcollection_collection_" + c) + "_") + b) + "_") + e)
8+
9+
10+func f (b,c) = ((("art_onsale_" + c) + "_") + b)
11+
12+
13+let g = "sconexDapp"
14+
15+let h = "oracleKey"
16+
17+func i (j) = {
18+ let k = getString(this, j)
19+ if ($isInstanceOf(k, "String"))
20+ then {
21+ let l = k
22+ l
23+ }
24+ else ""
25+ }
26+
27+
28+let m = i(h)
29+
30+let n = valueOrErrorMessage(addressFromString(m), "Collections dapp doesnt have oracle defined")
31+
32+let o = getStringValue(n, g)
33+
34+func p (j) = valueOrElse(getBoolean(addressFromStringValue(o), j), false)
35+
36+
37+func q (r) = if ((r == addressFromString(o)))
38+ then true
39+ else throw("Only the sconex dapp can invoke this")
40+
41+
42+func s (t,j) = valueOrElse(getString(t, j), "")
43+
44+
45+func u (c,v,e,w,x) = if ((e == ""))
46+ then throw("Collections can not be empty!")
47+ else if ((w == ""))
48+ then [StringEntry(a(x, c), e)]
49+ else [StringEntry(a(x, c), e), StringEntry(d(x, c, e), w)]
50+
51+
52+@Callable(v)
53+func initDapp (y) = if ((v.caller != this))
54+ then throw("You cannot do this action")
55+ else if ((m != ""))
56+ then throw("oracle already set, you can't override!")
57+ else [StringEntry(h, y)]
58+
59+
60+
61+@Callable(v)
62+func collectionProcess (e,w,x) = if (if (q(v.caller))
63+ then true
64+ else (v.caller == this))
65+ then $Tuple2(u(toBase58String(v.transactionId), v, e, w, x), toBase58String(v.transactionId))
66+ else throw("Wrong invoker")
67+
68+
69+
70+@Callable(v)
71+func updateCollection (z,A,B,e,w) = {
72+ let b = toBase58String(v.caller.bytes)
73+ let C = f(B, b)
74+ if (p(C))
75+ then throw("Can not update collection from artwork for sale")
76+ else {
77+ let D = if (if ((z != e))
78+ then true
79+ else (A != w))
80+ then [DeleteEntry(d(b, B, e))]
81+ else nil
82+ (D ++ u(B, v, e, w, b))
83+ }
84+ }
85+
86+

github/deemru/w8io/026f985 
16.08 ms