tx · KCF2fX7EBAzrGinNGMZuUe5SWH8xZKfZSJVnW3dPzEE 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7: -0.01400000 Waves 2021.08.02 03:44 [1640007] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves
{ "type": 13, "id": "KCF2fX7EBAzrGinNGMZuUe5SWH8xZKfZSJVnW3dPzEE", "fee": 1400000, "feeAssetId": null, "timestamp": 1627865115960, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "3nqE19Ct9pZ5AEA6MVDGSJE68UZtFV4i9hVP9eKvzoMbbFY1neqSUBUieWo5o1sMTBC7DhSgY1yeeWV4PHDGQyez" ], "script": "base64:AAIEAAAAAAAAADsIAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIECgIICBIDCgEIEgQKAggIEgQKAggIEgUKAwgICAAAADUAAAAABE5PTkUCAAAABE5PTkUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhBUFBST1ZBTAIAAAAIYXBwcm92YWwAAAAACFJFSkVDVEVEAgAAAAhyZWplY3RlZAAAAAAIQUNDRVBURUQCAAAACGFjY2VwdGVkAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZX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XR1cwAAAAEFAAAABGl0ZW0FAAAACW5ld1N0YXR1cwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQSXNzdWVUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B/+iK6I=", "height": 1640007, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5vS2PiVGJw3MezycGfnJsvmtRN1v41KPP2AF8dwyW6kP Next: Ca54uLDM9RY2i7g3QrdYDWAomvZQEQaZjoMJoBvyRCzR Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = "reveal" | |
17 | 17 | ||
18 | - | func h (i) = { | |
19 | - | let j = getString(this, i) | |
20 | - | if ($isInstanceOf(j, "String")) | |
18 | + | let h = "approval" | |
19 | + | ||
20 | + | let i = "rejected" | |
21 | + | ||
22 | + | let j = "accepted" | |
23 | + | ||
24 | + | func k (l) = { | |
25 | + | let m = getString(this, l) | |
26 | + | if ($isInstanceOf(m, "String")) | |
21 | 27 | then { | |
22 | - | let | |
23 | - | | |
28 | + | let n = m | |
29 | + | n | |
24 | 30 | } | |
25 | 31 | else a | |
26 | 32 | } | |
27 | 33 | ||
28 | 34 | ||
29 | - | func | |
30 | - | let | |
31 | - | if ($isInstanceOf( | |
35 | + | func o (l) = { | |
36 | + | let m = getInteger(this, l) | |
37 | + | if ($isInstanceOf(m, "Int")) | |
32 | 38 | then { | |
33 | - | let | |
34 | - | | |
39 | + | let n = m | |
40 | + | n | |
35 | 41 | } | |
36 | 42 | else 0 | |
37 | 43 | } | |
38 | 44 | ||
39 | 45 | ||
40 | - | func | |
46 | + | func p (q) = (q + "_account") | |
41 | 47 | ||
42 | 48 | ||
43 | - | func | |
49 | + | func r (q) = k(p(q)) | |
44 | 50 | ||
45 | 51 | ||
46 | - | func | |
47 | - | let | |
48 | - | ("item_" + toBase58String(sha256(toBytes( | |
52 | + | func s (t,u) = { | |
53 | + | let v = (t + u) | |
54 | + | ("item_" + toBase58String(sha256(toBytes(v)))) | |
49 | 55 | } | |
50 | 56 | ||
51 | 57 | ||
52 | - | func | |
58 | + | func w (x) = (x + "_owner") | |
53 | 59 | ||
54 | 60 | ||
55 | - | func | |
61 | + | func y (x) = (x + "_title") | |
56 | 62 | ||
57 | 63 | ||
58 | - | func | |
64 | + | func z (x) = (x + "_price") | |
59 | 65 | ||
60 | 66 | ||
61 | - | func | |
67 | + | func A (x) = (x + "_data") | |
62 | 68 | ||
63 | 69 | ||
64 | - | func | |
70 | + | func B (x) = (x + "_expiredate") | |
65 | 71 | ||
66 | 72 | ||
67 | - | func | |
73 | + | func C (x) = (x + "_sold") | |
68 | 74 | ||
69 | 75 | ||
70 | - | func | |
76 | + | func D (x,E) = (((x + "_") + E) + "_commit") | |
71 | 77 | ||
72 | 78 | ||
73 | - | func | |
79 | + | func F (x) = (x + "_cmtcnt") | |
74 | 80 | ||
75 | 81 | ||
76 | - | func | |
82 | + | func G (x,E) = (((x + "_") + E) + "_reveal") | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
85 | + | func H (x) = (x + "_status") | |
80 | 86 | ||
81 | 87 | ||
82 | - | func | |
88 | + | func I (x,J) = ((x + "_res:") + J) | |
83 | 89 | ||
84 | 90 | ||
85 | - | func | |
91 | + | func K (t) = (t + "_balance") | |
86 | 92 | ||
87 | 93 | ||
88 | - | func | |
94 | + | func L (t,x,E) = ("purchase_" + toBase58String(sha256(toBytes(((((t + "_") + x) + "_") + E))))) | |
89 | 95 | ||
90 | 96 | ||
91 | - | func | |
97 | + | func M (N) = (N + "_status") | |
92 | 98 | ||
93 | 99 | ||
94 | - | func M (n) = { | |
95 | - | let N = H(n) | |
96 | - | let j = getInteger(this, N) | |
97 | - | if ($isInstanceOf(j, "Int")) | |
98 | - | then { | |
99 | - | let k = j | |
100 | - | k | |
101 | - | } | |
102 | - | else 0 | |
103 | - | } | |
100 | + | func O (N) = (N + "_item") | |
104 | 101 | ||
105 | 102 | ||
106 | - | func O (A,u) = { | |
107 | - | let P = G(A, u) | |
108 | - | let j = getInteger(this, P) | |
109 | - | if ($isInstanceOf(j, "Int")) | |
110 | - | then { | |
111 | - | let k = j | |
112 | - | k | |
113 | - | } | |
114 | - | else 0 | |
115 | - | } | |
103 | + | func P (N) = (N + "_supplier") | |
116 | 104 | ||
117 | 105 | ||
118 | - | func Q (u) = { | |
119 | - | let R = w(u) | |
120 | - | getIntegerValue(this, R) | |
121 | - | } | |
106 | + | func Q (N) = (N + "_user") | |
122 | 107 | ||
123 | 108 | ||
124 | - | func | |
109 | + | func R (N) = (N + "_amount") | |
125 | 110 | ||
126 | 111 | ||
127 | - | func | |
112 | + | func S (N) = (N + "_timestamp") | |
128 | 113 | ||
129 | 114 | ||
130 | - | func | |
115 | + | func T (U) = ("coupon_" + U) | |
131 | 116 | ||
132 | 117 | ||
133 | - | func V ( | |
118 | + | func V (W) = (W + "_item") | |
134 | 119 | ||
135 | 120 | ||
136 | - | func | |
121 | + | func X (t) = o(K(t)) | |
137 | 122 | ||
138 | 123 | ||
139 | - | func | |
124 | + | func Y (N) = k(M(N)) | |
140 | 125 | ||
141 | 126 | ||
142 | - | func | |
127 | + | func Z (N) = getStringValue(this, O(N)) | |
143 | 128 | ||
144 | 129 | ||
145 | - | func | |
130 | + | func aa (N) = getStringValue(this, P(N)) | |
146 | 131 | ||
147 | 132 | ||
148 | - | @Callable(aa) | |
149 | - | func registerSupplier (ab) = { | |
150 | - | let q = toBase58String(aa.caller.bytes) | |
151 | - | let n = o(q) | |
152 | - | if ((n != a)) | |
133 | + | func ab (N) = getStringValue(this, Q(N)) | |
134 | + | ||
135 | + | ||
136 | + | func ac (N) = getIntegerValue(this, R(N)) | |
137 | + | ||
138 | + | ||
139 | + | func ad (N) = o(S(N)) | |
140 | + | ||
141 | + | ||
142 | + | func ae (x) = getIntegerValue(this, z(x)) | |
143 | + | ||
144 | + | ||
145 | + | func af (x) = k(w(x)) | |
146 | + | ||
147 | + | ||
148 | + | func ag (x) = o(B(x)) | |
149 | + | ||
150 | + | ||
151 | + | func ah (x) = k(y(x)) | |
152 | + | ||
153 | + | ||
154 | + | func ai (x) = o(C(x)) | |
155 | + | ||
156 | + | ||
157 | + | func aj (x,E) = k(D(x, E)) | |
158 | + | ||
159 | + | ||
160 | + | func ak (x) = o(F(x)) | |
161 | + | ||
162 | + | ||
163 | + | func al (x,E) = k(G(x, E)) | |
164 | + | ||
165 | + | ||
166 | + | func am (x) = k(H(x)) | |
167 | + | ||
168 | + | ||
169 | + | func an (x,J) = o(I(x, J)) | |
170 | + | ||
171 | + | ||
172 | + | @Callable(ao) | |
173 | + | func registerSupplier (ap) = { | |
174 | + | let t = toBase58String(ao.caller.bytes) | |
175 | + | let q = r(t) | |
176 | + | if ((q != a)) | |
153 | 177 | then throw("This address has already registred as supplier") | |
154 | - | else [StringEntry( | |
178 | + | else [StringEntry(p(t), ap)] | |
155 | 179 | } | |
156 | 180 | ||
157 | 181 | ||
158 | 182 | ||
159 | - | @Callable( | |
160 | - | func addItem ( | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | if (( | |
183 | + | @Callable(ao) | |
184 | + | func addItem (u,aq,ap,ar) = { | |
185 | + | let t = toBase58String(ao.caller.bytes) | |
186 | + | let q = r(t) | |
187 | + | let x = s(t, u) | |
188 | + | if ((q == a)) | |
165 | 189 | then throw("You should register as supplier to add an item") | |
166 | - | else if ((0 >= | |
190 | + | else if ((0 >= aq)) | |
167 | 191 | then throw("Purchase amount cannot be less than item price") | |
168 | - | else if (( | |
192 | + | else if ((af(x) != a)) | |
169 | 193 | then throw("An item already exists") | |
170 | - | else [StringEntry( | |
194 | + | else [StringEntry(w(x), t), StringEntry(y(x), u), IntegerEntry(z(x), aq), StringEntry(A(x), ap), IntegerEntry(B(x), ar)] | |
171 | 195 | } | |
172 | 196 | ||
173 | 197 | ||
174 | 198 | ||
175 | - | @Callable( | |
176 | - | func updateItem (u, | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | if (( | |
199 | + | @Callable(ao) | |
200 | + | func updateItem (x,u,aq,ap,ar) = { | |
201 | + | let t = toBase58String(ao.caller.bytes) | |
202 | + | let q = r(t) | |
203 | + | let as = af(x) | |
204 | + | if ((q == a)) | |
181 | 205 | then throw("You should register as supplier to remove an item") | |
182 | - | else if (if (( | |
206 | + | else if (if ((x == a)) | |
183 | 207 | then true | |
184 | - | else ( | |
185 | - | then throw(("You don't owned item " + | |
186 | - | else [StringEntry( | |
208 | + | else (t != as)) | |
209 | + | then throw(("You don't owned item " + x)) | |
210 | + | else [StringEntry(y(x), u), IntegerEntry(z(x), aq), StringEntry(A(x), ap), IntegerEntry(B(x), ar)] | |
187 | 211 | } | |
188 | 212 | ||
189 | 213 | ||
190 | 214 | ||
191 | - | @Callable( | |
192 | - | func removeItem ( | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
215 | + | @Callable(ao) | |
216 | + | func removeItem (x) = { | |
217 | + | let t = toBase58String(ao.caller.bytes) | |
218 | + | let q = r(t) | |
219 | + | let as = af(x) | |
220 | + | if ((q == a)) | |
197 | 221 | then throw("You should register as supplier to remove an item") | |
198 | - | else if (if (( | |
222 | + | else if (if ((x == a)) | |
199 | 223 | then true | |
200 | - | else ( | |
201 | - | then throw(("You don't owned item " + | |
202 | - | else [DeleteEntry( | |
224 | + | else (t != as)) | |
225 | + | then throw(("You don't owned item " + x)) | |
226 | + | else [DeleteEntry(w(x)), DeleteEntry(y(x)), DeleteEntry(z(x)), DeleteEntry(A(x)), DeleteEntry(B(x))] | |
203 | 227 | } | |
204 | 228 | ||
205 | 229 | ||
206 | 230 | ||
207 | - | @Callable( | |
208 | - | func purchase ( | |
209 | - | let | |
210 | - | if (isDefined( | |
231 | + | @Callable(ao) | |
232 | + | func purchase (x,U) = { | |
233 | + | let at = ao.payments[0] | |
234 | + | if (isDefined(at.assetId)) | |
211 | 235 | then throw("You can buy tokens only with Waves tokens") | |
212 | 236 | else { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (if (( | |
218 | - | then (lastBlock.timestamp >= | |
237 | + | let E = toBase58String(ao.caller.bytes) | |
238 | + | let aq = ae(x) | |
239 | + | let t = af(x) | |
240 | + | let ar = ag(x) | |
241 | + | if (if ((ar > 0)) | |
242 | + | then (lastBlock.timestamp >= ar) | |
219 | 243 | else false) | |
220 | 244 | then throw("Coupon expired") | |
221 | - | else if (( | |
245 | + | else if ((aq > at.amount)) | |
222 | 246 | then throw("Purchase amount cannot be less than item price") | |
223 | - | else if (( | |
247 | + | else if ((at.amount > aq)) | |
224 | 248 | then throw("Purchase amount cannot be higher than item price") | |
225 | - | else if (( | |
249 | + | else if ((t == a)) | |
226 | 250 | then throw("Supplier does not exists") | |
227 | 251 | else { | |
228 | - | let ah = G(ag, u) | |
229 | - | let ai = (O(ag, u) + 1) | |
230 | - | let N = H(q) | |
231 | - | let aj = (M(q) + af.amount) | |
232 | - | let L = I(J) | |
233 | - | [IntegerEntry(ah, ai), IntegerEntry(N, aj), StringEntry(K(L), u), ScriptTransfer(aa.caller, 1, fromBase58String(J))] | |
252 | + | let N = L(t, x, E) | |
253 | + | let au = M(N) | |
254 | + | let av = O(N) | |
255 | + | let aw = P(N) | |
256 | + | let ax = Q(N) | |
257 | + | let ay = R(N) | |
258 | + | let az = S(N) | |
259 | + | [StringEntry(au, h), StringEntry(av, x), StringEntry(aw, t), StringEntry(ax, E), IntegerEntry(ay, at.amount), IntegerEntry(az, lastBlock.timestamp)] | |
234 | 260 | } | |
235 | 261 | } | |
236 | 262 | } | |
237 | 263 | ||
238 | 264 | ||
239 | 265 | ||
240 | - | @Callable(aa) | |
241 | - | func voteCommit (u,ak) = { | |
242 | - | let A = toBase58String(aa.caller.bytes) | |
243 | - | let al = W(u) | |
244 | - | let am = Y(u) | |
245 | - | if ((al >= b)) | |
266 | + | @Callable(ao) | |
267 | + | func rejectPurchase (N) = { | |
268 | + | let aA = toBase58String(ao.caller.bytes) | |
269 | + | let aB = Y(N) | |
270 | + | let t = aa(N) | |
271 | + | let x = Z(N) | |
272 | + | if (if ((t == a)) | |
273 | + | then true | |
274 | + | else (aA != t)) | |
275 | + | then throw("Your are not the owner of this item") | |
276 | + | else if ((aB != h)) | |
277 | + | then throw("You cannot reject this purchased") | |
278 | + | else { | |
279 | + | let au = M(N) | |
280 | + | let ay = R(N) | |
281 | + | let aC = K(t) | |
282 | + | let aD = C(x) | |
283 | + | let E = ab(N) | |
284 | + | let aE = ac(N) | |
285 | + | let aF = (X(t) - aE) | |
286 | + | let aG = (ai(x) - 1) | |
287 | + | let aH = addressFromStringValue(E) | |
288 | + | [StringEntry(au, i), IntegerEntry(ay, 0), ScriptTransfer(aH, aE, unit)] | |
289 | + | } | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(ao) | |
295 | + | func acceptPurchase (N,aI) = { | |
296 | + | let aA = toBase58String(ao.caller.bytes) | |
297 | + | let aB = Y(N) | |
298 | + | let t = aa(N) | |
299 | + | let x = Z(N) | |
300 | + | let ar = ag(x) | |
301 | + | if (if ((t == a)) | |
302 | + | then true | |
303 | + | else (aA != t)) | |
304 | + | then throw("Your are not the owner of this item") | |
305 | + | else if ((aB != h)) | |
306 | + | then throw("You cannot reject this purchased") | |
307 | + | else if (if ((ar > 0)) | |
308 | + | then (lastBlock.timestamp >= ar) | |
309 | + | else false) | |
310 | + | then throw("Coupon expired") | |
311 | + | else { | |
312 | + | let au = M(N) | |
313 | + | let aC = K(t) | |
314 | + | let aD = C(x) | |
315 | + | let aE = ac(N) | |
316 | + | let aF = (X(t) + aE) | |
317 | + | let aG = (ai(x) + 1) | |
318 | + | let E = ab(N) | |
319 | + | let aH = addressFromStringValue(E) | |
320 | + | [IntegerEntry(aC, aF), IntegerEntry(aD, aG), ScriptTransfer(aH, 1, fromBase58String(aI))] | |
321 | + | } | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | @Callable(ao) | |
327 | + | func voteCommit (x,aJ) = { | |
328 | + | let E = toBase58String(ao.caller.bytes) | |
329 | + | let aK = ak(x) | |
330 | + | let aB = am(x) | |
331 | + | if ((aK >= b)) | |
246 | 332 | then throw("Reached max number of voters") | |
247 | - | else if (( | |
333 | + | else if ((aj(x, E) != a)) | |
248 | 334 | then throw("You voted already") | |
249 | - | else if (( | |
335 | + | else if ((w(x) == a)) | |
250 | 336 | then throw("Item does not exists") | |
251 | - | else if (if (( | |
252 | - | then ( | |
337 | + | else if (if ((aB != a)) | |
338 | + | then (aB != f) | |
253 | 339 | else false) | |
254 | 340 | then throw("Voting is not active for this item now") | |
255 | 341 | else { | |
256 | - | let | |
342 | + | let aL = if ((aK == b)) | |
257 | 343 | then g | |
258 | 344 | else f | |
259 | - | [StringEntry( | |
345 | + | [StringEntry(D(x, E), aJ), IntegerEntry(F(x), (aK + 1)), StringEntry(H(x), aL)] | |
260 | 346 | } | |
261 | 347 | } | |
262 | 348 | ||
263 | 349 | ||
264 | 350 | ||
265 | - | @Callable( | |
266 | - | func voteReveal ( | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | if (( | |
351 | + | @Callable(ao) | |
352 | + | func voteReveal (x,J,aM) = { | |
353 | + | let E = toBase58String(ao.caller.bytes) | |
354 | + | let aB = am(x) | |
355 | + | let aN = (an(x, J) + 1) | |
356 | + | let aO = toBase58String(sha256(toBytes(((x + J) + aM)))) | |
357 | + | if ((aO != aj(x, E))) | |
272 | 358 | then throw("Reveal data is not valid") | |
273 | - | else if ((b > | |
359 | + | else if ((b > ak(x))) | |
274 | 360 | then throw("Max number of voters not reached") | |
275 | - | else if (( | |
361 | + | else if ((al(x, E) != a)) | |
276 | 362 | then throw("You voted already") | |
277 | - | else if (if (( | |
278 | - | then ( | |
363 | + | else if (if ((aB != f)) | |
364 | + | then (aB != g) | |
279 | 365 | else false) | |
280 | 366 | then throw("Voting is not active for this item now") | |
281 | - | else if (if (( | |
282 | - | then ( | |
367 | + | else if (if ((J != d)) | |
368 | + | then (J != e) | |
283 | 369 | else false) | |
284 | 370 | then throw("Provided voting option is incorrect") | |
285 | 371 | else { | |
286 | - | let | |
287 | - | then | |
372 | + | let aL = if ((aN >= c)) | |
373 | + | then J | |
288 | 374 | else g | |
289 | - | [StringEntry( | |
375 | + | [StringEntry(G(x, E), J), IntegerEntry(I(x, E), aN), StringEntry(H(x), aL)] | |
290 | 376 | } | |
291 | 377 | } | |
292 | 378 | ||
293 | 379 | ||
294 | - | @Verifier( | |
295 | - | func | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
380 | + | @Verifier(aP) | |
381 | + | func aQ () = { | |
382 | + | let m = aP | |
383 | + | if ($isInstanceOf(m, "SetScriptTransaction")) | |
298 | 384 | then { | |
299 | - | let | |
300 | - | sigVerify( | |
385 | + | let aR = m | |
386 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
301 | 387 | } | |
302 | - | else if ($isInstanceOf( | |
388 | + | else if ($isInstanceOf(m, "IssueTransaction")) | |
303 | 389 | then { | |
304 | - | let | |
305 | - | sigVerify( | |
390 | + | let aR = m | |
391 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
306 | 392 | } | |
307 | - | else if ($isInstanceOf( | |
393 | + | else if ($isInstanceOf(m, "TransferTransaction")) | |
308 | 394 | then { | |
309 | - | let | |
310 | - | sigVerify( | |
395 | + | let aR = m | |
396 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
311 | 397 | } | |
312 | 398 | else false | |
313 | 399 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "NONE" | |
5 | 5 | ||
6 | 6 | let b = 3 | |
7 | 7 | ||
8 | 8 | let c = 2 | |
9 | 9 | ||
10 | 10 | let d = "featured" | |
11 | 11 | ||
12 | 12 | let e = "delisted" | |
13 | 13 | ||
14 | 14 | let f = "voting" | |
15 | 15 | ||
16 | 16 | let g = "reveal" | |
17 | 17 | ||
18 | - | func h (i) = { | |
19 | - | let j = getString(this, i) | |
20 | - | if ($isInstanceOf(j, "String")) | |
18 | + | let h = "approval" | |
19 | + | ||
20 | + | let i = "rejected" | |
21 | + | ||
22 | + | let j = "accepted" | |
23 | + | ||
24 | + | func k (l) = { | |
25 | + | let m = getString(this, l) | |
26 | + | if ($isInstanceOf(m, "String")) | |
21 | 27 | then { | |
22 | - | let | |
23 | - | | |
28 | + | let n = m | |
29 | + | n | |
24 | 30 | } | |
25 | 31 | else a | |
26 | 32 | } | |
27 | 33 | ||
28 | 34 | ||
29 | - | func | |
30 | - | let | |
31 | - | if ($isInstanceOf( | |
35 | + | func o (l) = { | |
36 | + | let m = getInteger(this, l) | |
37 | + | if ($isInstanceOf(m, "Int")) | |
32 | 38 | then { | |
33 | - | let | |
34 | - | | |
39 | + | let n = m | |
40 | + | n | |
35 | 41 | } | |
36 | 42 | else 0 | |
37 | 43 | } | |
38 | 44 | ||
39 | 45 | ||
40 | - | func | |
46 | + | func p (q) = (q + "_account") | |
41 | 47 | ||
42 | 48 | ||
43 | - | func | |
49 | + | func r (q) = k(p(q)) | |
44 | 50 | ||
45 | 51 | ||
46 | - | func | |
47 | - | let | |
48 | - | ("item_" + toBase58String(sha256(toBytes( | |
52 | + | func s (t,u) = { | |
53 | + | let v = (t + u) | |
54 | + | ("item_" + toBase58String(sha256(toBytes(v)))) | |
49 | 55 | } | |
50 | 56 | ||
51 | 57 | ||
52 | - | func | |
58 | + | func w (x) = (x + "_owner") | |
53 | 59 | ||
54 | 60 | ||
55 | - | func | |
61 | + | func y (x) = (x + "_title") | |
56 | 62 | ||
57 | 63 | ||
58 | - | func | |
64 | + | func z (x) = (x + "_price") | |
59 | 65 | ||
60 | 66 | ||
61 | - | func | |
67 | + | func A (x) = (x + "_data") | |
62 | 68 | ||
63 | 69 | ||
64 | - | func | |
70 | + | func B (x) = (x + "_expiredate") | |
65 | 71 | ||
66 | 72 | ||
67 | - | func | |
73 | + | func C (x) = (x + "_sold") | |
68 | 74 | ||
69 | 75 | ||
70 | - | func | |
76 | + | func D (x,E) = (((x + "_") + E) + "_commit") | |
71 | 77 | ||
72 | 78 | ||
73 | - | func | |
79 | + | func F (x) = (x + "_cmtcnt") | |
74 | 80 | ||
75 | 81 | ||
76 | - | func | |
82 | + | func G (x,E) = (((x + "_") + E) + "_reveal") | |
77 | 83 | ||
78 | 84 | ||
79 | - | func | |
85 | + | func H (x) = (x + "_status") | |
80 | 86 | ||
81 | 87 | ||
82 | - | func | |
88 | + | func I (x,J) = ((x + "_res:") + J) | |
83 | 89 | ||
84 | 90 | ||
85 | - | func | |
91 | + | func K (t) = (t + "_balance") | |
86 | 92 | ||
87 | 93 | ||
88 | - | func | |
94 | + | func L (t,x,E) = ("purchase_" + toBase58String(sha256(toBytes(((((t + "_") + x) + "_") + E))))) | |
89 | 95 | ||
90 | 96 | ||
91 | - | func | |
97 | + | func M (N) = (N + "_status") | |
92 | 98 | ||
93 | 99 | ||
94 | - | func M (n) = { | |
95 | - | let N = H(n) | |
96 | - | let j = getInteger(this, N) | |
97 | - | if ($isInstanceOf(j, "Int")) | |
98 | - | then { | |
99 | - | let k = j | |
100 | - | k | |
101 | - | } | |
102 | - | else 0 | |
103 | - | } | |
100 | + | func O (N) = (N + "_item") | |
104 | 101 | ||
105 | 102 | ||
106 | - | func O (A,u) = { | |
107 | - | let P = G(A, u) | |
108 | - | let j = getInteger(this, P) | |
109 | - | if ($isInstanceOf(j, "Int")) | |
110 | - | then { | |
111 | - | let k = j | |
112 | - | k | |
113 | - | } | |
114 | - | else 0 | |
115 | - | } | |
103 | + | func P (N) = (N + "_supplier") | |
116 | 104 | ||
117 | 105 | ||
118 | - | func Q (u) = { | |
119 | - | let R = w(u) | |
120 | - | getIntegerValue(this, R) | |
121 | - | } | |
106 | + | func Q (N) = (N + "_user") | |
122 | 107 | ||
123 | 108 | ||
124 | - | func | |
109 | + | func R (N) = (N + "_amount") | |
125 | 110 | ||
126 | 111 | ||
127 | - | func | |
112 | + | func S (N) = (N + "_timestamp") | |
128 | 113 | ||
129 | 114 | ||
130 | - | func | |
115 | + | func T (U) = ("coupon_" + U) | |
131 | 116 | ||
132 | 117 | ||
133 | - | func V ( | |
118 | + | func V (W) = (W + "_item") | |
134 | 119 | ||
135 | 120 | ||
136 | - | func | |
121 | + | func X (t) = o(K(t)) | |
137 | 122 | ||
138 | 123 | ||
139 | - | func | |
124 | + | func Y (N) = k(M(N)) | |
140 | 125 | ||
141 | 126 | ||
142 | - | func | |
127 | + | func Z (N) = getStringValue(this, O(N)) | |
143 | 128 | ||
144 | 129 | ||
145 | - | func | |
130 | + | func aa (N) = getStringValue(this, P(N)) | |
146 | 131 | ||
147 | 132 | ||
148 | - | @Callable(aa) | |
149 | - | func registerSupplier (ab) = { | |
150 | - | let q = toBase58String(aa.caller.bytes) | |
151 | - | let n = o(q) | |
152 | - | if ((n != a)) | |
133 | + | func ab (N) = getStringValue(this, Q(N)) | |
134 | + | ||
135 | + | ||
136 | + | func ac (N) = getIntegerValue(this, R(N)) | |
137 | + | ||
138 | + | ||
139 | + | func ad (N) = o(S(N)) | |
140 | + | ||
141 | + | ||
142 | + | func ae (x) = getIntegerValue(this, z(x)) | |
143 | + | ||
144 | + | ||
145 | + | func af (x) = k(w(x)) | |
146 | + | ||
147 | + | ||
148 | + | func ag (x) = o(B(x)) | |
149 | + | ||
150 | + | ||
151 | + | func ah (x) = k(y(x)) | |
152 | + | ||
153 | + | ||
154 | + | func ai (x) = o(C(x)) | |
155 | + | ||
156 | + | ||
157 | + | func aj (x,E) = k(D(x, E)) | |
158 | + | ||
159 | + | ||
160 | + | func ak (x) = o(F(x)) | |
161 | + | ||
162 | + | ||
163 | + | func al (x,E) = k(G(x, E)) | |
164 | + | ||
165 | + | ||
166 | + | func am (x) = k(H(x)) | |
167 | + | ||
168 | + | ||
169 | + | func an (x,J) = o(I(x, J)) | |
170 | + | ||
171 | + | ||
172 | + | @Callable(ao) | |
173 | + | func registerSupplier (ap) = { | |
174 | + | let t = toBase58String(ao.caller.bytes) | |
175 | + | let q = r(t) | |
176 | + | if ((q != a)) | |
153 | 177 | then throw("This address has already registred as supplier") | |
154 | - | else [StringEntry( | |
178 | + | else [StringEntry(p(t), ap)] | |
155 | 179 | } | |
156 | 180 | ||
157 | 181 | ||
158 | 182 | ||
159 | - | @Callable( | |
160 | - | func addItem ( | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | if (( | |
183 | + | @Callable(ao) | |
184 | + | func addItem (u,aq,ap,ar) = { | |
185 | + | let t = toBase58String(ao.caller.bytes) | |
186 | + | let q = r(t) | |
187 | + | let x = s(t, u) | |
188 | + | if ((q == a)) | |
165 | 189 | then throw("You should register as supplier to add an item") | |
166 | - | else if ((0 >= | |
190 | + | else if ((0 >= aq)) | |
167 | 191 | then throw("Purchase amount cannot be less than item price") | |
168 | - | else if (( | |
192 | + | else if ((af(x) != a)) | |
169 | 193 | then throw("An item already exists") | |
170 | - | else [StringEntry( | |
194 | + | else [StringEntry(w(x), t), StringEntry(y(x), u), IntegerEntry(z(x), aq), StringEntry(A(x), ap), IntegerEntry(B(x), ar)] | |
171 | 195 | } | |
172 | 196 | ||
173 | 197 | ||
174 | 198 | ||
175 | - | @Callable( | |
176 | - | func updateItem (u, | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | if (( | |
199 | + | @Callable(ao) | |
200 | + | func updateItem (x,u,aq,ap,ar) = { | |
201 | + | let t = toBase58String(ao.caller.bytes) | |
202 | + | let q = r(t) | |
203 | + | let as = af(x) | |
204 | + | if ((q == a)) | |
181 | 205 | then throw("You should register as supplier to remove an item") | |
182 | - | else if (if (( | |
206 | + | else if (if ((x == a)) | |
183 | 207 | then true | |
184 | - | else ( | |
185 | - | then throw(("You don't owned item " + | |
186 | - | else [StringEntry( | |
208 | + | else (t != as)) | |
209 | + | then throw(("You don't owned item " + x)) | |
210 | + | else [StringEntry(y(x), u), IntegerEntry(z(x), aq), StringEntry(A(x), ap), IntegerEntry(B(x), ar)] | |
187 | 211 | } | |
188 | 212 | ||
189 | 213 | ||
190 | 214 | ||
191 | - | @Callable( | |
192 | - | func removeItem ( | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
215 | + | @Callable(ao) | |
216 | + | func removeItem (x) = { | |
217 | + | let t = toBase58String(ao.caller.bytes) | |
218 | + | let q = r(t) | |
219 | + | let as = af(x) | |
220 | + | if ((q == a)) | |
197 | 221 | then throw("You should register as supplier to remove an item") | |
198 | - | else if (if (( | |
222 | + | else if (if ((x == a)) | |
199 | 223 | then true | |
200 | - | else ( | |
201 | - | then throw(("You don't owned item " + | |
202 | - | else [DeleteEntry( | |
224 | + | else (t != as)) | |
225 | + | then throw(("You don't owned item " + x)) | |
226 | + | else [DeleteEntry(w(x)), DeleteEntry(y(x)), DeleteEntry(z(x)), DeleteEntry(A(x)), DeleteEntry(B(x))] | |
203 | 227 | } | |
204 | 228 | ||
205 | 229 | ||
206 | 230 | ||
207 | - | @Callable( | |
208 | - | func purchase ( | |
209 | - | let | |
210 | - | if (isDefined( | |
231 | + | @Callable(ao) | |
232 | + | func purchase (x,U) = { | |
233 | + | let at = ao.payments[0] | |
234 | + | if (isDefined(at.assetId)) | |
211 | 235 | then throw("You can buy tokens only with Waves tokens") | |
212 | 236 | else { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (if (( | |
218 | - | then (lastBlock.timestamp >= | |
237 | + | let E = toBase58String(ao.caller.bytes) | |
238 | + | let aq = ae(x) | |
239 | + | let t = af(x) | |
240 | + | let ar = ag(x) | |
241 | + | if (if ((ar > 0)) | |
242 | + | then (lastBlock.timestamp >= ar) | |
219 | 243 | else false) | |
220 | 244 | then throw("Coupon expired") | |
221 | - | else if (( | |
245 | + | else if ((aq > at.amount)) | |
222 | 246 | then throw("Purchase amount cannot be less than item price") | |
223 | - | else if (( | |
247 | + | else if ((at.amount > aq)) | |
224 | 248 | then throw("Purchase amount cannot be higher than item price") | |
225 | - | else if (( | |
249 | + | else if ((t == a)) | |
226 | 250 | then throw("Supplier does not exists") | |
227 | 251 | else { | |
228 | - | let ah = G(ag, u) | |
229 | - | let ai = (O(ag, u) + 1) | |
230 | - | let N = H(q) | |
231 | - | let aj = (M(q) + af.amount) | |
232 | - | let L = I(J) | |
233 | - | [IntegerEntry(ah, ai), IntegerEntry(N, aj), StringEntry(K(L), u), ScriptTransfer(aa.caller, 1, fromBase58String(J))] | |
252 | + | let N = L(t, x, E) | |
253 | + | let au = M(N) | |
254 | + | let av = O(N) | |
255 | + | let aw = P(N) | |
256 | + | let ax = Q(N) | |
257 | + | let ay = R(N) | |
258 | + | let az = S(N) | |
259 | + | [StringEntry(au, h), StringEntry(av, x), StringEntry(aw, t), StringEntry(ax, E), IntegerEntry(ay, at.amount), IntegerEntry(az, lastBlock.timestamp)] | |
234 | 260 | } | |
235 | 261 | } | |
236 | 262 | } | |
237 | 263 | ||
238 | 264 | ||
239 | 265 | ||
240 | - | @Callable(aa) | |
241 | - | func voteCommit (u,ak) = { | |
242 | - | let A = toBase58String(aa.caller.bytes) | |
243 | - | let al = W(u) | |
244 | - | let am = Y(u) | |
245 | - | if ((al >= b)) | |
266 | + | @Callable(ao) | |
267 | + | func rejectPurchase (N) = { | |
268 | + | let aA = toBase58String(ao.caller.bytes) | |
269 | + | let aB = Y(N) | |
270 | + | let t = aa(N) | |
271 | + | let x = Z(N) | |
272 | + | if (if ((t == a)) | |
273 | + | then true | |
274 | + | else (aA != t)) | |
275 | + | then throw("Your are not the owner of this item") | |
276 | + | else if ((aB != h)) | |
277 | + | then throw("You cannot reject this purchased") | |
278 | + | else { | |
279 | + | let au = M(N) | |
280 | + | let ay = R(N) | |
281 | + | let aC = K(t) | |
282 | + | let aD = C(x) | |
283 | + | let E = ab(N) | |
284 | + | let aE = ac(N) | |
285 | + | let aF = (X(t) - aE) | |
286 | + | let aG = (ai(x) - 1) | |
287 | + | let aH = addressFromStringValue(E) | |
288 | + | [StringEntry(au, i), IntegerEntry(ay, 0), ScriptTransfer(aH, aE, unit)] | |
289 | + | } | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(ao) | |
295 | + | func acceptPurchase (N,aI) = { | |
296 | + | let aA = toBase58String(ao.caller.bytes) | |
297 | + | let aB = Y(N) | |
298 | + | let t = aa(N) | |
299 | + | let x = Z(N) | |
300 | + | let ar = ag(x) | |
301 | + | if (if ((t == a)) | |
302 | + | then true | |
303 | + | else (aA != t)) | |
304 | + | then throw("Your are not the owner of this item") | |
305 | + | else if ((aB != h)) | |
306 | + | then throw("You cannot reject this purchased") | |
307 | + | else if (if ((ar > 0)) | |
308 | + | then (lastBlock.timestamp >= ar) | |
309 | + | else false) | |
310 | + | then throw("Coupon expired") | |
311 | + | else { | |
312 | + | let au = M(N) | |
313 | + | let aC = K(t) | |
314 | + | let aD = C(x) | |
315 | + | let aE = ac(N) | |
316 | + | let aF = (X(t) + aE) | |
317 | + | let aG = (ai(x) + 1) | |
318 | + | let E = ab(N) | |
319 | + | let aH = addressFromStringValue(E) | |
320 | + | [IntegerEntry(aC, aF), IntegerEntry(aD, aG), ScriptTransfer(aH, 1, fromBase58String(aI))] | |
321 | + | } | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | @Callable(ao) | |
327 | + | func voteCommit (x,aJ) = { | |
328 | + | let E = toBase58String(ao.caller.bytes) | |
329 | + | let aK = ak(x) | |
330 | + | let aB = am(x) | |
331 | + | if ((aK >= b)) | |
246 | 332 | then throw("Reached max number of voters") | |
247 | - | else if (( | |
333 | + | else if ((aj(x, E) != a)) | |
248 | 334 | then throw("You voted already") | |
249 | - | else if (( | |
335 | + | else if ((w(x) == a)) | |
250 | 336 | then throw("Item does not exists") | |
251 | - | else if (if (( | |
252 | - | then ( | |
337 | + | else if (if ((aB != a)) | |
338 | + | then (aB != f) | |
253 | 339 | else false) | |
254 | 340 | then throw("Voting is not active for this item now") | |
255 | 341 | else { | |
256 | - | let | |
342 | + | let aL = if ((aK == b)) | |
257 | 343 | then g | |
258 | 344 | else f | |
259 | - | [StringEntry( | |
345 | + | [StringEntry(D(x, E), aJ), IntegerEntry(F(x), (aK + 1)), StringEntry(H(x), aL)] | |
260 | 346 | } | |
261 | 347 | } | |
262 | 348 | ||
263 | 349 | ||
264 | 350 | ||
265 | - | @Callable( | |
266 | - | func voteReveal ( | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | if (( | |
351 | + | @Callable(ao) | |
352 | + | func voteReveal (x,J,aM) = { | |
353 | + | let E = toBase58String(ao.caller.bytes) | |
354 | + | let aB = am(x) | |
355 | + | let aN = (an(x, J) + 1) | |
356 | + | let aO = toBase58String(sha256(toBytes(((x + J) + aM)))) | |
357 | + | if ((aO != aj(x, E))) | |
272 | 358 | then throw("Reveal data is not valid") | |
273 | - | else if ((b > | |
359 | + | else if ((b > ak(x))) | |
274 | 360 | then throw("Max number of voters not reached") | |
275 | - | else if (( | |
361 | + | else if ((al(x, E) != a)) | |
276 | 362 | then throw("You voted already") | |
277 | - | else if (if (( | |
278 | - | then ( | |
363 | + | else if (if ((aB != f)) | |
364 | + | then (aB != g) | |
279 | 365 | else false) | |
280 | 366 | then throw("Voting is not active for this item now") | |
281 | - | else if (if (( | |
282 | - | then ( | |
367 | + | else if (if ((J != d)) | |
368 | + | then (J != e) | |
283 | 369 | else false) | |
284 | 370 | then throw("Provided voting option is incorrect") | |
285 | 371 | else { | |
286 | - | let | |
287 | - | then | |
372 | + | let aL = if ((aN >= c)) | |
373 | + | then J | |
288 | 374 | else g | |
289 | - | [StringEntry( | |
375 | + | [StringEntry(G(x, E), J), IntegerEntry(I(x, E), aN), StringEntry(H(x), aL)] | |
290 | 376 | } | |
291 | 377 | } | |
292 | 378 | ||
293 | 379 | ||
294 | - | @Verifier( | |
295 | - | func | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
380 | + | @Verifier(aP) | |
381 | + | func aQ () = { | |
382 | + | let m = aP | |
383 | + | if ($isInstanceOf(m, "SetScriptTransaction")) | |
298 | 384 | then { | |
299 | - | let | |
300 | - | sigVerify( | |
385 | + | let aR = m | |
386 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
301 | 387 | } | |
302 | - | else if ($isInstanceOf( | |
388 | + | else if ($isInstanceOf(m, "IssueTransaction")) | |
303 | 389 | then { | |
304 | - | let | |
305 | - | sigVerify( | |
390 | + | let aR = m | |
391 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
306 | 392 | } | |
307 | - | else if ($isInstanceOf( | |
393 | + | else if ($isInstanceOf(m, "TransferTransaction")) | |
308 | 394 | then { | |
309 | - | let | |
310 | - | sigVerify( | |
395 | + | let aR = m | |
396 | + | sigVerify(aP.bodyBytes, aP.proofs[0], aP.senderPublicKey) | |
311 | 397 | } | |
312 | 398 | else false | |
313 | 399 | } | |
314 | 400 |
github/deemru/w8io/169f3d6 118.76 ms ◑