tx · 7W9xf1kFJa4MobB5EcgwGkiM7BtYT6sFQTzJQH67nsVs

3N95zy625ACAsKajQX1tmob5hQMrzEk5kT4:  -0.01400000 Waves

2021.12.29 16:59 [1855602] smart account 3N95zy625ACAsKajQX1tmob5hQMrzEk5kT4 > SELF 0.00000000 Waves

{ "type": 13, "id": "7W9xf1kFJa4MobB5EcgwGkiM7BtYT6sFQTzJQH67nsVs", "fee": 1400000, "feeAssetId": null, "timestamp": 1640786413285, "version": 2, "chainId": 84, "sender": "3N95zy625ACAsKajQX1tmob5hQMrzEk5kT4", "senderPublicKey": "HWuSxxqPxviP2UUvftMmvAewr3Ld2N7CNBLTPARFozyP", "proofs": [ "3pnoDFPZqsB29jftnAZJs58w6BgPaUtZc9EMmw1kupVGjLo2J5s7n7PUfpa6vfcEHeeZAFdTVvLX2VR4tpeQmG48", "4miQzSCMQ1MVG7rVFhr7M1QG9UKWQSQqxoycqcmCAqnEkHDWUmZ2QfZadg9BjAyjQxMiVFoj4h4UAG2zD2dMi4UR" ], "script": "base64:AAIFAAAAAAAAD2cIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQESBQoDBAEIEgAaFAoBQRIPa2V5QWRtaW5QdWJLZXkyGhQKAUISD2tleUFkbWluUHViS2V5MxoLCgFDEgZvcmFjbGUaEAoBRBILZ2V0QWRtaW5QdWIaEAoBRRILa2V5QWRtaW5QdWIaDAoBRhIHJG1hdGNoMBoLCgFHEgZzdHJpbmcaDAoBSBIHbm90aGluZxoRCgFJEgxhZG1pblB1YktleTEaEQoBShIMYWRtaW5QdWJLZXkyGhEKAUsSDGFkbWluUHViS2V5MxoZCgFMEhRhZG1pblB1YktleVN0YXJ0U3RvcBoXCgFNEhJhZG1pblB1YktleVN0YWtpbmcaEgoBThINd2FsbGV0QWRkcmVzcxoSCgFPEg12b3RpbmdBZGRyZXNzGgkKAVASBFVTRE4aCQoBURIETlNCVBoJCgFSEgRFVVJOGhIKAVMSDXN0YWt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JYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJjQwAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAU0DAwMDBQAAAAJjSQYFAAAAAmNKBgUAAAACY0sFAAAAAmNMBwYFAAAAAmNFBQAAAAJjRaC0PsE=", "height": 1855602, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J732EDPDECrFT5U5bhj718JUX9eHXytwUtaTmsABFpFL Next: none Diff:
OldNewDifferences
4141
4242 let t = "start_height"
4343
44-let u = "first_harvest_height"
44+let u = "staking_usdnnsbt_address"
4545
46-let v = "admin_pub_1"
46+let v = "staking_eurn_address"
4747
48-let w = "admin_pub_2"
48+let w = "leasing_address"
4949
50-let x = "admin_pub_3"
50+let x = "leasing_amount"
5151
52-let y = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
52+let y = "leasing_id"
5353
54-func z (A) = {
55- let B = getString(y, A)
56- if ($isInstanceOf(B, "String"))
54+let z = "admin_pub_1"
55+
56+let A = "admin_pub_2"
57+
58+let B = "admin_pub_3"
59+
60+let C = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
61+
62+func D (E) = {
63+ let F = getString(C, E)
64+ if ($isInstanceOf(F, "String"))
5765 then {
58- let C = B
59- fromBase58String(C)
66+ let G = F
67+ fromBase58String(G)
6068 }
6169 else {
62- let D = B
70+ let H = F
6371 throw("Admin public key is empty")
6472 }
6573 }
6674
6775
68-let E = z(v)
76+let I = D(z)
6977
70-let F = z(w)
78+let J = D(A)
7179
72-let G = z(x)
80+let K = D(B)
7381
74-let H = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
82+let L = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
7583
76-let I = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
84+let M = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
7785
78-let J = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
86+let N = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7987
80-let K = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
88+let O = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
8189
82-let L = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
90+let P = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
8391
84-let M = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9'
92+let Q = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9'
8593
86-let N = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
94+let R = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA'
8795
88-let O = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA'
96+let S = ["WAVES", toBase58String(P), toBase58String(Q), toBase58String(R)]
8997
90-let P = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg')
98+let T = Address(fromBase58String(valueOrErrorMessage(getString(C, u), "no usdn staking address")))
9199
92-let Q = Address(base58'3MyVqAbmKWh339gF6hy8faWw1jGeTV2wnGE')
100+let U = Address(fromBase58String(valueOrErrorMessage(getString(C, v), "no usdn staking address")))
93101
94-let R = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37')
102+let V = Address(base58'3N8PGkzXhbtTvEwEQTtE2xiTJmsDEQ9XfoZ')
95103
96-let S = Address(base58'3Mye9wVR7d2mc6Y5ZJTu11svzgUQ7o8H9dA')
104+let W = Address(base58'3MqW1t2cxdYy2emEMk3YtZkRwQPhHaTfWRe')
97105
98-let T = 270000
106+let X = valueOrErrorMessage(getInteger(O, r), "Empty kBasePeriod")
99107
100-let U = 234000
108+let Y = valueOrErrorMessage(getInteger(O, t), "Empty kStartHeight")
101109
102-let V = valueOrErrorMessage(getInteger(K, r), "Empty kBasePeriod")
110+let Z = valueOrErrorMessage(getInteger(O, s), "Empty kPeriodLength")
103111
104-let W = valueOrErrorMessage(getInteger(K, t), "Empty kStartHeight")
112+let aa = ((X + ((height - Y) / Z)) + 3)
105113
106-let X = valueOrErrorMessage(getInteger(K, s), "Empty kPeriodLength")
114+let ab = getBooleanValue(this, c)
107115
108-let Y = ((V + ((height - W) / X)) + 3)
116+let ac = getStringValue(this, d)
109117
110-let Z = getBooleanValue(this, c)
118+let ad = getStringValue(this, e)
111119
112-let aa = getStringValue(this, d)
120+let ae = if ((ac == "WAVES"))
121+ then unit
122+ else fromBase58String(ac)
113123
114-let ab = getStringValue(this, e)
124+let af = if ((ad == "WAVES"))
125+ then unit
126+ else fromBase58String(ad)
115127
116-let ac = if ((aa == "WAVES"))
117- then unit
118- else fromBase58String(aa)
119-
120-let ad = if ((ab == "WAVES"))
121- then unit
122- else fromBase58String(ab)
123-
124-let ae = {
125- let B = ac
126- if ($isInstanceOf(B, "ByteVector"))
128+let ag = {
129+ let F = ae
130+ if ($isInstanceOf(F, "ByteVector"))
127131 then {
128- let af = B
129- value(assetInfo(af)).name
132+ let ah = F
133+ value(assetInfo(ah)).name
130134 }
131- else if ($isInstanceOf(B, "Unit"))
135+ else if ($isInstanceOf(F, "Unit"))
132136 then {
133- let ag = B
137+ let ai = F
134138 "WAVES"
135139 }
136140 else throw("Match error")
137141 }
138142
139-let ah = {
140- let B = ad
141- if ($isInstanceOf(B, "ByteVector"))
143+let aj = {
144+ let F = af
145+ if ($isInstanceOf(F, "ByteVector"))
142146 then {
143- let af = B
144- value(assetInfo(af)).name
147+ let ah = F
148+ value(assetInfo(ah)).name
145149 }
146- else if ($isInstanceOf(B, "Unit"))
150+ else if ($isInstanceOf(F, "Unit"))
147151 then {
148- let ag = B
152+ let ai = F
149153 "WAVES"
150154 }
151155 else throw("Match error")
152156 }
153157
154-let ai = getIntegerValue(this, f)
158+let ak = getIntegerValue(this, f)
155159
156-let aj = getIntegerValue(this, g)
160+let al = getIntegerValue(this, g)
157161
158-let ak = fromBase58String(getStringValue(this, j))
162+let am = fromBase58String(getStringValue(this, j))
159163
160-let al = getIntegerValue(this, k)
164+let an = getIntegerValue(this, k)
161165
162-let am = 3000
166+let ao = 3000
163167
164-let an = 1200
168+let ap = 1000000
165169
166-let ao = 1000000
170+let aq = 1000
167171
168-let ap = 1000
172+let ar = 100000000
169173
170-let aq = 100000000
171-
172-let ar = 1000
173-
174-let as = 8
174+let as = 1000
175175
176176 func at (au) = {
177- let B = au
178- if ($isInstanceOf(B, "ByteVector"))
177+ let F = au
178+ if ($isInstanceOf(F, "ByteVector"))
179179 then {
180- let af = B
181- assetBalance(this, af)
180+ let ah = F
181+ assetBalance(this, ah)
182182 }
183- else if ($isInstanceOf(B, "Unit"))
183+ else if ($isInstanceOf(F, "Unit"))
184184 then {
185- let ag = B
185+ let ai = F
186186 wavesBalance(this).available
187187 }
188188 else throw("Match error")
191191
192192 func av (au) = {
193193 let aw = {
194- let B = au
195- if ($isInstanceOf(B, "ByteVector"))
194+ let F = au
195+ if ($isInstanceOf(F, "ByteVector"))
196196 then {
197- let ax = B
198- if (if ((ax == L))
197+ let ax = F
198+ if (if ((ax == P))
199199 then true
200- else (ax == M))
201- then getInteger(P, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this)))
202- else if ((ax == O))
203- then getInteger(Q, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this)))
200+ else (ax == Q))
201+ then getInteger(T, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this)))
202+ else if ((ax == R))
203+ then getInteger(U, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this)))
204204 else 0
205205 }
206- else if ($isInstanceOf(B, "Unit"))
207- then 0
206+ else if ($isInstanceOf(F, "Unit"))
207+ then valueOrElse(getInteger(this, x), 0)
208208 else throw("Match error")
209209 }
210- let B = aw
211- if ($isInstanceOf(B, "Int"))
210+ let F = aw
211+ if ($isInstanceOf(F, "Int"))
212212 then {
213- let ay = B
213+ let ay = F
214214 ay
215215 }
216216 else 0
217217 }
218218
219219
220-let az = av(ac)
220+let az = av(ae)
221221
222-let aA = av(ad)
222+let aA = av(af)
223223
224224 let aB = getIntegerValue(this, h)
225225
226226 let aC = getIntegerValue(this, i)
227227
228-let aD = (ai - az)
228+let aD = (ak - az)
229229
230-let aE = (aj - aA)
230+let aE = (al - aA)
231231
232-let aF = (at(ac) + az)
232+let aF = (at(ae) + az)
233233
234-let aG = (at(ad) + aA)
234+let aG = (at(af) + aA)
235235
236-let aH = if ((aF >= ai))
237- then (aG >= aj)
236+let aH = if ((aF >= ak))
237+ then (aG >= al)
238238 else false
239239
240240 func aI (au) = {
241- let B = au
242- if ($isInstanceOf(B, "ByteVector"))
241+ let F = au
242+ if ($isInstanceOf(F, "ByteVector"))
243243 then {
244- let af = B
245- let aJ = toBase58String(af)
246- let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist"))
244+ let ah = F
245+ let aJ = toBase58String(ah)
246+ let aK = valueOrErrorMessage(assetInfo(ah), (("Asset " + aJ) + " doesn't exist"))
247247 $Tuple3(aJ, aK.name, aK.decimals)
248248 }
249- else if ($isInstanceOf(B, "Unit"))
249+ else if ($isInstanceOf(F, "Unit"))
250250 then {
251- let ag = B
251+ let ai = F
252252 $Tuple3("WAVES", "WAVES", 8)
253253 }
254254 else throw("Match error")
259259 then $Tuple3("WAVES", "WAVES", 8)
260260 else {
261261 let aJ = aM
262- let af = fromBase58String(aM)
263- let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist"))
262+ let ah = fromBase58String(aM)
263+ let aK = valueOrErrorMessage(assetInfo(ah), (("Asset " + aJ) + " doesn't exist"))
264264 $Tuple3(aJ, aK.name, aK.decimals)
265265 }
266266
268268 func aN (aO) = [BooleanEntry(c, false), StringEntry(n, aO)]
269269
270270
271-func aP (aQ,au,aR) = if (if ((au == L))
272- then true
273- else (au == O))
274- then {
275- let aS = if ((au == L))
276- then (T * (if ((aR == M))
277- then 2
278- else 1))
279- else if ((au == O))
280- then U
281- else 0
282- let aT = (aQ - aS)
283- if ((0 >= aT))
284- then throw((((("Insufficient amount " + toString(aQ)) + " to deduct staking fee ") + toString(aS)) + "USDN/EURN"))
285- else aT
286- }
287- else aQ
271+func aP (aQ,au) = if (aQ)
272+ then if ((au == P))
273+ then $Tuple2("lockNeutrino", T)
274+ else if ((au == Q))
275+ then $Tuple2("lockNsbt", T)
276+ else $Tuple2("startStaking", U)
277+ else if ((au == P))
278+ then $Tuple2("unlockNeutrino", T)
279+ else if ((au == Q))
280+ then $Tuple2("unlockNsbt", T)
281+ else $Tuple2("stopStaking", U)
288282
289283
290-func aU (au,aR) = if ((au == L))
291- then (T * (if ((aR == M))
292- then 2
293- else 1))
294- else if ((au == O))
295- then U
296- else 0
284+func aR (aQ,aS,au) = if (aQ)
285+ then {
286+ let aT = aP(aQ, au)
287+ let aU = aT._1
288+ let aV = aT._2
289+ $Tuple4(aU, aV, nil, [AttachedPayment(au, aS)])
290+ }
291+ else {
292+ let aW = aP(aQ, au)
293+ let aU = aW._1
294+ let aV = aW._2
295+ $Tuple4(aU, aV, [aS, toBase58String(au)], nil)
296+ }
297297
298298
299-func aV (aQ,aW,aX) = throw((((((((("Insufficient DApp balance to pay " + toString(aQ)) + " ") + aX) + " due to staking. Available: ") + toString(aW)) + " ") + aX) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
299+func aX (aS,aY,aZ) = throw((((((((("Insufficient DApp balance to pay " + toString(aS)) + " ") + aZ) + " due to staking. Available: ") + toString(aY)) + " ") + aZ) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
300300
301301
302-func aY (aZ,ba) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(aZ)) + " ") + ae) + " and ") + toString(ba)) + " ") + ah) + " due to staking. Available: ") + toString(aD)) + " ") + ae) + " and ") + toString(aE)) + " ") + ah) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
302+func ba (bb,bc) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(bb)) + " ") + ag) + " and ") + toString(bc)) + " ") + aj) + " due to staking. Available: ") + toString(aD)) + " ") + ag) + " and ") + toString(aE)) + " ") + aj) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
303303
304304
305-func bb () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ae) + ", ") + toString(aG)) + " ") + ah) + ". State: ") + toString(ai)) + " ") + ae) + ", ") + toString(aj)) + " ") + ah))
305+func bd () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ag) + ", ") + toString(aG)) + " ") + aj) + ". State: ") + toString(ak)) + " ") + ag) + ", ") + toString(al)) + " ") + aj))
306306
307307
308308 @Callable(ay)
309-func init (bc) = {
310- let bd = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
311- let be = bd._1
312- let bf = bd._2
313- let bg = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId)
314- let bh = bg._1
315- let bi = bg._2
316- let bj = aI(bf)
317- let bk = bj._1
318- let bl = bj._2
319- let bm = bj._3
320- let bn = aI(bi)
321- let bo = bn._1
322- let bp = bn._2
323- let bq = bn._3
324- if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
309+func init (be) = {
310+ let bf = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
311+ let bg = bf._1
312+ let bh = bf._2
313+ let bi = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId)
314+ let bj = bi._1
315+ let bk = bi._2
316+ let bl = aI(bh)
317+ let bm = bl._1
318+ let bn = bl._2
319+ let bo = bl._3
320+ let bp = aI(bk)
321+ let bq = bp._1
322+ let br = bp._2
323+ let bs = bp._3
324+ if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
325325 then throw("Only admin can call this function")
326326 else if (isDefined(getBoolean(this, c)))
327327 then throw("DApp is already active")
328- else if ((bf == bi))
328+ else if ((bh == bk))
329329 then throw("Assets must be different")
330330 else {
331- let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7))
332- let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this))
333- let bt = ((bm + bq) / 2)
334- let bu = pow(be, bm, 5, 1, bm, DOWN)
335- let bv = pow(bh, bq, 5, 1, bq, DOWN)
336- let bw = pow(10, 0, bt, 0, 0, DOWN)
337- let bx = fraction(bu, bv, bw)
338- let by = Issue(br, bs, bx, bt, true)
339- let bz = calculateAssetId(by)
340- let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, bz)]
341- if (bc)
342- then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))])
343- else bA
331+ let bt = ((("s" + take(bn, 7)) + "_") + take(br, 7))
332+ let bu = ((((("ShareToken of SwopFi protocol for " + bn) + " and ") + br) + " at address ") + toString(this))
333+ let bv = ((bo + bs) / 2)
334+ let bw = pow(bg, bo, 5, 1, bo, DOWN)
335+ let bx = pow(bj, bs, 5, 1, bs, DOWN)
336+ let by = pow(10, 0, bv, 0, 0, DOWN)
337+ let bz = fraction(bw, bx, by)
338+ let bA = Issue(bt, bu, bz, bv, true)
339+ let bB = calculateAssetId(bA)
340+ let bC = if (containsElement(S, bm))
341+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
342+ else 0
343+ if ((bC == bC))
344+ then {
345+ let bD = if (containsElement(S, bq))
346+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
347+ else 0
348+ if ((bD == bD))
349+ then {
350+ let bE = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bm), StringEntry(e, bq), IntegerEntry(f, bg), IntegerEntry(g, bj), IntegerEntry(l, ao), IntegerEntry(m, ap), bA, StringEntry(j, toBase58String(bB)), IntegerEntry(k, bz), ScriptTransfer(ay.caller, bz, bB)]
351+ if (be)
352+ then (bE ++ [BooleanEntry(o, be), IntegerEntry(p, (Y + (aa * Z)))])
353+ else bE
354+ }
355+ else throw("Strict value is not equal to itself.")
356+ }
357+ else throw("Strict value is not equal to itself.")
344358 }
345359 }
346360
347361
348362
349363 @Callable(ay)
350-func initWithInitRatio (bB,bC,aa,ab,bc) = {
351- let bD = aL(aa)
352- let bk = bD._1
353- let bl = bD._2
354- let bm = bD._3
355- let bE = aL(ab)
356- let bo = bE._1
357- let bp = bE._2
358- let bq = bE._3
359- if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
364+func initWithInitRatio (bF,bG,ac,ad,be) = {
365+ let bH = aL(ac)
366+ let bm = bH._1
367+ let bn = bH._2
368+ let bo = bH._3
369+ let bI = aL(ad)
370+ let bq = bI._1
371+ let br = bI._2
372+ let bs = bI._3
373+ if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
360374 then throw("Only admin can call this function")
361375 else if (isDefined(getBoolean(this, c)))
362376 then throw("DApp is already active")
363- else if ((aa == ab))
377+ else if ((ac == ad))
364378 then throw("Assets must be different")
365379 else {
366- let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7))
367- let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this))
368- let bt = ((bm + bq) / 2)
369- let bx = 0
370- let by = Issue(br, bs, bx, bt, true)
371- let bz = calculateAssetId(by)
372- let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(h, bB), IntegerEntry(i, bC), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx)]
373- if (bc)
374- then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))])
375- else bA
380+ let bt = ((("s" + take(bn, 7)) + "_") + take(br, 7))
381+ let bu = ((((("ShareToken of SwopFi protocol for " + bn) + " and ") + br) + " at address ") + toString(this))
382+ let bv = ((bo + bs) / 2)
383+ let bz = 0
384+ let bA = Issue(bt, bu, bz, bv, true)
385+ let bB = calculateAssetId(bA)
386+ let bE = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bm), StringEntry(e, bq), IntegerEntry(h, bF), IntegerEntry(i, bG), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, ao), IntegerEntry(m, ap), bA, StringEntry(j, toBase58String(bB)), IntegerEntry(k, bz)]
387+ if (be)
388+ then (bE ++ [BooleanEntry(o, be), IntegerEntry(p, (Y + (aa * Z)))])
389+ else bE
376390 }
377391 }
378392
379393
380394
381395 @Callable(ay)
382-func keepLimitForFirstHarvest (bF) = if (!(Z))
396+func keepLimitForFirstHarvest (bJ) = if (!(ab))
383397 then throw("DApp is inactive at this moment")
384- else if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
398+ else if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
385399 then throw("Only admin can call this function")
386- else [IntegerEntry(q, bF)]
400+ else [IntegerEntry(q, bJ)]
387401
388402
389403
390404 @Callable(ay)
391-func replenishWithTwoTokens (bG) = {
392- let bf = ay.payments[0].assetId
393- let bi = ay.payments[1].assetId
394- let be = aP(ay.payments[0].amount, bf, bi)
395- let bh = aP(ay.payments[1].amount, bi, bf)
396- if (if ((ai == 0))
397- then (aj == 0)
405+func replenishWithTwoTokens (bK) = {
406+ let bh = ay.payments[0].assetId
407+ let bk = ay.payments[1].assetId
408+ let bg = ay.payments[0].amount
409+ let bj = ay.payments[1].amount
410+ let bL = aI(bh)
411+ let bm = bL._1
412+ let bn = bL._2
413+ let bo = bL._3
414+ let bM = aI(bk)
415+ let bq = bM._1
416+ let br = bM._2
417+ let bs = bM._3
418+ if (if ((ak == 0))
419+ then (al == 0)
398420 else false)
399421 then {
400- let bH = aI(bf)
401- let bk = bH._1
402- let bl = bH._2
403- let bm = bH._3
404- let bI = aI(bi)
405- let bo = bI._1
406- let bp = bI._2
407- let bq = bI._3
408- let bJ = fraction(fraction(aB, aq, be), ap, fraction(aC, aq, bh))
409- if ((bf == bi))
422+ let bN = fraction(fraction(aB, ar, bg), aq, fraction(aC, ar, bj))
423+ if ((bh == bk))
410424 then throw("Assets must be different")
411425 else {
412- let bt = ((bm + bq) / 2)
413- let bx = fraction(pow(be, bm, 5, 1, bm, DOWN), pow(bh, bq, 5, 1, bq, DOWN), pow(10, 0, bt, 0, 0, DOWN))
414- if (!(Z))
426+ let bv = ((bo + bs) / 2)
427+ let bz = fraction(pow(bg, bo, 5, 1, bo, DOWN), pow(bj, bs, 5, 1, bs, DOWN), pow(10, 0, bv, 0, 0, DOWN))
428+ if (!(ab))
415429 then throw("DApp is inactive at this moment")
416- else if (if ((0 > bG))
430+ else if (if ((0 > bK))
417431 then true
418- else (bG > ar))
419- then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG)))
432+ else (bK > as))
433+ then throw(((("Slippage tolerance must be between 0 and " + toString(as)) + " inclusively. Actual: ") + toString(bK)))
420434 else if ((size(ay.payments) != 2))
421435 then throw("Two attached assets expected")
422- else if (if ((((ap * (ar - bG)) / ar) > bJ))
436+ else if (if ((((aq * (as - bK)) / as) > bN))
423437 then true
424- else (bJ > ((ap * (ar + bG)) / ar)))
438+ else (bN > ((aq * (as + bK)) / as)))
425439 then throw("Incorrect assets amount: amounts must have the contract ratio")
426- else if (if ((bf != ac))
440+ else if (if ((bh != ae))
427441 then true
428- else (bi != ad))
429- then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab))
430- else if ((bx == 0))
442+ else (bk != af))
443+ then throw(((("Incorrect assets attached. Expected: " + ac) + " and ") + ad))
444+ else if ((bz == 0))
431445 then throw("Too small amount to replenish")
432446 else if (!(aH))
433- then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb())
434- else [Reissue(ak, bx, true), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, ak)]
447+ then ([ScriptTransfer(ay.caller, bg, bh), ScriptTransfer(ay.caller, bj, bk)] ++ bd())
448+ else {
449+ let bC = if (containsElement(S, bm))
450+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
451+ else 0
452+ if ((bC == bC))
453+ then {
454+ let bD = if (containsElement(S, bq))
455+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
456+ else 0
457+ if ((bD == bD))
458+ then [Reissue(am, bz, true), IntegerEntry(f, bg), IntegerEntry(g, bj), IntegerEntry(k, bz), ScriptTransfer(ay.caller, bz, am)]
459+ else throw("Strict value is not equal to itself.")
460+ }
461+ else throw("Strict value is not equal to itself.")
462+ }
435463 }
436464 }
437465 else {
438- let bJ = fraction(fraction(ai, aq, be), ap, fraction(aj, aq, bh))
439- let bK = fraction(be, aq, ai)
440- let bL = fraction(bh, aq, aj)
441- let bM = fraction(min([bK, bL]), al, aq)
442- if (!(Z))
466+ let bN = fraction(fraction(ak, ar, bg), aq, fraction(al, ar, bj))
467+ let bO = fraction(bg, ar, ak)
468+ let bP = fraction(bj, ar, al)
469+ let bQ = fraction(min([bO, bP]), an, ar)
470+ if (!(ab))
443471 then throw("DApp is inactive at this moment")
444- else if (if ((0 > bG))
472+ else if (if ((0 > bK))
445473 then true
446- else (bG > ar))
447- then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG)))
474+ else (bK > as))
475+ then throw(((("Slippage tolerance must be between 0 and " + toString(as)) + " inclusively. Actual: ") + toString(bK)))
448476 else if ((size(ay.payments) != 2))
449477 then throw("Two attached assets expected")
450- else if (if ((bf != ac))
478+ else if (if ((bh != ae))
451479 then true
452- else (bi != ad))
453- then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab))
454- else if (if ((((ap * (ar - bG)) / ar) > bJ))
480+ else (bk != af))
481+ then throw(((("Incorrect assets attached. Expected: " + ac) + " and ") + ad))
482+ else if (if ((((aq * (as - bK)) / as) > bN))
455483 then true
456- else (bJ > ((ap * (ar + bG)) / ar)))
484+ else (bN > ((aq * (as + bK)) / as)))
457485 then throw("Incorrect assets amount: amounts must have the contract ratio")
458- else if ((bM == 0))
486+ else if ((bQ == 0))
459487 then throw("Too small amount to replenish")
460488 else if (!(aH))
461- then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb())
462- else [IntegerEntry(f, (ai + be)), IntegerEntry(g, (aj + bh)), IntegerEntry(k, (al + bM)), Reissue(ak, bM, true), ScriptTransfer(ay.caller, bM, ak)]
489+ then ([ScriptTransfer(ay.caller, bg, bh), ScriptTransfer(ay.caller, bj, bk)] ++ bd())
490+ else {
491+ let bC = if (containsElement(S, bm))
492+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
493+ else 0
494+ if ((bC == bC))
495+ then {
496+ let bD = if (containsElement(S, bq))
497+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
498+ else 0
499+ if ((bD == bD))
500+ then [IntegerEntry(f, (ak + bg)), IntegerEntry(g, (al + bj)), IntegerEntry(k, (an + bQ)), Reissue(am, bQ, true), ScriptTransfer(ay.caller, bQ, am)]
501+ else throw("Strict value is not equal to itself.")
502+ }
503+ else throw("Strict value is not equal to itself.")
504+ }
463505 }
464506 }
465507
467509
468510 @Callable(ay)
469511 func withdraw () = {
470- let bN = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
471- let bO = bN._1
472- let bP = bN._2
473- let bQ = aP(fraction(bO, ai, al), ac, ad)
474- let bR = aP(fraction(bO, aj, al), ad, ac)
475- if (!(Z))
512+ let bR = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
513+ let bS = bR._1
514+ let bT = bR._2
515+ let bU = fraction(bS, ak, an)
516+ let bV = fraction(bS, al, an)
517+ if (!(ab))
476518 then throw("DApp is inactive at this moment")
477519 else if ((size(ay.payments) != 1))
478520 then throw("One attached payment expected")
479- else if ((bP != ak))
480- then throw(("Incorrect asset attached. Expected: " + toBase58String(ak)))
521+ else if ((bT != am))
522+ then throw(("Incorrect asset attached. Expected: " + toBase58String(am)))
481523 else if (!(aH))
482- then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb())
483- else if (if ((bQ > aD))
524+ then ([ScriptTransfer(ay.caller, bS, bT)] ++ bd())
525+ else if (if ((bU > aD))
484526 then true
485- else (bR > aE))
486- then aY(bQ, bR)
487- else [IntegerEntry(f, (ai - bQ)), IntegerEntry(g, (aj - bR)), IntegerEntry(k, (al - bO)), Burn(ak, bO), ScriptTransfer(ay.caller, bQ, ac), ScriptTransfer(ay.caller, bR, ad)]
527+ else (bV > aE))
528+ then ba(bU, bV)
529+ else {
530+ let bC = if (containsElement(S, ac))
531+ then invoke(this, "stakeUnstake", [false, bU, ac], nil)
532+ else 0
533+ if ((bC == bC))
534+ then {
535+ let bD = if (containsElement(S, ad))
536+ then invoke(this, "stakeUnstake", [false, bV, ad], nil)
537+ else 0
538+ if ((bD == bD))
539+ then [IntegerEntry(f, (ak - bU)), IntegerEntry(g, (al - bV)), IntegerEntry(k, (an - bS)), Burn(am, bS), ScriptTransfer(ay.caller, bU, ae), ScriptTransfer(ay.caller, bV, af)]
540+ else throw("Strict value is not equal to itself.")
541+ }
542+ else throw("Strict value is not equal to itself.")
543+ }
488544 }
489545
490546
491547
492548 @Callable(ay)
493-func exchange (bS) = {
494- let bT = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
495- let bO = bT._1
496- let bP = bT._2
497- func bU (bV,bW) = {
498- let bX = fraction(bW, bO, (bO + bV))
499- let bY = fraction(bX, (ao - am), ao)
500- let bZ = fraction(bX, an, ao)
501- if ((bS > bY))
502- then throw(((("Calculated amount to receive " + toString(bY)) + " is less than specified minimum ") + toString(bS)))
503- else $Tuple3(bX, bY, bZ)
549+func exchange (bW) = {
550+ let bX = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
551+ let bS = bX._1
552+ let bT = bX._2
553+ func bY (bZ,ca) = {
554+ let cb = fraction(ca, bS, (bS + bZ))
555+ let cc = fraction(cb, (ap - ao), ap)
556+ let cd = fraction(cb, commissionGovernance, ap)
557+ if ((bW > cc))
558+ then throw(((("Calculated amount to receive " + toString(cc)) + " is less than specified minimum ") + toString(bW)))
559+ else $Tuple3(cb, cc, cd)
504560 }
505561
506- if (!(Z))
562+ if (!(ab))
507563 then throw("DApp is inactive at this moment")
508- else if (if ((ai == 0))
564+ else if (if ((ak == 0))
509565 then true
510- else (aj == 0))
566+ else (al == 0))
511567 then throw("Can't exchange with zero balance")
512- else if ((0 >= bS))
513- then throw(("Minimal amount to receive must be positive. Actual: " + toString(bS)))
568+ else if ((0 >= bW))
569+ then throw(("Minimal amount to receive must be positive. Actual: " + toString(bW)))
514570 else if ((size(ay.payments) != 1))
515571 then throw("One attached payment expected")
516572 else if (!(aH))
517- then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb())
518- else if ((bP == ac))
573+ then ([ScriptTransfer(ay.caller, bS, bT)] ++ bd())
574+ else if ((bT == ae))
519575 then {
520- let ca = ad
521- let cb = bU(ai, aj)
522- let bX = cb._1
523- let bY = cb._2
524- let bZ = cb._3
525- let cc = (ai + bO)
526- let cd = ((aj - bY) - bZ)
527- if (if ((az >= cc))
528- then true
529- else (aA >= cd))
530- then aV(bY, aE, ah)
531- else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)]
576+ let ce = af
577+ let cf = bY(ak, al)
578+ let cb = cf._1
579+ let cc = cf._2
580+ let cd = cf._3
581+ let cg = (ak + bS)
582+ let ch = ((al - cc) - cd)
583+ let bC = if (containsElement(S, ac))
584+ then invoke(this, "stakeUnstake", [true, bS, ac], nil)
585+ else 0
586+ if ((bC == bC))
587+ then {
588+ let bD = if (containsElement(S, ad))
589+ then invoke(this, "stakeUnstake", [false, (cc + cd), ad], nil)
590+ else 0
591+ if ((bD == bD))
592+ then [IntegerEntry(f, cg), IntegerEntry(g, ch), ScriptTransfer(ay.caller, cc, ce), ScriptTransfer(N, cd, ce)]
593+ else throw("Strict value is not equal to itself.")
594+ }
595+ else throw("Strict value is not equal to itself.")
532596 }
533- else if ((bP == ad))
597+ else if ((bT == af))
534598 then {
535- let ca = ac
536- let ce = bU(aj, ai)
537- let bX = ce._1
538- let bY = ce._2
539- let bZ = ce._3
540- let cc = ((ai - bY) - bZ)
541- let cd = (aj + bO)
542- if (if ((az >= cc))
599+ let ce = ae
600+ let ci = bY(al, ak)
601+ let cb = ci._1
602+ let cc = ci._2
603+ let cd = ci._3
604+ let cg = ((ak - cc) - cd)
605+ let ch = (al + bS)
606+ if (if ((az >= cg))
543607 then true
544- else (aA >= cd))
545- then aV(bY, aD, ae)
546- else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)]
608+ else (aA >= ch))
609+ then aX(cc, aD, ag)
610+ else {
611+ let bC = if (containsElement(S, ac))
612+ then invoke(this, "stakeUnstake", [false, (cc + cd), ac], nil)
613+ else 0
614+ if ((bC == bC))
615+ then {
616+ let bD = if (containsElement(S, ad))
617+ then invoke(this, "stakeUnstake", [true, bS, ad], nil)
618+ else 0
619+ if ((bD == bD))
620+ then [IntegerEntry(f, cg), IntegerEntry(g, ch), ScriptTransfer(ay.caller, cc, ce), ScriptTransfer(N, cd, ce)]
621+ else throw("Strict value is not equal to itself.")
622+ }
623+ else throw("Strict value is not equal to itself.")
624+ }
547625 }
548- else throw(((("Incorrect asset attached. Expected: " + aa) + " or ") + ab))
626+ else throw(((("Incorrect asset attached. Expected: " + ac) + " or ") + ad))
549627 }
550628
551629
552630
553631 @Callable(ay)
554-func shutdown () = if (!(Z))
632+func shutdown () = if (!(ab))
555633 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, n), "the cause wasn't specified")))
556- else if (!(containsElement([E, F, G, H], ay.callerPublicKey)))
634+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
557635 then throw("Only admin can call this function")
558636 else aN("Paused by admin")
559637
560638
561639
562640 @Callable(ay)
563-func activate () = if (Z)
641+func activate () = if (ab)
564642 then throw("DApp is already active")
565- else if (!(containsElement([E, F, G, H], ay.callerPublicKey)))
643+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
566644 then throw("Only admin can call this function")
567645 else [BooleanEntry(c, true), DeleteEntry(n)]
568646
569647
570648
571649 @Callable(ay)
572-func takeIntoAccountExtraFunds (cf) = {
573- let cg = (aF - ai)
574- let ch = (aG - aj)
575- let ci = (cg - (if ((ac == unit))
576- then cf
650+func takeIntoAccountExtraFunds (cj) = {
651+ let ck = (aF - ak)
652+ let cl = (aG - al)
653+ let cm = (ck - (if ((ae == unit))
654+ then cj
577655 else 0))
578- let cj = (ch - (if ((ad == unit))
579- then cf
656+ let cn = (cl - (if ((af == unit))
657+ then cj
580658 else 0))
581- if (!(Z))
659+ if (!(ab))
582660 then throw("DApp is inactive at this moment")
583661 else if ((ay.caller != this))
584662 then throw("Only the DApp itself can call this function")
585- else if ((0 > cf))
586- then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cf)))
587- else if (if ((0 > cg))
663+ else if ((0 > cj))
664+ then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cj)))
665+ else if (if ((0 > ck))
588666 then true
589- else (0 > ch))
667+ else (0 > cl))
590668 then aN("Enroll amount negative")
591- else if (if ((0 > ci))
669+ else if (if ((0 > cm))
592670 then true
593- else (0 > cj))
671+ else (0 > cn))
594672 then throw("Too large amountLeave")
595- else [IntegerEntry(f, (ai + ci)), IntegerEntry(g, (aj + cj)), IntegerEntry(("last_income_" + aa), ci), IntegerEntry(("last_income_" + ab), cj)]
673+ else {
674+ let bC = if (if (containsElement(S, ac))
675+ then (cm > 0)
676+ else false)
677+ then invoke(this, "stakeUnstake", [true, cm, ac], nil)
678+ else 0
679+ if ((bC == bC))
680+ then {
681+ let bD = if (if (containsElement(S, ad))
682+ then (cn > 0)
683+ else false)
684+ then invoke(this, "stakeUnstake", [true, cn, ad], nil)
685+ else 0
686+ if ((bD == bD))
687+ then [IntegerEntry(f, (ak + cm)), IntegerEntry(g, (al + cn)), IntegerEntry(("last_income_" + ac), cm), IntegerEntry(("last_income_" + ad), cn)]
688+ else throw("Strict value is not equal to itself.")
689+ }
690+ else throw("Strict value is not equal to itself.")
691+ }
596692 }
597693
598694
599-@Verifier(ck)
600-func cl () = {
601- let cm = {
602- let cn = if (sigVerify(ck.bodyBytes, ck.proofs[0], E))
695+
696+@Callable(ay)
697+func stakeUnstake (aQ,aS,co) = if ((ay.caller != this))
698+ then throw("Only contract itself can invoke this function")
699+ else if ((co == "WAVES"))
700+ then {
701+ let cp = addressFromStringValue(valueOrErrorMessage(getString(C, w), "No leasing pool in oracle"))
702+ let cq = getBinary(this, y)
703+ let cr = valueOrElse(getInteger(this, x), 0)
704+ let cs = if (aQ)
705+ then (cr + aS)
706+ else (cr - aS)
707+ let ct = Lease(cp, cs)
708+ let cu = calculateLeaseId(ct)
709+ let cv = [ct, BinaryEntry(y, cu), IntegerEntry(x, cs)]
710+ let F = cq
711+ if ($isInstanceOf(F, "ByteVector"))
712+ then {
713+ let cw = F
714+ ([LeaseCancel(cw)] ++ cv)
715+ }
716+ else cv
717+ }
718+ else {
719+ let cx = aR(aQ, aS, fromBase58String(co))
720+ let aU = cx._1
721+ let cy = cx._2
722+ let cz = cx._3
723+ let cA = cx._4
724+ let cB = invoke(cy, aU, cz, cA)
725+ nil
726+ }
727+
728+
729+
730+@Callable(ay)
731+func stakeAll () = if (!(ab))
732+ then throw("DApp is inactive at this moment")
733+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
734+ then throw("Only admin can call this function")
735+ else {
736+ let bC = if (containsElement(S, ac))
737+ then {
738+ let bb = (ak - az)
739+ if ((bb > 0))
740+ then invoke(this, "stakeUnstake", [true, bb, ac], nil)
741+ else 0
742+ }
743+ else 0
744+ if ((bC == bC))
745+ then {
746+ let bD = if (containsElement(S, ad))
747+ then {
748+ let bc = (al - aA)
749+ if ((bc > 0))
750+ then invoke(this, "stakeUnstake", [true, bc, ad], nil)
751+ else 0
752+ }
753+ else 0
754+ if ((bD == bD))
755+ then nil
756+ else throw("Strict value is not equal to itself.")
757+ }
758+ else throw("Strict value is not equal to itself.")
759+ }
760+
761+
762+@Verifier(cC)
763+func cD () = {
764+ let cE = {
765+ let cF = if (sigVerify(cC.bodyBytes, cC.proofs[0], I))
603766 then 1
604767 else 0
605- let co = if (sigVerify(ck.bodyBytes, ck.proofs[1], F))
768+ let cG = if (sigVerify(cC.bodyBytes, cC.proofs[1], J))
606769 then 1
607770 else 0
608- let cp = if (sigVerify(ck.bodyBytes, ck.proofs[2], G))
771+ let cH = if (sigVerify(cC.bodyBytes, cC.proofs[2], K))
609772 then 1
610773 else 0
611- (((cn + co) + cp) >= 2)
774+ (((cF + cG) + cH) >= 2)
612775 }
613- let B = ck
614- if ($isInstanceOf(B, "InvokeScriptTransaction"))
776+ let F = cC
777+ if ($isInstanceOf(F, "InvokeScriptTransaction"))
615778 then {
616- let cq = B
617- let cr = if ((cq.dApp == this))
618- then (cq.function == "takeIntoAccountExtraFunds")
779+ let cB = F
780+ let cI = if ((cB.dApp == this))
781+ then (cB.function == "takeIntoAccountExtraFunds")
619782 else false
620- let cs = if (if ((cq.dApp == P))
621- then if (if (if (containsElement(["lockNeutrino", "lockNsbt"], cq.function))
622- then (size(cq.payments) == 1)
623- else false)
624- then if ((cq.payments[0].assetId == L))
625- then true
626- else (cq.payments[0].assetId == M)
627- else false)
628- then true
629- else if (containsElement(["unlockNeutrino", "unlockNsbt"], cq.function))
630- then (size(cq.payments) == 0)
631- else false
783+ let cJ = if (if (if ((cB.dApp == V))
784+ then (cB.function == "exchange")
785+ else false)
786+ then (ae == P)
632787 else false)
633788 then true
634- else if ((cq.dApp == Q))
635- then if (if (if ((cq.function == "startStaking"))
636- then (size(cq.payments) == 1)
637- else false)
638- then (cq.payments[0].assetId == O)
639- else false)
640- then true
641- else if ((cq.function == "stopStaking"))
642- then (size(cq.payments) == 0)
643- else false
789+ else if (if ((af == P))
790+ then (size(cB.payments) == 1)
791+ else false)
792+ then (cB.payments[0].assetId == P)
644793 else false
645- let ct = if (if (if ((cq.dApp == R))
646- then (cq.function == "exchange")
794+ let cK = if (if (if ((cB.dApp == W))
795+ then (cB.function == "exchange")
647796 else false)
648- then (ac == L)
797+ then (ae == Q)
649798 else false)
650799 then true
651- else if (if ((ad == L))
652- then (size(cq.payments) == 1)
800+ else if (if ((af == Q))
801+ then (size(cB.payments) == 1)
653802 else false)
654- then (cq.payments[0].assetId == L)
803+ then (cB.payments[0].assetId == P)
655804 else false
656- let cu = if (if (if ((cq.dApp == S))
657- then (cq.function == "exchange")
658- else false)
659- then (ac == M)
805+ let cL = if (if (if (sigVerify(cC.bodyBytes, cC.proofs[0], I))
806+ then true
807+ else sigVerify(cC.bodyBytes, cC.proofs[0], J))
808+ then true
809+ else sigVerify(cC.bodyBytes, cC.proofs[0], K))
810+ then true
811+ else sigVerify(cC.bodyBytes, cC.proofs[0], M)
812+ if (if (if (if (cI)
813+ then true
814+ else cJ)
815+ then true
816+ else cK)
817+ then cL
660818 else false)
661819 then true
662- else if (if ((ad == M))
663- then (size(cq.payments) == 1)
664- else false)
665- then (cq.payments[0].assetId == L)
666- else false
667- let cv = if (if (if (sigVerify(ck.bodyBytes, ck.proofs[0], E))
668- then true
669- else sigVerify(ck.bodyBytes, ck.proofs[0], F))
670- then true
671- else sigVerify(ck.bodyBytes, ck.proofs[0], G))
672- then true
673- else sigVerify(ck.bodyBytes, ck.proofs[0], I)
674- if (if (if (if (if (cr)
675- then true
676- else cs)
677- then true
678- else ct)
679- then true
680- else cu)
681- then cv
682- else false)
683- then true
684- else cm
820+ else cE
685821 }
686- else cm
822+ else cE
687823 }
688824
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "1.0.0"
55
66 let b = "version"
77
88 let c = "active"
99
1010 let d = "A_asset_id"
1111
1212 let e = "B_asset_id"
1313
1414 let f = "A_asset_balance"
1515
1616 let g = "B_asset_balance"
1717
1818 let h = "A_asset_init"
1919
2020 let i = "B_asset_init"
2121
2222 let j = "share_asset_id"
2323
2424 let k = "share_asset_supply"
2525
2626 let l = "commission"
2727
2828 let m = "commission_scale_delimiter"
2929
3030 let n = "shutdown_cause"
3131
3232 let o = "first_harvest"
3333
3434 let p = "first_harvest_height"
3535
3636 let q = "share_limit_on_first_harvest"
3737
3838 let r = "base_period"
3939
4040 let s = "period_length"
4141
4242 let t = "start_height"
4343
44-let u = "first_harvest_height"
44+let u = "staking_usdnnsbt_address"
4545
46-let v = "admin_pub_1"
46+let v = "staking_eurn_address"
4747
48-let w = "admin_pub_2"
48+let w = "leasing_address"
4949
50-let x = "admin_pub_3"
50+let x = "leasing_amount"
5151
52-let y = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
52+let y = "leasing_id"
5353
54-func z (A) = {
55- let B = getString(y, A)
56- if ($isInstanceOf(B, "String"))
54+let z = "admin_pub_1"
55+
56+let A = "admin_pub_2"
57+
58+let B = "admin_pub_3"
59+
60+let C = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
61+
62+func D (E) = {
63+ let F = getString(C, E)
64+ if ($isInstanceOf(F, "String"))
5765 then {
58- let C = B
59- fromBase58String(C)
66+ let G = F
67+ fromBase58String(G)
6068 }
6169 else {
62- let D = B
70+ let H = F
6371 throw("Admin public key is empty")
6472 }
6573 }
6674
6775
68-let E = z(v)
76+let I = D(z)
6977
70-let F = z(w)
78+let J = D(A)
7179
72-let G = z(x)
80+let K = D(B)
7381
74-let H = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
82+let L = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
7583
76-let I = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
84+let M = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
7785
78-let J = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
86+let N = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7987
80-let K = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
88+let O = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
8189
82-let L = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
90+let P = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
8391
84-let M = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9'
92+let Q = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9'
8593
86-let N = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
94+let R = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA'
8795
88-let O = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA'
96+let S = ["WAVES", toBase58String(P), toBase58String(Q), toBase58String(R)]
8997
90-let P = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg')
98+let T = Address(fromBase58String(valueOrErrorMessage(getString(C, u), "no usdn staking address")))
9199
92-let Q = Address(base58'3MyVqAbmKWh339gF6hy8faWw1jGeTV2wnGE')
100+let U = Address(fromBase58String(valueOrErrorMessage(getString(C, v), "no usdn staking address")))
93101
94-let R = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37')
102+let V = Address(base58'3N8PGkzXhbtTvEwEQTtE2xiTJmsDEQ9XfoZ')
95103
96-let S = Address(base58'3Mye9wVR7d2mc6Y5ZJTu11svzgUQ7o8H9dA')
104+let W = Address(base58'3MqW1t2cxdYy2emEMk3YtZkRwQPhHaTfWRe')
97105
98-let T = 270000
106+let X = valueOrErrorMessage(getInteger(O, r), "Empty kBasePeriod")
99107
100-let U = 234000
108+let Y = valueOrErrorMessage(getInteger(O, t), "Empty kStartHeight")
101109
102-let V = valueOrErrorMessage(getInteger(K, r), "Empty kBasePeriod")
110+let Z = valueOrErrorMessage(getInteger(O, s), "Empty kPeriodLength")
103111
104-let W = valueOrErrorMessage(getInteger(K, t), "Empty kStartHeight")
112+let aa = ((X + ((height - Y) / Z)) + 3)
105113
106-let X = valueOrErrorMessage(getInteger(K, s), "Empty kPeriodLength")
114+let ab = getBooleanValue(this, c)
107115
108-let Y = ((V + ((height - W) / X)) + 3)
116+let ac = getStringValue(this, d)
109117
110-let Z = getBooleanValue(this, c)
118+let ad = getStringValue(this, e)
111119
112-let aa = getStringValue(this, d)
120+let ae = if ((ac == "WAVES"))
121+ then unit
122+ else fromBase58String(ac)
113123
114-let ab = getStringValue(this, e)
124+let af = if ((ad == "WAVES"))
125+ then unit
126+ else fromBase58String(ad)
115127
116-let ac = if ((aa == "WAVES"))
117- then unit
118- else fromBase58String(aa)
119-
120-let ad = if ((ab == "WAVES"))
121- then unit
122- else fromBase58String(ab)
123-
124-let ae = {
125- let B = ac
126- if ($isInstanceOf(B, "ByteVector"))
128+let ag = {
129+ let F = ae
130+ if ($isInstanceOf(F, "ByteVector"))
127131 then {
128- let af = B
129- value(assetInfo(af)).name
132+ let ah = F
133+ value(assetInfo(ah)).name
130134 }
131- else if ($isInstanceOf(B, "Unit"))
135+ else if ($isInstanceOf(F, "Unit"))
132136 then {
133- let ag = B
137+ let ai = F
134138 "WAVES"
135139 }
136140 else throw("Match error")
137141 }
138142
139-let ah = {
140- let B = ad
141- if ($isInstanceOf(B, "ByteVector"))
143+let aj = {
144+ let F = af
145+ if ($isInstanceOf(F, "ByteVector"))
142146 then {
143- let af = B
144- value(assetInfo(af)).name
147+ let ah = F
148+ value(assetInfo(ah)).name
145149 }
146- else if ($isInstanceOf(B, "Unit"))
150+ else if ($isInstanceOf(F, "Unit"))
147151 then {
148- let ag = B
152+ let ai = F
149153 "WAVES"
150154 }
151155 else throw("Match error")
152156 }
153157
154-let ai = getIntegerValue(this, f)
158+let ak = getIntegerValue(this, f)
155159
156-let aj = getIntegerValue(this, g)
160+let al = getIntegerValue(this, g)
157161
158-let ak = fromBase58String(getStringValue(this, j))
162+let am = fromBase58String(getStringValue(this, j))
159163
160-let al = getIntegerValue(this, k)
164+let an = getIntegerValue(this, k)
161165
162-let am = 3000
166+let ao = 3000
163167
164-let an = 1200
168+let ap = 1000000
165169
166-let ao = 1000000
170+let aq = 1000
167171
168-let ap = 1000
172+let ar = 100000000
169173
170-let aq = 100000000
171-
172-let ar = 1000
173-
174-let as = 8
174+let as = 1000
175175
176176 func at (au) = {
177- let B = au
178- if ($isInstanceOf(B, "ByteVector"))
177+ let F = au
178+ if ($isInstanceOf(F, "ByteVector"))
179179 then {
180- let af = B
181- assetBalance(this, af)
180+ let ah = F
181+ assetBalance(this, ah)
182182 }
183- else if ($isInstanceOf(B, "Unit"))
183+ else if ($isInstanceOf(F, "Unit"))
184184 then {
185- let ag = B
185+ let ai = F
186186 wavesBalance(this).available
187187 }
188188 else throw("Match error")
189189 }
190190
191191
192192 func av (au) = {
193193 let aw = {
194- let B = au
195- if ($isInstanceOf(B, "ByteVector"))
194+ let F = au
195+ if ($isInstanceOf(F, "ByteVector"))
196196 then {
197- let ax = B
198- if (if ((ax == L))
197+ let ax = F
198+ if (if ((ax == P))
199199 then true
200- else (ax == M))
201- then getInteger(P, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this)))
202- else if ((ax == O))
203- then getInteger(Q, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this)))
200+ else (ax == Q))
201+ then getInteger(T, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this)))
202+ else if ((ax == R))
203+ then getInteger(U, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this)))
204204 else 0
205205 }
206- else if ($isInstanceOf(B, "Unit"))
207- then 0
206+ else if ($isInstanceOf(F, "Unit"))
207+ then valueOrElse(getInteger(this, x), 0)
208208 else throw("Match error")
209209 }
210- let B = aw
211- if ($isInstanceOf(B, "Int"))
210+ let F = aw
211+ if ($isInstanceOf(F, "Int"))
212212 then {
213- let ay = B
213+ let ay = F
214214 ay
215215 }
216216 else 0
217217 }
218218
219219
220-let az = av(ac)
220+let az = av(ae)
221221
222-let aA = av(ad)
222+let aA = av(af)
223223
224224 let aB = getIntegerValue(this, h)
225225
226226 let aC = getIntegerValue(this, i)
227227
228-let aD = (ai - az)
228+let aD = (ak - az)
229229
230-let aE = (aj - aA)
230+let aE = (al - aA)
231231
232-let aF = (at(ac) + az)
232+let aF = (at(ae) + az)
233233
234-let aG = (at(ad) + aA)
234+let aG = (at(af) + aA)
235235
236-let aH = if ((aF >= ai))
237- then (aG >= aj)
236+let aH = if ((aF >= ak))
237+ then (aG >= al)
238238 else false
239239
240240 func aI (au) = {
241- let B = au
242- if ($isInstanceOf(B, "ByteVector"))
241+ let F = au
242+ if ($isInstanceOf(F, "ByteVector"))
243243 then {
244- let af = B
245- let aJ = toBase58String(af)
246- let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist"))
244+ let ah = F
245+ let aJ = toBase58String(ah)
246+ let aK = valueOrErrorMessage(assetInfo(ah), (("Asset " + aJ) + " doesn't exist"))
247247 $Tuple3(aJ, aK.name, aK.decimals)
248248 }
249- else if ($isInstanceOf(B, "Unit"))
249+ else if ($isInstanceOf(F, "Unit"))
250250 then {
251- let ag = B
251+ let ai = F
252252 $Tuple3("WAVES", "WAVES", 8)
253253 }
254254 else throw("Match error")
255255 }
256256
257257
258258 func aL (aM) = if ((aM == "WAVES"))
259259 then $Tuple3("WAVES", "WAVES", 8)
260260 else {
261261 let aJ = aM
262- let af = fromBase58String(aM)
263- let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist"))
262+ let ah = fromBase58String(aM)
263+ let aK = valueOrErrorMessage(assetInfo(ah), (("Asset " + aJ) + " doesn't exist"))
264264 $Tuple3(aJ, aK.name, aK.decimals)
265265 }
266266
267267
268268 func aN (aO) = [BooleanEntry(c, false), StringEntry(n, aO)]
269269
270270
271-func aP (aQ,au,aR) = if (if ((au == L))
272- then true
273- else (au == O))
274- then {
275- let aS = if ((au == L))
276- then (T * (if ((aR == M))
277- then 2
278- else 1))
279- else if ((au == O))
280- then U
281- else 0
282- let aT = (aQ - aS)
283- if ((0 >= aT))
284- then throw((((("Insufficient amount " + toString(aQ)) + " to deduct staking fee ") + toString(aS)) + "USDN/EURN"))
285- else aT
286- }
287- else aQ
271+func aP (aQ,au) = if (aQ)
272+ then if ((au == P))
273+ then $Tuple2("lockNeutrino", T)
274+ else if ((au == Q))
275+ then $Tuple2("lockNsbt", T)
276+ else $Tuple2("startStaking", U)
277+ else if ((au == P))
278+ then $Tuple2("unlockNeutrino", T)
279+ else if ((au == Q))
280+ then $Tuple2("unlockNsbt", T)
281+ else $Tuple2("stopStaking", U)
288282
289283
290-func aU (au,aR) = if ((au == L))
291- then (T * (if ((aR == M))
292- then 2
293- else 1))
294- else if ((au == O))
295- then U
296- else 0
284+func aR (aQ,aS,au) = if (aQ)
285+ then {
286+ let aT = aP(aQ, au)
287+ let aU = aT._1
288+ let aV = aT._2
289+ $Tuple4(aU, aV, nil, [AttachedPayment(au, aS)])
290+ }
291+ else {
292+ let aW = aP(aQ, au)
293+ let aU = aW._1
294+ let aV = aW._2
295+ $Tuple4(aU, aV, [aS, toBase58String(au)], nil)
296+ }
297297
298298
299-func aV (aQ,aW,aX) = throw((((((((("Insufficient DApp balance to pay " + toString(aQ)) + " ") + aX) + " due to staking. Available: ") + toString(aW)) + " ") + aX) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
299+func aX (aS,aY,aZ) = throw((((((((("Insufficient DApp balance to pay " + toString(aS)) + " ") + aZ) + " due to staking. Available: ") + toString(aY)) + " ") + aZ) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
300300
301301
302-func aY (aZ,ba) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(aZ)) + " ") + ae) + " and ") + toString(ba)) + " ") + ah) + " due to staking. Available: ") + toString(aD)) + " ") + ae) + " and ") + toString(aE)) + " ") + ah) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
302+func ba (bb,bc) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(bb)) + " ") + ag) + " and ") + toString(bc)) + " ") + aj) + " due to staking. Available: ") + toString(aD)) + " ") + ag) + " and ") + toString(aE)) + " ") + aj) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
303303
304304
305-func bb () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ae) + ", ") + toString(aG)) + " ") + ah) + ". State: ") + toString(ai)) + " ") + ae) + ", ") + toString(aj)) + " ") + ah))
305+func bd () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ag) + ", ") + toString(aG)) + " ") + aj) + ". State: ") + toString(ak)) + " ") + ag) + ", ") + toString(al)) + " ") + aj))
306306
307307
308308 @Callable(ay)
309-func init (bc) = {
310- let bd = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
311- let be = bd._1
312- let bf = bd._2
313- let bg = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId)
314- let bh = bg._1
315- let bi = bg._2
316- let bj = aI(bf)
317- let bk = bj._1
318- let bl = bj._2
319- let bm = bj._3
320- let bn = aI(bi)
321- let bo = bn._1
322- let bp = bn._2
323- let bq = bn._3
324- if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
309+func init (be) = {
310+ let bf = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
311+ let bg = bf._1
312+ let bh = bf._2
313+ let bi = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId)
314+ let bj = bi._1
315+ let bk = bi._2
316+ let bl = aI(bh)
317+ let bm = bl._1
318+ let bn = bl._2
319+ let bo = bl._3
320+ let bp = aI(bk)
321+ let bq = bp._1
322+ let br = bp._2
323+ let bs = bp._3
324+ if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
325325 then throw("Only admin can call this function")
326326 else if (isDefined(getBoolean(this, c)))
327327 then throw("DApp is already active")
328- else if ((bf == bi))
328+ else if ((bh == bk))
329329 then throw("Assets must be different")
330330 else {
331- let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7))
332- let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this))
333- let bt = ((bm + bq) / 2)
334- let bu = pow(be, bm, 5, 1, bm, DOWN)
335- let bv = pow(bh, bq, 5, 1, bq, DOWN)
336- let bw = pow(10, 0, bt, 0, 0, DOWN)
337- let bx = fraction(bu, bv, bw)
338- let by = Issue(br, bs, bx, bt, true)
339- let bz = calculateAssetId(by)
340- let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, bz)]
341- if (bc)
342- then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))])
343- else bA
331+ let bt = ((("s" + take(bn, 7)) + "_") + take(br, 7))
332+ let bu = ((((("ShareToken of SwopFi protocol for " + bn) + " and ") + br) + " at address ") + toString(this))
333+ let bv = ((bo + bs) / 2)
334+ let bw = pow(bg, bo, 5, 1, bo, DOWN)
335+ let bx = pow(bj, bs, 5, 1, bs, DOWN)
336+ let by = pow(10, 0, bv, 0, 0, DOWN)
337+ let bz = fraction(bw, bx, by)
338+ let bA = Issue(bt, bu, bz, bv, true)
339+ let bB = calculateAssetId(bA)
340+ let bC = if (containsElement(S, bm))
341+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
342+ else 0
343+ if ((bC == bC))
344+ then {
345+ let bD = if (containsElement(S, bq))
346+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
347+ else 0
348+ if ((bD == bD))
349+ then {
350+ let bE = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bm), StringEntry(e, bq), IntegerEntry(f, bg), IntegerEntry(g, bj), IntegerEntry(l, ao), IntegerEntry(m, ap), bA, StringEntry(j, toBase58String(bB)), IntegerEntry(k, bz), ScriptTransfer(ay.caller, bz, bB)]
351+ if (be)
352+ then (bE ++ [BooleanEntry(o, be), IntegerEntry(p, (Y + (aa * Z)))])
353+ else bE
354+ }
355+ else throw("Strict value is not equal to itself.")
356+ }
357+ else throw("Strict value is not equal to itself.")
344358 }
345359 }
346360
347361
348362
349363 @Callable(ay)
350-func initWithInitRatio (bB,bC,aa,ab,bc) = {
351- let bD = aL(aa)
352- let bk = bD._1
353- let bl = bD._2
354- let bm = bD._3
355- let bE = aL(ab)
356- let bo = bE._1
357- let bp = bE._2
358- let bq = bE._3
359- if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
364+func initWithInitRatio (bF,bG,ac,ad,be) = {
365+ let bH = aL(ac)
366+ let bm = bH._1
367+ let bn = bH._2
368+ let bo = bH._3
369+ let bI = aL(ad)
370+ let bq = bI._1
371+ let br = bI._2
372+ let bs = bI._3
373+ if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
360374 then throw("Only admin can call this function")
361375 else if (isDefined(getBoolean(this, c)))
362376 then throw("DApp is already active")
363- else if ((aa == ab))
377+ else if ((ac == ad))
364378 then throw("Assets must be different")
365379 else {
366- let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7))
367- let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this))
368- let bt = ((bm + bq) / 2)
369- let bx = 0
370- let by = Issue(br, bs, bx, bt, true)
371- let bz = calculateAssetId(by)
372- let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(h, bB), IntegerEntry(i, bC), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx)]
373- if (bc)
374- then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))])
375- else bA
380+ let bt = ((("s" + take(bn, 7)) + "_") + take(br, 7))
381+ let bu = ((((("ShareToken of SwopFi protocol for " + bn) + " and ") + br) + " at address ") + toString(this))
382+ let bv = ((bo + bs) / 2)
383+ let bz = 0
384+ let bA = Issue(bt, bu, bz, bv, true)
385+ let bB = calculateAssetId(bA)
386+ let bE = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bm), StringEntry(e, bq), IntegerEntry(h, bF), IntegerEntry(i, bG), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, ao), IntegerEntry(m, ap), bA, StringEntry(j, toBase58String(bB)), IntegerEntry(k, bz)]
387+ if (be)
388+ then (bE ++ [BooleanEntry(o, be), IntegerEntry(p, (Y + (aa * Z)))])
389+ else bE
376390 }
377391 }
378392
379393
380394
381395 @Callable(ay)
382-func keepLimitForFirstHarvest (bF) = if (!(Z))
396+func keepLimitForFirstHarvest (bJ) = if (!(ab))
383397 then throw("DApp is inactive at this moment")
384- else if (!(containsElement([E, F, G, I], ay.callerPublicKey)))
398+ else if (!(containsElement([I, J, K, M], ay.callerPublicKey)))
385399 then throw("Only admin can call this function")
386- else [IntegerEntry(q, bF)]
400+ else [IntegerEntry(q, bJ)]
387401
388402
389403
390404 @Callable(ay)
391-func replenishWithTwoTokens (bG) = {
392- let bf = ay.payments[0].assetId
393- let bi = ay.payments[1].assetId
394- let be = aP(ay.payments[0].amount, bf, bi)
395- let bh = aP(ay.payments[1].amount, bi, bf)
396- if (if ((ai == 0))
397- then (aj == 0)
405+func replenishWithTwoTokens (bK) = {
406+ let bh = ay.payments[0].assetId
407+ let bk = ay.payments[1].assetId
408+ let bg = ay.payments[0].amount
409+ let bj = ay.payments[1].amount
410+ let bL = aI(bh)
411+ let bm = bL._1
412+ let bn = bL._2
413+ let bo = bL._3
414+ let bM = aI(bk)
415+ let bq = bM._1
416+ let br = bM._2
417+ let bs = bM._3
418+ if (if ((ak == 0))
419+ then (al == 0)
398420 else false)
399421 then {
400- let bH = aI(bf)
401- let bk = bH._1
402- let bl = bH._2
403- let bm = bH._3
404- let bI = aI(bi)
405- let bo = bI._1
406- let bp = bI._2
407- let bq = bI._3
408- let bJ = fraction(fraction(aB, aq, be), ap, fraction(aC, aq, bh))
409- if ((bf == bi))
422+ let bN = fraction(fraction(aB, ar, bg), aq, fraction(aC, ar, bj))
423+ if ((bh == bk))
410424 then throw("Assets must be different")
411425 else {
412- let bt = ((bm + bq) / 2)
413- let bx = fraction(pow(be, bm, 5, 1, bm, DOWN), pow(bh, bq, 5, 1, bq, DOWN), pow(10, 0, bt, 0, 0, DOWN))
414- if (!(Z))
426+ let bv = ((bo + bs) / 2)
427+ let bz = fraction(pow(bg, bo, 5, 1, bo, DOWN), pow(bj, bs, 5, 1, bs, DOWN), pow(10, 0, bv, 0, 0, DOWN))
428+ if (!(ab))
415429 then throw("DApp is inactive at this moment")
416- else if (if ((0 > bG))
430+ else if (if ((0 > bK))
417431 then true
418- else (bG > ar))
419- then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG)))
432+ else (bK > as))
433+ then throw(((("Slippage tolerance must be between 0 and " + toString(as)) + " inclusively. Actual: ") + toString(bK)))
420434 else if ((size(ay.payments) != 2))
421435 then throw("Two attached assets expected")
422- else if (if ((((ap * (ar - bG)) / ar) > bJ))
436+ else if (if ((((aq * (as - bK)) / as) > bN))
423437 then true
424- else (bJ > ((ap * (ar + bG)) / ar)))
438+ else (bN > ((aq * (as + bK)) / as)))
425439 then throw("Incorrect assets amount: amounts must have the contract ratio")
426- else if (if ((bf != ac))
440+ else if (if ((bh != ae))
427441 then true
428- else (bi != ad))
429- then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab))
430- else if ((bx == 0))
442+ else (bk != af))
443+ then throw(((("Incorrect assets attached. Expected: " + ac) + " and ") + ad))
444+ else if ((bz == 0))
431445 then throw("Too small amount to replenish")
432446 else if (!(aH))
433- then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb())
434- else [Reissue(ak, bx, true), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, ak)]
447+ then ([ScriptTransfer(ay.caller, bg, bh), ScriptTransfer(ay.caller, bj, bk)] ++ bd())
448+ else {
449+ let bC = if (containsElement(S, bm))
450+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
451+ else 0
452+ if ((bC == bC))
453+ then {
454+ let bD = if (containsElement(S, bq))
455+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
456+ else 0
457+ if ((bD == bD))
458+ then [Reissue(am, bz, true), IntegerEntry(f, bg), IntegerEntry(g, bj), IntegerEntry(k, bz), ScriptTransfer(ay.caller, bz, am)]
459+ else throw("Strict value is not equal to itself.")
460+ }
461+ else throw("Strict value is not equal to itself.")
462+ }
435463 }
436464 }
437465 else {
438- let bJ = fraction(fraction(ai, aq, be), ap, fraction(aj, aq, bh))
439- let bK = fraction(be, aq, ai)
440- let bL = fraction(bh, aq, aj)
441- let bM = fraction(min([bK, bL]), al, aq)
442- if (!(Z))
466+ let bN = fraction(fraction(ak, ar, bg), aq, fraction(al, ar, bj))
467+ let bO = fraction(bg, ar, ak)
468+ let bP = fraction(bj, ar, al)
469+ let bQ = fraction(min([bO, bP]), an, ar)
470+ if (!(ab))
443471 then throw("DApp is inactive at this moment")
444- else if (if ((0 > bG))
472+ else if (if ((0 > bK))
445473 then true
446- else (bG > ar))
447- then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG)))
474+ else (bK > as))
475+ then throw(((("Slippage tolerance must be between 0 and " + toString(as)) + " inclusively. Actual: ") + toString(bK)))
448476 else if ((size(ay.payments) != 2))
449477 then throw("Two attached assets expected")
450- else if (if ((bf != ac))
478+ else if (if ((bh != ae))
451479 then true
452- else (bi != ad))
453- then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab))
454- else if (if ((((ap * (ar - bG)) / ar) > bJ))
480+ else (bk != af))
481+ then throw(((("Incorrect assets attached. Expected: " + ac) + " and ") + ad))
482+ else if (if ((((aq * (as - bK)) / as) > bN))
455483 then true
456- else (bJ > ((ap * (ar + bG)) / ar)))
484+ else (bN > ((aq * (as + bK)) / as)))
457485 then throw("Incorrect assets amount: amounts must have the contract ratio")
458- else if ((bM == 0))
486+ else if ((bQ == 0))
459487 then throw("Too small amount to replenish")
460488 else if (!(aH))
461- then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb())
462- else [IntegerEntry(f, (ai + be)), IntegerEntry(g, (aj + bh)), IntegerEntry(k, (al + bM)), Reissue(ak, bM, true), ScriptTransfer(ay.caller, bM, ak)]
489+ then ([ScriptTransfer(ay.caller, bg, bh), ScriptTransfer(ay.caller, bj, bk)] ++ bd())
490+ else {
491+ let bC = if (containsElement(S, bm))
492+ then invoke(this, "stakeUnstake", [true, bg, bm], nil)
493+ else 0
494+ if ((bC == bC))
495+ then {
496+ let bD = if (containsElement(S, bq))
497+ then invoke(this, "stakeUnstake", [true, bj, bq], nil)
498+ else 0
499+ if ((bD == bD))
500+ then [IntegerEntry(f, (ak + bg)), IntegerEntry(g, (al + bj)), IntegerEntry(k, (an + bQ)), Reissue(am, bQ, true), ScriptTransfer(ay.caller, bQ, am)]
501+ else throw("Strict value is not equal to itself.")
502+ }
503+ else throw("Strict value is not equal to itself.")
504+ }
463505 }
464506 }
465507
466508
467509
468510 @Callable(ay)
469511 func withdraw () = {
470- let bN = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
471- let bO = bN._1
472- let bP = bN._2
473- let bQ = aP(fraction(bO, ai, al), ac, ad)
474- let bR = aP(fraction(bO, aj, al), ad, ac)
475- if (!(Z))
512+ let bR = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
513+ let bS = bR._1
514+ let bT = bR._2
515+ let bU = fraction(bS, ak, an)
516+ let bV = fraction(bS, al, an)
517+ if (!(ab))
476518 then throw("DApp is inactive at this moment")
477519 else if ((size(ay.payments) != 1))
478520 then throw("One attached payment expected")
479- else if ((bP != ak))
480- then throw(("Incorrect asset attached. Expected: " + toBase58String(ak)))
521+ else if ((bT != am))
522+ then throw(("Incorrect asset attached. Expected: " + toBase58String(am)))
481523 else if (!(aH))
482- then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb())
483- else if (if ((bQ > aD))
524+ then ([ScriptTransfer(ay.caller, bS, bT)] ++ bd())
525+ else if (if ((bU > aD))
484526 then true
485- else (bR > aE))
486- then aY(bQ, bR)
487- else [IntegerEntry(f, (ai - bQ)), IntegerEntry(g, (aj - bR)), IntegerEntry(k, (al - bO)), Burn(ak, bO), ScriptTransfer(ay.caller, bQ, ac), ScriptTransfer(ay.caller, bR, ad)]
527+ else (bV > aE))
528+ then ba(bU, bV)
529+ else {
530+ let bC = if (containsElement(S, ac))
531+ then invoke(this, "stakeUnstake", [false, bU, ac], nil)
532+ else 0
533+ if ((bC == bC))
534+ then {
535+ let bD = if (containsElement(S, ad))
536+ then invoke(this, "stakeUnstake", [false, bV, ad], nil)
537+ else 0
538+ if ((bD == bD))
539+ then [IntegerEntry(f, (ak - bU)), IntegerEntry(g, (al - bV)), IntegerEntry(k, (an - bS)), Burn(am, bS), ScriptTransfer(ay.caller, bU, ae), ScriptTransfer(ay.caller, bV, af)]
540+ else throw("Strict value is not equal to itself.")
541+ }
542+ else throw("Strict value is not equal to itself.")
543+ }
488544 }
489545
490546
491547
492548 @Callable(ay)
493-func exchange (bS) = {
494- let bT = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
495- let bO = bT._1
496- let bP = bT._2
497- func bU (bV,bW) = {
498- let bX = fraction(bW, bO, (bO + bV))
499- let bY = fraction(bX, (ao - am), ao)
500- let bZ = fraction(bX, an, ao)
501- if ((bS > bY))
502- then throw(((("Calculated amount to receive " + toString(bY)) + " is less than specified minimum ") + toString(bS)))
503- else $Tuple3(bX, bY, bZ)
549+func exchange (bW) = {
550+ let bX = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId)
551+ let bS = bX._1
552+ let bT = bX._2
553+ func bY (bZ,ca) = {
554+ let cb = fraction(ca, bS, (bS + bZ))
555+ let cc = fraction(cb, (ap - ao), ap)
556+ let cd = fraction(cb, commissionGovernance, ap)
557+ if ((bW > cc))
558+ then throw(((("Calculated amount to receive " + toString(cc)) + " is less than specified minimum ") + toString(bW)))
559+ else $Tuple3(cb, cc, cd)
504560 }
505561
506- if (!(Z))
562+ if (!(ab))
507563 then throw("DApp is inactive at this moment")
508- else if (if ((ai == 0))
564+ else if (if ((ak == 0))
509565 then true
510- else (aj == 0))
566+ else (al == 0))
511567 then throw("Can't exchange with zero balance")
512- else if ((0 >= bS))
513- then throw(("Minimal amount to receive must be positive. Actual: " + toString(bS)))
568+ else if ((0 >= bW))
569+ then throw(("Minimal amount to receive must be positive. Actual: " + toString(bW)))
514570 else if ((size(ay.payments) != 1))
515571 then throw("One attached payment expected")
516572 else if (!(aH))
517- then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb())
518- else if ((bP == ac))
573+ then ([ScriptTransfer(ay.caller, bS, bT)] ++ bd())
574+ else if ((bT == ae))
519575 then {
520- let ca = ad
521- let cb = bU(ai, aj)
522- let bX = cb._1
523- let bY = cb._2
524- let bZ = cb._3
525- let cc = (ai + bO)
526- let cd = ((aj - bY) - bZ)
527- if (if ((az >= cc))
528- then true
529- else (aA >= cd))
530- then aV(bY, aE, ah)
531- else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)]
576+ let ce = af
577+ let cf = bY(ak, al)
578+ let cb = cf._1
579+ let cc = cf._2
580+ let cd = cf._3
581+ let cg = (ak + bS)
582+ let ch = ((al - cc) - cd)
583+ let bC = if (containsElement(S, ac))
584+ then invoke(this, "stakeUnstake", [true, bS, ac], nil)
585+ else 0
586+ if ((bC == bC))
587+ then {
588+ let bD = if (containsElement(S, ad))
589+ then invoke(this, "stakeUnstake", [false, (cc + cd), ad], nil)
590+ else 0
591+ if ((bD == bD))
592+ then [IntegerEntry(f, cg), IntegerEntry(g, ch), ScriptTransfer(ay.caller, cc, ce), ScriptTransfer(N, cd, ce)]
593+ else throw("Strict value is not equal to itself.")
594+ }
595+ else throw("Strict value is not equal to itself.")
532596 }
533- else if ((bP == ad))
597+ else if ((bT == af))
534598 then {
535- let ca = ac
536- let ce = bU(aj, ai)
537- let bX = ce._1
538- let bY = ce._2
539- let bZ = ce._3
540- let cc = ((ai - bY) - bZ)
541- let cd = (aj + bO)
542- if (if ((az >= cc))
599+ let ce = ae
600+ let ci = bY(al, ak)
601+ let cb = ci._1
602+ let cc = ci._2
603+ let cd = ci._3
604+ let cg = ((ak - cc) - cd)
605+ let ch = (al + bS)
606+ if (if ((az >= cg))
543607 then true
544- else (aA >= cd))
545- then aV(bY, aD, ae)
546- else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)]
608+ else (aA >= ch))
609+ then aX(cc, aD, ag)
610+ else {
611+ let bC = if (containsElement(S, ac))
612+ then invoke(this, "stakeUnstake", [false, (cc + cd), ac], nil)
613+ else 0
614+ if ((bC == bC))
615+ then {
616+ let bD = if (containsElement(S, ad))
617+ then invoke(this, "stakeUnstake", [true, bS, ad], nil)
618+ else 0
619+ if ((bD == bD))
620+ then [IntegerEntry(f, cg), IntegerEntry(g, ch), ScriptTransfer(ay.caller, cc, ce), ScriptTransfer(N, cd, ce)]
621+ else throw("Strict value is not equal to itself.")
622+ }
623+ else throw("Strict value is not equal to itself.")
624+ }
547625 }
548- else throw(((("Incorrect asset attached. Expected: " + aa) + " or ") + ab))
626+ else throw(((("Incorrect asset attached. Expected: " + ac) + " or ") + ad))
549627 }
550628
551629
552630
553631 @Callable(ay)
554-func shutdown () = if (!(Z))
632+func shutdown () = if (!(ab))
555633 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, n), "the cause wasn't specified")))
556- else if (!(containsElement([E, F, G, H], ay.callerPublicKey)))
634+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
557635 then throw("Only admin can call this function")
558636 else aN("Paused by admin")
559637
560638
561639
562640 @Callable(ay)
563-func activate () = if (Z)
641+func activate () = if (ab)
564642 then throw("DApp is already active")
565- else if (!(containsElement([E, F, G, H], ay.callerPublicKey)))
643+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
566644 then throw("Only admin can call this function")
567645 else [BooleanEntry(c, true), DeleteEntry(n)]
568646
569647
570648
571649 @Callable(ay)
572-func takeIntoAccountExtraFunds (cf) = {
573- let cg = (aF - ai)
574- let ch = (aG - aj)
575- let ci = (cg - (if ((ac == unit))
576- then cf
650+func takeIntoAccountExtraFunds (cj) = {
651+ let ck = (aF - ak)
652+ let cl = (aG - al)
653+ let cm = (ck - (if ((ae == unit))
654+ then cj
577655 else 0))
578- let cj = (ch - (if ((ad == unit))
579- then cf
656+ let cn = (cl - (if ((af == unit))
657+ then cj
580658 else 0))
581- if (!(Z))
659+ if (!(ab))
582660 then throw("DApp is inactive at this moment")
583661 else if ((ay.caller != this))
584662 then throw("Only the DApp itself can call this function")
585- else if ((0 > cf))
586- then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cf)))
587- else if (if ((0 > cg))
663+ else if ((0 > cj))
664+ then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cj)))
665+ else if (if ((0 > ck))
588666 then true
589- else (0 > ch))
667+ else (0 > cl))
590668 then aN("Enroll amount negative")
591- else if (if ((0 > ci))
669+ else if (if ((0 > cm))
592670 then true
593- else (0 > cj))
671+ else (0 > cn))
594672 then throw("Too large amountLeave")
595- else [IntegerEntry(f, (ai + ci)), IntegerEntry(g, (aj + cj)), IntegerEntry(("last_income_" + aa), ci), IntegerEntry(("last_income_" + ab), cj)]
673+ else {
674+ let bC = if (if (containsElement(S, ac))
675+ then (cm > 0)
676+ else false)
677+ then invoke(this, "stakeUnstake", [true, cm, ac], nil)
678+ else 0
679+ if ((bC == bC))
680+ then {
681+ let bD = if (if (containsElement(S, ad))
682+ then (cn > 0)
683+ else false)
684+ then invoke(this, "stakeUnstake", [true, cn, ad], nil)
685+ else 0
686+ if ((bD == bD))
687+ then [IntegerEntry(f, (ak + cm)), IntegerEntry(g, (al + cn)), IntegerEntry(("last_income_" + ac), cm), IntegerEntry(("last_income_" + ad), cn)]
688+ else throw("Strict value is not equal to itself.")
689+ }
690+ else throw("Strict value is not equal to itself.")
691+ }
596692 }
597693
598694
599-@Verifier(ck)
600-func cl () = {
601- let cm = {
602- let cn = if (sigVerify(ck.bodyBytes, ck.proofs[0], E))
695+
696+@Callable(ay)
697+func stakeUnstake (aQ,aS,co) = if ((ay.caller != this))
698+ then throw("Only contract itself can invoke this function")
699+ else if ((co == "WAVES"))
700+ then {
701+ let cp = addressFromStringValue(valueOrErrorMessage(getString(C, w), "No leasing pool in oracle"))
702+ let cq = getBinary(this, y)
703+ let cr = valueOrElse(getInteger(this, x), 0)
704+ let cs = if (aQ)
705+ then (cr + aS)
706+ else (cr - aS)
707+ let ct = Lease(cp, cs)
708+ let cu = calculateLeaseId(ct)
709+ let cv = [ct, BinaryEntry(y, cu), IntegerEntry(x, cs)]
710+ let F = cq
711+ if ($isInstanceOf(F, "ByteVector"))
712+ then {
713+ let cw = F
714+ ([LeaseCancel(cw)] ++ cv)
715+ }
716+ else cv
717+ }
718+ else {
719+ let cx = aR(aQ, aS, fromBase58String(co))
720+ let aU = cx._1
721+ let cy = cx._2
722+ let cz = cx._3
723+ let cA = cx._4
724+ let cB = invoke(cy, aU, cz, cA)
725+ nil
726+ }
727+
728+
729+
730+@Callable(ay)
731+func stakeAll () = if (!(ab))
732+ then throw("DApp is inactive at this moment")
733+ else if (!(containsElement([I, J, K, L], ay.callerPublicKey)))
734+ then throw("Only admin can call this function")
735+ else {
736+ let bC = if (containsElement(S, ac))
737+ then {
738+ let bb = (ak - az)
739+ if ((bb > 0))
740+ then invoke(this, "stakeUnstake", [true, bb, ac], nil)
741+ else 0
742+ }
743+ else 0
744+ if ((bC == bC))
745+ then {
746+ let bD = if (containsElement(S, ad))
747+ then {
748+ let bc = (al - aA)
749+ if ((bc > 0))
750+ then invoke(this, "stakeUnstake", [true, bc, ad], nil)
751+ else 0
752+ }
753+ else 0
754+ if ((bD == bD))
755+ then nil
756+ else throw("Strict value is not equal to itself.")
757+ }
758+ else throw("Strict value is not equal to itself.")
759+ }
760+
761+
762+@Verifier(cC)
763+func cD () = {
764+ let cE = {
765+ let cF = if (sigVerify(cC.bodyBytes, cC.proofs[0], I))
603766 then 1
604767 else 0
605- let co = if (sigVerify(ck.bodyBytes, ck.proofs[1], F))
768+ let cG = if (sigVerify(cC.bodyBytes, cC.proofs[1], J))
606769 then 1
607770 else 0
608- let cp = if (sigVerify(ck.bodyBytes, ck.proofs[2], G))
771+ let cH = if (sigVerify(cC.bodyBytes, cC.proofs[2], K))
609772 then 1
610773 else 0
611- (((cn + co) + cp) >= 2)
774+ (((cF + cG) + cH) >= 2)
612775 }
613- let B = ck
614- if ($isInstanceOf(B, "InvokeScriptTransaction"))
776+ let F = cC
777+ if ($isInstanceOf(F, "InvokeScriptTransaction"))
615778 then {
616- let cq = B
617- let cr = if ((cq.dApp == this))
618- then (cq.function == "takeIntoAccountExtraFunds")
779+ let cB = F
780+ let cI = if ((cB.dApp == this))
781+ then (cB.function == "takeIntoAccountExtraFunds")
619782 else false
620- let cs = if (if ((cq.dApp == P))
621- then if (if (if (containsElement(["lockNeutrino", "lockNsbt"], cq.function))
622- then (size(cq.payments) == 1)
623- else false)
624- then if ((cq.payments[0].assetId == L))
625- then true
626- else (cq.payments[0].assetId == M)
627- else false)
628- then true
629- else if (containsElement(["unlockNeutrino", "unlockNsbt"], cq.function))
630- then (size(cq.payments) == 0)
631- else false
783+ let cJ = if (if (if ((cB.dApp == V))
784+ then (cB.function == "exchange")
785+ else false)
786+ then (ae == P)
632787 else false)
633788 then true
634- else if ((cq.dApp == Q))
635- then if (if (if ((cq.function == "startStaking"))
636- then (size(cq.payments) == 1)
637- else false)
638- then (cq.payments[0].assetId == O)
639- else false)
640- then true
641- else if ((cq.function == "stopStaking"))
642- then (size(cq.payments) == 0)
643- else false
789+ else if (if ((af == P))
790+ then (size(cB.payments) == 1)
791+ else false)
792+ then (cB.payments[0].assetId == P)
644793 else false
645- let ct = if (if (if ((cq.dApp == R))
646- then (cq.function == "exchange")
794+ let cK = if (if (if ((cB.dApp == W))
795+ then (cB.function == "exchange")
647796 else false)
648- then (ac == L)
797+ then (ae == Q)
649798 else false)
650799 then true
651- else if (if ((ad == L))
652- then (size(cq.payments) == 1)
800+ else if (if ((af == Q))
801+ then (size(cB.payments) == 1)
653802 else false)
654- then (cq.payments[0].assetId == L)
803+ then (cB.payments[0].assetId == P)
655804 else false
656- let cu = if (if (if ((cq.dApp == S))
657- then (cq.function == "exchange")
658- else false)
659- then (ac == M)
805+ let cL = if (if (if (sigVerify(cC.bodyBytes, cC.proofs[0], I))
806+ then true
807+ else sigVerify(cC.bodyBytes, cC.proofs[0], J))
808+ then true
809+ else sigVerify(cC.bodyBytes, cC.proofs[0], K))
810+ then true
811+ else sigVerify(cC.bodyBytes, cC.proofs[0], M)
812+ if (if (if (if (cI)
813+ then true
814+ else cJ)
815+ then true
816+ else cK)
817+ then cL
660818 else false)
661819 then true
662- else if (if ((ad == M))
663- then (size(cq.payments) == 1)
664- else false)
665- then (cq.payments[0].assetId == L)
666- else false
667- let cv = if (if (if (sigVerify(ck.bodyBytes, ck.proofs[0], E))
668- then true
669- else sigVerify(ck.bodyBytes, ck.proofs[0], F))
670- then true
671- else sigVerify(ck.bodyBytes, ck.proofs[0], G))
672- then true
673- else sigVerify(ck.bodyBytes, ck.proofs[0], I)
674- if (if (if (if (if (cr)
675- then true
676- else cs)
677- then true
678- else ct)
679- then true
680- else cu)
681- then cv
682- else false)
683- then true
684- else cm
820+ else cE
685821 }
686- else cm
822+ else cE
687823 }
688824

github/deemru/w8io/169f3d6 
195.11 ms