tx · 3uAE5iqhn5nnvF1rkNd8AMPkbJCxeJFxEZgkmce3x3uy 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT: -0.03500000 Waves 2023.01.20 11:51 [2413067] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves
{ "type": 13, "id": "3uAE5iqhn5nnvF1rkNd8AMPkbJCxeJFxEZgkmce3x3uy", "fee": 3500000, "feeAssetId": null, "timestamp": 1674204705253, "version": 2, "chainId": 84, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "XDHPmdGCR9ngcBYcbGrbeQMvwt9CiSY86S4c12bUKm5VqKk92EZbJ8t2gCxP3YLwV2U2zSJDZeCmJUXeYZv1JmT" ], "script": "base64:BgLkLAgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIGc2NhbGU4IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIhlpZHhGYWN0b3J5U3Rha2luZ0NvbnRyYWN0IhppZHhGYWN0b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EVW5pdAgFAmd6D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJkTAUCZ3oDCQABAgUCZEwCBU9yZGVyBAJkaQUCZEwEAmdDCQECYUYABAJnRAkBAmRoAQUCZGkEAmFvCAUCZ0QCXzEEAmFwCAUCZ0QCXzIEAmFxCQD0AwMIBQJkaQlib2R5Qnl0ZXMJAJEDAggFAmRpBnByb29mcwAACAUCZGkPc2VuZGVyUHVibGljS2V5BAJhcgkA9AMDCAUCZGkJYm9keUJ5dGVzCQCRAwIIBQJkaQZwcm9vZnMAAQUCZ0MDAwMFAmFvBQJhcQcFAmFyBwYJAQJhbgQFAmFvBQJhcAUCYXEFAmFyAwkAAQIFAmRMAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZVAFAmRMBAJnRQkA9gMBCQEFdmFsdWUBCAUCZVAGc2NyaXB0BAJnRgkA2wQBCQEFdmFsdWUBCQCdCAIFAmF6CQECYWwABAJnRwkA8QcBBQR0aGlzAwMJAAACBQJnRgUCZ0UJAQIhPQIFAmdHBQJnRQcGCQD0AwMIBQJneglib2R5Qnl0ZXMJAJEDAggFAmd6BnByb29mcwAABQJnQgkA9AMDCAUCZ3oJYm9keUJ5dGVzCQCRAwIIBQJnegZwcm9vZnMAAAUCZ0I9yuVy", "height": 2413067, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8J2Fvf5ScyjQoNhZMJoXNsgfNFkatwhKvfTEwqj55c9t Next: sUT2dHrpzqkj67ZkySpwznuN2BVmxyj5YFNqAXEFstr Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = 100000000 | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = toBigInt(1000000000000000000) | |
7 | 7 | ||
8 | - | let c = toBigInt( | |
8 | + | let c = toBigInt(0) | |
9 | 9 | ||
10 | - | let d = toBigInt( | |
10 | + | let d = toBigInt(0) | |
11 | 11 | ||
12 | - | let e = toBigInt( | |
12 | + | let e = toBigInt(1) | |
13 | 13 | ||
14 | - | let f = toBigInt( | |
14 | + | let f = toBigInt(2) | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = "WAVES" | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = "__" | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 2 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 3 | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 4 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 1 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 2 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 3 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 4 | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 5 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 6 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 7 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 8 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 9 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 1 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 7 | |
47 | 47 | ||
48 | - | let w = 9 | |
49 | - | ||
50 | - | let x = 10 | |
51 | - | ||
52 | - | let y = 1 | |
53 | - | ||
54 | - | let z = 2 | |
55 | - | ||
56 | - | let A = 3 | |
57 | - | ||
58 | - | let B = 1 | |
59 | - | ||
60 | - | let C = 7 | |
61 | - | ||
62 | - | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
48 | + | func w (x,y) = fraction(toBigInt(x), b, toBigInt(y)) | |
63 | 49 | ||
64 | 50 | ||
65 | - | func | |
51 | + | func z (x,y) = fraction(x, b, y) | |
66 | 52 | ||
67 | 53 | ||
68 | - | func | |
54 | + | func A (B,C) = toInt(fraction(B, toBigInt(C), b)) | |
69 | 55 | ||
70 | 56 | ||
71 | - | func | |
57 | + | func D (B,C,E) = toInt(fraction(B, toBigInt(C), b, E)) | |
72 | 58 | ||
73 | 59 | ||
74 | - | func M (N,O,P) = fraction(N, O, P) | |
60 | + | func F (B) = if ((c > B)) | |
61 | + | then -(B) | |
62 | + | else B | |
75 | 63 | ||
76 | 64 | ||
77 | - | func Q (I) = if ((0 > I)) | |
78 | - | then -(I) | |
79 | - | else I | |
65 | + | func G () = "%s__factoryContract" | |
80 | 66 | ||
81 | 67 | ||
82 | - | func R (I) = if ((e > I)) | |
83 | - | then -(I) | |
84 | - | else I | |
68 | + | func H () = "%s__managerPublicKey" | |
85 | 69 | ||
86 | 70 | ||
87 | - | func | |
71 | + | func I () = "%s__pendingManagerPublicKey" | |
88 | 72 | ||
89 | 73 | ||
90 | - | func | |
74 | + | func J () = "%s%s__price__last" | |
91 | 75 | ||
92 | 76 | ||
93 | - | func | |
77 | + | func K (L,M) = makeString(["%s%s%d%d__price__history", toString(L), toString(M)], h) | |
94 | 78 | ||
95 | 79 | ||
96 | - | func | |
80 | + | func N (O,P) = ((("%s%s%s__P__" + O) + "__") + P) | |
97 | 81 | ||
98 | 82 | ||
99 | - | func | |
83 | + | func Q (O,P) = ((("%s%s%s__G__" + O) + "__") + P) | |
100 | 84 | ||
101 | 85 | ||
102 | - | func | |
86 | + | func R () = "%s__amountAsset" | |
103 | 87 | ||
104 | 88 | ||
105 | - | func | |
89 | + | func S () = "%s__priceAsset" | |
106 | 90 | ||
107 | 91 | ||
108 | - | func ad () = "%s__amountAsset" | |
92 | + | let T = "%s__fee" | |
93 | + | ||
94 | + | let U = fraction(10, a, 10000) | |
95 | + | ||
96 | + | let V = valueOrElse(getInteger(this, T), U) | |
97 | + | ||
98 | + | let W = makeString(["%s", "kLp"], h) | |
99 | + | ||
100 | + | let X = makeString(["%s", "kLpRefreshedHeight"], h) | |
101 | + | ||
102 | + | let Y = makeString(["%s", "refreshKLpDelay"], h) | |
103 | + | ||
104 | + | let Z = 30 | |
105 | + | ||
106 | + | let aa = valueOrElse(getInteger(this, Y), Z) | |
107 | + | ||
108 | + | func ab () = "%s__factoryConfig" | |
109 | 109 | ||
110 | 110 | ||
111 | - | func | |
111 | + | func ac () = "%s%s__matcher__publicKey" | |
112 | 112 | ||
113 | 113 | ||
114 | - | let af = "%s__fee" | |
115 | - | ||
116 | - | let ag = fraction(10, b, 10000) | |
117 | - | ||
118 | - | let ah = valueOrElse(getInteger(this, af), ag) | |
119 | - | ||
120 | - | let ai = makeString(["%s", "kLp"], j) | |
121 | - | ||
122 | - | let aj = makeString(["%s", "kLpRefreshedHeight"], j) | |
123 | - | ||
124 | - | let ak = makeString(["%s", "refreshKLpDelay"], j) | |
125 | - | ||
126 | - | let al = 30 | |
127 | - | ||
128 | - | let am = valueOrElse(getInteger(this, ak), al) | |
129 | - | ||
130 | - | func an () = "%s__factoryConfig" | |
114 | + | func ad (ae,af) = (((("%d%d%s__" + ae) + "__") + af) + "__config") | |
131 | 115 | ||
132 | 116 | ||
133 | - | func | |
117 | + | func ag (ah) = ("%s%s%s__mappings__baseAsset2internalId__" + ah) | |
134 | 118 | ||
135 | 119 | ||
136 | - | func | |
120 | + | func ai () = "%s__shutdown" | |
137 | 121 | ||
138 | 122 | ||
139 | - | func | |
123 | + | func aj (ak) = ("%s%s__poolWeight__" + ak) | |
140 | 124 | ||
141 | 125 | ||
142 | - | func | |
126 | + | func al () = "%s__allowedLpScriptHash" | |
143 | 127 | ||
144 | 128 | ||
145 | - | func aw () = "%s__shutdown" | |
129 | + | let am = "%s__feeCollectorAddress" | |
130 | + | ||
131 | + | func an (ao,ap,aq,ar) = throw((((((((("order validation failed: orderValid=" + toString(ao)) + " (") + ap) + ")") + " senderValid=") + toString(aq)) + " matcherValid=") + toString(ar))) | |
146 | 132 | ||
147 | 133 | ||
148 | - | func | |
134 | + | func as (at,au) = valueOrErrorMessage(getString(at, au), makeString(["mandatory ", toString(at), ".", au, " is not defined"], "")) | |
149 | 135 | ||
150 | 136 | ||
151 | - | func | |
137 | + | func av (at,au) = valueOrErrorMessage(getInteger(at, au), makeString(["mandatory ", toString(at), ".", au, " is not defined"], "")) | |
152 | 138 | ||
153 | 139 | ||
154 | - | let aA = "%s__feeCollectorAddress" | |
155 | - | ||
156 | - | func aB (aC,aD,aE) = throw(((((("order validation failed: orderValid=" + toString(aC)) + " senderValid=") + toString(aD)) + " matcherValid=") + toString(aE))) | |
140 | + | func aw (ax) = throw(makeString(["lp.ride:", ax], " ")) | |
157 | 141 | ||
158 | 142 | ||
159 | - | func | |
143 | + | func ay (ax) = makeString(["lp.ride:", ax], " ") | |
160 | 144 | ||
161 | 145 | ||
162 | - | func aI (aG,aH) = valueOrErrorMessage(getInteger(aG, aH), makeString(["mandatory ", toString(aG), ".", aH, " is not defined"], "")) | |
146 | + | let az = addressFromStringValue(as(this, G())) | |
147 | + | ||
148 | + | let aA = addressFromStringValue(as(az, am)) | |
149 | + | ||
150 | + | let aB = { | |
151 | + | let aC = invoke(az, "getInFeeREADONLY", [toString(this)], nil) | |
152 | + | if ($isInstanceOf(aC, "Int")) | |
153 | + | then aC | |
154 | + | else throw(($getType(aC) + " couldn't be cast to Int")) | |
155 | + | } | |
156 | + | ||
157 | + | let aD = { | |
158 | + | let aC = invoke(az, "getOutFeeREADONLY", [toString(this)], nil) | |
159 | + | if ($isInstanceOf(aC, "Int")) | |
160 | + | then aC | |
161 | + | else throw(($getType(aC) + " couldn't be cast to Int")) | |
162 | + | } | |
163 | + | ||
164 | + | func aE () = valueOrElse(getBoolean(az, ai()), false) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func aF () = fromBase58String(as(az, ac())) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func aL (aK) = makeString(["lp.ride:", aK], " ") | |
169 | - | ||
170 | - | ||
171 | - | let aM = addressFromStringValue(aF(this, S())) | |
172 | - | ||
173 | - | let aN = addressFromStringValue(aF(aM, aA)) | |
174 | - | ||
175 | - | let aO = { | |
176 | - | let aP = invoke(aM, "getInFeeREADONLY", [toString(this)], nil) | |
177 | - | if ($isInstanceOf(aP, "Int")) | |
178 | - | then aP | |
179 | - | else throw(($getType(aP) + " couldn't be cast to Int")) | |
180 | - | } | |
181 | - | ||
182 | - | let aQ = { | |
183 | - | let aP = invoke(aM, "getOutFeeREADONLY", [toString(this)], nil) | |
184 | - | if ($isInstanceOf(aP, "Int")) | |
185 | - | then aP | |
186 | - | else throw(($getType(aP) + " couldn't be cast to Int")) | |
187 | - | } | |
188 | - | ||
189 | - | func aR () = valueOrElse(getBoolean(aM, aw()), false) | |
190 | - | ||
191 | - | ||
192 | - | func aS () = fromBase58String(aF(aM, ao())) | |
193 | - | ||
194 | - | ||
195 | - | func aT () = { | |
196 | - | let aU = aF(this, ad()) | |
197 | - | let aV = aF(this, ae()) | |
198 | - | let at = aI(aM, au(aV)) | |
199 | - | let as = aI(aM, au(aU)) | |
200 | - | split(aF(aM, ar(toString(as), toString(at))), j) | |
170 | + | func aG () = { | |
171 | + | let aH = as(this, R()) | |
172 | + | let aI = as(this, S()) | |
173 | + | let af = av(az, ag(aI)) | |
174 | + | let ae = av(az, ag(aH)) | |
175 | + | split(as(az, ad(toString(ae), toString(af))), h) | |
201 | 176 | } | |
202 | 177 | ||
203 | 178 | ||
204 | - | func | |
179 | + | func aJ (aK) = if ((aK == g)) | |
205 | 180 | then unit | |
206 | - | else fromBase58String( | |
181 | + | else fromBase58String(aK) | |
207 | 182 | ||
208 | 183 | ||
209 | - | func | |
210 | - | then | |
211 | - | else toBase58String(value( | |
184 | + | func aL (aK) = if ((aK == unit)) | |
185 | + | then g | |
186 | + | else toBase58String(value(aK)) | |
212 | 187 | ||
213 | 188 | ||
214 | - | func | |
189 | + | func aM (aN) = $Tuple7(addressFromStringValue(aN[l]), parseIntValue(aN[m]), fromBase58String(aN[n]), aJ(aN[o]), aJ(aN[p]), parseIntValue(aN[q]), parseIntValue(aN[r])) | |
215 | 190 | ||
216 | 191 | ||
217 | - | let | |
192 | + | let aO = aM(aG()) | |
218 | 193 | ||
219 | - | let | |
194 | + | let aP = aO | |
220 | 195 | ||
221 | - | let | |
196 | + | let aQ = aP._2 | |
222 | 197 | ||
223 | - | let | |
198 | + | let aR = aP._3 | |
224 | 199 | ||
225 | - | let | |
200 | + | let aS = aP._4 | |
226 | 201 | ||
227 | - | let | |
202 | + | let aT = aP._5 | |
228 | 203 | ||
229 | - | let | |
204 | + | let aU = aP._6 | |
230 | 205 | ||
231 | - | let | |
206 | + | let aV = aP._7 | |
232 | 207 | ||
233 | - | let bj = bc._7 | |
234 | - | ||
235 | - | func bk () = split(aF(aM, an()), j) | |
208 | + | func aW () = split(as(az, ab()), h) | |
236 | 209 | ||
237 | 210 | ||
238 | - | let | |
211 | + | let aX = valueOrErrorMessage(addressFromString(aW()[u]), "incorrect staking address") | |
239 | 212 | ||
240 | - | let | |
213 | + | let aY = valueOrErrorMessage(addressFromString(aW()[v]), "incorrect staking address") | |
241 | 214 | ||
242 | - | func | |
215 | + | func aZ (ba,bb,bc,bd,be,bf,bg,bh,bi,bj) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(ba), toString(bb), toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj)], h) | |
243 | 216 | ||
244 | 217 | ||
245 | - | func | |
218 | + | func bk (bl,bm,bn,bd,bg,bh) = makeString(["%d%d%d%d%d%d", toString(bl), toString(bm), toString(bn), toString(bd), toString(bg), toString(bh)], h) | |
246 | 219 | ||
247 | 220 | ||
248 | - | func | |
221 | + | func bo (bp) = if ((bp == "WAVES")) | |
249 | 222 | then wavesBalance(this).available | |
250 | - | else assetBalance(this, fromBase58String( | |
223 | + | else assetBalance(this, fromBase58String(bp)) | |
251 | 224 | ||
252 | 225 | ||
253 | - | func | |
226 | + | func bq (br,bs) = fraction(br, b, bs) | |
254 | 227 | ||
255 | 228 | ||
256 | - | func | |
229 | + | func bt (br,bs,E) = fraction(br, b, bs, E) | |
257 | 230 | ||
258 | 231 | ||
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | | |
232 | + | func bu (bv,bw,bx,by) = { | |
233 | + | let bz = w(bx, bv) | |
234 | + | let bA = w(by, bw) | |
235 | + | bq(bA, bz) | |
263 | 236 | } | |
264 | 237 | ||
265 | 238 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | [ | |
239 | + | func bB (bx,by,bC) = { | |
240 | + | let bD = aG() | |
241 | + | let bE = parseIntValue(bD[q]) | |
242 | + | let bF = parseIntValue(bD[r]) | |
243 | + | let bG = bu(bE, bF, bx, by) | |
244 | + | let bs = w(bx, bE) | |
245 | + | let br = w(by, bF) | |
246 | + | let bH = w(bC, a) | |
247 | + | let bI = bq(bs, bH) | |
248 | + | let bJ = bq(br, bH) | |
249 | + | [bG, bI, bJ] | |
277 | 250 | } | |
278 | 251 | ||
279 | 252 | ||
280 | - | func bY (bL,bM,bQ) = { | |
281 | - | let bZ = bP(bL, bM, bQ) | |
282 | - | [H(bZ[0], b), H(bZ[1], b), H(bZ[2], b)] | |
283 | - | } | |
284 | - | ||
285 | - | ||
286 | - | func ca (cb,cc,cd,aa) = { | |
287 | - | let bR = aT() | |
288 | - | let ce = bR[q] | |
289 | - | let cf = bR[r] | |
290 | - | let cg = bR[s] | |
291 | - | let bJ = parseIntValue(bR[t]) | |
292 | - | let bK = parseIntValue(bR[u]) | |
293 | - | let ch = bR[p] | |
294 | - | let ci = valueOrErrorMessage(assetInfo(fromBase58String(ce)), (("Asset " + ce) + " doesn't exist")).quantity | |
295 | - | if ((ce != cc)) | |
253 | + | func bK (bL,bM,bN,O) = { | |
254 | + | let bD = aG() | |
255 | + | let bO = bD[n] | |
256 | + | let bP = bD[o] | |
257 | + | let bQ = bD[p] | |
258 | + | let bv = parseIntValue(bD[q]) | |
259 | + | let bw = parseIntValue(bD[r]) | |
260 | + | let bR = bD[m] | |
261 | + | let bS = valueOrErrorMessage(assetInfo(fromBase58String(bO)), (("Asset " + bO) + " doesn't exist")).quantity | |
262 | + | if ((bO != bM)) | |
296 | 263 | then throw("Invalid asset passed.") | |
297 | 264 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
265 | + | let bT = bo(bP) | |
266 | + | let bU = w(bT, bv) | |
267 | + | let bV = bo(bQ) | |
268 | + | let bW = w(bV, bw) | |
269 | + | let bX = bq(bW, bU) | |
270 | + | let bY = A(bX, a) | |
271 | + | let bZ = w(bN, a) | |
272 | + | let ca = w(bS, a) | |
273 | + | let cb = fraction(bU, bZ, ca) | |
274 | + | let cc = fraction(bW, bZ, ca) | |
275 | + | let cd = D(cb, bv, FLOOR) | |
276 | + | let ce = D(cc, bw, FLOOR) | |
277 | + | let cf = if ((bL == "")) | |
311 | 278 | then nil | |
312 | - | else [ScriptTransfer( | |
279 | + | else [ScriptTransfer(O, cd, if ((bP == "WAVES")) | |
313 | 280 | then unit | |
314 | - | else fromBase58String( | |
281 | + | else fromBase58String(bP)), ScriptTransfer(O, ce, if ((bQ == "WAVES")) | |
315 | 282 | then unit | |
316 | - | else fromBase58String( | |
317 | - | $Tuple10( | |
283 | + | else fromBase58String(bQ)), StringEntry(Q(toString(O), bL), bk(cd, ce, bN, bY, height, lastBlock.timestamp)), IntegerEntry(J(), bY), IntegerEntry(K(height, lastBlock.timestamp), bY)] | |
284 | + | $Tuple10(cd, ce, bP, bQ, bT, bV, bS, bX, bR, cf) | |
318 | 285 | } | |
319 | 286 | } | |
320 | 287 | ||
321 | 288 | ||
322 | - | func | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | if (if (( | |
289 | + | func cg (bL,ch,ci,cj,ck,cl,O,cm,cn) = { | |
290 | + | let bD = aG() | |
291 | + | let bO = fromBase58String(bD[n]) | |
292 | + | let co = bD[o] | |
293 | + | let cp = bD[p] | |
294 | + | let cq = bD[s] | |
295 | + | let cr = bD[t] | |
296 | + | let bE = parseIntValue(bD[q]) | |
297 | + | let bF = parseIntValue(bD[r]) | |
298 | + | let bR = bD[m] | |
299 | + | let bS = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
300 | + | let cs = toBase58String(valueOrElse(cj, fromBase58String("WAVES"))) | |
301 | + | let ct = toBase58String(valueOrElse(cl, fromBase58String("WAVES"))) | |
302 | + | if (if ((co != cs)) | |
336 | 303 | then true | |
337 | - | else ( | |
304 | + | else (cp != ct)) | |
338 | 305 | then throw("Invalid amt or price asset passed.") | |
339 | 306 | else { | |
340 | - | let | |
341 | - | then | |
342 | - | else ( | |
343 | - | let | |
344 | - | then | |
345 | - | else ( | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
307 | + | let bT = if (cm) | |
308 | + | then bo(co) | |
309 | + | else (bo(co) - ci) | |
310 | + | let bV = if (cm) | |
311 | + | then bo(cp) | |
312 | + | else (bo(cp) - ck) | |
313 | + | let cu = w(ci, bE) | |
314 | + | let cv = w(ck, bF) | |
315 | + | let cw = bq(cv, cu) | |
316 | + | let bU = w(bT, bE) | |
317 | + | let bW = w(bV, bF) | |
318 | + | let cx = if ((bS == 0)) | |
352 | 319 | then { | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | $Tuple5( | |
320 | + | let bX = c | |
321 | + | let cy = c | |
322 | + | let bH = pow((cu * cv), 0, toBigInt(5), 1, 0, DOWN) | |
323 | + | $Tuple5(A(bH, a), A(cu, bE), A(cv, bF), bq((bW + cv), (bU + cu)), cy) | |
357 | 324 | } | |
358 | 325 | else { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | if (if (( | |
363 | - | then ( | |
326 | + | let bX = bq(bW, bU) | |
327 | + | let cy = fraction(F((bX - cw)), b, bX) | |
328 | + | let cz = w(ch, a) | |
329 | + | if (if ((bX != c)) | |
330 | + | then (cy > cz) | |
364 | 331 | else false) | |
365 | - | then throw(((("Price slippage " + toString( | |
332 | + | then throw(((("Price slippage " + toString(cy)) + " exceeded the passed limit of ") + toString(cz))) | |
366 | 333 | else { | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | then $Tuple2( | |
372 | - | else $Tuple2( | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | $Tuple5( | |
334 | + | let ca = w(bS, a) | |
335 | + | let cA = fraction(cu, bt(bW, bU, CEILING), b, CEILING) | |
336 | + | let cB = fraction(cv, b, bt(bW, bU, FLOOR), CEILING) | |
337 | + | let cC = if ((cA > cv)) | |
338 | + | then $Tuple2(cB, cv) | |
339 | + | else $Tuple2(cu, cA) | |
340 | + | let cD = cC._1 | |
341 | + | let cE = cC._2 | |
342 | + | let bH = fraction(ca, cE, bW, FLOOR) | |
343 | + | $Tuple5(D(bH, a, FLOOR), D(cD, bE, CEILING), D(cE, bF, CEILING), bX, cy) | |
377 | 344 | } | |
378 | 345 | } | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | if ((0 >= | |
346 | + | let cF = cx._1 | |
347 | + | let cG = cx._2 | |
348 | + | let cH = cx._3 | |
349 | + | let bY = A(cx._4, a) | |
350 | + | let cI = A(cx._5, a) | |
351 | + | if ((0 >= cF)) | |
385 | 352 | then throw("Invalid calculations. LP calculated is less than zero.") | |
386 | 353 | else { | |
387 | - | let | |
354 | + | let cJ = if (!(cn)) | |
388 | 355 | then 0 | |
389 | - | else | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | $Tuple13( | |
356 | + | else cF | |
357 | + | let cK = (ci - cG) | |
358 | + | let cL = (ck - cH) | |
359 | + | let cM = [IntegerEntry(J(), bY), IntegerEntry(K(height, lastBlock.timestamp), bY), StringEntry(N(O, bL), aZ(cG, cH, cJ, bY, ch, cI, height, lastBlock.timestamp, cK, cL))] | |
360 | + | $Tuple13(cF, cJ, bY, bT, bV, bS, bO, bR, cM, cK, cL, cj, cl) | |
394 | 361 | } | |
395 | 362 | } | |
396 | 363 | } | |
397 | 364 | ||
398 | 365 | ||
399 | - | func | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | if (( | |
404 | - | then | |
405 | - | else | |
366 | + | func cN (cO,cP,bS) = { | |
367 | + | let cQ = z(cO, toBigInt(aU)) | |
368 | + | let cR = z(cP, toBigInt(aV)) | |
369 | + | let cS = fraction(pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN), e, bS) | |
370 | + | if ((bS == d)) | |
371 | + | then d | |
372 | + | else cS | |
406 | 373 | } | |
407 | 374 | ||
408 | 375 | ||
409 | - | func | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | | |
376 | + | func cT (cU,cV,cW) = { | |
377 | + | let cX = (toBigInt(bo(aL(aS))) - cU) | |
378 | + | let cY = (toBigInt(bo(aL(aT))) - cV) | |
379 | + | let cZ = (toBigInt(value(assetInfo(aR)).quantity) - cW) | |
380 | + | let da = cN(cX, cY, cZ) | |
381 | + | da | |
415 | 382 | } | |
416 | 383 | ||
417 | 384 | ||
418 | - | func | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
424 | - | $Tuple2( | |
385 | + | func db (dc,dd,cW) = { | |
386 | + | let cX = (bo(aL(aS)) + dc) | |
387 | + | let cY = (bo(aL(aT)) + dd) | |
388 | + | let cZ = (value(assetInfo(aR)).quantity + cW) | |
389 | + | let cS = cN(toBigInt(cX), toBigInt(cY), toBigInt(cZ)) | |
390 | + | let de = [IntegerEntry(X, height), StringEntry(W, toString(cS))] | |
391 | + | $Tuple2(de, cS) | |
425 | 392 | } | |
426 | 393 | ||
427 | 394 | ||
428 | - | func | |
395 | + | func df (dg,cS) = if ((cS >= dg)) | |
429 | 396 | then true | |
430 | - | else | |
397 | + | else aw(makeString(["updated KLp lower than current KLp", toString(dg), toString(cS)], " ")) | |
431 | 398 | ||
432 | 399 | ||
433 | - | func | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | then $Tuple2( | |
438 | - | else $Tuple2(-( | |
439 | - | let | |
440 | - | let | |
441 | - | if (if (if ( | |
400 | + | func dh (di) = { | |
401 | + | let dj = di.amount | |
402 | + | let dk = fraction(di.amount, di.price, a, FLOOR) | |
403 | + | let dl = if ((di.orderType == Buy)) | |
404 | + | then $Tuple2(dj, -(dk)) | |
405 | + | else $Tuple2(-(dj), dk) | |
406 | + | let dc = dl._1 | |
407 | + | let dd = dl._2 | |
408 | + | if (if (if (aE()) | |
442 | 409 | then true | |
443 | - | else ( | |
410 | + | else (aQ == j)) | |
444 | 411 | then true | |
445 | - | else ( | |
412 | + | else (aQ == k)) | |
446 | 413 | then throw("Exchange operations disabled") | |
447 | - | else if (if (( | |
414 | + | else if (if ((di.assetPair.amountAsset != aS)) | |
448 | 415 | then true | |
449 | - | else ( | |
416 | + | else (di.assetPair.priceAsset != aT)) | |
450 | 417 | then throw("Wrong order assets.") | |
451 | 418 | else { | |
452 | - | let dC = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ai), aL("kLp is required"))), aL("invalid kLp")) | |
453 | - | let dD = dr(ds, dt, 0) | |
454 | - | let dE = dD._1 | |
455 | - | let dF = dD._2 | |
456 | - | let dG = (dF >= dC) | |
457 | - | dG | |
419 | + | let dm = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, W), ay("kLp is required"))), ay("invalid kLp")) | |
420 | + | let dn = db(dc, dd, 0) | |
421 | + | let do = dn._1 | |
422 | + | let dp = dn._2 | |
423 | + | let dq = db(0, 0, 0) | |
424 | + | let dr = dq._1 | |
425 | + | let ds = dq._2 | |
426 | + | let dt = (dp >= dm) | |
427 | + | let cO = bo(aL(aS)) | |
428 | + | let cP = bo(aL(aT)) | |
429 | + | let cQ = w(cO, aU) | |
430 | + | let du = (cQ + w(dc, aU)) | |
431 | + | let cR = w(cP, aV) | |
432 | + | let dv = (cR + w(dd, aV)) | |
433 | + | let dw = pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN) | |
434 | + | let dx = pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN) | |
435 | + | let dy = makeString([toString(dm), toString(dp), toString(dw), toString(dx)], " ") | |
436 | + | $Tuple2(dt, dy) | |
458 | 437 | } | |
459 | 438 | } | |
460 | 439 | ||
461 | 440 | ||
462 | - | func | |
441 | + | func dz (dA) = if ((size(dA.payments) != 1)) | |
463 | 442 | then throw("exactly 1 payment is expected") | |
464 | 443 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | if (if ( | |
444 | + | let dB = value(dA.payments[0]) | |
445 | + | let bM = value(dB.assetId) | |
446 | + | let dC = dB.amount | |
447 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(bM), dC, dA.caller) | |
448 | + | let cd = cx._1 | |
449 | + | let ce = cx._2 | |
450 | + | let bR = parseIntValue(cx._9) | |
451 | + | let cf = cx._10 | |
452 | + | if (if (aE()) | |
474 | 453 | then true | |
475 | - | else ( | |
476 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
477 | - | else $Tuple5( | |
454 | + | else (bR == k)) | |
455 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bR))) | |
456 | + | else $Tuple5(cd, ce, dC, bM, cf) | |
478 | 457 | } | |
479 | 458 | ||
480 | 459 | ||
481 | - | func | |
460 | + | func dD (dA,ch,cn) = if ((size(dA.payments) != 2)) | |
482 | 461 | then throw("exactly 2 payments are expected") | |
483 | 462 | else { | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | if (if (if ( | |
463 | + | let dE = value(dA.payments[0]) | |
464 | + | let dF = value(dA.payments[1]) | |
465 | + | let dG = cg(toBase58String(dA.transactionId), ch, dE.amount, dE.assetId, dF.amount, dF.assetId, toString(dA.caller), false, cn) | |
466 | + | let bR = parseIntValue(dG._8) | |
467 | + | if (if (if (aE()) | |
489 | 468 | then true | |
490 | - | else ( | |
469 | + | else (bR == i)) | |
491 | 470 | then true | |
492 | - | else ( | |
493 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
494 | - | else | |
471 | + | else (bR == k)) | |
472 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bR))) | |
473 | + | else dG | |
495 | 474 | } | |
496 | 475 | ||
497 | 476 | ||
498 | - | func | |
499 | - | let | |
500 | - | if (( | |
477 | + | func dH (dI) = { | |
478 | + | let dJ = invoke(az, "emit", [dI], nil) | |
479 | + | if ((dJ == dJ)) | |
501 | 480 | then { | |
502 | - | let | |
503 | - | let | |
504 | - | if ($isInstanceOf( | |
481 | + | let dK = { | |
482 | + | let dL = dJ | |
483 | + | if ($isInstanceOf(dL, "Address")) | |
505 | 484 | then { | |
506 | - | let | |
507 | - | invoke( | |
485 | + | let dM = dL | |
486 | + | invoke(dM, "emit", [dI], nil) | |
508 | 487 | } | |
509 | 488 | else unit | |
510 | 489 | } | |
511 | - | if (( | |
512 | - | then | |
490 | + | if ((dK == dK)) | |
491 | + | then dI | |
513 | 492 | else throw("Strict value is not equal to itself.") | |
514 | 493 | } | |
515 | 494 | else throw("Strict value is not equal to itself.") | |
516 | 495 | } | |
517 | 496 | ||
518 | 497 | ||
519 | - | func | |
520 | - | let | |
498 | + | func dN (dI,V) = { | |
499 | + | let dO = if ((V == 0)) | |
521 | 500 | then 0 | |
522 | - | else fraction( | |
523 | - | $Tuple2(( | |
501 | + | else fraction(dI, V, a) | |
502 | + | $Tuple2((dI - dO), dO) | |
524 | 503 | } | |
525 | 504 | ||
526 | 505 | ||
527 | - | func | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
506 | + | func dP (dQ,dR,O,P) = { | |
507 | + | let dS = (P == unit) | |
508 | + | let dT = bo(aL(aS)) | |
509 | + | let dU = bo(aL(aT)) | |
510 | + | let dV = if ((dR == aS)) | |
532 | 511 | then true | |
533 | - | else if (( | |
512 | + | else if ((dR == aT)) | |
534 | 513 | then false | |
535 | - | else | |
536 | - | let | |
537 | - | then $Tuple2( | |
538 | - | else if ( | |
539 | - | then $Tuple2(( | |
540 | - | else $Tuple2( | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | then $Tuple2( | |
545 | - | else $Tuple2(0, | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | then | |
559 | - | else | |
560 | - | let | |
561 | - | let | |
562 | - | let | |
514 | + | else aw("invalid asset") | |
515 | + | let dW = if (dS) | |
516 | + | then $Tuple2(dT, dU) | |
517 | + | else if (dV) | |
518 | + | then $Tuple2((dT - dQ), dU) | |
519 | + | else $Tuple2(dT, (dU - dQ)) | |
520 | + | let dX = dW._1 | |
521 | + | let dY = dW._2 | |
522 | + | let dZ = if (dV) | |
523 | + | then $Tuple2(dQ, 0) | |
524 | + | else $Tuple2(0, dQ) | |
525 | + | let ea = dZ._1 | |
526 | + | let eb = dZ._2 | |
527 | + | let dj = dN(ea, aB)._1 | |
528 | + | let dk = dN(eb, aB)._1 | |
529 | + | let ec = dN(dQ, aB) | |
530 | + | let ed = ec._1 | |
531 | + | let dO = ec._2 | |
532 | + | let ee = (dX + dj) | |
533 | + | let ef = (dY + dk) | |
534 | + | let eg = bq(w(ef, aV), w(ee, aU)) | |
535 | + | let eh = A(eg, a) | |
536 | + | let ei = if (dV) | |
537 | + | then dX | |
538 | + | else dY | |
539 | + | let ej = toBigInt(ei) | |
540 | + | let ek = toBigInt(valueOrErrorMessage(assetInfo(aR), (("asset " + toBase58String(aR)) + " doesn't exist")).quantity) | |
541 | + | let el = if ((ek > d)) | |
563 | 542 | then true | |
564 | - | else | |
565 | - | if (( | |
543 | + | else aw("initial deposit requires all coins") | |
544 | + | if ((el == el)) | |
566 | 545 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
546 | + | let em = toBigInt(ed) | |
547 | + | let en = max([0, toInt(((ek * (sqrtBigInt((b + ((em * b) / ej)), 18, 18, DOWN) - b)) / b))]) | |
548 | + | let cM = if (dS) | |
570 | 549 | then nil | |
571 | - | else [IntegerEntry( | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | then $Tuple2( | |
577 | - | else $Tuple2( | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | fraction(( | |
550 | + | else [IntegerEntry(J(), eh), IntegerEntry(K(height, lastBlock.timestamp), eh), StringEntry(N(toString(value(O)), toBase58String(value(P))), aZ(ea, eb, en, eh, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
551 | + | let eo = bq(w(dY, aV), w(dX, aU)) | |
552 | + | let ep = A(eo, a) | |
553 | + | let eq = { | |
554 | + | let er = if (dV) | |
555 | + | then $Tuple2(ea, dX) | |
556 | + | else $Tuple2(eb, dY) | |
557 | + | let dI = er._1 | |
558 | + | let es = er._2 | |
559 | + | let et = toInt(fraction(ek, toBigInt((dI / 2)), toBigInt(es))) | |
560 | + | fraction((en - et), a, et) | |
582 | 561 | } | |
583 | - | $Tuple5( | |
562 | + | $Tuple5(en, cM, dO, eq, dV) | |
584 | 563 | } | |
585 | 564 | else throw("Strict value is not equal to itself.") | |
586 | 565 | } | |
587 | 566 | ||
588 | 567 | ||
589 | - | func | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
568 | + | func eu (ev,ed,dR,O,P) = { | |
569 | + | let dS = (P == unit) | |
570 | + | let bD = aG() | |
571 | + | let bE = parseIntValue(bD[q]) | |
572 | + | let bF = parseIntValue(bD[r]) | |
573 | + | let ew = [if ((dR == aR)) | |
595 | 574 | then true | |
596 | - | else | |
597 | - | if (( | |
575 | + | else aw("invalid lp asset")] | |
576 | + | if ((ew == ew)) | |
598 | 577 | then { | |
599 | - | let | |
578 | + | let ex = if ((ev == aS)) | |
600 | 579 | then true | |
601 | - | else if (( | |
580 | + | else if ((ev == aT)) | |
602 | 581 | then false | |
603 | - | else | |
604 | - | let | |
605 | - | then toBigInt( | |
606 | - | else toBigInt( | |
607 | - | let | |
608 | - | then | |
609 | - | else | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | then | |
614 | - | else | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | let | |
623 | - | then $Tuple4( | |
624 | - | else $Tuple4(0, | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
582 | + | else aw("invalid asset") | |
583 | + | let ey = if (ex) | |
584 | + | then toBigInt(bo(aL(aS))) | |
585 | + | else toBigInt(bo(aL(aT))) | |
586 | + | let ez = if (ex) | |
587 | + | then bE | |
588 | + | else bF | |
589 | + | let eA = bo(aL(aS)) | |
590 | + | let eB = bo(aL(aT)) | |
591 | + | let eC = if (ex) | |
592 | + | then eA | |
593 | + | else eB | |
594 | + | let eD = toBigInt(eC) | |
595 | + | let ek = toBigInt(valueOrErrorMessage(assetInfo(aR), (("asset " + toBase58String(aR)) + " doesn't exist")).quantity) | |
596 | + | let eE = toBigInt(ed) | |
597 | + | let eF = max([0, toInt(((ey * (b - pow((b - ((eE * b) / ek)), 18, f, 0, 18, DOWN))) / b))]) | |
598 | + | let eG = dN(eF, aD) | |
599 | + | let eH = eG._1 | |
600 | + | let dO = eG._2 | |
601 | + | let eI = if (ex) | |
602 | + | then $Tuple4(eH, 0, (eA - eF), eB) | |
603 | + | else $Tuple4(0, eH, eA, (eB - eF)) | |
604 | + | let eJ = eI._1 | |
605 | + | let eK = eI._2 | |
606 | + | let eL = eI._3 | |
607 | + | let eM = eI._4 | |
608 | + | let eg = bq(w(eM, aV), w(eL, aU)) | |
609 | + | let eh = A(eg, a) | |
610 | + | let cM = if (dS) | |
632 | 611 | then nil | |
633 | - | else [StringEntry( | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | fraction(( | |
612 | + | else [StringEntry(Q(toString(value(O)), toBase58String(value(P))), bk(eJ, eK, ed, eh, height, lastBlock.timestamp)), IntegerEntry(J(), eh), IntegerEntry(K(height, lastBlock.timestamp), eh)] | |
613 | + | let eo = bq(w(eB, aV), w(eA, aU)) | |
614 | + | let ep = A(eo, a) | |
615 | + | let eq = { | |
616 | + | let eN = (toInt(fraction(ey, eE, ek)) * 2) | |
617 | + | fraction((eH - eN), a, eN) | |
639 | 618 | } | |
640 | - | $Tuple5( | |
619 | + | $Tuple5(eH, cM, dO, eq, ex) | |
641 | 620 | } | |
642 | 621 | else throw("Strict value is not equal to itself.") | |
643 | 622 | } | |
644 | 623 | ||
645 | 624 | ||
646 | - | func | |
647 | - | let | |
648 | - | if ($isInstanceOf( | |
625 | + | func eO () = { | |
626 | + | let dL = getString(H()) | |
627 | + | if ($isInstanceOf(dL, "String")) | |
649 | 628 | then { | |
650 | - | let | |
651 | - | fromBase58String( | |
629 | + | let eP = dL | |
630 | + | fromBase58String(eP) | |
652 | 631 | } | |
653 | - | else if ($isInstanceOf( | |
632 | + | else if ($isInstanceOf(dL, "Unit")) | |
654 | 633 | then unit | |
655 | 634 | else throw("Match error") | |
656 | 635 | } | |
657 | 636 | ||
658 | 637 | ||
659 | - | func | |
660 | - | let | |
661 | - | if ($isInstanceOf( | |
638 | + | func eQ () = { | |
639 | + | let dL = getString(I()) | |
640 | + | if ($isInstanceOf(dL, "String")) | |
662 | 641 | then { | |
663 | - | let | |
664 | - | fromBase58String( | |
642 | + | let eP = dL | |
643 | + | fromBase58String(eP) | |
665 | 644 | } | |
666 | - | else if ($isInstanceOf( | |
645 | + | else if ($isInstanceOf(dL, "Unit")) | |
667 | 646 | then unit | |
668 | 647 | else throw("Match error") | |
669 | 648 | } | |
670 | 649 | ||
671 | 650 | ||
672 | - | func | |
673 | - | let | |
674 | - | if ($isInstanceOf( | |
651 | + | func eR (dA) = { | |
652 | + | let dL = eO() | |
653 | + | if ($isInstanceOf(dL, "ByteVector")) | |
675 | 654 | then { | |
676 | - | let | |
677 | - | ( | |
655 | + | let eS = dL | |
656 | + | (dA.callerPublicKey == eS) | |
678 | 657 | } | |
679 | - | else if ($isInstanceOf( | |
680 | - | then ( | |
658 | + | else if ($isInstanceOf(dL, "Unit")) | |
659 | + | then (dA.caller == this) | |
681 | 660 | else throw("Match error") | |
682 | 661 | } | |
683 | 662 | ||
684 | 663 | ||
685 | - | func | |
686 | - | let | |
687 | - | let | |
688 | - | if ($isInstanceOf( | |
664 | + | func eT (dA) = { | |
665 | + | let eU = throw("Permission denied") | |
666 | + | let dL = eO() | |
667 | + | if ($isInstanceOf(dL, "ByteVector")) | |
689 | 668 | then { | |
690 | - | let | |
691 | - | if (( | |
669 | + | let eS = dL | |
670 | + | if ((dA.callerPublicKey == eS)) | |
692 | 671 | then true | |
693 | - | else | |
672 | + | else eU | |
694 | 673 | } | |
695 | - | else if ($isInstanceOf( | |
696 | - | then if (( | |
674 | + | else if ($isInstanceOf(dL, "Unit")) | |
675 | + | then if ((dA.caller == this)) | |
697 | 676 | then true | |
698 | - | else | |
677 | + | else eU | |
699 | 678 | else throw("Match error") | |
700 | 679 | } | |
701 | 680 | ||
702 | 681 | ||
703 | - | @Callable( | |
704 | - | func setManager ( | |
705 | - | let | |
706 | - | if (( | |
682 | + | @Callable(dA) | |
683 | + | func setManager (eV) = { | |
684 | + | let eW = eT(dA) | |
685 | + | if ((eW == eW)) | |
707 | 686 | then { | |
708 | - | let | |
709 | - | if (( | |
710 | - | then [StringEntry( | |
687 | + | let eX = fromBase58String(eV) | |
688 | + | if ((eX == eX)) | |
689 | + | then [StringEntry(I(), eV)] | |
711 | 690 | else throw("Strict value is not equal to itself.") | |
712 | 691 | } | |
713 | 692 | else throw("Strict value is not equal to itself.") | |
715 | 694 | ||
716 | 695 | ||
717 | 696 | ||
718 | - | @Callable( | |
697 | + | @Callable(dA) | |
719 | 698 | func confirmManager () = { | |
720 | - | let | |
721 | - | let | |
699 | + | let eY = eQ() | |
700 | + | let eZ = if (isDefined(eY)) | |
722 | 701 | then true | |
723 | 702 | else throw("No pending manager") | |
724 | - | if (( | |
703 | + | if ((eZ == eZ)) | |
725 | 704 | then { | |
726 | - | let | |
705 | + | let fa = if ((dA.callerPublicKey == value(eY))) | |
727 | 706 | then true | |
728 | 707 | else throw("You are not pending manager") | |
729 | - | if (( | |
730 | - | then [StringEntry( | |
708 | + | if ((fa == fa)) | |
709 | + | then [StringEntry(H(), toBase58String(value(eY))), DeleteEntry(I())] | |
731 | 710 | else throw("Strict value is not equal to itself.") | |
732 | 711 | } | |
733 | 712 | else throw("Strict value is not equal to itself.") | |
735 | 714 | ||
736 | 715 | ||
737 | 716 | ||
738 | - | @Callable( | |
739 | - | func put ( | |
717 | + | @Callable(dA) | |
718 | + | func put (ch,fb) = if ((0 > ch)) | |
740 | 719 | then throw("Invalid slippageTolerance passed") | |
741 | 720 | else { | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | if (( | |
721 | + | let dG = dD(dA, ch, true) | |
722 | + | let cJ = dG._2 | |
723 | + | let bO = dG._7 | |
724 | + | let cf = dG._9 | |
725 | + | let cK = dG._10 | |
726 | + | let cL = dG._11 | |
727 | + | let fc = dG._12 | |
728 | + | let fd = dG._13 | |
729 | + | let dE = toBigInt(value(dA.payments[0]).amount) | |
730 | + | let dF = toBigInt(value(dA.payments[1]).amount) | |
731 | + | let da = cT(dE, dF, toBigInt(0)) | |
732 | + | if ((da == da)) | |
754 | 733 | then { | |
755 | - | let | |
756 | - | if (( | |
734 | + | let dJ = invoke(az, "emit", [cJ], nil) | |
735 | + | if ((dJ == dJ)) | |
757 | 736 | then { | |
758 | - | let | |
759 | - | let | |
760 | - | if ($isInstanceOf( | |
737 | + | let dK = { | |
738 | + | let dL = dJ | |
739 | + | if ($isInstanceOf(dL, "Address")) | |
761 | 740 | then { | |
762 | - | let | |
763 | - | invoke( | |
741 | + | let dM = dL | |
742 | + | invoke(dM, "emit", [cJ], nil) | |
764 | 743 | } | |
765 | 744 | else unit | |
766 | 745 | } | |
767 | - | if (( | |
746 | + | if ((dK == dK)) | |
768 | 747 | then { | |
769 | - | let | |
770 | - | then invoke( | |
748 | + | let fe = if ((cK > 0)) | |
749 | + | then invoke(aY, "put", nil, [AttachedPayment(fc, cK)]) | |
771 | 750 | else nil | |
772 | - | if (( | |
751 | + | if ((fe == fe)) | |
773 | 752 | then { | |
774 | - | let | |
775 | - | then invoke( | |
753 | + | let ff = if ((cL > 0)) | |
754 | + | then invoke(aY, "put", nil, [AttachedPayment(fd, cL)]) | |
776 | 755 | else nil | |
777 | - | if (( | |
756 | + | if ((ff == ff)) | |
778 | 757 | then { | |
779 | - | let | |
758 | + | let fg = if (fb) | |
780 | 759 | then { | |
781 | - | let | |
782 | - | if (( | |
760 | + | let fh = invoke(aX, "stake", nil, [AttachedPayment(bO, cJ)]) | |
761 | + | if ((fh == fh)) | |
783 | 762 | then nil | |
784 | 763 | else throw("Strict value is not equal to itself.") | |
785 | 764 | } | |
786 | - | else [ScriptTransfer( | |
787 | - | let | |
788 | - | if (( | |
765 | + | else [ScriptTransfer(dA.caller, cJ, bO)] | |
766 | + | let fi = db(0, 0, 0) | |
767 | + | if ((fi == fi)) | |
789 | 768 | then { | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | if (( | |
794 | - | then (( | |
769 | + | let cS = fi._2 | |
770 | + | let fj = fi._1 | |
771 | + | let fk = df(da, cS) | |
772 | + | if ((fk == fk)) | |
773 | + | then ((cf ++ fg) ++ fj) | |
795 | 774 | else throw("Strict value is not equal to itself.") | |
796 | 775 | } | |
797 | 776 | else throw("Strict value is not equal to itself.") | |
809 | 788 | ||
810 | 789 | ||
811 | 790 | ||
812 | - | @Callable( | |
813 | - | func putForFree ( | |
791 | + | @Callable(dA) | |
792 | + | func putForFree (fl) = if ((0 > fl)) | |
814 | 793 | then throw("Invalid value passed") | |
815 | 794 | else { | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let | |
821 | - | if (( | |
795 | + | let dG = dD(dA, fl, false) | |
796 | + | let cf = dG._9 | |
797 | + | let dE = toBigInt(value(dA.payments[0]).amount) | |
798 | + | let dF = toBigInt(value(dA.payments[1]).amount) | |
799 | + | let da = cT(dE, dF, toBigInt(0)) | |
800 | + | if ((da == da)) | |
822 | 801 | then { | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | if (( | |
828 | - | then ( | |
802 | + | let fm = db(0, 0, 0) | |
803 | + | let fj = fm._1 | |
804 | + | let cS = fm._2 | |
805 | + | let fk = df(da, cS) | |
806 | + | if ((fk == fk)) | |
807 | + | then (cf ++ fj) | |
829 | 808 | else throw("Strict value is not equal to itself.") | |
830 | 809 | } | |
831 | 810 | else throw("Strict value is not equal to itself.") | |
833 | 812 | ||
834 | 813 | ||
835 | 814 | ||
836 | - | @Callable( | |
837 | - | func putOneTkn ( | |
838 | - | let | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
841 | - | then | |
842 | - | else throw(($getType( | |
815 | + | @Callable(dA) | |
816 | + | func putOneTkn (fn,fo) = { | |
817 | + | let fp = { | |
818 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
819 | + | if ($isInstanceOf(aC, "Boolean")) | |
820 | + | then aC | |
821 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
843 | 822 | } | |
844 | - | let | |
823 | + | let fq = if (if (if (aE()) | |
845 | 824 | then true | |
846 | - | else ( | |
825 | + | else (aQ == i)) | |
847 | 826 | then true | |
848 | - | else ( | |
827 | + | else (aQ == k)) | |
849 | 828 | then true | |
850 | - | else | |
851 | - | let | |
829 | + | else fp | |
830 | + | let ew = [if (if (!(fq)) | |
852 | 831 | then true | |
853 | - | else | |
832 | + | else eR(dA)) | |
854 | 833 | then true | |
855 | - | else | |
834 | + | else aw("put operation is blocked by admin"), if ((size(dA.payments) == 1)) | |
856 | 835 | then true | |
857 | - | else | |
858 | - | if (( | |
836 | + | else aw("exactly 1 payment are expected")] | |
837 | + | if ((ew == ew)) | |
859 | 838 | then { | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | then | |
865 | - | else if (( | |
866 | - | then | |
867 | - | else | |
868 | - | if (( | |
839 | + | let fr = dA.payments[0] | |
840 | + | let dR = fr.assetId | |
841 | + | let dQ = fr.amount | |
842 | + | let da = if ((dR == aS)) | |
843 | + | then cT(toBigInt(dQ), toBigInt(0), toBigInt(0)) | |
844 | + | else if ((dR == aT)) | |
845 | + | then cT(toBigInt(0), toBigInt(dQ), toBigInt(0)) | |
846 | + | else aw("payment asset is not supported") | |
847 | + | if ((da == da)) | |
869 | 848 | then { | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
873 | - | if (( | |
849 | + | let O = dA.caller | |
850 | + | let P = dA.transactionId | |
851 | + | let fs = dP(dQ, dR, O, P) | |
852 | + | if ((fs == fs)) | |
874 | 853 | then { | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | then ( | |
854 | + | let dV = fs._5 | |
855 | + | let ft = fs._4 | |
856 | + | let dO = fs._3 | |
857 | + | let cM = fs._2 | |
858 | + | let fu = fs._1 | |
859 | + | let fv = if (if ((fn > 0)) | |
860 | + | then (fn > fu) | |
882 | 861 | else false) | |
883 | - | then | |
884 | - | else | |
885 | - | let | |
886 | - | if (( | |
862 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
863 | + | else fu | |
864 | + | let dJ = dH(fv) | |
865 | + | if ((dJ == dJ)) | |
887 | 866 | then { | |
888 | - | let | |
867 | + | let fg = if (fo) | |
889 | 868 | then { | |
890 | - | let | |
891 | - | if (( | |
869 | + | let fw = invoke(aX, "stake", nil, [AttachedPayment(aR, fv)]) | |
870 | + | if ((fw == fw)) | |
892 | 871 | then nil | |
893 | 872 | else throw("Strict value is not equal to itself.") | |
894 | 873 | } | |
895 | - | else [ScriptTransfer( | |
896 | - | let | |
897 | - | then [ScriptTransfer( | |
874 | + | else [ScriptTransfer(dA.caller, fv, aR)] | |
875 | + | let fx = if ((dO > 0)) | |
876 | + | then [ScriptTransfer(aA, dO, dR)] | |
898 | 877 | else nil | |
899 | - | let | |
878 | + | let fy = if ((this == aA)) | |
900 | 879 | then $Tuple2(0, 0) | |
901 | - | else if ( | |
902 | - | then $Tuple2(-( | |
903 | - | else $Tuple2(0, -( | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | if (( | |
912 | - | then $Tuple2(((( | |
880 | + | else if (dV) | |
881 | + | then $Tuple2(-(dO), 0) | |
882 | + | else $Tuple2(0, -(dO)) | |
883 | + | let dc = fy._1 | |
884 | + | let dd = fy._2 | |
885 | + | let fz = db(dc, dd, 0) | |
886 | + | let fj = fz._1 | |
887 | + | let cS = fz._2 | |
888 | + | let dm = value(getString(W)) | |
889 | + | let fk = df(da, cS) | |
890 | + | if ((fk == fk)) | |
891 | + | then $Tuple2((((cM ++ fg) ++ fx) ++ fj), fv) | |
913 | 892 | else throw("Strict value is not equal to itself.") | |
914 | 893 | } | |
915 | 894 | else throw("Strict value is not equal to itself.") | |
923 | 902 | ||
924 | 903 | ||
925 | 904 | ||
926 | - | @Callable( | |
927 | - | func putOneTknREADONLY ( | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | $Tuple2(nil, $Tuple3( | |
905 | + | @Callable(dA) | |
906 | + | func putOneTknREADONLY (dR,dQ) = { | |
907 | + | let fA = dP(dQ, aJ(dR), unit, unit) | |
908 | + | let fu = fA._1 | |
909 | + | let cM = fA._2 | |
910 | + | let dO = fA._3 | |
911 | + | let ft = fA._4 | |
912 | + | let dV = fA._5 | |
913 | + | $Tuple2(nil, $Tuple3(fu, dO, ft)) | |
935 | 914 | } | |
936 | 915 | ||
937 | 916 | ||
938 | 917 | ||
939 | - | @Callable( | |
940 | - | func getOneTkn ( | |
941 | - | let | |
942 | - | let | |
943 | - | if ($isInstanceOf( | |
944 | - | then | |
945 | - | else throw(($getType( | |
918 | + | @Callable(dA) | |
919 | + | func getOneTkn (fB,fn) = { | |
920 | + | let fp = { | |
921 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
922 | + | if ($isInstanceOf(aC, "Boolean")) | |
923 | + | then aC | |
924 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
946 | 925 | } | |
947 | - | let | |
926 | + | let fC = if (if (aE()) | |
948 | 927 | then true | |
949 | - | else ( | |
928 | + | else (aQ == k)) | |
950 | 929 | then true | |
951 | - | else | |
952 | - | let | |
930 | + | else fp | |
931 | + | let ew = [if (if (!(fC)) | |
953 | 932 | then true | |
954 | - | else | |
933 | + | else eR(dA)) | |
955 | 934 | then true | |
956 | - | else | |
935 | + | else aw("get operation is blocked by admin"), if ((size(dA.payments) == 1)) | |
957 | 936 | then true | |
958 | - | else | |
959 | - | if (( | |
937 | + | else aw("exactly 1 payment are expected")] | |
938 | + | if ((ew == ew)) | |
960 | 939 | then { | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | if (( | |
940 | + | let ev = aJ(fB) | |
941 | + | let fr = dA.payments[0] | |
942 | + | let dR = fr.assetId | |
943 | + | let ed = fr.amount | |
944 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
945 | + | if ((da == da)) | |
967 | 946 | then { | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | if (( | |
947 | + | let O = dA.caller | |
948 | + | let P = dA.transactionId | |
949 | + | let fD = eu(ev, ed, dR, O, P) | |
950 | + | if ((fD == fD)) | |
972 | 951 | then { | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | then ( | |
952 | + | let ex = fD._5 | |
953 | + | let ft = fD._4 | |
954 | + | let dO = fD._3 | |
955 | + | let cM = fD._2 | |
956 | + | let fE = fD._1 | |
957 | + | let dI = if (if ((fn > 0)) | |
958 | + | then (fn > fE) | |
980 | 959 | else false) | |
981 | - | then | |
982 | - | else | |
983 | - | let | |
984 | - | if (( | |
960 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
961 | + | else fE | |
962 | + | let fF = invoke(az, "burn", [ed], [AttachedPayment(dR, ed)]) | |
963 | + | if ((fF == fF)) | |
985 | 964 | then { | |
986 | - | let | |
987 | - | let | |
988 | - | then [ScriptTransfer( | |
965 | + | let fG = [ScriptTransfer(O, dI, ev)] | |
966 | + | let fx = if ((dO > 0)) | |
967 | + | then [ScriptTransfer(aA, dO, ev)] | |
989 | 968 | else nil | |
990 | - | let | |
991 | - | let | |
969 | + | let fH = { | |
970 | + | let fI = if ((this == aA)) | |
992 | 971 | then 0 | |
993 | - | else | |
994 | - | if ( | |
995 | - | then $Tuple2(-(( | |
996 | - | else $Tuple2(0, -(( | |
972 | + | else dO | |
973 | + | if (ex) | |
974 | + | then $Tuple2(-((dI + fI)), 0) | |
975 | + | else $Tuple2(0, -((dI + fI))) | |
997 | 976 | } | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | if (( | |
1005 | - | then $Tuple2(((( | |
977 | + | let dc = fH._1 | |
978 | + | let dd = fH._2 | |
979 | + | let fJ = db(dc, dd, 0) | |
980 | + | let fj = fJ._1 | |
981 | + | let cS = fJ._2 | |
982 | + | let fk = df(da, cS) | |
983 | + | if ((fk == fk)) | |
984 | + | then $Tuple2((((cM ++ fG) ++ fx) ++ fj), dI) | |
1006 | 985 | else throw("Strict value is not equal to itself.") | |
1007 | 986 | } | |
1008 | 987 | else throw("Strict value is not equal to itself.") | |
1016 | 995 | ||
1017 | 996 | ||
1018 | 997 | ||
1019 | - | @Callable( | |
1020 | - | func getOneTknREADONLY ( | |
1021 | - | let | |
1022 | - | let | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | $Tuple2(nil, $Tuple3( | |
998 | + | @Callable(dA) | |
999 | + | func getOneTknREADONLY (ev,ed) = { | |
1000 | + | let fK = eu(aJ(ev), ed, aR, unit, unit) | |
1001 | + | let fE = fK._1 | |
1002 | + | let cM = fK._2 | |
1003 | + | let dO = fK._3 | |
1004 | + | let ft = fK._4 | |
1005 | + | let ex = fK._5 | |
1006 | + | $Tuple2(nil, $Tuple3(fE, dO, ft)) | |
1028 | 1007 | } | |
1029 | 1008 | ||
1030 | 1009 | ||
1031 | 1010 | ||
1032 | - | @Callable( | |
1033 | - | func unstakeAndGetOneTkn ( | |
1034 | - | let | |
1035 | - | let | |
1036 | - | if ($isInstanceOf( | |
1037 | - | then | |
1038 | - | else throw(($getType( | |
1011 | + | @Callable(dA) | |
1012 | + | func unstakeAndGetOneTkn (fL,fB,fn) = { | |
1013 | + | let fp = { | |
1014 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1015 | + | if ($isInstanceOf(aC, "Boolean")) | |
1016 | + | then aC | |
1017 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
1039 | 1018 | } | |
1040 | - | let | |
1019 | + | let fC = if (if (aE()) | |
1041 | 1020 | then true | |
1042 | - | else ( | |
1021 | + | else (aQ == k)) | |
1043 | 1022 | then true | |
1044 | - | else | |
1045 | - | let | |
1023 | + | else fp | |
1024 | + | let ew = [if (if (!(fC)) | |
1046 | 1025 | then true | |
1047 | - | else | |
1026 | + | else eR(dA)) | |
1048 | 1027 | then true | |
1049 | - | else | |
1028 | + | else aw("get operation is blocked by admin"), if ((size(dA.payments) == 0)) | |
1050 | 1029 | then true | |
1051 | - | else | |
1052 | - | if (( | |
1030 | + | else aw("no payments are expected")] | |
1031 | + | if ((ew == ew)) | |
1053 | 1032 | then { | |
1054 | - | let | |
1055 | - | let | |
1056 | - | let | |
1057 | - | let | |
1058 | - | if (( | |
1033 | + | let ev = aJ(fB) | |
1034 | + | let O = dA.caller | |
1035 | + | let P = dA.transactionId | |
1036 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1037 | + | if ((da == da)) | |
1059 | 1038 | then { | |
1060 | - | let | |
1061 | - | if (( | |
1039 | + | let fM = invoke(aX, "unstake", [toBase58String(aR), fL], nil) | |
1040 | + | if ((fM == fM)) | |
1062 | 1041 | then { | |
1063 | - | let | |
1064 | - | if (( | |
1042 | + | let fN = eu(ev, fL, aR, O, P) | |
1043 | + | if ((fN == fN)) | |
1065 | 1044 | then { | |
1066 | - | let | |
1067 | - | let | |
1068 | - | let | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | then ( | |
1045 | + | let ex = fN._5 | |
1046 | + | let ft = fN._4 | |
1047 | + | let dO = fN._3 | |
1048 | + | let cM = fN._2 | |
1049 | + | let fE = fN._1 | |
1050 | + | let dI = if (if ((fn > 0)) | |
1051 | + | then (fn > fE) | |
1073 | 1052 | else false) | |
1074 | - | then | |
1075 | - | else | |
1076 | - | let | |
1077 | - | if (( | |
1053 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
1054 | + | else fE | |
1055 | + | let fF = invoke(az, "burn", [fL], [AttachedPayment(aR, fL)]) | |
1056 | + | if ((fF == fF)) | |
1078 | 1057 | then { | |
1079 | - | let | |
1080 | - | let | |
1081 | - | then [ScriptTransfer( | |
1058 | + | let fG = [ScriptTransfer(dA.caller, dI, ev)] | |
1059 | + | let fx = if ((dO > 0)) | |
1060 | + | then [ScriptTransfer(aA, dO, ev)] | |
1082 | 1061 | else nil | |
1083 | - | let | |
1084 | - | let | |
1062 | + | let fO = { | |
1063 | + | let fI = if ((this == aA)) | |
1085 | 1064 | then 0 | |
1086 | - | else | |
1087 | - | if ( | |
1088 | - | then $Tuple2(-(( | |
1089 | - | else $Tuple2(0, -(( | |
1065 | + | else dO | |
1066 | + | if (ex) | |
1067 | + | then $Tuple2(-((dI + fI)), 0) | |
1068 | + | else $Tuple2(0, -((dI + fI))) | |
1090 | 1069 | } | |
1091 | - | let | |
1092 | - | let | |
1093 | - | let | |
1094 | - | let | |
1095 | - | let | |
1096 | - | let | |
1097 | - | if (( | |
1098 | - | then $Tuple2(((( | |
1070 | + | let dc = fO._1 | |
1071 | + | let dd = fO._2 | |
1072 | + | let fP = db(dc, dd, 0) | |
1073 | + | let fj = fP._1 | |
1074 | + | let cS = fP._2 | |
1075 | + | let fk = df(da, cS) | |
1076 | + | if ((fk == fk)) | |
1077 | + | then $Tuple2((((cM ++ fG) ++ fx) ++ fj), dI) | |
1099 | 1078 | else throw("Strict value is not equal to itself.") | |
1100 | 1079 | } | |
1101 | 1080 | else throw("Strict value is not equal to itself.") | |
1111 | 1090 | ||
1112 | 1091 | ||
1113 | 1092 | ||
1114 | - | @Callable( | |
1093 | + | @Callable(dA) | |
1115 | 1094 | func get () = { | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let | |
1122 | - | let | |
1123 | - | if (( | |
1095 | + | let cx = dz(dA) | |
1096 | + | let fQ = cx._1 | |
1097 | + | let ce = cx._2 | |
1098 | + | let dC = cx._3 | |
1099 | + | let bM = cx._4 | |
1100 | + | let cf = cx._5 | |
1101 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1102 | + | if ((da == da)) | |
1124 | 1103 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1104 | + | let fR = invoke(az, "burn", [dC], [AttachedPayment(bM, dC)]) | |
1105 | + | if ((fR == fR)) | |
1127 | 1106 | then { | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | if (( | |
1133 | - | then ( | |
1107 | + | let fS = db(-(fQ), -(ce), 0) | |
1108 | + | let fj = fS._1 | |
1109 | + | let cS = fS._2 | |
1110 | + | let fk = df(da, cS) | |
1111 | + | if ((fk == fk)) | |
1112 | + | then (cf ++ fj) | |
1134 | 1113 | else throw("Strict value is not equal to itself.") | |
1135 | 1114 | } | |
1136 | 1115 | else throw("Strict value is not equal to itself.") | |
1140 | 1119 | ||
1141 | 1120 | ||
1142 | 1121 | ||
1143 | - | @Callable( | |
1144 | - | func getNoLess ( | |
1145 | - | let | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1150 | - | let | |
1151 | - | if (( | |
1152 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1153 | - | else if (( | |
1154 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1122 | + | @Callable(dA) | |
1123 | + | func getNoLess (fT,fU) = { | |
1124 | + | let cx = dz(dA) | |
1125 | + | let cd = cx._1 | |
1126 | + | let ce = cx._2 | |
1127 | + | let dC = cx._3 | |
1128 | + | let bM = cx._4 | |
1129 | + | let cf = cx._5 | |
1130 | + | if ((fT > cd)) | |
1131 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cd)) + " < ") + toString(fT))) | |
1132 | + | else if ((fU > ce)) | |
1133 | + | then throw(((("noLessThenPriceAsset failed: " + toString(ce)) + " < ") + toString(fU))) | |
1155 | 1134 | else { | |
1156 | - | let | |
1157 | - | if (( | |
1135 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1136 | + | if ((da == da)) | |
1158 | 1137 | then { | |
1159 | - | let | |
1160 | - | if (( | |
1138 | + | let fR = invoke(az, "burn", [dC], [AttachedPayment(bM, dC)]) | |
1139 | + | if ((fR == fR)) | |
1161 | 1140 | then { | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | let | |
1166 | - | if (( | |
1167 | - | then ( | |
1141 | + | let fV = db(-(cd), -(ce), 0) | |
1142 | + | let fj = fV._1 | |
1143 | + | let cS = fV._2 | |
1144 | + | let fk = df(da, cS) | |
1145 | + | if ((fk == fk)) | |
1146 | + | then (cf ++ fj) | |
1168 | 1147 | else throw("Strict value is not equal to itself.") | |
1169 | 1148 | } | |
1170 | 1149 | else throw("Strict value is not equal to itself.") | |
1175 | 1154 | ||
1176 | 1155 | ||
1177 | 1156 | ||
1178 | - | @Callable( | |
1179 | - | func unstakeAndGet ( | |
1180 | - | let | |
1157 | + | @Callable(dA) | |
1158 | + | func unstakeAndGet (dI) = { | |
1159 | + | let fW = if ((size(dA.payments) != 0)) | |
1181 | 1160 | then throw("No payments are expected") | |
1182 | 1161 | else true | |
1183 | - | if (( | |
1162 | + | if ((fW == fW)) | |
1184 | 1163 | then { | |
1185 | - | let | |
1186 | - | let | |
1187 | - | let | |
1188 | - | if (( | |
1164 | + | let bD = aG() | |
1165 | + | let bO = fromBase58String(bD[n]) | |
1166 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1167 | + | if ((da == da)) | |
1189 | 1168 | then { | |
1190 | - | let | |
1191 | - | if (( | |
1169 | + | let fM = invoke(aX, "unstake", [toBase58String(bO), dI], nil) | |
1170 | + | if ((fM == fM)) | |
1192 | 1171 | then { | |
1193 | - | let | |
1194 | - | let | |
1195 | - | let | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1172 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(bO), dI, dA.caller) | |
1173 | + | let cd = cx._1 | |
1174 | + | let ce = cx._2 | |
1175 | + | let bR = parseIntValue(cx._9) | |
1176 | + | let cf = cx._10 | |
1177 | + | let fX = if (if (aE()) | |
1199 | 1178 | then true | |
1200 | - | else ( | |
1201 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1179 | + | else (bR == k)) | |
1180 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bR))) | |
1202 | 1181 | else true | |
1203 | - | if (( | |
1182 | + | if ((fX == fX)) | |
1204 | 1183 | then { | |
1205 | - | let | |
1206 | - | if (( | |
1184 | + | let fR = invoke(az, "burn", [dI], [AttachedPayment(bO, dI)]) | |
1185 | + | if ((fR == fR)) | |
1207 | 1186 | then { | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | let | |
1212 | - | if (( | |
1213 | - | then ( | |
1187 | + | let fY = db(-(cd), -(ce), 0) | |
1188 | + | let fj = fY._1 | |
1189 | + | let cS = fY._2 | |
1190 | + | let fk = df(da, cS) | |
1191 | + | if ((fk == fk)) | |
1192 | + | then (cf ++ fj) | |
1214 | 1193 | else throw("Strict value is not equal to itself.") | |
1215 | 1194 | } | |
1216 | 1195 | else throw("Strict value is not equal to itself.") | |
1226 | 1205 | ||
1227 | 1206 | ||
1228 | 1207 | ||
1229 | - | @Callable( | |
1230 | - | func unstakeAndGetNoLess ( | |
1231 | - | let | |
1208 | + | @Callable(dA) | |
1209 | + | func unstakeAndGetNoLess (fL,fZ,fU) = { | |
1210 | + | let fC = if (aE()) | |
1232 | 1211 | then true | |
1233 | - | else ( | |
1234 | - | let | |
1212 | + | else (aQ == k) | |
1213 | + | let ew = [if (!(fC)) | |
1235 | 1214 | then true | |
1236 | - | else throw("get operation is blocked by admin"), if ((size( | |
1215 | + | else throw("get operation is blocked by admin"), if ((size(dA.payments) == 0)) | |
1237 | 1216 | then true | |
1238 | 1217 | else throw("no payments are expected")] | |
1239 | - | if (( | |
1218 | + | if ((ew == ew)) | |
1240 | 1219 | then { | |
1241 | - | let | |
1242 | - | if (( | |
1220 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1221 | + | if ((da == da)) | |
1243 | 1222 | then { | |
1244 | - | let | |
1245 | - | if (( | |
1223 | + | let fM = invoke(aX, "unstake", [toBase58String(aR), fL], nil) | |
1224 | + | if ((fM == fM)) | |
1246 | 1225 | then { | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | let | |
1251 | - | let | |
1226 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(aR), fL, dA.caller) | |
1227 | + | let cd = cx._1 | |
1228 | + | let ce = cx._2 | |
1229 | + | let cf = cx._10 | |
1230 | + | let ga = [if ((cd >= fZ)) | |
1252 | 1231 | then true | |
1253 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1232 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fZ)], "")), if ((ce >= fU)) | |
1254 | 1233 | then true | |
1255 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1256 | - | if (( | |
1234 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fU)], ""))] | |
1235 | + | if ((ga == ga)) | |
1257 | 1236 | then { | |
1258 | - | let | |
1259 | - | if (( | |
1237 | + | let fR = invoke(az, "burn", [fL], [AttachedPayment(aR, fL)]) | |
1238 | + | if ((fR == fR)) | |
1260 | 1239 | then { | |
1261 | - | let | |
1262 | - | let | |
1263 | - | let | |
1264 | - | let | |
1265 | - | if (( | |
1266 | - | then ( | |
1240 | + | let gb = db(-(cd), -(ce), 0) | |
1241 | + | let fj = gb._1 | |
1242 | + | let cS = gb._2 | |
1243 | + | let fk = df(da, cS) | |
1244 | + | if ((fk == fk)) | |
1245 | + | then (cf ++ fj) | |
1267 | 1246 | else throw("Strict value is not equal to itself.") | |
1268 | 1247 | } | |
1269 | 1248 | else throw("Strict value is not equal to itself.") | |
1279 | 1258 | ||
1280 | 1259 | ||
1281 | 1260 | ||
1282 | - | @Callable( | |
1283 | - | func activate ( | |
1261 | + | @Callable(dA) | |
1262 | + | func activate (gc,gd) = if ((toString(dA.caller) != toString(az))) | |
1284 | 1263 | then throw("permissions denied") | |
1285 | - | else $Tuple2([StringEntry( | |
1264 | + | else $Tuple2([StringEntry(R(), gc), StringEntry(S(), gd)], "success") | |
1286 | 1265 | ||
1287 | 1266 | ||
1288 | 1267 | ||
1289 | - | @Callable( | |
1268 | + | @Callable(dA) | |
1290 | 1269 | func refreshKLp () = { | |
1291 | - | let | |
1292 | - | let | |
1270 | + | let ge = valueOrElse(getInteger(X), 0) | |
1271 | + | let gf = if (((height - ge) >= aa)) | |
1293 | 1272 | then unit | |
1294 | - | else | |
1295 | - | if (( | |
1273 | + | else aw(makeString([toString(aa), " blocks have not passed since the previous call"], "")) | |
1274 | + | if ((gf == gf)) | |
1296 | 1275 | then { | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | then | |
1303 | - | else | |
1304 | - | $Tuple2( | |
1276 | + | let dm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, W), "0")), ay("invalid kLp")) | |
1277 | + | let gg = db(0, 0, 0) | |
1278 | + | let gh = gg._1 | |
1279 | + | let cS = gg._2 | |
1280 | + | let de = if ((dm != cS)) | |
1281 | + | then gh | |
1282 | + | else aw("nothing to refresh") | |
1283 | + | $Tuple2(de, toString(cS)) | |
1305 | 1284 | } | |
1306 | 1285 | else throw("Strict value is not equal to itself.") | |
1307 | 1286 | } | |
1308 | 1287 | ||
1309 | 1288 | ||
1310 | 1289 | ||
1311 | - | @Callable( | |
1312 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1290 | + | @Callable(dA) | |
1291 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aG()) | |
1313 | 1292 | ||
1314 | 1293 | ||
1315 | 1294 | ||
1316 | - | @Callable( | |
1317 | - | func getAccBalanceWrapperREADONLY ( | |
1295 | + | @Callable(dA) | |
1296 | + | func getAccBalanceWrapperREADONLY (bp) = $Tuple2(nil, bo(bp)) | |
1318 | 1297 | ||
1319 | 1298 | ||
1320 | 1299 | ||
1321 | - | @Callable( | |
1322 | - | func calcPricesWrapperREADONLY ( | |
1323 | - | let | |
1324 | - | $Tuple2(nil, [toString( | |
1300 | + | @Callable(dA) | |
1301 | + | func calcPricesWrapperREADONLY (bx,by,bC) = { | |
1302 | + | let gi = bB(bx, by, bC) | |
1303 | + | $Tuple2(nil, [toString(gi[0]), toString(gi[1]), toString(gi[2])]) | |
1325 | 1304 | } | |
1326 | 1305 | ||
1327 | 1306 | ||
1328 | 1307 | ||
1329 | - | @Callable( | |
1330 | - | func toX18WrapperREADONLY ( | |
1308 | + | @Callable(dA) | |
1309 | + | func toX18WrapperREADONLY (x,y) = $Tuple2(nil, toString(w(x, y))) | |
1331 | 1310 | ||
1332 | 1311 | ||
1333 | 1312 | ||
1334 | - | @Callable( | |
1335 | - | func fromX18WrapperREADONLY ( | |
1313 | + | @Callable(dA) | |
1314 | + | func fromX18WrapperREADONLY (B,C) = $Tuple2(nil, A(parseBigIntValue(B), C)) | |
1336 | 1315 | ||
1337 | 1316 | ||
1338 | 1317 | ||
1339 | - | @Callable( | |
1340 | - | func calcPriceBigIntWrapperREADONLY ( | |
1318 | + | @Callable(dA) | |
1319 | + | func calcPriceBigIntWrapperREADONLY (br,bs) = $Tuple2(nil, toString(bq(parseBigIntValue(br), parseBigIntValue(bs)))) | |
1341 | 1320 | ||
1342 | 1321 | ||
1343 | 1322 | ||
1344 | - | @Callable( | |
1345 | - | func estimatePutOperationWrapperREADONLY ( | |
1323 | + | @Callable(dA) | |
1324 | + | func estimatePutOperationWrapperREADONLY (bL,ch,ci,cj,ck,cl,O,cm,cn) = $Tuple2(nil, cg(bL, ch, ci, cj, ck, cl, O, cm, cn)) | |
1346 | 1325 | ||
1347 | 1326 | ||
1348 | 1327 | ||
1349 | - | @Callable( | |
1350 | - | func estimateGetOperationWrapperREADONLY ( | |
1351 | - | let | |
1352 | - | $Tuple2(nil, $Tuple10( | |
1328 | + | @Callable(dA) | |
1329 | + | func estimateGetOperationWrapperREADONLY (bL,bM,bN,O) = { | |
1330 | + | let cx = bK(bL, bM, bN, addressFromStringValue(O)) | |
1331 | + | $Tuple2(nil, $Tuple10(cx._1, cx._2, cx._3, cx._4, cx._5, cx._6, cx._7, toString(cx._8), cx._9, cx._10)) | |
1353 | 1332 | } | |
1354 | 1333 | ||
1355 | 1334 | ||
1356 | 1335 | ||
1357 | - | @Callable( | |
1336 | + | @Callable(dA) | |
1358 | 1337 | func statsREADONLY () = { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | let | |
1370 | - | let | |
1371 | - | then [ | |
1372 | - | else | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1338 | + | let bD = aG() | |
1339 | + | let bO = fromBase58String(bD[n]) | |
1340 | + | let gj = bD[o] | |
1341 | + | let gk = bD[p] | |
1342 | + | let cq = bD[s] | |
1343 | + | let cr = bD[t] | |
1344 | + | let bE = parseIntValue(bD[q]) | |
1345 | + | let bF = parseIntValue(bD[r]) | |
1346 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1347 | + | let gm = bo(gj) | |
1348 | + | let gn = bo(gk) | |
1349 | + | let go = if ((gl == 0)) | |
1350 | + | then [c, c, c] | |
1351 | + | else bB(gm, gn, gl) | |
1352 | + | let bY = 0 | |
1353 | + | let gp = A(go[1], a) | |
1354 | + | let gq = A(go[2], a) | |
1355 | + | let gr = value(getInteger(az, aj(toString(this)))) | |
1356 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gm), toString(gn), toString(gl), toString(bY), toString(gp), toString(gq), toString(gr)], h)) | |
1378 | 1357 | } | |
1379 | 1358 | ||
1380 | 1359 | ||
1381 | 1360 | ||
1382 | - | @Callable( | |
1383 | - | func evaluatePutByAmountAssetREADONLY ( | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | let | |
1390 | - | let | |
1391 | - | let | |
1392 | - | let | |
1393 | - | let | |
1394 | - | let | |
1395 | - | let | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | then | |
1400 | - | else | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | let | |
1405 | - | let | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1361 | + | @Callable(dA) | |
1362 | + | func evaluatePutByAmountAssetREADONLY (ci) = { | |
1363 | + | let bD = aG() | |
1364 | + | let bO = fromBase58String(bD[n]) | |
1365 | + | let co = bD[o] | |
1366 | + | let bP = fromBase58String(co) | |
1367 | + | let cp = bD[p] | |
1368 | + | let bQ = fromBase58String(cp) | |
1369 | + | let bE = parseIntValue(bD[q]) | |
1370 | + | let bF = parseIntValue(bD[r]) | |
1371 | + | let bR = bD[m] | |
1372 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1373 | + | let gm = bo(co) | |
1374 | + | let gn = bo(cp) | |
1375 | + | let bz = w(gm, bE) | |
1376 | + | let bA = w(gn, bF) | |
1377 | + | let bX = if ((gl == 0)) | |
1378 | + | then c | |
1379 | + | else bq(bA, bz) | |
1380 | + | let cu = w(ci, bE) | |
1381 | + | let cv = fraction(cu, bX, b) | |
1382 | + | let ck = A(cv, bF) | |
1383 | + | let dG = cg("", 500000, ci, bP, ck, bQ, "", true, false) | |
1384 | + | let cF = dG._1 | |
1385 | + | let gs = dG._3 | |
1386 | + | let bT = dG._4 | |
1387 | + | let bV = dG._5 | |
1388 | + | let bS = dG._6 | |
1389 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cF), toString(A(bX, a)), toString(bT), toString(bV), toString(bS), bR, toString(ci), toString(ck)], h)) | |
1411 | 1390 | } | |
1412 | 1391 | ||
1413 | 1392 | ||
1414 | 1393 | ||
1415 | - | @Callable( | |
1416 | - | func evaluatePutByPriceAssetREADONLY ( | |
1417 | - | let | |
1418 | - | let | |
1419 | - | let | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1431 | - | let | |
1432 | - | then | |
1433 | - | else | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | let | |
1443 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1394 | + | @Callable(dA) | |
1395 | + | func evaluatePutByPriceAssetREADONLY (ck) = { | |
1396 | + | let bD = aG() | |
1397 | + | let bO = fromBase58String(bD[n]) | |
1398 | + | let co = bD[o] | |
1399 | + | let bP = fromBase58String(co) | |
1400 | + | let cp = bD[p] | |
1401 | + | let bQ = fromBase58String(cp) | |
1402 | + | let bE = parseIntValue(bD[q]) | |
1403 | + | let bF = parseIntValue(bD[r]) | |
1404 | + | let bR = bD[m] | |
1405 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1406 | + | let gt = bo(co) | |
1407 | + | let gu = bo(cp) | |
1408 | + | let gv = w(gt, bE) | |
1409 | + | let gw = w(gu, bF) | |
1410 | + | let bX = if ((gl == 0)) | |
1411 | + | then c | |
1412 | + | else bq(gw, gv) | |
1413 | + | let cv = w(ck, bF) | |
1414 | + | let cu = fraction(cv, b, bX) | |
1415 | + | let ci = A(cu, bE) | |
1416 | + | let dG = cg("", 500000, ci, bP, ck, bQ, "", true, false) | |
1417 | + | let cF = dG._1 | |
1418 | + | let gs = dG._3 | |
1419 | + | let bT = dG._4 | |
1420 | + | let bV = dG._5 | |
1421 | + | let bS = dG._6 | |
1422 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cF), toString(A(bX, a)), toString(bT), toString(bV), toString(bS), bR, toString(ci), toString(ck)], h)) | |
1444 | 1423 | } | |
1445 | 1424 | ||
1446 | 1425 | ||
1447 | 1426 | ||
1448 | - | @Callable( | |
1449 | - | func evaluateGetREADONLY ( | |
1450 | - | let | |
1451 | - | let | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1427 | + | @Callable(dA) | |
1428 | + | func evaluateGetREADONLY (gx,gy) = { | |
1429 | + | let cx = bK("", gx, gy, this) | |
1430 | + | let cd = cx._1 | |
1431 | + | let ce = cx._2 | |
1432 | + | let bT = cx._5 | |
1433 | + | let bV = cx._6 | |
1434 | + | let bS = cx._7 | |
1435 | + | let bY = cx._8 | |
1436 | + | let bR = parseIntValue(cx._9) | |
1437 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cd), toString(ce), toString(bT), toString(bV), toString(bS), toString(bY), toString(bR)], h)) | |
1459 | 1438 | } | |
1460 | 1439 | ||
1461 | 1440 | ||
1462 | - | @Verifier( | |
1463 | - | func | |
1464 | - | let | |
1465 | - | let | |
1466 | - | if ($isInstanceOf( | |
1441 | + | @Verifier(gz) | |
1442 | + | func gA () = { | |
1443 | + | let gB = { | |
1444 | + | let dL = eO() | |
1445 | + | if ($isInstanceOf(dL, "ByteVector")) | |
1467 | 1446 | then { | |
1468 | - | let | |
1469 | - | | |
1447 | + | let eS = dL | |
1448 | + | eS | |
1470 | 1449 | } | |
1471 | - | else if ($isInstanceOf( | |
1472 | - | then | |
1450 | + | else if ($isInstanceOf(dL, "Unit")) | |
1451 | + | then gz.senderPublicKey | |
1473 | 1452 | else throw("Match error") | |
1474 | 1453 | } | |
1475 | - | let | |
1476 | - | if ($isInstanceOf( | |
1454 | + | let dL = gz | |
1455 | + | if ($isInstanceOf(dL, "Order")) | |
1477 | 1456 | then { | |
1478 | - | let dy = dT | |
1479 | - | let gJ = aS() | |
1480 | - | let aC = dx(dy) | |
1481 | - | let aD = sigVerify(dy.bodyBytes, dy.proofs[0], dy.senderPublicKey) | |
1482 | - | let aE = sigVerify(dy.bodyBytes, dy.proofs[1], gJ) | |
1483 | - | if (if (if (aC) | |
1484 | - | then aD | |
1457 | + | let di = dL | |
1458 | + | let gC = aF() | |
1459 | + | let gD = dh(di) | |
1460 | + | let ao = gD._1 | |
1461 | + | let ap = gD._2 | |
1462 | + | let aq = sigVerify(di.bodyBytes, di.proofs[0], di.senderPublicKey) | |
1463 | + | let ar = sigVerify(di.bodyBytes, di.proofs[1], gC) | |
1464 | + | if (if (if (ao) | |
1465 | + | then aq | |
1485 | 1466 | else false) | |
1486 | - | then | |
1467 | + | then ar | |
1487 | 1468 | else false) | |
1488 | 1469 | then true | |
1489 | - | else | |
1470 | + | else an(ao, ap, aq, ar) | |
1490 | 1471 | } | |
1491 | - | else if ($isInstanceOf( | |
1472 | + | else if ($isInstanceOf(dL, "SetScriptTransaction")) | |
1492 | 1473 | then { | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (if (( | |
1498 | - | then ( | |
1474 | + | let eP = dL | |
1475 | + | let gE = blake2b256(value(eP.script)) | |
1476 | + | let gF = fromBase64String(value(getString(az, al()))) | |
1477 | + | let gG = scriptHash(this) | |
1478 | + | if (if ((gF == gE)) | |
1479 | + | then (gG != gE) | |
1499 | 1480 | else false) | |
1500 | 1481 | then true | |
1501 | - | else sigVerify( | |
1482 | + | else sigVerify(gz.bodyBytes, gz.proofs[0], gB) | |
1502 | 1483 | } | |
1503 | - | else sigVerify( | |
1484 | + | else sigVerify(gz.bodyBytes, gz.proofs[0], gB) | |
1504 | 1485 | } | |
1505 | 1486 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = 100000000 | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = toBigInt(1000000000000000000) | |
7 | 7 | ||
8 | - | let c = toBigInt( | |
8 | + | let c = toBigInt(0) | |
9 | 9 | ||
10 | - | let d = toBigInt( | |
10 | + | let d = toBigInt(0) | |
11 | 11 | ||
12 | - | let e = toBigInt( | |
12 | + | let e = toBigInt(1) | |
13 | 13 | ||
14 | - | let f = toBigInt( | |
14 | + | let f = toBigInt(2) | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = "WAVES" | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = "__" | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 2 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 3 | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 4 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 1 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 2 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 3 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 4 | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 5 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 6 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 7 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 8 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 9 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 1 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 7 | |
47 | 47 | ||
48 | - | let w = 9 | |
49 | - | ||
50 | - | let x = 10 | |
51 | - | ||
52 | - | let y = 1 | |
53 | - | ||
54 | - | let z = 2 | |
55 | - | ||
56 | - | let A = 3 | |
57 | - | ||
58 | - | let B = 1 | |
59 | - | ||
60 | - | let C = 7 | |
61 | - | ||
62 | - | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
48 | + | func w (x,y) = fraction(toBigInt(x), b, toBigInt(y)) | |
63 | 49 | ||
64 | 50 | ||
65 | - | func | |
51 | + | func z (x,y) = fraction(x, b, y) | |
66 | 52 | ||
67 | 53 | ||
68 | - | func | |
54 | + | func A (B,C) = toInt(fraction(B, toBigInt(C), b)) | |
69 | 55 | ||
70 | 56 | ||
71 | - | func | |
57 | + | func D (B,C,E) = toInt(fraction(B, toBigInt(C), b, E)) | |
72 | 58 | ||
73 | 59 | ||
74 | - | func M (N,O,P) = fraction(N, O, P) | |
60 | + | func F (B) = if ((c > B)) | |
61 | + | then -(B) | |
62 | + | else B | |
75 | 63 | ||
76 | 64 | ||
77 | - | func Q (I) = if ((0 > I)) | |
78 | - | then -(I) | |
79 | - | else I | |
65 | + | func G () = "%s__factoryContract" | |
80 | 66 | ||
81 | 67 | ||
82 | - | func R (I) = if ((e > I)) | |
83 | - | then -(I) | |
84 | - | else I | |
68 | + | func H () = "%s__managerPublicKey" | |
85 | 69 | ||
86 | 70 | ||
87 | - | func | |
71 | + | func I () = "%s__pendingManagerPublicKey" | |
88 | 72 | ||
89 | 73 | ||
90 | - | func | |
74 | + | func J () = "%s%s__price__last" | |
91 | 75 | ||
92 | 76 | ||
93 | - | func | |
77 | + | func K (L,M) = makeString(["%s%s%d%d__price__history", toString(L), toString(M)], h) | |
94 | 78 | ||
95 | 79 | ||
96 | - | func | |
80 | + | func N (O,P) = ((("%s%s%s__P__" + O) + "__") + P) | |
97 | 81 | ||
98 | 82 | ||
99 | - | func | |
83 | + | func Q (O,P) = ((("%s%s%s__G__" + O) + "__") + P) | |
100 | 84 | ||
101 | 85 | ||
102 | - | func | |
86 | + | func R () = "%s__amountAsset" | |
103 | 87 | ||
104 | 88 | ||
105 | - | func | |
89 | + | func S () = "%s__priceAsset" | |
106 | 90 | ||
107 | 91 | ||
108 | - | func ad () = "%s__amountAsset" | |
92 | + | let T = "%s__fee" | |
93 | + | ||
94 | + | let U = fraction(10, a, 10000) | |
95 | + | ||
96 | + | let V = valueOrElse(getInteger(this, T), U) | |
97 | + | ||
98 | + | let W = makeString(["%s", "kLp"], h) | |
99 | + | ||
100 | + | let X = makeString(["%s", "kLpRefreshedHeight"], h) | |
101 | + | ||
102 | + | let Y = makeString(["%s", "refreshKLpDelay"], h) | |
103 | + | ||
104 | + | let Z = 30 | |
105 | + | ||
106 | + | let aa = valueOrElse(getInteger(this, Y), Z) | |
107 | + | ||
108 | + | func ab () = "%s__factoryConfig" | |
109 | 109 | ||
110 | 110 | ||
111 | - | func | |
111 | + | func ac () = "%s%s__matcher__publicKey" | |
112 | 112 | ||
113 | 113 | ||
114 | - | let af = "%s__fee" | |
115 | - | ||
116 | - | let ag = fraction(10, b, 10000) | |
117 | - | ||
118 | - | let ah = valueOrElse(getInteger(this, af), ag) | |
119 | - | ||
120 | - | let ai = makeString(["%s", "kLp"], j) | |
121 | - | ||
122 | - | let aj = makeString(["%s", "kLpRefreshedHeight"], j) | |
123 | - | ||
124 | - | let ak = makeString(["%s", "refreshKLpDelay"], j) | |
125 | - | ||
126 | - | let al = 30 | |
127 | - | ||
128 | - | let am = valueOrElse(getInteger(this, ak), al) | |
129 | - | ||
130 | - | func an () = "%s__factoryConfig" | |
114 | + | func ad (ae,af) = (((("%d%d%s__" + ae) + "__") + af) + "__config") | |
131 | 115 | ||
132 | 116 | ||
133 | - | func | |
117 | + | func ag (ah) = ("%s%s%s__mappings__baseAsset2internalId__" + ah) | |
134 | 118 | ||
135 | 119 | ||
136 | - | func | |
120 | + | func ai () = "%s__shutdown" | |
137 | 121 | ||
138 | 122 | ||
139 | - | func | |
123 | + | func aj (ak) = ("%s%s__poolWeight__" + ak) | |
140 | 124 | ||
141 | 125 | ||
142 | - | func | |
126 | + | func al () = "%s__allowedLpScriptHash" | |
143 | 127 | ||
144 | 128 | ||
145 | - | func aw () = "%s__shutdown" | |
129 | + | let am = "%s__feeCollectorAddress" | |
130 | + | ||
131 | + | func an (ao,ap,aq,ar) = throw((((((((("order validation failed: orderValid=" + toString(ao)) + " (") + ap) + ")") + " senderValid=") + toString(aq)) + " matcherValid=") + toString(ar))) | |
146 | 132 | ||
147 | 133 | ||
148 | - | func | |
134 | + | func as (at,au) = valueOrErrorMessage(getString(at, au), makeString(["mandatory ", toString(at), ".", au, " is not defined"], "")) | |
149 | 135 | ||
150 | 136 | ||
151 | - | func | |
137 | + | func av (at,au) = valueOrErrorMessage(getInteger(at, au), makeString(["mandatory ", toString(at), ".", au, " is not defined"], "")) | |
152 | 138 | ||
153 | 139 | ||
154 | - | let aA = "%s__feeCollectorAddress" | |
155 | - | ||
156 | - | func aB (aC,aD,aE) = throw(((((("order validation failed: orderValid=" + toString(aC)) + " senderValid=") + toString(aD)) + " matcherValid=") + toString(aE))) | |
140 | + | func aw (ax) = throw(makeString(["lp.ride:", ax], " ")) | |
157 | 141 | ||
158 | 142 | ||
159 | - | func | |
143 | + | func ay (ax) = makeString(["lp.ride:", ax], " ") | |
160 | 144 | ||
161 | 145 | ||
162 | - | func aI (aG,aH) = valueOrErrorMessage(getInteger(aG, aH), makeString(["mandatory ", toString(aG), ".", aH, " is not defined"], "")) | |
146 | + | let az = addressFromStringValue(as(this, G())) | |
147 | + | ||
148 | + | let aA = addressFromStringValue(as(az, am)) | |
149 | + | ||
150 | + | let aB = { | |
151 | + | let aC = invoke(az, "getInFeeREADONLY", [toString(this)], nil) | |
152 | + | if ($isInstanceOf(aC, "Int")) | |
153 | + | then aC | |
154 | + | else throw(($getType(aC) + " couldn't be cast to Int")) | |
155 | + | } | |
156 | + | ||
157 | + | let aD = { | |
158 | + | let aC = invoke(az, "getOutFeeREADONLY", [toString(this)], nil) | |
159 | + | if ($isInstanceOf(aC, "Int")) | |
160 | + | then aC | |
161 | + | else throw(($getType(aC) + " couldn't be cast to Int")) | |
162 | + | } | |
163 | + | ||
164 | + | func aE () = valueOrElse(getBoolean(az, ai()), false) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func aF () = fromBase58String(as(az, ac())) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func aL (aK) = makeString(["lp.ride:", aK], " ") | |
169 | - | ||
170 | - | ||
171 | - | let aM = addressFromStringValue(aF(this, S())) | |
172 | - | ||
173 | - | let aN = addressFromStringValue(aF(aM, aA)) | |
174 | - | ||
175 | - | let aO = { | |
176 | - | let aP = invoke(aM, "getInFeeREADONLY", [toString(this)], nil) | |
177 | - | if ($isInstanceOf(aP, "Int")) | |
178 | - | then aP | |
179 | - | else throw(($getType(aP) + " couldn't be cast to Int")) | |
180 | - | } | |
181 | - | ||
182 | - | let aQ = { | |
183 | - | let aP = invoke(aM, "getOutFeeREADONLY", [toString(this)], nil) | |
184 | - | if ($isInstanceOf(aP, "Int")) | |
185 | - | then aP | |
186 | - | else throw(($getType(aP) + " couldn't be cast to Int")) | |
187 | - | } | |
188 | - | ||
189 | - | func aR () = valueOrElse(getBoolean(aM, aw()), false) | |
190 | - | ||
191 | - | ||
192 | - | func aS () = fromBase58String(aF(aM, ao())) | |
193 | - | ||
194 | - | ||
195 | - | func aT () = { | |
196 | - | let aU = aF(this, ad()) | |
197 | - | let aV = aF(this, ae()) | |
198 | - | let at = aI(aM, au(aV)) | |
199 | - | let as = aI(aM, au(aU)) | |
200 | - | split(aF(aM, ar(toString(as), toString(at))), j) | |
170 | + | func aG () = { | |
171 | + | let aH = as(this, R()) | |
172 | + | let aI = as(this, S()) | |
173 | + | let af = av(az, ag(aI)) | |
174 | + | let ae = av(az, ag(aH)) | |
175 | + | split(as(az, ad(toString(ae), toString(af))), h) | |
201 | 176 | } | |
202 | 177 | ||
203 | 178 | ||
204 | - | func | |
179 | + | func aJ (aK) = if ((aK == g)) | |
205 | 180 | then unit | |
206 | - | else fromBase58String( | |
181 | + | else fromBase58String(aK) | |
207 | 182 | ||
208 | 183 | ||
209 | - | func | |
210 | - | then | |
211 | - | else toBase58String(value( | |
184 | + | func aL (aK) = if ((aK == unit)) | |
185 | + | then g | |
186 | + | else toBase58String(value(aK)) | |
212 | 187 | ||
213 | 188 | ||
214 | - | func | |
189 | + | func aM (aN) = $Tuple7(addressFromStringValue(aN[l]), parseIntValue(aN[m]), fromBase58String(aN[n]), aJ(aN[o]), aJ(aN[p]), parseIntValue(aN[q]), parseIntValue(aN[r])) | |
215 | 190 | ||
216 | 191 | ||
217 | - | let | |
192 | + | let aO = aM(aG()) | |
218 | 193 | ||
219 | - | let | |
194 | + | let aP = aO | |
220 | 195 | ||
221 | - | let | |
196 | + | let aQ = aP._2 | |
222 | 197 | ||
223 | - | let | |
198 | + | let aR = aP._3 | |
224 | 199 | ||
225 | - | let | |
200 | + | let aS = aP._4 | |
226 | 201 | ||
227 | - | let | |
202 | + | let aT = aP._5 | |
228 | 203 | ||
229 | - | let | |
204 | + | let aU = aP._6 | |
230 | 205 | ||
231 | - | let | |
206 | + | let aV = aP._7 | |
232 | 207 | ||
233 | - | let bj = bc._7 | |
234 | - | ||
235 | - | func bk () = split(aF(aM, an()), j) | |
208 | + | func aW () = split(as(az, ab()), h) | |
236 | 209 | ||
237 | 210 | ||
238 | - | let | |
211 | + | let aX = valueOrErrorMessage(addressFromString(aW()[u]), "incorrect staking address") | |
239 | 212 | ||
240 | - | let | |
213 | + | let aY = valueOrErrorMessage(addressFromString(aW()[v]), "incorrect staking address") | |
241 | 214 | ||
242 | - | func | |
215 | + | func aZ (ba,bb,bc,bd,be,bf,bg,bh,bi,bj) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(ba), toString(bb), toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj)], h) | |
243 | 216 | ||
244 | 217 | ||
245 | - | func | |
218 | + | func bk (bl,bm,bn,bd,bg,bh) = makeString(["%d%d%d%d%d%d", toString(bl), toString(bm), toString(bn), toString(bd), toString(bg), toString(bh)], h) | |
246 | 219 | ||
247 | 220 | ||
248 | - | func | |
221 | + | func bo (bp) = if ((bp == "WAVES")) | |
249 | 222 | then wavesBalance(this).available | |
250 | - | else assetBalance(this, fromBase58String( | |
223 | + | else assetBalance(this, fromBase58String(bp)) | |
251 | 224 | ||
252 | 225 | ||
253 | - | func | |
226 | + | func bq (br,bs) = fraction(br, b, bs) | |
254 | 227 | ||
255 | 228 | ||
256 | - | func | |
229 | + | func bt (br,bs,E) = fraction(br, b, bs, E) | |
257 | 230 | ||
258 | 231 | ||
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | | |
232 | + | func bu (bv,bw,bx,by) = { | |
233 | + | let bz = w(bx, bv) | |
234 | + | let bA = w(by, bw) | |
235 | + | bq(bA, bz) | |
263 | 236 | } | |
264 | 237 | ||
265 | 238 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | [ | |
239 | + | func bB (bx,by,bC) = { | |
240 | + | let bD = aG() | |
241 | + | let bE = parseIntValue(bD[q]) | |
242 | + | let bF = parseIntValue(bD[r]) | |
243 | + | let bG = bu(bE, bF, bx, by) | |
244 | + | let bs = w(bx, bE) | |
245 | + | let br = w(by, bF) | |
246 | + | let bH = w(bC, a) | |
247 | + | let bI = bq(bs, bH) | |
248 | + | let bJ = bq(br, bH) | |
249 | + | [bG, bI, bJ] | |
277 | 250 | } | |
278 | 251 | ||
279 | 252 | ||
280 | - | func bY (bL,bM,bQ) = { | |
281 | - | let bZ = bP(bL, bM, bQ) | |
282 | - | [H(bZ[0], b), H(bZ[1], b), H(bZ[2], b)] | |
283 | - | } | |
284 | - | ||
285 | - | ||
286 | - | func ca (cb,cc,cd,aa) = { | |
287 | - | let bR = aT() | |
288 | - | let ce = bR[q] | |
289 | - | let cf = bR[r] | |
290 | - | let cg = bR[s] | |
291 | - | let bJ = parseIntValue(bR[t]) | |
292 | - | let bK = parseIntValue(bR[u]) | |
293 | - | let ch = bR[p] | |
294 | - | let ci = valueOrErrorMessage(assetInfo(fromBase58String(ce)), (("Asset " + ce) + " doesn't exist")).quantity | |
295 | - | if ((ce != cc)) | |
253 | + | func bK (bL,bM,bN,O) = { | |
254 | + | let bD = aG() | |
255 | + | let bO = bD[n] | |
256 | + | let bP = bD[o] | |
257 | + | let bQ = bD[p] | |
258 | + | let bv = parseIntValue(bD[q]) | |
259 | + | let bw = parseIntValue(bD[r]) | |
260 | + | let bR = bD[m] | |
261 | + | let bS = valueOrErrorMessage(assetInfo(fromBase58String(bO)), (("Asset " + bO) + " doesn't exist")).quantity | |
262 | + | if ((bO != bM)) | |
296 | 263 | then throw("Invalid asset passed.") | |
297 | 264 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
265 | + | let bT = bo(bP) | |
266 | + | let bU = w(bT, bv) | |
267 | + | let bV = bo(bQ) | |
268 | + | let bW = w(bV, bw) | |
269 | + | let bX = bq(bW, bU) | |
270 | + | let bY = A(bX, a) | |
271 | + | let bZ = w(bN, a) | |
272 | + | let ca = w(bS, a) | |
273 | + | let cb = fraction(bU, bZ, ca) | |
274 | + | let cc = fraction(bW, bZ, ca) | |
275 | + | let cd = D(cb, bv, FLOOR) | |
276 | + | let ce = D(cc, bw, FLOOR) | |
277 | + | let cf = if ((bL == "")) | |
311 | 278 | then nil | |
312 | - | else [ScriptTransfer( | |
279 | + | else [ScriptTransfer(O, cd, if ((bP == "WAVES")) | |
313 | 280 | then unit | |
314 | - | else fromBase58String( | |
281 | + | else fromBase58String(bP)), ScriptTransfer(O, ce, if ((bQ == "WAVES")) | |
315 | 282 | then unit | |
316 | - | else fromBase58String( | |
317 | - | $Tuple10( | |
283 | + | else fromBase58String(bQ)), StringEntry(Q(toString(O), bL), bk(cd, ce, bN, bY, height, lastBlock.timestamp)), IntegerEntry(J(), bY), IntegerEntry(K(height, lastBlock.timestamp), bY)] | |
284 | + | $Tuple10(cd, ce, bP, bQ, bT, bV, bS, bX, bR, cf) | |
318 | 285 | } | |
319 | 286 | } | |
320 | 287 | ||
321 | 288 | ||
322 | - | func | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | if (if (( | |
289 | + | func cg (bL,ch,ci,cj,ck,cl,O,cm,cn) = { | |
290 | + | let bD = aG() | |
291 | + | let bO = fromBase58String(bD[n]) | |
292 | + | let co = bD[o] | |
293 | + | let cp = bD[p] | |
294 | + | let cq = bD[s] | |
295 | + | let cr = bD[t] | |
296 | + | let bE = parseIntValue(bD[q]) | |
297 | + | let bF = parseIntValue(bD[r]) | |
298 | + | let bR = bD[m] | |
299 | + | let bS = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
300 | + | let cs = toBase58String(valueOrElse(cj, fromBase58String("WAVES"))) | |
301 | + | let ct = toBase58String(valueOrElse(cl, fromBase58String("WAVES"))) | |
302 | + | if (if ((co != cs)) | |
336 | 303 | then true | |
337 | - | else ( | |
304 | + | else (cp != ct)) | |
338 | 305 | then throw("Invalid amt or price asset passed.") | |
339 | 306 | else { | |
340 | - | let | |
341 | - | then | |
342 | - | else ( | |
343 | - | let | |
344 | - | then | |
345 | - | else ( | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
307 | + | let bT = if (cm) | |
308 | + | then bo(co) | |
309 | + | else (bo(co) - ci) | |
310 | + | let bV = if (cm) | |
311 | + | then bo(cp) | |
312 | + | else (bo(cp) - ck) | |
313 | + | let cu = w(ci, bE) | |
314 | + | let cv = w(ck, bF) | |
315 | + | let cw = bq(cv, cu) | |
316 | + | let bU = w(bT, bE) | |
317 | + | let bW = w(bV, bF) | |
318 | + | let cx = if ((bS == 0)) | |
352 | 319 | then { | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | $Tuple5( | |
320 | + | let bX = c | |
321 | + | let cy = c | |
322 | + | let bH = pow((cu * cv), 0, toBigInt(5), 1, 0, DOWN) | |
323 | + | $Tuple5(A(bH, a), A(cu, bE), A(cv, bF), bq((bW + cv), (bU + cu)), cy) | |
357 | 324 | } | |
358 | 325 | else { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | if (if (( | |
363 | - | then ( | |
326 | + | let bX = bq(bW, bU) | |
327 | + | let cy = fraction(F((bX - cw)), b, bX) | |
328 | + | let cz = w(ch, a) | |
329 | + | if (if ((bX != c)) | |
330 | + | then (cy > cz) | |
364 | 331 | else false) | |
365 | - | then throw(((("Price slippage " + toString( | |
332 | + | then throw(((("Price slippage " + toString(cy)) + " exceeded the passed limit of ") + toString(cz))) | |
366 | 333 | else { | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | then $Tuple2( | |
372 | - | else $Tuple2( | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | $Tuple5( | |
334 | + | let ca = w(bS, a) | |
335 | + | let cA = fraction(cu, bt(bW, bU, CEILING), b, CEILING) | |
336 | + | let cB = fraction(cv, b, bt(bW, bU, FLOOR), CEILING) | |
337 | + | let cC = if ((cA > cv)) | |
338 | + | then $Tuple2(cB, cv) | |
339 | + | else $Tuple2(cu, cA) | |
340 | + | let cD = cC._1 | |
341 | + | let cE = cC._2 | |
342 | + | let bH = fraction(ca, cE, bW, FLOOR) | |
343 | + | $Tuple5(D(bH, a, FLOOR), D(cD, bE, CEILING), D(cE, bF, CEILING), bX, cy) | |
377 | 344 | } | |
378 | 345 | } | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | if ((0 >= | |
346 | + | let cF = cx._1 | |
347 | + | let cG = cx._2 | |
348 | + | let cH = cx._3 | |
349 | + | let bY = A(cx._4, a) | |
350 | + | let cI = A(cx._5, a) | |
351 | + | if ((0 >= cF)) | |
385 | 352 | then throw("Invalid calculations. LP calculated is less than zero.") | |
386 | 353 | else { | |
387 | - | let | |
354 | + | let cJ = if (!(cn)) | |
388 | 355 | then 0 | |
389 | - | else | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | $Tuple13( | |
356 | + | else cF | |
357 | + | let cK = (ci - cG) | |
358 | + | let cL = (ck - cH) | |
359 | + | let cM = [IntegerEntry(J(), bY), IntegerEntry(K(height, lastBlock.timestamp), bY), StringEntry(N(O, bL), aZ(cG, cH, cJ, bY, ch, cI, height, lastBlock.timestamp, cK, cL))] | |
360 | + | $Tuple13(cF, cJ, bY, bT, bV, bS, bO, bR, cM, cK, cL, cj, cl) | |
394 | 361 | } | |
395 | 362 | } | |
396 | 363 | } | |
397 | 364 | ||
398 | 365 | ||
399 | - | func | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | if (( | |
404 | - | then | |
405 | - | else | |
366 | + | func cN (cO,cP,bS) = { | |
367 | + | let cQ = z(cO, toBigInt(aU)) | |
368 | + | let cR = z(cP, toBigInt(aV)) | |
369 | + | let cS = fraction(pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN), e, bS) | |
370 | + | if ((bS == d)) | |
371 | + | then d | |
372 | + | else cS | |
406 | 373 | } | |
407 | 374 | ||
408 | 375 | ||
409 | - | func | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | | |
376 | + | func cT (cU,cV,cW) = { | |
377 | + | let cX = (toBigInt(bo(aL(aS))) - cU) | |
378 | + | let cY = (toBigInt(bo(aL(aT))) - cV) | |
379 | + | let cZ = (toBigInt(value(assetInfo(aR)).quantity) - cW) | |
380 | + | let da = cN(cX, cY, cZ) | |
381 | + | da | |
415 | 382 | } | |
416 | 383 | ||
417 | 384 | ||
418 | - | func | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
424 | - | $Tuple2( | |
385 | + | func db (dc,dd,cW) = { | |
386 | + | let cX = (bo(aL(aS)) + dc) | |
387 | + | let cY = (bo(aL(aT)) + dd) | |
388 | + | let cZ = (value(assetInfo(aR)).quantity + cW) | |
389 | + | let cS = cN(toBigInt(cX), toBigInt(cY), toBigInt(cZ)) | |
390 | + | let de = [IntegerEntry(X, height), StringEntry(W, toString(cS))] | |
391 | + | $Tuple2(de, cS) | |
425 | 392 | } | |
426 | 393 | ||
427 | 394 | ||
428 | - | func | |
395 | + | func df (dg,cS) = if ((cS >= dg)) | |
429 | 396 | then true | |
430 | - | else | |
397 | + | else aw(makeString(["updated KLp lower than current KLp", toString(dg), toString(cS)], " ")) | |
431 | 398 | ||
432 | 399 | ||
433 | - | func | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | then $Tuple2( | |
438 | - | else $Tuple2(-( | |
439 | - | let | |
440 | - | let | |
441 | - | if (if (if ( | |
400 | + | func dh (di) = { | |
401 | + | let dj = di.amount | |
402 | + | let dk = fraction(di.amount, di.price, a, FLOOR) | |
403 | + | let dl = if ((di.orderType == Buy)) | |
404 | + | then $Tuple2(dj, -(dk)) | |
405 | + | else $Tuple2(-(dj), dk) | |
406 | + | let dc = dl._1 | |
407 | + | let dd = dl._2 | |
408 | + | if (if (if (aE()) | |
442 | 409 | then true | |
443 | - | else ( | |
410 | + | else (aQ == j)) | |
444 | 411 | then true | |
445 | - | else ( | |
412 | + | else (aQ == k)) | |
446 | 413 | then throw("Exchange operations disabled") | |
447 | - | else if (if (( | |
414 | + | else if (if ((di.assetPair.amountAsset != aS)) | |
448 | 415 | then true | |
449 | - | else ( | |
416 | + | else (di.assetPair.priceAsset != aT)) | |
450 | 417 | then throw("Wrong order assets.") | |
451 | 418 | else { | |
452 | - | let dC = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ai), aL("kLp is required"))), aL("invalid kLp")) | |
453 | - | let dD = dr(ds, dt, 0) | |
454 | - | let dE = dD._1 | |
455 | - | let dF = dD._2 | |
456 | - | let dG = (dF >= dC) | |
457 | - | dG | |
419 | + | let dm = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, W), ay("kLp is required"))), ay("invalid kLp")) | |
420 | + | let dn = db(dc, dd, 0) | |
421 | + | let do = dn._1 | |
422 | + | let dp = dn._2 | |
423 | + | let dq = db(0, 0, 0) | |
424 | + | let dr = dq._1 | |
425 | + | let ds = dq._2 | |
426 | + | let dt = (dp >= dm) | |
427 | + | let cO = bo(aL(aS)) | |
428 | + | let cP = bo(aL(aT)) | |
429 | + | let cQ = w(cO, aU) | |
430 | + | let du = (cQ + w(dc, aU)) | |
431 | + | let cR = w(cP, aV) | |
432 | + | let dv = (cR + w(dd, aV)) | |
433 | + | let dw = pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN) | |
434 | + | let dx = pow((cQ * cR), 0, toBigInt(5), 1, 18, DOWN) | |
435 | + | let dy = makeString([toString(dm), toString(dp), toString(dw), toString(dx)], " ") | |
436 | + | $Tuple2(dt, dy) | |
458 | 437 | } | |
459 | 438 | } | |
460 | 439 | ||
461 | 440 | ||
462 | - | func | |
441 | + | func dz (dA) = if ((size(dA.payments) != 1)) | |
463 | 442 | then throw("exactly 1 payment is expected") | |
464 | 443 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | if (if ( | |
444 | + | let dB = value(dA.payments[0]) | |
445 | + | let bM = value(dB.assetId) | |
446 | + | let dC = dB.amount | |
447 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(bM), dC, dA.caller) | |
448 | + | let cd = cx._1 | |
449 | + | let ce = cx._2 | |
450 | + | let bR = parseIntValue(cx._9) | |
451 | + | let cf = cx._10 | |
452 | + | if (if (aE()) | |
474 | 453 | then true | |
475 | - | else ( | |
476 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
477 | - | else $Tuple5( | |
454 | + | else (bR == k)) | |
455 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bR))) | |
456 | + | else $Tuple5(cd, ce, dC, bM, cf) | |
478 | 457 | } | |
479 | 458 | ||
480 | 459 | ||
481 | - | func | |
460 | + | func dD (dA,ch,cn) = if ((size(dA.payments) != 2)) | |
482 | 461 | then throw("exactly 2 payments are expected") | |
483 | 462 | else { | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | if (if (if ( | |
463 | + | let dE = value(dA.payments[0]) | |
464 | + | let dF = value(dA.payments[1]) | |
465 | + | let dG = cg(toBase58String(dA.transactionId), ch, dE.amount, dE.assetId, dF.amount, dF.assetId, toString(dA.caller), false, cn) | |
466 | + | let bR = parseIntValue(dG._8) | |
467 | + | if (if (if (aE()) | |
489 | 468 | then true | |
490 | - | else ( | |
469 | + | else (bR == i)) | |
491 | 470 | then true | |
492 | - | else ( | |
493 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
494 | - | else | |
471 | + | else (bR == k)) | |
472 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bR))) | |
473 | + | else dG | |
495 | 474 | } | |
496 | 475 | ||
497 | 476 | ||
498 | - | func | |
499 | - | let | |
500 | - | if (( | |
477 | + | func dH (dI) = { | |
478 | + | let dJ = invoke(az, "emit", [dI], nil) | |
479 | + | if ((dJ == dJ)) | |
501 | 480 | then { | |
502 | - | let | |
503 | - | let | |
504 | - | if ($isInstanceOf( | |
481 | + | let dK = { | |
482 | + | let dL = dJ | |
483 | + | if ($isInstanceOf(dL, "Address")) | |
505 | 484 | then { | |
506 | - | let | |
507 | - | invoke( | |
485 | + | let dM = dL | |
486 | + | invoke(dM, "emit", [dI], nil) | |
508 | 487 | } | |
509 | 488 | else unit | |
510 | 489 | } | |
511 | - | if (( | |
512 | - | then | |
490 | + | if ((dK == dK)) | |
491 | + | then dI | |
513 | 492 | else throw("Strict value is not equal to itself.") | |
514 | 493 | } | |
515 | 494 | else throw("Strict value is not equal to itself.") | |
516 | 495 | } | |
517 | 496 | ||
518 | 497 | ||
519 | - | func | |
520 | - | let | |
498 | + | func dN (dI,V) = { | |
499 | + | let dO = if ((V == 0)) | |
521 | 500 | then 0 | |
522 | - | else fraction( | |
523 | - | $Tuple2(( | |
501 | + | else fraction(dI, V, a) | |
502 | + | $Tuple2((dI - dO), dO) | |
524 | 503 | } | |
525 | 504 | ||
526 | 505 | ||
527 | - | func | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
506 | + | func dP (dQ,dR,O,P) = { | |
507 | + | let dS = (P == unit) | |
508 | + | let dT = bo(aL(aS)) | |
509 | + | let dU = bo(aL(aT)) | |
510 | + | let dV = if ((dR == aS)) | |
532 | 511 | then true | |
533 | - | else if (( | |
512 | + | else if ((dR == aT)) | |
534 | 513 | then false | |
535 | - | else | |
536 | - | let | |
537 | - | then $Tuple2( | |
538 | - | else if ( | |
539 | - | then $Tuple2(( | |
540 | - | else $Tuple2( | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | then $Tuple2( | |
545 | - | else $Tuple2(0, | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | then | |
559 | - | else | |
560 | - | let | |
561 | - | let | |
562 | - | let | |
514 | + | else aw("invalid asset") | |
515 | + | let dW = if (dS) | |
516 | + | then $Tuple2(dT, dU) | |
517 | + | else if (dV) | |
518 | + | then $Tuple2((dT - dQ), dU) | |
519 | + | else $Tuple2(dT, (dU - dQ)) | |
520 | + | let dX = dW._1 | |
521 | + | let dY = dW._2 | |
522 | + | let dZ = if (dV) | |
523 | + | then $Tuple2(dQ, 0) | |
524 | + | else $Tuple2(0, dQ) | |
525 | + | let ea = dZ._1 | |
526 | + | let eb = dZ._2 | |
527 | + | let dj = dN(ea, aB)._1 | |
528 | + | let dk = dN(eb, aB)._1 | |
529 | + | let ec = dN(dQ, aB) | |
530 | + | let ed = ec._1 | |
531 | + | let dO = ec._2 | |
532 | + | let ee = (dX + dj) | |
533 | + | let ef = (dY + dk) | |
534 | + | let eg = bq(w(ef, aV), w(ee, aU)) | |
535 | + | let eh = A(eg, a) | |
536 | + | let ei = if (dV) | |
537 | + | then dX | |
538 | + | else dY | |
539 | + | let ej = toBigInt(ei) | |
540 | + | let ek = toBigInt(valueOrErrorMessage(assetInfo(aR), (("asset " + toBase58String(aR)) + " doesn't exist")).quantity) | |
541 | + | let el = if ((ek > d)) | |
563 | 542 | then true | |
564 | - | else | |
565 | - | if (( | |
543 | + | else aw("initial deposit requires all coins") | |
544 | + | if ((el == el)) | |
566 | 545 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
546 | + | let em = toBigInt(ed) | |
547 | + | let en = max([0, toInt(((ek * (sqrtBigInt((b + ((em * b) / ej)), 18, 18, DOWN) - b)) / b))]) | |
548 | + | let cM = if (dS) | |
570 | 549 | then nil | |
571 | - | else [IntegerEntry( | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | then $Tuple2( | |
577 | - | else $Tuple2( | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | fraction(( | |
550 | + | else [IntegerEntry(J(), eh), IntegerEntry(K(height, lastBlock.timestamp), eh), StringEntry(N(toString(value(O)), toBase58String(value(P))), aZ(ea, eb, en, eh, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
551 | + | let eo = bq(w(dY, aV), w(dX, aU)) | |
552 | + | let ep = A(eo, a) | |
553 | + | let eq = { | |
554 | + | let er = if (dV) | |
555 | + | then $Tuple2(ea, dX) | |
556 | + | else $Tuple2(eb, dY) | |
557 | + | let dI = er._1 | |
558 | + | let es = er._2 | |
559 | + | let et = toInt(fraction(ek, toBigInt((dI / 2)), toBigInt(es))) | |
560 | + | fraction((en - et), a, et) | |
582 | 561 | } | |
583 | - | $Tuple5( | |
562 | + | $Tuple5(en, cM, dO, eq, dV) | |
584 | 563 | } | |
585 | 564 | else throw("Strict value is not equal to itself.") | |
586 | 565 | } | |
587 | 566 | ||
588 | 567 | ||
589 | - | func | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
568 | + | func eu (ev,ed,dR,O,P) = { | |
569 | + | let dS = (P == unit) | |
570 | + | let bD = aG() | |
571 | + | let bE = parseIntValue(bD[q]) | |
572 | + | let bF = parseIntValue(bD[r]) | |
573 | + | let ew = [if ((dR == aR)) | |
595 | 574 | then true | |
596 | - | else | |
597 | - | if (( | |
575 | + | else aw("invalid lp asset")] | |
576 | + | if ((ew == ew)) | |
598 | 577 | then { | |
599 | - | let | |
578 | + | let ex = if ((ev == aS)) | |
600 | 579 | then true | |
601 | - | else if (( | |
580 | + | else if ((ev == aT)) | |
602 | 581 | then false | |
603 | - | else | |
604 | - | let | |
605 | - | then toBigInt( | |
606 | - | else toBigInt( | |
607 | - | let | |
608 | - | then | |
609 | - | else | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | then | |
614 | - | else | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | let | |
623 | - | then $Tuple4( | |
624 | - | else $Tuple4(0, | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
582 | + | else aw("invalid asset") | |
583 | + | let ey = if (ex) | |
584 | + | then toBigInt(bo(aL(aS))) | |
585 | + | else toBigInt(bo(aL(aT))) | |
586 | + | let ez = if (ex) | |
587 | + | then bE | |
588 | + | else bF | |
589 | + | let eA = bo(aL(aS)) | |
590 | + | let eB = bo(aL(aT)) | |
591 | + | let eC = if (ex) | |
592 | + | then eA | |
593 | + | else eB | |
594 | + | let eD = toBigInt(eC) | |
595 | + | let ek = toBigInt(valueOrErrorMessage(assetInfo(aR), (("asset " + toBase58String(aR)) + " doesn't exist")).quantity) | |
596 | + | let eE = toBigInt(ed) | |
597 | + | let eF = max([0, toInt(((ey * (b - pow((b - ((eE * b) / ek)), 18, f, 0, 18, DOWN))) / b))]) | |
598 | + | let eG = dN(eF, aD) | |
599 | + | let eH = eG._1 | |
600 | + | let dO = eG._2 | |
601 | + | let eI = if (ex) | |
602 | + | then $Tuple4(eH, 0, (eA - eF), eB) | |
603 | + | else $Tuple4(0, eH, eA, (eB - eF)) | |
604 | + | let eJ = eI._1 | |
605 | + | let eK = eI._2 | |
606 | + | let eL = eI._3 | |
607 | + | let eM = eI._4 | |
608 | + | let eg = bq(w(eM, aV), w(eL, aU)) | |
609 | + | let eh = A(eg, a) | |
610 | + | let cM = if (dS) | |
632 | 611 | then nil | |
633 | - | else [StringEntry( | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | fraction(( | |
612 | + | else [StringEntry(Q(toString(value(O)), toBase58String(value(P))), bk(eJ, eK, ed, eh, height, lastBlock.timestamp)), IntegerEntry(J(), eh), IntegerEntry(K(height, lastBlock.timestamp), eh)] | |
613 | + | let eo = bq(w(eB, aV), w(eA, aU)) | |
614 | + | let ep = A(eo, a) | |
615 | + | let eq = { | |
616 | + | let eN = (toInt(fraction(ey, eE, ek)) * 2) | |
617 | + | fraction((eH - eN), a, eN) | |
639 | 618 | } | |
640 | - | $Tuple5( | |
619 | + | $Tuple5(eH, cM, dO, eq, ex) | |
641 | 620 | } | |
642 | 621 | else throw("Strict value is not equal to itself.") | |
643 | 622 | } | |
644 | 623 | ||
645 | 624 | ||
646 | - | func | |
647 | - | let | |
648 | - | if ($isInstanceOf( | |
625 | + | func eO () = { | |
626 | + | let dL = getString(H()) | |
627 | + | if ($isInstanceOf(dL, "String")) | |
649 | 628 | then { | |
650 | - | let | |
651 | - | fromBase58String( | |
629 | + | let eP = dL | |
630 | + | fromBase58String(eP) | |
652 | 631 | } | |
653 | - | else if ($isInstanceOf( | |
632 | + | else if ($isInstanceOf(dL, "Unit")) | |
654 | 633 | then unit | |
655 | 634 | else throw("Match error") | |
656 | 635 | } | |
657 | 636 | ||
658 | 637 | ||
659 | - | func | |
660 | - | let | |
661 | - | if ($isInstanceOf( | |
638 | + | func eQ () = { | |
639 | + | let dL = getString(I()) | |
640 | + | if ($isInstanceOf(dL, "String")) | |
662 | 641 | then { | |
663 | - | let | |
664 | - | fromBase58String( | |
642 | + | let eP = dL | |
643 | + | fromBase58String(eP) | |
665 | 644 | } | |
666 | - | else if ($isInstanceOf( | |
645 | + | else if ($isInstanceOf(dL, "Unit")) | |
667 | 646 | then unit | |
668 | 647 | else throw("Match error") | |
669 | 648 | } | |
670 | 649 | ||
671 | 650 | ||
672 | - | func | |
673 | - | let | |
674 | - | if ($isInstanceOf( | |
651 | + | func eR (dA) = { | |
652 | + | let dL = eO() | |
653 | + | if ($isInstanceOf(dL, "ByteVector")) | |
675 | 654 | then { | |
676 | - | let | |
677 | - | ( | |
655 | + | let eS = dL | |
656 | + | (dA.callerPublicKey == eS) | |
678 | 657 | } | |
679 | - | else if ($isInstanceOf( | |
680 | - | then ( | |
658 | + | else if ($isInstanceOf(dL, "Unit")) | |
659 | + | then (dA.caller == this) | |
681 | 660 | else throw("Match error") | |
682 | 661 | } | |
683 | 662 | ||
684 | 663 | ||
685 | - | func | |
686 | - | let | |
687 | - | let | |
688 | - | if ($isInstanceOf( | |
664 | + | func eT (dA) = { | |
665 | + | let eU = throw("Permission denied") | |
666 | + | let dL = eO() | |
667 | + | if ($isInstanceOf(dL, "ByteVector")) | |
689 | 668 | then { | |
690 | - | let | |
691 | - | if (( | |
669 | + | let eS = dL | |
670 | + | if ((dA.callerPublicKey == eS)) | |
692 | 671 | then true | |
693 | - | else | |
672 | + | else eU | |
694 | 673 | } | |
695 | - | else if ($isInstanceOf( | |
696 | - | then if (( | |
674 | + | else if ($isInstanceOf(dL, "Unit")) | |
675 | + | then if ((dA.caller == this)) | |
697 | 676 | then true | |
698 | - | else | |
677 | + | else eU | |
699 | 678 | else throw("Match error") | |
700 | 679 | } | |
701 | 680 | ||
702 | 681 | ||
703 | - | @Callable( | |
704 | - | func setManager ( | |
705 | - | let | |
706 | - | if (( | |
682 | + | @Callable(dA) | |
683 | + | func setManager (eV) = { | |
684 | + | let eW = eT(dA) | |
685 | + | if ((eW == eW)) | |
707 | 686 | then { | |
708 | - | let | |
709 | - | if (( | |
710 | - | then [StringEntry( | |
687 | + | let eX = fromBase58String(eV) | |
688 | + | if ((eX == eX)) | |
689 | + | then [StringEntry(I(), eV)] | |
711 | 690 | else throw("Strict value is not equal to itself.") | |
712 | 691 | } | |
713 | 692 | else throw("Strict value is not equal to itself.") | |
714 | 693 | } | |
715 | 694 | ||
716 | 695 | ||
717 | 696 | ||
718 | - | @Callable( | |
697 | + | @Callable(dA) | |
719 | 698 | func confirmManager () = { | |
720 | - | let | |
721 | - | let | |
699 | + | let eY = eQ() | |
700 | + | let eZ = if (isDefined(eY)) | |
722 | 701 | then true | |
723 | 702 | else throw("No pending manager") | |
724 | - | if (( | |
703 | + | if ((eZ == eZ)) | |
725 | 704 | then { | |
726 | - | let | |
705 | + | let fa = if ((dA.callerPublicKey == value(eY))) | |
727 | 706 | then true | |
728 | 707 | else throw("You are not pending manager") | |
729 | - | if (( | |
730 | - | then [StringEntry( | |
708 | + | if ((fa == fa)) | |
709 | + | then [StringEntry(H(), toBase58String(value(eY))), DeleteEntry(I())] | |
731 | 710 | else throw("Strict value is not equal to itself.") | |
732 | 711 | } | |
733 | 712 | else throw("Strict value is not equal to itself.") | |
734 | 713 | } | |
735 | 714 | ||
736 | 715 | ||
737 | 716 | ||
738 | - | @Callable( | |
739 | - | func put ( | |
717 | + | @Callable(dA) | |
718 | + | func put (ch,fb) = if ((0 > ch)) | |
740 | 719 | then throw("Invalid slippageTolerance passed") | |
741 | 720 | else { | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | if (( | |
721 | + | let dG = dD(dA, ch, true) | |
722 | + | let cJ = dG._2 | |
723 | + | let bO = dG._7 | |
724 | + | let cf = dG._9 | |
725 | + | let cK = dG._10 | |
726 | + | let cL = dG._11 | |
727 | + | let fc = dG._12 | |
728 | + | let fd = dG._13 | |
729 | + | let dE = toBigInt(value(dA.payments[0]).amount) | |
730 | + | let dF = toBigInt(value(dA.payments[1]).amount) | |
731 | + | let da = cT(dE, dF, toBigInt(0)) | |
732 | + | if ((da == da)) | |
754 | 733 | then { | |
755 | - | let | |
756 | - | if (( | |
734 | + | let dJ = invoke(az, "emit", [cJ], nil) | |
735 | + | if ((dJ == dJ)) | |
757 | 736 | then { | |
758 | - | let | |
759 | - | let | |
760 | - | if ($isInstanceOf( | |
737 | + | let dK = { | |
738 | + | let dL = dJ | |
739 | + | if ($isInstanceOf(dL, "Address")) | |
761 | 740 | then { | |
762 | - | let | |
763 | - | invoke( | |
741 | + | let dM = dL | |
742 | + | invoke(dM, "emit", [cJ], nil) | |
764 | 743 | } | |
765 | 744 | else unit | |
766 | 745 | } | |
767 | - | if (( | |
746 | + | if ((dK == dK)) | |
768 | 747 | then { | |
769 | - | let | |
770 | - | then invoke( | |
748 | + | let fe = if ((cK > 0)) | |
749 | + | then invoke(aY, "put", nil, [AttachedPayment(fc, cK)]) | |
771 | 750 | else nil | |
772 | - | if (( | |
751 | + | if ((fe == fe)) | |
773 | 752 | then { | |
774 | - | let | |
775 | - | then invoke( | |
753 | + | let ff = if ((cL > 0)) | |
754 | + | then invoke(aY, "put", nil, [AttachedPayment(fd, cL)]) | |
776 | 755 | else nil | |
777 | - | if (( | |
756 | + | if ((ff == ff)) | |
778 | 757 | then { | |
779 | - | let | |
758 | + | let fg = if (fb) | |
780 | 759 | then { | |
781 | - | let | |
782 | - | if (( | |
760 | + | let fh = invoke(aX, "stake", nil, [AttachedPayment(bO, cJ)]) | |
761 | + | if ((fh == fh)) | |
783 | 762 | then nil | |
784 | 763 | else throw("Strict value is not equal to itself.") | |
785 | 764 | } | |
786 | - | else [ScriptTransfer( | |
787 | - | let | |
788 | - | if (( | |
765 | + | else [ScriptTransfer(dA.caller, cJ, bO)] | |
766 | + | let fi = db(0, 0, 0) | |
767 | + | if ((fi == fi)) | |
789 | 768 | then { | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | if (( | |
794 | - | then (( | |
769 | + | let cS = fi._2 | |
770 | + | let fj = fi._1 | |
771 | + | let fk = df(da, cS) | |
772 | + | if ((fk == fk)) | |
773 | + | then ((cf ++ fg) ++ fj) | |
795 | 774 | else throw("Strict value is not equal to itself.") | |
796 | 775 | } | |
797 | 776 | else throw("Strict value is not equal to itself.") | |
798 | 777 | } | |
799 | 778 | else throw("Strict value is not equal to itself.") | |
800 | 779 | } | |
801 | 780 | else throw("Strict value is not equal to itself.") | |
802 | 781 | } | |
803 | 782 | else throw("Strict value is not equal to itself.") | |
804 | 783 | } | |
805 | 784 | else throw("Strict value is not equal to itself.") | |
806 | 785 | } | |
807 | 786 | else throw("Strict value is not equal to itself.") | |
808 | 787 | } | |
809 | 788 | ||
810 | 789 | ||
811 | 790 | ||
812 | - | @Callable( | |
813 | - | func putForFree ( | |
791 | + | @Callable(dA) | |
792 | + | func putForFree (fl) = if ((0 > fl)) | |
814 | 793 | then throw("Invalid value passed") | |
815 | 794 | else { | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let | |
821 | - | if (( | |
795 | + | let dG = dD(dA, fl, false) | |
796 | + | let cf = dG._9 | |
797 | + | let dE = toBigInt(value(dA.payments[0]).amount) | |
798 | + | let dF = toBigInt(value(dA.payments[1]).amount) | |
799 | + | let da = cT(dE, dF, toBigInt(0)) | |
800 | + | if ((da == da)) | |
822 | 801 | then { | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | if (( | |
828 | - | then ( | |
802 | + | let fm = db(0, 0, 0) | |
803 | + | let fj = fm._1 | |
804 | + | let cS = fm._2 | |
805 | + | let fk = df(da, cS) | |
806 | + | if ((fk == fk)) | |
807 | + | then (cf ++ fj) | |
829 | 808 | else throw("Strict value is not equal to itself.") | |
830 | 809 | } | |
831 | 810 | else throw("Strict value is not equal to itself.") | |
832 | 811 | } | |
833 | 812 | ||
834 | 813 | ||
835 | 814 | ||
836 | - | @Callable( | |
837 | - | func putOneTkn ( | |
838 | - | let | |
839 | - | let | |
840 | - | if ($isInstanceOf( | |
841 | - | then | |
842 | - | else throw(($getType( | |
815 | + | @Callable(dA) | |
816 | + | func putOneTkn (fn,fo) = { | |
817 | + | let fp = { | |
818 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
819 | + | if ($isInstanceOf(aC, "Boolean")) | |
820 | + | then aC | |
821 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
843 | 822 | } | |
844 | - | let | |
823 | + | let fq = if (if (if (aE()) | |
845 | 824 | then true | |
846 | - | else ( | |
825 | + | else (aQ == i)) | |
847 | 826 | then true | |
848 | - | else ( | |
827 | + | else (aQ == k)) | |
849 | 828 | then true | |
850 | - | else | |
851 | - | let | |
829 | + | else fp | |
830 | + | let ew = [if (if (!(fq)) | |
852 | 831 | then true | |
853 | - | else | |
832 | + | else eR(dA)) | |
854 | 833 | then true | |
855 | - | else | |
834 | + | else aw("put operation is blocked by admin"), if ((size(dA.payments) == 1)) | |
856 | 835 | then true | |
857 | - | else | |
858 | - | if (( | |
836 | + | else aw("exactly 1 payment are expected")] | |
837 | + | if ((ew == ew)) | |
859 | 838 | then { | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | then | |
865 | - | else if (( | |
866 | - | then | |
867 | - | else | |
868 | - | if (( | |
839 | + | let fr = dA.payments[0] | |
840 | + | let dR = fr.assetId | |
841 | + | let dQ = fr.amount | |
842 | + | let da = if ((dR == aS)) | |
843 | + | then cT(toBigInt(dQ), toBigInt(0), toBigInt(0)) | |
844 | + | else if ((dR == aT)) | |
845 | + | then cT(toBigInt(0), toBigInt(dQ), toBigInt(0)) | |
846 | + | else aw("payment asset is not supported") | |
847 | + | if ((da == da)) | |
869 | 848 | then { | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
873 | - | if (( | |
849 | + | let O = dA.caller | |
850 | + | let P = dA.transactionId | |
851 | + | let fs = dP(dQ, dR, O, P) | |
852 | + | if ((fs == fs)) | |
874 | 853 | then { | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | then ( | |
854 | + | let dV = fs._5 | |
855 | + | let ft = fs._4 | |
856 | + | let dO = fs._3 | |
857 | + | let cM = fs._2 | |
858 | + | let fu = fs._1 | |
859 | + | let fv = if (if ((fn > 0)) | |
860 | + | then (fn > fu) | |
882 | 861 | else false) | |
883 | - | then | |
884 | - | else | |
885 | - | let | |
886 | - | if (( | |
862 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
863 | + | else fu | |
864 | + | let dJ = dH(fv) | |
865 | + | if ((dJ == dJ)) | |
887 | 866 | then { | |
888 | - | let | |
867 | + | let fg = if (fo) | |
889 | 868 | then { | |
890 | - | let | |
891 | - | if (( | |
869 | + | let fw = invoke(aX, "stake", nil, [AttachedPayment(aR, fv)]) | |
870 | + | if ((fw == fw)) | |
892 | 871 | then nil | |
893 | 872 | else throw("Strict value is not equal to itself.") | |
894 | 873 | } | |
895 | - | else [ScriptTransfer( | |
896 | - | let | |
897 | - | then [ScriptTransfer( | |
874 | + | else [ScriptTransfer(dA.caller, fv, aR)] | |
875 | + | let fx = if ((dO > 0)) | |
876 | + | then [ScriptTransfer(aA, dO, dR)] | |
898 | 877 | else nil | |
899 | - | let | |
878 | + | let fy = if ((this == aA)) | |
900 | 879 | then $Tuple2(0, 0) | |
901 | - | else if ( | |
902 | - | then $Tuple2(-( | |
903 | - | else $Tuple2(0, -( | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | if (( | |
912 | - | then $Tuple2(((( | |
880 | + | else if (dV) | |
881 | + | then $Tuple2(-(dO), 0) | |
882 | + | else $Tuple2(0, -(dO)) | |
883 | + | let dc = fy._1 | |
884 | + | let dd = fy._2 | |
885 | + | let fz = db(dc, dd, 0) | |
886 | + | let fj = fz._1 | |
887 | + | let cS = fz._2 | |
888 | + | let dm = value(getString(W)) | |
889 | + | let fk = df(da, cS) | |
890 | + | if ((fk == fk)) | |
891 | + | then $Tuple2((((cM ++ fg) ++ fx) ++ fj), fv) | |
913 | 892 | else throw("Strict value is not equal to itself.") | |
914 | 893 | } | |
915 | 894 | else throw("Strict value is not equal to itself.") | |
916 | 895 | } | |
917 | 896 | else throw("Strict value is not equal to itself.") | |
918 | 897 | } | |
919 | 898 | else throw("Strict value is not equal to itself.") | |
920 | 899 | } | |
921 | 900 | else throw("Strict value is not equal to itself.") | |
922 | 901 | } | |
923 | 902 | ||
924 | 903 | ||
925 | 904 | ||
926 | - | @Callable( | |
927 | - | func putOneTknREADONLY ( | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | $Tuple2(nil, $Tuple3( | |
905 | + | @Callable(dA) | |
906 | + | func putOneTknREADONLY (dR,dQ) = { | |
907 | + | let fA = dP(dQ, aJ(dR), unit, unit) | |
908 | + | let fu = fA._1 | |
909 | + | let cM = fA._2 | |
910 | + | let dO = fA._3 | |
911 | + | let ft = fA._4 | |
912 | + | let dV = fA._5 | |
913 | + | $Tuple2(nil, $Tuple3(fu, dO, ft)) | |
935 | 914 | } | |
936 | 915 | ||
937 | 916 | ||
938 | 917 | ||
939 | - | @Callable( | |
940 | - | func getOneTkn ( | |
941 | - | let | |
942 | - | let | |
943 | - | if ($isInstanceOf( | |
944 | - | then | |
945 | - | else throw(($getType( | |
918 | + | @Callable(dA) | |
919 | + | func getOneTkn (fB,fn) = { | |
920 | + | let fp = { | |
921 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
922 | + | if ($isInstanceOf(aC, "Boolean")) | |
923 | + | then aC | |
924 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
946 | 925 | } | |
947 | - | let | |
926 | + | let fC = if (if (aE()) | |
948 | 927 | then true | |
949 | - | else ( | |
928 | + | else (aQ == k)) | |
950 | 929 | then true | |
951 | - | else | |
952 | - | let | |
930 | + | else fp | |
931 | + | let ew = [if (if (!(fC)) | |
953 | 932 | then true | |
954 | - | else | |
933 | + | else eR(dA)) | |
955 | 934 | then true | |
956 | - | else | |
935 | + | else aw("get operation is blocked by admin"), if ((size(dA.payments) == 1)) | |
957 | 936 | then true | |
958 | - | else | |
959 | - | if (( | |
937 | + | else aw("exactly 1 payment are expected")] | |
938 | + | if ((ew == ew)) | |
960 | 939 | then { | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | if (( | |
940 | + | let ev = aJ(fB) | |
941 | + | let fr = dA.payments[0] | |
942 | + | let dR = fr.assetId | |
943 | + | let ed = fr.amount | |
944 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
945 | + | if ((da == da)) | |
967 | 946 | then { | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | if (( | |
947 | + | let O = dA.caller | |
948 | + | let P = dA.transactionId | |
949 | + | let fD = eu(ev, ed, dR, O, P) | |
950 | + | if ((fD == fD)) | |
972 | 951 | then { | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | then ( | |
952 | + | let ex = fD._5 | |
953 | + | let ft = fD._4 | |
954 | + | let dO = fD._3 | |
955 | + | let cM = fD._2 | |
956 | + | let fE = fD._1 | |
957 | + | let dI = if (if ((fn > 0)) | |
958 | + | then (fn > fE) | |
980 | 959 | else false) | |
981 | - | then | |
982 | - | else | |
983 | - | let | |
984 | - | if (( | |
960 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
961 | + | else fE | |
962 | + | let fF = invoke(az, "burn", [ed], [AttachedPayment(dR, ed)]) | |
963 | + | if ((fF == fF)) | |
985 | 964 | then { | |
986 | - | let | |
987 | - | let | |
988 | - | then [ScriptTransfer( | |
965 | + | let fG = [ScriptTransfer(O, dI, ev)] | |
966 | + | let fx = if ((dO > 0)) | |
967 | + | then [ScriptTransfer(aA, dO, ev)] | |
989 | 968 | else nil | |
990 | - | let | |
991 | - | let | |
969 | + | let fH = { | |
970 | + | let fI = if ((this == aA)) | |
992 | 971 | then 0 | |
993 | - | else | |
994 | - | if ( | |
995 | - | then $Tuple2(-(( | |
996 | - | else $Tuple2(0, -(( | |
972 | + | else dO | |
973 | + | if (ex) | |
974 | + | then $Tuple2(-((dI + fI)), 0) | |
975 | + | else $Tuple2(0, -((dI + fI))) | |
997 | 976 | } | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | if (( | |
1005 | - | then $Tuple2(((( | |
977 | + | let dc = fH._1 | |
978 | + | let dd = fH._2 | |
979 | + | let fJ = db(dc, dd, 0) | |
980 | + | let fj = fJ._1 | |
981 | + | let cS = fJ._2 | |
982 | + | let fk = df(da, cS) | |
983 | + | if ((fk == fk)) | |
984 | + | then $Tuple2((((cM ++ fG) ++ fx) ++ fj), dI) | |
1006 | 985 | else throw("Strict value is not equal to itself.") | |
1007 | 986 | } | |
1008 | 987 | else throw("Strict value is not equal to itself.") | |
1009 | 988 | } | |
1010 | 989 | else throw("Strict value is not equal to itself.") | |
1011 | 990 | } | |
1012 | 991 | else throw("Strict value is not equal to itself.") | |
1013 | 992 | } | |
1014 | 993 | else throw("Strict value is not equal to itself.") | |
1015 | 994 | } | |
1016 | 995 | ||
1017 | 996 | ||
1018 | 997 | ||
1019 | - | @Callable( | |
1020 | - | func getOneTknREADONLY ( | |
1021 | - | let | |
1022 | - | let | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | $Tuple2(nil, $Tuple3( | |
998 | + | @Callable(dA) | |
999 | + | func getOneTknREADONLY (ev,ed) = { | |
1000 | + | let fK = eu(aJ(ev), ed, aR, unit, unit) | |
1001 | + | let fE = fK._1 | |
1002 | + | let cM = fK._2 | |
1003 | + | let dO = fK._3 | |
1004 | + | let ft = fK._4 | |
1005 | + | let ex = fK._5 | |
1006 | + | $Tuple2(nil, $Tuple3(fE, dO, ft)) | |
1028 | 1007 | } | |
1029 | 1008 | ||
1030 | 1009 | ||
1031 | 1010 | ||
1032 | - | @Callable( | |
1033 | - | func unstakeAndGetOneTkn ( | |
1034 | - | let | |
1035 | - | let | |
1036 | - | if ($isInstanceOf( | |
1037 | - | then | |
1038 | - | else throw(($getType( | |
1011 | + | @Callable(dA) | |
1012 | + | func unstakeAndGetOneTkn (fL,fB,fn) = { | |
1013 | + | let fp = { | |
1014 | + | let aC = invoke(az, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1015 | + | if ($isInstanceOf(aC, "Boolean")) | |
1016 | + | then aC | |
1017 | + | else throw(($getType(aC) + " couldn't be cast to Boolean")) | |
1039 | 1018 | } | |
1040 | - | let | |
1019 | + | let fC = if (if (aE()) | |
1041 | 1020 | then true | |
1042 | - | else ( | |
1021 | + | else (aQ == k)) | |
1043 | 1022 | then true | |
1044 | - | else | |
1045 | - | let | |
1023 | + | else fp | |
1024 | + | let ew = [if (if (!(fC)) | |
1046 | 1025 | then true | |
1047 | - | else | |
1026 | + | else eR(dA)) | |
1048 | 1027 | then true | |
1049 | - | else | |
1028 | + | else aw("get operation is blocked by admin"), if ((size(dA.payments) == 0)) | |
1050 | 1029 | then true | |
1051 | - | else | |
1052 | - | if (( | |
1030 | + | else aw("no payments are expected")] | |
1031 | + | if ((ew == ew)) | |
1053 | 1032 | then { | |
1054 | - | let | |
1055 | - | let | |
1056 | - | let | |
1057 | - | let | |
1058 | - | if (( | |
1033 | + | let ev = aJ(fB) | |
1034 | + | let O = dA.caller | |
1035 | + | let P = dA.transactionId | |
1036 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1037 | + | if ((da == da)) | |
1059 | 1038 | then { | |
1060 | - | let | |
1061 | - | if (( | |
1039 | + | let fM = invoke(aX, "unstake", [toBase58String(aR), fL], nil) | |
1040 | + | if ((fM == fM)) | |
1062 | 1041 | then { | |
1063 | - | let | |
1064 | - | if (( | |
1042 | + | let fN = eu(ev, fL, aR, O, P) | |
1043 | + | if ((fN == fN)) | |
1065 | 1044 | then { | |
1066 | - | let | |
1067 | - | let | |
1068 | - | let | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | then ( | |
1045 | + | let ex = fN._5 | |
1046 | + | let ft = fN._4 | |
1047 | + | let dO = fN._3 | |
1048 | + | let cM = fN._2 | |
1049 | + | let fE = fN._1 | |
1050 | + | let dI = if (if ((fn > 0)) | |
1051 | + | then (fn > fE) | |
1073 | 1052 | else false) | |
1074 | - | then | |
1075 | - | else | |
1076 | - | let | |
1077 | - | if (( | |
1053 | + | then aw(makeString(["amount to receive is less than ", toString(fn)], "")) | |
1054 | + | else fE | |
1055 | + | let fF = invoke(az, "burn", [fL], [AttachedPayment(aR, fL)]) | |
1056 | + | if ((fF == fF)) | |
1078 | 1057 | then { | |
1079 | - | let | |
1080 | - | let | |
1081 | - | then [ScriptTransfer( | |
1058 | + | let fG = [ScriptTransfer(dA.caller, dI, ev)] | |
1059 | + | let fx = if ((dO > 0)) | |
1060 | + | then [ScriptTransfer(aA, dO, ev)] | |
1082 | 1061 | else nil | |
1083 | - | let | |
1084 | - | let | |
1062 | + | let fO = { | |
1063 | + | let fI = if ((this == aA)) | |
1085 | 1064 | then 0 | |
1086 | - | else | |
1087 | - | if ( | |
1088 | - | then $Tuple2(-(( | |
1089 | - | else $Tuple2(0, -(( | |
1065 | + | else dO | |
1066 | + | if (ex) | |
1067 | + | then $Tuple2(-((dI + fI)), 0) | |
1068 | + | else $Tuple2(0, -((dI + fI))) | |
1090 | 1069 | } | |
1091 | - | let | |
1092 | - | let | |
1093 | - | let | |
1094 | - | let | |
1095 | - | let | |
1096 | - | let | |
1097 | - | if (( | |
1098 | - | then $Tuple2(((( | |
1070 | + | let dc = fO._1 | |
1071 | + | let dd = fO._2 | |
1072 | + | let fP = db(dc, dd, 0) | |
1073 | + | let fj = fP._1 | |
1074 | + | let cS = fP._2 | |
1075 | + | let fk = df(da, cS) | |
1076 | + | if ((fk == fk)) | |
1077 | + | then $Tuple2((((cM ++ fG) ++ fx) ++ fj), dI) | |
1099 | 1078 | else throw("Strict value is not equal to itself.") | |
1100 | 1079 | } | |
1101 | 1080 | else throw("Strict value is not equal to itself.") | |
1102 | 1081 | } | |
1103 | 1082 | else throw("Strict value is not equal to itself.") | |
1104 | 1083 | } | |
1105 | 1084 | else throw("Strict value is not equal to itself.") | |
1106 | 1085 | } | |
1107 | 1086 | else throw("Strict value is not equal to itself.") | |
1108 | 1087 | } | |
1109 | 1088 | else throw("Strict value is not equal to itself.") | |
1110 | 1089 | } | |
1111 | 1090 | ||
1112 | 1091 | ||
1113 | 1092 | ||
1114 | - | @Callable( | |
1093 | + | @Callable(dA) | |
1115 | 1094 | func get () = { | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | let | |
1122 | - | let | |
1123 | - | if (( | |
1095 | + | let cx = dz(dA) | |
1096 | + | let fQ = cx._1 | |
1097 | + | let ce = cx._2 | |
1098 | + | let dC = cx._3 | |
1099 | + | let bM = cx._4 | |
1100 | + | let cf = cx._5 | |
1101 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1102 | + | if ((da == da)) | |
1124 | 1103 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1104 | + | let fR = invoke(az, "burn", [dC], [AttachedPayment(bM, dC)]) | |
1105 | + | if ((fR == fR)) | |
1127 | 1106 | then { | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | if (( | |
1133 | - | then ( | |
1107 | + | let fS = db(-(fQ), -(ce), 0) | |
1108 | + | let fj = fS._1 | |
1109 | + | let cS = fS._2 | |
1110 | + | let fk = df(da, cS) | |
1111 | + | if ((fk == fk)) | |
1112 | + | then (cf ++ fj) | |
1134 | 1113 | else throw("Strict value is not equal to itself.") | |
1135 | 1114 | } | |
1136 | 1115 | else throw("Strict value is not equal to itself.") | |
1137 | 1116 | } | |
1138 | 1117 | else throw("Strict value is not equal to itself.") | |
1139 | 1118 | } | |
1140 | 1119 | ||
1141 | 1120 | ||
1142 | 1121 | ||
1143 | - | @Callable( | |
1144 | - | func getNoLess ( | |
1145 | - | let | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1150 | - | let | |
1151 | - | if (( | |
1152 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1153 | - | else if (( | |
1154 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1122 | + | @Callable(dA) | |
1123 | + | func getNoLess (fT,fU) = { | |
1124 | + | let cx = dz(dA) | |
1125 | + | let cd = cx._1 | |
1126 | + | let ce = cx._2 | |
1127 | + | let dC = cx._3 | |
1128 | + | let bM = cx._4 | |
1129 | + | let cf = cx._5 | |
1130 | + | if ((fT > cd)) | |
1131 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cd)) + " < ") + toString(fT))) | |
1132 | + | else if ((fU > ce)) | |
1133 | + | then throw(((("noLessThenPriceAsset failed: " + toString(ce)) + " < ") + toString(fU))) | |
1155 | 1134 | else { | |
1156 | - | let | |
1157 | - | if (( | |
1135 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1136 | + | if ((da == da)) | |
1158 | 1137 | then { | |
1159 | - | let | |
1160 | - | if (( | |
1138 | + | let fR = invoke(az, "burn", [dC], [AttachedPayment(bM, dC)]) | |
1139 | + | if ((fR == fR)) | |
1161 | 1140 | then { | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | let | |
1166 | - | if (( | |
1167 | - | then ( | |
1141 | + | let fV = db(-(cd), -(ce), 0) | |
1142 | + | let fj = fV._1 | |
1143 | + | let cS = fV._2 | |
1144 | + | let fk = df(da, cS) | |
1145 | + | if ((fk == fk)) | |
1146 | + | then (cf ++ fj) | |
1168 | 1147 | else throw("Strict value is not equal to itself.") | |
1169 | 1148 | } | |
1170 | 1149 | else throw("Strict value is not equal to itself.") | |
1171 | 1150 | } | |
1172 | 1151 | else throw("Strict value is not equal to itself.") | |
1173 | 1152 | } | |
1174 | 1153 | } | |
1175 | 1154 | ||
1176 | 1155 | ||
1177 | 1156 | ||
1178 | - | @Callable( | |
1179 | - | func unstakeAndGet ( | |
1180 | - | let | |
1157 | + | @Callable(dA) | |
1158 | + | func unstakeAndGet (dI) = { | |
1159 | + | let fW = if ((size(dA.payments) != 0)) | |
1181 | 1160 | then throw("No payments are expected") | |
1182 | 1161 | else true | |
1183 | - | if (( | |
1162 | + | if ((fW == fW)) | |
1184 | 1163 | then { | |
1185 | - | let | |
1186 | - | let | |
1187 | - | let | |
1188 | - | if (( | |
1164 | + | let bD = aG() | |
1165 | + | let bO = fromBase58String(bD[n]) | |
1166 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1167 | + | if ((da == da)) | |
1189 | 1168 | then { | |
1190 | - | let | |
1191 | - | if (( | |
1169 | + | let fM = invoke(aX, "unstake", [toBase58String(bO), dI], nil) | |
1170 | + | if ((fM == fM)) | |
1192 | 1171 | then { | |
1193 | - | let | |
1194 | - | let | |
1195 | - | let | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1172 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(bO), dI, dA.caller) | |
1173 | + | let cd = cx._1 | |
1174 | + | let ce = cx._2 | |
1175 | + | let bR = parseIntValue(cx._9) | |
1176 | + | let cf = cx._10 | |
1177 | + | let fX = if (if (aE()) | |
1199 | 1178 | then true | |
1200 | - | else ( | |
1201 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1179 | + | else (bR == k)) | |
1180 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bR))) | |
1202 | 1181 | else true | |
1203 | - | if (( | |
1182 | + | if ((fX == fX)) | |
1204 | 1183 | then { | |
1205 | - | let | |
1206 | - | if (( | |
1184 | + | let fR = invoke(az, "burn", [dI], [AttachedPayment(bO, dI)]) | |
1185 | + | if ((fR == fR)) | |
1207 | 1186 | then { | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | let | |
1212 | - | if (( | |
1213 | - | then ( | |
1187 | + | let fY = db(-(cd), -(ce), 0) | |
1188 | + | let fj = fY._1 | |
1189 | + | let cS = fY._2 | |
1190 | + | let fk = df(da, cS) | |
1191 | + | if ((fk == fk)) | |
1192 | + | then (cf ++ fj) | |
1214 | 1193 | else throw("Strict value is not equal to itself.") | |
1215 | 1194 | } | |
1216 | 1195 | else throw("Strict value is not equal to itself.") | |
1217 | 1196 | } | |
1218 | 1197 | else throw("Strict value is not equal to itself.") | |
1219 | 1198 | } | |
1220 | 1199 | else throw("Strict value is not equal to itself.") | |
1221 | 1200 | } | |
1222 | 1201 | else throw("Strict value is not equal to itself.") | |
1223 | 1202 | } | |
1224 | 1203 | else throw("Strict value is not equal to itself.") | |
1225 | 1204 | } | |
1226 | 1205 | ||
1227 | 1206 | ||
1228 | 1207 | ||
1229 | - | @Callable( | |
1230 | - | func unstakeAndGetNoLess ( | |
1231 | - | let | |
1208 | + | @Callable(dA) | |
1209 | + | func unstakeAndGetNoLess (fL,fZ,fU) = { | |
1210 | + | let fC = if (aE()) | |
1232 | 1211 | then true | |
1233 | - | else ( | |
1234 | - | let | |
1212 | + | else (aQ == k) | |
1213 | + | let ew = [if (!(fC)) | |
1235 | 1214 | then true | |
1236 | - | else throw("get operation is blocked by admin"), if ((size( | |
1215 | + | else throw("get operation is blocked by admin"), if ((size(dA.payments) == 0)) | |
1237 | 1216 | then true | |
1238 | 1217 | else throw("no payments are expected")] | |
1239 | - | if (( | |
1218 | + | if ((ew == ew)) | |
1240 | 1219 | then { | |
1241 | - | let | |
1242 | - | if (( | |
1220 | + | let da = cT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1221 | + | if ((da == da)) | |
1243 | 1222 | then { | |
1244 | - | let | |
1245 | - | if (( | |
1223 | + | let fM = invoke(aX, "unstake", [toBase58String(aR), fL], nil) | |
1224 | + | if ((fM == fM)) | |
1246 | 1225 | then { | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | let | |
1251 | - | let | |
1226 | + | let cx = bK(toBase58String(dA.transactionId), toBase58String(aR), fL, dA.caller) | |
1227 | + | let cd = cx._1 | |
1228 | + | let ce = cx._2 | |
1229 | + | let cf = cx._10 | |
1230 | + | let ga = [if ((cd >= fZ)) | |
1252 | 1231 | then true | |
1253 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1232 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fZ)], "")), if ((ce >= fU)) | |
1254 | 1233 | then true | |
1255 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1256 | - | if (( | |
1234 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fU)], ""))] | |
1235 | + | if ((ga == ga)) | |
1257 | 1236 | then { | |
1258 | - | let | |
1259 | - | if (( | |
1237 | + | let fR = invoke(az, "burn", [fL], [AttachedPayment(aR, fL)]) | |
1238 | + | if ((fR == fR)) | |
1260 | 1239 | then { | |
1261 | - | let | |
1262 | - | let | |
1263 | - | let | |
1264 | - | let | |
1265 | - | if (( | |
1266 | - | then ( | |
1240 | + | let gb = db(-(cd), -(ce), 0) | |
1241 | + | let fj = gb._1 | |
1242 | + | let cS = gb._2 | |
1243 | + | let fk = df(da, cS) | |
1244 | + | if ((fk == fk)) | |
1245 | + | then (cf ++ fj) | |
1267 | 1246 | else throw("Strict value is not equal to itself.") | |
1268 | 1247 | } | |
1269 | 1248 | else throw("Strict value is not equal to itself.") | |
1270 | 1249 | } | |
1271 | 1250 | else throw("Strict value is not equal to itself.") | |
1272 | 1251 | } | |
1273 | 1252 | else throw("Strict value is not equal to itself.") | |
1274 | 1253 | } | |
1275 | 1254 | else throw("Strict value is not equal to itself.") | |
1276 | 1255 | } | |
1277 | 1256 | else throw("Strict value is not equal to itself.") | |
1278 | 1257 | } | |
1279 | 1258 | ||
1280 | 1259 | ||
1281 | 1260 | ||
1282 | - | @Callable( | |
1283 | - | func activate ( | |
1261 | + | @Callable(dA) | |
1262 | + | func activate (gc,gd) = if ((toString(dA.caller) != toString(az))) | |
1284 | 1263 | then throw("permissions denied") | |
1285 | - | else $Tuple2([StringEntry( | |
1264 | + | else $Tuple2([StringEntry(R(), gc), StringEntry(S(), gd)], "success") | |
1286 | 1265 | ||
1287 | 1266 | ||
1288 | 1267 | ||
1289 | - | @Callable( | |
1268 | + | @Callable(dA) | |
1290 | 1269 | func refreshKLp () = { | |
1291 | - | let | |
1292 | - | let | |
1270 | + | let ge = valueOrElse(getInteger(X), 0) | |
1271 | + | let gf = if (((height - ge) >= aa)) | |
1293 | 1272 | then unit | |
1294 | - | else | |
1295 | - | if (( | |
1273 | + | else aw(makeString([toString(aa), " blocks have not passed since the previous call"], "")) | |
1274 | + | if ((gf == gf)) | |
1296 | 1275 | then { | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | let | |
1302 | - | then | |
1303 | - | else | |
1304 | - | $Tuple2( | |
1276 | + | let dm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, W), "0")), ay("invalid kLp")) | |
1277 | + | let gg = db(0, 0, 0) | |
1278 | + | let gh = gg._1 | |
1279 | + | let cS = gg._2 | |
1280 | + | let de = if ((dm != cS)) | |
1281 | + | then gh | |
1282 | + | else aw("nothing to refresh") | |
1283 | + | $Tuple2(de, toString(cS)) | |
1305 | 1284 | } | |
1306 | 1285 | else throw("Strict value is not equal to itself.") | |
1307 | 1286 | } | |
1308 | 1287 | ||
1309 | 1288 | ||
1310 | 1289 | ||
1311 | - | @Callable( | |
1312 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1290 | + | @Callable(dA) | |
1291 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aG()) | |
1313 | 1292 | ||
1314 | 1293 | ||
1315 | 1294 | ||
1316 | - | @Callable( | |
1317 | - | func getAccBalanceWrapperREADONLY ( | |
1295 | + | @Callable(dA) | |
1296 | + | func getAccBalanceWrapperREADONLY (bp) = $Tuple2(nil, bo(bp)) | |
1318 | 1297 | ||
1319 | 1298 | ||
1320 | 1299 | ||
1321 | - | @Callable( | |
1322 | - | func calcPricesWrapperREADONLY ( | |
1323 | - | let | |
1324 | - | $Tuple2(nil, [toString( | |
1300 | + | @Callable(dA) | |
1301 | + | func calcPricesWrapperREADONLY (bx,by,bC) = { | |
1302 | + | let gi = bB(bx, by, bC) | |
1303 | + | $Tuple2(nil, [toString(gi[0]), toString(gi[1]), toString(gi[2])]) | |
1325 | 1304 | } | |
1326 | 1305 | ||
1327 | 1306 | ||
1328 | 1307 | ||
1329 | - | @Callable( | |
1330 | - | func toX18WrapperREADONLY ( | |
1308 | + | @Callable(dA) | |
1309 | + | func toX18WrapperREADONLY (x,y) = $Tuple2(nil, toString(w(x, y))) | |
1331 | 1310 | ||
1332 | 1311 | ||
1333 | 1312 | ||
1334 | - | @Callable( | |
1335 | - | func fromX18WrapperREADONLY ( | |
1313 | + | @Callable(dA) | |
1314 | + | func fromX18WrapperREADONLY (B,C) = $Tuple2(nil, A(parseBigIntValue(B), C)) | |
1336 | 1315 | ||
1337 | 1316 | ||
1338 | 1317 | ||
1339 | - | @Callable( | |
1340 | - | func calcPriceBigIntWrapperREADONLY ( | |
1318 | + | @Callable(dA) | |
1319 | + | func calcPriceBigIntWrapperREADONLY (br,bs) = $Tuple2(nil, toString(bq(parseBigIntValue(br), parseBigIntValue(bs)))) | |
1341 | 1320 | ||
1342 | 1321 | ||
1343 | 1322 | ||
1344 | - | @Callable( | |
1345 | - | func estimatePutOperationWrapperREADONLY ( | |
1323 | + | @Callable(dA) | |
1324 | + | func estimatePutOperationWrapperREADONLY (bL,ch,ci,cj,ck,cl,O,cm,cn) = $Tuple2(nil, cg(bL, ch, ci, cj, ck, cl, O, cm, cn)) | |
1346 | 1325 | ||
1347 | 1326 | ||
1348 | 1327 | ||
1349 | - | @Callable( | |
1350 | - | func estimateGetOperationWrapperREADONLY ( | |
1351 | - | let | |
1352 | - | $Tuple2(nil, $Tuple10( | |
1328 | + | @Callable(dA) | |
1329 | + | func estimateGetOperationWrapperREADONLY (bL,bM,bN,O) = { | |
1330 | + | let cx = bK(bL, bM, bN, addressFromStringValue(O)) | |
1331 | + | $Tuple2(nil, $Tuple10(cx._1, cx._2, cx._3, cx._4, cx._5, cx._6, cx._7, toString(cx._8), cx._9, cx._10)) | |
1353 | 1332 | } | |
1354 | 1333 | ||
1355 | 1334 | ||
1356 | 1335 | ||
1357 | - | @Callable( | |
1336 | + | @Callable(dA) | |
1358 | 1337 | func statsREADONLY () = { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | let | |
1370 | - | let | |
1371 | - | then [ | |
1372 | - | else | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1338 | + | let bD = aG() | |
1339 | + | let bO = fromBase58String(bD[n]) | |
1340 | + | let gj = bD[o] | |
1341 | + | let gk = bD[p] | |
1342 | + | let cq = bD[s] | |
1343 | + | let cr = bD[t] | |
1344 | + | let bE = parseIntValue(bD[q]) | |
1345 | + | let bF = parseIntValue(bD[r]) | |
1346 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1347 | + | let gm = bo(gj) | |
1348 | + | let gn = bo(gk) | |
1349 | + | let go = if ((gl == 0)) | |
1350 | + | then [c, c, c] | |
1351 | + | else bB(gm, gn, gl) | |
1352 | + | let bY = 0 | |
1353 | + | let gp = A(go[1], a) | |
1354 | + | let gq = A(go[2], a) | |
1355 | + | let gr = value(getInteger(az, aj(toString(this)))) | |
1356 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gm), toString(gn), toString(gl), toString(bY), toString(gp), toString(gq), toString(gr)], h)) | |
1378 | 1357 | } | |
1379 | 1358 | ||
1380 | 1359 | ||
1381 | 1360 | ||
1382 | - | @Callable( | |
1383 | - | func evaluatePutByAmountAssetREADONLY ( | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | let | |
1390 | - | let | |
1391 | - | let | |
1392 | - | let | |
1393 | - | let | |
1394 | - | let | |
1395 | - | let | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | then | |
1400 | - | else | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | let | |
1405 | - | let | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1361 | + | @Callable(dA) | |
1362 | + | func evaluatePutByAmountAssetREADONLY (ci) = { | |
1363 | + | let bD = aG() | |
1364 | + | let bO = fromBase58String(bD[n]) | |
1365 | + | let co = bD[o] | |
1366 | + | let bP = fromBase58String(co) | |
1367 | + | let cp = bD[p] | |
1368 | + | let bQ = fromBase58String(cp) | |
1369 | + | let bE = parseIntValue(bD[q]) | |
1370 | + | let bF = parseIntValue(bD[r]) | |
1371 | + | let bR = bD[m] | |
1372 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1373 | + | let gm = bo(co) | |
1374 | + | let gn = bo(cp) | |
1375 | + | let bz = w(gm, bE) | |
1376 | + | let bA = w(gn, bF) | |
1377 | + | let bX = if ((gl == 0)) | |
1378 | + | then c | |
1379 | + | else bq(bA, bz) | |
1380 | + | let cu = w(ci, bE) | |
1381 | + | let cv = fraction(cu, bX, b) | |
1382 | + | let ck = A(cv, bF) | |
1383 | + | let dG = cg("", 500000, ci, bP, ck, bQ, "", true, false) | |
1384 | + | let cF = dG._1 | |
1385 | + | let gs = dG._3 | |
1386 | + | let bT = dG._4 | |
1387 | + | let bV = dG._5 | |
1388 | + | let bS = dG._6 | |
1389 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cF), toString(A(bX, a)), toString(bT), toString(bV), toString(bS), bR, toString(ci), toString(ck)], h)) | |
1411 | 1390 | } | |
1412 | 1391 | ||
1413 | 1392 | ||
1414 | 1393 | ||
1415 | - | @Callable( | |
1416 | - | func evaluatePutByPriceAssetREADONLY ( | |
1417 | - | let | |
1418 | - | let | |
1419 | - | let | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1431 | - | let | |
1432 | - | then | |
1433 | - | else | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | let | |
1443 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1394 | + | @Callable(dA) | |
1395 | + | func evaluatePutByPriceAssetREADONLY (ck) = { | |
1396 | + | let bD = aG() | |
1397 | + | let bO = fromBase58String(bD[n]) | |
1398 | + | let co = bD[o] | |
1399 | + | let bP = fromBase58String(co) | |
1400 | + | let cp = bD[p] | |
1401 | + | let bQ = fromBase58String(cp) | |
1402 | + | let bE = parseIntValue(bD[q]) | |
1403 | + | let bF = parseIntValue(bD[r]) | |
1404 | + | let bR = bD[m] | |
1405 | + | let gl = valueOrErrorMessage(assetInfo(bO), (("Asset " + toBase58String(bO)) + " doesn't exist")).quantity | |
1406 | + | let gt = bo(co) | |
1407 | + | let gu = bo(cp) | |
1408 | + | let gv = w(gt, bE) | |
1409 | + | let gw = w(gu, bF) | |
1410 | + | let bX = if ((gl == 0)) | |
1411 | + | then c | |
1412 | + | else bq(gw, gv) | |
1413 | + | let cv = w(ck, bF) | |
1414 | + | let cu = fraction(cv, b, bX) | |
1415 | + | let ci = A(cu, bE) | |
1416 | + | let dG = cg("", 500000, ci, bP, ck, bQ, "", true, false) | |
1417 | + | let cF = dG._1 | |
1418 | + | let gs = dG._3 | |
1419 | + | let bT = dG._4 | |
1420 | + | let bV = dG._5 | |
1421 | + | let bS = dG._6 | |
1422 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cF), toString(A(bX, a)), toString(bT), toString(bV), toString(bS), bR, toString(ci), toString(ck)], h)) | |
1444 | 1423 | } | |
1445 | 1424 | ||
1446 | 1425 | ||
1447 | 1426 | ||
1448 | - | @Callable( | |
1449 | - | func evaluateGetREADONLY ( | |
1450 | - | let | |
1451 | - | let | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1427 | + | @Callable(dA) | |
1428 | + | func evaluateGetREADONLY (gx,gy) = { | |
1429 | + | let cx = bK("", gx, gy, this) | |
1430 | + | let cd = cx._1 | |
1431 | + | let ce = cx._2 | |
1432 | + | let bT = cx._5 | |
1433 | + | let bV = cx._6 | |
1434 | + | let bS = cx._7 | |
1435 | + | let bY = cx._8 | |
1436 | + | let bR = parseIntValue(cx._9) | |
1437 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cd), toString(ce), toString(bT), toString(bV), toString(bS), toString(bY), toString(bR)], h)) | |
1459 | 1438 | } | |
1460 | 1439 | ||
1461 | 1440 | ||
1462 | - | @Verifier( | |
1463 | - | func | |
1464 | - | let | |
1465 | - | let | |
1466 | - | if ($isInstanceOf( | |
1441 | + | @Verifier(gz) | |
1442 | + | func gA () = { | |
1443 | + | let gB = { | |
1444 | + | let dL = eO() | |
1445 | + | if ($isInstanceOf(dL, "ByteVector")) | |
1467 | 1446 | then { | |
1468 | - | let | |
1469 | - | | |
1447 | + | let eS = dL | |
1448 | + | eS | |
1470 | 1449 | } | |
1471 | - | else if ($isInstanceOf( | |
1472 | - | then | |
1450 | + | else if ($isInstanceOf(dL, "Unit")) | |
1451 | + | then gz.senderPublicKey | |
1473 | 1452 | else throw("Match error") | |
1474 | 1453 | } | |
1475 | - | let | |
1476 | - | if ($isInstanceOf( | |
1454 | + | let dL = gz | |
1455 | + | if ($isInstanceOf(dL, "Order")) | |
1477 | 1456 | then { | |
1478 | - | let dy = dT | |
1479 | - | let gJ = aS() | |
1480 | - | let aC = dx(dy) | |
1481 | - | let aD = sigVerify(dy.bodyBytes, dy.proofs[0], dy.senderPublicKey) | |
1482 | - | let aE = sigVerify(dy.bodyBytes, dy.proofs[1], gJ) | |
1483 | - | if (if (if (aC) | |
1484 | - | then aD | |
1457 | + | let di = dL | |
1458 | + | let gC = aF() | |
1459 | + | let gD = dh(di) | |
1460 | + | let ao = gD._1 | |
1461 | + | let ap = gD._2 | |
1462 | + | let aq = sigVerify(di.bodyBytes, di.proofs[0], di.senderPublicKey) | |
1463 | + | let ar = sigVerify(di.bodyBytes, di.proofs[1], gC) | |
1464 | + | if (if (if (ao) | |
1465 | + | then aq | |
1485 | 1466 | else false) | |
1486 | - | then | |
1467 | + | then ar | |
1487 | 1468 | else false) | |
1488 | 1469 | then true | |
1489 | - | else | |
1470 | + | else an(ao, ap, aq, ar) | |
1490 | 1471 | } | |
1491 | - | else if ($isInstanceOf( | |
1472 | + | else if ($isInstanceOf(dL, "SetScriptTransaction")) | |
1492 | 1473 | then { | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (if (( | |
1498 | - | then ( | |
1474 | + | let eP = dL | |
1475 | + | let gE = blake2b256(value(eP.script)) | |
1476 | + | let gF = fromBase64String(value(getString(az, al()))) | |
1477 | + | let gG = scriptHash(this) | |
1478 | + | if (if ((gF == gE)) | |
1479 | + | then (gG != gE) | |
1499 | 1480 | else false) | |
1500 | 1481 | then true | |
1501 | - | else sigVerify( | |
1482 | + | else sigVerify(gz.bodyBytes, gz.proofs[0], gB) | |
1502 | 1483 | } | |
1503 | - | else sigVerify( | |
1484 | + | else sigVerify(gz.bodyBytes, gz.proofs[0], gB) | |
1504 | 1485 | } | |
1505 | 1486 |
github/deemru/w8io/026f985 546.81 ms ◑