tx · 9ZuGYzAhsFYbt9KpzkWJKto5CyMNfaMJdKTrZiEchsMV 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X: -0.00800000 Waves 2022.11.10 12:15 [2310859] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves
{ "type": 13, "id": "9ZuGYzAhsFYbt9KpzkWJKto5CyMNfaMJdKTrZiEchsMV", "fee": 800000, "feeAssetId": null, "timestamp": 1668071775153, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "58yjEinEA3u8oqzEuSXZ7Thmdm3XTJZP2zRH6xx6bGVCFiJT1T39UwYJs6PCUUQghDbkVZBibuAjKAkRxuGYYx68" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEQEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgEOYXNzZXRPZmZlclN3YXABBWFzc2V0CQCsAgIFBWFzc2V0AgZfb2ZmZXIBDXRyeUdldEludGVnZXIBA2tleQQDdmFsBAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAU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vd25lcktleQEFB29mZmVySWQCBFN3YXAJAMwIAgkBC0RlbGV0ZUVudHJ5AQkArAICCQEJaXNzdWVyS2V5AQUHb2ZmZXJJZAIEU3dhcAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tlefGC/OQ=", "height": 2310859, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FNriYGb4pRehpjCUDKqf44gCWpGx6FcfUfU39ZL6KoAR Next: ENBy7Jsp7aU3nrrqEjVnSuaFoxbYNwWUqvPTxZzAGkgf Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | func h (b) = (b + "_offer") | |
23 | 23 | ||
24 | 24 | ||
25 | - | func i (j) = { | |
26 | - | let k = { | |
27 | - | let l = getInteger(this, j) | |
28 | - | if ($isInstanceOf(l, "Int")) | |
25 | + | func i (b) = (b + "_offer") | |
26 | + | ||
27 | + | ||
28 | + | func j (k) = { | |
29 | + | let l = { | |
30 | + | let m = getInteger(this, k) | |
31 | + | if ($isInstanceOf(m, "Int")) | |
29 | 32 | then { | |
30 | - | let | |
31 | - | | |
33 | + | let n = m | |
34 | + | n | |
32 | 35 | } | |
33 | 36 | else 0 | |
34 | 37 | } | |
35 | - | | |
38 | + | l | |
36 | 39 | } | |
37 | 40 | ||
38 | 41 | ||
39 | - | func | |
40 | - | let | |
41 | - | let | |
42 | - | if ($isInstanceOf( | |
42 | + | func o (k) = { | |
43 | + | let l = { | |
44 | + | let m = getString(this, k) | |
45 | + | if ($isInstanceOf(m, "String")) | |
43 | 46 | then { | |
44 | - | let | |
45 | - | | |
47 | + | let n = m | |
48 | + | n | |
46 | 49 | } | |
47 | 50 | else "" | |
48 | 51 | } | |
49 | - | | |
52 | + | l | |
50 | 53 | } | |
51 | 54 | ||
52 | 55 | ||
53 | - | func | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
56 | + | func p (k) = { | |
57 | + | let l = { | |
58 | + | let m = getBoolean(this, k) | |
59 | + | if ($isInstanceOf(m, "Boolean")) | |
57 | 60 | then { | |
58 | - | let | |
59 | - | | |
61 | + | let n = m | |
62 | + | n | |
60 | 63 | } | |
61 | 64 | else false | |
62 | 65 | } | |
63 | - | | |
66 | + | l | |
64 | 67 | } | |
65 | 68 | ||
66 | 69 | ||
67 | - | func | |
70 | + | func q (r,s,t) = if ((size(r.payments) == 0)) | |
68 | 71 | then throw("Payment not attached") | |
69 | 72 | else { | |
70 | - | let | |
71 | - | let | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
73 | + | let u = value(r.payments[0]) | |
74 | + | let l = { | |
75 | + | let m = u.assetId | |
76 | + | if ($isInstanceOf(m, "ByteVector")) | |
74 | 77 | then { | |
75 | - | let | |
76 | - | if ((toBase58String( | |
77 | - | then ( | |
78 | + | let v = m | |
79 | + | if ((toBase58String(v) == s)) | |
80 | + | then (u.amount >= t) | |
78 | 81 | else false | |
79 | 82 | } | |
80 | - | else if ($isInstanceOf( | |
83 | + | else if ($isInstanceOf(m, "Unit")) | |
81 | 84 | then { | |
82 | - | let | |
83 | - | ( | |
85 | + | let w = m | |
86 | + | (u.amount >= t) | |
84 | 87 | } | |
85 | 88 | else throw("Match error") | |
86 | 89 | } | |
87 | - | | |
90 | + | l | |
88 | 91 | } | |
89 | 92 | ||
90 | 93 | ||
91 | - | func | |
92 | - | let | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
94 | + | func x (y,z) = { | |
95 | + | let A = { | |
96 | + | let m = z.assetId | |
97 | + | if ($isInstanceOf(m, "ByteVector")) | |
95 | 98 | then { | |
96 | - | let | |
97 | - | | |
99 | + | let n = m | |
100 | + | n | |
98 | 101 | } | |
99 | - | else if ($isInstanceOf( | |
102 | + | else if ($isInstanceOf(m, "Unit")) | |
100 | 103 | then { | |
101 | - | let | |
104 | + | let n = m | |
102 | 105 | base58'2CsAf' | |
103 | 106 | } | |
104 | 107 | else throw("Match error") | |
105 | 108 | } | |
106 | 109 | let b = { | |
107 | - | let | |
108 | - | if ($isInstanceOf( | |
110 | + | let m = assetInfo(A) | |
111 | + | if ($isInstanceOf(m, "Asset")) | |
109 | 112 | then { | |
110 | - | let | |
111 | - | toBase58String( | |
113 | + | let n = m | |
114 | + | toBase58String(n.issuer.bytes) | |
112 | 115 | } | |
113 | - | else if ($isInstanceOf( | |
116 | + | else if ($isInstanceOf(m, "Unit")) | |
114 | 117 | then { | |
115 | - | let | |
118 | + | let w = m | |
116 | 119 | "WAVES" | |
117 | 120 | } | |
118 | 121 | else throw("Match error") | |
119 | 122 | } | |
120 | - | if ( | |
121 | - | then | |
123 | + | if (p(b)) | |
124 | + | then y | |
122 | 125 | else false | |
123 | 126 | } | |
124 | 127 | ||
125 | 128 | ||
126 | - | func | |
127 | - | let | |
128 | - | let | |
129 | - | if ($isInstanceOf( | |
129 | + | func B (y,z) = { | |
130 | + | let A = { | |
131 | + | let m = z.assetId | |
132 | + | if ($isInstanceOf(m, "ByteVector")) | |
130 | 133 | then { | |
131 | - | let | |
132 | - | toBase58String( | |
134 | + | let n = m | |
135 | + | toBase58String(n) | |
133 | 136 | } | |
134 | - | else if ($isInstanceOf( | |
137 | + | else if ($isInstanceOf(m, "Unit")) | |
135 | 138 | then { | |
136 | - | let | |
139 | + | let n = m | |
137 | 140 | "WAVES" | |
138 | 141 | } | |
139 | 142 | else throw("Match error") | |
140 | 143 | } | |
141 | - | (( | |
144 | + | ((y + "_") + A) | |
142 | 145 | } | |
143 | 146 | ||
144 | 147 | ||
145 | - | func | |
146 | - | let | |
147 | - | (( | |
148 | + | func C (y,z) = { | |
149 | + | let t = toString(z.amount) | |
150 | + | ((y + "_") + t) | |
148 | 151 | } | |
149 | 152 | ||
150 | 153 | ||
151 | - | func | |
152 | - | let | |
153 | - | let | |
154 | - | if ($isInstanceOf( | |
154 | + | func D (y,z) = { | |
155 | + | let A = { | |
156 | + | let m = z.assetId | |
157 | + | if ($isInstanceOf(m, "ByteVector")) | |
155 | 158 | then { | |
156 | - | let | |
157 | - | | |
159 | + | let n = m | |
160 | + | n | |
158 | 161 | } | |
159 | - | else if ($isInstanceOf( | |
162 | + | else if ($isInstanceOf(m, "Unit")) | |
160 | 163 | then { | |
161 | - | let | |
164 | + | let n = m | |
162 | 165 | base58'2CsAf' | |
163 | 166 | } | |
164 | 167 | else throw("Match error") | |
165 | 168 | } | |
166 | - | let | |
167 | - | let | |
168 | - | if ($isInstanceOf( | |
169 | + | let E = { | |
170 | + | let m = assetInfo(A) | |
171 | + | if ($isInstanceOf(m, "Asset")) | |
169 | 172 | then { | |
170 | - | let | |
171 | - | toBase58String( | |
173 | + | let n = m | |
174 | + | toBase58String(n.issuer.bytes) | |
172 | 175 | } | |
173 | - | else if ($isInstanceOf( | |
176 | + | else if ($isInstanceOf(m, "Unit")) | |
174 | 177 | then { | |
175 | - | let | |
178 | + | let n = m | |
176 | 179 | "WAVES" | |
177 | 180 | } | |
178 | 181 | else throw("Match error") | |
179 | 182 | } | |
180 | - | (( | |
183 | + | ((y + "_") + E) | |
181 | 184 | } | |
182 | 185 | ||
183 | 186 | ||
184 | - | func | |
185 | - | let | |
186 | - | let | |
187 | - | if ($isInstanceOf( | |
187 | + | func F (y,G) = { | |
188 | + | let H = { | |
189 | + | let m = addressFromString(G._1) | |
190 | + | if ($isInstanceOf(m, "Address")) | |
188 | 191 | then { | |
189 | - | let | |
190 | - | | |
192 | + | let n = m | |
193 | + | n | |
191 | 194 | } | |
192 | - | else if ($isInstanceOf( | |
195 | + | else if ($isInstanceOf(m, "Unit")) | |
193 | 196 | then { | |
194 | - | let | |
197 | + | let n = m | |
195 | 198 | this | |
196 | 199 | } | |
197 | 200 | else throw("Match error") | |
198 | 201 | } | |
199 | - | if (( | |
200 | - | then ( | |
201 | - | else ( | |
202 | + | if ((G._3 != "WAVES")) | |
203 | + | then (y :+ ScriptTransfer(H, G._2, fromBase58String(G._3))) | |
204 | + | else (y :+ ScriptTransfer(H, G._2, unit)) | |
202 | 205 | } | |
203 | 206 | ||
204 | 207 | ||
205 | - | @Callable( | |
206 | - | func offerForSale ( | |
207 | - | then ( | |
208 | + | @Callable(r) | |
209 | + | func offerForSale (I,t) = if (!(if (p(g(I))) | |
210 | + | then (t > 0) | |
208 | 211 | else false)) | |
209 | 212 | then throw("Sale Asset incorrect") | |
210 | 213 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | if ($isInstanceOf( | |
214 | + | let J = value(r.payments[0]) | |
215 | + | let v = { | |
216 | + | let m = J.assetId | |
217 | + | if ($isInstanceOf(m, "ByteVector")) | |
215 | 218 | then { | |
216 | - | let | |
217 | - | | |
219 | + | let K = m | |
220 | + | K | |
218 | 221 | } | |
219 | - | else if ($isInstanceOf( | |
222 | + | else if ($isInstanceOf(m, "Unit")) | |
220 | 223 | then { | |
221 | - | let | |
224 | + | let L = m | |
222 | 225 | throw("Asset is not NFT") | |
223 | 226 | } | |
224 | 227 | else throw("Match error") | |
225 | 228 | } | |
226 | - | let | |
229 | + | let M = toBase58String(v) | |
227 | 230 | let b = { | |
228 | - | let | |
229 | - | if ($isInstanceOf( | |
231 | + | let m = assetInfo(v) | |
232 | + | if ($isInstanceOf(m, "Asset")) | |
230 | 233 | then { | |
231 | - | let | |
232 | - | | |
234 | + | let N = m | |
235 | + | N | |
233 | 236 | } | |
234 | 237 | else throw("Error getting information about asset") | |
235 | 238 | } | |
239 | 242 | then b.reissuable | |
240 | 243 | else false) | |
241 | 244 | then throw("Asset is not NFT") | |
242 | - | else [IntegerEntry(a( | |
245 | + | else [IntegerEntry(a(M), t), StringEntry(c(M), toBase58String(r.caller.bytes)), StringEntry(d(M), toBase58String(b.issuer.bytes)), StringEntry(e(M), b.name), StringEntry(f(M), b.description), StringEntry(h(M), I)] | |
243 | 246 | } | |
244 | 247 | ||
245 | 248 | ||
246 | 249 | ||
247 | - | @Callable( | |
248 | - | func offerForSwap ( | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | func | |
255 | - | then | |
256 | - | else | |
250 | + | @Callable(r) | |
251 | + | func offerForSwap (I) = { | |
252 | + | let O = size(r.payments) | |
253 | + | let y = { | |
254 | + | let P = r.payments | |
255 | + | let Q = size(P) | |
256 | + | let R = true | |
257 | + | func S (T,U) = if ((U >= Q)) | |
258 | + | then T | |
259 | + | else x(T, P[U]) | |
257 | 260 | ||
258 | - | func | |
259 | - | then | |
261 | + | func V (T,U) = if ((U >= Q)) | |
262 | + | then T | |
260 | 263 | else throw("List size exceeds 2") | |
261 | 264 | ||
262 | - | | |
265 | + | V(S(S(R, 0), 1), 2) | |
263 | 266 | } | |
264 | - | if (!( | |
267 | + | if (!(y)) | |
265 | 268 | then throw("Payments incorrect") | |
266 | - | else if (( | |
269 | + | else if ((j("commission") > r.payments[1].amount)) | |
267 | 270 | then throw("No minimum commission") | |
268 | 271 | else { | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | func | |
274 | - | then | |
275 | - | else | |
272 | + | let W = { | |
273 | + | let P = r.payments | |
274 | + | let Q = size(P) | |
275 | + | let R = "" | |
276 | + | func X (T,U) = if ((U >= Q)) | |
277 | + | then T | |
278 | + | else B(T, P[U]) | |
276 | 279 | ||
277 | - | func | |
278 | - | then | |
280 | + | func Y (T,U) = if ((U >= Q)) | |
281 | + | then T | |
279 | 282 | else throw("List size exceeds 2") | |
280 | 283 | ||
281 | - | X( | |
284 | + | Y(X(X(R, 0), 1), 2) | |
282 | 285 | } | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | func | |
288 | - | then | |
289 | - | else | |
286 | + | let E = { | |
287 | + | let P = r.payments | |
288 | + | let Q = size(P) | |
289 | + | let R = "" | |
290 | + | func Z (T,U) = if ((U >= Q)) | |
291 | + | then T | |
292 | + | else D(T, P[U]) | |
290 | 293 | ||
291 | - | func | |
292 | - | then | |
294 | + | func aa (T,U) = if ((U >= Q)) | |
295 | + | then T | |
293 | 296 | else throw("List size exceeds 2") | |
294 | 297 | ||
295 | - | Z( | |
298 | + | aa(Z(Z(R, 0), 1), 2) | |
296 | 299 | } | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | func | |
302 | - | then | |
303 | - | else | |
300 | + | let t = { | |
301 | + | let P = r.payments | |
302 | + | let Q = size(P) | |
303 | + | let R = "" | |
304 | + | func ab (T,U) = if ((U >= Q)) | |
305 | + | then T | |
306 | + | else C(T, P[U]) | |
304 | 307 | ||
305 | - | func | |
306 | - | then | |
308 | + | func ac (T,U) = if ((U >= Q)) | |
309 | + | then T | |
307 | 310 | else throw("List size exceeds 2") | |
308 | 311 | ||
309 | - | ab( | |
312 | + | ac(ab(ab(R, 0), 1), 2) | |
310 | 313 | } | |
311 | - | [StringEntry(a( | |
314 | + | [StringEntry((a(W) + "Swap"), t), StringEntry((c(W) + "Swap"), toBase58String(r.caller.bytes)), StringEntry((d(W) + "Swap"), E), StringEntry((h(W) + "Swap"), I)] | |
312 | 315 | } | |
313 | 316 | } | |
314 | 317 | ||
315 | 318 | ||
316 | 319 | ||
317 | - | @Callable( | |
318 | - | func buy ( | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | if ($isInstanceOf( | |
320 | + | @Callable(r) | |
321 | + | func buy (ad) = { | |
322 | + | let t = j(a(ad)) | |
323 | + | let s = o(h(ad)) | |
324 | + | let ae = o(c(ad)) | |
325 | + | let af = { | |
326 | + | let m = addressFromString(ae) | |
327 | + | if ($isInstanceOf(m, "Address")) | |
325 | 328 | then { | |
326 | - | let | |
327 | - | | |
329 | + | let N = m | |
330 | + | N | |
328 | 331 | } | |
329 | 332 | else throw("Address parsing error") | |
330 | 333 | } | |
331 | - | if (!( | |
334 | + | if (!(q(r, s, t))) | |
332 | 335 | then throw("Wrong payment amount or asset") | |
333 | - | else if (( | |
336 | + | else if ((ae == toBase58String(r.caller.bytes))) | |
334 | 337 | then throw("Owner cannot buy his NTF") | |
335 | - | else if (( | |
338 | + | else if ((t == 0)) | |
336 | 339 | then throw("This NFT is not for sale") | |
337 | 340 | else { | |
338 | - | let | |
339 | - | [ScriptTransfer( | |
341 | + | let ag = ((t / 100) * 5) | |
342 | + | [ScriptTransfer(r.caller, 1, fromBase58String(ad)), ScriptTransfer(af, (t - ag), unit), DeleteEntry(a(ad)), DeleteEntry(c(ad)), DeleteEntry(d(ad)), DeleteEntry(e(ad)), DeleteEntry(f(ad)), DeleteEntry(h(ad))] | |
340 | 343 | } | |
341 | 344 | } | |
342 | 345 | ||
343 | 346 | ||
344 | 347 | ||
345 | - | @Callable( | |
346 | - | func swapDone ( | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | if (( | |
348 | + | @Callable(r) | |
349 | + | func swapDone (ah) = { | |
350 | + | let t = o(a(ah)) | |
351 | + | let ai = o(h(ah)) | |
352 | + | let aj = o(c(ah)) | |
353 | + | let ak = o(c(ah)) | |
354 | + | if ((ak != toBase58String(r.caller.bytes))) | |
352 | 355 | then throw("The calling address is not the owner of the NFT token") | |
353 | - | else if (( | |
356 | + | else if ((t == "")) | |
354 | 357 | then throw("This NFT is not for sale") | |
355 | 358 | else { | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | [ScriptTransfer(addressFromStringValue( | |
359 | + | let ag = j("commission") | |
360 | + | let al = split(ah, "_") | |
361 | + | let am = split(t, "_") | |
362 | + | [ScriptTransfer(addressFromStringValue(ak), parseIntValue(am[0]), fromBase58String(al[0])), ScriptTransfer(addressFromStringValue(ak), (parseIntValue(am[1]) - ag), unit), ScriptTransfer(addressFromStringValue(aj), 1, fromBase58String(o(ah))), DeleteEntry(a(al[0])), DeleteEntry(c(al[0])), DeleteEntry(d(al[0])), DeleteEntry(e(al[0])), DeleteEntry(f(al[0])), DeleteEntry(a(ah)), DeleteEntry(c(ah)), DeleteEntry(d(ah))] | |
360 | 363 | } | |
361 | 364 | } | |
362 | 365 | ||
363 | 366 | ||
364 | 367 | ||
365 | - | @Callable( | |
366 | - | func cancelSelling ( | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
368 | + | @Callable(r) | |
369 | + | func cancelSelling (ad) = { | |
370 | + | let ae = o(c(ad)) | |
371 | + | let af = { | |
372 | + | let m = addressFromString(ae) | |
373 | + | if ($isInstanceOf(m, "Address")) | |
371 | 374 | then { | |
372 | - | let | |
373 | - | | |
375 | + | let N = m | |
376 | + | N | |
374 | 377 | } | |
375 | 378 | else throw("Address parsing error") | |
376 | 379 | } | |
377 | - | if (( | |
380 | + | if ((ae != toBase58String(r.caller.bytes))) | |
378 | 381 | then throw("The calling address is not the owner of the NFT token") | |
379 | - | else [ScriptTransfer( | |
382 | + | else [ScriptTransfer(r.caller, 1, fromBase58String(ad)), DeleteEntry(a(ad)), DeleteEntry(c(ad)), DeleteEntry(d(ad)), DeleteEntry(e(ad)), DeleteEntry(f(ad))] | |
380 | 383 | } | |
381 | 384 | ||
382 | 385 | ||
383 | 386 | ||
384 | - | @Callable( | |
385 | - | func swapCancel ( | |
386 | - | let | |
387 | - | let | |
388 | - | if (( | |
387 | + | @Callable(r) | |
388 | + | func swapCancel (ah) = { | |
389 | + | let aj = o(c(ah)) | |
390 | + | let t = o(a(ah)) | |
391 | + | if ((aj != toBase58String(r.caller.bytes))) | |
389 | 392 | then throw("The calling address is not the owner of the NFT token") | |
390 | 393 | else { | |
391 | - | let | |
392 | - | let | |
393 | - | [ScriptTransfer(addressFromStringValue( | |
394 | + | let al = split(ah, "_") | |
395 | + | let am = split(t, "_") | |
396 | + | [ScriptTransfer(addressFromStringValue(aj), parseIntValue(am[0]), fromBase58String(al[0])), ScriptTransfer(addressFromStringValue(aj), parseIntValue(am[1]), unit), DeleteEntry((a(ah) + "Swap")), DeleteEntry((c(ah) + "Swap")), DeleteEntry((d(ah) + "Swap"))] | |
394 | 397 | } | |
395 | 398 | } | |
396 | 399 | ||
397 | 400 | ||
398 | - | @Verifier( | |
399 | - | func | |
401 | + | @Verifier(an) | |
402 | + | func ao () = sigVerify(an.bodyBytes, an.proofs[0], an.senderPublicKey) | |
400 | 403 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = (b + "_price") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b) = (b + "_owner") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func d (b) = (b + "_issuer") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func e (b) = (b + "_name") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func f (b) = (b + "_description") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func g (b) = (b + "_assetBuy") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func h (b) = (b + "_offer") | |
23 | 23 | ||
24 | 24 | ||
25 | - | func i (j) = { | |
26 | - | let k = { | |
27 | - | let l = getInteger(this, j) | |
28 | - | if ($isInstanceOf(l, "Int")) | |
25 | + | func i (b) = (b + "_offer") | |
26 | + | ||
27 | + | ||
28 | + | func j (k) = { | |
29 | + | let l = { | |
30 | + | let m = getInteger(this, k) | |
31 | + | if ($isInstanceOf(m, "Int")) | |
29 | 32 | then { | |
30 | - | let | |
31 | - | | |
33 | + | let n = m | |
34 | + | n | |
32 | 35 | } | |
33 | 36 | else 0 | |
34 | 37 | } | |
35 | - | | |
38 | + | l | |
36 | 39 | } | |
37 | 40 | ||
38 | 41 | ||
39 | - | func | |
40 | - | let | |
41 | - | let | |
42 | - | if ($isInstanceOf( | |
42 | + | func o (k) = { | |
43 | + | let l = { | |
44 | + | let m = getString(this, k) | |
45 | + | if ($isInstanceOf(m, "String")) | |
43 | 46 | then { | |
44 | - | let | |
45 | - | | |
47 | + | let n = m | |
48 | + | n | |
46 | 49 | } | |
47 | 50 | else "" | |
48 | 51 | } | |
49 | - | | |
52 | + | l | |
50 | 53 | } | |
51 | 54 | ||
52 | 55 | ||
53 | - | func | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
56 | + | func p (k) = { | |
57 | + | let l = { | |
58 | + | let m = getBoolean(this, k) | |
59 | + | if ($isInstanceOf(m, "Boolean")) | |
57 | 60 | then { | |
58 | - | let | |
59 | - | | |
61 | + | let n = m | |
62 | + | n | |
60 | 63 | } | |
61 | 64 | else false | |
62 | 65 | } | |
63 | - | | |
66 | + | l | |
64 | 67 | } | |
65 | 68 | ||
66 | 69 | ||
67 | - | func | |
70 | + | func q (r,s,t) = if ((size(r.payments) == 0)) | |
68 | 71 | then throw("Payment not attached") | |
69 | 72 | else { | |
70 | - | let | |
71 | - | let | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
73 | + | let u = value(r.payments[0]) | |
74 | + | let l = { | |
75 | + | let m = u.assetId | |
76 | + | if ($isInstanceOf(m, "ByteVector")) | |
74 | 77 | then { | |
75 | - | let | |
76 | - | if ((toBase58String( | |
77 | - | then ( | |
78 | + | let v = m | |
79 | + | if ((toBase58String(v) == s)) | |
80 | + | then (u.amount >= t) | |
78 | 81 | else false | |
79 | 82 | } | |
80 | - | else if ($isInstanceOf( | |
83 | + | else if ($isInstanceOf(m, "Unit")) | |
81 | 84 | then { | |
82 | - | let | |
83 | - | ( | |
85 | + | let w = m | |
86 | + | (u.amount >= t) | |
84 | 87 | } | |
85 | 88 | else throw("Match error") | |
86 | 89 | } | |
87 | - | | |
90 | + | l | |
88 | 91 | } | |
89 | 92 | ||
90 | 93 | ||
91 | - | func | |
92 | - | let | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
94 | + | func x (y,z) = { | |
95 | + | let A = { | |
96 | + | let m = z.assetId | |
97 | + | if ($isInstanceOf(m, "ByteVector")) | |
95 | 98 | then { | |
96 | - | let | |
97 | - | | |
99 | + | let n = m | |
100 | + | n | |
98 | 101 | } | |
99 | - | else if ($isInstanceOf( | |
102 | + | else if ($isInstanceOf(m, "Unit")) | |
100 | 103 | then { | |
101 | - | let | |
104 | + | let n = m | |
102 | 105 | base58'2CsAf' | |
103 | 106 | } | |
104 | 107 | else throw("Match error") | |
105 | 108 | } | |
106 | 109 | let b = { | |
107 | - | let | |
108 | - | if ($isInstanceOf( | |
110 | + | let m = assetInfo(A) | |
111 | + | if ($isInstanceOf(m, "Asset")) | |
109 | 112 | then { | |
110 | - | let | |
111 | - | toBase58String( | |
113 | + | let n = m | |
114 | + | toBase58String(n.issuer.bytes) | |
112 | 115 | } | |
113 | - | else if ($isInstanceOf( | |
116 | + | else if ($isInstanceOf(m, "Unit")) | |
114 | 117 | then { | |
115 | - | let | |
118 | + | let w = m | |
116 | 119 | "WAVES" | |
117 | 120 | } | |
118 | 121 | else throw("Match error") | |
119 | 122 | } | |
120 | - | if ( | |
121 | - | then | |
123 | + | if (p(b)) | |
124 | + | then y | |
122 | 125 | else false | |
123 | 126 | } | |
124 | 127 | ||
125 | 128 | ||
126 | - | func | |
127 | - | let | |
128 | - | let | |
129 | - | if ($isInstanceOf( | |
129 | + | func B (y,z) = { | |
130 | + | let A = { | |
131 | + | let m = z.assetId | |
132 | + | if ($isInstanceOf(m, "ByteVector")) | |
130 | 133 | then { | |
131 | - | let | |
132 | - | toBase58String( | |
134 | + | let n = m | |
135 | + | toBase58String(n) | |
133 | 136 | } | |
134 | - | else if ($isInstanceOf( | |
137 | + | else if ($isInstanceOf(m, "Unit")) | |
135 | 138 | then { | |
136 | - | let | |
139 | + | let n = m | |
137 | 140 | "WAVES" | |
138 | 141 | } | |
139 | 142 | else throw("Match error") | |
140 | 143 | } | |
141 | - | (( | |
144 | + | ((y + "_") + A) | |
142 | 145 | } | |
143 | 146 | ||
144 | 147 | ||
145 | - | func | |
146 | - | let | |
147 | - | (( | |
148 | + | func C (y,z) = { | |
149 | + | let t = toString(z.amount) | |
150 | + | ((y + "_") + t) | |
148 | 151 | } | |
149 | 152 | ||
150 | 153 | ||
151 | - | func | |
152 | - | let | |
153 | - | let | |
154 | - | if ($isInstanceOf( | |
154 | + | func D (y,z) = { | |
155 | + | let A = { | |
156 | + | let m = z.assetId | |
157 | + | if ($isInstanceOf(m, "ByteVector")) | |
155 | 158 | then { | |
156 | - | let | |
157 | - | | |
159 | + | let n = m | |
160 | + | n | |
158 | 161 | } | |
159 | - | else if ($isInstanceOf( | |
162 | + | else if ($isInstanceOf(m, "Unit")) | |
160 | 163 | then { | |
161 | - | let | |
164 | + | let n = m | |
162 | 165 | base58'2CsAf' | |
163 | 166 | } | |
164 | 167 | else throw("Match error") | |
165 | 168 | } | |
166 | - | let | |
167 | - | let | |
168 | - | if ($isInstanceOf( | |
169 | + | let E = { | |
170 | + | let m = assetInfo(A) | |
171 | + | if ($isInstanceOf(m, "Asset")) | |
169 | 172 | then { | |
170 | - | let | |
171 | - | toBase58String( | |
173 | + | let n = m | |
174 | + | toBase58String(n.issuer.bytes) | |
172 | 175 | } | |
173 | - | else if ($isInstanceOf( | |
176 | + | else if ($isInstanceOf(m, "Unit")) | |
174 | 177 | then { | |
175 | - | let | |
178 | + | let n = m | |
176 | 179 | "WAVES" | |
177 | 180 | } | |
178 | 181 | else throw("Match error") | |
179 | 182 | } | |
180 | - | (( | |
183 | + | ((y + "_") + E) | |
181 | 184 | } | |
182 | 185 | ||
183 | 186 | ||
184 | - | func | |
185 | - | let | |
186 | - | let | |
187 | - | if ($isInstanceOf( | |
187 | + | func F (y,G) = { | |
188 | + | let H = { | |
189 | + | let m = addressFromString(G._1) | |
190 | + | if ($isInstanceOf(m, "Address")) | |
188 | 191 | then { | |
189 | - | let | |
190 | - | | |
192 | + | let n = m | |
193 | + | n | |
191 | 194 | } | |
192 | - | else if ($isInstanceOf( | |
195 | + | else if ($isInstanceOf(m, "Unit")) | |
193 | 196 | then { | |
194 | - | let | |
197 | + | let n = m | |
195 | 198 | this | |
196 | 199 | } | |
197 | 200 | else throw("Match error") | |
198 | 201 | } | |
199 | - | if (( | |
200 | - | then ( | |
201 | - | else ( | |
202 | + | if ((G._3 != "WAVES")) | |
203 | + | then (y :+ ScriptTransfer(H, G._2, fromBase58String(G._3))) | |
204 | + | else (y :+ ScriptTransfer(H, G._2, unit)) | |
202 | 205 | } | |
203 | 206 | ||
204 | 207 | ||
205 | - | @Callable( | |
206 | - | func offerForSale ( | |
207 | - | then ( | |
208 | + | @Callable(r) | |
209 | + | func offerForSale (I,t) = if (!(if (p(g(I))) | |
210 | + | then (t > 0) | |
208 | 211 | else false)) | |
209 | 212 | then throw("Sale Asset incorrect") | |
210 | 213 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | if ($isInstanceOf( | |
214 | + | let J = value(r.payments[0]) | |
215 | + | let v = { | |
216 | + | let m = J.assetId | |
217 | + | if ($isInstanceOf(m, "ByteVector")) | |
215 | 218 | then { | |
216 | - | let | |
217 | - | | |
219 | + | let K = m | |
220 | + | K | |
218 | 221 | } | |
219 | - | else if ($isInstanceOf( | |
222 | + | else if ($isInstanceOf(m, "Unit")) | |
220 | 223 | then { | |
221 | - | let | |
224 | + | let L = m | |
222 | 225 | throw("Asset is not NFT") | |
223 | 226 | } | |
224 | 227 | else throw("Match error") | |
225 | 228 | } | |
226 | - | let | |
229 | + | let M = toBase58String(v) | |
227 | 230 | let b = { | |
228 | - | let | |
229 | - | if ($isInstanceOf( | |
231 | + | let m = assetInfo(v) | |
232 | + | if ($isInstanceOf(m, "Asset")) | |
230 | 233 | then { | |
231 | - | let | |
232 | - | | |
234 | + | let N = m | |
235 | + | N | |
233 | 236 | } | |
234 | 237 | else throw("Error getting information about asset") | |
235 | 238 | } | |
236 | 239 | if (if (if ((b.quantity != 1)) | |
237 | 240 | then (b.decimals != 0) | |
238 | 241 | else false) | |
239 | 242 | then b.reissuable | |
240 | 243 | else false) | |
241 | 244 | then throw("Asset is not NFT") | |
242 | - | else [IntegerEntry(a( | |
245 | + | else [IntegerEntry(a(M), t), StringEntry(c(M), toBase58String(r.caller.bytes)), StringEntry(d(M), toBase58String(b.issuer.bytes)), StringEntry(e(M), b.name), StringEntry(f(M), b.description), StringEntry(h(M), I)] | |
243 | 246 | } | |
244 | 247 | ||
245 | 248 | ||
246 | 249 | ||
247 | - | @Callable( | |
248 | - | func offerForSwap ( | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | func | |
255 | - | then | |
256 | - | else | |
250 | + | @Callable(r) | |
251 | + | func offerForSwap (I) = { | |
252 | + | let O = size(r.payments) | |
253 | + | let y = { | |
254 | + | let P = r.payments | |
255 | + | let Q = size(P) | |
256 | + | let R = true | |
257 | + | func S (T,U) = if ((U >= Q)) | |
258 | + | then T | |
259 | + | else x(T, P[U]) | |
257 | 260 | ||
258 | - | func | |
259 | - | then | |
261 | + | func V (T,U) = if ((U >= Q)) | |
262 | + | then T | |
260 | 263 | else throw("List size exceeds 2") | |
261 | 264 | ||
262 | - | | |
265 | + | V(S(S(R, 0), 1), 2) | |
263 | 266 | } | |
264 | - | if (!( | |
267 | + | if (!(y)) | |
265 | 268 | then throw("Payments incorrect") | |
266 | - | else if (( | |
269 | + | else if ((j("commission") > r.payments[1].amount)) | |
267 | 270 | then throw("No minimum commission") | |
268 | 271 | else { | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | func | |
274 | - | then | |
275 | - | else | |
272 | + | let W = { | |
273 | + | let P = r.payments | |
274 | + | let Q = size(P) | |
275 | + | let R = "" | |
276 | + | func X (T,U) = if ((U >= Q)) | |
277 | + | then T | |
278 | + | else B(T, P[U]) | |
276 | 279 | ||
277 | - | func | |
278 | - | then | |
280 | + | func Y (T,U) = if ((U >= Q)) | |
281 | + | then T | |
279 | 282 | else throw("List size exceeds 2") | |
280 | 283 | ||
281 | - | X( | |
284 | + | Y(X(X(R, 0), 1), 2) | |
282 | 285 | } | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | func | |
288 | - | then | |
289 | - | else | |
286 | + | let E = { | |
287 | + | let P = r.payments | |
288 | + | let Q = size(P) | |
289 | + | let R = "" | |
290 | + | func Z (T,U) = if ((U >= Q)) | |
291 | + | then T | |
292 | + | else D(T, P[U]) | |
290 | 293 | ||
291 | - | func | |
292 | - | then | |
294 | + | func aa (T,U) = if ((U >= Q)) | |
295 | + | then T | |
293 | 296 | else throw("List size exceeds 2") | |
294 | 297 | ||
295 | - | Z( | |
298 | + | aa(Z(Z(R, 0), 1), 2) | |
296 | 299 | } | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | func | |
302 | - | then | |
303 | - | else | |
300 | + | let t = { | |
301 | + | let P = r.payments | |
302 | + | let Q = size(P) | |
303 | + | let R = "" | |
304 | + | func ab (T,U) = if ((U >= Q)) | |
305 | + | then T | |
306 | + | else C(T, P[U]) | |
304 | 307 | ||
305 | - | func | |
306 | - | then | |
308 | + | func ac (T,U) = if ((U >= Q)) | |
309 | + | then T | |
307 | 310 | else throw("List size exceeds 2") | |
308 | 311 | ||
309 | - | ab( | |
312 | + | ac(ab(ab(R, 0), 1), 2) | |
310 | 313 | } | |
311 | - | [StringEntry(a( | |
314 | + | [StringEntry((a(W) + "Swap"), t), StringEntry((c(W) + "Swap"), toBase58String(r.caller.bytes)), StringEntry((d(W) + "Swap"), E), StringEntry((h(W) + "Swap"), I)] | |
312 | 315 | } | |
313 | 316 | } | |
314 | 317 | ||
315 | 318 | ||
316 | 319 | ||
317 | - | @Callable( | |
318 | - | func buy ( | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | if ($isInstanceOf( | |
320 | + | @Callable(r) | |
321 | + | func buy (ad) = { | |
322 | + | let t = j(a(ad)) | |
323 | + | let s = o(h(ad)) | |
324 | + | let ae = o(c(ad)) | |
325 | + | let af = { | |
326 | + | let m = addressFromString(ae) | |
327 | + | if ($isInstanceOf(m, "Address")) | |
325 | 328 | then { | |
326 | - | let | |
327 | - | | |
329 | + | let N = m | |
330 | + | N | |
328 | 331 | } | |
329 | 332 | else throw("Address parsing error") | |
330 | 333 | } | |
331 | - | if (!( | |
334 | + | if (!(q(r, s, t))) | |
332 | 335 | then throw("Wrong payment amount or asset") | |
333 | - | else if (( | |
336 | + | else if ((ae == toBase58String(r.caller.bytes))) | |
334 | 337 | then throw("Owner cannot buy his NTF") | |
335 | - | else if (( | |
338 | + | else if ((t == 0)) | |
336 | 339 | then throw("This NFT is not for sale") | |
337 | 340 | else { | |
338 | - | let | |
339 | - | [ScriptTransfer( | |
341 | + | let ag = ((t / 100) * 5) | |
342 | + | [ScriptTransfer(r.caller, 1, fromBase58String(ad)), ScriptTransfer(af, (t - ag), unit), DeleteEntry(a(ad)), DeleteEntry(c(ad)), DeleteEntry(d(ad)), DeleteEntry(e(ad)), DeleteEntry(f(ad)), DeleteEntry(h(ad))] | |
340 | 343 | } | |
341 | 344 | } | |
342 | 345 | ||
343 | 346 | ||
344 | 347 | ||
345 | - | @Callable( | |
346 | - | func swapDone ( | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | if (( | |
348 | + | @Callable(r) | |
349 | + | func swapDone (ah) = { | |
350 | + | let t = o(a(ah)) | |
351 | + | let ai = o(h(ah)) | |
352 | + | let aj = o(c(ah)) | |
353 | + | let ak = o(c(ah)) | |
354 | + | if ((ak != toBase58String(r.caller.bytes))) | |
352 | 355 | then throw("The calling address is not the owner of the NFT token") | |
353 | - | else if (( | |
356 | + | else if ((t == "")) | |
354 | 357 | then throw("This NFT is not for sale") | |
355 | 358 | else { | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | [ScriptTransfer(addressFromStringValue( | |
359 | + | let ag = j("commission") | |
360 | + | let al = split(ah, "_") | |
361 | + | let am = split(t, "_") | |
362 | + | [ScriptTransfer(addressFromStringValue(ak), parseIntValue(am[0]), fromBase58String(al[0])), ScriptTransfer(addressFromStringValue(ak), (parseIntValue(am[1]) - ag), unit), ScriptTransfer(addressFromStringValue(aj), 1, fromBase58String(o(ah))), DeleteEntry(a(al[0])), DeleteEntry(c(al[0])), DeleteEntry(d(al[0])), DeleteEntry(e(al[0])), DeleteEntry(f(al[0])), DeleteEntry(a(ah)), DeleteEntry(c(ah)), DeleteEntry(d(ah))] | |
360 | 363 | } | |
361 | 364 | } | |
362 | 365 | ||
363 | 366 | ||
364 | 367 | ||
365 | - | @Callable( | |
366 | - | func cancelSelling ( | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | if ($isInstanceOf( | |
368 | + | @Callable(r) | |
369 | + | func cancelSelling (ad) = { | |
370 | + | let ae = o(c(ad)) | |
371 | + | let af = { | |
372 | + | let m = addressFromString(ae) | |
373 | + | if ($isInstanceOf(m, "Address")) | |
371 | 374 | then { | |
372 | - | let | |
373 | - | | |
375 | + | let N = m | |
376 | + | N | |
374 | 377 | } | |
375 | 378 | else throw("Address parsing error") | |
376 | 379 | } | |
377 | - | if (( | |
380 | + | if ((ae != toBase58String(r.caller.bytes))) | |
378 | 381 | then throw("The calling address is not the owner of the NFT token") | |
379 | - | else [ScriptTransfer( | |
382 | + | else [ScriptTransfer(r.caller, 1, fromBase58String(ad)), DeleteEntry(a(ad)), DeleteEntry(c(ad)), DeleteEntry(d(ad)), DeleteEntry(e(ad)), DeleteEntry(f(ad))] | |
380 | 383 | } | |
381 | 384 | ||
382 | 385 | ||
383 | 386 | ||
384 | - | @Callable( | |
385 | - | func swapCancel ( | |
386 | - | let | |
387 | - | let | |
388 | - | if (( | |
387 | + | @Callable(r) | |
388 | + | func swapCancel (ah) = { | |
389 | + | let aj = o(c(ah)) | |
390 | + | let t = o(a(ah)) | |
391 | + | if ((aj != toBase58String(r.caller.bytes))) | |
389 | 392 | then throw("The calling address is not the owner of the NFT token") | |
390 | 393 | else { | |
391 | - | let | |
392 | - | let | |
393 | - | [ScriptTransfer(addressFromStringValue( | |
394 | + | let al = split(ah, "_") | |
395 | + | let am = split(t, "_") | |
396 | + | [ScriptTransfer(addressFromStringValue(aj), parseIntValue(am[0]), fromBase58String(al[0])), ScriptTransfer(addressFromStringValue(aj), parseIntValue(am[1]), unit), DeleteEntry((a(ah) + "Swap")), DeleteEntry((c(ah) + "Swap")), DeleteEntry((d(ah) + "Swap"))] | |
394 | 397 | } | |
395 | 398 | } | |
396 | 399 | ||
397 | 400 | ||
398 | - | @Verifier( | |
399 | - | func | |
401 | + | @Verifier(an) | |
402 | + | func ao () = sigVerify(an.bodyBytes, an.proofs[0], an.senderPublicKey) | |
400 | 403 |
github/deemru/w8io/026f985 128.85 ms ◑