tx · 48UeP9bBswD4NPobUyZXZXqQLTAWVw8tYF55NGKBiUQ4 3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz: -0.01300000 Waves 2023.11.14 10:34 [2842711] smart account 3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz > SELF 0.00000000 Waves
{ "type": 13, "id": "48UeP9bBswD4NPobUyZXZXqQLTAWVw8tYF55NGKBiUQ4", "fee": 1300000, "feeAssetId": null, "timestamp": 1699947354580, "version": 2, "chainId": 84, "sender": "3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz", "senderPublicKey": "9p5EiEVtTgiMBxj67TfVfstKuQs1LHPxoZRiRhyS5oiN", "proofs": [ "3fyxQP8T2EsLK9Hbuy7NVWB4kb7FFGqmJiVnJCHQsmGR5Rs3GQgiBJj7pioepogAfBFHczSAQkJbjiwABXHuysv2" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgILQAHVkVSU0lPTgIFMS4wLjABCWdldFN0ckJ5SwEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAlvcmFjbGVGZWUJAQV2YWx1ZQEJAKYIAQkBCWdldFN0ckJ5SwECD2NvbmZfb3JhY2xlX2ZlZQAIdXNlckRhcHAJAQV2YWx1ZQEJAKYIAQkBCWdldFN0ckJ5SwECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQlnZXRTdHJCeUsBAhFjb25mX2ZlZV9yZWNlaXZlcgAPcHV6emxlX2FydF9wb29sCQEJZ2V0U3RyQnlLAQIUY29uZl9wdXp6bGVfYXJ0X3Bvb2wAEXVzZHRQUEFzc2V0SWRfc3RyCQEJZ2V0U3RyQnlLAQIbY29uZl9hY2NlcHRlZF9hc3NldF9VU0RUX1BQAA5hcnRBc3NldElkX3N0cgkBCWdldFN0ckJ5SwECF2NvbmZfYWNjZXB0ZWRfYX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BAEFBmNhbGxlcgkBDXBhcnNlSW50VmFsdWUBCQCRAwIFCmJpZERhdGFBcnIAAQUHYXNzZXRJZAUDbmlsAPQKNhg=", "height": 2842711, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9MVDuhoKEa8VzhKYBxqeLeHpAppz91D6ezQYgUdvP5aG Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "1.0.0" | |
5 | + | ||
6 | + | func b (c) = valueOrElse(getString(this, c), "") | |
7 | + | ||
8 | + | ||
9 | + | let d = value(addressFromString(b("conf_oracle_fee"))) | |
10 | + | ||
11 | + | let e = value(addressFromString(b("conf_users_dapp"))) | |
12 | + | ||
13 | + | let f = b("conf_fee_receiver") | |
14 | + | ||
15 | + | let g = b("conf_puzzle_art_pool") | |
16 | + | ||
17 | + | let h = b("conf_accepted_asset_USDT_PP") | |
18 | + | ||
19 | + | let i = b("conf_accepted_asset_ART") | |
20 | + | ||
21 | + | let j = b("conf_accepted_asset_USDC_PP") | |
22 | + | ||
23 | + | let k = b("conf_accepted_asset_EAST") | |
24 | + | ||
25 | + | let l = b("conf_accepted_asset_PUZZLE") | |
26 | + | ||
27 | + | let m = b("conf_accepted_asset_ETH_PP") | |
28 | + | ||
29 | + | let n = "WAVES" | |
30 | + | ||
31 | + | let o = fromBase58String(h) | |
32 | + | ||
33 | + | let p = fromBase58String(i) | |
34 | + | ||
35 | + | let q = fromBase58String(j) | |
36 | + | ||
37 | + | let r = fromBase58String(k) | |
38 | + | ||
39 | + | let s = fromBase58String(l) | |
40 | + | ||
41 | + | let t = fromBase58String(m) | |
42 | + | ||
43 | + | let u = base58'' | |
44 | + | ||
45 | + | let v = [h, i, j, k, l, n, m] | |
46 | + | ||
47 | + | let w = b("conf_admin_1") | |
48 | + | ||
49 | + | let x = 3 | |
50 | + | ||
51 | + | let y = "conf_dapp_is_running" | |
52 | + | ||
53 | + | let z = "conf_maintenance_msg" | |
54 | + | ||
55 | + | let A = valueOrElse(getBoolean(this, y), true) | |
56 | + | ||
57 | + | let B = valueOrElse(getString(this, z), "") | |
58 | + | ||
59 | + | let C = "num_sales" | |
60 | + | ||
61 | + | func D (c) = valueOrElse(getInteger(this, c), 0) | |
62 | + | ||
63 | + | ||
64 | + | func E (F,G,H) = ((((("sale2nd_info_" + F) + "_") + G) + "_") + H) | |
65 | + | ||
66 | + | ||
67 | + | func I (J,G,K,L) = ((((((("offer2nd_" + J) + "_") + G) + "_") + K) + "_") + L) | |
68 | + | ||
69 | + | ||
70 | + | func M (c) = valueOrErrorMessage(getInteger(d, c), "Integer undefine or 0 in oracle") | |
71 | + | ||
72 | + | ||
73 | + | func N (O) = if (!(A)) | |
74 | + | then throw(B) | |
75 | + | else $Tuple3(toBase58String(O.transactionId), toBase58String(O.caller.bytes), lastBlock.timestamp) | |
76 | + | ||
77 | + | ||
78 | + | func P (O) = if ((size(O.payments) == 0)) | |
79 | + | then throw("No payment attached") | |
80 | + | else { | |
81 | + | let Q = value(O.payments[0]) | |
82 | + | let R = value(Q.amount) | |
83 | + | $Tuple2(Q, R) | |
84 | + | } | |
85 | + | ||
86 | + | ||
87 | + | func S (T) = if (if ((T.quantity == 1)) | |
88 | + | then (T.decimals == 0) | |
89 | + | else false) | |
90 | + | then (T.reissuable == false) | |
91 | + | else false | |
92 | + | ||
93 | + | ||
94 | + | func U (V) = if (!(containsElement(v, V))) | |
95 | + | then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted") | |
96 | + | else true | |
97 | + | ||
98 | + | ||
99 | + | func W (V) = if ((V == "WAVES")) | |
100 | + | then unit | |
101 | + | else fromBase58String(V) | |
102 | + | ||
103 | + | ||
104 | + | func X (Y) = { | |
105 | + | let K = b(("current_owner_on_dapp_" + Y)) | |
106 | + | if ((size(K) == 0)) | |
107 | + | then throw("NFT not found") | |
108 | + | else { | |
109 | + | let Z = b(((("sale2nd_status_" + K) + "_") + Y)) | |
110 | + | if ((Z != "OPEN")) | |
111 | + | then throw("NFT not for sale") | |
112 | + | else K | |
113 | + | } | |
114 | + | } | |
115 | + | ||
116 | + | ||
117 | + | func aa (c) = { | |
118 | + | let ab = b((c + "_OPEN")) | |
119 | + | if ((ab == "")) | |
120 | + | then throw("Offer not found") | |
121 | + | else { | |
122 | + | let ac = split(ab, "_") | |
123 | + | let V = W(ac[2]) | |
124 | + | $Tuple3(ac, V, ab) | |
125 | + | } | |
126 | + | } | |
127 | + | ||
128 | + | ||
129 | + | func ad (V) = { | |
130 | + | let ae = V | |
131 | + | if ($isInstanceOf(ae, "ByteVector")) | |
132 | + | then { | |
133 | + | let af = ae | |
134 | + | assetBalance(this, af) | |
135 | + | } | |
136 | + | else wavesBalance(this).available | |
137 | + | } | |
138 | + | ||
139 | + | ||
140 | + | func ag (R,V,Y,K,F) = { | |
141 | + | let ah = fraction(R, x, 100) | |
142 | + | let ai = (R - ah) | |
143 | + | let aj = ah | |
144 | + | let ak = ad(p) | |
145 | + | if ((ak == ak)) | |
146 | + | then { | |
147 | + | let al = if ((V != p)) | |
148 | + | then invoke(Address(fromBase58String(g)), "swap", [i, 1], [AttachedPayment(V, aj)]) | |
149 | + | else unit | |
150 | + | if ((al == al)) | |
151 | + | then { | |
152 | + | let am = ad(p) | |
153 | + | if ((am == am)) | |
154 | + | then { | |
155 | + | let an = ScriptTransfer(Address(fromBase58String(f)), if ((V == p)) | |
156 | + | then ah | |
157 | + | else (am - ak), p) | |
158 | + | let ao = ScriptTransfer(Address(fromBase58String(K)), ai, V) | |
159 | + | let ap = ScriptTransfer(Address(fromBase58String(F)), 1, fromBase58String(Y)) | |
160 | + | $Tuple3(an, ao, ap) | |
161 | + | } | |
162 | + | else throw("Strict value is not equal to itself.") | |
163 | + | } | |
164 | + | else throw("Strict value is not equal to itself.") | |
165 | + | } | |
166 | + | else throw("Strict value is not equal to itself.") | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | func aq (ar) = if ((0 >= ar)) | |
171 | + | then throw("Wrong minimum sell price") | |
172 | + | else true | |
173 | + | ||
174 | + | ||
175 | + | func as (O,G) = { | |
176 | + | let at = N(O) | |
177 | + | let au = at._1 | |
178 | + | let F = at._2 | |
179 | + | let av = at._3 | |
180 | + | let T = value(assetInfo(fromBase58String(G))) | |
181 | + | let aw = S(T) | |
182 | + | $Tuple5(au, F, av, aw, T.issuer) | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | func ax () = { | |
187 | + | let ay = D(C) | |
188 | + | IntegerEntry(C, (ay + 1)) | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | func az (H,aA) = { | |
193 | + | let aB = valueOrElse(getString(addressFromStringValue(H), (("std_nft_" + aA) + "_metadata")), "") | |
194 | + | (aB != "") | |
195 | + | } | |
196 | + | ||
197 | + | ||
198 | + | @Callable(aC) | |
199 | + | func setConf (c,aD) = { | |
200 | + | let F = toString(aC.caller) | |
201 | + | if (containsElement([w, toString(this)], F)) | |
202 | + | then if (contains(c, "conf_")) | |
203 | + | then [StringEntry(c, aD)] | |
204 | + | else throw("Entries starting with conf_ only") | |
205 | + | else throw("You are not allowed to change this") | |
206 | + | } | |
207 | + | ||
208 | + | ||
209 | + | ||
210 | + | @Callable(aC) | |
211 | + | func appRunning (aE,aF) = { | |
212 | + | let F = toString(aC.caller) | |
213 | + | let au = toBase58String(aC.transactionId) | |
214 | + | if (containsElement([w, toString(this)], F)) | |
215 | + | then [BooleanEntry(y, aE), StringEntry(z, aF)] | |
216 | + | else throw("You are not allowed to change this") | |
217 | + | } | |
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | @Callable(O) | |
222 | + | func sellNFT (ar,aG) = { | |
223 | + | let aH = P(O) | |
224 | + | let Q = aH._1 | |
225 | + | let R = aH._2 | |
226 | + | if ((R != 1)) | |
227 | + | then throw("No NFT attached") | |
228 | + | else { | |
229 | + | let G = if (isDefined(Q.assetId)) | |
230 | + | then toBase58String(value(Q.assetId)) | |
231 | + | else throw("Waves is not a NFT.") | |
232 | + | let aI = as(O, G) | |
233 | + | let au = aI._1 | |
234 | + | let F = aI._2 | |
235 | + | let av = aI._3 | |
236 | + | let aw = aI._4 | |
237 | + | let H = aI._5 | |
238 | + | if (!(aw)) | |
239 | + | then throw("Not a valid nft") | |
240 | + | else if (!(az(G, toString(H)))) | |
241 | + | then throw("No nft standard found on issuer account") | |
242 | + | else if (!(U(aG))) | |
243 | + | then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted") | |
244 | + | else if (!(aq(ar))) | |
245 | + | then throw("Wrong minimum sell price") | |
246 | + | else [StringEntry((E(F, G, toString(H)) + "_OPEN"), ((((((((((toString(av) + "_") + toString(ar)) + "_") + aG) + "_") + G) + "_") + toString(H)) + "_") + au)), StringEntry(((("sale2nd_status_" + F) + "_") + G), "OPEN"), StringEntry(("current_owner_on_dapp_" + G), F)] | |
247 | + | } | |
248 | + | } | |
249 | + | ||
250 | + | ||
251 | + | ||
252 | + | @Callable(O) | |
253 | + | func updateSalePrice (G,ar,aG) = { | |
254 | + | let aJ = as(O, G) | |
255 | + | let au = aJ._1 | |
256 | + | let F = aJ._2 | |
257 | + | let av = aJ._3 | |
258 | + | let aw = aJ._4 | |
259 | + | let H = aJ._5 | |
260 | + | if (!(aw)) | |
261 | + | then throw("Not a valid nft") | |
262 | + | else { | |
263 | + | let K = b(("current_owner_on_dapp_" + G)) | |
264 | + | if ((K != F)) | |
265 | + | then throw("You don't own this NFT") | |
266 | + | else { | |
267 | + | let Z = b(((("sale2nd_status_" + F) + "_") + G)) | |
268 | + | if ((Z != "OPEN")) | |
269 | + | then throw("Sale not active") | |
270 | + | else if (!(U(aG))) | |
271 | + | then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted") | |
272 | + | else if (!(aq(ar))) | |
273 | + | then throw("Wrong minimum sell price") | |
274 | + | else { | |
275 | + | let aK = E(F, G, toString(H)) | |
276 | + | let aL = split(b((aK + "_OPEN")), "_") | |
277 | + | [StringEntry((aK + "_OPEN"), ((((((((((aL[0] + "_") + toString(ar)) + "_") + aG) + "_") + aL[3]) + "_") + aL[4]) + "_") + aL[5]))] | |
278 | + | } | |
279 | + | } | |
280 | + | } | |
281 | + | } | |
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | @Callable(O) | |
286 | + | func cancelSale (G) = { | |
287 | + | let aM = as(O, G) | |
288 | + | let au = aM._1 | |
289 | + | let F = aM._2 | |
290 | + | let av = aM._3 | |
291 | + | let aw = aM._4 | |
292 | + | let H = aM._5 | |
293 | + | let K = b(("current_owner_on_dapp_" + G)) | |
294 | + | if ((K != F)) | |
295 | + | then throw("You don't own this NFT") | |
296 | + | else { | |
297 | + | let Z = b(((("sale2nd_status_" + F) + "_") + G)) | |
298 | + | if ((Z != "OPEN")) | |
299 | + | then throw("Sale not active") | |
300 | + | else { | |
301 | + | let aK = E(F, G, toString(H)) | |
302 | + | let aL = b((aK + "_OPEN")) | |
303 | + | [DeleteEntry((aK + "_OPEN")), DeleteEntry(((("sale2nd_status_" + F) + "_") + G)), DeleteEntry(("current_owner_on_dapp_" + G)), StringEntry((((aK + "_") + au) + "_CANCELLED"), ((((aL + "_CANCELLED_") + toString(av)) + "_") + au)), ScriptTransfer(Address(fromBase58String(F)), 1, fromBase58String(G))] | |
304 | + | } | |
305 | + | } | |
306 | + | } | |
307 | + | ||
308 | + | ||
309 | + | ||
310 | + | @Callable(O) | |
311 | + | func buyNFT (G) = { | |
312 | + | let aN = as(O, G) | |
313 | + | let au = aN._1 | |
314 | + | let F = aN._2 | |
315 | + | let av = aN._3 | |
316 | + | let aw = aN._4 | |
317 | + | let H = aN._5 | |
318 | + | if (!(aw)) | |
319 | + | then throw("Not a valid nft") | |
320 | + | else { | |
321 | + | let K = X(G) | |
322 | + | let aK = E(K, G, toString(H)) | |
323 | + | let aL = b((aK + "_OPEN")) | |
324 | + | if ((size(aL) == 0)) | |
325 | + | then throw("Sale Not found!") | |
326 | + | else { | |
327 | + | let aO = split(aL, "_") | |
328 | + | if ((parseInt(aO[1]) == 0)) | |
329 | + | then throw("Offer only") | |
330 | + | else { | |
331 | + | let aP = P(O) | |
332 | + | let Q = aP._1 | |
333 | + | let R = aP._2 | |
334 | + | let aQ = if (isDefined(Q.assetId)) | |
335 | + | then toBase58String(value(Q.assetId)) | |
336 | + | else "" | |
337 | + | if (if ((aO[1] != toString(R))) | |
338 | + | then true | |
339 | + | else (aO[2] != aQ)) | |
340 | + | then throw("Payment infos don't match.") | |
341 | + | else { | |
342 | + | let aR = ag(R, Q.assetId, G, K, F) | |
343 | + | let an = aR._1 | |
344 | + | let ao = aR._2 | |
345 | + | let ap = aR._3 | |
346 | + | [DeleteEntry((aK + "_OPEN")), DeleteEntry(((("sale2nd_status_" + K) + "_") + G)), DeleteEntry(("current_owner_on_dapp_" + G)), StringEntry((((aK + "_") + au) + "_CLOSED"), ((((((aL + "_CLOSED_") + toString(av)) + "_") + au) + "_") + F)), ax(), ao, ap, an] | |
347 | + | } | |
348 | + | } | |
349 | + | } | |
350 | + | } | |
351 | + | } | |
352 | + | ||
353 | + | ||
354 | + | ||
355 | + | @Callable(O) | |
356 | + | func setOffer (G) = { | |
357 | + | let aS = as(O, G) | |
358 | + | let au = aS._1 | |
359 | + | let J = aS._2 | |
360 | + | let av = aS._3 | |
361 | + | let aw = aS._4 | |
362 | + | let H = aS._5 | |
363 | + | if (!(aw)) | |
364 | + | then throw("Not a valid nft") | |
365 | + | else { | |
366 | + | let aT = P(O) | |
367 | + | let Q = aT._1 | |
368 | + | let R = aT._2 | |
369 | + | let V = if (!(isDefined(Q.assetId))) | |
370 | + | then "WAVES" | |
371 | + | else toBase58String(value(Q.assetId)) | |
372 | + | if (!(U(V))) | |
373 | + | then throw("asset not accepted") | |
374 | + | else if ((R == 0)) | |
375 | + | then throw("Offer of 0 not allowed") | |
376 | + | else if (!(aq(R))) | |
377 | + | then throw("Wrong minimum sell price") | |
378 | + | else { | |
379 | + | let K = X(G) | |
380 | + | [StringEntry((I(J, G, K, au) + "_OPEN"), ((((((((((((toString(av) + "_") + toString(R)) + "_") + V) + "_") + G) + "_") + toString(H)) + "_") + J) + "_") + au))] | |
381 | + | } | |
382 | + | } | |
383 | + | } | |
384 | + | ||
385 | + | ||
386 | + | ||
387 | + | @Callable(O) | |
388 | + | func acceptOffer (G,L,J) = { | |
389 | + | let aU = as(O, G) | |
390 | + | let au = aU._1 | |
391 | + | let F = aU._2 | |
392 | + | let av = aU._3 | |
393 | + | let aw = aU._4 | |
394 | + | let H = aU._5 | |
395 | + | if (!(aw)) | |
396 | + | then throw("Not a valid nft") | |
397 | + | else { | |
398 | + | let K = X(G) | |
399 | + | if ((F != K)) | |
400 | + | then throw("Only sale owner can accept offer") | |
401 | + | else { | |
402 | + | let aV = I(J, G, K, L) | |
403 | + | let aW = aa(aV) | |
404 | + | let ac = aW._1 | |
405 | + | let V = aW._2 | |
406 | + | let ab = aW._3 | |
407 | + | let aK = E(K, G, toString(H)) | |
408 | + | let aL = b((aK + "_OPEN")) | |
409 | + | if ((size(aL) == 0)) | |
410 | + | then throw("Sale Not found!") | |
411 | + | else { | |
412 | + | let R = value(parseInt(ac[1])) | |
413 | + | let aX = ag(R, V, G, K, ac[6]) | |
414 | + | let an = aX._1 | |
415 | + | let ao = aX._2 | |
416 | + | let ap = aX._3 | |
417 | + | let aY = if (isDefined(V)) | |
418 | + | then toBase58String(value(V)) | |
419 | + | else "WAVES" | |
420 | + | [DeleteEntry((aK + "_OPEN")), DeleteEntry((aV + "_OPEN")), DeleteEntry(((("sale2nd_status_" + K) + "_") + G)), DeleteEntry(("current_owner_on_dapp_" + G)), StringEntry((aV + "_CLOSED"), ((((ab + "_CLOSED_") + toString(av)) + "_") + au)), StringEntry((((aK + "_") + au) + "_CLOSED"), ((((((((((aL + "_CLOSED-OFFER_") + toString(av)) + "_") + au) + "_") + J) + "_") + toString(R)) + "_") + aY)), ax(), ao, ap, an] | |
421 | + | } | |
422 | + | } | |
423 | + | } | |
424 | + | } | |
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | @Callable(O) | |
429 | + | func cancelOffer (G,L,J,K) = { | |
430 | + | let aZ = N(O) | |
431 | + | let au = aZ._1 | |
432 | + | let F = aZ._2 | |
433 | + | let av = aZ._3 | |
434 | + | if (if ((F != J)) | |
435 | + | then (F != K) | |
436 | + | else false) | |
437 | + | then throw("You cannot cancel this offer.") | |
438 | + | else { | |
439 | + | let aV = I(J, G, K, L) | |
440 | + | let ba = aa(aV) | |
441 | + | let ac = ba._1 | |
442 | + | let V = ba._2 | |
443 | + | let ab = ba._3 | |
444 | + | [DeleteEntry((aV + "_OPEN")), StringEntry((aV + "_CANCELLED"), ((((ab + "_CANCELLED_") + toString(av)) + "_") + au)), ScriptTransfer(Address(fromBase58String(F)), parseIntValue(ac[1]), V)] | |
445 | + | } | |
446 | + | } | |
447 | + | ||
448 | + |
github/deemru/w8io/026f985 26.82 ms ◑