tx · DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.03600000 Waves 2023.05.04 12:36 [2562839] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a", "fee": 3600000, "feeAssetId": null, "timestamp": 1683192976834, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "atf6Qzz5iFUKVAwBbTh6iBfcq5TeY3wtD4EgYVcMVm7UpdvtjPJuQsUsiXU1oEzsU2m6NmUXs8zaQtMeTqZQLD6" ], "script": "base64:BgJbCAISBQoDCAEIEgMKAQgSBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEggKBggIAQEBAVAAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAPQ0FQX0ZFRV9OT19MT0FOAgljYXBOb0xvYW4ADENBUF9GRUVfTE9BTgIHY2FwTG9hbgAHQ0FQX0ZFRQIDY2FwAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29sQkFzc2V0QmFsYW5jZQIPQl9hc3NldF9iYWxhbmNlAA9rU0ZQb29sQUFzc2V0SWQCCkFfYXNzZXRfaWQAD2tTRlBvb2xCQXNzZXRJZAIKQl9hc3NldF9pZAAOa1NGUG9vbFNoYXJlSWQCDnNoYXJlX2Fzc2V0X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MgJfMwQEYkJhbAgFDSR0MDM0NjQ4MzQ3NDICXzQEB3NoYXJlSWQIBQ0kdDAzNDY0ODM0NzQyAl81CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgURa0F4bHlOb0xvYW5DYXBGZWUFDGNhcEZlZU5vTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgUTa0F4bHlXaXRoTG9hbkNhcEZlZQUOY2FwRmVlV2l0aExvYW4JAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUIcG9vbEFkZHIFDWtQb29sSW50ZXJlc3QAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB3NoYXJlSWQFCmtTaGFyZVBvb2wFCHBvb2xBZGRyBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Be0ilg==", "height": 2562839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5fR9GKAFo54kJi9S7gKH27SmohD7tgNEpmujjBqCHFk Next: 5NjufpnggLyQB99Abxsr37ytDCCWaVprj3WXLYnDbhWg Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "capLoan" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "cap" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "loan" | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = "noLoan" | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 100000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 10000000000 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 1000000 | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "A_asset_balance" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "B_asset_balance" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "A_asset_id" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "B_asset_id" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "share_asset_id" | |
33 | 33 | ||
34 | - | let p = "_ | |
34 | + | let p = "share_asset_supply" | |
35 | 35 | ||
36 | - | let q = " | |
36 | + | let q = "commission" | |
37 | 37 | ||
38 | - | let r = "_user_position | |
38 | + | let r = "_user_position" | |
39 | 39 | ||
40 | - | let s = "_user_position_ | |
40 | + | let s = "_user_position_borrow_amount" | |
41 | 41 | ||
42 | - | let t = "_user_position_ | |
42 | + | let t = "_user_position_borrow_asset_id" | |
43 | 43 | ||
44 | - | let u = "_ | |
44 | + | let u = "_user_position_number" | |
45 | 45 | ||
46 | - | let v = "_ | |
46 | + | let v = "_user_position_interest" | |
47 | 47 | ||
48 | - | let w = "_pool_ | |
48 | + | let w = "_pool_total" | |
49 | 49 | ||
50 | - | let x = "_ | |
50 | + | let x = "_pool_total_loan" | |
51 | 51 | ||
52 | - | let y = "_ | |
52 | + | let y = "_pool_interest" | |
53 | 53 | ||
54 | - | let z = "_axly_fee_ | |
54 | + | let z = "_axly_fee_without_loan" | |
55 | 55 | ||
56 | - | let A = "_axly_fee_ | |
56 | + | let A = "_axly_fee_with_loan" | |
57 | 57 | ||
58 | - | let B = "_ | |
58 | + | let B = "_axly_fee_cap_with_loan" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "_axly_fee_cap_no_loan" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "_request_id" | |
63 | 63 | ||
64 | - | let E = "_ | |
64 | + | let E = "requests_iter" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "pool_" | |
67 | 67 | ||
68 | - | let G = " | |
68 | + | let G = "_pool_share_id" | |
69 | 69 | ||
70 | - | let H = " | |
70 | + | let H = "_pool_cap_change" | |
71 | 71 | ||
72 | - | let I = " | |
72 | + | let I = "_last_price" | |
73 | 73 | ||
74 | - | let J = " | |
74 | + | let J = "axly_money_box" | |
75 | 75 | ||
76 | - | let K = " | |
76 | + | let K = "swopfi_farming_addr" | |
77 | 77 | ||
78 | - | let L = " | |
78 | + | let L = "lend_service_addr" | |
79 | 79 | ||
80 | - | let M = | |
80 | + | let M = "price_oracle" | |
81 | 81 | ||
82 | - | let N = | |
82 | + | let N = "exchange_contract" | |
83 | 83 | ||
84 | - | let O = | |
84 | + | let O = "wx_swap_contract" | |
85 | 85 | ||
86 | - | let P = Address(fromBase58String(valueOrErrorMessage(getString(this, | |
86 | + | let P = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No axly moneyBox address"))) | |
87 | 87 | ||
88 | - | let Q = | |
88 | + | let Q = Address(fromBase58String(valueOrErrorMessage(getString(this, N), "No exchange contract address"))) | |
89 | 89 | ||
90 | - | let R = | |
90 | + | let R = Address(fromBase58String(valueOrErrorMessage(getString(this, M), "No price oracle address"))) | |
91 | 91 | ||
92 | - | func S (T) = if ((T.caller == this)) | |
92 | + | let S = Address(fromBase58String(valueOrErrorMessage(getString(this, O), "No wx swap address"))) | |
93 | + | ||
94 | + | let T = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
95 | + | ||
96 | + | let U = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
97 | + | ||
98 | + | func V (W) = if ((W.caller == this)) | |
93 | 99 | then unit | |
94 | 100 | else throw("Only contract itself can call this function") | |
95 | 101 | ||
96 | 102 | ||
97 | - | func | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
103 | + | func X (Y) = { | |
104 | + | let Z = Y | |
105 | + | if ($isInstanceOf(Z, "ByteVector")) | |
100 | 106 | then { | |
101 | - | let | |
102 | - | assetBalance(this, | |
107 | + | let aa = Z | |
108 | + | assetBalance(this, aa) | |
103 | 109 | } | |
104 | - | else if ($isInstanceOf( | |
110 | + | else if ($isInstanceOf(Z, "Unit")) | |
105 | 111 | then { | |
106 | - | let | |
112 | + | let ab = Z | |
107 | 113 | wavesBalance(this).available | |
108 | 114 | } | |
109 | 115 | else throw("Match error") | |
110 | 116 | } | |
111 | 117 | ||
112 | 118 | ||
113 | - | func | |
119 | + | func ac (ad) = $Tuple5(valueOrErrorMessage(getString(ad, m), "Can't get pool A asset id"), valueOrErrorMessage(getString(ad, n), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(ad, k), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(ad, l), "Can't get pool B asset balance"), valueOrErrorMessage(getString(ad, o), "Can't get share asset id")) | |
114 | 120 | ||
115 | 121 | ||
116 | - | func | |
117 | - | let | |
118 | - | let | |
119 | - | if ($isInstanceOf( | |
120 | - | then | |
121 | - | else throw(($getType( | |
122 | + | func ae (ad) = { | |
123 | + | let af = { | |
124 | + | let ag = invoke(ad, "getPoolConfigWrapperREADONLY", nil, nil) | |
125 | + | if ($isInstanceOf(ag, "List[Any]")) | |
126 | + | then ag | |
127 | + | else throw(($getType(ag) + " couldn't be cast to List[Any]")) | |
122 | 128 | } | |
123 | - | if (( | |
129 | + | if ((af == af)) | |
124 | 130 | then { | |
125 | - | let | |
126 | - | let | |
127 | - | if ($isInstanceOf( | |
128 | - | then | |
131 | + | let ah = valueOrErrorMessage({ | |
132 | + | let ag = af[4] | |
133 | + | if ($isInstanceOf(ag, "String")) | |
134 | + | then ag | |
129 | 135 | else unit | |
130 | 136 | }, "Can't get pool A asset id") | |
131 | - | let | |
132 | - | let | |
133 | - | if ($isInstanceOf( | |
134 | - | then | |
137 | + | let ai = valueOrErrorMessage({ | |
138 | + | let ag = af[5] | |
139 | + | if ($isInstanceOf(ag, "String")) | |
140 | + | then ag | |
135 | 141 | else unit | |
136 | 142 | }, "Can't get pool B asset id") | |
137 | - | let | |
138 | - | let | |
139 | - | if ($isInstanceOf( | |
140 | - | then | |
143 | + | let aj = valueOrErrorMessage({ | |
144 | + | let ag = af[3] | |
145 | + | if ($isInstanceOf(ag, "String")) | |
146 | + | then ag | |
141 | 147 | else unit | |
142 | 148 | }, "Can't get pool LP asset id") | |
143 | - | let | |
144 | - | let | |
145 | - | if ($isInstanceOf( | |
146 | - | then | |
147 | - | else throw(($getType( | |
149 | + | let ak = { | |
150 | + | let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ah], nil) | |
151 | + | if ($isInstanceOf(ag, "Int")) | |
152 | + | then ag | |
153 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
148 | 154 | } | |
149 | - | if (( | |
155 | + | if ((ak == ak)) | |
150 | 156 | then { | |
151 | - | let | |
152 | - | let | |
153 | - | if ($isInstanceOf( | |
154 | - | then | |
155 | - | else throw(($getType( | |
157 | + | let al = { | |
158 | + | let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ai], nil) | |
159 | + | if ($isInstanceOf(ag, "Int")) | |
160 | + | then ag | |
161 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
156 | 162 | } | |
157 | - | if (( | |
158 | - | then $Tuple5( | |
163 | + | if ((al == al)) | |
164 | + | then $Tuple5(ah, ai, ak, al, aj) | |
159 | 165 | else throw("Strict value is not equal to itself.") | |
160 | 166 | } | |
161 | 167 | else throw("Strict value is not equal to itself.") | |
164 | 170 | } | |
165 | 171 | ||
166 | 172 | ||
167 | - | func | |
168 | - | then | |
169 | - | else if (( | |
170 | - | then | |
173 | + | func am (ad,an) = if ((an == a)) | |
174 | + | then ac(ad) | |
175 | + | else if ((an == b)) | |
176 | + | then ae(ad) | |
171 | 177 | else throw("Wrong pool type") | |
172 | 178 | ||
173 | 179 | ||
174 | - | func al (am) = valueOrElse(getInteger(this, (am + u)), 0) | |
180 | + | func ao (ad,an,aj) = if ((an == a)) | |
181 | + | then valueOrErrorMessage(getInteger(ad, p), "Can't get share asset supply") | |
182 | + | else if ((an == b)) | |
183 | + | then valueOrErrorMessage(assetInfo(fromBase58String(aj)), "Wrong ShareId").quantity | |
184 | + | else throw("Wrong pool type") | |
175 | 185 | ||
176 | 186 | ||
177 | - | func | |
187 | + | func ap (aq) = valueOrElse(getInteger(this, (aq + w)), 0) | |
178 | 188 | ||
179 | 189 | ||
180 | - | func | |
190 | + | func ar (aq) = valueOrElse(getInteger(this, (aq + x)), 0) | |
181 | 191 | ||
182 | 192 | ||
183 | - | func aq (am,ar) = if ((ar == d)) | |
184 | - | then getIntegerValue(this, (am + A)) | |
185 | - | else if ((ar == c)) | |
186 | - | then getIntegerValue(this, (am + z)) | |
187 | - | else if ((ar == e)) | |
188 | - | then getIntegerValue(this, (am + y)) | |
189 | - | else if ((ar == f)) | |
190 | - | then getIntegerValue(this, (am + x)) | |
193 | + | func as (aq,at) = (valueOrElse(getInteger(this, (((aq + "_") + at) + u)), 0) + 1) | |
194 | + | ||
195 | + | ||
196 | + | func au (aq,av) = if ((av == d)) | |
197 | + | then getIntegerValue(this, (aq + C)) | |
198 | + | else if ((av == c)) | |
199 | + | then getIntegerValue(this, (aq + B)) | |
200 | + | else if ((av == f)) | |
201 | + | then getIntegerValue(this, (aq + A)) | |
202 | + | else if ((av == g)) | |
203 | + | then getIntegerValue(this, (aq + z)) | |
191 | 204 | else throw("Wrong fee type") | |
192 | 205 | ||
193 | 206 | ||
194 | - | func | |
207 | + | func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "Can't get swopfi farming addr"))) | |
195 | 208 | ||
196 | 209 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | Address(fromBase58String( | |
210 | + | func ax (ad) = { | |
211 | + | let ay = Address(fromBase58String(valueOrErrorMessage(getString(ad, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
212 | + | let az = split(valueOrErrorMessage(getString(ay, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
213 | + | Address(fromBase58String(az[1])) | |
201 | 214 | } | |
202 | 215 | ||
203 | 216 | ||
204 | - | func | |
217 | + | func aA () = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "Can't get lend service addr"))) | |
205 | 218 | ||
206 | 219 | ||
207 | - | func | |
208 | - | let | |
209 | - | if ($isInstanceOf( | |
220 | + | func aB (Y) = { | |
221 | + | let Z = Y | |
222 | + | if ($isInstanceOf(Z, "ByteVector")) | |
210 | 223 | then { | |
211 | - | let | |
212 | - | toBase58String( | |
224 | + | let aa = Z | |
225 | + | toBase58String(aa) | |
213 | 226 | } | |
214 | - | else if ($isInstanceOf( | |
227 | + | else if ($isInstanceOf(Z, "Unit")) | |
215 | 228 | then { | |
216 | - | let | |
229 | + | let ab = Z | |
217 | 230 | "WAVES" | |
218 | 231 | } | |
219 | 232 | else throw("Match error") | |
220 | 233 | } | |
221 | 234 | ||
222 | 235 | ||
223 | - | func | |
236 | + | func aC (Y) = if ((Y == "WAVES")) | |
224 | 237 | then unit | |
225 | - | else fromBase58String( | |
238 | + | else fromBase58String(Y) | |
226 | 239 | ||
227 | 240 | ||
228 | - | func | |
241 | + | func aD (Y) = if ((Y == "WAVES")) | |
229 | 242 | then 8 | |
230 | 243 | else { | |
231 | - | let | |
232 | - | if ($isInstanceOf( | |
244 | + | let Z = assetInfo(fromBase58String(Y)) | |
245 | + | if ($isInstanceOf(Z, "Asset")) | |
233 | 246 | then { | |
234 | - | let | |
235 | - | | |
247 | + | let aE = Z | |
248 | + | aE.decimals | |
236 | 249 | } | |
237 | 250 | else throw("Can't find asset") | |
238 | 251 | } | |
239 | 252 | ||
240 | 253 | ||
241 | - | func aB (am,ar,aC,aD,aE,aF,ah,ai,ag) = { | |
242 | - | let aG = U(fromBase58String(ag)) | |
243 | - | if ((aG == aG)) | |
254 | + | func aF (aG) = { | |
255 | + | func aH (aI,Y) = { | |
256 | + | let aJ = ( let ag = invoke(R, "getTWAP60", [Y, false], nil) | |
257 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
258 | + | then ag | |
259 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
260 | + | (aI :+ aJ) | |
261 | + | } | |
262 | + | ||
263 | + | let aK = aG | |
264 | + | let aL = size(aK) | |
265 | + | let aM = nil | |
266 | + | func aN (aO,aP) = if ((aP >= aL)) | |
267 | + | then aO | |
268 | + | else aH(aO, aK[aP]) | |
269 | + | ||
270 | + | func aQ (aO,aP) = if ((aP >= aL)) | |
271 | + | then aO | |
272 | + | else throw("List size exceeds 100") | |
273 | + | ||
274 | + | aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
275 | + | } | |
276 | + | ||
277 | + | ||
278 | + | func aR (aS) = { | |
279 | + | func aH (aI,aj) = { | |
280 | + | let aq = valueOrErrorMessage(getString(this, (aj + G)), "Can't find pool addr by share id") | |
281 | + | let ad = Address(fromBase58String(aq)) | |
282 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
283 | + | let aU = am(ad, aT) | |
284 | + | let ah = aU._1 | |
285 | + | let ai = aU._2 | |
286 | + | let aV = aU._3 | |
287 | + | let aW = aU._4 | |
288 | + | let aX = ( let ag = invoke(R, "getTWAP60", [ah, false], nil) | |
289 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
290 | + | then ag | |
291 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
292 | + | let aY = ( let ag = invoke(R, "getTWAP60", [ai, false], nil) | |
293 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
294 | + | then ag | |
295 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
296 | + | let aZ = ao(ad, aT, aj) | |
297 | + | let ba = pow(10, 0, aD(ah), 0, 0, DOWN) | |
298 | + | let bb = pow(10, 0, aD(ai), 0, 0, DOWN) | |
299 | + | let bc = pow(10, 0, aD(aj), 0, 0, DOWN) | |
300 | + | let bd = (fraction(aV, aX, ba) + fraction(aW, aY, bb)) | |
301 | + | let be = fraction(bd, bc, aZ) | |
302 | + | (aI :+ be) | |
303 | + | } | |
304 | + | ||
305 | + | let aK = aS | |
306 | + | let aL = size(aK) | |
307 | + | let aM = nil | |
308 | + | func aN (aO,aP) = if ((aP >= aL)) | |
309 | + | then aO | |
310 | + | else aH(aO, aK[aP]) | |
311 | + | ||
312 | + | func aQ (aO,aP) = if ((aP >= aL)) | |
313 | + | then aO | |
314 | + | else throw("List size exceeds 50") | |
315 | + | ||
316 | + | aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
317 | + | } | |
318 | + | ||
319 | + | ||
320 | + | func bf (ah,ai,aj) = { | |
321 | + | let bg = aF([ah, ai]) | |
322 | + | let be = aR([aj]) | |
323 | + | [IntegerEntry((ah + I), bg[0]), IntegerEntry((ai + I), bg[1]), IntegerEntry((aj + I), be[0])] | |
324 | + | } | |
325 | + | ||
326 | + | ||
327 | + | func bh (aq,av,bi,bj,bk,bl,ak,al,aj) = { | |
328 | + | let bm = X(fromBase58String(aj)) | |
329 | + | if ((bm == bm)) | |
244 | 330 | then { | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
331 | + | let ad = Address(fromBase58String(aq)) | |
332 | + | let bn = fraction(h, bi, ak) | |
333 | + | let bo = fraction(h, bk, al) | |
334 | + | let bp = if ((bo > bn)) | |
249 | 335 | then { | |
250 | - | let | |
251 | - | $Tuple4( | |
336 | + | let bq = fraction(al, bn, h, CEILING) | |
337 | + | $Tuple4(bi, bq, (bk - bq), bl) | |
252 | 338 | } | |
253 | 339 | else { | |
254 | - | let | |
255 | - | $Tuple4( | |
340 | + | let bq = fraction(ak, bo, h, CEILING) | |
341 | + | $Tuple4(bq, bk, (bi - bq), bj) | |
256 | 342 | } | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then ( | |
343 | + | let br = bp._1 | |
344 | + | let bs = bp._2 | |
345 | + | let bt = bp._3 | |
346 | + | let bu = bp._4 | |
347 | + | let bv = if (if ((br > 0)) | |
348 | + | then (bs > 0) | |
263 | 349 | else false) | |
264 | 350 | then { | |
265 | - | let | |
266 | - | invoke( | |
351 | + | let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)] | |
352 | + | invoke(ad, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bw) | |
267 | 353 | } | |
268 | 354 | else 0 | |
269 | - | if (( | |
355 | + | if ((bv == bv)) | |
270 | 356 | then { | |
271 | - | let | |
357 | + | let bx = if ((bt > 0)) | |
272 | 358 | then { | |
273 | - | let | |
274 | - | let | |
275 | - | invoke( | |
359 | + | let bw = [AttachedPayment(aC(bu), bt)] | |
360 | + | let by = ["0", "false", "0"] | |
361 | + | invoke(ad, "callFunction", ["replenishWithOneToken", by], bw) | |
276 | 362 | } | |
277 | 363 | else 0 | |
278 | - | if (( | |
364 | + | if ((bx == bx)) | |
279 | 365 | then { | |
280 | - | let aT = U(fromBase58String(ag)) | |
281 | - | let aU = (aT - aG) | |
282 | - | let aV = fraction(aU, aq(am, ar), i) | |
283 | - | let aW = (aU - aV) | |
284 | - | if ((0 >= aW)) | |
366 | + | let bz = X(fromBase58String(aj)) | |
367 | + | let bA = (bz - bm) | |
368 | + | let bB = if ((av == e)) | |
369 | + | then fraction(bA, au(aq, av), j) | |
370 | + | else fraction(bA, au(aq, av), j) | |
371 | + | let bC = (bA - bB) | |
372 | + | if ((0 >= bC)) | |
285 | 373 | then throw("amount of staked sharetokens must be > 0") | |
286 | 374 | else { | |
287 | - | let | |
288 | - | if (( | |
289 | - | then $Tuple2( | |
375 | + | let bD = invoke(aw(), "lockShareTokens", [aq, 0], [AttachedPayment(fromBase58String(aj), bC)]) | |
376 | + | if ((bD == bD)) | |
377 | + | then $Tuple2(bC, bB) | |
290 | 378 | else throw("Strict value is not equal to itself.") | |
291 | 379 | } | |
292 | 380 | } | |
298 | 386 | } | |
299 | 387 | ||
300 | 388 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | then ( | |
389 | + | func bE (aq,av,bi,bj,bk,bl,aj) = { | |
390 | + | let ad = Address(fromBase58String(aq)) | |
391 | + | let bF = if (if ((bi > 0)) | |
392 | + | then (bk > 0) | |
305 | 393 | else false) | |
306 | 394 | then { | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw(($getType( | |
395 | + | let bG = split({ | |
396 | + | let ag = invoke(ad, "evaluatePutByAmountAssetREADONLY", [bi], nil) | |
397 | + | if ($isInstanceOf(ag, "String")) | |
398 | + | then ag | |
399 | + | else throw(($getType(ag) + " couldn't be cast to String")) | |
312 | 400 | }, "__") | |
313 | - | if (( | |
401 | + | if ((bG == bG)) | |
314 | 402 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | if ($isInstanceOf( | |
318 | - | then | |
319 | - | else throw(($getType( | |
403 | + | let bH = split({ | |
404 | + | let ag = invoke(ad, "evaluatePutByPriceAssetREADONLY", [bk], nil) | |
405 | + | if ($isInstanceOf(ag, "String")) | |
406 | + | then ag | |
407 | + | else throw(($getType(ag) + " couldn't be cast to String")) | |
320 | 408 | }, "__") | |
321 | - | if (( | |
409 | + | if ((bH == bH)) | |
322 | 410 | then { | |
323 | - | let | |
324 | - | let | |
325 | - | if (( | |
411 | + | let bI = parseIntValue(bG[1]) | |
412 | + | let bJ = parseIntValue(bH[1]) | |
413 | + | if ((bJ > bI)) | |
326 | 414 | then { | |
327 | - | let | |
328 | - | $Tuple4( | |
415 | + | let bK = parseIntValue(bG[8]) | |
416 | + | $Tuple4(bi, bK, (bk - bK), bl) | |
329 | 417 | } | |
330 | 418 | else { | |
331 | - | let | |
332 | - | $Tuple4( | |
419 | + | let bL = parseIntValue(bH[7]) | |
420 | + | $Tuple4(bL, bk, (bi - bL), bj) | |
333 | 421 | } | |
334 | 422 | } | |
335 | 423 | else throw("Strict value is not equal to itself.") | |
336 | 424 | } | |
337 | 425 | else throw("Strict value is not equal to itself.") | |
338 | 426 | } | |
339 | - | else if (( | |
340 | - | then $Tuple4( | |
341 | - | else if (( | |
342 | - | then $Tuple4( | |
427 | + | else if ((bi > 0)) | |
428 | + | then $Tuple4(bi, bk, bi, bj) | |
429 | + | else if ((bk > 0)) | |
430 | + | then $Tuple4(bi, bk, bk, bl) | |
343 | 431 | else throw("pmts must be > 0") | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | if (( | |
432 | + | let br = bF._1 | |
433 | + | let bs = bF._2 | |
434 | + | let bt = bF._3 | |
435 | + | let bu = bF._4 | |
436 | + | let bm = X(fromBase58String(aj)) | |
437 | + | if ((bm == bm)) | |
350 | 438 | then { | |
351 | - | let | |
352 | - | then ( | |
439 | + | let bv = if (if ((br > 0)) | |
440 | + | then (bs > 0) | |
353 | 441 | else false) | |
354 | 442 | then { | |
355 | - | let | |
356 | - | invoke( | |
443 | + | let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)] | |
444 | + | invoke(ad, "put", [1000000, false], bw) | |
357 | 445 | } | |
358 | 446 | else 0 | |
359 | - | if (( | |
447 | + | if ((bv == bv)) | |
360 | 448 | then { | |
361 | - | let | |
449 | + | let bx = if ((bt > 0)) | |
362 | 450 | then { | |
363 | - | let | |
364 | - | invoke( | |
451 | + | let bw = [AttachedPayment(aC(bu), bt)] | |
452 | + | invoke(ad, "putOneTkn", [0, false], bw) | |
365 | 453 | } | |
366 | 454 | else 0 | |
367 | - | if (( | |
455 | + | if ((bx == bx)) | |
368 | 456 | then { | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | if ((0 >= | |
457 | + | let bz = X(fromBase58String(aj)) | |
458 | + | let bA = (bz - bm) | |
459 | + | let bB = fraction(bA, au(aq, av), j) | |
460 | + | let bC = (bA - bB) | |
461 | + | if ((0 >= bC)) | |
374 | 462 | then throw("amount of staked sharetokens must be > 0") | |
375 | 463 | else { | |
376 | - | let | |
377 | - | if (( | |
378 | - | then $Tuple2( | |
464 | + | let bD = invoke(ax(ad), "stake", nil, [AttachedPayment(fromBase58String(aj), bC)]) | |
465 | + | if ((bD == bD)) | |
466 | + | then $Tuple2(bC, bB) | |
379 | 467 | else throw("Strict value is not equal to itself.") | |
380 | 468 | } | |
381 | 469 | } | |
387 | 475 | } | |
388 | 476 | ||
389 | 477 | ||
390 | - | func | |
391 | - | then | |
392 | - | else if (( | |
393 | - | then | |
478 | + | func bM (an,aq,av,bi,bN,bk,bO,ak,al,aj) = if ((an == a)) | |
479 | + | then bh(aq, av, bi, bN, bk, bO, ak, al, aj) | |
480 | + | else if ((an == b)) | |
481 | + | then bE(aq, av, bi, bN, bk, bO, aj) | |
394 | 482 | else throw("Wrong pool type") | |
395 | 483 | ||
396 | 484 | ||
397 | - | func | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | [IntegerEntry(( | |
485 | + | func bP (aq,at,bQ,bB,bR,aj,an) = { | |
486 | + | let bS = ap(aq) | |
487 | + | let bT = ar(aq) | |
488 | + | let bU = getIntegerValue(this, (aq + y)) | |
489 | + | [IntegerEntry((aq + w), (bS + bQ)), IntegerEntry((aq + x), (bT + bQ)), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + r), bQ), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + v), bU), IntegerEntry((((aq + "_") + at) + u), bR), ScriptTransfer(P, bB, fromBase58String(aj))] | |
402 | 490 | } | |
403 | 491 | ||
404 | 492 | ||
405 | - | func | |
493 | + | func bV (an,aq) = if ((an == a)) | |
406 | 494 | then { | |
407 | - | let | |
408 | - | if (( | |
495 | + | let bW = X(T) | |
496 | + | if ((bW == bW)) | |
409 | 497 | then { | |
410 | - | let | |
411 | - | if (( | |
498 | + | let bX = invoke(aw(), "claim", [aq], nil) | |
499 | + | if ((bX == bX)) | |
412 | 500 | then { | |
413 | - | let | |
414 | - | $Tuple2(( | |
501 | + | let bY = X(T) | |
502 | + | $Tuple2((bY - bW), T) | |
415 | 503 | } | |
416 | 504 | else throw("Strict value is not equal to itself.") | |
417 | 505 | } | |
418 | 506 | else throw("Strict value is not equal to itself.") | |
419 | 507 | } | |
420 | - | else if (( | |
508 | + | else if ((an == b)) | |
421 | 509 | then { | |
422 | - | let | |
423 | - | if (( | |
510 | + | let bW = X(U) | |
511 | + | if ((bW == bW)) | |
424 | 512 | then { | |
425 | - | let | |
426 | - | if (( | |
513 | + | let bX = invoke(ax(Address(fromBase58String(aq))), "claimWX", [aq], nil) | |
514 | + | if ((bX == bX)) | |
427 | 515 | then { | |
428 | - | let | |
429 | - | $Tuple2(( | |
516 | + | let bY = X(U) | |
517 | + | $Tuple2((bY - bW), U) | |
430 | 518 | } | |
431 | 519 | else throw("Strict value is not equal to itself.") | |
432 | 520 | } | |
435 | 523 | else throw("Wrong pool type") | |
436 | 524 | ||
437 | 525 | ||
438 | - | func | |
439 | - | let | |
440 | - | if (( | |
526 | + | func bZ (ca,cb,cc,cd,ce,cf,cg,ch,ci,cj) = { | |
527 | + | let ck = X(aC(ca)) | |
528 | + | if ((ck == ck)) | |
441 | 529 | then { | |
442 | - | let | |
443 | - | if (( | |
444 | - | then ( | |
530 | + | let bX = invoke(Q, "swap", [cd, ce, cf, cg, ch, ci, cj], [AttachedPayment(cc, cb)]) | |
531 | + | if ((bX == bX)) | |
532 | + | then (X(aC(ca)) - ck) | |
445 | 533 | else throw("Strict value is not equal to itself.") | |
446 | 534 | } | |
447 | 535 | else throw("Strict value is not equal to itself.") | |
448 | 536 | } | |
449 | 537 | ||
450 | 538 | ||
451 | - | func | |
452 | - | let | |
453 | - | if (( | |
539 | + | func cl (ca,cb,cc,cm,cn,cj) = { | |
540 | + | let ck = X(aC(ca)) | |
541 | + | if ((ck == ck)) | |
454 | 542 | then { | |
455 | - | let | |
456 | - | if (( | |
457 | - | then ( | |
543 | + | let bX = invoke(Q, "puzzleSwap", [cm, cn, cj], [AttachedPayment(cc, cb)]) | |
544 | + | if ((bX == bX)) | |
545 | + | then (X(aC(ca)) - ck) | |
458 | 546 | else throw("Strict value is not equal to itself.") | |
459 | 547 | } | |
460 | 548 | else throw("Strict value is not equal to itself.") | |
461 | 549 | } | |
462 | 550 | ||
463 | 551 | ||
464 | - | func | |
465 | - | let | |
466 | - | if (( | |
552 | + | func co (ca,cb,cc,cp,cq,cr,cs,ct,cu,cj) = { | |
553 | + | let ck = X(aC(ca)) | |
554 | + | if ((ck == ck)) | |
467 | 555 | then { | |
468 | - | let | |
469 | - | if (( | |
470 | - | then ( | |
556 | + | let bX = invoke(Q, "swopfiSwap", [cp, cq, cr, cs, ct, cu, cj], [AttachedPayment(cc, cb)]) | |
557 | + | if ((bX == bX)) | |
558 | + | then (X(aC(ca)) - ck) | |
471 | 559 | else throw("Strict value is not equal to itself.") | |
472 | 560 | } | |
473 | 561 | else throw("Strict value is not equal to itself.") | |
474 | 562 | } | |
475 | 563 | ||
476 | 564 | ||
477 | - | func | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | then $Tuple2( | |
487 | - | else $Tuple2(0, | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | [IntegerEntry(( | |
565 | + | func cv (aq,aT,cw,cx) = { | |
566 | + | let ad = Address(fromBase58String(aq)) | |
567 | + | let cy = am(ad, aT) | |
568 | + | let bN = cy._1 | |
569 | + | let bO = cy._2 | |
570 | + | let ak = cy._3 | |
571 | + | let al = cy._4 | |
572 | + | let aj = cy._5 | |
573 | + | let cz = if ((cw == bN)) | |
574 | + | then $Tuple2(cx, 0) | |
575 | + | else $Tuple2(0, cx) | |
576 | + | let bi = cz._1 | |
577 | + | let bk = cz._2 | |
578 | + | let cA = bM(aT, aq, e, bi, bN, bk, bO, ak, al, aj) | |
579 | + | let bQ = cA._1 | |
580 | + | let cB = cA._2 | |
581 | + | let bU = valueOrElse(getInteger(this, (aq + y)), 0) | |
582 | + | let cC = ap(aq) | |
583 | + | let cD = (bU + fraction(bQ, i, cC)) | |
584 | + | ([IntegerEntry((aq + y), cD), ScriptTransfer(P, cB, fromBase58String(aj))] ++ bf(bN, bO, aj)) | |
497 | 585 | } | |
498 | 586 | ||
499 | 587 | ||
500 | - | func | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
588 | + | func cE (aq,cF,cG,ak,al,cH,cI) = { | |
589 | + | let ad = Address(fromBase58String(aq)) | |
590 | + | let cJ = 1000000 | |
591 | + | let cK = getIntegerValue(ad, q) | |
592 | + | let cL = fraction(cH, cJ, (cJ - cK)) | |
593 | + | let cM = if ((cI == cF)) | |
506 | 594 | then { | |
507 | - | let | |
508 | - | $Tuple2( | |
595 | + | let cN = fraction(ak, cL, (al - cL)) | |
596 | + | $Tuple2(cN, cG) | |
509 | 597 | } | |
510 | 598 | else { | |
511 | - | let | |
512 | - | $Tuple2( | |
599 | + | let cN = fraction(al, cL, (ak - cL)) | |
600 | + | $Tuple2(cN, cF) | |
513 | 601 | } | |
514 | - | let | |
515 | - | let | |
516 | - | invoke( | |
602 | + | let cN = cM._1 | |
603 | + | let cO = cM._2 | |
604 | + | invoke(ad, "callFunction", ["exchange", ["1"]], [AttachedPayment(aC(cO), cN)]) | |
517 | 605 | } | |
518 | 606 | ||
519 | 607 | ||
520 | - | func | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
608 | + | func cP (aq,cF,cG,ak,al,cH,cI) = { | |
609 | + | let ad = Address(fromBase58String(aq)) | |
610 | + | let cQ = getIntegerValue(S, "%s__protocolFee") | |
611 | + | let cR = getIntegerValue(S, "%s__poolFee") | |
612 | + | let cS = toBigInt(100000000) | |
613 | + | let cT = if ((cI == cF)) | |
526 | 614 | then { | |
527 | - | let | |
528 | - | $Tuple2( | |
615 | + | let cN = fraction(ak, cH, (al - cH)) | |
616 | + | $Tuple2(cN, cG) | |
529 | 617 | } | |
530 | 618 | else { | |
531 | - | let | |
532 | - | $Tuple2( | |
619 | + | let cN = fraction(al, cH, (ak - cH)) | |
620 | + | $Tuple2(cN, cF) | |
533 | 621 | } | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | invoke( | |
622 | + | let cN = cT._1 | |
623 | + | let cO = cT._2 | |
624 | + | let cU = toInt(fraction(toBigInt(cN), cS, (cS - toBigInt((cQ + cR))))) | |
625 | + | invoke(S, "swap", [1, cI, toString(this)], [AttachedPayment(aC(cO), cU)]) | |
538 | 626 | } | |
539 | 627 | ||
540 | 628 | ||
541 | - | func | |
542 | - | then | |
543 | - | else | |
629 | + | func cV (an,aq,cF,cG,ak,al,cH,cI) = if ((an == a)) | |
630 | + | then cE(aq, cF, cG, ak, al, cH, cI) | |
631 | + | else cP(aq, cF, cG, ak, al, cH, cI) | |
544 | 632 | ||
545 | 633 | ||
546 | - | func cr (am,cs,ct,cu) = { | |
547 | - | let aa = Address(fromBase58String(am)) | |
548 | - | let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool") | |
549 | - | let cv = aj(aa, bQ) | |
550 | - | let ca = cv._1 | |
551 | - | let cb = cv._2 | |
552 | - | let ah = cv._3 | |
553 | - | let ai = cv._4 | |
554 | - | let cw = U(ay(ca)) | |
555 | - | if ((cw == cw)) | |
634 | + | func cW (aq,cX,cY,cZ) = { | |
635 | + | let ad = Address(fromBase58String(aq)) | |
636 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
637 | + | let da = am(ad, aT) | |
638 | + | let cF = da._1 | |
639 | + | let cG = da._2 | |
640 | + | let ak = da._3 | |
641 | + | let al = da._4 | |
642 | + | let aj = da._5 | |
643 | + | let db = X(aC(cF)) | |
644 | + | if ((db == db)) | |
556 | 645 | then { | |
557 | - | let | |
558 | - | if (( | |
646 | + | let dc = X(aC(cG)) | |
647 | + | if ((dc == dc)) | |
559 | 648 | then { | |
560 | - | let | |
561 | - | then invoke( | |
562 | - | else if (( | |
563 | - | then invoke( | |
649 | + | let bX = if ((aT == a)) | |
650 | + | then invoke(ad, "callFunction", ["withdraw", [toString(cX)]], nil) | |
651 | + | else if ((aT == b)) | |
652 | + | then invoke(ad, "unstakeAndGet", [cX], nil) | |
564 | 653 | else throw("Wrong position type") | |
565 | - | if (( | |
654 | + | if ((bX == bX)) | |
566 | 655 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
656 | + | let dd = X(aC(cF)) | |
657 | + | let de = X(aC(cG)) | |
658 | + | let df = $Tuple2((dd - db), (de - dc)) | |
659 | + | let dg = df._1 | |
660 | + | let dh = df._2 | |
661 | + | let di = if ((cY > 0)) | |
573 | 662 | then { | |
574 | - | let | |
575 | - | then ( | |
663 | + | let dj = if (if ((cZ == cF)) | |
664 | + | then (cY > dg) | |
576 | 665 | else false) | |
577 | - | then ( | |
578 | - | else if (if (( | |
579 | - | then ( | |
666 | + | then (cY - dg) | |
667 | + | else if (if ((cZ == cG)) | |
668 | + | then (cY > dh) | |
580 | 669 | else false) | |
581 | - | then ( | |
670 | + | then (cY - dh) | |
582 | 671 | else 0 | |
583 | - | let | |
584 | - | then | |
672 | + | let dk = if ((dj > 0)) | |
673 | + | then cV(aT, aq, cF, cG, ak, al, dj, cZ) | |
585 | 674 | else 0 | |
586 | - | if (( | |
675 | + | if ((dk == dk)) | |
587 | 676 | then { | |
588 | - | let | |
589 | - | let | |
590 | - | $Tuple2(( | |
677 | + | let dl = X(aC(cF)) | |
678 | + | let dm = X(aC(cG)) | |
679 | + | $Tuple2((dl - db), (dm - dc)) | |
591 | 680 | } | |
592 | 681 | else throw("Strict value is not equal to itself.") | |
593 | 682 | } | |
594 | - | else $Tuple2( | |
595 | - | let | |
596 | - | let | |
597 | - | $ | |
683 | + | else $Tuple2(dg, dh) | |
684 | + | let dn = di._1 | |
685 | + | let do = di._2 | |
686 | + | $Tuple7(dn, cF, do, cG, dd, de, aj) | |
598 | 687 | } | |
599 | 688 | else throw("Strict value is not equal to itself.") | |
600 | 689 | } | |
604 | 693 | } | |
605 | 694 | ||
606 | 695 | ||
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | $Tuple11( | |
696 | + | func dp (dq) = { | |
697 | + | let dr = split(valueOrErrorMessage(getString(this, (dq + D)), ("No request with id " + dq)), ",") | |
698 | + | let at = dr[0] | |
699 | + | let aq = dr[1] | |
700 | + | let bi = parseIntValue(dr[2]) | |
701 | + | let bN = dr[3] | |
702 | + | let bk = parseIntValue(dr[4]) | |
703 | + | let bO = dr[5] | |
704 | + | let ak = parseIntValue(dr[6]) | |
705 | + | let al = parseIntValue(dr[7]) | |
706 | + | let aj = dr[8] | |
707 | + | let ds = dr[9] | |
708 | + | let dt = parseIntValue(dr[10]) | |
709 | + | $Tuple11(at, aq, bi, bN, bk, bO, ak, al, aj, ds, dt) | |
621 | 710 | } | |
622 | 711 | ||
623 | 712 | ||
624 | - | @Callable(T) | |
625 | - | func getAssetPrice (V) = $Tuple2(nil, (let ad = invoke(O, "getTWAP60", [V, false], nil) | |
626 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
627 | - | then ad | |
628 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2) | |
629 | - | ||
630 | - | ||
631 | - | ||
632 | - | @Callable(T) | |
633 | - | func getSharePrice (ag) = { | |
634 | - | let am = valueOrErrorMessage(getString(this, (ag + E)), "Can't find pool addr by share id") | |
635 | - | let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited") | |
636 | - | let cP = aj(Address(fromBase58String(am)), bQ) | |
637 | - | let ae = cP._1 | |
638 | - | let af = cP._2 | |
639 | - | let cQ = ( let ad = invoke(O, "getTWAP60", [ae, false], nil) | |
640 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
641 | - | then ad | |
642 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2 | |
643 | - | let cR = ( let ad = invoke(O, "getTWAP60", [af, false], nil) | |
644 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
645 | - | then ad | |
646 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2 | |
647 | - | $Tuple2(nil, (cQ + cR)) | |
648 | - | } | |
649 | - | ||
650 | - | ||
651 | - | ||
652 | - | @Callable(T) | |
653 | - | func replenishEVALONLY (am,cS,cT) = if (if ((100 > cS)) | |
713 | + | @Callable(W) | |
714 | + | func replenishEVALONLY (aq,du,dv) = if (if ((100 > du)) | |
654 | 715 | then true | |
655 | - | else ( | |
716 | + | else (du > 300)) | |
656 | 717 | then throw("Leverage can't be <100 and >300") | |
657 | 718 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | then if (( | |
719 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
720 | + | let dw = am(Address(fromBase58String(aq)), aT) | |
721 | + | let bN = dw._1 | |
722 | + | let bO = dw._2 | |
723 | + | let ak = dw._3 | |
724 | + | let al = dw._4 | |
725 | + | let aj = dw._5 | |
726 | + | let dx = if ((size(W.payments) == 2)) | |
727 | + | then if ((aB(W.payments[0].assetId) != bN)) | |
667 | 728 | then throw("Wrong payment asset A") | |
668 | - | else if (( | |
729 | + | else if ((aB(W.payments[1].assetId) != bO)) | |
669 | 730 | then throw("Wrong payment asset B") | |
670 | - | else $Tuple4( | |
671 | - | else if ((size( | |
672 | - | then if (( | |
673 | - | then $Tuple4( | |
674 | - | else if (( | |
675 | - | then $Tuple4(0, | |
731 | + | else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO) | |
732 | + | else if ((size(W.payments) == 1)) | |
733 | + | then if ((aB(W.payments[0].assetId) == bN)) | |
734 | + | then $Tuple4(W.payments[0].amount, bN, 0, bO) | |
735 | + | else if ((aB(W.payments[0].assetId) == bO)) | |
736 | + | then $Tuple4(0, bN, W.payments[0].amount, bO) | |
676 | 737 | else throw("Wrong payment") | |
677 | 738 | else throw("One or two payments expected") | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
739 | + | let bi = dx._1 | |
740 | + | let bj = dx._2 | |
741 | + | let bk = dx._3 | |
742 | + | let bl = dx._4 | |
743 | + | let dy = if ((du > 100)) | |
683 | 744 | then { | |
684 | - | let | |
685 | - | if ($isInstanceOf( | |
686 | - | then | |
687 | - | else throw(($getType( | |
688 | - | let | |
689 | - | if ($isInstanceOf( | |
690 | - | then | |
691 | - | else throw(($getType( | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | if ($isInstanceOf( | |
698 | - | then | |
699 | - | else throw(($getType( | |
745 | + | let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil) | |
746 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
747 | + | then ag | |
748 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
749 | + | let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil) | |
750 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
751 | + | then ag | |
752 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
753 | + | let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN))) | |
754 | + | let dA = fraction(dz, (du - 100), 100) | |
755 | + | let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA), toString(1)], ",") | |
756 | + | let dB = { | |
757 | + | let ag = invoke(this, "createNewRequest", [dr], nil) | |
758 | + | if ($isInstanceOf(ag, "Int")) | |
759 | + | then ag | |
760 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
700 | 761 | } | |
701 | - | if (( | |
762 | + | if ((dB == dB)) | |
702 | 763 | then { | |
703 | - | let | |
704 | - | let | |
705 | - | if (( | |
706 | - | then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), | |
764 | + | let dC = [((toString(W.caller) + "_") + toString(1)), aj, dv, dA, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(dB, "Can't create new request"))] | |
765 | + | let bX = reentrantInvoke(aA(), "flashPosition", dC, nil) | |
766 | + | if ((bX == bX)) | |
767 | + | then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), dA) | |
707 | 768 | else throw("Strict value is not equal to itself.") | |
708 | 769 | } | |
709 | 770 | else throw("Strict value is not equal to itself.") | |
710 | 771 | } | |
711 | - | else $Tuple2( | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if (( | |
772 | + | else $Tuple2(bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)._1, 0) | |
773 | + | let dD = dy._1 | |
774 | + | let dA = dy._2 | |
775 | + | let dE = cW(aq, dD, dA, dv) | |
776 | + | if ((dE == dE)) | |
716 | 777 | then { | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | then ( | |
734 | - | else | |
735 | - | $Tuple2(nil, [ | |
778 | + | let dF = dE._6 | |
779 | + | let dG = dE._5 | |
780 | + | let cG = dE._4 | |
781 | + | let do = dE._3 | |
782 | + | let cF = dE._2 | |
783 | + | let dn = dE._1 | |
784 | + | let dH = am(Address(fromBase58String(aq)), aT) | |
785 | + | let dI = dH._1 | |
786 | + | let dJ = dH._2 | |
787 | + | let dK = dH._3 | |
788 | + | let dL = dH._4 | |
789 | + | let dM = dH._5 | |
790 | + | let dN = fraction(al, h, ak) | |
791 | + | let dO = fraction(dL, h, dK) | |
792 | + | let dP = (h - fraction(dN, h, dO)) | |
793 | + | let dQ = if ((0 > dP)) | |
794 | + | then (dP * -1) | |
795 | + | else dP | |
796 | + | $Tuple2(nil, [dG, dF, dQ]) | |
736 | 797 | } | |
737 | 798 | else throw("Strict value is not equal to itself.") | |
738 | 799 | } | |
739 | 800 | ||
740 | 801 | ||
741 | 802 | ||
742 | - | @Callable( | |
743 | - | func replenishFromLandEVALONLY ( | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
755 | - | let | |
756 | - | if ((size( | |
803 | + | @Callable(W) | |
804 | + | func replenishFromLandEVALONLY (dq) = { | |
805 | + | let dR = dp(dq) | |
806 | + | let at = dR._1 | |
807 | + | let aq = dR._2 | |
808 | + | let bi = dR._3 | |
809 | + | let bN = dR._4 | |
810 | + | let bk = dR._5 | |
811 | + | let bO = dR._6 | |
812 | + | let ak = dR._7 | |
813 | + | let al = dR._8 | |
814 | + | let aj = dR._9 | |
815 | + | let ds = dR._10 | |
816 | + | let dt = dR._11 | |
817 | + | if ((size(W.payments) != 1)) | |
757 | 818 | then throw("Wrong payment size") | |
758 | - | else if (if (( | |
819 | + | else if (if ((aB(W.payments[0].assetId) != ds)) | |
759 | 820 | then true | |
760 | - | else ( | |
821 | + | else (W.payments[0].amount != dt)) | |
761 | 822 | then throw("Wrong payment") | |
762 | 823 | else { | |
763 | - | let | |
764 | - | then $Tuple2(( | |
765 | - | else $Tuple2( | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", | |
824 | + | let dS = if ((bN == ds)) | |
825 | + | then $Tuple2((bi + W.payments[0].amount), bk) | |
826 | + | else $Tuple2(bi, (bk + W.payments[0].amount)) | |
827 | + | let dT = dS._1 | |
828 | + | let dU = dS._2 | |
829 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
830 | + | let dV = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj) | |
831 | + | let dD = dV._1 | |
832 | + | let cB = dV._2 | |
833 | + | $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", dD)], dD) | |
773 | 834 | } | |
774 | 835 | } | |
775 | 836 | ||
776 | 837 | ||
777 | 838 | ||
778 | - | @Callable( | |
779 | - | func replenish ( | |
839 | + | @Callable(W) | |
840 | + | func replenish (aq,du,dv) = if (if ((100 > du)) | |
780 | 841 | then true | |
781 | - | else ( | |
842 | + | else (du > 300)) | |
782 | 843 | then throw("Leverage can't be <100 and >300") | |
783 | 844 | else { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | then if (( | |
845 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
846 | + | let dW = am(Address(fromBase58String(aq)), aT) | |
847 | + | let bN = dW._1 | |
848 | + | let bO = dW._2 | |
849 | + | let ak = dW._3 | |
850 | + | let al = dW._4 | |
851 | + | let aj = dW._5 | |
852 | + | let dX = if ((size(W.payments) == 2)) | |
853 | + | then if ((aB(W.payments[0].assetId) != bN)) | |
793 | 854 | then throw("Wrong payment asset A") | |
794 | - | else if (( | |
855 | + | else if ((aB(W.payments[1].assetId) != bO)) | |
795 | 856 | then throw("Wrong payment asset B") | |
796 | - | else $Tuple4( | |
797 | - | else if ((size( | |
798 | - | then if (( | |
799 | - | then $Tuple4( | |
800 | - | else if (( | |
801 | - | then $Tuple4(0, | |
857 | + | else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO) | |
858 | + | else if ((size(W.payments) == 1)) | |
859 | + | then if ((aB(W.payments[0].assetId) == bN)) | |
860 | + | then $Tuple4(W.payments[0].amount, bN, 0, bO) | |
861 | + | else if ((aB(W.payments[0].assetId) == bO)) | |
862 | + | then $Tuple4(0, bN, W.payments[0].amount, bO) | |
802 | 863 | else throw("Wrong payment") | |
803 | 864 | else throw("One or two payments expected") | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | if (( | |
865 | + | let bi = dX._1 | |
866 | + | let bj = dX._2 | |
867 | + | let bk = dX._3 | |
868 | + | let bl = dX._4 | |
869 | + | let dY = as(aq, toString(W.caller)) | |
870 | + | if ((du > 100)) | |
810 | 871 | then { | |
811 | - | let | |
812 | - | if ($isInstanceOf( | |
813 | - | then | |
814 | - | else throw(($getType( | |
815 | - | let | |
816 | - | if ($isInstanceOf( | |
817 | - | then | |
818 | - | else throw(($getType( | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | let | |
823 | - | let | |
824 | - | if ($isInstanceOf( | |
825 | - | then | |
826 | - | else throw(($getType( | |
872 | + | let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil) | |
873 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
874 | + | then ag | |
875 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
876 | + | let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil) | |
877 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
878 | + | then ag | |
879 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
880 | + | let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN))) | |
881 | + | let dA = fraction(dz, (du - 100), 100) | |
882 | + | let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA)], ",") | |
883 | + | let dB = { | |
884 | + | let ag = invoke(this, "createNewRequest", [dr], nil) | |
885 | + | if ($isInstanceOf(ag, "Int")) | |
886 | + | then ag | |
887 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
827 | 888 | } | |
828 | - | if (( | |
889 | + | if ((dB == dB)) | |
829 | 890 | then { | |
830 | - | let | |
831 | - | let | |
832 | - | if (( | |
891 | + | let dC = [((toString(W.caller) + "_") + toString(dY)), aj, dv, dA, toString(this), "replenishFromLand", toString(valueOrErrorMessage(dB, "Can't create new request"))] | |
892 | + | let bX = reentrantInvoke(aA(), "flashPosition", dC, nil) | |
893 | + | if ((bX == bX)) | |
833 | 894 | then nil | |
834 | 895 | else throw("Strict value is not equal to itself.") | |
835 | 896 | } | |
836 | 897 | else throw("Strict value is not equal to itself.") | |
837 | 898 | } | |
838 | 899 | else { | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | | |
900 | + | let dZ = bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj) | |
901 | + | let dD = dZ._1 | |
902 | + | let cB = dZ._2 | |
903 | + | (bP(aq, toString(W.caller), dD, cB, dY, aj, aT) ++ bf(bN, bO, aj)) | |
843 | 904 | } | |
844 | 905 | } | |
845 | 906 | ||
846 | 907 | ||
847 | 908 | ||
848 | - | @Callable( | |
849 | - | func replenishFromLand ( | |
850 | - | let | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | if ((size( | |
909 | + | @Callable(W) | |
910 | + | func replenishFromLand (dq) = { | |
911 | + | let ea = dp(dq) | |
912 | + | let at = ea._1 | |
913 | + | let aq = ea._2 | |
914 | + | let bi = ea._3 | |
915 | + | let bN = ea._4 | |
916 | + | let bk = ea._5 | |
917 | + | let bO = ea._6 | |
918 | + | let ak = ea._7 | |
919 | + | let al = ea._8 | |
920 | + | let aj = ea._9 | |
921 | + | let ds = ea._10 | |
922 | + | let dt = ea._11 | |
923 | + | if ((size(W.payments) != 1)) | |
863 | 924 | then throw("Wrong payment size") | |
864 | - | else if (if (( | |
925 | + | else if (if ((aB(W.payments[0].assetId) != ds)) | |
865 | 926 | then true | |
866 | - | else ( | |
927 | + | else (W.payments[0].amount != dt)) | |
867 | 928 | then throw("Wrong payment") | |
868 | 929 | else { | |
869 | - | let | |
870 | - | then $Tuple2(( | |
871 | - | else $Tuple2( | |
872 | - | let | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | $Tuple2((( | |
930 | + | let eb = if ((bN == ds)) | |
931 | + | then $Tuple2((bi + W.payments[0].amount), bk) | |
932 | + | else $Tuple2(bi, (bk + W.payments[0].amount)) | |
933 | + | let dT = eb._1 | |
934 | + | let dU = eb._2 | |
935 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
936 | + | let ec = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj) | |
937 | + | let dD = ec._1 | |
938 | + | let cB = ec._2 | |
939 | + | let bR = as(aq, toString(W.caller)) | |
940 | + | let ed = [IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + s), dt), StringEntry((((((aq + "_") + at) + "_") + toString(bR)) + t), ds)] | |
941 | + | let ee = bP(aq, at, dD, cB, bR, aj, aT) | |
942 | + | $Tuple2((((ee ++ bf(bN, bO, aj)) ++ ed) :+ DeleteEntry((dq + D))), dD) | |
882 | 943 | } | |
883 | 944 | } | |
884 | 945 | ||
885 | 946 | ||
886 | 947 | ||
887 | - | @Callable( | |
888 | - | func withdraw ( | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
948 | + | @Callable(W) | |
949 | + | func withdraw (aq,ef) = { | |
950 | + | let at = toString(W.caller) | |
951 | + | let eg = valueOrErrorMessage(getInteger(this, (((((aq + "_") + at) + "_") + toString(ef)) + r)), "Unknown position") | |
952 | + | let eh = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + v)) | |
953 | + | let ei = getIntegerValue(this, (aq + y)) | |
954 | + | let ej = ap(aq) | |
955 | + | let cX = (eg + fraction(eg, (ei - eh), i)) | |
956 | + | let ek = Address(fromBase58String(at)) | |
957 | + | let dA = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + s)) | |
958 | + | let cZ = getStringValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + t)) | |
959 | + | let cY = if ((dA > 0)) | |
899 | 960 | then { | |
900 | - | let | |
901 | - | if ($isInstanceOf( | |
902 | - | then | |
903 | - | else throw(($getType( | |
961 | + | let ag = invoke(aA(), "getAssetDebt", [false, ((((aq + "_") + at) + "_") + toString(ef)), cZ], nil) | |
962 | + | if ($isInstanceOf(ag, "Int")) | |
963 | + | then ag | |
964 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
904 | 965 | } | |
905 | 966 | else 0 | |
906 | - | let | |
907 | - | if (( | |
967 | + | let el = cW(aq, cX, cY, cZ) | |
968 | + | if ((el == el)) | |
908 | 969 | then { | |
909 | - | let cb = dJ._4 | |
910 | - | let cJ = dJ._3 | |
911 | - | let ca = dJ._2 | |
912 | - | let cI = dJ._1 | |
913 | - | let dK = if ((ct > 0)) | |
914 | - | then invoke(aw(), "repayFor", [((ap + "_") + toString(dD))], [AttachedPayment(ay(cu), ct)]) | |
970 | + | let aj = el._7 | |
971 | + | let de = el._6 | |
972 | + | let dd = el._5 | |
973 | + | let cG = el._4 | |
974 | + | let do = el._3 | |
975 | + | let cF = el._2 | |
976 | + | let dn = el._1 | |
977 | + | let em = if ((cY > 0)) | |
978 | + | then invoke(aA(), "repayFor", [((at + "_") + toString(ef))], [AttachedPayment(aC(cZ), cY)]) | |
915 | 979 | else 0 | |
916 | - | if (( | |
917 | - | then [DeleteEntry(((((( | |
980 | + | if ((em == em)) | |
981 | + | then ([DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + r)), DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + v)), IntegerEntry((aq + w), (ej - cX)), ScriptTransfer(ek, dn, aC(cF)), ScriptTransfer(ek, do, aC(cG))] ++ bf(cF, cG, aj)) | |
918 | 982 | else throw("Strict value is not equal to itself.") | |
919 | 983 | } | |
920 | 984 | else throw("Strict value is not equal to itself.") | |
922 | 986 | ||
923 | 987 | ||
924 | 988 | ||
925 | - | @Callable( | |
926 | - | func createNewRequest ( | |
927 | - | let | |
928 | - | $Tuple2([StringEntry((toString( | |
989 | + | @Callable(W) | |
990 | + | func createNewRequest (en) = valueOrElse(V(W), { | |
991 | + | let dB = (valueOrElse(getInteger(this, E), 0) + 1) | |
992 | + | $Tuple2([StringEntry((toString(dB) + D), en), IntegerEntry(E, dB)], dB) | |
929 | 993 | }) | |
930 | 994 | ||
931 | 995 | ||
932 | 996 | ||
933 | - | @Callable( | |
934 | - | func capitalizeExKeeper ( | |
935 | - | let | |
936 | - | then | |
997 | + | @Callable(W) | |
998 | + | func capitalizeExKeeper (aq,an,eo,ep,eq,cd,ce,cf,cg,ch,ci,cj) = { | |
999 | + | let er = if (eq) | |
1000 | + | then bV(an, aq) | |
937 | 1001 | else { | |
938 | - | let | |
939 | - | then | |
940 | - | else | |
941 | - | $Tuple2( | |
1002 | + | let es = if ((an == a)) | |
1003 | + | then T | |
1004 | + | else U | |
1005 | + | $Tuple2(ep, es) | |
942 | 1006 | } | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | let | |
948 | - | then [IntegerEntry(( | |
1007 | + | let et = er._1 | |
1008 | + | let es = er._2 | |
1009 | + | let eu = bZ(eo, ep, es, cd, ce, cf, cg, ch, ci, cj) | |
1010 | + | let bt = (et - ep) | |
1011 | + | let ev = if ((bt > 0)) | |
1012 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
949 | 1013 | else nil | |
950 | - | ( | |
1014 | + | (cv(aq, an, eo, eu) ++ ev) | |
951 | 1015 | } | |
952 | 1016 | ||
953 | 1017 | ||
954 | 1018 | ||
955 | - | @Callable( | |
956 | - | func capitalizeExPazzle ( | |
957 | - | let | |
958 | - | then | |
1019 | + | @Callable(W) | |
1020 | + | func capitalizeExPazzle (aq,an,eo,ep,eq,cm,cn,cj) = { | |
1021 | + | let ew = if (eq) | |
1022 | + | then bV(an, aq) | |
959 | 1023 | else { | |
960 | - | let | |
961 | - | then | |
962 | - | else | |
963 | - | $Tuple2( | |
1024 | + | let es = if ((an == a)) | |
1025 | + | then T | |
1026 | + | else U | |
1027 | + | $Tuple2(ep, es) | |
964 | 1028 | } | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | then [IntegerEntry(( | |
1029 | + | let et = ew._1 | |
1030 | + | let es = ew._2 | |
1031 | + | let eu = cl(eo, ep, es, cm, cn, cj) | |
1032 | + | let bt = (et - ep) | |
1033 | + | let ev = if ((bt > 0)) | |
1034 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
971 | 1035 | else nil | |
972 | - | ( | |
1036 | + | (cv(aq, an, eo, eu) ++ ev) | |
973 | 1037 | } | |
974 | 1038 | ||
975 | 1039 | ||
976 | 1040 | ||
977 | - | @Callable( | |
978 | - | func capitalizeExSwopFi ( | |
979 | - | let | |
980 | - | then | |
1041 | + | @Callable(W) | |
1042 | + | func capitalizeExSwopFi (aq,an,eo,ep,eq,cp,cq,cr,cs,ct,cu,cj) = { | |
1043 | + | let ex = if (eq) | |
1044 | + | then bV(an, aq) | |
981 | 1045 | else { | |
982 | - | let | |
983 | - | then | |
984 | - | else | |
985 | - | $Tuple2( | |
1046 | + | let es = if ((an == a)) | |
1047 | + | then T | |
1048 | + | else U | |
1049 | + | $Tuple2(ep, es) | |
986 | 1050 | } | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | then [IntegerEntry(( | |
1051 | + | let et = ex._1 | |
1052 | + | let es = ex._2 | |
1053 | + | let eu = co(eo, ep, es, cp, cq, cr, cs, ct, cu, cj) | |
1054 | + | let bt = (et - ep) | |
1055 | + | let ev = if ((bt > 0)) | |
1056 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
993 | 1057 | else nil | |
994 | - | ( | |
1058 | + | (cv(aq, an, eo, eu) ++ ev) | |
995 | 1059 | } | |
996 | 1060 | ||
997 | 1061 | ||
998 | 1062 | ||
999 | - | @Callable( | |
1000 | - | func initNewPool ( | |
1001 | - | then ( | |
1063 | + | @Callable(W) | |
1064 | + | func initNewPool (an,ad,ey,ez,eA,eB) = if (if ((an != a)) | |
1065 | + | then (an != b) | |
1002 | 1066 | else false) | |
1003 | 1067 | then throw("Wrong type") | |
1004 | 1068 | else { | |
1005 | - | let | |
1006 | - | let | |
1007 | - | let | |
1008 | - | let | |
1009 | - | let | |
1010 | - | let | |
1011 | - | [IntegerEntry(( | |
1069 | + | let eC = am(Address(fromBase58String(ad)), an) | |
1070 | + | let ah = eC._1 | |
1071 | + | let ai = eC._2 | |
1072 | + | let eD = eC._3 | |
1073 | + | let eE = eC._4 | |
1074 | + | let aj = eC._5 | |
1075 | + | [IntegerEntry((ad + z), ey), IntegerEntry((ad + A), ez), IntegerEntry((ad + B), eA), IntegerEntry((ad + C), eB), IntegerEntry((ad + y), 0), StringEntry((F + ad), an), StringEntry((aj + G), ad)] | |
1012 | 1076 | } | |
1013 | 1077 | ||
1014 | 1078 | ||
1015 | - | @Verifier( | |
1016 | - | func | |
1079 | + | @Verifier(eF) | |
1080 | + | func eG () = sigVerify(eF.bodyBytes, eF.proofs[0], eF.senderPublicKey) | |
1017 | 1081 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "SF" | |
5 | 5 | ||
6 | 6 | let b = "WX" | |
7 | 7 | ||
8 | 8 | let c = "capNoLoan" | |
9 | 9 | ||
10 | 10 | let d = "capLoan" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "cap" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "loan" | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = "noLoan" | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 100000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 10000000000 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 1000000 | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "A_asset_balance" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "B_asset_balance" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "A_asset_id" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "B_asset_id" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "share_asset_id" | |
33 | 33 | ||
34 | - | let p = "_ | |
34 | + | let p = "share_asset_supply" | |
35 | 35 | ||
36 | - | let q = " | |
36 | + | let q = "commission" | |
37 | 37 | ||
38 | - | let r = "_user_position | |
38 | + | let r = "_user_position" | |
39 | 39 | ||
40 | - | let s = "_user_position_ | |
40 | + | let s = "_user_position_borrow_amount" | |
41 | 41 | ||
42 | - | let t = "_user_position_ | |
42 | + | let t = "_user_position_borrow_asset_id" | |
43 | 43 | ||
44 | - | let u = "_ | |
44 | + | let u = "_user_position_number" | |
45 | 45 | ||
46 | - | let v = "_ | |
46 | + | let v = "_user_position_interest" | |
47 | 47 | ||
48 | - | let w = "_pool_ | |
48 | + | let w = "_pool_total" | |
49 | 49 | ||
50 | - | let x = "_ | |
50 | + | let x = "_pool_total_loan" | |
51 | 51 | ||
52 | - | let y = "_ | |
52 | + | let y = "_pool_interest" | |
53 | 53 | ||
54 | - | let z = "_axly_fee_ | |
54 | + | let z = "_axly_fee_without_loan" | |
55 | 55 | ||
56 | - | let A = "_axly_fee_ | |
56 | + | let A = "_axly_fee_with_loan" | |
57 | 57 | ||
58 | - | let B = "_ | |
58 | + | let B = "_axly_fee_cap_with_loan" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "_axly_fee_cap_no_loan" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "_request_id" | |
63 | 63 | ||
64 | - | let E = "_ | |
64 | + | let E = "requests_iter" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "pool_" | |
67 | 67 | ||
68 | - | let G = " | |
68 | + | let G = "_pool_share_id" | |
69 | 69 | ||
70 | - | let H = " | |
70 | + | let H = "_pool_cap_change" | |
71 | 71 | ||
72 | - | let I = " | |
72 | + | let I = "_last_price" | |
73 | 73 | ||
74 | - | let J = " | |
74 | + | let J = "axly_money_box" | |
75 | 75 | ||
76 | - | let K = " | |
76 | + | let K = "swopfi_farming_addr" | |
77 | 77 | ||
78 | - | let L = " | |
78 | + | let L = "lend_service_addr" | |
79 | 79 | ||
80 | - | let M = | |
80 | + | let M = "price_oracle" | |
81 | 81 | ||
82 | - | let N = | |
82 | + | let N = "exchange_contract" | |
83 | 83 | ||
84 | - | let O = | |
84 | + | let O = "wx_swap_contract" | |
85 | 85 | ||
86 | - | let P = Address(fromBase58String(valueOrErrorMessage(getString(this, | |
86 | + | let P = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No axly moneyBox address"))) | |
87 | 87 | ||
88 | - | let Q = | |
88 | + | let Q = Address(fromBase58String(valueOrErrorMessage(getString(this, N), "No exchange contract address"))) | |
89 | 89 | ||
90 | - | let R = | |
90 | + | let R = Address(fromBase58String(valueOrErrorMessage(getString(this, M), "No price oracle address"))) | |
91 | 91 | ||
92 | - | func S (T) = if ((T.caller == this)) | |
92 | + | let S = Address(fromBase58String(valueOrErrorMessage(getString(this, O), "No wx swap address"))) | |
93 | + | ||
94 | + | let T = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
95 | + | ||
96 | + | let U = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
97 | + | ||
98 | + | func V (W) = if ((W.caller == this)) | |
93 | 99 | then unit | |
94 | 100 | else throw("Only contract itself can call this function") | |
95 | 101 | ||
96 | 102 | ||
97 | - | func | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
103 | + | func X (Y) = { | |
104 | + | let Z = Y | |
105 | + | if ($isInstanceOf(Z, "ByteVector")) | |
100 | 106 | then { | |
101 | - | let | |
102 | - | assetBalance(this, | |
107 | + | let aa = Z | |
108 | + | assetBalance(this, aa) | |
103 | 109 | } | |
104 | - | else if ($isInstanceOf( | |
110 | + | else if ($isInstanceOf(Z, "Unit")) | |
105 | 111 | then { | |
106 | - | let | |
112 | + | let ab = Z | |
107 | 113 | wavesBalance(this).available | |
108 | 114 | } | |
109 | 115 | else throw("Match error") | |
110 | 116 | } | |
111 | 117 | ||
112 | 118 | ||
113 | - | func | |
119 | + | func ac (ad) = $Tuple5(valueOrErrorMessage(getString(ad, m), "Can't get pool A asset id"), valueOrErrorMessage(getString(ad, n), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(ad, k), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(ad, l), "Can't get pool B asset balance"), valueOrErrorMessage(getString(ad, o), "Can't get share asset id")) | |
114 | 120 | ||
115 | 121 | ||
116 | - | func | |
117 | - | let | |
118 | - | let | |
119 | - | if ($isInstanceOf( | |
120 | - | then | |
121 | - | else throw(($getType( | |
122 | + | func ae (ad) = { | |
123 | + | let af = { | |
124 | + | let ag = invoke(ad, "getPoolConfigWrapperREADONLY", nil, nil) | |
125 | + | if ($isInstanceOf(ag, "List[Any]")) | |
126 | + | then ag | |
127 | + | else throw(($getType(ag) + " couldn't be cast to List[Any]")) | |
122 | 128 | } | |
123 | - | if (( | |
129 | + | if ((af == af)) | |
124 | 130 | then { | |
125 | - | let | |
126 | - | let | |
127 | - | if ($isInstanceOf( | |
128 | - | then | |
131 | + | let ah = valueOrErrorMessage({ | |
132 | + | let ag = af[4] | |
133 | + | if ($isInstanceOf(ag, "String")) | |
134 | + | then ag | |
129 | 135 | else unit | |
130 | 136 | }, "Can't get pool A asset id") | |
131 | - | let | |
132 | - | let | |
133 | - | if ($isInstanceOf( | |
134 | - | then | |
137 | + | let ai = valueOrErrorMessage({ | |
138 | + | let ag = af[5] | |
139 | + | if ($isInstanceOf(ag, "String")) | |
140 | + | then ag | |
135 | 141 | else unit | |
136 | 142 | }, "Can't get pool B asset id") | |
137 | - | let | |
138 | - | let | |
139 | - | if ($isInstanceOf( | |
140 | - | then | |
143 | + | let aj = valueOrErrorMessage({ | |
144 | + | let ag = af[3] | |
145 | + | if ($isInstanceOf(ag, "String")) | |
146 | + | then ag | |
141 | 147 | else unit | |
142 | 148 | }, "Can't get pool LP asset id") | |
143 | - | let | |
144 | - | let | |
145 | - | if ($isInstanceOf( | |
146 | - | then | |
147 | - | else throw(($getType( | |
149 | + | let ak = { | |
150 | + | let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ah], nil) | |
151 | + | if ($isInstanceOf(ag, "Int")) | |
152 | + | then ag | |
153 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
148 | 154 | } | |
149 | - | if (( | |
155 | + | if ((ak == ak)) | |
150 | 156 | then { | |
151 | - | let | |
152 | - | let | |
153 | - | if ($isInstanceOf( | |
154 | - | then | |
155 | - | else throw(($getType( | |
157 | + | let al = { | |
158 | + | let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ai], nil) | |
159 | + | if ($isInstanceOf(ag, "Int")) | |
160 | + | then ag | |
161 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
156 | 162 | } | |
157 | - | if (( | |
158 | - | then $Tuple5( | |
163 | + | if ((al == al)) | |
164 | + | then $Tuple5(ah, ai, ak, al, aj) | |
159 | 165 | else throw("Strict value is not equal to itself.") | |
160 | 166 | } | |
161 | 167 | else throw("Strict value is not equal to itself.") | |
162 | 168 | } | |
163 | 169 | else throw("Strict value is not equal to itself.") | |
164 | 170 | } | |
165 | 171 | ||
166 | 172 | ||
167 | - | func | |
168 | - | then | |
169 | - | else if (( | |
170 | - | then | |
173 | + | func am (ad,an) = if ((an == a)) | |
174 | + | then ac(ad) | |
175 | + | else if ((an == b)) | |
176 | + | then ae(ad) | |
171 | 177 | else throw("Wrong pool type") | |
172 | 178 | ||
173 | 179 | ||
174 | - | func al (am) = valueOrElse(getInteger(this, (am + u)), 0) | |
180 | + | func ao (ad,an,aj) = if ((an == a)) | |
181 | + | then valueOrErrorMessage(getInteger(ad, p), "Can't get share asset supply") | |
182 | + | else if ((an == b)) | |
183 | + | then valueOrErrorMessage(assetInfo(fromBase58String(aj)), "Wrong ShareId").quantity | |
184 | + | else throw("Wrong pool type") | |
175 | 185 | ||
176 | 186 | ||
177 | - | func | |
187 | + | func ap (aq) = valueOrElse(getInteger(this, (aq + w)), 0) | |
178 | 188 | ||
179 | 189 | ||
180 | - | func | |
190 | + | func ar (aq) = valueOrElse(getInteger(this, (aq + x)), 0) | |
181 | 191 | ||
182 | 192 | ||
183 | - | func aq (am,ar) = if ((ar == d)) | |
184 | - | then getIntegerValue(this, (am + A)) | |
185 | - | else if ((ar == c)) | |
186 | - | then getIntegerValue(this, (am + z)) | |
187 | - | else if ((ar == e)) | |
188 | - | then getIntegerValue(this, (am + y)) | |
189 | - | else if ((ar == f)) | |
190 | - | then getIntegerValue(this, (am + x)) | |
193 | + | func as (aq,at) = (valueOrElse(getInteger(this, (((aq + "_") + at) + u)), 0) + 1) | |
194 | + | ||
195 | + | ||
196 | + | func au (aq,av) = if ((av == d)) | |
197 | + | then getIntegerValue(this, (aq + C)) | |
198 | + | else if ((av == c)) | |
199 | + | then getIntegerValue(this, (aq + B)) | |
200 | + | else if ((av == f)) | |
201 | + | then getIntegerValue(this, (aq + A)) | |
202 | + | else if ((av == g)) | |
203 | + | then getIntegerValue(this, (aq + z)) | |
191 | 204 | else throw("Wrong fee type") | |
192 | 205 | ||
193 | 206 | ||
194 | - | func | |
207 | + | func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "Can't get swopfi farming addr"))) | |
195 | 208 | ||
196 | 209 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | Address(fromBase58String( | |
210 | + | func ax (ad) = { | |
211 | + | let ay = Address(fromBase58String(valueOrErrorMessage(getString(ad, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
212 | + | let az = split(valueOrErrorMessage(getString(ay, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
213 | + | Address(fromBase58String(az[1])) | |
201 | 214 | } | |
202 | 215 | ||
203 | 216 | ||
204 | - | func | |
217 | + | func aA () = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "Can't get lend service addr"))) | |
205 | 218 | ||
206 | 219 | ||
207 | - | func | |
208 | - | let | |
209 | - | if ($isInstanceOf( | |
220 | + | func aB (Y) = { | |
221 | + | let Z = Y | |
222 | + | if ($isInstanceOf(Z, "ByteVector")) | |
210 | 223 | then { | |
211 | - | let | |
212 | - | toBase58String( | |
224 | + | let aa = Z | |
225 | + | toBase58String(aa) | |
213 | 226 | } | |
214 | - | else if ($isInstanceOf( | |
227 | + | else if ($isInstanceOf(Z, "Unit")) | |
215 | 228 | then { | |
216 | - | let | |
229 | + | let ab = Z | |
217 | 230 | "WAVES" | |
218 | 231 | } | |
219 | 232 | else throw("Match error") | |
220 | 233 | } | |
221 | 234 | ||
222 | 235 | ||
223 | - | func | |
236 | + | func aC (Y) = if ((Y == "WAVES")) | |
224 | 237 | then unit | |
225 | - | else fromBase58String( | |
238 | + | else fromBase58String(Y) | |
226 | 239 | ||
227 | 240 | ||
228 | - | func | |
241 | + | func aD (Y) = if ((Y == "WAVES")) | |
229 | 242 | then 8 | |
230 | 243 | else { | |
231 | - | let | |
232 | - | if ($isInstanceOf( | |
244 | + | let Z = assetInfo(fromBase58String(Y)) | |
245 | + | if ($isInstanceOf(Z, "Asset")) | |
233 | 246 | then { | |
234 | - | let | |
235 | - | | |
247 | + | let aE = Z | |
248 | + | aE.decimals | |
236 | 249 | } | |
237 | 250 | else throw("Can't find asset") | |
238 | 251 | } | |
239 | 252 | ||
240 | 253 | ||
241 | - | func aB (am,ar,aC,aD,aE,aF,ah,ai,ag) = { | |
242 | - | let aG = U(fromBase58String(ag)) | |
243 | - | if ((aG == aG)) | |
254 | + | func aF (aG) = { | |
255 | + | func aH (aI,Y) = { | |
256 | + | let aJ = ( let ag = invoke(R, "getTWAP60", [Y, false], nil) | |
257 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
258 | + | then ag | |
259 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
260 | + | (aI :+ aJ) | |
261 | + | } | |
262 | + | ||
263 | + | let aK = aG | |
264 | + | let aL = size(aK) | |
265 | + | let aM = nil | |
266 | + | func aN (aO,aP) = if ((aP >= aL)) | |
267 | + | then aO | |
268 | + | else aH(aO, aK[aP]) | |
269 | + | ||
270 | + | func aQ (aO,aP) = if ((aP >= aL)) | |
271 | + | then aO | |
272 | + | else throw("List size exceeds 100") | |
273 | + | ||
274 | + | aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
275 | + | } | |
276 | + | ||
277 | + | ||
278 | + | func aR (aS) = { | |
279 | + | func aH (aI,aj) = { | |
280 | + | let aq = valueOrErrorMessage(getString(this, (aj + G)), "Can't find pool addr by share id") | |
281 | + | let ad = Address(fromBase58String(aq)) | |
282 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
283 | + | let aU = am(ad, aT) | |
284 | + | let ah = aU._1 | |
285 | + | let ai = aU._2 | |
286 | + | let aV = aU._3 | |
287 | + | let aW = aU._4 | |
288 | + | let aX = ( let ag = invoke(R, "getTWAP60", [ah, false], nil) | |
289 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
290 | + | then ag | |
291 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
292 | + | let aY = ( let ag = invoke(R, "getTWAP60", [ai, false], nil) | |
293 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
294 | + | then ag | |
295 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
296 | + | let aZ = ao(ad, aT, aj) | |
297 | + | let ba = pow(10, 0, aD(ah), 0, 0, DOWN) | |
298 | + | let bb = pow(10, 0, aD(ai), 0, 0, DOWN) | |
299 | + | let bc = pow(10, 0, aD(aj), 0, 0, DOWN) | |
300 | + | let bd = (fraction(aV, aX, ba) + fraction(aW, aY, bb)) | |
301 | + | let be = fraction(bd, bc, aZ) | |
302 | + | (aI :+ be) | |
303 | + | } | |
304 | + | ||
305 | + | let aK = aS | |
306 | + | let aL = size(aK) | |
307 | + | let aM = nil | |
308 | + | func aN (aO,aP) = if ((aP >= aL)) | |
309 | + | then aO | |
310 | + | else aH(aO, aK[aP]) | |
311 | + | ||
312 | + | func aQ (aO,aP) = if ((aP >= aL)) | |
313 | + | then aO | |
314 | + | else throw("List size exceeds 50") | |
315 | + | ||
316 | + | aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
317 | + | } | |
318 | + | ||
319 | + | ||
320 | + | func bf (ah,ai,aj) = { | |
321 | + | let bg = aF([ah, ai]) | |
322 | + | let be = aR([aj]) | |
323 | + | [IntegerEntry((ah + I), bg[0]), IntegerEntry((ai + I), bg[1]), IntegerEntry((aj + I), be[0])] | |
324 | + | } | |
325 | + | ||
326 | + | ||
327 | + | func bh (aq,av,bi,bj,bk,bl,ak,al,aj) = { | |
328 | + | let bm = X(fromBase58String(aj)) | |
329 | + | if ((bm == bm)) | |
244 | 330 | then { | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
331 | + | let ad = Address(fromBase58String(aq)) | |
332 | + | let bn = fraction(h, bi, ak) | |
333 | + | let bo = fraction(h, bk, al) | |
334 | + | let bp = if ((bo > bn)) | |
249 | 335 | then { | |
250 | - | let | |
251 | - | $Tuple4( | |
336 | + | let bq = fraction(al, bn, h, CEILING) | |
337 | + | $Tuple4(bi, bq, (bk - bq), bl) | |
252 | 338 | } | |
253 | 339 | else { | |
254 | - | let | |
255 | - | $Tuple4( | |
340 | + | let bq = fraction(ak, bo, h, CEILING) | |
341 | + | $Tuple4(bq, bk, (bi - bq), bj) | |
256 | 342 | } | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then ( | |
343 | + | let br = bp._1 | |
344 | + | let bs = bp._2 | |
345 | + | let bt = bp._3 | |
346 | + | let bu = bp._4 | |
347 | + | let bv = if (if ((br > 0)) | |
348 | + | then (bs > 0) | |
263 | 349 | else false) | |
264 | 350 | then { | |
265 | - | let | |
266 | - | invoke( | |
351 | + | let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)] | |
352 | + | invoke(ad, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bw) | |
267 | 353 | } | |
268 | 354 | else 0 | |
269 | - | if (( | |
355 | + | if ((bv == bv)) | |
270 | 356 | then { | |
271 | - | let | |
357 | + | let bx = if ((bt > 0)) | |
272 | 358 | then { | |
273 | - | let | |
274 | - | let | |
275 | - | invoke( | |
359 | + | let bw = [AttachedPayment(aC(bu), bt)] | |
360 | + | let by = ["0", "false", "0"] | |
361 | + | invoke(ad, "callFunction", ["replenishWithOneToken", by], bw) | |
276 | 362 | } | |
277 | 363 | else 0 | |
278 | - | if (( | |
364 | + | if ((bx == bx)) | |
279 | 365 | then { | |
280 | - | let aT = U(fromBase58String(ag)) | |
281 | - | let aU = (aT - aG) | |
282 | - | let aV = fraction(aU, aq(am, ar), i) | |
283 | - | let aW = (aU - aV) | |
284 | - | if ((0 >= aW)) | |
366 | + | let bz = X(fromBase58String(aj)) | |
367 | + | let bA = (bz - bm) | |
368 | + | let bB = if ((av == e)) | |
369 | + | then fraction(bA, au(aq, av), j) | |
370 | + | else fraction(bA, au(aq, av), j) | |
371 | + | let bC = (bA - bB) | |
372 | + | if ((0 >= bC)) | |
285 | 373 | then throw("amount of staked sharetokens must be > 0") | |
286 | 374 | else { | |
287 | - | let | |
288 | - | if (( | |
289 | - | then $Tuple2( | |
375 | + | let bD = invoke(aw(), "lockShareTokens", [aq, 0], [AttachedPayment(fromBase58String(aj), bC)]) | |
376 | + | if ((bD == bD)) | |
377 | + | then $Tuple2(bC, bB) | |
290 | 378 | else throw("Strict value is not equal to itself.") | |
291 | 379 | } | |
292 | 380 | } | |
293 | 381 | else throw("Strict value is not equal to itself.") | |
294 | 382 | } | |
295 | 383 | else throw("Strict value is not equal to itself.") | |
296 | 384 | } | |
297 | 385 | else throw("Strict value is not equal to itself.") | |
298 | 386 | } | |
299 | 387 | ||
300 | 388 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | then ( | |
389 | + | func bE (aq,av,bi,bj,bk,bl,aj) = { | |
390 | + | let ad = Address(fromBase58String(aq)) | |
391 | + | let bF = if (if ((bi > 0)) | |
392 | + | then (bk > 0) | |
305 | 393 | else false) | |
306 | 394 | then { | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw(($getType( | |
395 | + | let bG = split({ | |
396 | + | let ag = invoke(ad, "evaluatePutByAmountAssetREADONLY", [bi], nil) | |
397 | + | if ($isInstanceOf(ag, "String")) | |
398 | + | then ag | |
399 | + | else throw(($getType(ag) + " couldn't be cast to String")) | |
312 | 400 | }, "__") | |
313 | - | if (( | |
401 | + | if ((bG == bG)) | |
314 | 402 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | if ($isInstanceOf( | |
318 | - | then | |
319 | - | else throw(($getType( | |
403 | + | let bH = split({ | |
404 | + | let ag = invoke(ad, "evaluatePutByPriceAssetREADONLY", [bk], nil) | |
405 | + | if ($isInstanceOf(ag, "String")) | |
406 | + | then ag | |
407 | + | else throw(($getType(ag) + " couldn't be cast to String")) | |
320 | 408 | }, "__") | |
321 | - | if (( | |
409 | + | if ((bH == bH)) | |
322 | 410 | then { | |
323 | - | let | |
324 | - | let | |
325 | - | if (( | |
411 | + | let bI = parseIntValue(bG[1]) | |
412 | + | let bJ = parseIntValue(bH[1]) | |
413 | + | if ((bJ > bI)) | |
326 | 414 | then { | |
327 | - | let | |
328 | - | $Tuple4( | |
415 | + | let bK = parseIntValue(bG[8]) | |
416 | + | $Tuple4(bi, bK, (bk - bK), bl) | |
329 | 417 | } | |
330 | 418 | else { | |
331 | - | let | |
332 | - | $Tuple4( | |
419 | + | let bL = parseIntValue(bH[7]) | |
420 | + | $Tuple4(bL, bk, (bi - bL), bj) | |
333 | 421 | } | |
334 | 422 | } | |
335 | 423 | else throw("Strict value is not equal to itself.") | |
336 | 424 | } | |
337 | 425 | else throw("Strict value is not equal to itself.") | |
338 | 426 | } | |
339 | - | else if (( | |
340 | - | then $Tuple4( | |
341 | - | else if (( | |
342 | - | then $Tuple4( | |
427 | + | else if ((bi > 0)) | |
428 | + | then $Tuple4(bi, bk, bi, bj) | |
429 | + | else if ((bk > 0)) | |
430 | + | then $Tuple4(bi, bk, bk, bl) | |
343 | 431 | else throw("pmts must be > 0") | |
344 | - | let | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | if (( | |
432 | + | let br = bF._1 | |
433 | + | let bs = bF._2 | |
434 | + | let bt = bF._3 | |
435 | + | let bu = bF._4 | |
436 | + | let bm = X(fromBase58String(aj)) | |
437 | + | if ((bm == bm)) | |
350 | 438 | then { | |
351 | - | let | |
352 | - | then ( | |
439 | + | let bv = if (if ((br > 0)) | |
440 | + | then (bs > 0) | |
353 | 441 | else false) | |
354 | 442 | then { | |
355 | - | let | |
356 | - | invoke( | |
443 | + | let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)] | |
444 | + | invoke(ad, "put", [1000000, false], bw) | |
357 | 445 | } | |
358 | 446 | else 0 | |
359 | - | if (( | |
447 | + | if ((bv == bv)) | |
360 | 448 | then { | |
361 | - | let | |
449 | + | let bx = if ((bt > 0)) | |
362 | 450 | then { | |
363 | - | let | |
364 | - | invoke( | |
451 | + | let bw = [AttachedPayment(aC(bu), bt)] | |
452 | + | invoke(ad, "putOneTkn", [0, false], bw) | |
365 | 453 | } | |
366 | 454 | else 0 | |
367 | - | if (( | |
455 | + | if ((bx == bx)) | |
368 | 456 | then { | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | if ((0 >= | |
457 | + | let bz = X(fromBase58String(aj)) | |
458 | + | let bA = (bz - bm) | |
459 | + | let bB = fraction(bA, au(aq, av), j) | |
460 | + | let bC = (bA - bB) | |
461 | + | if ((0 >= bC)) | |
374 | 462 | then throw("amount of staked sharetokens must be > 0") | |
375 | 463 | else { | |
376 | - | let | |
377 | - | if (( | |
378 | - | then $Tuple2( | |
464 | + | let bD = invoke(ax(ad), "stake", nil, [AttachedPayment(fromBase58String(aj), bC)]) | |
465 | + | if ((bD == bD)) | |
466 | + | then $Tuple2(bC, bB) | |
379 | 467 | else throw("Strict value is not equal to itself.") | |
380 | 468 | } | |
381 | 469 | } | |
382 | 470 | else throw("Strict value is not equal to itself.") | |
383 | 471 | } | |
384 | 472 | else throw("Strict value is not equal to itself.") | |
385 | 473 | } | |
386 | 474 | else throw("Strict value is not equal to itself.") | |
387 | 475 | } | |
388 | 476 | ||
389 | 477 | ||
390 | - | func | |
391 | - | then | |
392 | - | else if (( | |
393 | - | then | |
478 | + | func bM (an,aq,av,bi,bN,bk,bO,ak,al,aj) = if ((an == a)) | |
479 | + | then bh(aq, av, bi, bN, bk, bO, ak, al, aj) | |
480 | + | else if ((an == b)) | |
481 | + | then bE(aq, av, bi, bN, bk, bO, aj) | |
394 | 482 | else throw("Wrong pool type") | |
395 | 483 | ||
396 | 484 | ||
397 | - | func | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | [IntegerEntry(( | |
485 | + | func bP (aq,at,bQ,bB,bR,aj,an) = { | |
486 | + | let bS = ap(aq) | |
487 | + | let bT = ar(aq) | |
488 | + | let bU = getIntegerValue(this, (aq + y)) | |
489 | + | [IntegerEntry((aq + w), (bS + bQ)), IntegerEntry((aq + x), (bT + bQ)), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + r), bQ), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + v), bU), IntegerEntry((((aq + "_") + at) + u), bR), ScriptTransfer(P, bB, fromBase58String(aj))] | |
402 | 490 | } | |
403 | 491 | ||
404 | 492 | ||
405 | - | func | |
493 | + | func bV (an,aq) = if ((an == a)) | |
406 | 494 | then { | |
407 | - | let | |
408 | - | if (( | |
495 | + | let bW = X(T) | |
496 | + | if ((bW == bW)) | |
409 | 497 | then { | |
410 | - | let | |
411 | - | if (( | |
498 | + | let bX = invoke(aw(), "claim", [aq], nil) | |
499 | + | if ((bX == bX)) | |
412 | 500 | then { | |
413 | - | let | |
414 | - | $Tuple2(( | |
501 | + | let bY = X(T) | |
502 | + | $Tuple2((bY - bW), T) | |
415 | 503 | } | |
416 | 504 | else throw("Strict value is not equal to itself.") | |
417 | 505 | } | |
418 | 506 | else throw("Strict value is not equal to itself.") | |
419 | 507 | } | |
420 | - | else if (( | |
508 | + | else if ((an == b)) | |
421 | 509 | then { | |
422 | - | let | |
423 | - | if (( | |
510 | + | let bW = X(U) | |
511 | + | if ((bW == bW)) | |
424 | 512 | then { | |
425 | - | let | |
426 | - | if (( | |
513 | + | let bX = invoke(ax(Address(fromBase58String(aq))), "claimWX", [aq], nil) | |
514 | + | if ((bX == bX)) | |
427 | 515 | then { | |
428 | - | let | |
429 | - | $Tuple2(( | |
516 | + | let bY = X(U) | |
517 | + | $Tuple2((bY - bW), U) | |
430 | 518 | } | |
431 | 519 | else throw("Strict value is not equal to itself.") | |
432 | 520 | } | |
433 | 521 | else throw("Strict value is not equal to itself.") | |
434 | 522 | } | |
435 | 523 | else throw("Wrong pool type") | |
436 | 524 | ||
437 | 525 | ||
438 | - | func | |
439 | - | let | |
440 | - | if (( | |
526 | + | func bZ (ca,cb,cc,cd,ce,cf,cg,ch,ci,cj) = { | |
527 | + | let ck = X(aC(ca)) | |
528 | + | if ((ck == ck)) | |
441 | 529 | then { | |
442 | - | let | |
443 | - | if (( | |
444 | - | then ( | |
530 | + | let bX = invoke(Q, "swap", [cd, ce, cf, cg, ch, ci, cj], [AttachedPayment(cc, cb)]) | |
531 | + | if ((bX == bX)) | |
532 | + | then (X(aC(ca)) - ck) | |
445 | 533 | else throw("Strict value is not equal to itself.") | |
446 | 534 | } | |
447 | 535 | else throw("Strict value is not equal to itself.") | |
448 | 536 | } | |
449 | 537 | ||
450 | 538 | ||
451 | - | func | |
452 | - | let | |
453 | - | if (( | |
539 | + | func cl (ca,cb,cc,cm,cn,cj) = { | |
540 | + | let ck = X(aC(ca)) | |
541 | + | if ((ck == ck)) | |
454 | 542 | then { | |
455 | - | let | |
456 | - | if (( | |
457 | - | then ( | |
543 | + | let bX = invoke(Q, "puzzleSwap", [cm, cn, cj], [AttachedPayment(cc, cb)]) | |
544 | + | if ((bX == bX)) | |
545 | + | then (X(aC(ca)) - ck) | |
458 | 546 | else throw("Strict value is not equal to itself.") | |
459 | 547 | } | |
460 | 548 | else throw("Strict value is not equal to itself.") | |
461 | 549 | } | |
462 | 550 | ||
463 | 551 | ||
464 | - | func | |
465 | - | let | |
466 | - | if (( | |
552 | + | func co (ca,cb,cc,cp,cq,cr,cs,ct,cu,cj) = { | |
553 | + | let ck = X(aC(ca)) | |
554 | + | if ((ck == ck)) | |
467 | 555 | then { | |
468 | - | let | |
469 | - | if (( | |
470 | - | then ( | |
556 | + | let bX = invoke(Q, "swopfiSwap", [cp, cq, cr, cs, ct, cu, cj], [AttachedPayment(cc, cb)]) | |
557 | + | if ((bX == bX)) | |
558 | + | then (X(aC(ca)) - ck) | |
471 | 559 | else throw("Strict value is not equal to itself.") | |
472 | 560 | } | |
473 | 561 | else throw("Strict value is not equal to itself.") | |
474 | 562 | } | |
475 | 563 | ||
476 | 564 | ||
477 | - | func | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | then $Tuple2( | |
487 | - | else $Tuple2(0, | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | [IntegerEntry(( | |
565 | + | func cv (aq,aT,cw,cx) = { | |
566 | + | let ad = Address(fromBase58String(aq)) | |
567 | + | let cy = am(ad, aT) | |
568 | + | let bN = cy._1 | |
569 | + | let bO = cy._2 | |
570 | + | let ak = cy._3 | |
571 | + | let al = cy._4 | |
572 | + | let aj = cy._5 | |
573 | + | let cz = if ((cw == bN)) | |
574 | + | then $Tuple2(cx, 0) | |
575 | + | else $Tuple2(0, cx) | |
576 | + | let bi = cz._1 | |
577 | + | let bk = cz._2 | |
578 | + | let cA = bM(aT, aq, e, bi, bN, bk, bO, ak, al, aj) | |
579 | + | let bQ = cA._1 | |
580 | + | let cB = cA._2 | |
581 | + | let bU = valueOrElse(getInteger(this, (aq + y)), 0) | |
582 | + | let cC = ap(aq) | |
583 | + | let cD = (bU + fraction(bQ, i, cC)) | |
584 | + | ([IntegerEntry((aq + y), cD), ScriptTransfer(P, cB, fromBase58String(aj))] ++ bf(bN, bO, aj)) | |
497 | 585 | } | |
498 | 586 | ||
499 | 587 | ||
500 | - | func | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
588 | + | func cE (aq,cF,cG,ak,al,cH,cI) = { | |
589 | + | let ad = Address(fromBase58String(aq)) | |
590 | + | let cJ = 1000000 | |
591 | + | let cK = getIntegerValue(ad, q) | |
592 | + | let cL = fraction(cH, cJ, (cJ - cK)) | |
593 | + | let cM = if ((cI == cF)) | |
506 | 594 | then { | |
507 | - | let | |
508 | - | $Tuple2( | |
595 | + | let cN = fraction(ak, cL, (al - cL)) | |
596 | + | $Tuple2(cN, cG) | |
509 | 597 | } | |
510 | 598 | else { | |
511 | - | let | |
512 | - | $Tuple2( | |
599 | + | let cN = fraction(al, cL, (ak - cL)) | |
600 | + | $Tuple2(cN, cF) | |
513 | 601 | } | |
514 | - | let | |
515 | - | let | |
516 | - | invoke( | |
602 | + | let cN = cM._1 | |
603 | + | let cO = cM._2 | |
604 | + | invoke(ad, "callFunction", ["exchange", ["1"]], [AttachedPayment(aC(cO), cN)]) | |
517 | 605 | } | |
518 | 606 | ||
519 | 607 | ||
520 | - | func | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
608 | + | func cP (aq,cF,cG,ak,al,cH,cI) = { | |
609 | + | let ad = Address(fromBase58String(aq)) | |
610 | + | let cQ = getIntegerValue(S, "%s__protocolFee") | |
611 | + | let cR = getIntegerValue(S, "%s__poolFee") | |
612 | + | let cS = toBigInt(100000000) | |
613 | + | let cT = if ((cI == cF)) | |
526 | 614 | then { | |
527 | - | let | |
528 | - | $Tuple2( | |
615 | + | let cN = fraction(ak, cH, (al - cH)) | |
616 | + | $Tuple2(cN, cG) | |
529 | 617 | } | |
530 | 618 | else { | |
531 | - | let | |
532 | - | $Tuple2( | |
619 | + | let cN = fraction(al, cH, (ak - cH)) | |
620 | + | $Tuple2(cN, cF) | |
533 | 621 | } | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | invoke( | |
622 | + | let cN = cT._1 | |
623 | + | let cO = cT._2 | |
624 | + | let cU = toInt(fraction(toBigInt(cN), cS, (cS - toBigInt((cQ + cR))))) | |
625 | + | invoke(S, "swap", [1, cI, toString(this)], [AttachedPayment(aC(cO), cU)]) | |
538 | 626 | } | |
539 | 627 | ||
540 | 628 | ||
541 | - | func | |
542 | - | then | |
543 | - | else | |
629 | + | func cV (an,aq,cF,cG,ak,al,cH,cI) = if ((an == a)) | |
630 | + | then cE(aq, cF, cG, ak, al, cH, cI) | |
631 | + | else cP(aq, cF, cG, ak, al, cH, cI) | |
544 | 632 | ||
545 | 633 | ||
546 | - | func cr (am,cs,ct,cu) = { | |
547 | - | let aa = Address(fromBase58String(am)) | |
548 | - | let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool") | |
549 | - | let cv = aj(aa, bQ) | |
550 | - | let ca = cv._1 | |
551 | - | let cb = cv._2 | |
552 | - | let ah = cv._3 | |
553 | - | let ai = cv._4 | |
554 | - | let cw = U(ay(ca)) | |
555 | - | if ((cw == cw)) | |
634 | + | func cW (aq,cX,cY,cZ) = { | |
635 | + | let ad = Address(fromBase58String(aq)) | |
636 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
637 | + | let da = am(ad, aT) | |
638 | + | let cF = da._1 | |
639 | + | let cG = da._2 | |
640 | + | let ak = da._3 | |
641 | + | let al = da._4 | |
642 | + | let aj = da._5 | |
643 | + | let db = X(aC(cF)) | |
644 | + | if ((db == db)) | |
556 | 645 | then { | |
557 | - | let | |
558 | - | if (( | |
646 | + | let dc = X(aC(cG)) | |
647 | + | if ((dc == dc)) | |
559 | 648 | then { | |
560 | - | let | |
561 | - | then invoke( | |
562 | - | else if (( | |
563 | - | then invoke( | |
649 | + | let bX = if ((aT == a)) | |
650 | + | then invoke(ad, "callFunction", ["withdraw", [toString(cX)]], nil) | |
651 | + | else if ((aT == b)) | |
652 | + | then invoke(ad, "unstakeAndGet", [cX], nil) | |
564 | 653 | else throw("Wrong position type") | |
565 | - | if (( | |
654 | + | if ((bX == bX)) | |
566 | 655 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
656 | + | let dd = X(aC(cF)) | |
657 | + | let de = X(aC(cG)) | |
658 | + | let df = $Tuple2((dd - db), (de - dc)) | |
659 | + | let dg = df._1 | |
660 | + | let dh = df._2 | |
661 | + | let di = if ((cY > 0)) | |
573 | 662 | then { | |
574 | - | let | |
575 | - | then ( | |
663 | + | let dj = if (if ((cZ == cF)) | |
664 | + | then (cY > dg) | |
576 | 665 | else false) | |
577 | - | then ( | |
578 | - | else if (if (( | |
579 | - | then ( | |
666 | + | then (cY - dg) | |
667 | + | else if (if ((cZ == cG)) | |
668 | + | then (cY > dh) | |
580 | 669 | else false) | |
581 | - | then ( | |
670 | + | then (cY - dh) | |
582 | 671 | else 0 | |
583 | - | let | |
584 | - | then | |
672 | + | let dk = if ((dj > 0)) | |
673 | + | then cV(aT, aq, cF, cG, ak, al, dj, cZ) | |
585 | 674 | else 0 | |
586 | - | if (( | |
675 | + | if ((dk == dk)) | |
587 | 676 | then { | |
588 | - | let | |
589 | - | let | |
590 | - | $Tuple2(( | |
677 | + | let dl = X(aC(cF)) | |
678 | + | let dm = X(aC(cG)) | |
679 | + | $Tuple2((dl - db), (dm - dc)) | |
591 | 680 | } | |
592 | 681 | else throw("Strict value is not equal to itself.") | |
593 | 682 | } | |
594 | - | else $Tuple2( | |
595 | - | let | |
596 | - | let | |
597 | - | $ | |
683 | + | else $Tuple2(dg, dh) | |
684 | + | let dn = di._1 | |
685 | + | let do = di._2 | |
686 | + | $Tuple7(dn, cF, do, cG, dd, de, aj) | |
598 | 687 | } | |
599 | 688 | else throw("Strict value is not equal to itself.") | |
600 | 689 | } | |
601 | 690 | else throw("Strict value is not equal to itself.") | |
602 | 691 | } | |
603 | 692 | else throw("Strict value is not equal to itself.") | |
604 | 693 | } | |
605 | 694 | ||
606 | 695 | ||
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | $Tuple11( | |
696 | + | func dp (dq) = { | |
697 | + | let dr = split(valueOrErrorMessage(getString(this, (dq + D)), ("No request with id " + dq)), ",") | |
698 | + | let at = dr[0] | |
699 | + | let aq = dr[1] | |
700 | + | let bi = parseIntValue(dr[2]) | |
701 | + | let bN = dr[3] | |
702 | + | let bk = parseIntValue(dr[4]) | |
703 | + | let bO = dr[5] | |
704 | + | let ak = parseIntValue(dr[6]) | |
705 | + | let al = parseIntValue(dr[7]) | |
706 | + | let aj = dr[8] | |
707 | + | let ds = dr[9] | |
708 | + | let dt = parseIntValue(dr[10]) | |
709 | + | $Tuple11(at, aq, bi, bN, bk, bO, ak, al, aj, ds, dt) | |
621 | 710 | } | |
622 | 711 | ||
623 | 712 | ||
624 | - | @Callable(T) | |
625 | - | func getAssetPrice (V) = $Tuple2(nil, (let ad = invoke(O, "getTWAP60", [V, false], nil) | |
626 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
627 | - | then ad | |
628 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2) | |
629 | - | ||
630 | - | ||
631 | - | ||
632 | - | @Callable(T) | |
633 | - | func getSharePrice (ag) = { | |
634 | - | let am = valueOrErrorMessage(getString(this, (ag + E)), "Can't find pool addr by share id") | |
635 | - | let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited") | |
636 | - | let cP = aj(Address(fromBase58String(am)), bQ) | |
637 | - | let ae = cP._1 | |
638 | - | let af = cP._2 | |
639 | - | let cQ = ( let ad = invoke(O, "getTWAP60", [ae, false], nil) | |
640 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
641 | - | then ad | |
642 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2 | |
643 | - | let cR = ( let ad = invoke(O, "getTWAP60", [af, false], nil) | |
644 | - | if ($isInstanceOf(ad, "(Int, Int)")) | |
645 | - | then ad | |
646 | - | else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2 | |
647 | - | $Tuple2(nil, (cQ + cR)) | |
648 | - | } | |
649 | - | ||
650 | - | ||
651 | - | ||
652 | - | @Callable(T) | |
653 | - | func replenishEVALONLY (am,cS,cT) = if (if ((100 > cS)) | |
713 | + | @Callable(W) | |
714 | + | func replenishEVALONLY (aq,du,dv) = if (if ((100 > du)) | |
654 | 715 | then true | |
655 | - | else ( | |
716 | + | else (du > 300)) | |
656 | 717 | then throw("Leverage can't be <100 and >300") | |
657 | 718 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | then if (( | |
719 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
720 | + | let dw = am(Address(fromBase58String(aq)), aT) | |
721 | + | let bN = dw._1 | |
722 | + | let bO = dw._2 | |
723 | + | let ak = dw._3 | |
724 | + | let al = dw._4 | |
725 | + | let aj = dw._5 | |
726 | + | let dx = if ((size(W.payments) == 2)) | |
727 | + | then if ((aB(W.payments[0].assetId) != bN)) | |
667 | 728 | then throw("Wrong payment asset A") | |
668 | - | else if (( | |
729 | + | else if ((aB(W.payments[1].assetId) != bO)) | |
669 | 730 | then throw("Wrong payment asset B") | |
670 | - | else $Tuple4( | |
671 | - | else if ((size( | |
672 | - | then if (( | |
673 | - | then $Tuple4( | |
674 | - | else if (( | |
675 | - | then $Tuple4(0, | |
731 | + | else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO) | |
732 | + | else if ((size(W.payments) == 1)) | |
733 | + | then if ((aB(W.payments[0].assetId) == bN)) | |
734 | + | then $Tuple4(W.payments[0].amount, bN, 0, bO) | |
735 | + | else if ((aB(W.payments[0].assetId) == bO)) | |
736 | + | then $Tuple4(0, bN, W.payments[0].amount, bO) | |
676 | 737 | else throw("Wrong payment") | |
677 | 738 | else throw("One or two payments expected") | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
739 | + | let bi = dx._1 | |
740 | + | let bj = dx._2 | |
741 | + | let bk = dx._3 | |
742 | + | let bl = dx._4 | |
743 | + | let dy = if ((du > 100)) | |
683 | 744 | then { | |
684 | - | let | |
685 | - | if ($isInstanceOf( | |
686 | - | then | |
687 | - | else throw(($getType( | |
688 | - | let | |
689 | - | if ($isInstanceOf( | |
690 | - | then | |
691 | - | else throw(($getType( | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | if ($isInstanceOf( | |
698 | - | then | |
699 | - | else throw(($getType( | |
745 | + | let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil) | |
746 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
747 | + | then ag | |
748 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
749 | + | let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil) | |
750 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
751 | + | then ag | |
752 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
753 | + | let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN))) | |
754 | + | let dA = fraction(dz, (du - 100), 100) | |
755 | + | let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA), toString(1)], ",") | |
756 | + | let dB = { | |
757 | + | let ag = invoke(this, "createNewRequest", [dr], nil) | |
758 | + | if ($isInstanceOf(ag, "Int")) | |
759 | + | then ag | |
760 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
700 | 761 | } | |
701 | - | if (( | |
762 | + | if ((dB == dB)) | |
702 | 763 | then { | |
703 | - | let | |
704 | - | let | |
705 | - | if (( | |
706 | - | then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), | |
764 | + | let dC = [((toString(W.caller) + "_") + toString(1)), aj, dv, dA, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(dB, "Can't create new request"))] | |
765 | + | let bX = reentrantInvoke(aA(), "flashPosition", dC, nil) | |
766 | + | if ((bX == bX)) | |
767 | + | then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), dA) | |
707 | 768 | else throw("Strict value is not equal to itself.") | |
708 | 769 | } | |
709 | 770 | else throw("Strict value is not equal to itself.") | |
710 | 771 | } | |
711 | - | else $Tuple2( | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if (( | |
772 | + | else $Tuple2(bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)._1, 0) | |
773 | + | let dD = dy._1 | |
774 | + | let dA = dy._2 | |
775 | + | let dE = cW(aq, dD, dA, dv) | |
776 | + | if ((dE == dE)) | |
716 | 777 | then { | |
717 | - | let | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | then ( | |
734 | - | else | |
735 | - | $Tuple2(nil, [ | |
778 | + | let dF = dE._6 | |
779 | + | let dG = dE._5 | |
780 | + | let cG = dE._4 | |
781 | + | let do = dE._3 | |
782 | + | let cF = dE._2 | |
783 | + | let dn = dE._1 | |
784 | + | let dH = am(Address(fromBase58String(aq)), aT) | |
785 | + | let dI = dH._1 | |
786 | + | let dJ = dH._2 | |
787 | + | let dK = dH._3 | |
788 | + | let dL = dH._4 | |
789 | + | let dM = dH._5 | |
790 | + | let dN = fraction(al, h, ak) | |
791 | + | let dO = fraction(dL, h, dK) | |
792 | + | let dP = (h - fraction(dN, h, dO)) | |
793 | + | let dQ = if ((0 > dP)) | |
794 | + | then (dP * -1) | |
795 | + | else dP | |
796 | + | $Tuple2(nil, [dG, dF, dQ]) | |
736 | 797 | } | |
737 | 798 | else throw("Strict value is not equal to itself.") | |
738 | 799 | } | |
739 | 800 | ||
740 | 801 | ||
741 | 802 | ||
742 | - | @Callable( | |
743 | - | func replenishFromLandEVALONLY ( | |
744 | - | let | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
755 | - | let | |
756 | - | if ((size( | |
803 | + | @Callable(W) | |
804 | + | func replenishFromLandEVALONLY (dq) = { | |
805 | + | let dR = dp(dq) | |
806 | + | let at = dR._1 | |
807 | + | let aq = dR._2 | |
808 | + | let bi = dR._3 | |
809 | + | let bN = dR._4 | |
810 | + | let bk = dR._5 | |
811 | + | let bO = dR._6 | |
812 | + | let ak = dR._7 | |
813 | + | let al = dR._8 | |
814 | + | let aj = dR._9 | |
815 | + | let ds = dR._10 | |
816 | + | let dt = dR._11 | |
817 | + | if ((size(W.payments) != 1)) | |
757 | 818 | then throw("Wrong payment size") | |
758 | - | else if (if (( | |
819 | + | else if (if ((aB(W.payments[0].assetId) != ds)) | |
759 | 820 | then true | |
760 | - | else ( | |
821 | + | else (W.payments[0].amount != dt)) | |
761 | 822 | then throw("Wrong payment") | |
762 | 823 | else { | |
763 | - | let | |
764 | - | then $Tuple2(( | |
765 | - | else $Tuple2( | |
766 | - | let | |
767 | - | let | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", | |
824 | + | let dS = if ((bN == ds)) | |
825 | + | then $Tuple2((bi + W.payments[0].amount), bk) | |
826 | + | else $Tuple2(bi, (bk + W.payments[0].amount)) | |
827 | + | let dT = dS._1 | |
828 | + | let dU = dS._2 | |
829 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
830 | + | let dV = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj) | |
831 | + | let dD = dV._1 | |
832 | + | let cB = dV._2 | |
833 | + | $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", dD)], dD) | |
773 | 834 | } | |
774 | 835 | } | |
775 | 836 | ||
776 | 837 | ||
777 | 838 | ||
778 | - | @Callable( | |
779 | - | func replenish ( | |
839 | + | @Callable(W) | |
840 | + | func replenish (aq,du,dv) = if (if ((100 > du)) | |
780 | 841 | then true | |
781 | - | else ( | |
842 | + | else (du > 300)) | |
782 | 843 | then throw("Leverage can't be <100 and >300") | |
783 | 844 | else { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | then if (( | |
845 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited") | |
846 | + | let dW = am(Address(fromBase58String(aq)), aT) | |
847 | + | let bN = dW._1 | |
848 | + | let bO = dW._2 | |
849 | + | let ak = dW._3 | |
850 | + | let al = dW._4 | |
851 | + | let aj = dW._5 | |
852 | + | let dX = if ((size(W.payments) == 2)) | |
853 | + | then if ((aB(W.payments[0].assetId) != bN)) | |
793 | 854 | then throw("Wrong payment asset A") | |
794 | - | else if (( | |
855 | + | else if ((aB(W.payments[1].assetId) != bO)) | |
795 | 856 | then throw("Wrong payment asset B") | |
796 | - | else $Tuple4( | |
797 | - | else if ((size( | |
798 | - | then if (( | |
799 | - | then $Tuple4( | |
800 | - | else if (( | |
801 | - | then $Tuple4(0, | |
857 | + | else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO) | |
858 | + | else if ((size(W.payments) == 1)) | |
859 | + | then if ((aB(W.payments[0].assetId) == bN)) | |
860 | + | then $Tuple4(W.payments[0].amount, bN, 0, bO) | |
861 | + | else if ((aB(W.payments[0].assetId) == bO)) | |
862 | + | then $Tuple4(0, bN, W.payments[0].amount, bO) | |
802 | 863 | else throw("Wrong payment") | |
803 | 864 | else throw("One or two payments expected") | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | if (( | |
865 | + | let bi = dX._1 | |
866 | + | let bj = dX._2 | |
867 | + | let bk = dX._3 | |
868 | + | let bl = dX._4 | |
869 | + | let dY = as(aq, toString(W.caller)) | |
870 | + | if ((du > 100)) | |
810 | 871 | then { | |
811 | - | let | |
812 | - | if ($isInstanceOf( | |
813 | - | then | |
814 | - | else throw(($getType( | |
815 | - | let | |
816 | - | if ($isInstanceOf( | |
817 | - | then | |
818 | - | else throw(($getType( | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | let | |
823 | - | let | |
824 | - | if ($isInstanceOf( | |
825 | - | then | |
826 | - | else throw(($getType( | |
872 | + | let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil) | |
873 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
874 | + | then ag | |
875 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
876 | + | let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil) | |
877 | + | if ($isInstanceOf(ag, "(Int, Int)")) | |
878 | + | then ag | |
879 | + | else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2 | |
880 | + | let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN))) | |
881 | + | let dA = fraction(dz, (du - 100), 100) | |
882 | + | let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA)], ",") | |
883 | + | let dB = { | |
884 | + | let ag = invoke(this, "createNewRequest", [dr], nil) | |
885 | + | if ($isInstanceOf(ag, "Int")) | |
886 | + | then ag | |
887 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
827 | 888 | } | |
828 | - | if (( | |
889 | + | if ((dB == dB)) | |
829 | 890 | then { | |
830 | - | let | |
831 | - | let | |
832 | - | if (( | |
891 | + | let dC = [((toString(W.caller) + "_") + toString(dY)), aj, dv, dA, toString(this), "replenishFromLand", toString(valueOrErrorMessage(dB, "Can't create new request"))] | |
892 | + | let bX = reentrantInvoke(aA(), "flashPosition", dC, nil) | |
893 | + | if ((bX == bX)) | |
833 | 894 | then nil | |
834 | 895 | else throw("Strict value is not equal to itself.") | |
835 | 896 | } | |
836 | 897 | else throw("Strict value is not equal to itself.") | |
837 | 898 | } | |
838 | 899 | else { | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | | |
900 | + | let dZ = bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj) | |
901 | + | let dD = dZ._1 | |
902 | + | let cB = dZ._2 | |
903 | + | (bP(aq, toString(W.caller), dD, cB, dY, aj, aT) ++ bf(bN, bO, aj)) | |
843 | 904 | } | |
844 | 905 | } | |
845 | 906 | ||
846 | 907 | ||
847 | 908 | ||
848 | - | @Callable( | |
849 | - | func replenishFromLand ( | |
850 | - | let | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | if ((size( | |
909 | + | @Callable(W) | |
910 | + | func replenishFromLand (dq) = { | |
911 | + | let ea = dp(dq) | |
912 | + | let at = ea._1 | |
913 | + | let aq = ea._2 | |
914 | + | let bi = ea._3 | |
915 | + | let bN = ea._4 | |
916 | + | let bk = ea._5 | |
917 | + | let bO = ea._6 | |
918 | + | let ak = ea._7 | |
919 | + | let al = ea._8 | |
920 | + | let aj = ea._9 | |
921 | + | let ds = ea._10 | |
922 | + | let dt = ea._11 | |
923 | + | if ((size(W.payments) != 1)) | |
863 | 924 | then throw("Wrong payment size") | |
864 | - | else if (if (( | |
925 | + | else if (if ((aB(W.payments[0].assetId) != ds)) | |
865 | 926 | then true | |
866 | - | else ( | |
927 | + | else (W.payments[0].amount != dt)) | |
867 | 928 | then throw("Wrong payment") | |
868 | 929 | else { | |
869 | - | let | |
870 | - | then $Tuple2(( | |
871 | - | else $Tuple2( | |
872 | - | let | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | $Tuple2((( | |
930 | + | let eb = if ((bN == ds)) | |
931 | + | then $Tuple2((bi + W.payments[0].amount), bk) | |
932 | + | else $Tuple2(bi, (bk + W.payments[0].amount)) | |
933 | + | let dT = eb._1 | |
934 | + | let dU = eb._2 | |
935 | + | let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool") | |
936 | + | let ec = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj) | |
937 | + | let dD = ec._1 | |
938 | + | let cB = ec._2 | |
939 | + | let bR = as(aq, toString(W.caller)) | |
940 | + | let ed = [IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + s), dt), StringEntry((((((aq + "_") + at) + "_") + toString(bR)) + t), ds)] | |
941 | + | let ee = bP(aq, at, dD, cB, bR, aj, aT) | |
942 | + | $Tuple2((((ee ++ bf(bN, bO, aj)) ++ ed) :+ DeleteEntry((dq + D))), dD) | |
882 | 943 | } | |
883 | 944 | } | |
884 | 945 | ||
885 | 946 | ||
886 | 947 | ||
887 | - | @Callable( | |
888 | - | func withdraw ( | |
889 | - | let | |
890 | - | let | |
891 | - | let | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
948 | + | @Callable(W) | |
949 | + | func withdraw (aq,ef) = { | |
950 | + | let at = toString(W.caller) | |
951 | + | let eg = valueOrErrorMessage(getInteger(this, (((((aq + "_") + at) + "_") + toString(ef)) + r)), "Unknown position") | |
952 | + | let eh = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + v)) | |
953 | + | let ei = getIntegerValue(this, (aq + y)) | |
954 | + | let ej = ap(aq) | |
955 | + | let cX = (eg + fraction(eg, (ei - eh), i)) | |
956 | + | let ek = Address(fromBase58String(at)) | |
957 | + | let dA = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + s)) | |
958 | + | let cZ = getStringValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + t)) | |
959 | + | let cY = if ((dA > 0)) | |
899 | 960 | then { | |
900 | - | let | |
901 | - | if ($isInstanceOf( | |
902 | - | then | |
903 | - | else throw(($getType( | |
961 | + | let ag = invoke(aA(), "getAssetDebt", [false, ((((aq + "_") + at) + "_") + toString(ef)), cZ], nil) | |
962 | + | if ($isInstanceOf(ag, "Int")) | |
963 | + | then ag | |
964 | + | else throw(($getType(ag) + " couldn't be cast to Int")) | |
904 | 965 | } | |
905 | 966 | else 0 | |
906 | - | let | |
907 | - | if (( | |
967 | + | let el = cW(aq, cX, cY, cZ) | |
968 | + | if ((el == el)) | |
908 | 969 | then { | |
909 | - | let cb = dJ._4 | |
910 | - | let cJ = dJ._3 | |
911 | - | let ca = dJ._2 | |
912 | - | let cI = dJ._1 | |
913 | - | let dK = if ((ct > 0)) | |
914 | - | then invoke(aw(), "repayFor", [((ap + "_") + toString(dD))], [AttachedPayment(ay(cu), ct)]) | |
970 | + | let aj = el._7 | |
971 | + | let de = el._6 | |
972 | + | let dd = el._5 | |
973 | + | let cG = el._4 | |
974 | + | let do = el._3 | |
975 | + | let cF = el._2 | |
976 | + | let dn = el._1 | |
977 | + | let em = if ((cY > 0)) | |
978 | + | then invoke(aA(), "repayFor", [((at + "_") + toString(ef))], [AttachedPayment(aC(cZ), cY)]) | |
915 | 979 | else 0 | |
916 | - | if (( | |
917 | - | then [DeleteEntry(((((( | |
980 | + | if ((em == em)) | |
981 | + | then ([DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + r)), DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + v)), IntegerEntry((aq + w), (ej - cX)), ScriptTransfer(ek, dn, aC(cF)), ScriptTransfer(ek, do, aC(cG))] ++ bf(cF, cG, aj)) | |
918 | 982 | else throw("Strict value is not equal to itself.") | |
919 | 983 | } | |
920 | 984 | else throw("Strict value is not equal to itself.") | |
921 | 985 | } | |
922 | 986 | ||
923 | 987 | ||
924 | 988 | ||
925 | - | @Callable( | |
926 | - | func createNewRequest ( | |
927 | - | let | |
928 | - | $Tuple2([StringEntry((toString( | |
989 | + | @Callable(W) | |
990 | + | func createNewRequest (en) = valueOrElse(V(W), { | |
991 | + | let dB = (valueOrElse(getInteger(this, E), 0) + 1) | |
992 | + | $Tuple2([StringEntry((toString(dB) + D), en), IntegerEntry(E, dB)], dB) | |
929 | 993 | }) | |
930 | 994 | ||
931 | 995 | ||
932 | 996 | ||
933 | - | @Callable( | |
934 | - | func capitalizeExKeeper ( | |
935 | - | let | |
936 | - | then | |
997 | + | @Callable(W) | |
998 | + | func capitalizeExKeeper (aq,an,eo,ep,eq,cd,ce,cf,cg,ch,ci,cj) = { | |
999 | + | let er = if (eq) | |
1000 | + | then bV(an, aq) | |
937 | 1001 | else { | |
938 | - | let | |
939 | - | then | |
940 | - | else | |
941 | - | $Tuple2( | |
1002 | + | let es = if ((an == a)) | |
1003 | + | then T | |
1004 | + | else U | |
1005 | + | $Tuple2(ep, es) | |
942 | 1006 | } | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | let | |
948 | - | then [IntegerEntry(( | |
1007 | + | let et = er._1 | |
1008 | + | let es = er._2 | |
1009 | + | let eu = bZ(eo, ep, es, cd, ce, cf, cg, ch, ci, cj) | |
1010 | + | let bt = (et - ep) | |
1011 | + | let ev = if ((bt > 0)) | |
1012 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
949 | 1013 | else nil | |
950 | - | ( | |
1014 | + | (cv(aq, an, eo, eu) ++ ev) | |
951 | 1015 | } | |
952 | 1016 | ||
953 | 1017 | ||
954 | 1018 | ||
955 | - | @Callable( | |
956 | - | func capitalizeExPazzle ( | |
957 | - | let | |
958 | - | then | |
1019 | + | @Callable(W) | |
1020 | + | func capitalizeExPazzle (aq,an,eo,ep,eq,cm,cn,cj) = { | |
1021 | + | let ew = if (eq) | |
1022 | + | then bV(an, aq) | |
959 | 1023 | else { | |
960 | - | let | |
961 | - | then | |
962 | - | else | |
963 | - | $Tuple2( | |
1024 | + | let es = if ((an == a)) | |
1025 | + | then T | |
1026 | + | else U | |
1027 | + | $Tuple2(ep, es) | |
964 | 1028 | } | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | then [IntegerEntry(( | |
1029 | + | let et = ew._1 | |
1030 | + | let es = ew._2 | |
1031 | + | let eu = cl(eo, ep, es, cm, cn, cj) | |
1032 | + | let bt = (et - ep) | |
1033 | + | let ev = if ((bt > 0)) | |
1034 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
971 | 1035 | else nil | |
972 | - | ( | |
1036 | + | (cv(aq, an, eo, eu) ++ ev) | |
973 | 1037 | } | |
974 | 1038 | ||
975 | 1039 | ||
976 | 1040 | ||
977 | - | @Callable( | |
978 | - | func capitalizeExSwopFi ( | |
979 | - | let | |
980 | - | then | |
1041 | + | @Callable(W) | |
1042 | + | func capitalizeExSwopFi (aq,an,eo,ep,eq,cp,cq,cr,cs,ct,cu,cj) = { | |
1043 | + | let ex = if (eq) | |
1044 | + | then bV(an, aq) | |
981 | 1045 | else { | |
982 | - | let | |
983 | - | then | |
984 | - | else | |
985 | - | $Tuple2( | |
1046 | + | let es = if ((an == a)) | |
1047 | + | then T | |
1048 | + | else U | |
1049 | + | $Tuple2(ep, es) | |
986 | 1050 | } | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | then [IntegerEntry(( | |
1051 | + | let et = ex._1 | |
1052 | + | let es = ex._2 | |
1053 | + | let eu = co(eo, ep, es, cp, cq, cr, cs, ct, cu, cj) | |
1054 | + | let bt = (et - ep) | |
1055 | + | let ev = if ((bt > 0)) | |
1056 | + | then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))] | |
993 | 1057 | else nil | |
994 | - | ( | |
1058 | + | (cv(aq, an, eo, eu) ++ ev) | |
995 | 1059 | } | |
996 | 1060 | ||
997 | 1061 | ||
998 | 1062 | ||
999 | - | @Callable( | |
1000 | - | func initNewPool ( | |
1001 | - | then ( | |
1063 | + | @Callable(W) | |
1064 | + | func initNewPool (an,ad,ey,ez,eA,eB) = if (if ((an != a)) | |
1065 | + | then (an != b) | |
1002 | 1066 | else false) | |
1003 | 1067 | then throw("Wrong type") | |
1004 | 1068 | else { | |
1005 | - | let | |
1006 | - | let | |
1007 | - | let | |
1008 | - | let | |
1009 | - | let | |
1010 | - | let | |
1011 | - | [IntegerEntry(( | |
1069 | + | let eC = am(Address(fromBase58String(ad)), an) | |
1070 | + | let ah = eC._1 | |
1071 | + | let ai = eC._2 | |
1072 | + | let eD = eC._3 | |
1073 | + | let eE = eC._4 | |
1074 | + | let aj = eC._5 | |
1075 | + | [IntegerEntry((ad + z), ey), IntegerEntry((ad + A), ez), IntegerEntry((ad + B), eA), IntegerEntry((ad + C), eB), IntegerEntry((ad + y), 0), StringEntry((F + ad), an), StringEntry((aj + G), ad)] | |
1012 | 1076 | } | |
1013 | 1077 | ||
1014 | 1078 | ||
1015 | - | @Verifier( | |
1016 | - | func | |
1079 | + | @Verifier(eF) | |
1080 | + | func eG () = sigVerify(eF.bodyBytes, eF.proofs[0], eF.senderPublicKey) | |
1017 | 1081 |
github/deemru/w8io/026f985 382.19 ms ◑