tx · 6RZsF65DgtCDhNMdqx7ALk8FrxViNV3WdQcVEpCrftij 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd: -0.04000000 Waves 2022.07.20 15:53 [2148105] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves
{ "type": 13, "id": "6RZsF65DgtCDhNMdqx7ALk8FrxViNV3WdQcVEpCrftij", "fee": 4000000, "feeAssetId": null, "timestamp": 1658321593000, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "5c8s5GgFisSH9R1gjooicfgUDu37uFmV48bfb6FsNrWhc1YZeCsdi9Kg3spFxKd1XNSjpddK1ew2WZgaLeu3JSGR", "5mJe9eESuJcYccMJCBsDhdrS3NC8msjDpgp8PJZ7hLdmWgMG8qTucPXqJCWfZZ8UFiZmB4KqC4xac56ec6tzY5sS", "42mQtVTS9hFgy7TbWzyv7RD2F4QT5nM8XzzRYf2CtFygfymmsbiuSBec7AmhAcixiFV5mKBKEfrJjnDgm6wZVx2n" ], "script": "base64:AAIFAAAAAAAAACcIAhIFCgMIAQESBAoCAQESABIAEgMKAQgSABIAEgASABIFCgMBAQQAAABbAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAWZ2V0Qm9vbEJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5BwEAAAAYZ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wAAAAIFAAAABWNvdW50AAAAAAAAAAADTLp33Q==", "chainId": 84, "height": 2148105, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C4gLMcgjmiKZU6Dw92dqeHpmv9MSRbSUWqN6s9oVLad8 Next: 2Lo8TBcCTixaLpG9K9HNdAaBwkzKiya3gLmPw2JBYaSn Diff:
Old | New | Differences | |
---|---|---|---|
354 | 354 | @Callable(bm) | |
355 | 355 | func buySurf (bG,bH,bI) = if ((size(bm.payments) != 1)) | |
356 | 356 | then throw("exactly 1 payment must be attached") | |
357 | - | else { | |
358 | - | let bt = bm.payments[0] | |
359 | - | let bJ = bt.amount | |
360 | - | let bK = valueOrElse(bt.assetId, y) | |
361 | - | if (if ((bK != aG)) | |
362 | - | then (bK != y) | |
363 | - | else false) | |
364 | - | then throw("Unsupported payment asset") | |
365 | - | else if (if ((bK == aG)) | |
366 | - | then (aM > bJ) | |
367 | - | else false) | |
368 | - | then throw((("min " + toString((aM / q))) + " USDN expected")) | |
369 | - | else if (if ((bK == y)) | |
370 | - | then (aL > bJ) | |
357 | + | else if ((0 >= bG)) | |
358 | + | then throw("averagePriceWanted should be positive") | |
359 | + | else if ((0 >= bH)) | |
360 | + | then throw("maxTolerancePerc should be positive") | |
361 | + | else { | |
362 | + | let bt = bm.payments[0] | |
363 | + | let bJ = bt.amount | |
364 | + | let bK = valueOrElse(bt.assetId, y) | |
365 | + | if (if ((bK != aG)) | |
366 | + | then (bK != y) | |
371 | 367 | else false) | |
372 | - | then throw((("min " + toString((aL / r))) + " WAVES expected")) | |
373 | - | else { | |
374 | - | let bl = h(invoke(aF, "surfFunctionREADONLY", [bJ, bK], nil)) | |
375 | - | let bL = n(bl[M]) | |
376 | - | let bM = n(bl[N]) | |
377 | - | let bN = n(bl[L]) | |
378 | - | let bO = toBigInt(bN) | |
379 | - | let bP = if ((bK == y)) | |
380 | - | then (toBigInt(bL) * s) | |
381 | - | else (toBigInt(bM) * t) | |
382 | - | if ((bP > ((toBigInt((bH + q)) * toBigInt(bG)) * bO))) | |
383 | - | then throw((((((("Tolerance " + toString(bH)) + " exceeded: spent ") + (if ((bK == y)) | |
384 | - | then (toString(bL) + " WAVES") | |
385 | - | else (toString(bM) + " USDN"))) + " for ") + toString(bN)) + " SURF")) | |
368 | + | then throw("Unsupported payment asset") | |
369 | + | else if (if ((bK == aG)) | |
370 | + | then (aM > bJ) | |
371 | + | else false) | |
372 | + | then throw((("min " + toString((aM / q))) + " USDN expected")) | |
373 | + | else if (if ((bK == y)) | |
374 | + | then (aL > bJ) | |
375 | + | else false) | |
376 | + | then throw((("min " + toString((aL / r))) + " WAVES expected")) | |
386 | 377 | else { | |
387 | - | let bQ = n(bl[U]) | |
388 | - | let bR = if ((bK == y)) | |
389 | - | then { | |
390 | - | let bS = invoke(aC, "acceptWaves", nil, [AttachedPayment(unit, (bJ - bQ))]) | |
391 | - | if ((bS == bS)) | |
392 | - | then if ((bQ > 0)) | |
393 | - | then [ScriptTransfer(bm.caller, bQ, unit)] | |
394 | - | else nil | |
395 | - | else throw("Strict value is not equal to itself.") | |
378 | + | let bl = h(invoke(aF, "surfFunctionREADONLY", [bJ, bK], nil)) | |
379 | + | let bL = n(bl[M]) | |
380 | + | let bM = n(bl[N]) | |
381 | + | let bN = n(bl[L]) | |
382 | + | let bO = toBigInt(bN) | |
383 | + | let bP = if ((bK == y)) | |
384 | + | then (toBigInt(bL) * s) | |
385 | + | else (toBigInt(bM) * t) | |
386 | + | if ((bP > ((toBigInt((bH + q)) * toBigInt(bG)) * bO))) | |
387 | + | then throw((((((("Tolerance " + toString(bH)) + " exceeded: spent ") + (if ((bK == y)) | |
388 | + | then (toString(bL) + " WAVES") | |
389 | + | else (toString(bM) + " USDN"))) + " for ") + toString(bN)) + " SURF")) | |
390 | + | else { | |
391 | + | let bQ = n(bl[U]) | |
392 | + | let bR = if ((bK == y)) | |
393 | + | then { | |
394 | + | let bS = invoke(aC, "acceptWaves", nil, [AttachedPayment(unit, (bJ - bQ))]) | |
395 | + | if ((bS == bS)) | |
396 | + | then if ((bQ > 0)) | |
397 | + | then [ScriptTransfer(bm.caller, bQ, unit)] | |
398 | + | else nil | |
399 | + | else throw("Strict value is not equal to itself.") | |
400 | + | } | |
401 | + | else if ((bQ > 0)) | |
402 | + | then [ScriptTransfer(aC, (bJ - bQ), aG), ScriptTransfer(bm.caller, bQ, aG)] | |
403 | + | else [ScriptTransfer(aC, (bJ - bQ), aG)] | |
404 | + | let bT = fromBase58String(getStringValue(Z)) | |
405 | + | (bR ++ [Reissue(bT, bN, true), ScriptTransfer(bm.caller, bN, bT), bk(bl)]) | |
396 | 406 | } | |
397 | - | else if ((bQ > 0)) | |
398 | - | then [ScriptTransfer(aC, (bJ - bQ), aG), ScriptTransfer(bm.caller, bQ, aG)] | |
399 | - | else [ScriptTransfer(aC, (bJ - bQ), aG)] | |
400 | - | let bT = fromBase58String(getStringValue(Z)) | |
401 | - | (bR ++ [Reissue(bT, bN, true), ScriptTransfer(bm.caller, bN, bT), bk(bl)]) | |
402 | 407 | } | |
403 | - | } | |
404 | - | } | |
408 | + | } | |
405 | 409 | ||
406 | 410 | ||
407 | 411 | @Verifier(bU) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrElse(getInteger(this, b), 0) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (b) = valueOrElse(getString(this, b), "") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func d (e,b) = valueOrElse(getBoolean(e, b), false) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func f (e,b) = valueOrElse(getString(e, b), "") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func g (e,b) = valueOrElse(getInteger(e, b), 0) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func h (i) = { | |
20 | 20 | let j = i | |
21 | 21 | if ($isInstanceOf(j, "List[Any]")) | |
22 | 22 | then { | |
23 | 23 | let k = j | |
24 | 24 | k | |
25 | 25 | } | |
26 | 26 | else throw("fail to cast into List[Any]") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func l (i) = { | |
31 | 31 | let j = i | |
32 | 32 | if ($isInstanceOf(j, "String")) | |
33 | 33 | then { | |
34 | 34 | let m = j | |
35 | 35 | m | |
36 | 36 | } | |
37 | 37 | else throw("fail to cast into String") | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func n (i) = { | |
42 | 42 | let j = i | |
43 | 43 | if ($isInstanceOf(j, "Int")) | |
44 | 44 | then { | |
45 | 45 | let o = j | |
46 | 46 | o | |
47 | 47 | } | |
48 | 48 | else throw("fail to cast into Int") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | let p = "__" | |
53 | 53 | ||
54 | 54 | let q = 1000000 | |
55 | 55 | ||
56 | 56 | let r = 100000000 | |
57 | 57 | ||
58 | 58 | let s = toBigInt(10000000000) | |
59 | 59 | ||
60 | 60 | let t = toBigInt(1000000000000) | |
61 | 61 | ||
62 | 62 | let u = toBigInt(10000000000000000) | |
63 | 63 | ||
64 | 64 | let v = "canceled" | |
65 | 65 | ||
66 | 66 | let w = "new" | |
67 | 67 | ||
68 | 68 | let x = "filled" | |
69 | 69 | ||
70 | 70 | let y = fromBase58String("WAVES") | |
71 | 71 | ||
72 | 72 | let z = 0 | |
73 | 73 | ||
74 | 74 | let A = 1 | |
75 | 75 | ||
76 | 76 | let B = 2 | |
77 | 77 | ||
78 | 78 | let C = 3 | |
79 | 79 | ||
80 | 80 | let D = 4 | |
81 | 81 | ||
82 | 82 | let E = 5 | |
83 | 83 | ||
84 | 84 | let F = 6 | |
85 | 85 | ||
86 | 86 | let G = 7 | |
87 | 87 | ||
88 | 88 | let H = 8 | |
89 | 89 | ||
90 | 90 | let I = 9 | |
91 | 91 | ||
92 | 92 | let J = 10 | |
93 | 93 | ||
94 | 94 | let K = 11 | |
95 | 95 | ||
96 | 96 | let L = 0 | |
97 | 97 | ||
98 | 98 | let M = 1 | |
99 | 99 | ||
100 | 100 | let N = 2 | |
101 | 101 | ||
102 | 102 | let O = 3 | |
103 | 103 | ||
104 | 104 | let P = 4 | |
105 | 105 | ||
106 | 106 | let Q = 5 | |
107 | 107 | ||
108 | 108 | let R = 6 | |
109 | 109 | ||
110 | 110 | let S = 7 | |
111 | 111 | ||
112 | 112 | let T = 8 | |
113 | 113 | ||
114 | 114 | let U = 9 | |
115 | 115 | ||
116 | 116 | let V = 10 | |
117 | 117 | ||
118 | 118 | let W = "price" | |
119 | 119 | ||
120 | 120 | let X = "bond_asset_id" | |
121 | 121 | ||
122 | 122 | let Y = "neutrino_asset_id" | |
123 | 123 | ||
124 | 124 | let Z = "surf_asset_id" | |
125 | 125 | ||
126 | 126 | let aa = "balance_lock_" | |
127 | 127 | ||
128 | 128 | let ab = (aa + "waves") | |
129 | 129 | ||
130 | 130 | let ac = (aa + "neutrino") | |
131 | 131 | ||
132 | 132 | let ad = "order_first" | |
133 | 133 | ||
134 | 134 | let ae = "math_contract" | |
135 | 135 | ||
136 | 136 | let af = "min_waves_nsbt_buy" | |
137 | 137 | ||
138 | 138 | let ag = "min_nsbt_sell" | |
139 | 139 | ||
140 | 140 | let ah = "min_waves_surf_buy" | |
141 | 141 | ||
142 | 142 | let ai = "min_usdn_surf_buy" | |
143 | 143 | ||
144 | 144 | func aj (ak) = ("debug_order_roi_" + ak) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func al (ak) = ("order_price_" + ak) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func am (ak) = ("order_total_" + ak) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func an (ak) = ("order_owner_" + ak) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func ao (ak) = ("order_height_" + ak) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func ap (ak) = ("order_status_" + ak) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func aq (ak) = ("order_filled_total_" + ak) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func ar (ak) = ("order_prev_" + ak) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func as (ak) = ("order_next_" + ak) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func at (au,av) = fraction(au, r, av) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func aw (au,av) = fraction(au, av, r) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func ax (ay,az) = fraction(toBigInt(ay), u, toBigInt(az)) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func aA (i,aB) = toInt(fraction(i, toBigInt(aB), u)) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | let aC = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj') | |
184 | 184 | ||
185 | 185 | let aD = Address(base58'3MrwvfA9VRYwhHy4NuWPQGdxCtZdhH4LMMa') | |
186 | 186 | ||
187 | 187 | let aE = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N') | |
188 | 188 | ||
189 | 189 | let aF = addressFromStringValue(c(ae)) | |
190 | 190 | ||
191 | 191 | let aG = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
192 | 192 | ||
193 | 193 | let aH = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z' | |
194 | 194 | ||
195 | 195 | let aI = d(aD, "is_blocked") | |
196 | 196 | ||
197 | 197 | let aJ = valueOrElse(getInteger(this, af), 1000000000) | |
198 | 198 | ||
199 | 199 | let aK = valueOrElse(getInteger(this, ag), 1000000) | |
200 | 200 | ||
201 | 201 | let aL = valueOrElse(getInteger(this, ah), 100000000) | |
202 | 202 | ||
203 | 203 | let aM = valueOrElse(getInteger(this, ai), 10000000) | |
204 | 204 | ||
205 | 205 | let aN = c(ad) | |
206 | 206 | ||
207 | 207 | func aO (aP) = a(al(aP)) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func aQ (aP) = a(am(aP)) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func aR (aP) = c(an(aP)) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func aS (aP) = c(ap(aP)) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func aT (aP) = a(aq(aP)) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func aU (aP) = c(ar(aP)) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func aV (aP) = c(as(aP)) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func aW (av) = ((q * q) / av) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func aX (aY,aZ) = fraction(toBigInt(aY), toBigInt((q * q)), toBigInt(aZ)) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func ba (ak,bb,bc,bd,be,bf,av,bg) = [StringEntry(al(ak), toString(av)), IntegerEntry(am(ak), bb), IntegerEntry(aq(ak), bc), StringEntry(an(ak), bd), IntegerEntry(ao(ak), height), StringEntry(ap(ak), be), IntegerEntry(("debug_order_currentPrice_" + ak), bg), IntegerEntry(aj(ak), bf)] | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func bh (bi,bj) = (((((((((((((((((((((((((((((((((((bi + "[nsbtAmountRaw=") + toString(n(bj[0]))) + " usdnPayment=") + toString(n(bj[1]))) + " wRaw=") + toString(n(bj[2]))) + " uRaw=") + toString(n(bj[3]))) + " mRaw=") + toString(n(bj[4]))) + " sRaw=") + toString(n(bj[5]))) + " nsbtCurveParam_a=") + toString(n(bj[6]))) + " nsbtCurveParam_b=") + toString(n(bj[7]))) + " wReservesInUsdn=") + toString(n(bj[8]))) + " price=") + toString(n(bj[9]))) + " multBR=") + toString(n(bj[10]))) + " multPower=") + toString(n(bj[11]))) + " multExpInPower=") + l(bj[12])) + " multK=") + l(bj[13])) + " step1=") + l(bj[14])) + " step2=") + l(bj[15])) + " step3=") + toString(n(bj[16]))) + "]") | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func bk (bl) = StringEntry("debug_surfResult", makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(n(bl[L])), toString(n(bl[M])), toString(n(bl[N])), toString(n(bl[O])), toString(n(bl[P])), toString(n(bl[Q])), toString(n(bl[R])), toString(n(bl[S])), toString(n(bl[T])), toString(n(bl[U])), toString(n(bl[V]))], p)) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | @Callable(bm) | |
244 | 244 | func constructor (bn,bo,aK) = if ((bm.caller != this)) | |
245 | 245 | then throw("Permission denied") | |
246 | 246 | else [StringEntry(ae, bn), IntegerEntry(ag, aK), IntegerEntry(af, bo)] | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(bm) | |
251 | 251 | func constructorV2 (bp,bq) = if ((bm.caller != this)) | |
252 | 252 | then throw("Permission denied") | |
253 | 253 | else { | |
254 | 254 | let br = Issue("SURF", "Smart Utility Recapitalization Feature token", 0, 6, true, unit, 0) | |
255 | 255 | let bs = calculateAssetId(br) | |
256 | 256 | [br, StringEntry(Z, toBase58String(bs)), IntegerEntry(ah, bp), IntegerEntry(ai, bq)] | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(bm) | |
262 | 262 | func buyNsbt () = { | |
263 | 263 | let bt = value(bm.payments[0]) | |
264 | 264 | let bu = bt.amount | |
265 | 265 | let bv = bu | |
266 | 266 | if (aI) | |
267 | 267 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
268 | 268 | else if (isDefined(bt.assetId)) | |
269 | 269 | then throw("can use waves only") | |
270 | 270 | else if ((aJ > bu)) | |
271 | 271 | then throw((("min " + toString((aJ / r))) + " waves expected")) | |
272 | 272 | else { | |
273 | 273 | let bw = bm.caller | |
274 | 274 | let bx = h(invoke(aF, "calcNeutinoMetricsREADONLY", nil, nil)) | |
275 | 275 | let bg = n(bx[0]) | |
276 | 276 | let bj = h(invoke(aF, "curveFunctionREADONLY", [bv], nil)) | |
277 | 277 | let by = n(bj[0]) | |
278 | 278 | if ((0 >= by)) | |
279 | 279 | then throw("nsbtAmount <= 0") | |
280 | 280 | else { | |
281 | 281 | let bz = aX(bv, by) | |
282 | 282 | let bf = 0 | |
283 | 283 | let bA = invoke(aC, "acceptWaves", nil, bm.payments) | |
284 | 284 | if ((bA == bA)) | |
285 | 285 | then $Tuple2((ba(toBase58String(bm.transactionId), bu, bu, toString(bw), x, bf, bz, bg) ++ [ScriptTransfer(bw, by, aH), StringEntry("debug_curveResult", bh("curveResult", bj))]), by) | |
286 | 286 | else throw("Strict value is not equal to itself.") | |
287 | 287 | } | |
288 | 288 | } | |
289 | 289 | } | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | ||
293 | 293 | @Callable(bm) | |
294 | 294 | func sellNsbt () = if (aI) | |
295 | 295 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
296 | 296 | else { | |
297 | 297 | let bt = value(bm.payments[0]) | |
298 | 298 | let bu = bt.amount | |
299 | 299 | if ((bt.assetId != aH)) | |
300 | 300 | then throw("can use NSBT only") | |
301 | 301 | else if ((aK > bu)) | |
302 | 302 | then throw((("min " + toString((aK / q))) + " nsbt expected")) | |
303 | 303 | else { | |
304 | 304 | let bB = n(h(invoke(aF, "calcContractNsbtPriceSYSREADONLY", [-(bu)], nil))[0]) | |
305 | 305 | if ((q > bB)) | |
306 | 306 | then throw((("resulting nsbt price would be < 1 (" + toString(bB)) + " usdn)")) | |
307 | 307 | else { | |
308 | 308 | let bC = invoke(aC, "transferUsdnToUser", [bu, toString(bm.caller)], nil) | |
309 | 309 | if ((bC == bC)) | |
310 | 310 | then $Tuple2(nil, bB) | |
311 | 311 | else throw("Strict value is not equal to itself.") | |
312 | 312 | } | |
313 | 313 | } | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(bm) | |
319 | 319 | func cancelOrder (ak) = { | |
320 | 320 | let bd = aR(ak) | |
321 | 321 | let au = (aQ(ak) - aT(ak)) | |
322 | 322 | let bD = toString(bm.caller) | |
323 | 323 | let bE = aV(ak) | |
324 | 324 | let bF = aU(ak) | |
325 | 325 | if ((aS(ak) != w)) | |
326 | 326 | then throw("invalid order status") | |
327 | 327 | else [StringEntry(ad, if ((aN == ak)) | |
328 | 328 | then bE | |
329 | 329 | else aN), StringEntry(as(bF), bE), StringEntry(ar(bE), bF), StringEntry(ap(ak), v), ScriptTransfer(bm.caller, au, unit)] | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | ||
334 | 334 | @Callable(bm) | |
335 | 335 | func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, aJ) | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | ||
339 | 339 | @Callable(bm) | |
340 | 340 | func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, aK) | |
341 | 341 | ||
342 | 342 | ||
343 | 343 | ||
344 | 344 | @Callable(bm) | |
345 | 345 | func minWavesAmountSurfBuySYSREADONLY () = $Tuple2(nil, aL) | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | 349 | @Callable(bm) | |
350 | 350 | func minUsdnAmountSurfBuySYSREADONLY () = $Tuple2(nil, aM) | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | 354 | @Callable(bm) | |
355 | 355 | func buySurf (bG,bH,bI) = if ((size(bm.payments) != 1)) | |
356 | 356 | then throw("exactly 1 payment must be attached") | |
357 | - | else { | |
358 | - | let bt = bm.payments[0] | |
359 | - | let bJ = bt.amount | |
360 | - | let bK = valueOrElse(bt.assetId, y) | |
361 | - | if (if ((bK != aG)) | |
362 | - | then (bK != y) | |
363 | - | else false) | |
364 | - | then throw("Unsupported payment asset") | |
365 | - | else if (if ((bK == aG)) | |
366 | - | then (aM > bJ) | |
367 | - | else false) | |
368 | - | then throw((("min " + toString((aM / q))) + " USDN expected")) | |
369 | - | else if (if ((bK == y)) | |
370 | - | then (aL > bJ) | |
357 | + | else if ((0 >= bG)) | |
358 | + | then throw("averagePriceWanted should be positive") | |
359 | + | else if ((0 >= bH)) | |
360 | + | then throw("maxTolerancePerc should be positive") | |
361 | + | else { | |
362 | + | let bt = bm.payments[0] | |
363 | + | let bJ = bt.amount | |
364 | + | let bK = valueOrElse(bt.assetId, y) | |
365 | + | if (if ((bK != aG)) | |
366 | + | then (bK != y) | |
371 | 367 | else false) | |
372 | - | then throw((("min " + toString((aL / r))) + " WAVES expected")) | |
373 | - | else { | |
374 | - | let bl = h(invoke(aF, "surfFunctionREADONLY", [bJ, bK], nil)) | |
375 | - | let bL = n(bl[M]) | |
376 | - | let bM = n(bl[N]) | |
377 | - | let bN = n(bl[L]) | |
378 | - | let bO = toBigInt(bN) | |
379 | - | let bP = if ((bK == y)) | |
380 | - | then (toBigInt(bL) * s) | |
381 | - | else (toBigInt(bM) * t) | |
382 | - | if ((bP > ((toBigInt((bH + q)) * toBigInt(bG)) * bO))) | |
383 | - | then throw((((((("Tolerance " + toString(bH)) + " exceeded: spent ") + (if ((bK == y)) | |
384 | - | then (toString(bL) + " WAVES") | |
385 | - | else (toString(bM) + " USDN"))) + " for ") + toString(bN)) + " SURF")) | |
368 | + | then throw("Unsupported payment asset") | |
369 | + | else if (if ((bK == aG)) | |
370 | + | then (aM > bJ) | |
371 | + | else false) | |
372 | + | then throw((("min " + toString((aM / q))) + " USDN expected")) | |
373 | + | else if (if ((bK == y)) | |
374 | + | then (aL > bJ) | |
375 | + | else false) | |
376 | + | then throw((("min " + toString((aL / r))) + " WAVES expected")) | |
386 | 377 | else { | |
387 | - | let bQ = n(bl[U]) | |
388 | - | let bR = if ((bK == y)) | |
389 | - | then { | |
390 | - | let bS = invoke(aC, "acceptWaves", nil, [AttachedPayment(unit, (bJ - bQ))]) | |
391 | - | if ((bS == bS)) | |
392 | - | then if ((bQ > 0)) | |
393 | - | then [ScriptTransfer(bm.caller, bQ, unit)] | |
394 | - | else nil | |
395 | - | else throw("Strict value is not equal to itself.") | |
378 | + | let bl = h(invoke(aF, "surfFunctionREADONLY", [bJ, bK], nil)) | |
379 | + | let bL = n(bl[M]) | |
380 | + | let bM = n(bl[N]) | |
381 | + | let bN = n(bl[L]) | |
382 | + | let bO = toBigInt(bN) | |
383 | + | let bP = if ((bK == y)) | |
384 | + | then (toBigInt(bL) * s) | |
385 | + | else (toBigInt(bM) * t) | |
386 | + | if ((bP > ((toBigInt((bH + q)) * toBigInt(bG)) * bO))) | |
387 | + | then throw((((((("Tolerance " + toString(bH)) + " exceeded: spent ") + (if ((bK == y)) | |
388 | + | then (toString(bL) + " WAVES") | |
389 | + | else (toString(bM) + " USDN"))) + " for ") + toString(bN)) + " SURF")) | |
390 | + | else { | |
391 | + | let bQ = n(bl[U]) | |
392 | + | let bR = if ((bK == y)) | |
393 | + | then { | |
394 | + | let bS = invoke(aC, "acceptWaves", nil, [AttachedPayment(unit, (bJ - bQ))]) | |
395 | + | if ((bS == bS)) | |
396 | + | then if ((bQ > 0)) | |
397 | + | then [ScriptTransfer(bm.caller, bQ, unit)] | |
398 | + | else nil | |
399 | + | else throw("Strict value is not equal to itself.") | |
400 | + | } | |
401 | + | else if ((bQ > 0)) | |
402 | + | then [ScriptTransfer(aC, (bJ - bQ), aG), ScriptTransfer(bm.caller, bQ, aG)] | |
403 | + | else [ScriptTransfer(aC, (bJ - bQ), aG)] | |
404 | + | let bT = fromBase58String(getStringValue(Z)) | |
405 | + | (bR ++ [Reissue(bT, bN, true), ScriptTransfer(bm.caller, bN, bT), bk(bl)]) | |
396 | 406 | } | |
397 | - | else if ((bQ > 0)) | |
398 | - | then [ScriptTransfer(aC, (bJ - bQ), aG), ScriptTransfer(bm.caller, bQ, aG)] | |
399 | - | else [ScriptTransfer(aC, (bJ - bQ), aG)] | |
400 | - | let bT = fromBase58String(getStringValue(Z)) | |
401 | - | (bR ++ [Reissue(bT, bN, true), ScriptTransfer(bm.caller, bN, bT), bk(bl)]) | |
402 | 407 | } | |
403 | - | } | |
404 | - | } | |
408 | + | } | |
405 | 409 | ||
406 | 410 | ||
407 | 411 | @Verifier(bU) | |
408 | 412 | func bV () = { | |
409 | 413 | let bW = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"], p) | |
410 | 414 | let bX = split(valueOrElse(getString(aD, "%s__multisig"), bW), p) | |
411 | 415 | let bY = ((((if (sigVerify(bU.bodyBytes, bU.proofs[0], fromBase58String(bX[0]))) | |
412 | 416 | then 1 | |
413 | 417 | else 0) + (if (sigVerify(bU.bodyBytes, bU.proofs[1], fromBase58String(bX[1]))) | |
414 | 418 | then 1 | |
415 | 419 | else 0)) + (if (sigVerify(bU.bodyBytes, bU.proofs[2], fromBase58String(bX[2]))) | |
416 | 420 | then 1 | |
417 | 421 | else 0)) + (if (sigVerify(bU.bodyBytes, bU.proofs[3], fromBase58String(bX[3]))) | |
418 | 422 | then 2 | |
419 | 423 | else 0)) | |
420 | 424 | (bY >= 3) | |
421 | 425 | } | |
422 | 426 |
github/deemru/w8io/026f985 53.14 ms ◑