tx · 38fps9uTha96RKEx23Zt9XdugwGiFHwQqRW9wwyewrsN

3MzWo7E8tghhwcfqLZg24SHkzwNwqPYughx:  -0.01000000 Waves

2022.03.18 09:17 [1969027] smart account 3MzWo7E8tghhwcfqLZg24SHkzwNwqPYughx > SELF 0.00000000 Waves

{ "type": 13, "id": "38fps9uTha96RKEx23Zt9XdugwGiFHwQqRW9wwyewrsN", "fee": 1000000, "feeAssetId": null, "timestamp": 1647584231864, "version": 2, "chainId": 84, "sender": "3MzWo7E8tghhwcfqLZg24SHkzwNwqPYughx", "senderPublicKey": "U3xmXuwXdeCeAJSQdhJaeqHPS5LPkxfxRfrAn9c2MQZ", "proofs": [ "3amZvu1eP5rEE7hUTh6VaUTns15Citr8o2epY7JWVLjSjsC6DwxGJHi5WeCWFGELkswAatkGyiTqJjxWQcGLkmB7" ], "script": "base64:AAIFAAAAAAAAAA4IAhIFCgMIAQgSAwoBCAAAABAAAAAABE5PTkUCAAAABG5vbmUBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAAPZ2V0S2V5SXRlbVByaWNlAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABGl0ZW0CAAAABl9wcmljZQEAAAARZ2V0VmFsdWVJdGVtUHJpY2UAAAABAAAABGl0ZW0JAQAAAA5nZXROdW1iZXJCeUtleQAAAAEJAQAAAA9nZ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wcm9vZnMAAAAAAAAAAAIFAAAACkNQdWJsaWNLZXkEAAAAAkFCAwMDAwMDBQAAAAJBMQUAAAACQjIHBgMFAAAAAkExBQAAAAJCMwcGAwUAAAACQTIFAAAAAkIxBwYDBQAAAAJBMgUAAAACQjMHBgMFAAAAAkEzBQAAAAJCMQcGAwUAAAACQTMFAAAAAkIyBwQAAAACQUMDAwMDAwMFAAAAAkExBQAAAAJDMgcGAwUAAAACQTEFAAAAAkMzBwYDBQAAAAJBMgUAAAACQzEHBgMFAAAAAkEyBQAAAAJDMwcGAwUAAAACQTMFAAAAAkMxBwYDBQAAAAJBMwUAAAACQzIHBAAAAAJCQwMDAwMDAwUAAAACQzEFAAAAAkIyBwYDBQAAAAJDMQUAAAACQjMHBgMFAAAAAkMyBQAAAAJCMQcGAwUAAAACQzIFAAAAAkIzBwYDBQAAAAJDMwUAAAACQjEHBgMFAAAAAkMzBQAAAAJCMgcEAAAAByRtYXRjaDAFAAAAAnR4AwMFAAAAAkFCBgUAAAACQUMGBQAAAAJCQ56u2G8=", "height": 1969027, "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 = "none"
5+
6+func b (c) = {
7+ let d = {
8+ let e = getInteger(this, c)
9+ if ($isInstanceOf(e, "Int"))
10+ then {
11+ let f = e
12+ f
13+ }
14+ else 0
15+ }
16+ d
17+ }
18+
19+
20+func g (c) = {
21+ let h = {
22+ let e = getString(this, c)
23+ if ($isInstanceOf(e, "String"))
24+ then {
25+ let f = e
26+ f
27+ }
28+ else a
29+ }
30+ h
31+ }
32+
33+
34+func i (j) = (j + "_price")
35+
36+
37+func k (j) = b(i(j))
38+
39+
40+func l (m,j) = (((j + "_") + m) + "_cnt")
41+
42+
43+func n (m,j) = b(l(m, j))
44+
45+
46+func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
47+
48+
49+func r (j) = (j + "_data")
50+
51+
52+func s (j) = (j + "_owner")
53+
54+
55+func t (j) = g(s(j))
56+
57+
58+func u (v) = (v + "_balance")
59+
60+
61+func w (v) = b(u(v))
62+
63+
64+let x = base58'U3xmXuwXdeCeAJSQdhJaeqHPS5LPkxfxRfrAn9c2MQZ'
65+
66+let y = base58'5FjFLEkXW5LRE1NFTJBTus2TxvCbmvw9mgnnDwhkfvpJ'
67+
68+let z = base58'8DASziFWXkcTr7ZfP7Etr9y4iFWD3iNCmA9SgjfRmTZ4'
69+
70+@Callable(A)
71+func addItem (q,B,C) = {
72+ let D = toBase58String(A.caller.bytes)
73+ let j = o(D, q)
74+ if ((0 >= B))
75+ then throw("purchase amount cannot be less than item price")
76+ else if ((t(j) != a))
77+ then throw("an item is already exist")
78+ else $Tuple2([StringEntry(s(j), D), IntegerEntry(i(j), B), StringEntry(r(j), C)], unit)
79+ }
80+
81+
82+
83+@Callable(A)
84+func purchase (j) = {
85+ let E = A.payments[0]
86+ if (isDefined(E.assetId))
87+ then throw("can use WAVES only at the moment")
88+ else {
89+ let F = toBase58String(A.caller.bytes)
90+ let B = k(j)
91+ let D = t(j)
92+ if ((B > E.amount))
93+ then throw("purchase amount cannot be less than item price")
94+ else if ((E.amount > B))
95+ then throw("purchase amount cannot be higher than item price")
96+ else if ((D == a))
97+ then throw("supplier does not exist")
98+ else $Tuple2([IntegerEntry(l(F, j), (n(F, j) + 1)), IntegerEntry(u(D), (w(D) + E.amount))], unit)
99+ }
100+ }
101+
102+
103+@Verifier(G)
104+func H () = {
105+ let I = sigVerify(G.bodyBytes, G.proofs[0], x)
106+ let J = sigVerify(G.bodyBytes, G.proofs[1], x)
107+ let K = sigVerify(G.bodyBytes, G.proofs[2], x)
108+ let L = sigVerify(G.bodyBytes, G.proofs[0], y)
109+ let M = sigVerify(G.bodyBytes, G.proofs[1], y)
110+ let N = sigVerify(G.bodyBytes, G.proofs[2], y)
111+ let O = sigVerify(G.bodyBytes, G.proofs[0], z)
112+ let P = sigVerify(G.bodyBytes, G.proofs[1], z)
113+ let Q = sigVerify(G.bodyBytes, G.proofs[2], z)
114+ let R = if (if (if (if (if (if (I)
115+ then M
116+ else false)
117+ then true
118+ else if (I)
119+ then N
120+ else false)
121+ then true
122+ else if (J)
123+ then L
124+ else false)
125+ then true
126+ else if (J)
127+ then N
128+ else false)
129+ then true
130+ else if (K)
131+ then L
132+ else false)
133+ then true
134+ else if (K)
135+ then M
136+ else false
137+ let S = if (if (if (if (if (if (I)
138+ then P
139+ else false)
140+ then true
141+ else if (I)
142+ then Q
143+ else false)
144+ then true
145+ else if (J)
146+ then O
147+ else false)
148+ then true
149+ else if (J)
150+ then Q
151+ else false)
152+ then true
153+ else if (K)
154+ then O
155+ else false)
156+ then true
157+ else if (K)
158+ then P
159+ else false
160+ let T = if (if (if (if (if (if (O)
161+ then M
162+ else false)
163+ then true
164+ else if (O)
165+ then N
166+ else false)
167+ then true
168+ else if (P)
169+ then L
170+ else false)
171+ then true
172+ else if (P)
173+ then N
174+ else false)
175+ then true
176+ else if (Q)
177+ then L
178+ else false)
179+ then true
180+ else if (Q)
181+ then M
182+ else false
183+ let e = G
184+ if (if (R)
185+ then true
186+ else S)
187+ then true
188+ else T
189+ }
190+

github/deemru/w8io/026f985 
17.28 ms