tx · Dzq9BuzM9jc7GSWJGnWnkJcRBM1TN2uAbSpobUJ4WesW

3N8w4A9nMSjzzByZP8ANnDTMPpiijiZVexP:  -0.01000000 Waves

2019.09.05 08:01 [662263] smart account 3N8w4A9nMSjzzByZP8ANnDTMPpiijiZVexP > SELF 0.00000000 Waves

{ "type": 13, "id": "Dzq9BuzM9jc7GSWJGnWnkJcRBM1TN2uAbSpobUJ4WesW", "fee": 1000000, "feeAssetId": null, "timestamp": 1567659748559, "version": 1, "sender": "3N8w4A9nMSjzzByZP8ANnDTMPpiijiZVexP", "senderPublicKey": "AaEnKgCfhPrHrUT1ExqJqRTBXoC1txUfnESrxJrLiEBY", "proofs": [ "3SKXjJMDPKZvapebeCVNYBaJP1KdGbEuSpfuYykRBQwBVfQqA3W7Tqgz5cigbtrKUi82hTVAybXfF6VQqafPEPeX" ], "script": "base64:AAIDAAAAAAAAAAAAAAAeAAAAAAtvd25lclB1YktleQEAAABBAZkWLznUd6IFdwagshj88MZgqRsgYkLqTh4N0ei+1lZPmw5tnh7y/g/7B+MZN3zq3Mc7iwEydIsASpVTzXihHpgAAAAABE5PTkUCAAAABG5vbmUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAZWT1RJTkcCAAAABnZvdGluZwAAAAAGUkVWRUFMAgAAAAZyZXZlYWwAAAAACEZFQVRVUkVEAgAAAAhmZWF0dXJlZAAAAAAIREVMSVNURUQCAAAACGRlbGlzdGVkAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRo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MAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAtvd25lclB1YktleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAC293bmVyUHViS2V5B2oB3jQ=", "chainId": 84, "height": 662263, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'9BNzoBpPncPuyfnnRMbhXipbhWyiYMQSV4NAnZYKM3jJFistMjd5qokz2VLaD1PynRXBhDKREFZCgBibyKF7CS4F'
5+
6+let b = "none"
7+
8+let c = 3
9+
10+let d = 2
11+
12+let e = "voting"
13+
14+let f = "reveal"
15+
16+let g = "featured"
17+
18+let h = "delisted"
19+
20+func i (j) = {
21+ let k = {
22+ let l = getInteger(this, j)
23+ if ($isInstanceOf(l, "Int"))
24+ then {
25+ let m = l
26+ m
27+ }
28+ else 0
29+ }
30+ k
31+ }
32+
33+
34+func n (j) = {
35+ let o = {
36+ let l = getString(this, j)
37+ if ($isInstanceOf(l, "String"))
38+ then {
39+ let m = l
40+ m
41+ }
42+ else b
43+ }
44+ o
45+ }
46+
47+
48+func p (q) = (q + "_price")
49+
50+
51+func r (q) = i(p(q))
52+
53+
54+func s (t,q) = (((q + "_") + t) + "_cnt")
55+
56+
57+func u (t,q) = i(s(t, q))
58+
59+
60+func v (w,x) = ("item_" + toBase58String(sha256(toBytes((w + x)))))
61+
62+
63+func y (q) = (q + "_data")
64+
65+
66+func z (q) = (q + "_owner")
67+
68+
69+func A (q) = n(z(q))
70+
71+
72+func B (C) = (C + "_balance")
73+
74+
75+func D (C) = i(B(C))
76+
77+
78+func E (q,t) = (((q + "_") + t) + "_commit")
79+
80+
81+func F (q,t) = n(E(q, t))
82+
83+
84+func G (q) = (q + "_commit")
85+
86+
87+func H (q) = i(G(q))
88+
89+
90+func I (q,t) = (((q + "_") + t) + "_reveal")
91+
92+
93+func J (q,t) = n(I(q, t))
94+
95+
96+func K (q) = (q + "_status")
97+
98+
99+func L (q) = n(K(q))
100+
101+
102+func M (q,N) = ((q + "_res") + N)
103+
104+
105+func O (q,N) = i(M(q, N))
106+
107+
108+@Callable(P)
109+func addItem (x,Q,R) = {
110+ let S = toBase58String(P.caller.bytes)
111+ let q = v(S, x)
112+ if ((0 >= Q))
113+ then throw("purchase amount cannot be less than item price")
114+ else if ((A(q) != b))
115+ then throw("an item is already exist")
116+ else WriteSet([DataEntry(z(q), S), DataEntry(p(q), Q), DataEntry(y(q), R)])
117+ }
118+
119+
120+
121+@Callable(P)
122+func purchase (q) = {
123+ let T = extract(P.payment)
124+ if (isDefined(T.assetId))
125+ then throw("can use WAVES only at the moment")
126+ else {
127+ let U = toBase58String(P.caller.bytes)
128+ let Q = r(q)
129+ let S = A(q)
130+ if ((Q > T.amount))
131+ then throw("purchase amount cannot be less than item price")
132+ else if ((T.amount > Q))
133+ then throw("purchase amount cannot be higher than item price")
134+ else if ((S == b))
135+ then throw("supplier does not exist")
136+ else WriteSet([DataEntry(s(U, q), (u(U, q) + 1)), DataEntry(B(S), (D(S) + T.amount))])
137+ }
138+ }
139+
140+
141+
142+@Callable(P)
143+func withdraw () = {
144+ let S = toBase58String(P.caller.bytes)
145+ let V = D(S)
146+ if ((0 >= V))
147+ then throw("insufficient balance")
148+ else ScriptResult(WriteSet([DataEntry(B(S), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(S), V, unit)]))
149+ }
150+
151+
152+
153+@Callable(P)
154+func voteCommit (q,W) = {
155+ let t = toBase58String(P.caller.bytes)
156+ let X = H(q)
157+ let Y = L(q)
158+ if ((X >= c))
159+ then throw("reached max num of votes")
160+ else if ((F(q, t) != b))
161+ then throw("user has already participated")
162+ else if ((z(q) == b))
163+ then throw("item does not exist")
164+ else if (if ((Y != b))
165+ then (Y != e)
166+ else false)
167+ then throw("voting is not possible")
168+ else WriteSet([DataEntry(E(q, t), W), DataEntry(G(q), (X + 1)), DataEntry(K(q), if ((X == c))
169+ then f
170+ else e)])
171+ }
172+
173+
174+@Verifier(Z)
175+func aa () = {
176+ let l = Z
177+ if ($isInstanceOf(l, "SetScriptTransaction"))
178+ then {
179+ let ab = l
180+ sigVerify(Z.bodyBytes, Z.proofs[0], a)
181+ }
182+ else if ($isInstanceOf(l, "DataTransaction"))
183+ then {
184+ let ab = l
185+ true
186+ }
187+ else if ($isInstanceOf(l, "TransferTransaction"))
188+ then {
189+ let ac = l
190+ sigVerify(Z.bodyBytes, Z.proofs[0], a)
191+ }
192+ else false
193+ }
194+

github/deemru/w8io/169f3d6 
29.73 ms