tx · J2Zgg1HDZU9vvoMKk8ZX3M5HpFy2eV7pcSZ9XxkLXCvz 3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P: -0.50000000 Waves 2022.11.29 12:47 [2338226] smart account 3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P > SELF 0.00000000 Waves
{ "type": 13, "id": "J2Zgg1HDZU9vvoMKk8ZX3M5HpFy2eV7pcSZ9XxkLXCvz", "fee": 50000000, "feeAssetId": null, "timestamp": 1669715086042, "version": 2, "chainId": 84, "sender": "3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P", "senderPublicKey": "BTvXQMmkgSf57dbcqWxpEvbi3ZYcEeWFkkXDZC6FrneM", "proofs": [ "2rtvS9svjyQCv2jaeGibkSiig1P2VRn65WvGZky4K3tRDVJohw8BkAQwhdEe8mpLW4gwYxff7MxTf45HL6Ef7LrN" ], "script": "base64:BgJACAISCwoJCAgICAgBCAgIEgQKAggIEgMKAQgSAwoBARIDCgEBEgUKAwEICBIDCgEIEgMKAQgSAwoBCBIECgIIASYACXNlcGFyYXRvcgIBXwAIa0F1Y3Rpb24CB2F1Y3Rpb24ABWtTZWxsAgRzZWxsAAhrVHJ1c3RlZAIHdHJ1c3RlZAAGa1ByaWNlAgVwcmljZQEKZ2V0U2xvdEtleQIGcHJlZml4BW5mdElkCQCsAgIJAKwCAgUGcHJlZml4BQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBC2dldFByaWNlS2V5AQVuZnRJZAkArAICCQCsAgIFBmtQcmljZQUJc2VwYXJhdG9yCQDYBAEFBW5mdElkAQpnZXRTZWxsS2V5AQVuZnRJZAkArAICCQCsAgIFBWtTZWxsBQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBDWdldEF1Y3Rpb25LZXkBBW5mdElkCQCsAgIJAKwCAgUIa0F1Y3Rpb24FCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAENZ2V0VHJ1c3RlZEtleQEGaXNzdWVyCQCsAgIJAKwC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NBZG1pbgEIBQFpBmNhbGxlcgkAAgECCk9ubHkgYWRtaW4JAMwIAgkBDEJvb2xlYW5FbnRyeQIJAQ1nZXRUcnVzdGVkS2V5AQkBEUBleHRyTmF0aXZlKDEwNjIpAQULdHJ1c3RlZEFkZHIGBQNuaWwBaQEXZ2V0UHJpY2VBdEN1cnJlbnRNb21lbnQCBW5mdElkBm1vbWVudAQHYXNzZXRJZAkA2QQBBQVuZnRJZAQNJHQwMTA2MzYxMDY5OQkBGGNhbGNQcmljZUF0Q3VycmVudE1vbWVudAIFB2Fzc2V0SWQFBm1vbWVudAQGc2VsbGVyCAUNJHQwMTA2MzYxMDY5OQJfMQQFcHJpY2UIBQ0kdDAxMDYzNjEwNjk5Al8yCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQELZ2V0UHJpY2VLZXkBBQdhc3NldElkBQVwcmljZQUDbmlsAG3a/hQ=", "height": 2338226, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8ZkooeGEoC3iGNdGZqnxgRkJvqhwwXAzkX17bbyyhAAM Next: BBNt8wqWCwKVh2NsTVKiVUcZzAWhpZRTWERJpfseC44c Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "_" | |
5 | + | ||
6 | + | let b = "auction" | |
7 | + | ||
8 | + | let c = "sell" | |
9 | + | ||
10 | + | let d = "trusted" | |
11 | + | ||
12 | + | let e = "price" | |
13 | + | ||
14 | + | func f (g,h) = ((g + a) + toBase58String(h)) | |
4 | 15 | ||
5 | 16 | ||
6 | - | @Callable(a) | |
7 | - | func sellart (b,c,d,e,f) = { | |
8 | - | let g = toBase58String(a.transactionId) | |
9 | - | WriteSet([DataEntry((g + "_organizer"), toBase58String(a.caller.bytes)), DataEntry((g + "_startPrice"), c), DataEntry((g + "_priceAssetId"), e), DataEntry((g + "_maxMintnft"), d), DataEntry((g + "_BlockEnd"), f)]) | |
17 | + | func i (h) = ((e + a) + toBase58String(h)) | |
18 | + | ||
19 | + | ||
20 | + | func j (h) = ((c + a) + toBase58String(h)) | |
21 | + | ||
22 | + | ||
23 | + | func k (h) = ((b + a) + toBase58String(h)) | |
24 | + | ||
25 | + | ||
26 | + | func l (m) = ((d + a) + toString(m)) | |
27 | + | ||
28 | + | ||
29 | + | func n (o,p) = (o ++ [p]) | |
30 | + | ||
31 | + | ||
32 | + | func q (r) = { | |
33 | + | let s = size(r) | |
34 | + | if ((s == 0)) | |
35 | + | then throw("Empty params") | |
36 | + | else if ((s == 1)) | |
37 | + | then makeString({ | |
38 | + | let t = r | |
39 | + | let u = size(t) | |
40 | + | let v = nil | |
41 | + | func w (x,y) = if ((y >= u)) | |
42 | + | then x | |
43 | + | else n(x, t[y]) | |
44 | + | ||
45 | + | func z (x,y) = if ((y >= u)) | |
46 | + | then x | |
47 | + | else throw("List size exceeds 1") | |
48 | + | ||
49 | + | z(w(v, 0), 1) | |
50 | + | }, a) | |
51 | + | else if ((s == 2)) | |
52 | + | then makeString({ | |
53 | + | let t = r | |
54 | + | let u = size(t) | |
55 | + | let v = nil | |
56 | + | func w (x,y) = if ((y >= u)) | |
57 | + | then x | |
58 | + | else n(x, t[y]) | |
59 | + | ||
60 | + | func z (x,y) = if ((y >= u)) | |
61 | + | then x | |
62 | + | else throw("List size exceeds 2") | |
63 | + | ||
64 | + | z(w(w(v, 0), 1), 2) | |
65 | + | }, a) | |
66 | + | else if ((s == 3)) | |
67 | + | then makeString({ | |
68 | + | let t = r | |
69 | + | let u = size(t) | |
70 | + | let v = nil | |
71 | + | func w (x,y) = if ((y >= u)) | |
72 | + | then x | |
73 | + | else n(x, t[y]) | |
74 | + | ||
75 | + | func z (x,y) = if ((y >= u)) | |
76 | + | then x | |
77 | + | else throw("List size exceeds 3") | |
78 | + | ||
79 | + | z(w(w(w(v, 0), 1), 2), 3) | |
80 | + | }, a) | |
81 | + | else if ((s == 4)) | |
82 | + | then makeString({ | |
83 | + | let t = r | |
84 | + | let u = size(t) | |
85 | + | let v = nil | |
86 | + | func w (x,y) = if ((y >= u)) | |
87 | + | then x | |
88 | + | else n(x, t[y]) | |
89 | + | ||
90 | + | func z (x,y) = if ((y >= u)) | |
91 | + | then x | |
92 | + | else throw("List size exceeds 4") | |
93 | + | ||
94 | + | z(w(w(w(w(v, 0), 1), 2), 3), 4) | |
95 | + | }, a) | |
96 | + | else if ((s == 5)) | |
97 | + | then makeString({ | |
98 | + | let t = r | |
99 | + | let u = size(t) | |
100 | + | let v = nil | |
101 | + | func w (x,y) = if ((y >= u)) | |
102 | + | then x | |
103 | + | else n(x, t[y]) | |
104 | + | ||
105 | + | func z (x,y) = if ((y >= u)) | |
106 | + | then x | |
107 | + | else throw("List size exceeds 5") | |
108 | + | ||
109 | + | z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5) | |
110 | + | }, a) | |
111 | + | else throw("Max number of parameters exceeded") | |
10 | 112 | } | |
11 | 113 | ||
12 | 114 | ||
13 | - | @Verifier(h) | |
14 | - | func i () = sigVerify(h.bodyBytes, h.proofs[0], h.senderPublicKey) | |
115 | + | func A (B) = { | |
116 | + | let C = split(B, a) | |
117 | + | $Tuple5(addressFromStringValue(C[0]), parseIntValue(C[1]), parseIntValue(C[2]), parseIntValue(C[3]), parseIntValue(C[4])) | |
118 | + | } | |
119 | + | ||
120 | + | ||
121 | + | func D (B) = { | |
122 | + | let C = split(B, a) | |
123 | + | $Tuple2(addressFromStringValue(C[0]), parseIntValue(C[1])) | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | func E (r) = { | |
128 | + | let F = r | |
129 | + | if ($isInstanceOf(F, "(Address, Int, String, String)")) | |
130 | + | then { | |
131 | + | let G = F | |
132 | + | q([toString(G._1), toString(G._2), G._3, G._4]) | |
133 | + | } | |
134 | + | else if ($isInstanceOf(F, "(Address, Int)")) | |
135 | + | then { | |
136 | + | let H = F | |
137 | + | q([toString(H._1), toString(H._2)]) | |
138 | + | } | |
139 | + | else throw("Wrong params tupple") | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | func I (J,h,K,L,M) = StringEntry(k(h), E($Tuple4(J, K, L, M))) | |
144 | + | ||
145 | + | ||
146 | + | func N (h,O,P) = StringEntry(j(h), E($Tuple2(O, P))) | |
147 | + | ||
148 | + | ||
149 | + | func Q (h) = value(getString(this, k(h))) | |
150 | + | ||
151 | + | ||
152 | + | func R (h) = value(getString(this, j(h))) | |
153 | + | ||
154 | + | ||
155 | + | func S (T,U) = { | |
156 | + | let B = Q(T) | |
157 | + | let V = A(B) | |
158 | + | let J = V._1 | |
159 | + | let W = V._2 | |
160 | + | let X = V._3 | |
161 | + | let Y = V._4 | |
162 | + | let Z = V._5 | |
163 | + | if ((U >= Z)) | |
164 | + | then $Tuple2(J, X) | |
165 | + | else { | |
166 | + | let aa = (W - X) | |
167 | + | let ab = (Z - Y) | |
168 | + | let ac = (U - Y) | |
169 | + | $Tuple2(J, (W - fraction(ac, aa, ab))) | |
170 | + | } | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | func ad (T) = { | |
175 | + | let F = assetInfo(T) | |
176 | + | if ($isInstanceOf(F, "Asset")) | |
177 | + | then { | |
178 | + | let ae = F | |
179 | + | if (if ((ae.decimals == 0)) | |
180 | + | then (ae.quantity == 1) | |
181 | + | else false) | |
182 | + | then (ae.reissuable == false) | |
183 | + | else false | |
184 | + | } | |
185 | + | else false | |
186 | + | } | |
187 | + | ||
188 | + | ||
189 | + | func af (T) = { | |
190 | + | let m = value(assetInfo(T)).issuer | |
191 | + | valueOrElse(getBoolean(this, l(m)), false) | |
192 | + | } | |
193 | + | ||
194 | + | ||
195 | + | func ag (T) = isDefined(getString(this, j(T))) | |
196 | + | ||
197 | + | ||
198 | + | func ah (T) = isDefined(getString(this, k(T))) | |
199 | + | ||
200 | + | ||
201 | + | func ai (P) = (P > 0) | |
202 | + | ||
203 | + | ||
204 | + | func aj (K,ak) = (K > ak) | |
205 | + | ||
206 | + | ||
207 | + | func al (am) = (am == this) | |
208 | + | ||
209 | + | ||
210 | + | func an (am,J) = if ((am == this)) | |
211 | + | then true | |
212 | + | else (am == J) | |
213 | + | ||
214 | + | ||
215 | + | func ao (ap,M) = (ap > M) | |
216 | + | ||
217 | + | ||
218 | + | func aq (ar,as) = (ar >= as) | |
219 | + | ||
220 | + | ||
221 | + | func at (T) = (T == unit) | |
222 | + | ||
223 | + | ||
224 | + | func au (h) = if (!(ad(h))) | |
225 | + | then throw("Token is not Nft") | |
226 | + | else if (ag(h)) | |
227 | + | then throw("Sell already exists") | |
228 | + | else if (ah(h)) | |
229 | + | then throw("Auction already exists") | |
230 | + | else unit | |
231 | + | ||
232 | + | ||
233 | + | func av (aw,ax,P) = if (!(at(aw))) | |
234 | + | then throw("Payment must be at WAVES") | |
235 | + | else if (!(aq(ax, P))) | |
236 | + | then throw("Not enough funds") | |
237 | + | else unit | |
238 | + | ||
239 | + | ||
240 | + | func ay () = 0 | |
241 | + | ||
242 | + | ||
243 | + | func az () = 0 | |
244 | + | ||
245 | + | ||
246 | + | func aA (aB,ax,aC) = if (aB) | |
247 | + | then $Tuple2((aC - az()), (ax - aC)) | |
248 | + | else $Tuple2((aC - ay()), (ax - aC)) | |
249 | + | ||
250 | + | ||
251 | + | func aD (h) = if (ag(h)) | |
252 | + | then $Tuple2(c, R(h)) | |
253 | + | else if (ah(h)) | |
254 | + | then $Tuple2(b, Q(h)) | |
255 | + | else throw("Slot doesn`t exist") | |
256 | + | ||
257 | + | ||
258 | + | let aE = "buy" | |
259 | + | ||
260 | + | @Callable(aF) | |
261 | + | func createNFT (aG,aH,aI,aJ,aK,aL,aM,aN,aO) = { | |
262 | + | let aP = Issue(aG, aM, 1, 0, false) | |
263 | + | let aQ = calculateAssetId(aP) | |
264 | + | let aR = aF.transactionId | |
265 | + | [aP, ScriptTransfer(aF.caller, 1, aQ), StringEntry(((toBase58String(aQ) + a) + "Owner"), toString(aF.caller)), StringEntry(((toBase58String(aQ) + a) + "nft_type"), aJ), StringEntry(((toBase58String(aQ) + a) + "nft_tags"), aK), StringEntry(((toBase58String(aQ) + a) + "nft_dAppAddress"), aI), IntegerEntry(((toBase58String(aQ) + a) + "nft_selling_price"), aL), StringEntry(((toBase58String(aQ) + a) + "nft_onSell"), aN), StringEntry(((toBase58String(aQ) + a) + "nft_data"), aO), StringEntry(((toBase58String(aR) + a) + "issue_nft"), toBase58String(aQ))] | |
266 | + | } | |
267 | + | ||
268 | + | ||
269 | + | ||
270 | + | @Callable(aF) | |
271 | + | func issueNft (aS,aT) = { | |
272 | + | let aP = Issue(aS, aT, 1, 0, false) | |
273 | + | let aQ = calculateAssetId(aP) | |
274 | + | [aP, ScriptTransfer(aF.caller, 1, aQ), StringEntry(((toBase58String(aQ) + a) + "Owner"), toString(aF.caller))] | |
275 | + | } | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(aF) | |
280 | + | func buyNFT (aU) = { | |
281 | + | let T = fromBase58String(aU) | |
282 | + | let aV = value(aF.payments[0].amount) | |
283 | + | let P = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT") | |
284 | + | let aW = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner") | |
285 | + | if ((aF.payments[0].assetId != unit)) | |
286 | + | then throw("Pay in waves") | |
287 | + | else if ((parseIntValue(P) > aV)) | |
288 | + | then throw("Invalid payment") | |
289 | + | else [ScriptTransfer(aF.caller, 1, T), ScriptTransfer(value(addressFromString(aW)), parseIntValue(P), unit), StringEntry(((toString(aF.caller) + a) + aE), ((aU + a) + toString(aV)))] | |
290 | + | } | |
291 | + | ||
292 | + | ||
293 | + | ||
294 | + | @Callable(aF) | |
295 | + | func sellNFT (P) = { | |
296 | + | let aX = $Tuple2(value(aF.payments[0].assetId), value(aF.payments[0].amount)) | |
297 | + | let aY = aX._1 | |
298 | + | let aZ = aX._2 | |
299 | + | if (!(ad(aY))) | |
300 | + | then throw("Token is not NFT") | |
301 | + | else [StringEntry(((e + a) + toBase58String(value(aF.payments[0].assetId))), toString(P)), StringEntry(((toString(aF.caller) + a) + c), ((toBase58String(aY) + a) + toString(aZ)))] | |
302 | + | } | |
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | @Callable(aF) | |
307 | + | func addSell (P) = { | |
308 | + | let h = value(aF.payments[0].assetId) | |
309 | + | valueOrElse(au(h), if (!(ai(P))) | |
310 | + | then throw("Price must be > 0") | |
311 | + | else [N(h, aF.caller, P)]) | |
312 | + | } | |
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | @Callable(aF) | |
317 | + | func addAuction (K,L,M) = { | |
318 | + | let h = value(aF.payments[0].assetId) | |
319 | + | valueOrElse(au(h), [I(aF.caller, h, K, L, M), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aF.caller))]) | |
320 | + | } | |
321 | + | ||
322 | + | ||
323 | + | ||
324 | + | @Callable(aF) | |
325 | + | func buyFromSlot (h) = { | |
326 | + | let ba = $Tuple2(aF.payments[0].assetId, value(aF.payments[0].amount)) | |
327 | + | let aw = ba._1 | |
328 | + | let ax = ba._2 | |
329 | + | let T = fromBase58String(h) | |
330 | + | let bb = aD(T) | |
331 | + | let bc = bb._1 | |
332 | + | let B = bb._2 | |
333 | + | let bd = [ScriptTransfer(aF.caller, 1, T), DeleteEntry(f(bc, T))] | |
334 | + | if ((bc == c)) | |
335 | + | then { | |
336 | + | let be = D(B) | |
337 | + | let J = be._1 | |
338 | + | let bf = be._2 | |
339 | + | valueOrElse(av(aw, ax, bf), { | |
340 | + | let bg = aA(af(T), ax, bf) | |
341 | + | let bh = bg._1 | |
342 | + | let bi = bg._2 | |
343 | + | let bj = (bd ++ [ScriptTransfer(J, bh, unit)]) | |
344 | + | if ((bi > 0)) | |
345 | + | then (bj ++ [ScriptTransfer(aF.caller, bi, unit)]) | |
346 | + | else bj | |
347 | + | }) | |
348 | + | } | |
349 | + | else { | |
350 | + | let bk = S(T, height) | |
351 | + | let J = bk._1 | |
352 | + | let aC = bk._2 | |
353 | + | valueOrElse(av(aw, ax, aC), { | |
354 | + | let bl = aA(af(T), ax, aC) | |
355 | + | let bh = bl._1 | |
356 | + | let bi = bl._2 | |
357 | + | let bj = (bd ++ [ScriptTransfer(J, bh, unit)]) | |
358 | + | if ((bi > 0)) | |
359 | + | then (bj ++ [ScriptTransfer(aF.caller, bi, unit)]) | |
360 | + | else bj | |
361 | + | }) | |
362 | + | } | |
363 | + | } | |
364 | + | ||
365 | + | ||
366 | + | ||
367 | + | @Callable(aF) | |
368 | + | func declineSlot (h) = { | |
369 | + | let T = fromBase58String(h) | |
370 | + | let bm = aD(T) | |
371 | + | let bc = bm._1 | |
372 | + | let B = bm._2 | |
373 | + | let bd = [DeleteEntry(f(bc, T))] | |
374 | + | if ((bc == c)) | |
375 | + | then { | |
376 | + | let bn = D(B) | |
377 | + | let J = bn._1 | |
378 | + | let bf = bn._2 | |
379 | + | if (!(an(aF.caller, J))) | |
380 | + | then throw("Invalid caller") | |
381 | + | else (bd ++ [ScriptTransfer(J, 1, T)]) | |
382 | + | } | |
383 | + | else { | |
384 | + | let bo = A(B) | |
385 | + | let J = bo._1 | |
386 | + | let W = bo._2 | |
387 | + | let X = bo._3 | |
388 | + | let Y = bo._4 | |
389 | + | let Z = bo._5 | |
390 | + | if (!(an(aF.caller, J))) | |
391 | + | then throw("Invalid caller") | |
392 | + | else if (!(ao(height, Z))) | |
393 | + | then throw("Wait for end of auction") | |
394 | + | else (bd ++ [ScriptTransfer(J, 1, T)]) | |
395 | + | } | |
396 | + | } | |
397 | + | ||
398 | + | ||
399 | + | ||
400 | + | @Callable(aF) | |
401 | + | func setTrustedIssuer (bp) = if (!(al(aF.caller))) | |
402 | + | then throw("Only admin") | |
403 | + | else [BooleanEntry(l(addressFromStringValue(bp)), true)] | |
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | @Callable(aF) | |
408 | + | func getPriceAtCurrentMoment (h,U) = { | |
409 | + | let T = fromBase58String(h) | |
410 | + | let bq = S(T, U) | |
411 | + | let J = bq._1 | |
412 | + | let P = bq._2 | |
413 | + | [IntegerEntry(i(T), P)] | |
414 | + | } | |
415 | + | ||
15 | 416 |
github/deemru/w8io/169f3d6 39.45 ms ◑