tx · 3jn389JsnYPnD7Tyt9tZ1d2DWHX2A9EyS8uZJFJuBNnc 3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL: -0.01400000 Waves 2019.09.27 23:32 [695318] smart account 3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL > SELF 0.00000000 Waves
{ "type": 13, "id": "3jn389JsnYPnD7Tyt9tZ1d2DWHX2A9EyS8uZJFJuBNnc", "fee": 1400000, "feeAssetId": null, "timestamp": 1569616436554, "version": 1, "sender": "3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL", "senderPublicKey": "CmDpND6JVW2kuJjY4zyXaTHga2fTuCGbo3G9aySpdybJ", "proofs": [ "5gVJGYJP5Kjy3YePHxVvyqfvjyGFXWx1wNEaRh1fKP3uqfCSXAHg4jB2sVqfrs45oLXRDumuQjk5snDVazAuWSDb" ], "script": "base64:AAIDAAAAAAAAAAAAAABhAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcAAAAAD0xJU1RTUExJVFNZTUJPTAIAAAABXwAAAAAOTElTVERBVEFTWU1CT0wCAAAAASsAAA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yYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAACm9yZGVyT3duZXIJAQAAABVjb252ZXJ0Qm9uZFRvTmV1dHJpbm8AAAABBQAAAA5uZXdGaWxsZWRUb3RhbAUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAO1fVaA==", "chainId": 84, "height": 695318, "spentComplexity": 0 } View: original | compacted Prev: EHA9aiUZuunrmyR7BDmv4kwwLP6TPtsLbu1AFKZsveMN Next: 6sWj91cmh1JANWDRTGbDiBTSEiWXskqaFohHJxMc1W4x Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | - | func g (h,b) = { | |
38 | - | let c = getInteger(addressFromStringValue(h), b) | |
39 | - | if ($isInstanceOf(c, "Int")) | |
40 | - | then { | |
41 | - | let d = c | |
42 | - | d | |
43 | - | } | |
44 | - | else 0 | |
45 | - | } | |
37 | + | let g = "_" | |
46 | 38 | ||
39 | + | let h = "+" | |
47 | 40 | ||
48 | - | func i (h,b) = { | |
49 | - | let c = getString(addressFromStringValue(h), b) | |
50 | - | if ($isInstanceOf(c, "String")) | |
51 | - | then { | |
52 | - | let d = c | |
53 | - | d | |
54 | - | } | |
55 | - | else "" | |
56 | - | } | |
41 | + | let i = 100000000 | |
57 | 42 | ||
43 | + | let j = "canceled" | |
58 | 44 | ||
59 | - | func j (h,b) = { | |
60 | - | let c = getBoolean(addressFromStringValue(h), b) | |
61 | - | if ($isInstanceOf(c, "Boolean")) | |
62 | - | then { | |
63 | - | let d = c | |
64 | - | d | |
65 | - | } | |
66 | - | else false | |
67 | - | } | |
45 | + | let k = "new" | |
68 | 46 | ||
47 | + | let l = "filled" | |
69 | 48 | ||
70 | - | let | |
49 | + | let m = "neutrino_asset_id" | |
71 | 50 | ||
72 | - | let | |
51 | + | let n = "bond_asset_id" | |
73 | 52 | ||
74 | - | let | |
53 | + | let o = "auction_contract" | |
75 | 54 | ||
76 | - | let | |
55 | + | let p = "balance_lock_interval" | |
77 | 56 | ||
78 | - | let | |
57 | + | let q = "vote_interval" | |
79 | 58 | ||
80 | - | let | |
59 | + | let r = "min_swap_amount" | |
81 | 60 | ||
82 | - | let | |
61 | + | let s = "price_offset" | |
83 | 62 | ||
84 | - | let r = "neutrino_asset_id" | |
85 | - | ||
86 | - | let s = "bond_asset_id" | |
87 | - | ||
88 | - | let t = "auction_contract" | |
63 | + | let t = "providing_interval" | |
89 | 64 | ||
90 | 65 | let u = "price" | |
91 | 66 | ||
107 | 82 | ||
108 | 83 | let D = "order_status_" | |
109 | 84 | ||
110 | - | let E = " | |
85 | + | let E = "is_blocked" | |
111 | 86 | ||
112 | - | let F = | |
87 | + | let F = "black_swarm_price" | |
113 | 88 | ||
114 | - | let G = | |
89 | + | let G = "admin_vote_" | |
115 | 90 | ||
116 | - | let H = | |
91 | + | let H = "admin_vote_price_" | |
117 | 92 | ||
118 | - | let I = | |
93 | + | let I = "vote_expire_block" | |
119 | 94 | ||
120 | - | let J = | |
95 | + | let J = "admin_" | |
121 | 96 | ||
122 | - | let K = | |
97 | + | let K = "is_pending_price" | |
123 | 98 | ||
124 | - | let L = | |
99 | + | let L = "oracle_" | |
125 | 100 | ||
126 | - | let M = { | |
127 | - | let N = extract(assetInfo(K)) | |
128 | - | (N.quantity - assetBalance(this, K)) | |
101 | + | let M = "oracle_is_provide_" | |
102 | + | ||
103 | + | let N = "oracle_price_provide_" | |
104 | + | ||
105 | + | let O = "providing_expire_block" | |
106 | + | ||
107 | + | func P (Q) = (J + toString(Q)) | |
108 | + | ||
109 | + | ||
110 | + | func R (S) = (G + S) | |
111 | + | ||
112 | + | ||
113 | + | func T (S) = (H + S) | |
114 | + | ||
115 | + | ||
116 | + | func U (Q) = (L + toString(Q)) | |
117 | + | ||
118 | + | ||
119 | + | func V (S) = (M + S) | |
120 | + | ||
121 | + | ||
122 | + | func W (S) = (N + S) | |
123 | + | ||
124 | + | ||
125 | + | func X (S) = (v + S) | |
126 | + | ||
127 | + | ||
128 | + | func Y (S) = (w + S) | |
129 | + | ||
130 | + | ||
131 | + | func Z (S) = (x + S) | |
132 | + | ||
133 | + | ||
134 | + | func aa (ab) = ((F + "_") + toString(ab)) | |
135 | + | ||
136 | + | ||
137 | + | func ac (ab) = ((u + "_") + toString(ab)) | |
138 | + | ||
139 | + | ||
140 | + | func ad (ae) = (z + ae) | |
141 | + | ||
142 | + | ||
143 | + | func af (ae) = (A + ae) | |
144 | + | ||
145 | + | ||
146 | + | func ag (ae) = (B + ae) | |
147 | + | ||
148 | + | ||
149 | + | func ah (ae) = (D + ae) | |
150 | + | ||
151 | + | ||
152 | + | func ai (ae) = (C + ae) | |
153 | + | ||
154 | + | ||
155 | + | let aj = a(u) | |
156 | + | ||
157 | + | func ak (al) = ((al * 100) / aj) | |
158 | + | ||
159 | + | ||
160 | + | func am (al) = ((al * aj) / 100) | |
161 | + | ||
162 | + | ||
163 | + | func an (al) = (al / i) | |
164 | + | ||
165 | + | ||
166 | + | func ao (al) = (al * i) | |
167 | + | ||
168 | + | ||
169 | + | func ap (al) = an(am(al)) | |
170 | + | ||
171 | + | ||
172 | + | let aq = a(t) | |
173 | + | ||
174 | + | let ar = a(O) | |
175 | + | ||
176 | + | let as = f(K) | |
177 | + | ||
178 | + | let at = a(s) | |
179 | + | ||
180 | + | let au = a(q) | |
181 | + | ||
182 | + | let av = a(I) | |
183 | + | ||
184 | + | let aw = a(p) | |
185 | + | ||
186 | + | let ax = f(E) | |
187 | + | ||
188 | + | let ay = a(r) | |
189 | + | ||
190 | + | let az = fromBase58String(e(m)) | |
191 | + | ||
192 | + | let aA = e(o) | |
193 | + | ||
194 | + | let aB = wavesBalance(this) | |
195 | + | ||
196 | + | let aC = e(y) | |
197 | + | ||
198 | + | let aD = fromBase58String(e(n)) | |
199 | + | ||
200 | + | let aE = { | |
201 | + | let aF = extract(assetInfo(aD)) | |
202 | + | (aF.quantity - assetBalance(this, aD)) | |
129 | 203 | } | |
130 | 204 | ||
131 | - | let | |
132 | - | let | |
133 | - | ( | |
205 | + | let aG = { | |
206 | + | let aF = extract(assetInfo(az)) | |
207 | + | (aF.quantity - assetBalance(this, az)) | |
134 | 208 | } | |
135 | 209 | ||
136 | - | func P (Q) = a((w + Q)) | |
210 | + | let aH = (am(aB) - aG) | |
211 | + | ||
212 | + | let aI = e(U(0)) | |
213 | + | ||
214 | + | let aJ = e(U(1)) | |
215 | + | ||
216 | + | let aK = e(U(2)) | |
217 | + | ||
218 | + | let aL = e(P(0)) | |
219 | + | ||
220 | + | let aM = e(P(1)) | |
221 | + | ||
222 | + | let aN = e(P(2)) | |
223 | + | ||
224 | + | func aO (S) = if (f(R(S))) | |
225 | + | then 1 | |
226 | + | else 0 | |
137 | 227 | ||
138 | 228 | ||
139 | - | func | |
229 | + | func aP (S) = a(T(S)) | |
140 | 230 | ||
141 | 231 | ||
142 | - | func | |
232 | + | func aQ (S) = f(V(S)) | |
143 | 233 | ||
144 | 234 | ||
145 | - | func T (U) = a((z + U)) | |
235 | + | func aR (S) = if (aQ(S)) | |
236 | + | then 1 | |
237 | + | else 0 | |
146 | 238 | ||
147 | 239 | ||
148 | - | func | |
240 | + | func aS (S) = a(W(S)) | |
149 | 241 | ||
150 | 242 | ||
151 | - | func | |
243 | + | func aT (S) = a(Y(S)) | |
152 | 244 | ||
153 | 245 | ||
154 | - | func | |
246 | + | func aU (S) = a(X(S)) | |
155 | 247 | ||
156 | 248 | ||
157 | - | func | |
249 | + | func aV (S) = a(Z(S)) | |
158 | 250 | ||
159 | 251 | ||
160 | - | func | |
252 | + | func aW (aX) = a(ad(aX)) | |
161 | 253 | ||
162 | 254 | ||
163 | - | func | |
255 | + | func aY (aX) = e(af(aX)) | |
164 | 256 | ||
165 | 257 | ||
166 | - | func | |
258 | + | func aZ (aX) = a(ai(aX)) | |
167 | 259 | ||
168 | 260 | ||
169 | - | ||
261 | + | func ba (aX) = (aX + g) | |
170 | 262 | ||
171 | - | let ae = "canceled" | |
172 | 263 | ||
173 | - | ||
264 | + | func bb (ae) = (aC + ba(ae)) | |
174 | 265 | ||
175 | - | let ag = "filled" | |
176 | 266 | ||
177 | - | @Callable(ah) | |
178 | - | func setCurrentPrice (H) = { | |
179 | - | let ai = toString(ah.caller) | |
180 | - | if ((ai != L)) | |
181 | - | then throw("permission denied") | |
182 | - | else WriteSet([DataEntry(u, H), DataEntry(((u + k) + toString(height)), H)]) | |
267 | + | func bc (ae) = { | |
268 | + | let bd = split(aC, ba(ae)) | |
269 | + | (bd[0] + bd[1]) | |
270 | + | } | |
271 | + | ||
272 | + | ||
273 | + | @Callable(be) | |
274 | + | func setCurrentPrice (bf) = { | |
275 | + | let bg = toString(be.caller) | |
276 | + | let bh = (((aR(aI) + aR(aJ)) + aR(aK)) + 1) | |
277 | + | if (ax) | |
278 | + | then throw("contract is blocked") | |
279 | + | else if (if (if ((bg != aI)) | |
280 | + | then (bg != aJ) | |
281 | + | else false) | |
282 | + | then (bg != aK) | |
283 | + | else false) | |
284 | + | then throw("permission denied") | |
285 | + | else if (if ((ar >= height)) | |
286 | + | then aQ(bg) | |
287 | + | else false) | |
288 | + | then throw("price is already provided") | |
289 | + | else if (if ((height > ar)) | |
290 | + | then as | |
291 | + | else false) | |
292 | + | then throw("use finilizeCurrentPrice") | |
293 | + | else WriteSet([DataEntry(W(bg), bf), DataEntry(O, if ((height > ar)) | |
294 | + | then (height + aq) | |
295 | + | else ar), DataEntry(V(aI), if ((height > ar)) | |
296 | + | then false | |
297 | + | else aQ(aI)), DataEntry(V(aJ), if ((height > ar)) | |
298 | + | then false | |
299 | + | else aQ(aJ)), DataEntry(V(aK), if ((height > ar)) | |
300 | + | then false | |
301 | + | else aQ(aK)), DataEntry(V(bg), true), DataEntry(K, if (if ((ar >= height)) | |
302 | + | then (bh >= 2) | |
303 | + | else false) | |
304 | + | then true | |
305 | + | else as)]) | |
183 | 306 | } | |
184 | 307 | ||
185 | 308 | ||
186 | 309 | ||
187 | - | @Callable(ah) | |
188 | - | func swapWavesToNeutrino () = { | |
189 | - | let aj = extract(ah.payment) | |
190 | - | if (isDefined(aj.assetId)) | |
191 | - | then throw("can use waves only") | |
192 | - | else { | |
193 | - | let ai = toBase58String(ah.caller.bytes) | |
194 | - | let Y = Z(aj.amount) | |
195 | - | WriteSet([DataEntry((v + toString(ah.caller)), (Y + R(ai))), DataEntry((x + toString(ah.caller)), height)]) | |
196 | - | } | |
310 | + | @Callable(be) | |
311 | + | func finilizeCurrentPrice () = { | |
312 | + | let bg = toString(be.caller) | |
313 | + | let bh = ((aR(aI) + aR(aJ)) + aR(aK)) | |
314 | + | let bf = ((((aS(aI) * aR(aI)) + (aS(aJ) * aR(aJ))) + (aS(aK) * aR(aK))) / bh) | |
315 | + | if (ax) | |
316 | + | then throw("contract is blocked") | |
317 | + | else if (if (if ((bg != aI)) | |
318 | + | then (bg != aJ) | |
319 | + | else false) | |
320 | + | then (bg != aK) | |
321 | + | else false) | |
322 | + | then throw("permission denied") | |
323 | + | else if (if (!(as)) | |
324 | + | then true | |
325 | + | else (ar >= height)) | |
326 | + | then throw("wait for the end of the price providing") | |
327 | + | else if ((2 > bh)) | |
328 | + | then throw("2/3 oracles need to set a price") | |
329 | + | else if (if ((bf >= (aj + ((aj * at) / 100)))) | |
330 | + | then true | |
331 | + | else ((aj - ((aj * at) / 100)) >= bf)) | |
332 | + | then WriteSet([DataEntry(E, true), DataEntry(aa(height), bf)]) | |
333 | + | else WriteSet([DataEntry(u, bf), DataEntry(ac(height), bf), DataEntry(K, false)]) | |
197 | 334 | } | |
198 | 335 | ||
199 | 336 | ||
200 | 337 | ||
201 | - | @Callable(ah) | |
202 | - | func swapNeutrinoToWaves () = { | |
203 | - | let aj = extract(ah.payment) | |
204 | - | if ((aj.assetId != F)) | |
205 | - | then throw("can use neutrino only") | |
206 | - | else { | |
207 | - | let ai = toBase58String(ah.caller.bytes) | |
208 | - | let Y = X(aj.amount) | |
209 | - | WriteSet([DataEntry((w + toString(ah.caller)), (Y + P(ai))), DataEntry((x + toString(ah.caller)), height)]) | |
210 | - | } | |
338 | + | @Callable(be) | |
339 | + | func adminUnlock (bf) = { | |
340 | + | let bg = toString(be.caller) | |
341 | + | let bi = if ((bg != aL)) | |
342 | + | then aO(aL) | |
343 | + | else 0 | |
344 | + | let bj = if ((bg != aM)) | |
345 | + | then aO(aM) | |
346 | + | else 0 | |
347 | + | let bk = if ((bg != aN)) | |
348 | + | then aO(aN) | |
349 | + | else 0 | |
350 | + | let bl = if (((aP(aL) * bi) == bf)) | |
351 | + | then 1 | |
352 | + | else 0 | |
353 | + | let bm = if (((aP(aM) * bj) == bf)) | |
354 | + | then 1 | |
355 | + | else 0 | |
356 | + | let bn = if (((aP(aN) * bk) == bf)) | |
357 | + | then 1 | |
358 | + | else 0 | |
359 | + | if (!(ax)) | |
360 | + | then throw("Contract is not blocked") | |
361 | + | else if (if (((((bl + bm) + bn) + 1) >= 2)) | |
362 | + | then (av >= height) | |
363 | + | else false) | |
364 | + | then WriteSet([DataEntry(E, false), DataEntry(u, bf), DataEntry(ac(height), bf), DataEntry(R(aL), false), DataEntry(R(aM), false), DataEntry(R(aN), false), DataEntry(I, 0), DataEntry(O, 0), DataEntry(K, false)]) | |
365 | + | else WriteSet([DataEntry(T(bg), bf), DataEntry(I, if ((height > av)) | |
366 | + | then (height + au) | |
367 | + | else av), DataEntry(R(aL), if ((height > av)) | |
368 | + | then false | |
369 | + | else (bi == 1)), DataEntry(R(aM), if ((height > av)) | |
370 | + | then false | |
371 | + | else (bj == 1)), DataEntry(R(aN), if ((height > av)) | |
372 | + | then false | |
373 | + | else (bk == 1)), DataEntry(R(bg), true)]) | |
211 | 374 | } | |
212 | 375 | ||
213 | 376 | ||
214 | 377 | ||
215 | - | @Callable(ah) | |
216 | - | func withdraw (ai) = if (((S(ai) + l) >= height)) | |
217 | - | then throw("wait a couple of blocks for withdraw") | |
218 | - | else ScriptResult(WriteSet([DataEntry((w + ai), 0), DataEntry((v + ai), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(ai), R(ai), F), ScriptTransfer(addressFromStringValue(ai), P(ai), unit)])) | |
219 | - | ||
220 | - | ||
221 | - | ||
222 | - | @Callable(ah) | |
223 | - | func generateBond () = { | |
224 | - | let ak = (O - Z(I)) | |
225 | - | let al = assetBalance(addressFromStringValue(G), K) | |
226 | - | let Y = (aa(ak) - al) | |
227 | - | if ((Y > 0)) | |
228 | - | then TransferSet([ScriptTransfer(addressFromStringValue(G), Y, K)]) | |
229 | - | else throw("bond were generated or do not need it") | |
378 | + | @Callable(be) | |
379 | + | func adminLock () = { | |
380 | + | let bg = toString(be.caller) | |
381 | + | let bi = if ((bg != aL)) | |
382 | + | then aO(aL) | |
383 | + | else 1 | |
384 | + | let bj = if ((bg != aM)) | |
385 | + | then aO(aM) | |
386 | + | else 1 | |
387 | + | let bk = if ((bg != aN)) | |
388 | + | then aO(aN) | |
389 | + | else 1 | |
390 | + | if (ax) | |
391 | + | then throw("Contract is blocked") | |
392 | + | else if ((((bi + bj) + bk) >= 2)) | |
393 | + | then WriteSet([DataEntry(E, true), DataEntry(R(aL), false), DataEntry(R(aM), false), DataEntry(R(aN), false), DataEntry(I, 0)]) | |
394 | + | else WriteSet([DataEntry(I, if ((height > av)) | |
395 | + | then (height + au) | |
396 | + | else av), DataEntry(R(aL), if ((height > av)) | |
397 | + | then false | |
398 | + | else (bi == 1)), DataEntry(R(aM), if ((height > av)) | |
399 | + | then false | |
400 | + | else (bj == 1)), DataEntry(R(aN), if ((height > av)) | |
401 | + | then false | |
402 | + | else (bk == 1))]) | |
230 | 403 | } | |
231 | 404 | ||
232 | 405 | ||
233 | 406 | ||
234 | - | @Callable(ah) | |
235 | - | func setOrder () = { | |
236 | - | let aj = extract(ah.payment) | |
237 | - | let am = toBase58String(keccak256(((toBytes(aj.amount) + ah.caller.bytes) + toBytes(height)))) | |
238 | - | if ((aj.assetId != K)) | |
239 | - | then throw("can use bond only") | |
240 | - | else if ((V(am) != "")) | |
241 | - | then throw("order exists") | |
242 | - | else WriteSet([DataEntry(y, ((J + am) + k)), DataEntry((z + am), aj.amount), DataEntry((A + am), toString(ah.caller)), DataEntry((B + am), height), DataEntry((D + am), af)]) | |
407 | + | @Callable(be) | |
408 | + | func swapWavesToNeutrino () = { | |
409 | + | let bo = extract(be.payment) | |
410 | + | if ((ay > bo.amount)) | |
411 | + | then throw("amount less min") | |
412 | + | else if (isDefined(bo.assetId)) | |
413 | + | then throw("can use waves only") | |
414 | + | else if (ax) | |
415 | + | then throw("contract is blocked") | |
416 | + | else { | |
417 | + | let bg = toBase58String(be.caller.bytes) | |
418 | + | let al = am(bo.amount) | |
419 | + | WriteSet([DataEntry(X(bg), (aU(bg) + al)), DataEntry(Z(bg), (height + aw))]) | |
420 | + | } | |
243 | 421 | } | |
244 | 422 | ||
245 | 423 | ||
246 | 424 | ||
247 | - | @Callable(ah) | |
248 | - | func cancelOrder (an) = { | |
249 | - | let Q = V(an) | |
250 | - | let Y = (T(an) - W(an)) | |
251 | - | if ((Q != toString(ah.caller))) | |
252 | - | then throw("permission denied") | |
253 | - | else { | |
254 | - | let ao = split(J, (an + k)) | |
255 | - | ScriptResult(WriteSet([DataEntry(y, (ao[0] + ao[1])), DataEntry((D + an), ae)]), TransferSet([ScriptTransfer(ah.caller, Y, K)])) | |
256 | - | } | |
425 | + | @Callable(be) | |
426 | + | func swapNeutrinoToWaves () = { | |
427 | + | let bo = extract(be.payment) | |
428 | + | if ((ay > bo.amount)) | |
429 | + | then throw("amount less min") | |
430 | + | else if (ax) | |
431 | + | then throw("contract is blocked") | |
432 | + | else if ((bo.assetId != az)) | |
433 | + | then throw("can use neutrino only") | |
434 | + | else { | |
435 | + | let bg = toBase58String(be.caller.bytes) | |
436 | + | let al = ak(bo.amount) | |
437 | + | WriteSet([DataEntry(Y(bg), (aT(bg) + al)), DataEntry(Z(bg), (height + aw))]) | |
438 | + | } | |
257 | 439 | } | |
258 | 440 | ||
259 | 441 | ||
260 | 442 | ||
261 | - | @Callable(ah) | |
443 | + | @Callable(be) | |
444 | + | func withdraw (bg) = if ((aV(bg) > height)) | |
445 | + | then throw("wait a couple of blocks for withdraw") | |
446 | + | else ScriptResult(WriteSet([DataEntry(Y(bg), 0), DataEntry(X(bg), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(bg), aU(bg), az), ScriptTransfer(addressFromStringValue(bg), aT(bg), unit)])) | |
447 | + | ||
448 | + | ||
449 | + | ||
450 | + | @Callable(be) | |
451 | + | func generateBond () = { | |
452 | + | let bp = (aG - am(aB)) | |
453 | + | let bq = assetBalance(addressFromStringValue(aA), aD) | |
454 | + | let al = (an(bp) - bq) | |
455 | + | if (ax) | |
456 | + | then throw("contract is blocked") | |
457 | + | else if ((al > 0)) | |
458 | + | then TransferSet([ScriptTransfer(addressFromStringValue(aA), al, aD)]) | |
459 | + | else throw("bond were generated or do not need it") | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(be) | |
465 | + | func setOrder () = { | |
466 | + | let bo = extract(be.payment) | |
467 | + | let br = toBase58String(keccak256(((toBytes(bo.amount) + be.caller.bytes) + toBytes(height)))) | |
468 | + | if ((bo.assetId != aD)) | |
469 | + | then throw("can use bond only") | |
470 | + | else if ((aY(br) != "")) | |
471 | + | then throw("order exists") | |
472 | + | else WriteSet([DataEntry(y, bb(br)), DataEntry(ad(br), bo.amount), DataEntry(af(br), toString(be.caller)), DataEntry(ag(br), height), DataEntry(ah(br), k)]) | |
473 | + | } | |
474 | + | ||
475 | + | ||
476 | + | ||
477 | + | @Callable(be) | |
478 | + | func cancelOrder (ae) = { | |
479 | + | let S = aY(ae) | |
480 | + | let al = (aW(ae) - aZ(ae)) | |
481 | + | if ((S != toString(be.caller))) | |
482 | + | then throw("permission denied") | |
483 | + | else ScriptResult(WriteSet([DataEntry(y, bc(ae)), DataEntry(ah(ae), j)]), TransferSet([ScriptTransfer(be.caller, al, aD)])) | |
484 | + | } | |
485 | + | ||
486 | + | ||
487 | + | ||
488 | + | @Callable(be) | |
262 | 489 | func executeOrder () = { | |
263 | - | let an = split(J, k)[0] | |
264 | - | let ap = T(an) | |
265 | - | let aq = V(an) | |
266 | - | let ar = W(an) | |
267 | - | if ((0 >= ad)) | |
268 | - | then throw("surplus is less than zero") | |
269 | - | else { | |
270 | - | let Y = (ap - ar) | |
271 | - | let as = aa(ad) | |
272 | - | let at = if ((as >= Y)) | |
273 | - | then ag | |
274 | - | else af | |
275 | - | let au = if ((as >= Y)) | |
276 | - | then ap | |
277 | - | else as | |
278 | - | ScriptResult(WriteSet([DataEntry(y, split(J, (an + k))[1]), DataEntry((C + an), (ar + au)), DataEntry((D + an), at)]), TransferSet([ScriptTransfer(addressFromStringValue(aq), ab(au), F)])) | |
279 | - | } | |
490 | + | let ae = split(aC, g)[0] | |
491 | + | let bs = aW(ae) | |
492 | + | let bt = aY(ae) | |
493 | + | let bu = aZ(ae) | |
494 | + | if (ax) | |
495 | + | then throw("contract is blocked") | |
496 | + | else if ((0 >= aH)) | |
497 | + | then throw("surplus is less than zero") | |
498 | + | else { | |
499 | + | let al = (bs - bu) | |
500 | + | let bv = an(aH) | |
501 | + | let bw = if ((bv >= al)) | |
502 | + | then l | |
503 | + | else k | |
504 | + | let bx = if ((bv >= al)) | |
505 | + | then bs | |
506 | + | else bv | |
507 | + | ScriptResult(WriteSet([DataEntry(y, bc(ae)), DataEntry(ai(ae), (bu + bx)), DataEntry(ah(ae), bw)]), TransferSet([ScriptTransfer(addressFromStringValue(bt), ao(bx), az)])) | |
508 | + | } | |
280 | 509 | } | |
281 | 510 | ||
282 | 511 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = getInteger(this, b) | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else 0 | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e (b) = { | |
16 | 16 | let c = getString(this, b) | |
17 | 17 | if ($isInstanceOf(c, "String")) | |
18 | 18 | then { | |
19 | 19 | let d = c | |
20 | 20 | d | |
21 | 21 | } | |
22 | 22 | else "" | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func f (b) = { | |
27 | 27 | let c = getBoolean(this, b) | |
28 | 28 | if ($isInstanceOf(c, "Boolean")) | |
29 | 29 | then { | |
30 | 30 | let d = c | |
31 | 31 | d | |
32 | 32 | } | |
33 | 33 | else false | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | - | func g (h,b) = { | |
38 | - | let c = getInteger(addressFromStringValue(h), b) | |
39 | - | if ($isInstanceOf(c, "Int")) | |
40 | - | then { | |
41 | - | let d = c | |
42 | - | d | |
43 | - | } | |
44 | - | else 0 | |
45 | - | } | |
37 | + | let g = "_" | |
46 | 38 | ||
39 | + | let h = "+" | |
47 | 40 | ||
48 | - | func i (h,b) = { | |
49 | - | let c = getString(addressFromStringValue(h), b) | |
50 | - | if ($isInstanceOf(c, "String")) | |
51 | - | then { | |
52 | - | let d = c | |
53 | - | d | |
54 | - | } | |
55 | - | else "" | |
56 | - | } | |
41 | + | let i = 100000000 | |
57 | 42 | ||
43 | + | let j = "canceled" | |
58 | 44 | ||
59 | - | func j (h,b) = { | |
60 | - | let c = getBoolean(addressFromStringValue(h), b) | |
61 | - | if ($isInstanceOf(c, "Boolean")) | |
62 | - | then { | |
63 | - | let d = c | |
64 | - | d | |
65 | - | } | |
66 | - | else false | |
67 | - | } | |
45 | + | let k = "new" | |
68 | 46 | ||
47 | + | let l = "filled" | |
69 | 48 | ||
70 | - | let | |
49 | + | let m = "neutrino_asset_id" | |
71 | 50 | ||
72 | - | let | |
51 | + | let n = "bond_asset_id" | |
73 | 52 | ||
74 | - | let | |
53 | + | let o = "auction_contract" | |
75 | 54 | ||
76 | - | let | |
55 | + | let p = "balance_lock_interval" | |
77 | 56 | ||
78 | - | let | |
57 | + | let q = "vote_interval" | |
79 | 58 | ||
80 | - | let | |
59 | + | let r = "min_swap_amount" | |
81 | 60 | ||
82 | - | let | |
61 | + | let s = "price_offset" | |
83 | 62 | ||
84 | - | let r = "neutrino_asset_id" | |
85 | - | ||
86 | - | let s = "bond_asset_id" | |
87 | - | ||
88 | - | let t = "auction_contract" | |
63 | + | let t = "providing_interval" | |
89 | 64 | ||
90 | 65 | let u = "price" | |
91 | 66 | ||
92 | 67 | let v = "neutrino_" | |
93 | 68 | ||
94 | 69 | let w = "waves_" | |
95 | 70 | ||
96 | 71 | let x = "balance_block_" | |
97 | 72 | ||
98 | 73 | let y = "orderbook" | |
99 | 74 | ||
100 | 75 | let z = "order_total_" | |
101 | 76 | ||
102 | 77 | let A = "order_owner_" | |
103 | 78 | ||
104 | 79 | let B = "order_height_" | |
105 | 80 | ||
106 | 81 | let C = "order_filled_total_" | |
107 | 82 | ||
108 | 83 | let D = "order_status_" | |
109 | 84 | ||
110 | - | let E = " | |
85 | + | let E = "is_blocked" | |
111 | 86 | ||
112 | - | let F = | |
87 | + | let F = "black_swarm_price" | |
113 | 88 | ||
114 | - | let G = | |
89 | + | let G = "admin_vote_" | |
115 | 90 | ||
116 | - | let H = | |
91 | + | let H = "admin_vote_price_" | |
117 | 92 | ||
118 | - | let I = | |
93 | + | let I = "vote_expire_block" | |
119 | 94 | ||
120 | - | let J = | |
95 | + | let J = "admin_" | |
121 | 96 | ||
122 | - | let K = | |
97 | + | let K = "is_pending_price" | |
123 | 98 | ||
124 | - | let L = | |
99 | + | let L = "oracle_" | |
125 | 100 | ||
126 | - | let M = { | |
127 | - | let N = extract(assetInfo(K)) | |
128 | - | (N.quantity - assetBalance(this, K)) | |
101 | + | let M = "oracle_is_provide_" | |
102 | + | ||
103 | + | let N = "oracle_price_provide_" | |
104 | + | ||
105 | + | let O = "providing_expire_block" | |
106 | + | ||
107 | + | func P (Q) = (J + toString(Q)) | |
108 | + | ||
109 | + | ||
110 | + | func R (S) = (G + S) | |
111 | + | ||
112 | + | ||
113 | + | func T (S) = (H + S) | |
114 | + | ||
115 | + | ||
116 | + | func U (Q) = (L + toString(Q)) | |
117 | + | ||
118 | + | ||
119 | + | func V (S) = (M + S) | |
120 | + | ||
121 | + | ||
122 | + | func W (S) = (N + S) | |
123 | + | ||
124 | + | ||
125 | + | func X (S) = (v + S) | |
126 | + | ||
127 | + | ||
128 | + | func Y (S) = (w + S) | |
129 | + | ||
130 | + | ||
131 | + | func Z (S) = (x + S) | |
132 | + | ||
133 | + | ||
134 | + | func aa (ab) = ((F + "_") + toString(ab)) | |
135 | + | ||
136 | + | ||
137 | + | func ac (ab) = ((u + "_") + toString(ab)) | |
138 | + | ||
139 | + | ||
140 | + | func ad (ae) = (z + ae) | |
141 | + | ||
142 | + | ||
143 | + | func af (ae) = (A + ae) | |
144 | + | ||
145 | + | ||
146 | + | func ag (ae) = (B + ae) | |
147 | + | ||
148 | + | ||
149 | + | func ah (ae) = (D + ae) | |
150 | + | ||
151 | + | ||
152 | + | func ai (ae) = (C + ae) | |
153 | + | ||
154 | + | ||
155 | + | let aj = a(u) | |
156 | + | ||
157 | + | func ak (al) = ((al * 100) / aj) | |
158 | + | ||
159 | + | ||
160 | + | func am (al) = ((al * aj) / 100) | |
161 | + | ||
162 | + | ||
163 | + | func an (al) = (al / i) | |
164 | + | ||
165 | + | ||
166 | + | func ao (al) = (al * i) | |
167 | + | ||
168 | + | ||
169 | + | func ap (al) = an(am(al)) | |
170 | + | ||
171 | + | ||
172 | + | let aq = a(t) | |
173 | + | ||
174 | + | let ar = a(O) | |
175 | + | ||
176 | + | let as = f(K) | |
177 | + | ||
178 | + | let at = a(s) | |
179 | + | ||
180 | + | let au = a(q) | |
181 | + | ||
182 | + | let av = a(I) | |
183 | + | ||
184 | + | let aw = a(p) | |
185 | + | ||
186 | + | let ax = f(E) | |
187 | + | ||
188 | + | let ay = a(r) | |
189 | + | ||
190 | + | let az = fromBase58String(e(m)) | |
191 | + | ||
192 | + | let aA = e(o) | |
193 | + | ||
194 | + | let aB = wavesBalance(this) | |
195 | + | ||
196 | + | let aC = e(y) | |
197 | + | ||
198 | + | let aD = fromBase58String(e(n)) | |
199 | + | ||
200 | + | let aE = { | |
201 | + | let aF = extract(assetInfo(aD)) | |
202 | + | (aF.quantity - assetBalance(this, aD)) | |
129 | 203 | } | |
130 | 204 | ||
131 | - | let | |
132 | - | let | |
133 | - | ( | |
205 | + | let aG = { | |
206 | + | let aF = extract(assetInfo(az)) | |
207 | + | (aF.quantity - assetBalance(this, az)) | |
134 | 208 | } | |
135 | 209 | ||
136 | - | func P (Q) = a((w + Q)) | |
210 | + | let aH = (am(aB) - aG) | |
211 | + | ||
212 | + | let aI = e(U(0)) | |
213 | + | ||
214 | + | let aJ = e(U(1)) | |
215 | + | ||
216 | + | let aK = e(U(2)) | |
217 | + | ||
218 | + | let aL = e(P(0)) | |
219 | + | ||
220 | + | let aM = e(P(1)) | |
221 | + | ||
222 | + | let aN = e(P(2)) | |
223 | + | ||
224 | + | func aO (S) = if (f(R(S))) | |
225 | + | then 1 | |
226 | + | else 0 | |
137 | 227 | ||
138 | 228 | ||
139 | - | func | |
229 | + | func aP (S) = a(T(S)) | |
140 | 230 | ||
141 | 231 | ||
142 | - | func | |
232 | + | func aQ (S) = f(V(S)) | |
143 | 233 | ||
144 | 234 | ||
145 | - | func T (U) = a((z + U)) | |
235 | + | func aR (S) = if (aQ(S)) | |
236 | + | then 1 | |
237 | + | else 0 | |
146 | 238 | ||
147 | 239 | ||
148 | - | func | |
240 | + | func aS (S) = a(W(S)) | |
149 | 241 | ||
150 | 242 | ||
151 | - | func | |
243 | + | func aT (S) = a(Y(S)) | |
152 | 244 | ||
153 | 245 | ||
154 | - | func | |
246 | + | func aU (S) = a(X(S)) | |
155 | 247 | ||
156 | 248 | ||
157 | - | func | |
249 | + | func aV (S) = a(Z(S)) | |
158 | 250 | ||
159 | 251 | ||
160 | - | func | |
252 | + | func aW (aX) = a(ad(aX)) | |
161 | 253 | ||
162 | 254 | ||
163 | - | func | |
255 | + | func aY (aX) = e(af(aX)) | |
164 | 256 | ||
165 | 257 | ||
166 | - | func | |
258 | + | func aZ (aX) = a(ai(aX)) | |
167 | 259 | ||
168 | 260 | ||
169 | - | ||
261 | + | func ba (aX) = (aX + g) | |
170 | 262 | ||
171 | - | let ae = "canceled" | |
172 | 263 | ||
173 | - | ||
264 | + | func bb (ae) = (aC + ba(ae)) | |
174 | 265 | ||
175 | - | let ag = "filled" | |
176 | 266 | ||
177 | - | @Callable(ah) | |
178 | - | func setCurrentPrice (H) = { | |
179 | - | let ai = toString(ah.caller) | |
180 | - | if ((ai != L)) | |
181 | - | then throw("permission denied") | |
182 | - | else WriteSet([DataEntry(u, H), DataEntry(((u + k) + toString(height)), H)]) | |
267 | + | func bc (ae) = { | |
268 | + | let bd = split(aC, ba(ae)) | |
269 | + | (bd[0] + bd[1]) | |
270 | + | } | |
271 | + | ||
272 | + | ||
273 | + | @Callable(be) | |
274 | + | func setCurrentPrice (bf) = { | |
275 | + | let bg = toString(be.caller) | |
276 | + | let bh = (((aR(aI) + aR(aJ)) + aR(aK)) + 1) | |
277 | + | if (ax) | |
278 | + | then throw("contract is blocked") | |
279 | + | else if (if (if ((bg != aI)) | |
280 | + | then (bg != aJ) | |
281 | + | else false) | |
282 | + | then (bg != aK) | |
283 | + | else false) | |
284 | + | then throw("permission denied") | |
285 | + | else if (if ((ar >= height)) | |
286 | + | then aQ(bg) | |
287 | + | else false) | |
288 | + | then throw("price is already provided") | |
289 | + | else if (if ((height > ar)) | |
290 | + | then as | |
291 | + | else false) | |
292 | + | then throw("use finilizeCurrentPrice") | |
293 | + | else WriteSet([DataEntry(W(bg), bf), DataEntry(O, if ((height > ar)) | |
294 | + | then (height + aq) | |
295 | + | else ar), DataEntry(V(aI), if ((height > ar)) | |
296 | + | then false | |
297 | + | else aQ(aI)), DataEntry(V(aJ), if ((height > ar)) | |
298 | + | then false | |
299 | + | else aQ(aJ)), DataEntry(V(aK), if ((height > ar)) | |
300 | + | then false | |
301 | + | else aQ(aK)), DataEntry(V(bg), true), DataEntry(K, if (if ((ar >= height)) | |
302 | + | then (bh >= 2) | |
303 | + | else false) | |
304 | + | then true | |
305 | + | else as)]) | |
183 | 306 | } | |
184 | 307 | ||
185 | 308 | ||
186 | 309 | ||
187 | - | @Callable(ah) | |
188 | - | func swapWavesToNeutrino () = { | |
189 | - | let aj = extract(ah.payment) | |
190 | - | if (isDefined(aj.assetId)) | |
191 | - | then throw("can use waves only") | |
192 | - | else { | |
193 | - | let ai = toBase58String(ah.caller.bytes) | |
194 | - | let Y = Z(aj.amount) | |
195 | - | WriteSet([DataEntry((v + toString(ah.caller)), (Y + R(ai))), DataEntry((x + toString(ah.caller)), height)]) | |
196 | - | } | |
310 | + | @Callable(be) | |
311 | + | func finilizeCurrentPrice () = { | |
312 | + | let bg = toString(be.caller) | |
313 | + | let bh = ((aR(aI) + aR(aJ)) + aR(aK)) | |
314 | + | let bf = ((((aS(aI) * aR(aI)) + (aS(aJ) * aR(aJ))) + (aS(aK) * aR(aK))) / bh) | |
315 | + | if (ax) | |
316 | + | then throw("contract is blocked") | |
317 | + | else if (if (if ((bg != aI)) | |
318 | + | then (bg != aJ) | |
319 | + | else false) | |
320 | + | then (bg != aK) | |
321 | + | else false) | |
322 | + | then throw("permission denied") | |
323 | + | else if (if (!(as)) | |
324 | + | then true | |
325 | + | else (ar >= height)) | |
326 | + | then throw("wait for the end of the price providing") | |
327 | + | else if ((2 > bh)) | |
328 | + | then throw("2/3 oracles need to set a price") | |
329 | + | else if (if ((bf >= (aj + ((aj * at) / 100)))) | |
330 | + | then true | |
331 | + | else ((aj - ((aj * at) / 100)) >= bf)) | |
332 | + | then WriteSet([DataEntry(E, true), DataEntry(aa(height), bf)]) | |
333 | + | else WriteSet([DataEntry(u, bf), DataEntry(ac(height), bf), DataEntry(K, false)]) | |
197 | 334 | } | |
198 | 335 | ||
199 | 336 | ||
200 | 337 | ||
201 | - | @Callable(ah) | |
202 | - | func swapNeutrinoToWaves () = { | |
203 | - | let aj = extract(ah.payment) | |
204 | - | if ((aj.assetId != F)) | |
205 | - | then throw("can use neutrino only") | |
206 | - | else { | |
207 | - | let ai = toBase58String(ah.caller.bytes) | |
208 | - | let Y = X(aj.amount) | |
209 | - | WriteSet([DataEntry((w + toString(ah.caller)), (Y + P(ai))), DataEntry((x + toString(ah.caller)), height)]) | |
210 | - | } | |
338 | + | @Callable(be) | |
339 | + | func adminUnlock (bf) = { | |
340 | + | let bg = toString(be.caller) | |
341 | + | let bi = if ((bg != aL)) | |
342 | + | then aO(aL) | |
343 | + | else 0 | |
344 | + | let bj = if ((bg != aM)) | |
345 | + | then aO(aM) | |
346 | + | else 0 | |
347 | + | let bk = if ((bg != aN)) | |
348 | + | then aO(aN) | |
349 | + | else 0 | |
350 | + | let bl = if (((aP(aL) * bi) == bf)) | |
351 | + | then 1 | |
352 | + | else 0 | |
353 | + | let bm = if (((aP(aM) * bj) == bf)) | |
354 | + | then 1 | |
355 | + | else 0 | |
356 | + | let bn = if (((aP(aN) * bk) == bf)) | |
357 | + | then 1 | |
358 | + | else 0 | |
359 | + | if (!(ax)) | |
360 | + | then throw("Contract is not blocked") | |
361 | + | else if (if (((((bl + bm) + bn) + 1) >= 2)) | |
362 | + | then (av >= height) | |
363 | + | else false) | |
364 | + | then WriteSet([DataEntry(E, false), DataEntry(u, bf), DataEntry(ac(height), bf), DataEntry(R(aL), false), DataEntry(R(aM), false), DataEntry(R(aN), false), DataEntry(I, 0), DataEntry(O, 0), DataEntry(K, false)]) | |
365 | + | else WriteSet([DataEntry(T(bg), bf), DataEntry(I, if ((height > av)) | |
366 | + | then (height + au) | |
367 | + | else av), DataEntry(R(aL), if ((height > av)) | |
368 | + | then false | |
369 | + | else (bi == 1)), DataEntry(R(aM), if ((height > av)) | |
370 | + | then false | |
371 | + | else (bj == 1)), DataEntry(R(aN), if ((height > av)) | |
372 | + | then false | |
373 | + | else (bk == 1)), DataEntry(R(bg), true)]) | |
211 | 374 | } | |
212 | 375 | ||
213 | 376 | ||
214 | 377 | ||
215 | - | @Callable(ah) | |
216 | - | func withdraw (ai) = if (((S(ai) + l) >= height)) | |
217 | - | then throw("wait a couple of blocks for withdraw") | |
218 | - | else ScriptResult(WriteSet([DataEntry((w + ai), 0), DataEntry((v + ai), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(ai), R(ai), F), ScriptTransfer(addressFromStringValue(ai), P(ai), unit)])) | |
219 | - | ||
220 | - | ||
221 | - | ||
222 | - | @Callable(ah) | |
223 | - | func generateBond () = { | |
224 | - | let ak = (O - Z(I)) | |
225 | - | let al = assetBalance(addressFromStringValue(G), K) | |
226 | - | let Y = (aa(ak) - al) | |
227 | - | if ((Y > 0)) | |
228 | - | then TransferSet([ScriptTransfer(addressFromStringValue(G), Y, K)]) | |
229 | - | else throw("bond were generated or do not need it") | |
378 | + | @Callable(be) | |
379 | + | func adminLock () = { | |
380 | + | let bg = toString(be.caller) | |
381 | + | let bi = if ((bg != aL)) | |
382 | + | then aO(aL) | |
383 | + | else 1 | |
384 | + | let bj = if ((bg != aM)) | |
385 | + | then aO(aM) | |
386 | + | else 1 | |
387 | + | let bk = if ((bg != aN)) | |
388 | + | then aO(aN) | |
389 | + | else 1 | |
390 | + | if (ax) | |
391 | + | then throw("Contract is blocked") | |
392 | + | else if ((((bi + bj) + bk) >= 2)) | |
393 | + | then WriteSet([DataEntry(E, true), DataEntry(R(aL), false), DataEntry(R(aM), false), DataEntry(R(aN), false), DataEntry(I, 0)]) | |
394 | + | else WriteSet([DataEntry(I, if ((height > av)) | |
395 | + | then (height + au) | |
396 | + | else av), DataEntry(R(aL), if ((height > av)) | |
397 | + | then false | |
398 | + | else (bi == 1)), DataEntry(R(aM), if ((height > av)) | |
399 | + | then false | |
400 | + | else (bj == 1)), DataEntry(R(aN), if ((height > av)) | |
401 | + | then false | |
402 | + | else (bk == 1))]) | |
230 | 403 | } | |
231 | 404 | ||
232 | 405 | ||
233 | 406 | ||
234 | - | @Callable(ah) | |
235 | - | func setOrder () = { | |
236 | - | let aj = extract(ah.payment) | |
237 | - | let am = toBase58String(keccak256(((toBytes(aj.amount) + ah.caller.bytes) + toBytes(height)))) | |
238 | - | if ((aj.assetId != K)) | |
239 | - | then throw("can use bond only") | |
240 | - | else if ((V(am) != "")) | |
241 | - | then throw("order exists") | |
242 | - | else WriteSet([DataEntry(y, ((J + am) + k)), DataEntry((z + am), aj.amount), DataEntry((A + am), toString(ah.caller)), DataEntry((B + am), height), DataEntry((D + am), af)]) | |
407 | + | @Callable(be) | |
408 | + | func swapWavesToNeutrino () = { | |
409 | + | let bo = extract(be.payment) | |
410 | + | if ((ay > bo.amount)) | |
411 | + | then throw("amount less min") | |
412 | + | else if (isDefined(bo.assetId)) | |
413 | + | then throw("can use waves only") | |
414 | + | else if (ax) | |
415 | + | then throw("contract is blocked") | |
416 | + | else { | |
417 | + | let bg = toBase58String(be.caller.bytes) | |
418 | + | let al = am(bo.amount) | |
419 | + | WriteSet([DataEntry(X(bg), (aU(bg) + al)), DataEntry(Z(bg), (height + aw))]) | |
420 | + | } | |
243 | 421 | } | |
244 | 422 | ||
245 | 423 | ||
246 | 424 | ||
247 | - | @Callable(ah) | |
248 | - | func cancelOrder (an) = { | |
249 | - | let Q = V(an) | |
250 | - | let Y = (T(an) - W(an)) | |
251 | - | if ((Q != toString(ah.caller))) | |
252 | - | then throw("permission denied") | |
253 | - | else { | |
254 | - | let ao = split(J, (an + k)) | |
255 | - | ScriptResult(WriteSet([DataEntry(y, (ao[0] + ao[1])), DataEntry((D + an), ae)]), TransferSet([ScriptTransfer(ah.caller, Y, K)])) | |
256 | - | } | |
425 | + | @Callable(be) | |
426 | + | func swapNeutrinoToWaves () = { | |
427 | + | let bo = extract(be.payment) | |
428 | + | if ((ay > bo.amount)) | |
429 | + | then throw("amount less min") | |
430 | + | else if (ax) | |
431 | + | then throw("contract is blocked") | |
432 | + | else if ((bo.assetId != az)) | |
433 | + | then throw("can use neutrino only") | |
434 | + | else { | |
435 | + | let bg = toBase58String(be.caller.bytes) | |
436 | + | let al = ak(bo.amount) | |
437 | + | WriteSet([DataEntry(Y(bg), (aT(bg) + al)), DataEntry(Z(bg), (height + aw))]) | |
438 | + | } | |
257 | 439 | } | |
258 | 440 | ||
259 | 441 | ||
260 | 442 | ||
261 | - | @Callable(ah) | |
443 | + | @Callable(be) | |
444 | + | func withdraw (bg) = if ((aV(bg) > height)) | |
445 | + | then throw("wait a couple of blocks for withdraw") | |
446 | + | else ScriptResult(WriteSet([DataEntry(Y(bg), 0), DataEntry(X(bg), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(bg), aU(bg), az), ScriptTransfer(addressFromStringValue(bg), aT(bg), unit)])) | |
447 | + | ||
448 | + | ||
449 | + | ||
450 | + | @Callable(be) | |
451 | + | func generateBond () = { | |
452 | + | let bp = (aG - am(aB)) | |
453 | + | let bq = assetBalance(addressFromStringValue(aA), aD) | |
454 | + | let al = (an(bp) - bq) | |
455 | + | if (ax) | |
456 | + | then throw("contract is blocked") | |
457 | + | else if ((al > 0)) | |
458 | + | then TransferSet([ScriptTransfer(addressFromStringValue(aA), al, aD)]) | |
459 | + | else throw("bond were generated or do not need it") | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(be) | |
465 | + | func setOrder () = { | |
466 | + | let bo = extract(be.payment) | |
467 | + | let br = toBase58String(keccak256(((toBytes(bo.amount) + be.caller.bytes) + toBytes(height)))) | |
468 | + | if ((bo.assetId != aD)) | |
469 | + | then throw("can use bond only") | |
470 | + | else if ((aY(br) != "")) | |
471 | + | then throw("order exists") | |
472 | + | else WriteSet([DataEntry(y, bb(br)), DataEntry(ad(br), bo.amount), DataEntry(af(br), toString(be.caller)), DataEntry(ag(br), height), DataEntry(ah(br), k)]) | |
473 | + | } | |
474 | + | ||
475 | + | ||
476 | + | ||
477 | + | @Callable(be) | |
478 | + | func cancelOrder (ae) = { | |
479 | + | let S = aY(ae) | |
480 | + | let al = (aW(ae) - aZ(ae)) | |
481 | + | if ((S != toString(be.caller))) | |
482 | + | then throw("permission denied") | |
483 | + | else ScriptResult(WriteSet([DataEntry(y, bc(ae)), DataEntry(ah(ae), j)]), TransferSet([ScriptTransfer(be.caller, al, aD)])) | |
484 | + | } | |
485 | + | ||
486 | + | ||
487 | + | ||
488 | + | @Callable(be) | |
262 | 489 | func executeOrder () = { | |
263 | - | let an = split(J, k)[0] | |
264 | - | let ap = T(an) | |
265 | - | let aq = V(an) | |
266 | - | let ar = W(an) | |
267 | - | if ((0 >= ad)) | |
268 | - | then throw("surplus is less than zero") | |
269 | - | else { | |
270 | - | let Y = (ap - ar) | |
271 | - | let as = aa(ad) | |
272 | - | let at = if ((as >= Y)) | |
273 | - | then ag | |
274 | - | else af | |
275 | - | let au = if ((as >= Y)) | |
276 | - | then ap | |
277 | - | else as | |
278 | - | ScriptResult(WriteSet([DataEntry(y, split(J, (an + k))[1]), DataEntry((C + an), (ar + au)), DataEntry((D + an), at)]), TransferSet([ScriptTransfer(addressFromStringValue(aq), ab(au), F)])) | |
279 | - | } | |
490 | + | let ae = split(aC, g)[0] | |
491 | + | let bs = aW(ae) | |
492 | + | let bt = aY(ae) | |
493 | + | let bu = aZ(ae) | |
494 | + | if (ax) | |
495 | + | then throw("contract is blocked") | |
496 | + | else if ((0 >= aH)) | |
497 | + | then throw("surplus is less than zero") | |
498 | + | else { | |
499 | + | let al = (bs - bu) | |
500 | + | let bv = an(aH) | |
501 | + | let bw = if ((bv >= al)) | |
502 | + | then l | |
503 | + | else k | |
504 | + | let bx = if ((bv >= al)) | |
505 | + | then bs | |
506 | + | else bv | |
507 | + | ScriptResult(WriteSet([DataEntry(y, bc(ae)), DataEntry(ai(ae), (bu + bx)), DataEntry(ah(ae), bw)]), TransferSet([ScriptTransfer(addressFromStringValue(bt), ao(bx), az)])) | |
508 | + | } | |
280 | 509 | } | |
281 | 510 | ||
282 | 511 |
github/deemru/w8io/169f3d6 82.20 ms ◑