tx · BHv4ThBwR6kcmZS9QrRxDDsDBb8CP9SPhmJeDJxE7zAH

3N8X6wT7GZLavL2ayUQzwRD2kRFRSDyhkKS:  -0.01000000 Waves

2021.07.08 17:44 [1604766] smart account 3N8X6wT7GZLavL2ayUQzwRD2kRFRSDyhkKS > SELF 0.00000000 Waves

{ "type": 13, "id": "BHv4ThBwR6kcmZS9QrRxDDsDBb8CP9SPhmJeDJxE7zAH", "fee": 1000000, "feeAssetId": null, "timestamp": 1625755478095, "version": 2, "chainId": 84, "sender": "3N8X6wT7GZLavL2ayUQzwRD2kRFRSDyhkKS", "senderPublicKey": "7DT6yPGiY3eZiSytDKBx5ToZcjhem3SyxdX6Zz9fsMED", "proofs": [ "5AYy5BduPvGN5eyXiWPS8adRWe5BWihGcDF5AKwi11YMpmXqWhLGmrDX6Umj9AaKkdF7ZVJyxv65P2c5M3NmWnyb" ], "script": "base64:AAIFAAAAAAAAACUIAhIAGgcKAmExEgFpGggKAmEyEgJ0eBoMCgJhMxIGdmVyaWZ5AAAAAAAAAAEAAAACYTEBAAAABGNhbGwAAAAACQAETAAAAAIJAQAAAARCdXJuAAAAAgEAAAAgGCUhbruZPfMCI0X0UVU6mFh4CwlKB+ZqLmKOkPCC+TgAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACYTIBAAAAAmEzAAAAAAkAAfQAAAADCAUAAAACYTIAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhMgAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJhMgAAAA9zZW5kZXJQdWJsaWNLZXn0pikk", "height": 1604766, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gt8czhHGAEVx2AXzEXDg1eGJZ4Eygpggf7EM6zuNmYLX Next: G2dqrkaQ5JajeaGh1c79kUAwHKEL1aEJ2vA54XWnuCzj Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# 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- }
184
195
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- }
6+@Callable(a)
7+func call () = [Burn(base58'2dFd9ZLYU2ZXQk1FACPmkxeAkHrm5X4mZthxSo8peYHd', 1)]
328
339
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 = 3
65-
66-let y = 2
67-
68-let z = "voting"
69-
70-let A = "reveal"
71-
72-let B = "featured"
73-
74-let C = "delisted"
75-
76-func D (j,m) = (((j + "_") + m) + "_commit")
77-
78-
79-func E (j,m) = g(D(j, m))
80-
81-
82-func F (j) = (j + "_comcnt")
83-
84-
85-func G (j) = b(F(j))
86-
87-
88-func H (j,m) = (((j + "_") + m) + "_reveal")
89-
90-
91-func I (j,m) = g(H(j, m))
92-
93-
94-func J (j) = (j + "_status")
95-
96-
97-func K (j) = g(J(j))
98-
99-
100-func L (j,M) = ((j + "_res:") + M)
101-
102-
103-func N (j,M) = b(L(j, M))
104-
105-
106-@Callable(O)
107-func addItem (q,P,Q) = {
108- let R = toBase58String(O.caller.bytes)
109- let j = o(R, q)
110- if ((0 >= P))
111- then throw("Purchase amount cannot be less than item price")
112- else if ((t(j) != a))
113- then throw("an item already exists")
114- else [StringEntry(s(j), R), IntegerEntry(i(j), P), StringEntry(r(j), Q)]
115- }
116-
117-
118-
119-@Callable(O)
120-func purchase (j) = {
121- let S = O.payments[0]
122- if (isDefined(S.assetId))
123- then throw("WAVES ONLY HHEUAWHEUAS")
124- else {
125- let T = toBase58String(O.caller.bytes)
126- let P = k(j)
127- let R = t(j)
128- if ((P > S.amount))
129- then throw("Purchase amount cannot be less than item price")
130- else if ((R == a))
131- then throw("Supplier does not exist")
132- else [IntegerEntry(l(T, j), (n(T, j) + 1)), IntegerEntry(u(R), (w(R) + S.amount))]
133- }
134- }
135-
136-
137-
138-@Callable(O)
139-func withdraw () = {
140- let R = toBase58String(O.caller.bytes)
141- let U = w(R)
142- if ((0 >= U))
143- then throw("insuficient balance")
144- else [IntegerEntry(u(R), 0), ScriptTransfer(addressFromStringValue(R), U, unit)]
145- }
146-
147-
148-
149-@Callable(O)
150-func voteCommit (j,V) = {
151- let m = toBase58String(O.caller.bytes)
152- let W = G(j)
153- let X = K(j)
154- if ((W >= x))
155- then throw("Reached max num of voters")
156- else if ((E(j, m) != a))
157- then throw("b1")
158- else if ((s(j) == a))
159- then throw("b2")
160- else if (if ((X != a))
161- then (X != z)
162- else false)
163- then throw("b3")
164- else [StringEntry(D(j, m), V), IntegerEntry(F(j), (W + 1)), StringEntry(J(j), if ((W == x))
165- then A
166- else z)]
167- }
168-
169-
170-
171-@Callable(O)
172-func voteReveal (j,M,Y) = {
173- let m = toBase58String(O.caller.bytes)
174- let X = K(j)
175- let Z = (N(j, M) + 1)
176- if ((toBase58String(sha256(toBytes((M + Y)))) != E(j, m)))
177- then throw("Reveal data is not valid")
178- else if ((x > G(j)))
179- then throw("max num of voters hasnt reached yet")
180- else if ((I(j, m) != a))
181- then throw("user has already participated")
182- else if (if ((X != z))
183- then (X != A)
184- else false)
185- then throw("wrong status")
186- else if (if ((M != B))
187- then (M != C)
188- else false)
189- then throw("wrong vote")
190- else if (if ((X == B))
191- then true
192- else (X == C))
193- then throw("vote has finished")
194- else [StringEntry(H(j, m), M), IntegerEntry(L(j, M), Z), StringEntry(J(j), if ((Z >= y))
195- then M
196- else A)]
197- }
198-
10+@Verifier(b)
11+func c () = sigVerify(b.bodyBytes, b.proofs[0], b.senderPublicKey)
19912

github/deemru/w8io/873ac7e 
26.96 ms