tx · GeUcjWtmgZrK1ehsDty2hQyQsh75yvQR5wXgM73MNewk

3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H:  -0.11000000 Waves

2022.11.25 14:16 [2332557] smart account 3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H > SELF 0.00000000 Waves

{ "type": 13, "id": "GeUcjWtmgZrK1ehsDty2hQyQsh75yvQR5wXgM73MNewk", "fee": 11000000, "feeAssetId": null, "timestamp": 1669374961897, "version": 2, "chainId": 84, "sender": "3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H", "senderPublicKey": "BDeCphaaC4MZvfmbJqQZ78EvuEBZTJ1VEW7fbxue8BUu", "proofs": [ "5wRbq2oNiR3mU4sp84R1hEVaVHdUVoZvqTU8HR9n61d2zYPwyrEPuRff9gMXtK9NvcCrwBzYeEyZmPyqvYRzsuTs" ], "script": "base64:BgJACAISCwoJCAgICAgBCAgIEgQKAggIEgMKAQgSAwoBARIDCgEBEgUKAwEICBIDCgEIEgMKAQgSAwoBCBIECgIIAScACXNlcGFyYXRvcgIBXwAIa0F1Y3Rpb24CB2F1Y3Rpb24ABWtTZWxsAgRzZWxsAAhrVHJ1c3RlZAIHdHJ1c3RlZAAGa1ByaWNlAgVwcmljZQEKZ2V0U2xvdEtleQIGcHJlZml4BW5mdElkCQCsAgIJAKwCAgUGcHJlZml4BQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBC2dldFByaWNlS2V5AQVuZnRJZAkArAICCQCsAgIFBmtQcmljZQUJc2VwYXJhdG9yCQDYBAEFBW5mdElkAQpnZXRTZWxsS2V5AQVuZnRJZAkArAICCQCsAgIFBWtTZWxsBQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBDWdldEF1Y3Rpb25LZXkBBW5mdElkCQCsAgIJAKwCAgUIa0F1Y3Rpb24FCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAENZ2V0VHJ1c3RlZEtleQEGaXNzdWVyCQCsAgIJAKwCAgUIa1RydXN0ZWQ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cgABBQdhc3NldElkBQNuaWwBaQEQc2V0VHJ1c3RlZElzc3VlcgELdHJ1c3RlZEFkZHIDCQEBIQEJAQdpc0FkbWluAQgFAWkGY2FsbGVyCQACAQIKT25seSBhZG1pbgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkBDWdldFRydXN0ZWRLZXkBCQERQGV4dHJOYXRpdmUoMTA2MikBBQt0cnVzdGVkQWRkcgYFA25pbAFpARdnZXRQcmljZUF0Q3VycmVudE1vbWVudAIFbmZ0SWQGbW9tZW50BAdhc3NldElkCQDZBAEFBW5mdElkBA0kdDAxMDcwNzEwNzcwCQEYY2FsY1ByaWNlQXRDdXJyZW50TW9tZW50AgUHYXNzZXRJZAUGbW9tZW50BAZzZWxsZXIIBQ0kdDAxMDcwNzEwNzcwAl8xBAVwcmljZQgFDSR0MDEwNzA3MTA3NzACXzIJAMwIAgkBDEludGVnZXJFbnRyeQIJAQtnZXRQcmljZUtleQEFB2Fzc2V0SWQFBXByaWNlBQNuaWwAZrn/Wg==", "height": 2332557, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ENQ2ao1hJpNA9UypZA39y8r1mRUPUnPzAXoom4iMoWro Next: 6MLHAedobyZN3VwFXFDwg8BjaDLf8tTnVRbzxd1m7TNE Diff:
OldNewDifferences
126126
127127 func E (r) = {
128128 let F = r
129- if ($isInstanceOf(F, "(Address, Int, Int, Int, Int)"))
129+ if ($isInstanceOf(F, "(Address, Int, String, String)"))
130130 then {
131131 let G = F
132- q([toString(G._1), toString(G._2), toString(G._3), toString(G._4), toString(G._5)])
132+ q([toString(G._1), toString(G._2), G._3, G._4])
133133 }
134134 else if ($isInstanceOf(F, "(Address, Int)"))
135135 then {
140140 }
141141
142142
143-func I (J,h,K,L,M,N) = StringEntry(k(h), E($Tuple5(J, K, L, M, N)))
143+func I (J,h,K,L,M) = StringEntry(k(h), E($Tuple4(J, K, L, M)))
144144
145145
146-func O (h,P,Q) = StringEntry(j(h), E($Tuple2(P, Q)))
146+func N (h,O,P) = StringEntry(j(h), E($Tuple2(O, P)))
147147
148148
149-func R (h) = value(getString(this, k(h)))
149+func Q (h) = value(getString(this, k(h)))
150150
151151
152-func S (h) = value(getString(this, j(h)))
152+func R (h) = value(getString(this, j(h)))
153153
154154
155-func T (U,V) = {
156- let B = R(U)
157- let W = A(B)
158- let J = W._1
159- let X = W._2
160- let Y = W._3
161- let Z = W._4
162- let aa = W._5
163- if ((V >= aa))
164- then $Tuple2(J, Y)
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)
165165 else {
166- let ab = (X - Y)
167- let ac = (aa - Z)
168- let ad = (V - Z)
169- $Tuple2(J, (X - fraction(ad, ab, ac)))
166+ let aa = (W - X)
167+ let ab = (Z - Y)
168+ let ac = (U - Y)
169+ $Tuple2(J, (W - fraction(ac, aa, ab)))
170170 }
171171 }
172172
173173
174-func ae (U) = {
175- let F = assetInfo(U)
174+func ad (T) = {
175+ let F = assetInfo(T)
176176 if ($isInstanceOf(F, "Asset"))
177177 then {
178- let af = F
179- if (if ((af.decimals == 0))
180- then (af.quantity == 1)
178+ let ae = F
179+ if (if ((ae.decimals == 0))
180+ then (ae.quantity == 1)
181181 else false)
182- then (af.reissuable == false)
182+ then (ae.reissuable == false)
183183 else false
184184 }
185185 else false
186186 }
187187
188188
189-func ag (U) = {
190- let m = value(assetInfo(U)).issuer
189+func af (T) = {
190+ let m = value(assetInfo(T)).issuer
191191 valueOrElse(getBoolean(this, l(m)), false)
192192 }
193193
194194
195-func ah (U) = isDefined(getString(this, j(U)))
195+func ag (T) = isDefined(getString(this, j(T)))
196196
197197
198-func ai (U) = isDefined(getString(this, k(U)))
198+func ah (T) = isDefined(getString(this, k(T)))
199199
200200
201-func aj (Q) = (Q > 0)
201+func ai (P) = (P > 0)
202202
203203
204-func ak (M,N) = (N > M)
204+func aj (K,ak) = (K > ak)
205205
206206
207-func al (K,L) = (K > L)
207+func al (am) = (am == this)
208208
209209
210-func am (an) = (an == this)
210+func an (am,J) = if ((am == this))
211+ then true
212+ else (am == J)
211213
212214
213-func ao (an,J) = if ((an == this))
214- then true
215- else (an == J)
215+func ao (ap,M) = (ap > M)
216216
217217
218-func ap (aq,N) = (aq > N)
218+func aq (ar,as) = (ar >= as)
219219
220220
221-func ar (as,at) = (as >= at)
221+func at (T) = (T == unit)
222222
223223
224-func au (U) = (U == unit)
225-
226-
227-func av (h) = if (!(ae(h)))
224+func au (h) = if (!(ad(h)))
228225 then throw("Token is not Nft")
229- else if (ah(h))
226+ else if (ag(h))
230227 then throw("Sell already exists")
231- else if (ai(h))
228+ else if (ah(h))
232229 then throw("Auction already exists")
233230 else unit
234231
235232
236-func aw (ax,ay,Q) = if (!(au(ax)))
233+func av (aw,ax,P) = if (!(at(aw)))
237234 then throw("Payment must be at WAVES")
238- else if (!(ar(ay, Q)))
235+ else if (!(aq(ax, P)))
239236 then throw("Not enough funds")
240237 else unit
238+
239+
240+func ay () = 0
241241
242242
243243 func az () = 0
244244
245245
246-func aA () = 0
246+func aA (aB,ax,aC) = if (aB)
247+ then $Tuple2((aC - az()), (ax - aC))
248+ else $Tuple2((aC - ay()), (ax - aC))
247249
248250
249-func aB (aC,ay,aD) = if (aC)
250- then $Tuple2((aD - aA()), (ay - aD))
251- else $Tuple2((aD - az()), (ay - aD))
252-
253-
254-func aE (h) = if (ah(h))
255- then $Tuple2(c, S(h))
256- else if (ai(h))
257- then $Tuple2(b, R(h))
251+func aD (h) = if (ag(h))
252+ then $Tuple2(c, R(h))
253+ else if (ah(h))
254+ then $Tuple2(b, Q(h))
258255 else throw("Slot doesn`t exist")
259256
260257
261-let aF = "buy"
258+let aE = "buy"
259+
260+let aF = base58'EbLVSrAi6vS3AkLwBinzZCvAXP2yYiFJEzj1MBVHcwZ5'
262261
263262 @Callable(aG)
264263 func createNft (aH,aI,aJ,aK,aL,aM,aN,aO,aP) = {
280279
281280 @Callable(aG)
282281 func buyNFT (aU) = {
283- let U = fromBase58String(aU)
282+ let T = fromBase58String(aU)
284283 let aV = value(aG.payments[0].amount)
285- let Q = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT")
286- let aW = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner")
284+ let aW = value(aG.payments[1].amount)
285+ let P = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT")
286+ let aX = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner")
287287 if ((aG.payments[0].assetId != unit))
288288 then throw("Pay in waves")
289- else if ((parseIntValue(Q) > aV))
290- then throw("Invalid payment")
291- else [ScriptTransfer(aG.caller, 1, U), ScriptTransfer(value(addressFromString(aW)), parseIntValue(Q), unit), StringEntry(((toString(aG.caller) + a) + aF), ((aU + a) + toString(aV)))]
289+ else if ((aG.payments[1].assetId != aF))
290+ then throw("Pay in ASIMI")
291+ else if ((parseIntValue(P) > aV))
292+ then throw("Invalid payment WAVES")
293+ else [ScriptTransfer(aG.caller, 1, T), ScriptTransfer(value(addressFromString(aX)), parseIntValue(P), unit), StringEntry(((toString(aG.caller) + a) + aE), ((aU + a) + toString(aV)))]
292294 }
293295
294296
295297
296298 @Callable(aG)
297-func sellNFT (Q) = {
298- let aX = $Tuple2(value(aG.payments[0].assetId), value(aG.payments[0].amount))
299- let aY = aX._1
300- let aZ = aX._2
301- if (!(ae(aY)))
299+func sellNFT (P) = {
300+ let aY = $Tuple2(value(aG.payments[0].assetId), value(aG.payments[0].amount))
301+ let aZ = aY._1
302+ let ba = aY._2
303+ if (!(ad(aZ)))
302304 then throw("Token is not NFT")
303- else [StringEntry(((e + a) + toBase58String(value(aG.payments[0].assetId))), toString(Q)), StringEntry(((toString(aG.caller) + a) + c), ((toBase58String(aY) + a) + toString(aZ)))]
305+ else [StringEntry(((e + a) + toBase58String(value(aG.payments[0].assetId))), toString(P)), StringEntry(((toString(aG.caller) + a) + c), ((toBase58String(aZ) + a) + toString(ba)))]
304306 }
305307
306308
307309
308310 @Callable(aG)
309-func addSell (Q) = {
311+func addSell (P) = {
310312 let h = value(aG.payments[0].assetId)
311- valueOrElse(av(h), if (!(aj(Q)))
313+ valueOrElse(au(h), if (!(ai(P)))
312314 then throw("Price must be > 0")
313- else [O(h, aG.caller, Q)])
315+ else [N(h, aG.caller, P)])
314316 }
315317
316318
317319
318320 @Callable(aG)
319-func addAuction (K,L,M,N,aH,aI,aJ,aK,aL,aM,aN,aO,aP) = {
321+func addAuction (K,L,M) = {
320322 let h = value(aG.payments[0].assetId)
321- valueOrElse(av(h), if (!(ak(M, N)))
322- then throw("Period is not correct")
323- else if (!(al(K, L)))
324- then throw("Start price must be > endPrice")
325- else [I(aG.caller, h, K, L, M, N), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aG.caller)), StringEntry(((toBase58String(h) + a) + "nft_type"), aK), StringEntry(((toBase58String(h) + a) + "nft_tags"), aL), StringEntry(((toBase58String(h) + a) + "nft_dAppAddress"), aJ), IntegerEntry(((toBase58String(h) + a) + "nft_selling_price"), aM), StringEntry(((toBase58String(h) + a) + "nft_onSell"), aO), StringEntry(((toBase58String(h) + a) + "nft_data"), aP)])
323+ valueOrElse(au(h), [I(aG.caller, h, K, L, M), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aG.caller))])
326324 }
327325
328326
329327
330328 @Callable(aG)
331329 func buyFromSlot (h) = {
332- let ba = $Tuple2(aG.payments[0].assetId, value(aG.payments[0].amount))
333- let ax = ba._1
334- let ay = ba._2
335- let U = fromBase58String(h)
336- let bb = aE(U)
337- let bc = bb._1
338- let B = bb._2
339- let bd = [ScriptTransfer(aG.caller, 1, U), DeleteEntry(f(bc, U))]
340- if ((bc == c))
330+ let bb = $Tuple2(aG.payments[0].assetId, value(aG.payments[0].amount))
331+ let aw = bb._1
332+ let ax = bb._2
333+ let T = fromBase58String(h)
334+ let bc = aD(T)
335+ let bd = bc._1
336+ let B = bc._2
337+ let be = [ScriptTransfer(aG.caller, 1, T), DeleteEntry(f(bd, T))]
338+ if ((bd == c))
341339 then {
342- let be = D(B)
343- let J = be._1
344- let bf = be._2
345- valueOrElse(aw(ax, ay, bf), {
346- let bg = aB(ag(U), ay, bf)
347- let bh = bg._1
348- let bi = bg._2
349- let bj = (bd ++ [ScriptTransfer(J, bh, unit)])
350- if ((bi > 0))
351- then (bj ++ [ScriptTransfer(aG.caller, bi, unit)])
352- else bj
340+ let bf = D(B)
341+ let J = bf._1
342+ let bg = bf._2
343+ valueOrElse(av(aw, ax, bg), {
344+ let bh = aA(af(T), ax, bg)
345+ let bi = bh._1
346+ let bj = bh._2
347+ let bk = (be ++ [ScriptTransfer(J, bi, unit)])
348+ if ((bj > 0))
349+ then (bk ++ [ScriptTransfer(aG.caller, bj, unit)])
350+ else bk
353351 })
354352 }
355353 else {
356- let bk = T(U, height)
357- let J = bk._1
358- let aD = bk._2
359- valueOrElse(aw(ax, ay, aD), {
360- let bl = aB(ag(U), ay, aD)
361- let bh = bl._1
362- let bi = bl._2
363- let bj = (bd ++ [ScriptTransfer(J, bh, unit)])
364- if ((bi > 0))
365- then (bj ++ [ScriptTransfer(aG.caller, bi, unit)])
366- else bj
354+ let bl = S(T, height)
355+ let J = bl._1
356+ let aC = bl._2
357+ valueOrElse(av(aw, ax, aC), {
358+ let bm = aA(af(T), ax, aC)
359+ let bi = bm._1
360+ let bj = bm._2
361+ let bk = (be ++ [ScriptTransfer(J, bi, unit)])
362+ if ((bj > 0))
363+ then (bk ++ [ScriptTransfer(aG.caller, bj, unit)])
364+ else bk
367365 })
368366 }
369367 }
372370
373371 @Callable(aG)
374372 func declineSlot (h) = {
375- let U = fromBase58String(h)
376- let bm = aE(U)
377- let bc = bm._1
378- let B = bm._2
379- let bd = [DeleteEntry(f(bc, U))]
380- if ((bc == c))
373+ let T = fromBase58String(h)
374+ let bn = aD(T)
375+ let bd = bn._1
376+ let B = bn._2
377+ let be = [DeleteEntry(f(bd, T))]
378+ if ((bd == c))
381379 then {
382- let bn = D(B)
383- let J = bn._1
384- let bf = bn._2
385- if (!(ao(aG.caller, J)))
380+ let bo = D(B)
381+ let J = bo._1
382+ let bg = bo._2
383+ if (!(an(aG.caller, J)))
386384 then throw("Invalid caller")
387- else (bd ++ [ScriptTransfer(J, 1, U)])
385+ else (be ++ [ScriptTransfer(J, 1, T)])
388386 }
389387 else {
390- let bo = A(B)
391- let J = bo._1
392- let X = bo._2
393- let Y = bo._3
394- let Z = bo._4
395- let aa = bo._5
396- if (!(ao(aG.caller, J)))
388+ let bp = A(B)
389+ let J = bp._1
390+ let W = bp._2
391+ let X = bp._3
392+ let Y = bp._4
393+ let Z = bp._5
394+ if (!(an(aG.caller, J)))
397395 then throw("Invalid caller")
398- else if (!(ap(height, aa)))
396+ else if (!(ao(height, Z)))
399397 then throw("Wait for end of auction")
400- else (bd ++ [ScriptTransfer(J, 1, U)])
398+ else (be ++ [ScriptTransfer(J, 1, T)])
401399 }
402400 }
403401
404402
405403
406404 @Callable(aG)
407-func setTrustedIssuer (bp) = if (!(am(aG.caller)))
405+func setTrustedIssuer (bq) = if (!(al(aG.caller)))
408406 then throw("Only admin")
409- else [BooleanEntry(l(addressFromStringValue(bp)), true)]
407+ else [BooleanEntry(l(addressFromStringValue(bq)), true)]
410408
411409
412410
413411 @Callable(aG)
414-func getPriceAtCurrentMoment (h,V) = {
415- let U = fromBase58String(h)
416- let bq = T(U, V)
417- let J = bq._1
418- let Q = bq._2
419-[IntegerEntry(i(U), Q)]
412+func getPriceAtCurrentMoment (h,U) = {
413+ let T = fromBase58String(h)
414+ let br = S(T, U)
415+ let J = br._1
416+ let P = br._2
417+[IntegerEntry(i(T), P)]
420418 }
421419
422420
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_"
55
66 let b = "auction"
77
88 let c = "sell"
99
1010 let d = "trusted"
1111
1212 let e = "price"
1313
1414 func f (g,h) = ((g + a) + toBase58String(h))
1515
1616
1717 func i (h) = ((e + a) + toBase58String(h))
1818
1919
2020 func j (h) = ((c + a) + toBase58String(h))
2121
2222
2323 func k (h) = ((b + a) + toBase58String(h))
2424
2525
2626 func l (m) = ((d + a) + toString(m))
2727
2828
2929 func n (o,p) = (o ++ [p])
3030
3131
3232 func q (r) = {
3333 let s = size(r)
3434 if ((s == 0))
3535 then throw("Empty params")
3636 else if ((s == 1))
3737 then makeString({
3838 let t = r
3939 let u = size(t)
4040 let v = nil
4141 func w (x,y) = if ((y >= u))
4242 then x
4343 else n(x, t[y])
4444
4545 func z (x,y) = if ((y >= u))
4646 then x
4747 else throw("List size exceeds 1")
4848
4949 z(w(v, 0), 1)
5050 }, a)
5151 else if ((s == 2))
5252 then makeString({
5353 let t = r
5454 let u = size(t)
5555 let v = nil
5656 func w (x,y) = if ((y >= u))
5757 then x
5858 else n(x, t[y])
5959
6060 func z (x,y) = if ((y >= u))
6161 then x
6262 else throw("List size exceeds 2")
6363
6464 z(w(w(v, 0), 1), 2)
6565 }, a)
6666 else if ((s == 3))
6767 then makeString({
6868 let t = r
6969 let u = size(t)
7070 let v = nil
7171 func w (x,y) = if ((y >= u))
7272 then x
7373 else n(x, t[y])
7474
7575 func z (x,y) = if ((y >= u))
7676 then x
7777 else throw("List size exceeds 3")
7878
7979 z(w(w(w(v, 0), 1), 2), 3)
8080 }, a)
8181 else if ((s == 4))
8282 then makeString({
8383 let t = r
8484 let u = size(t)
8585 let v = nil
8686 func w (x,y) = if ((y >= u))
8787 then x
8888 else n(x, t[y])
8989
9090 func z (x,y) = if ((y >= u))
9191 then x
9292 else throw("List size exceeds 4")
9393
9494 z(w(w(w(w(v, 0), 1), 2), 3), 4)
9595 }, a)
9696 else if ((s == 5))
9797 then makeString({
9898 let t = r
9999 let u = size(t)
100100 let v = nil
101101 func w (x,y) = if ((y >= u))
102102 then x
103103 else n(x, t[y])
104104
105105 func z (x,y) = if ((y >= u))
106106 then x
107107 else throw("List size exceeds 5")
108108
109109 z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5)
110110 }, a)
111111 else throw("Max number of parameters exceeded")
112112 }
113113
114114
115115 func A (B) = {
116116 let C = split(B, a)
117117 $Tuple5(addressFromStringValue(C[0]), parseIntValue(C[1]), parseIntValue(C[2]), parseIntValue(C[3]), parseIntValue(C[4]))
118118 }
119119
120120
121121 func D (B) = {
122122 let C = split(B, a)
123123 $Tuple2(addressFromStringValue(C[0]), parseIntValue(C[1]))
124124 }
125125
126126
127127 func E (r) = {
128128 let F = r
129- if ($isInstanceOf(F, "(Address, Int, Int, Int, Int)"))
129+ if ($isInstanceOf(F, "(Address, Int, String, String)"))
130130 then {
131131 let G = F
132- q([toString(G._1), toString(G._2), toString(G._3), toString(G._4), toString(G._5)])
132+ q([toString(G._1), toString(G._2), G._3, G._4])
133133 }
134134 else if ($isInstanceOf(F, "(Address, Int)"))
135135 then {
136136 let H = F
137137 q([toString(H._1), toString(H._2)])
138138 }
139139 else throw("Wrong params tupple")
140140 }
141141
142142
143-func I (J,h,K,L,M,N) = StringEntry(k(h), E($Tuple5(J, K, L, M, N)))
143+func I (J,h,K,L,M) = StringEntry(k(h), E($Tuple4(J, K, L, M)))
144144
145145
146-func O (h,P,Q) = StringEntry(j(h), E($Tuple2(P, Q)))
146+func N (h,O,P) = StringEntry(j(h), E($Tuple2(O, P)))
147147
148148
149-func R (h) = value(getString(this, k(h)))
149+func Q (h) = value(getString(this, k(h)))
150150
151151
152-func S (h) = value(getString(this, j(h)))
152+func R (h) = value(getString(this, j(h)))
153153
154154
155-func T (U,V) = {
156- let B = R(U)
157- let W = A(B)
158- let J = W._1
159- let X = W._2
160- let Y = W._3
161- let Z = W._4
162- let aa = W._5
163- if ((V >= aa))
164- then $Tuple2(J, Y)
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)
165165 else {
166- let ab = (X - Y)
167- let ac = (aa - Z)
168- let ad = (V - Z)
169- $Tuple2(J, (X - fraction(ad, ab, ac)))
166+ let aa = (W - X)
167+ let ab = (Z - Y)
168+ let ac = (U - Y)
169+ $Tuple2(J, (W - fraction(ac, aa, ab)))
170170 }
171171 }
172172
173173
174-func ae (U) = {
175- let F = assetInfo(U)
174+func ad (T) = {
175+ let F = assetInfo(T)
176176 if ($isInstanceOf(F, "Asset"))
177177 then {
178- let af = F
179- if (if ((af.decimals == 0))
180- then (af.quantity == 1)
178+ let ae = F
179+ if (if ((ae.decimals == 0))
180+ then (ae.quantity == 1)
181181 else false)
182- then (af.reissuable == false)
182+ then (ae.reissuable == false)
183183 else false
184184 }
185185 else false
186186 }
187187
188188
189-func ag (U) = {
190- let m = value(assetInfo(U)).issuer
189+func af (T) = {
190+ let m = value(assetInfo(T)).issuer
191191 valueOrElse(getBoolean(this, l(m)), false)
192192 }
193193
194194
195-func ah (U) = isDefined(getString(this, j(U)))
195+func ag (T) = isDefined(getString(this, j(T)))
196196
197197
198-func ai (U) = isDefined(getString(this, k(U)))
198+func ah (T) = isDefined(getString(this, k(T)))
199199
200200
201-func aj (Q) = (Q > 0)
201+func ai (P) = (P > 0)
202202
203203
204-func ak (M,N) = (N > M)
204+func aj (K,ak) = (K > ak)
205205
206206
207-func al (K,L) = (K > L)
207+func al (am) = (am == this)
208208
209209
210-func am (an) = (an == this)
210+func an (am,J) = if ((am == this))
211+ then true
212+ else (am == J)
211213
212214
213-func ao (an,J) = if ((an == this))
214- then true
215- else (an == J)
215+func ao (ap,M) = (ap > M)
216216
217217
218-func ap (aq,N) = (aq > N)
218+func aq (ar,as) = (ar >= as)
219219
220220
221-func ar (as,at) = (as >= at)
221+func at (T) = (T == unit)
222222
223223
224-func au (U) = (U == unit)
225-
226-
227-func av (h) = if (!(ae(h)))
224+func au (h) = if (!(ad(h)))
228225 then throw("Token is not Nft")
229- else if (ah(h))
226+ else if (ag(h))
230227 then throw("Sell already exists")
231- else if (ai(h))
228+ else if (ah(h))
232229 then throw("Auction already exists")
233230 else unit
234231
235232
236-func aw (ax,ay,Q) = if (!(au(ax)))
233+func av (aw,ax,P) = if (!(at(aw)))
237234 then throw("Payment must be at WAVES")
238- else if (!(ar(ay, Q)))
235+ else if (!(aq(ax, P)))
239236 then throw("Not enough funds")
240237 else unit
238+
239+
240+func ay () = 0
241241
242242
243243 func az () = 0
244244
245245
246-func aA () = 0
246+func aA (aB,ax,aC) = if (aB)
247+ then $Tuple2((aC - az()), (ax - aC))
248+ else $Tuple2((aC - ay()), (ax - aC))
247249
248250
249-func aB (aC,ay,aD) = if (aC)
250- then $Tuple2((aD - aA()), (ay - aD))
251- else $Tuple2((aD - az()), (ay - aD))
252-
253-
254-func aE (h) = if (ah(h))
255- then $Tuple2(c, S(h))
256- else if (ai(h))
257- then $Tuple2(b, R(h))
251+func aD (h) = if (ag(h))
252+ then $Tuple2(c, R(h))
253+ else if (ah(h))
254+ then $Tuple2(b, Q(h))
258255 else throw("Slot doesn`t exist")
259256
260257
261-let aF = "buy"
258+let aE = "buy"
259+
260+let aF = base58'EbLVSrAi6vS3AkLwBinzZCvAXP2yYiFJEzj1MBVHcwZ5'
262261
263262 @Callable(aG)
264263 func createNft (aH,aI,aJ,aK,aL,aM,aN,aO,aP) = {
265264 let aQ = Issue(aH, aN, 1, 0, false)
266265 let aR = calculateAssetId(aQ)
267266 [aQ, ScriptTransfer(aG.caller, 1, aR), StringEntry(((toBase58String(aR) + a) + "Owner"), toString(aG.caller)), StringEntry(((toBase58String(aR) + a) + "nft_type"), aK), StringEntry(((toBase58String(aR) + a) + "nft_tags"), aL), StringEntry(((toBase58String(aR) + a) + "nft_dAppAddress"), aJ), IntegerEntry(((toBase58String(aR) + a) + "nft_selling_price"), aM), StringEntry(((toBase58String(aR) + a) + "nft_onSell"), aO), StringEntry(((toBase58String(aR) + a) + "nft_data"), aP)]
268267 }
269268
270269
271270
272271 @Callable(aG)
273272 func issueNft (aS,aT) = {
274273 let aQ = Issue(aS, aT, 1, 0, false)
275274 let aR = calculateAssetId(aQ)
276275 [aQ, ScriptTransfer(aG.caller, 1, aR), StringEntry(((toBase58String(aR) + a) + "Owner"), toString(aG.caller))]
277276 }
278277
279278
280279
281280 @Callable(aG)
282281 func buyNFT (aU) = {
283- let U = fromBase58String(aU)
282+ let T = fromBase58String(aU)
284283 let aV = value(aG.payments[0].amount)
285- let Q = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT")
286- let aW = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner")
284+ let aW = value(aG.payments[1].amount)
285+ let P = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT")
286+ let aX = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner")
287287 if ((aG.payments[0].assetId != unit))
288288 then throw("Pay in waves")
289- else if ((parseIntValue(Q) > aV))
290- then throw("Invalid payment")
291- else [ScriptTransfer(aG.caller, 1, U), ScriptTransfer(value(addressFromString(aW)), parseIntValue(Q), unit), StringEntry(((toString(aG.caller) + a) + aF), ((aU + a) + toString(aV)))]
289+ else if ((aG.payments[1].assetId != aF))
290+ then throw("Pay in ASIMI")
291+ else if ((parseIntValue(P) > aV))
292+ then throw("Invalid payment WAVES")
293+ else [ScriptTransfer(aG.caller, 1, T), ScriptTransfer(value(addressFromString(aX)), parseIntValue(P), unit), StringEntry(((toString(aG.caller) + a) + aE), ((aU + a) + toString(aV)))]
292294 }
293295
294296
295297
296298 @Callable(aG)
297-func sellNFT (Q) = {
298- let aX = $Tuple2(value(aG.payments[0].assetId), value(aG.payments[0].amount))
299- let aY = aX._1
300- let aZ = aX._2
301- if (!(ae(aY)))
299+func sellNFT (P) = {
300+ let aY = $Tuple2(value(aG.payments[0].assetId), value(aG.payments[0].amount))
301+ let aZ = aY._1
302+ let ba = aY._2
303+ if (!(ad(aZ)))
302304 then throw("Token is not NFT")
303- else [StringEntry(((e + a) + toBase58String(value(aG.payments[0].assetId))), toString(Q)), StringEntry(((toString(aG.caller) + a) + c), ((toBase58String(aY) + a) + toString(aZ)))]
305+ else [StringEntry(((e + a) + toBase58String(value(aG.payments[0].assetId))), toString(P)), StringEntry(((toString(aG.caller) + a) + c), ((toBase58String(aZ) + a) + toString(ba)))]
304306 }
305307
306308
307309
308310 @Callable(aG)
309-func addSell (Q) = {
311+func addSell (P) = {
310312 let h = value(aG.payments[0].assetId)
311- valueOrElse(av(h), if (!(aj(Q)))
313+ valueOrElse(au(h), if (!(ai(P)))
312314 then throw("Price must be > 0")
313- else [O(h, aG.caller, Q)])
315+ else [N(h, aG.caller, P)])
314316 }
315317
316318
317319
318320 @Callable(aG)
319-func addAuction (K,L,M,N,aH,aI,aJ,aK,aL,aM,aN,aO,aP) = {
321+func addAuction (K,L,M) = {
320322 let h = value(aG.payments[0].assetId)
321- valueOrElse(av(h), if (!(ak(M, N)))
322- then throw("Period is not correct")
323- else if (!(al(K, L)))
324- then throw("Start price must be > endPrice")
325- else [I(aG.caller, h, K, L, M, N), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aG.caller)), StringEntry(((toBase58String(h) + a) + "nft_type"), aK), StringEntry(((toBase58String(h) + a) + "nft_tags"), aL), StringEntry(((toBase58String(h) + a) + "nft_dAppAddress"), aJ), IntegerEntry(((toBase58String(h) + a) + "nft_selling_price"), aM), StringEntry(((toBase58String(h) + a) + "nft_onSell"), aO), StringEntry(((toBase58String(h) + a) + "nft_data"), aP)])
323+ valueOrElse(au(h), [I(aG.caller, h, K, L, M), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aG.caller))])
326324 }
327325
328326
329327
330328 @Callable(aG)
331329 func buyFromSlot (h) = {
332- let ba = $Tuple2(aG.payments[0].assetId, value(aG.payments[0].amount))
333- let ax = ba._1
334- let ay = ba._2
335- let U = fromBase58String(h)
336- let bb = aE(U)
337- let bc = bb._1
338- let B = bb._2
339- let bd = [ScriptTransfer(aG.caller, 1, U), DeleteEntry(f(bc, U))]
340- if ((bc == c))
330+ let bb = $Tuple2(aG.payments[0].assetId, value(aG.payments[0].amount))
331+ let aw = bb._1
332+ let ax = bb._2
333+ let T = fromBase58String(h)
334+ let bc = aD(T)
335+ let bd = bc._1
336+ let B = bc._2
337+ let be = [ScriptTransfer(aG.caller, 1, T), DeleteEntry(f(bd, T))]
338+ if ((bd == c))
341339 then {
342- let be = D(B)
343- let J = be._1
344- let bf = be._2
345- valueOrElse(aw(ax, ay, bf), {
346- let bg = aB(ag(U), ay, bf)
347- let bh = bg._1
348- let bi = bg._2
349- let bj = (bd ++ [ScriptTransfer(J, bh, unit)])
350- if ((bi > 0))
351- then (bj ++ [ScriptTransfer(aG.caller, bi, unit)])
352- else bj
340+ let bf = D(B)
341+ let J = bf._1
342+ let bg = bf._2
343+ valueOrElse(av(aw, ax, bg), {
344+ let bh = aA(af(T), ax, bg)
345+ let bi = bh._1
346+ let bj = bh._2
347+ let bk = (be ++ [ScriptTransfer(J, bi, unit)])
348+ if ((bj > 0))
349+ then (bk ++ [ScriptTransfer(aG.caller, bj, unit)])
350+ else bk
353351 })
354352 }
355353 else {
356- let bk = T(U, height)
357- let J = bk._1
358- let aD = bk._2
359- valueOrElse(aw(ax, ay, aD), {
360- let bl = aB(ag(U), ay, aD)
361- let bh = bl._1
362- let bi = bl._2
363- let bj = (bd ++ [ScriptTransfer(J, bh, unit)])
364- if ((bi > 0))
365- then (bj ++ [ScriptTransfer(aG.caller, bi, unit)])
366- else bj
354+ let bl = S(T, height)
355+ let J = bl._1
356+ let aC = bl._2
357+ valueOrElse(av(aw, ax, aC), {
358+ let bm = aA(af(T), ax, aC)
359+ let bi = bm._1
360+ let bj = bm._2
361+ let bk = (be ++ [ScriptTransfer(J, bi, unit)])
362+ if ((bj > 0))
363+ then (bk ++ [ScriptTransfer(aG.caller, bj, unit)])
364+ else bk
367365 })
368366 }
369367 }
370368
371369
372370
373371 @Callable(aG)
374372 func declineSlot (h) = {
375- let U = fromBase58String(h)
376- let bm = aE(U)
377- let bc = bm._1
378- let B = bm._2
379- let bd = [DeleteEntry(f(bc, U))]
380- if ((bc == c))
373+ let T = fromBase58String(h)
374+ let bn = aD(T)
375+ let bd = bn._1
376+ let B = bn._2
377+ let be = [DeleteEntry(f(bd, T))]
378+ if ((bd == c))
381379 then {
382- let bn = D(B)
383- let J = bn._1
384- let bf = bn._2
385- if (!(ao(aG.caller, J)))
380+ let bo = D(B)
381+ let J = bo._1
382+ let bg = bo._2
383+ if (!(an(aG.caller, J)))
386384 then throw("Invalid caller")
387- else (bd ++ [ScriptTransfer(J, 1, U)])
385+ else (be ++ [ScriptTransfer(J, 1, T)])
388386 }
389387 else {
390- let bo = A(B)
391- let J = bo._1
392- let X = bo._2
393- let Y = bo._3
394- let Z = bo._4
395- let aa = bo._5
396- if (!(ao(aG.caller, J)))
388+ let bp = A(B)
389+ let J = bp._1
390+ let W = bp._2
391+ let X = bp._3
392+ let Y = bp._4
393+ let Z = bp._5
394+ if (!(an(aG.caller, J)))
397395 then throw("Invalid caller")
398- else if (!(ap(height, aa)))
396+ else if (!(ao(height, Z)))
399397 then throw("Wait for end of auction")
400- else (bd ++ [ScriptTransfer(J, 1, U)])
398+ else (be ++ [ScriptTransfer(J, 1, T)])
401399 }
402400 }
403401
404402
405403
406404 @Callable(aG)
407-func setTrustedIssuer (bp) = if (!(am(aG.caller)))
405+func setTrustedIssuer (bq) = if (!(al(aG.caller)))
408406 then throw("Only admin")
409- else [BooleanEntry(l(addressFromStringValue(bp)), true)]
407+ else [BooleanEntry(l(addressFromStringValue(bq)), true)]
410408
411409
412410
413411 @Callable(aG)
414-func getPriceAtCurrentMoment (h,V) = {
415- let U = fromBase58String(h)
416- let bq = T(U, V)
417- let J = bq._1
418- let Q = bq._2
419-[IntegerEntry(i(U), Q)]
412+func getPriceAtCurrentMoment (h,U) = {
413+ let T = fromBase58String(h)
414+ let br = S(T, U)
415+ let J = br._1
416+ let P = br._2
417+[IntegerEntry(i(T), P)]
420418 }
421419
422420

github/deemru/w8io/169f3d6 
146.17 ms