tx · pcPJvaGRsfGkPBQ7DZGoNXSecoMZFnexh6ayTHzVKqu

3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz:  -0.01300000 Waves

2023.11.14 10:58 [2842734] smart account 3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz > SELF 0.00000000 Waves

{ "type": 13, "id": "pcPJvaGRsfGkPBQ7DZGoNXSecoMZFnexh6ayTHzVKqu", "fee": 1300000, "feeAssetId": null, "timestamp": 1699948691104, "version": 2, "chainId": 84, "sender": "3N4ishKFoRooDxWoaCWSp3CUEoDmVepA1bz", "senderPublicKey": "9p5EiEVtTgiMBxj67TfVfstKuQs1LHPxoZRiRhyS5oiN", "proofs": [ "5G8hLRiTWGyWGmmKDZpSmBKxNCC2N776Jymgn6QutpdJJPMwMVVGWZqsJFSDczrwwuoGafbJY7xdF8CX9j8MtPFo" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgILAAHVkVSU0lPTgIFMS4wLjABCWdldFN0ckJ5SwEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAlvcmFjbGVGZWUJAQV2YWx1ZQEJAKYIAQkBCWdldFN0ckJ5SwECD2NvbmZfb3JhY2xlX2ZlZQALZmVlUmVjZWl2ZXIJAQlnZXRTdHJCeUsBAhFjb25mX2ZlZV9yZWNlaXZlcgAPcHV6emxlX2FydF9wb29sCQEJZ2V0U3RyQnlLAQIUY29uZl9wdXp6bGVfYXJ0X3Bvb2wAEXVzZHRQUEFzc2V0SWRfc3RyCQEJZ2V0U3RyQnlLAQIbY29uZl9hY2NlcHRlZF9hc3NldF9VU0RUX1BQAA5hcnRBc3NldElkX3N0cgkBCWdldFN0ckJ5SwECF2NvbmZfYWNjZXB0ZWRfYXNzZXRfQVJUABF1c2RjUFBBc3NldElkX3N0cgkBCWdldFN0ckJ5SwECG2NvbmZfYWNjZXB0ZWR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WwAout0jQ==", "height": 2842734, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9MVDuhoKEa8VzhKYBxqeLeHpAppz91D6ezQYgUdvP5aG Next: Fz1ZzMJugmfDpuHVH4HrT4u3xNTCAEYsGafV9CcHhFeH Diff:
OldNewDifferences
188188
189189
190190 func ay (G,az) = {
191- let aA = valueOrElse(getString(Address(fromBase58String(G)), (("std_nft_" + az) + "_metadata")), "")
191+ let aA = valueOrElse(getStringValue(Address(fromBase58String(G)), (("std_nft_" + az) + "_metadata")), "")
192192 (aA != "")
193193 }
194194
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "1.0.0"
55
66 func b (c) = valueOrElse(getString(this, c), "")
77
88
99 let d = value(addressFromString(b("conf_oracle_fee")))
1010
1111 let e = b("conf_fee_receiver")
1212
1313 let f = b("conf_puzzle_art_pool")
1414
1515 let g = b("conf_accepted_asset_USDT_PP")
1616
1717 let h = b("conf_accepted_asset_ART")
1818
1919 let i = b("conf_accepted_asset_USDC_PP")
2020
2121 let j = b("conf_accepted_asset_EAST")
2222
2323 let k = b("conf_accepted_asset_PUZZLE")
2424
2525 let l = b("conf_accepted_asset_ETH_PP")
2626
2727 let m = "WAVES"
2828
2929 let n = fromBase58String(g)
3030
3131 let o = fromBase58String(h)
3232
3333 let p = fromBase58String(i)
3434
3535 let q = fromBase58String(j)
3636
3737 let r = fromBase58String(k)
3838
3939 let s = fromBase58String(l)
4040
4141 let t = base58''
4242
4343 let u = [g, h, i, j, k, m, l]
4444
4545 let v = b("conf_admin_1")
4646
4747 let w = 3
4848
4949 let x = "conf_dapp_is_running"
5050
5151 let y = "conf_maintenance_msg"
5252
5353 let z = valueOrElse(getBoolean(this, x), true)
5454
5555 let A = valueOrElse(getString(this, y), "")
5656
5757 let B = "num_sales"
5858
5959 func C (c) = valueOrElse(getInteger(this, c), 0)
6060
6161
6262 func D (E,F,G) = ((((("sale2nd_info_" + E) + "_") + F) + "_") + G)
6363
6464
6565 func H (I,F,J,K) = ((((((("offer2nd_" + I) + "_") + F) + "_") + J) + "_") + K)
6666
6767
6868 func L (c) = valueOrErrorMessage(getInteger(d, c), "Integer undefine or 0 in oracle")
6969
7070
7171 func M (N) = if (!(z))
7272 then throw(A)
7373 else $Tuple3(toBase58String(N.transactionId), toBase58String(N.caller.bytes), lastBlock.timestamp)
7474
7575
7676 func O (N) = if ((size(N.payments) == 0))
7777 then throw("No payment attached")
7878 else {
7979 let P = value(N.payments[0])
8080 let Q = value(P.amount)
8181 $Tuple2(P, Q)
8282 }
8383
8484
8585 func R (S) = if (if ((S.quantity == 1))
8686 then (S.decimals == 0)
8787 else false)
8888 then (S.reissuable == false)
8989 else false
9090
9191
9292 func T (U) = if (!(containsElement(u, U)))
9393 then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted")
9494 else true
9595
9696
9797 func V (U) = if ((U == "WAVES"))
9898 then unit
9999 else fromBase58String(U)
100100
101101
102102 func W (X) = {
103103 let J = b(("current_owner_on_dapp_" + X))
104104 if ((size(J) == 0))
105105 then throw("NFT not found")
106106 else {
107107 let Y = b(((("sale2nd_status_" + J) + "_") + X))
108108 if ((Y != "OPEN"))
109109 then throw("NFT not for sale")
110110 else J
111111 }
112112 }
113113
114114
115115 func Z (c) = {
116116 let aa = b((c + "_OPEN"))
117117 if ((aa == ""))
118118 then throw("Offer not found")
119119 else {
120120 let ab = split(aa, "_")
121121 let U = V(ab[2])
122122 $Tuple3(ab, U, aa)
123123 }
124124 }
125125
126126
127127 func ac (U) = {
128128 let ad = U
129129 if ($isInstanceOf(ad, "ByteVector"))
130130 then {
131131 let ae = ad
132132 assetBalance(this, ae)
133133 }
134134 else wavesBalance(this).available
135135 }
136136
137137
138138 func af (Q,U,X,J,E) = {
139139 let ag = fraction(Q, w, 100)
140140 let ah = (Q - ag)
141141 let ai = ag
142142 let aj = ac(o)
143143 if ((aj == aj))
144144 then {
145145 let ak = if ((U != o))
146146 then invoke(Address(fromBase58String(f)), "swap", [h, 1], [AttachedPayment(U, ai)])
147147 else unit
148148 if ((ak == ak))
149149 then {
150150 let al = ac(o)
151151 if ((al == al))
152152 then {
153153 let am = ScriptTransfer(Address(fromBase58String(e)), if ((U == o))
154154 then ag
155155 else (al - aj), o)
156156 let an = ScriptTransfer(Address(fromBase58String(J)), ah, U)
157157 let ao = ScriptTransfer(Address(fromBase58String(E)), 1, fromBase58String(X))
158158 $Tuple3(am, an, ao)
159159 }
160160 else throw("Strict value is not equal to itself.")
161161 }
162162 else throw("Strict value is not equal to itself.")
163163 }
164164 else throw("Strict value is not equal to itself.")
165165 }
166166
167167
168168 func ap (aq) = if ((0 >= aq))
169169 then throw("Wrong minimum sell price")
170170 else true
171171
172172
173173 func ar (N,F) = {
174174 let as = M(N)
175175 let at = as._1
176176 let E = as._2
177177 let au = as._3
178178 let S = value(assetInfo(fromBase58String(F)))
179179 let av = R(S)
180180 $Tuple5(at, E, au, av, S.issuer)
181181 }
182182
183183
184184 func aw () = {
185185 let ax = C(B)
186186 IntegerEntry(B, (ax + 1))
187187 }
188188
189189
190190 func ay (G,az) = {
191- let aA = valueOrElse(getString(Address(fromBase58String(G)), (("std_nft_" + az) + "_metadata")), "")
191+ let aA = valueOrElse(getStringValue(Address(fromBase58String(G)), (("std_nft_" + az) + "_metadata")), "")
192192 (aA != "")
193193 }
194194
195195
196196 @Callable(aB)
197197 func setConf (c,aC) = {
198198 let E = toString(aB.caller)
199199 if (containsElement([v, toString(this)], E))
200200 then if (contains(c, "conf_"))
201201 then [StringEntry(c, aC)]
202202 else throw("Entries starting with conf_ only")
203203 else throw("You are not allowed to change this")
204204 }
205205
206206
207207
208208 @Callable(aB)
209209 func appRunning (aD,aE) = {
210210 let E = toString(aB.caller)
211211 let at = toBase58String(aB.transactionId)
212212 if (containsElement([v, toString(this)], E))
213213 then [BooleanEntry(x, aD), StringEntry(y, aE)]
214214 else throw("You are not allowed to change this")
215215 }
216216
217217
218218
219219 @Callable(N)
220220 func sellNFT (aq,aF) = {
221221 let aG = O(N)
222222 let P = aG._1
223223 let Q = aG._2
224224 if ((Q != 1))
225225 then throw("No NFT attached")
226226 else {
227227 let F = if (isDefined(P.assetId))
228228 then toBase58String(value(P.assetId))
229229 else throw("Waves is not a NFT.")
230230 let aH = ar(N, F)
231231 let at = aH._1
232232 let E = aH._2
233233 let au = aH._3
234234 let av = aH._4
235235 let G = aH._5
236236 if (!(av))
237237 then throw("Not a valid nft")
238238 else if (!(ay(F, toString(G))))
239239 then throw("No nft standard found on issuer account")
240240 else if (!(T(aF)))
241241 then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted")
242242 else if (!(ap(aq)))
243243 then throw("Wrong minimum sell price")
244244 else [StringEntry((D(E, F, toString(G)) + "_OPEN"), ((((((((((toString(au) + "_") + toString(aq)) + "_") + aF) + "_") + F) + "_") + toString(G)) + "_") + at)), StringEntry(((("sale2nd_status_" + E) + "_") + F), "OPEN"), StringEntry(("current_owner_on_dapp_" + F), E)]
245245 }
246246 }
247247
248248
249249
250250 @Callable(N)
251251 func updateSalePrice (F,aq,aF) = {
252252 let aI = ar(N, F)
253253 let at = aI._1
254254 let E = aI._2
255255 let au = aI._3
256256 let av = aI._4
257257 let G = aI._5
258258 if (!(av))
259259 then throw("Not a valid nft")
260260 else {
261261 let J = b(("current_owner_on_dapp_" + F))
262262 if ((J != E))
263263 then throw("You don't own this NFT")
264264 else {
265265 let Y = b(((("sale2nd_status_" + E) + "_") + F))
266266 if ((Y != "OPEN"))
267267 then throw("Sale not active")
268268 else if (!(T(aF)))
269269 then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted")
270270 else if (!(ap(aq)))
271271 then throw("Wrong minimum sell price")
272272 else {
273273 let aJ = D(E, F, toString(G))
274274 let aK = split(b((aJ + "_OPEN")), "_")
275275 [StringEntry((aJ + "_OPEN"), ((((((((((aK[0] + "_") + toString(aq)) + "_") + aF) + "_") + aK[3]) + "_") + aK[4]) + "_") + aK[5]))]
276276 }
277277 }
278278 }
279279 }
280280
281281
282282
283283 @Callable(N)
284284 func cancelSale (F) = {
285285 let aL = ar(N, F)
286286 let at = aL._1
287287 let E = aL._2
288288 let au = aL._3
289289 let av = aL._4
290290 let G = aL._5
291291 let J = b(("current_owner_on_dapp_" + F))
292292 if ((J != E))
293293 then throw("You don't own this NFT")
294294 else {
295295 let Y = b(((("sale2nd_status_" + E) + "_") + F))
296296 if ((Y != "OPEN"))
297297 then throw("Sale not active")
298298 else {
299299 let aJ = D(E, F, toString(G))
300300 let aK = b((aJ + "_OPEN"))
301301 [DeleteEntry((aJ + "_OPEN")), DeleteEntry(((("sale2nd_status_" + E) + "_") + F)), DeleteEntry(("current_owner_on_dapp_" + F)), StringEntry((((aJ + "_") + at) + "_CANCELLED"), ((((aK + "_CANCELLED_") + toString(au)) + "_") + at)), ScriptTransfer(Address(fromBase58String(E)), 1, fromBase58String(F))]
302302 }
303303 }
304304 }
305305
306306
307307
308308 @Callable(N)
309309 func buyNFT (F) = {
310310 let aM = ar(N, F)
311311 let at = aM._1
312312 let E = aM._2
313313 let au = aM._3
314314 let av = aM._4
315315 let G = aM._5
316316 if (!(av))
317317 then throw("Not a valid nft")
318318 else {
319319 let J = W(F)
320320 let aJ = D(J, F, toString(G))
321321 let aK = b((aJ + "_OPEN"))
322322 if ((size(aK) == 0))
323323 then throw("Sale Not found!")
324324 else {
325325 let aN = split(aK, "_")
326326 if ((parseInt(aN[1]) == 0))
327327 then throw("Offer only")
328328 else {
329329 let aO = O(N)
330330 let P = aO._1
331331 let Q = aO._2
332332 let aP = if (isDefined(P.assetId))
333333 then toBase58String(value(P.assetId))
334334 else ""
335335 if (if ((aN[1] != toString(Q)))
336336 then true
337337 else (aN[2] != aP))
338338 then throw("Payment infos don't match.")
339339 else {
340340 let aQ = af(Q, P.assetId, F, J, E)
341341 let am = aQ._1
342342 let an = aQ._2
343343 let ao = aQ._3
344344 [DeleteEntry((aJ + "_OPEN")), DeleteEntry(((("sale2nd_status_" + J) + "_") + F)), DeleteEntry(("current_owner_on_dapp_" + F)), StringEntry((((aJ + "_") + at) + "_CLOSED"), ((((((aK + "_CLOSED_") + toString(au)) + "_") + at) + "_") + E)), aw(), an, ao, am]
345345 }
346346 }
347347 }
348348 }
349349 }
350350
351351
352352
353353 @Callable(N)
354354 func setOffer (F) = {
355355 let aR = ar(N, F)
356356 let at = aR._1
357357 let I = aR._2
358358 let au = aR._3
359359 let av = aR._4
360360 let G = aR._5
361361 if (!(av))
362362 then throw("Not a valid nft")
363363 else {
364364 let aS = O(N)
365365 let P = aS._1
366366 let Q = aS._2
367367 let U = if (!(isDefined(P.assetId)))
368368 then "WAVES"
369369 else toBase58String(value(P.assetId))
370370 if (!(T(U)))
371371 then throw("asset not accepted")
372372 else if ((Q == 0))
373373 then throw("Offer of 0 not allowed")
374374 else if (!(ap(Q)))
375375 then throw("Wrong minimum sell price")
376376 else {
377377 let J = W(F)
378378 [StringEntry((H(I, F, J, at) + "_OPEN"), ((((((((((((toString(au) + "_") + toString(Q)) + "_") + U) + "_") + F) + "_") + toString(G)) + "_") + I) + "_") + at))]
379379 }
380380 }
381381 }
382382
383383
384384
385385 @Callable(N)
386386 func acceptOffer (F,K,I) = {
387387 let aT = ar(N, F)
388388 let at = aT._1
389389 let E = aT._2
390390 let au = aT._3
391391 let av = aT._4
392392 let G = aT._5
393393 if (!(av))
394394 then throw("Not a valid nft")
395395 else {
396396 let J = W(F)
397397 if ((E != J))
398398 then throw("Only sale owner can accept offer")
399399 else {
400400 let aU = H(I, F, J, K)
401401 let aV = Z(aU)
402402 let ab = aV._1
403403 let U = aV._2
404404 let aa = aV._3
405405 let aJ = D(J, F, toString(G))
406406 let aK = b((aJ + "_OPEN"))
407407 if ((size(aK) == 0))
408408 then throw("Sale Not found!")
409409 else {
410410 let Q = value(parseInt(ab[1]))
411411 let aW = af(Q, U, F, J, ab[6])
412412 let am = aW._1
413413 let an = aW._2
414414 let ao = aW._3
415415 let aX = if (isDefined(U))
416416 then toBase58String(value(U))
417417 else "WAVES"
418418 [DeleteEntry((aJ + "_OPEN")), DeleteEntry((aU + "_OPEN")), DeleteEntry(((("sale2nd_status_" + J) + "_") + F)), DeleteEntry(("current_owner_on_dapp_" + F)), StringEntry((aU + "_CLOSED"), ((((aa + "_CLOSED_") + toString(au)) + "_") + at)), StringEntry((((aJ + "_") + at) + "_CLOSED"), ((((((((((aK + "_CLOSED-OFFER_") + toString(au)) + "_") + at) + "_") + I) + "_") + toString(Q)) + "_") + aX)), aw(), an, ao, am]
419419 }
420420 }
421421 }
422422 }
423423
424424
425425
426426 @Callable(N)
427427 func cancelOffer (F,K,I,J) = {
428428 let aY = M(N)
429429 let at = aY._1
430430 let E = aY._2
431431 let au = aY._3
432432 if (if ((E != I))
433433 then (E != J)
434434 else false)
435435 then throw("You cannot cancel this offer.")
436436 else {
437437 let aU = H(I, F, J, K)
438438 let aZ = Z(aU)
439439 let ab = aZ._1
440440 let U = aZ._2
441441 let aa = aZ._3
442442 [DeleteEntry((aU + "_OPEN")), StringEntry((aU + "_CANCELLED"), ((((aa + "_CANCELLED_") + toString(au)) + "_") + at)), ScriptTransfer(Address(fromBase58String(E)), parseIntValue(ab[1]), U)]
443443 }
444444 }
445445
446446

github/deemru/w8io/169f3d6 
80.58 ms