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