tx · HzGeDH5SVpVj39fHMsb8MDoigBoFtGjvdC5HJx8JsoKv 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd: -0.01400000 Waves 2022.03.18 10:35 [1969106] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves
{ "type": 13, "id": "HzGeDH5SVpVj39fHMsb8MDoigBoFtGjvdC5HJx8JsoKv", "fee": 1400000, "feeAssetId": null, "timestamp": 1647588949441, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "3ndGXx78eE28vLSADWsdXBBYtnKLbqekVyxbnrLj2Vg6LatmtQyxqCZSJY5JmKscz5k88WhW8dGxGhhSsSEaZABJ", "3FDJBQXgfQ8eJaNw115TqbzcWT2SGHgZ3Een6sTdqxfQBVc2Trs6VpyipqXwEKcdG49qtqebxCxbanL7gKcDtkZa", "2VHdbPB8YXdTj8ZWWJMLTr6YYpr5DCJgcpeEwaFdrUaqzXi9642uCAmJFKXevkK54C84wFS9xtHiYP5r9Cait7He" ], "script": "base64:AAIFAAAAAAAAAA8IAhIAEgASAwoBCBIAEgAAAABDAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAWZ2V0Qm9vbEJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5BwEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzQ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kAAGQAAAACAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAABAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADPsQsYg==", "chainId": 84, "height": 1969106, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: hikumg7MGwM6qqCtdBnzEj3snWC3JY8JDJ7Nsh32nbE Next: H6f3X1ng34CrNLJUQPVyS8HUauzTic338HNd6qHjHnyM Diff:
Old | New | Differences | |
---|---|---|---|
184 | 184 | func az (Y) = ((s * s) / Y) | |
185 | 185 | ||
186 | 186 | ||
187 | - | func aA (aB,aC) = fraction(aB, (q * s), aC) | |
187 | + | func aA (aB,aC) = fraction(toBigInt(aB), toBigInt((q * s)), toBigInt(aC)) | |
188 | 188 | ||
189 | 189 | ||
190 | - | func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [ | |
190 | + | func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [StringEntry(O(N), toString(Y)), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)] | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func aK (aL,aM) = (((((((((((((((((((((((((((((((((((aL + "[nsbtAmountRaw=") + toString(n(aM[0]))) + " usdnPayment=") + toString(n(aM[1]))) + " wRaw=") + toString(n(aM[2]))) + " uRaw=") + toString(n(aM[3]))) + " mRaw=") + toString(n(aM[4]))) + " sRaw=") + toString(n(aM[5]))) + " nsbtCurveParam_a=") + toString(n(aM[6]))) + " nsbtCurveParam_b=") + toString(n(aM[7]))) + " wReservesInUsdn=") + toString(n(aM[8]))) + " price=") + toString(n(aM[9]))) + " multBR=") + toString(n(aM[10]))) + " multPower=") + toString(n(aM[11]))) + " multExpInPower=") + l(aM[12])) + " multK=") + l(aM[13])) + " step1=") + l(aM[14])) + " step2=") + l(aM[15])) + " step3=") + toString(n(aM[16]))) + "]") | |
207 | 207 | else { | |
208 | 208 | let aR = aN.caller | |
209 | 209 | let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil)) | |
210 | - | if ((aS == aS)) | |
211 | - | then { | |
212 | - | let aJ = n(aS[0]) | |
213 | - | let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil)) | |
214 | - | if ((aM == aM)) | |
215 | - | then { | |
216 | - | let aT = n(aM[0]) | |
217 | - | if ((0 >= aT)) | |
218 | - | then throw("nsbtAmount <= 0") | |
219 | - | else if ((aQ > (aT * 9223372))) | |
220 | - | then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(aQ)) + "/") + toString(aT))) | |
221 | - | else { | |
222 | - | let aU = aA(aQ, aT) | |
223 | - | let aI = 0 | |
224 | - | let aV = invoke(ah, "acceptWaves", nil, aN.payments) | |
225 | - | if ((aV == aV)) | |
226 | - | then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT) | |
227 | - | else throw("Strict value is not equal to itself.") | |
228 | - | } | |
229 | - | } | |
210 | + | let aJ = n(aS[0]) | |
211 | + | let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil)) | |
212 | + | let aT = n(aM[0]) | |
213 | + | if ((0 >= aT)) | |
214 | + | then throw("nsbtAmount <= 0") | |
215 | + | else { | |
216 | + | let aU = aA(aQ, aT) | |
217 | + | let aI = 0 | |
218 | + | let aV = invoke(ah, "acceptWaves", nil, aN.payments) | |
219 | + | if ((aV == aV)) | |
220 | + | then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT) | |
230 | 221 | else throw("Strict value is not equal to itself.") | |
231 | 222 | } | |
232 | - | else throw("Strict value is not equal to itself.") | |
233 | 223 | } | |
234 | 224 | } | |
235 | 225 | ||
246 | 236 | else if ((ap > aP)) | |
247 | 237 | then throw((("min " + toString((ap / q))) + " nsbt expected")) | |
248 | 238 | else { | |
249 | - | let | |
250 | - | if (( | |
251 | - | then | |
252 | - | | |
253 | - | let aX = | |
239 | + | let aW = n(h(invoke(ak, "calcContractNsbtPriceSYSREADONLY", [-(aP)], nil))[0]) | |
240 | + | if ((q > aW)) | |
241 | + | then throw((("resulting nsbt price would be < 1 (" + toString(aW)) + " usdn")) | |
242 | + | else { | |
243 | + | let aX = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil) | |
254 | 244 | if ((aX == aX)) | |
255 | - | then if ((q > aX)) | |
256 | - | then throw((("resulting nsbt price would be < 1 (" + toString(aX)) + " usdn")) | |
257 | - | else { | |
258 | - | let aY = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil) | |
259 | - | if ((aY == aY)) | |
260 | - | then $Tuple2(nil, aX) | |
261 | - | else throw("Strict value is not equal to itself.") | |
262 | - | } | |
245 | + | then $Tuple2(nil, aW) | |
263 | 246 | else throw("Strict value is not equal to itself.") | |
264 | 247 | } | |
265 | - | else throw("Strict value is not equal to itself.") | |
266 | 248 | } | |
267 | 249 | } | |
268 | 250 | ||
272 | 254 | func cancelOrder (N) = { | |
273 | 255 | let aG = au(N) | |
274 | 256 | let X = (at(N) - aw(N)) | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
257 | + | let aY = toString(aN.caller) | |
258 | + | let aZ = ay(N) | |
259 | + | let ba = ax(N) | |
278 | 260 | if ((av(N) != A)) | |
279 | 261 | then throw("invalid order status") | |
280 | 262 | else [StringEntry(I, if ((aq == N)) | |
281 | - | then | |
282 | - | else aq), StringEntry(V( | |
263 | + | then aZ | |
264 | + | else aq), StringEntry(V(ba), aZ), StringEntry(U(aZ), ba), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)] | |
283 | 265 | } | |
284 | 266 | ||
285 | 267 | ||
293 | 275 | func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, ap) | |
294 | 276 | ||
295 | 277 | ||
296 | - | @Verifier( | |
297 | - | func | |
298 | - | let | |
299 | - | let | |
278 | + | @Verifier(bb) | |
279 | + | func bc () = { | |
280 | + | let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
281 | + | let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0]))) | |
300 | 282 | then 1 | |
301 | - | else 0) + (if (sigVerify( | |
283 | + | else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1]))) | |
302 | 284 | then 1 | |
303 | - | else 0)) + (if (sigVerify( | |
285 | + | else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2]))) | |
304 | 286 | then 1 | |
305 | - | else 0)) + (if (sigVerify( | |
287 | + | else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3]))) | |
306 | 288 | then 2 | |
307 | 289 | else 0)) | |
308 | - | ( | |
290 | + | (be >= 3) | |
309 | 291 | } | |
310 | 292 |
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 = 100000000 | |
53 | 53 | ||
54 | 54 | let q = 1000000 | |
55 | 55 | ||
56 | 56 | let r = toBigInt(1000000) | |
57 | 57 | ||
58 | 58 | let s = 1000000 | |
59 | 59 | ||
60 | 60 | let t = 100000000 | |
61 | 61 | ||
62 | 62 | let u = toBigInt(10000000000000000) | |
63 | 63 | ||
64 | 64 | let v = 8 | |
65 | 65 | ||
66 | 66 | let w = 16 | |
67 | 67 | ||
68 | 68 | let x = (10 * p) | |
69 | 69 | ||
70 | 70 | let y = 95 | |
71 | 71 | ||
72 | 72 | let z = "canceled" | |
73 | 73 | ||
74 | 74 | let A = "new" | |
75 | 75 | ||
76 | 76 | let B = "filled" | |
77 | 77 | ||
78 | 78 | let C = "price" | |
79 | 79 | ||
80 | 80 | let D = "bond_asset_id" | |
81 | 81 | ||
82 | 82 | let E = "neutrino_asset_id" | |
83 | 83 | ||
84 | 84 | let F = "balance_lock_" | |
85 | 85 | ||
86 | 86 | let G = (F + "waves") | |
87 | 87 | ||
88 | 88 | let H = (F + "neutrino") | |
89 | 89 | ||
90 | 90 | let I = "order_first" | |
91 | 91 | ||
92 | 92 | let J = "math_contract" | |
93 | 93 | ||
94 | 94 | let K = "min_waves_nsbt_buy" | |
95 | 95 | ||
96 | 96 | let L = "min_nsbt_sell" | |
97 | 97 | ||
98 | 98 | func M (N) = ("debug_order_roi_" + N) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func O (N) = ("order_price_" + N) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func P (N) = ("order_total_" + N) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func Q (N) = ("order_owner_" + N) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func R (N) = ("order_height_" + N) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func S (N) = ("order_status_" + N) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func T (N) = ("order_filled_total_" + N) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func U (N) = ("order_prev_" + N) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func V (N) = ("order_next_" + N) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func W (X,Y) = fraction(fraction(X, s, Y), p, q) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func Z (X,Y) = fraction(fraction(X, Y, s), q, p) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func aa (X,Y) = Z(X, Y) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func ab (X,Y) = W(X, Y) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func ac (ad,ae) = fraction(toBigInt(ad), u, toBigInt(ae)) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func af (i,ag) = toInt(fraction(i, toBigInt(ag), u)) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | let ah = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj') | |
144 | 144 | ||
145 | 145 | let ai = Address(base58'3MrwvfA9VRYwhHy4NuWPQGdxCtZdhH4LMMa') | |
146 | 146 | ||
147 | 147 | let aj = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N') | |
148 | 148 | ||
149 | 149 | let ak = addressFromStringValue(c(J)) | |
150 | 150 | ||
151 | 151 | let al = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
152 | 152 | ||
153 | 153 | let am = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z' | |
154 | 154 | ||
155 | 155 | let an = d(ai, "is_blocked") | |
156 | 156 | ||
157 | 157 | let ao = valueOrElse(getInteger(this, K), 1000000000) | |
158 | 158 | ||
159 | 159 | let ap = valueOrElse(getInteger(this, L), 1000000) | |
160 | 160 | ||
161 | 161 | let aq = c(I) | |
162 | 162 | ||
163 | 163 | func ar (as) = a(O(as)) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func at (as) = a(P(as)) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func au (as) = c(Q(as)) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func av (as) = c(S(as)) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func aw (as) = a(T(as)) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func ax (as) = c(U(as)) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func ay (as) = c(V(as)) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func az (Y) = ((s * s) / Y) | |
185 | 185 | ||
186 | 186 | ||
187 | - | func aA (aB,aC) = fraction(aB, (q * s), aC) | |
187 | + | func aA (aB,aC) = fraction(toBigInt(aB), toBigInt((q * s)), toBigInt(aC)) | |
188 | 188 | ||
189 | 189 | ||
190 | - | func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [ | |
190 | + | func aD (N,aE,aF,aG,aH,aI,Y,aJ) = [StringEntry(O(N), toString(Y)), IntegerEntry(P(N), aE), IntegerEntry(T(N), aF), StringEntry(Q(N), aG), IntegerEntry(R(N), height), StringEntry(S(N), aH), IntegerEntry(("debug_order_currentPrice_" + N), aJ), IntegerEntry(M(N), aI)] | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func aK (aL,aM) = (((((((((((((((((((((((((((((((((((aL + "[nsbtAmountRaw=") + toString(n(aM[0]))) + " usdnPayment=") + toString(n(aM[1]))) + " wRaw=") + toString(n(aM[2]))) + " uRaw=") + toString(n(aM[3]))) + " mRaw=") + toString(n(aM[4]))) + " sRaw=") + toString(n(aM[5]))) + " nsbtCurveParam_a=") + toString(n(aM[6]))) + " nsbtCurveParam_b=") + toString(n(aM[7]))) + " wReservesInUsdn=") + toString(n(aM[8]))) + " price=") + toString(n(aM[9]))) + " multBR=") + toString(n(aM[10]))) + " multPower=") + toString(n(aM[11]))) + " multExpInPower=") + l(aM[12])) + " multK=") + l(aM[13])) + " step1=") + l(aM[14])) + " step2=") + l(aM[15])) + " step3=") + toString(n(aM[16]))) + "]") | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(aN) | |
197 | 197 | func buyNsbt () = { | |
198 | 198 | let aO = value(aN.payments[0]) | |
199 | 199 | let aP = aO.amount | |
200 | 200 | let aQ = aP | |
201 | 201 | if (an) | |
202 | 202 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
203 | 203 | else if (isDefined(aO.assetId)) | |
204 | 204 | then throw("can use waves only") | |
205 | 205 | else if ((ao > aP)) | |
206 | 206 | then throw((("min " + toString((ao / p))) + " waves expected")) | |
207 | 207 | else { | |
208 | 208 | let aR = aN.caller | |
209 | 209 | let aS = h(invoke(ak, "calcNeutinoMetricsREADONLY", nil, nil)) | |
210 | - | if ((aS == aS)) | |
211 | - | then { | |
212 | - | let aJ = n(aS[0]) | |
213 | - | let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil)) | |
214 | - | if ((aM == aM)) | |
215 | - | then { | |
216 | - | let aT = n(aM[0]) | |
217 | - | if ((0 >= aT)) | |
218 | - | then throw("nsbtAmount <= 0") | |
219 | - | else if ((aQ > (aT * 9223372))) | |
220 | - | then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(aQ)) + "/") + toString(aT))) | |
221 | - | else { | |
222 | - | let aU = aA(aQ, aT) | |
223 | - | let aI = 0 | |
224 | - | let aV = invoke(ah, "acceptWaves", nil, aN.payments) | |
225 | - | if ((aV == aV)) | |
226 | - | then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT) | |
227 | - | else throw("Strict value is not equal to itself.") | |
228 | - | } | |
229 | - | } | |
210 | + | let aJ = n(aS[0]) | |
211 | + | let aM = h(invoke(ak, "curveFunctionREADONLY", [aQ], nil)) | |
212 | + | let aT = n(aM[0]) | |
213 | + | if ((0 >= aT)) | |
214 | + | then throw("nsbtAmount <= 0") | |
215 | + | else { | |
216 | + | let aU = aA(aQ, aT) | |
217 | + | let aI = 0 | |
218 | + | let aV = invoke(ah, "acceptWaves", nil, aN.payments) | |
219 | + | if ((aV == aV)) | |
220 | + | then $Tuple2((aD(toBase58String(aN.transactionId), aP, aP, toString(aR), B, aI, aU, aJ) ++ [ScriptTransfer(aR, aT, am), StringEntry("debug_curveResult", aK("curveResult", aM))]), aT) | |
230 | 221 | else throw("Strict value is not equal to itself.") | |
231 | 222 | } | |
232 | - | else throw("Strict value is not equal to itself.") | |
233 | 223 | } | |
234 | 224 | } | |
235 | 225 | ||
236 | 226 | ||
237 | 227 | ||
238 | 228 | @Callable(aN) | |
239 | 229 | func sellNsbt () = if (an) | |
240 | 230 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
241 | 231 | else { | |
242 | 232 | let aO = value(aN.payments[0]) | |
243 | 233 | let aP = aO.amount | |
244 | 234 | if ((aO.assetId != am)) | |
245 | 235 | then throw("can use NSBT only") | |
246 | 236 | else if ((ap > aP)) | |
247 | 237 | then throw((("min " + toString((ap / q))) + " nsbt expected")) | |
248 | 238 | else { | |
249 | - | let | |
250 | - | if (( | |
251 | - | then | |
252 | - | | |
253 | - | let aX = | |
239 | + | let aW = n(h(invoke(ak, "calcContractNsbtPriceSYSREADONLY", [-(aP)], nil))[0]) | |
240 | + | if ((q > aW)) | |
241 | + | then throw((("resulting nsbt price would be < 1 (" + toString(aW)) + " usdn")) | |
242 | + | else { | |
243 | + | let aX = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil) | |
254 | 244 | if ((aX == aX)) | |
255 | - | then if ((q > aX)) | |
256 | - | then throw((("resulting nsbt price would be < 1 (" + toString(aX)) + " usdn")) | |
257 | - | else { | |
258 | - | let aY = invoke(ah, "transferUsdnToUser", [aP, toString(aN.caller)], nil) | |
259 | - | if ((aY == aY)) | |
260 | - | then $Tuple2(nil, aX) | |
261 | - | else throw("Strict value is not equal to itself.") | |
262 | - | } | |
245 | + | then $Tuple2(nil, aW) | |
263 | 246 | else throw("Strict value is not equal to itself.") | |
264 | 247 | } | |
265 | - | else throw("Strict value is not equal to itself.") | |
266 | 248 | } | |
267 | 249 | } | |
268 | 250 | ||
269 | 251 | ||
270 | 252 | ||
271 | 253 | @Callable(aN) | |
272 | 254 | func cancelOrder (N) = { | |
273 | 255 | let aG = au(N) | |
274 | 256 | let X = (at(N) - aw(N)) | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
257 | + | let aY = toString(aN.caller) | |
258 | + | let aZ = ay(N) | |
259 | + | let ba = ax(N) | |
278 | 260 | if ((av(N) != A)) | |
279 | 261 | then throw("invalid order status") | |
280 | 262 | else [StringEntry(I, if ((aq == N)) | |
281 | - | then | |
282 | - | else aq), StringEntry(V( | |
263 | + | then aZ | |
264 | + | else aq), StringEntry(V(ba), aZ), StringEntry(U(aZ), ba), StringEntry(S(N), z), ScriptTransfer(aN.caller, X, unit)] | |
283 | 265 | } | |
284 | 266 | ||
285 | 267 | ||
286 | 268 | ||
287 | 269 | @Callable(aN) | |
288 | 270 | func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, ao) | |
289 | 271 | ||
290 | 272 | ||
291 | 273 | ||
292 | 274 | @Callable(aN) | |
293 | 275 | func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, ap) | |
294 | 276 | ||
295 | 277 | ||
296 | - | @Verifier( | |
297 | - | func | |
298 | - | let | |
299 | - | let | |
278 | + | @Verifier(bb) | |
279 | + | func bc () = { | |
280 | + | let bd = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
281 | + | let be = ((((if (sigVerify(bb.bodyBytes, bb.proofs[0], fromBase58String(bd[0]))) | |
300 | 282 | then 1 | |
301 | - | else 0) + (if (sigVerify( | |
283 | + | else 0) + (if (sigVerify(bb.bodyBytes, bb.proofs[1], fromBase58String(bd[1]))) | |
302 | 284 | then 1 | |
303 | - | else 0)) + (if (sigVerify( | |
285 | + | else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[2], fromBase58String(bd[2]))) | |
304 | 286 | then 1 | |
305 | - | else 0)) + (if (sigVerify( | |
287 | + | else 0)) + (if (sigVerify(bb.bodyBytes, bb.proofs[3], fromBase58String(bd[3]))) | |
306 | 288 | then 2 | |
307 | 289 | else 0)) | |
308 | - | ( | |
290 | + | (be >= 3) | |
309 | 291 | } | |
310 | 292 |
github/deemru/w8io/026f985 53.60 ms ◑