tx · 6R61zSjuQy4cG1PtnxAtvcGxNQ8V2sFvqqhNK1DegBdN 3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx: -0.01600000 Waves 2024.04.03 14:59 [3046567] smart account 3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx > SELF 0.00000000 Waves
{ "type": 13, "id": "6R61zSjuQy4cG1PtnxAtvcGxNQ8V2sFvqqhNK1DegBdN", "fee": 1600000, "feeAssetId": null, "timestamp": 1712145590838, "version": 2, "chainId": 84, "sender": "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx", "senderPublicKey": "NaY7sqttWGpnVrcb6uE8xPp2VnMjT7fhv3q1TKGL9ar", "proofs": [ "3JMrjT5Wy9vyzGKNdyuYHXutNXd2QijMtpdMEA4jZ3isWwVZwNYCvT8L9k1bRuTVMosURArQ3VVvEocUQXchQPJV", "3TVoWRxtdreFzncshW72vXy668QQjfuJM5Adw66iniaShqzBe7EX3edRyhjUWsciZx16Pug2NHdmBByFRUvtVQe1", "4uBj3qN4gp4CaitUyHfX6TBAQ7XzjA12Y48DJeijHnVxmyPawWnCXpfu9ddRjKnhvREvYF9odQMxBEhFk3pMcDSS" ], "script": "base64:BgInCAISEAoOCAgICAgICAgICAgICAgSAwoBCBIMCgoBAgECAQIBAgECLAALcmV2aXNpb25OdW0CAAADU0VQAgJfXwAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENvbnRyb2xDZmdOc2J0U3Rha2luZ0RhcHAACAAZSWR4Q29udHJvbENmZ01lZGlhdG9yRG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b29mcwAACQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAAAAAEAAAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEJANkEAQkAkQMCBRBwdWJLZXlBZG1pbnNMaXN0AAEAAQAAAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgkA2QQBCQCRAwIFEHB1YktleUFkbWluc0xpc3QAAgABAAADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwADCQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAADAAIAAAkAZwIFBWNvdW50AANTTysJ", "height": 3046567, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J89hJBRUFTkgdm6Ftvy1cBjJq2DD3qr7dqhVq88EjbWG Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = " | |
4 | + | let a = "" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = "__" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = 1 | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 2 | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 3 | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 4 | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 5 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 6 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 7 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 8 | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 9 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 10 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 11 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 12 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 13 | |
33 | 33 | ||
34 | - | func p () = "%s__controlConfig" | |
34 | + | let p = 14 | |
35 | + | ||
36 | + | func q () = "%s__controlConfig" | |
35 | 37 | ||
36 | 38 | ||
37 | - | func | |
39 | + | func r (s,t,u,v,w,x,y,z,A,B,C,D,E,F) = makeString(["%s%s%s%s%s%s%s%s%s%s%s%s%s%s", s, t, u, v, w, x, y, z, A, B, C, D, E, F], b) | |
38 | 40 | ||
39 | 41 | ||
40 | - | func | |
42 | + | func G (H,I) = fraction(fraction(H, I, 1000000), 1000000, 100000000) | |
41 | 43 | ||
42 | 44 | ||
43 | - | func | |
45 | + | func J (K,L) = valueOrElse(getInteger(addressFromStringValue(K), L), 0) | |
44 | 46 | ||
45 | 47 | ||
46 | - | func | |
48 | + | func M (K,L) = valueOrElse(getString(K, L), "") | |
47 | 49 | ||
48 | 50 | ||
49 | - | func | |
51 | + | func N (O) = split(O, ",") | |
50 | 52 | ||
51 | 53 | ||
52 | - | let | |
54 | + | let I = valueOrElse(getInteger(this, "price"), 0) | |
53 | 55 | ||
54 | - | let | |
56 | + | let P = valueOrElse(getInteger(this, "price_index"), 0) | |
55 | 57 | ||
56 | - | let | |
58 | + | let Q = valueOrElse(getBoolean(this, "is_blocked"), false) | |
57 | 59 | ||
58 | - | let | |
60 | + | let R = 1000 | |
59 | 61 | ||
60 | - | let | |
62 | + | let S = valueOrElse(getString(this, "oracles"), "") | |
61 | 63 | ||
62 | - | let | |
64 | + | let T = N(S) | |
63 | 65 | ||
64 | - | let | |
66 | + | let U = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj') | |
65 | 67 | ||
66 | - | let | |
68 | + | let V = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N') | |
67 | 69 | ||
68 | - | let | |
70 | + | let W = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
69 | 71 | ||
70 | - | let | |
72 | + | let X = this | |
71 | 73 | ||
72 | - | func | |
74 | + | func Y (K,L) = valueOrErrorMessage(getString(K, L), makeString(["mandatory ", toString(K), ".", L, " is not defined"], "")) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func Z (aa,ab) = valueOrErrorMessage(addressFromString(aa[ab]), ("Control cfg doesn't contain address at index " + toString(ab))) | |
76 | 78 | ||
77 | 79 | ||
78 | - | let | |
80 | + | let aa = split_4C(Y(this, q()), b) | |
79 | 81 | ||
80 | - | let | |
82 | + | let E = Z(aa, o) | |
81 | 83 | ||
82 | - | let | |
84 | + | let ac = valueOrElse(getInteger(U, "balance_lock_neutrino"), 0) | |
83 | 85 | ||
84 | - | let | |
86 | + | let ad = valueOrElse(getInteger(U, "balance_lock_waves"), 0) | |
85 | 87 | ||
86 | - | let | |
88 | + | let ae = (wavesBalance(U).regular - ad) | |
87 | 89 | ||
88 | - | let | |
90 | + | let af = (((ac + value(assetInfo(W)).quantity) - assetBalance(U, W)) - assetBalance(V, W)) | |
89 | 91 | ||
90 | - | let | |
92 | + | let ag = (af - G(ae, I)) | |
91 | 93 | ||
92 | - | func | |
93 | - | let | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
94 | + | func ah (ai) = { | |
95 | + | let aj = 90 | |
96 | + | let ak = 110 | |
97 | + | let al = ai[0] | |
98 | + | let am = if ((0 >= ai[0])) | |
97 | 99 | then [0] | |
98 | 100 | else { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | then ( | |
101 | + | let an = ((ai[1] * 100) / al) | |
102 | + | let ao = ((ai[2] * 100) / al) | |
103 | + | let ap = ((ai[3] * 100) / al) | |
104 | + | let aq = ((ai[4] * 100) / al) | |
105 | + | let ar = if (if ((ak > an)) | |
106 | + | then (an > aj) | |
105 | 107 | else false) | |
106 | 108 | then [1, 0] | |
107 | 109 | else [0] | |
108 | - | let | |
109 | - | then ( | |
110 | + | let as = if (if ((ak > ao)) | |
111 | + | then (ao > aj) | |
110 | 112 | else false) | |
111 | - | then 2 :: | |
112 | - | else | |
113 | - | let | |
114 | - | then ( | |
113 | + | then 2 :: ar | |
114 | + | else ar | |
115 | + | let at = if (if ((ak > ap)) | |
116 | + | then (ap > aj) | |
115 | 117 | else false) | |
116 | - | then 3 :: | |
117 | - | else | |
118 | - | if (if (( | |
119 | - | then ( | |
118 | + | then 3 :: as | |
119 | + | else as | |
120 | + | if (if ((ak > aq)) | |
121 | + | then (aq > aj) | |
120 | 122 | else false) | |
121 | - | then 4 :: | |
122 | - | else | |
123 | + | then 4 :: at | |
124 | + | else at | |
123 | 125 | } | |
124 | - | let | |
125 | - | then | |
126 | + | let au = if ((size(am) >= 3)) | |
127 | + | then am | |
126 | 128 | else { | |
127 | - | let | |
128 | - | if ((0 >= | |
129 | + | let av = ai[1] | |
130 | + | if ((0 >= av)) | |
129 | 131 | then [1] | |
130 | 132 | else { | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | then ( | |
133 | + | let aw = ((ai[0] * 100) / av) | |
134 | + | let ax = ((ai[2] * 100) / av) | |
135 | + | let ay = ((ai[3] * 100) / av) | |
136 | + | let az = ((ai[4] * 100) / av) | |
137 | + | let ar = if (if ((ak > aw)) | |
138 | + | then (aw > aj) | |
137 | 139 | else false) | |
138 | 140 | then [0, 1] | |
139 | 141 | else [1] | |
140 | - | let | |
141 | - | then ( | |
142 | + | let as = if (if ((ak > ax)) | |
143 | + | then (ax > aj) | |
142 | 144 | else false) | |
143 | - | then 2 :: | |
144 | - | else | |
145 | - | let | |
146 | - | then ( | |
145 | + | then 2 :: ar | |
146 | + | else ar | |
147 | + | let at = if (if ((ak > ay)) | |
148 | + | then (ay > aj) | |
147 | 149 | else false) | |
148 | - | then 3 :: | |
149 | - | else | |
150 | - | if (if (( | |
151 | - | then ( | |
150 | + | then 3 :: as | |
151 | + | else as | |
152 | + | if (if ((ak > az)) | |
153 | + | then (az > aj) | |
152 | 154 | else false) | |
153 | - | then 4 :: | |
154 | - | else | |
155 | + | then 4 :: at | |
156 | + | else at | |
155 | 157 | } | |
156 | 158 | } | |
157 | - | let | |
158 | - | then | |
159 | + | let aA = if ((size(au) >= 3)) | |
160 | + | then au | |
159 | 161 | else { | |
160 | - | let | |
161 | - | if ((0 >= | |
162 | + | let aB = ai[2] | |
163 | + | if ((0 >= aB)) | |
162 | 164 | then [2] | |
163 | 165 | else { | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | then ( | |
166 | + | let aC = ((ai[0] * 100) / aB) | |
167 | + | let aD = ((ai[1] * 100) / aB) | |
168 | + | let aE = ((ai[3] * 100) / aB) | |
169 | + | let aF = ((ai[4] * 100) / aB) | |
170 | + | let ar = if (if ((ak > aC)) | |
171 | + | then (aC > aj) | |
170 | 172 | else false) | |
171 | 173 | then [0, 2] | |
172 | 174 | else [2] | |
173 | - | let | |
174 | - | then ( | |
175 | + | let as = if (if ((ak > aD)) | |
176 | + | then (aD > aj) | |
175 | 177 | else false) | |
176 | - | then 1 :: | |
177 | - | else | |
178 | - | let | |
179 | - | then ( | |
178 | + | then 1 :: ar | |
179 | + | else ar | |
180 | + | let at = if (if ((ak > aE)) | |
181 | + | then (aE > aj) | |
180 | 182 | else false) | |
181 | - | then 3 :: | |
182 | - | else | |
183 | - | if (if (( | |
184 | - | then ( | |
183 | + | then 3 :: as | |
184 | + | else as | |
185 | + | if (if ((ak > aF)) | |
186 | + | then (aF > aj) | |
185 | 187 | else false) | |
186 | - | then 4 :: | |
187 | - | else | |
188 | + | then 4 :: at | |
189 | + | else at | |
188 | 190 | } | |
189 | 191 | } | |
190 | - | let | |
191 | - | then | |
192 | + | let aG = if ((size(aA) >= 3)) | |
193 | + | then aA | |
192 | 194 | else { | |
193 | - | let | |
194 | - | if ((0 >= | |
195 | + | let aH = ai[3] | |
196 | + | if ((0 >= aH)) | |
195 | 197 | then [3] | |
196 | 198 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | then ( | |
199 | + | let aI = ((ai[0] * 100) / aH) | |
200 | + | let aJ = ((ai[1] * 100) / aH) | |
201 | + | let aK = ((ai[2] * 100) / aH) | |
202 | + | let aL = ((ai[4] * 100) / aH) | |
203 | + | let ar = if (if ((ak > aI)) | |
204 | + | then (aI > aj) | |
203 | 205 | else false) | |
204 | 206 | then [0, 3] | |
205 | 207 | else [3] | |
206 | - | let | |
207 | - | then ( | |
208 | + | let as = if (if ((ak > aJ)) | |
209 | + | then (aJ > aj) | |
208 | 210 | else false) | |
209 | - | then 1 :: | |
210 | - | else | |
211 | - | let | |
212 | - | then ( | |
211 | + | then 1 :: ar | |
212 | + | else ar | |
213 | + | let at = if (if ((ak > aK)) | |
214 | + | then (aK > aj) | |
213 | 215 | else false) | |
214 | - | then 2 :: | |
215 | - | else | |
216 | - | if (if (( | |
217 | - | then ( | |
216 | + | then 2 :: as | |
217 | + | else as | |
218 | + | if (if ((ak > aL)) | |
219 | + | then (aL > aj) | |
218 | 220 | else false) | |
219 | - | then 4 :: | |
220 | - | else | |
221 | + | then 4 :: at | |
222 | + | else at | |
221 | 223 | } | |
222 | 224 | } | |
223 | - | if ((size( | |
224 | - | then | |
225 | + | if ((size(aG) >= 3)) | |
226 | + | then aG | |
225 | 227 | else { | |
226 | - | let | |
227 | - | if ((0 >= | |
228 | + | let aM = ai[4] | |
229 | + | if ((0 >= aM)) | |
228 | 230 | then [4] | |
229 | 231 | else { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | then ( | |
232 | + | let aN = ((ai[0] * 100) / aM) | |
233 | + | let aO = ((ai[1] * 100) / aM) | |
234 | + | let aP = ((ai[2] * 100) / aM) | |
235 | + | let aQ = ((ai[3] * 100) / aM) | |
236 | + | let ar = if (if ((ak > aN)) | |
237 | + | then (aN > aj) | |
236 | 238 | else false) | |
237 | 239 | then [0, 4] | |
238 | 240 | else [4] | |
239 | - | let | |
240 | - | then ( | |
241 | + | let as = if (if ((ak > aO)) | |
242 | + | then (aO > aj) | |
241 | 243 | else false) | |
242 | - | then 1 :: | |
243 | - | else | |
244 | - | let | |
245 | - | then ( | |
244 | + | then 1 :: ar | |
245 | + | else ar | |
246 | + | let at = if (if ((ak > aP)) | |
247 | + | then (aP > aj) | |
246 | 248 | else false) | |
247 | - | then 2 :: | |
248 | - | else | |
249 | - | if (if (( | |
250 | - | then ( | |
249 | + | then 2 :: as | |
250 | + | else as | |
251 | + | if (if ((ak > aQ)) | |
252 | + | then (aQ > aj) | |
251 | 253 | else false) | |
252 | - | then 3 :: | |
253 | - | else | |
254 | + | then 3 :: at | |
255 | + | else at | |
254 | 256 | } | |
255 | 257 | } | |
256 | 258 | } | |
257 | 259 | ||
258 | 260 | ||
259 | - | func | |
261 | + | func aR (I) = toBytes((((("WAVESNEUTRINOPREFIX" + "_") + toString(height)) + "_") + toString(I))) | |
260 | 262 | ||
261 | 263 | ||
262 | - | func | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | [IntegerEntry( | |
264 | + | func aS (aT,aU,aV) = { | |
265 | + | let aW = toString(height) | |
266 | + | let aX = toString(aV) | |
267 | + | let aY = makeString(["%s%s%s__common__priceByAsset", aU], b) | |
268 | + | let aZ = makeString(["%s%s%s%d__common__priceByHeight", aU, aW], b) | |
269 | + | let ba = makeString(["%s%s%s%d__common__priceByIndex", aU, aX], b) | |
270 | + | [IntegerEntry(aY, aT), IntegerEntry(ba, aT), IntegerEntry(aZ, aT)] | |
269 | 271 | } | |
270 | 272 | ||
271 | 273 | ||
272 | - | @Callable( | |
273 | - | func constructorV1 ( | |
274 | + | @Callable(bb) | |
275 | + | func constructorV1 (s,t,u,v,w,x,y,z,A,B,C,D,E,F) = if ((bb.caller != this)) | |
274 | 276 | then throw("permissions denied") | |
275 | - | else [StringEntry( | |
277 | + | else [StringEntry(q(), r(s, t, u, v, w, x, y, z, A, B, C, D, E, F))] | |
276 | 278 | ||
277 | 279 | ||
278 | 280 | ||
279 | - | @Callable( | |
280 | - | func callEmergencyShutdown ( | |
281 | - | let | |
282 | - | let | |
283 | - | if (if (( | |
284 | - | then (toString( | |
281 | + | @Callable(bb) | |
282 | + | func callEmergencyShutdown (bc) = { | |
283 | + | let bd = "3MrRCbZhD9cPBT1efEkzAfaeaU26Ukvf9mh" | |
284 | + | let be = toString(bb.caller) | |
285 | + | if (if ((bd != be)) | |
286 | + | then (toString(E) != be) | |
285 | 287 | else false) | |
286 | 288 | then throw("caller must be one an emergency oracle or Governance contract") | |
287 | - | else [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", | |
289 | + | else [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", be), StringEntry("is_blocked_reason", bc)] | |
288 | 290 | } | |
289 | 291 | ||
290 | 292 | ||
291 | 293 | ||
292 | - | @Callable( | |
293 | - | func finalizeCurrentPrice ( | |
294 | + | @Callable(bb) | |
295 | + | func finalizeCurrentPrice (bf,bg,bh,bi,bj,bk,bl,bm,bn,bo) = if (Q) | |
294 | 296 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
295 | 297 | else if ((valueOrElse(getInteger(this, ("price_" + toString(height))), 0) != 0)) | |
296 | 298 | then throw("wait next block") | |
297 | - | else if (( | |
298 | - | then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + | |
299 | + | else if ((T[(height % 5)] != toBase58String(bb.callerPublicKey))) | |
300 | + | then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + T[(height % 5)])) | |
299 | 301 | else { | |
300 | - | let | |
301 | - | then | |
302 | - | else 0, if (sigVerify_8Kb( | |
303 | - | then | |
304 | - | else 0, if (sigVerify_8Kb( | |
305 | - | then | |
306 | - | else 0, if (sigVerify_8Kb( | |
307 | - | then | |
308 | - | else 0, if (sigVerify_8Kb( | |
309 | - | then | |
302 | + | let ai = [if (sigVerify_8Kb(aR(bf), bg, fromBase58String(T[0]))) | |
303 | + | then bf | |
304 | + | else 0, if (sigVerify_8Kb(aR(bh), bi, fromBase58String(T[1]))) | |
305 | + | then bh | |
306 | + | else 0, if (sigVerify_8Kb(aR(bj), bk, fromBase58String(T[2]))) | |
307 | + | then bj | |
308 | + | else 0, if (sigVerify_8Kb(aR(bl), bm, fromBase58String(T[3]))) | |
309 | + | then bl | |
310 | + | else 0, if (sigVerify_8Kb(aR(bn), bo, fromBase58String(T[4]))) | |
311 | + | then bn | |
310 | 312 | else 0] | |
311 | - | let | |
313 | + | let bp = if ((ai[0] == 0)) | |
312 | 314 | then 1 | |
313 | - | else (0 + (if (( | |
315 | + | else (0 + (if ((ai[1] == 0)) | |
314 | 316 | then 1 | |
315 | - | else (0 + (if (( | |
317 | + | else (0 + (if ((ai[2] == 0)) | |
316 | 318 | then 1 | |
317 | - | else (0 + (if (( | |
319 | + | else (0 + (if ((ai[3] == 0)) | |
318 | 320 | then 1 | |
319 | - | else (0 + (if (( | |
321 | + | else (0 + (if ((ai[4] == 0)) | |
320 | 322 | then 1 | |
321 | 323 | else 0)))))))) | |
322 | - | if (( | |
324 | + | if ((bp >= 3)) | |
323 | 325 | then throw("3 prices or more are equals to 0") | |
324 | 326 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | if ((3 > | |
327 | + | let bq = ah(ai) | |
328 | + | let br = size(bq) | |
329 | + | if ((3 > br)) | |
328 | 330 | then throw(((((((((((((((((((((("Could not finalize price because of big variation: height=" + toString(height)) + " | |
329 | - | ") + | |
330 | - | ") + | |
331 | - | ") + | |
332 | - | ") + | |
333 | - | ") + | |
331 | + | ") + T[0]) + "=") + toString(ai[0])) + " | |
332 | + | ") + T[1]) + "=") + toString(ai[1])) + " | |
333 | + | ") + T[2]) + "=") + toString(ai[2])) + " | |
334 | + | ") + T[3]) + "=") + toString(ai[3])) + " | |
335 | + | ") + T[4]) + "=") + toString(ai[4]))) | |
334 | 336 | else { | |
335 | - | let br = ((ah[bp[0]] + ah[bp[1]]) + ah[bp[2]]) | |
336 | - | let bs = if ((bq >= 4)) | |
337 | - | then (br + ah[bp[3]]) | |
338 | - | else br | |
339 | - | let bt = if ((bq >= 5)) | |
340 | - | then (bs + ah[bp[4]]) | |
337 | + | let bs = ((ai[bq[0]] + ai[bq[1]]) + ai[bq[2]]) | |
338 | + | let bt = if ((br >= 4)) | |
339 | + | then (bs + ai[bq[3]]) | |
341 | 340 | else bs | |
342 | - | if ((bq >= 6)) | |
341 | + | let bu = if ((br >= 5)) | |
342 | + | then (bt + ai[bq[4]]) | |
343 | + | else bt | |
344 | + | if ((br >= 6)) | |
343 | 345 | then throw("Invalid pricesInRange creation") | |
344 | 346 | else { | |
345 | - | let aS = (bt / bq) | |
346 | - | let bu = valueOrElse(getInteger("wx_stub_price"), 81109) | |
347 | - | let bv = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" | |
348 | - | let bw = valueOrElse(getInteger("vires_stub_price"), 1330432) | |
349 | - | let bx = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf" | |
350 | - | if (if ((aS >= (H + ((H * Q) / 100)))) | |
347 | + | let aT = (bu / br) | |
348 | + | let bv = valueOrElse(getInteger("wx_stub_price"), 81109) | |
349 | + | let bw = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" | |
350 | + | let bx = valueOrElse(getInteger("vires_stub_price"), 1330432) | |
351 | + | let by = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf" | |
352 | + | let bz = valueOrElse(getInteger("wind_stub_price"), 6177700) | |
353 | + | let bA = "DJ5sGMbBFSNA8yTHPTfMP9QDDHFp6CFToV2poteZm7X3" | |
354 | + | if (if ((aT >= (I + ((I * R) / 100)))) | |
351 | 355 | then true | |
352 | - | else (( | |
356 | + | else ((I - ((I * R) / 100)) >= aT)) | |
353 | 357 | then { | |
354 | - | let | |
355 | - | [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", toString(this)), StringEntry("is_blocked_reason", | |
358 | + | let bc = "automatic emergency shutdown because of large price variability" | |
359 | + | [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", toString(this)), StringEntry("is_blocked_reason", bc), IntegerEntry((("black_swarm_price" + "_") + toString(height)), aT)] | |
356 | 360 | } | |
357 | 361 | else { | |
358 | - | let | |
359 | - | ((([IntegerEntry("price", | |
360 | - | then (( | |
361 | - | else 0)] ++ | |
362 | + | let aV = (P + 1) | |
363 | + | (((([IntegerEntry("price", aT), IntegerEntry(("price_" + toString(height)), aT), IntegerEntry(("price_index_" + toString(aV)), height), IntegerEntry("price_index", aV), IntegerEntry(("indexByHeight_" + toString(height)), aV), IntegerEntry(("priceByIndex_" + toString(aV)), aT), IntegerEntry(("deficit_" + toString(height)), ag), IntegerEntry(("neutrinoSupply_" + toString(height)), af), IntegerEntry(("deficit_percent_" + toString(height)), if ((af != 0)) | |
364 | + | then ((ag * 100) / af) | |
365 | + | else 0)] ++ aS(aT, "WAVES", aV)) ++ aS(bv, bw, aV)) ++ aS(bx, by, aV)) ++ aS(bz, bA, aV)) | |
362 | 366 | } | |
363 | 367 | } | |
364 | 368 | } | |
366 | 370 | } | |
367 | 371 | ||
368 | 372 | ||
369 | - | ||
370 | - | @Callable(ba) | |
371 | - | func validatePrice (by,bz,aT) = $Tuple2(nil, true) | |
372 | - | ||
373 | - | ||
374 | - | @Verifier(bA) | |
375 | - | func bB () = { | |
376 | - | let bC = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], a) | |
377 | - | let bD = split(valueOrElse(getString(W, "%s__multisig"), bC), a) | |
378 | - | let bE = ((((if (sigVerify(bA.bodyBytes, bA.proofs[0], fromBase58String(bD[0]))) | |
373 | + | @Verifier(bB) | |
374 | + | func bC () = { | |
375 | + | let bD = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], b) | |
376 | + | let bE = split(valueOrElse(getString(X, "%s__multisig"), bD), b) | |
377 | + | let bF = ((((if (sigVerify(bB.bodyBytes, bB.proofs[0], fromBase58String(bE[0]))) | |
379 | 378 | then 1 | |
380 | - | else 0) + (if (sigVerify( | |
379 | + | else 0) + (if (sigVerify(bB.bodyBytes, bB.proofs[1], fromBase58String(bE[1]))) | |
381 | 380 | then 1 | |
382 | - | else 0)) + (if (sigVerify( | |
381 | + | else 0)) + (if (sigVerify(bB.bodyBytes, bB.proofs[2], fromBase58String(bE[2]))) | |
383 | 382 | then 1 | |
384 | - | else 0)) + (if (sigVerify( | |
383 | + | else 0)) + (if (sigVerify(bB.bodyBytes, bB.proofs[3], fromBase58String(bE[3]))) | |
385 | 384 | then 2 | |
386 | 385 | else 0)) | |
387 | - | ( | |
386 | + | (bF >= 3) | |
388 | 387 | } | |
389 | 388 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = " | |
4 | + | let a = "" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = "__" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = 1 | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 2 | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 3 | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 4 | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 5 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 6 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 7 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 8 | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = 9 | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 10 | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = 11 | |
29 | 29 | ||
30 | - | let n = | |
30 | + | let n = 12 | |
31 | 31 | ||
32 | - | let o = | |
32 | + | let o = 13 | |
33 | 33 | ||
34 | - | func p () = "%s__controlConfig" | |
34 | + | let p = 14 | |
35 | + | ||
36 | + | func q () = "%s__controlConfig" | |
35 | 37 | ||
36 | 38 | ||
37 | - | func | |
39 | + | func r (s,t,u,v,w,x,y,z,A,B,C,D,E,F) = makeString(["%s%s%s%s%s%s%s%s%s%s%s%s%s%s", s, t, u, v, w, x, y, z, A, B, C, D, E, F], b) | |
38 | 40 | ||
39 | 41 | ||
40 | - | func | |
42 | + | func G (H,I) = fraction(fraction(H, I, 1000000), 1000000, 100000000) | |
41 | 43 | ||
42 | 44 | ||
43 | - | func | |
45 | + | func J (K,L) = valueOrElse(getInteger(addressFromStringValue(K), L), 0) | |
44 | 46 | ||
45 | 47 | ||
46 | - | func | |
48 | + | func M (K,L) = valueOrElse(getString(K, L), "") | |
47 | 49 | ||
48 | 50 | ||
49 | - | func | |
51 | + | func N (O) = split(O, ",") | |
50 | 52 | ||
51 | 53 | ||
52 | - | let | |
54 | + | let I = valueOrElse(getInteger(this, "price"), 0) | |
53 | 55 | ||
54 | - | let | |
56 | + | let P = valueOrElse(getInteger(this, "price_index"), 0) | |
55 | 57 | ||
56 | - | let | |
58 | + | let Q = valueOrElse(getBoolean(this, "is_blocked"), false) | |
57 | 59 | ||
58 | - | let | |
60 | + | let R = 1000 | |
59 | 61 | ||
60 | - | let | |
62 | + | let S = valueOrElse(getString(this, "oracles"), "") | |
61 | 63 | ||
62 | - | let | |
64 | + | let T = N(S) | |
63 | 65 | ||
64 | - | let | |
66 | + | let U = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj') | |
65 | 67 | ||
66 | - | let | |
68 | + | let V = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N') | |
67 | 69 | ||
68 | - | let | |
70 | + | let W = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
69 | 71 | ||
70 | - | let | |
72 | + | let X = this | |
71 | 73 | ||
72 | - | func | |
74 | + | func Y (K,L) = valueOrErrorMessage(getString(K, L), makeString(["mandatory ", toString(K), ".", L, " is not defined"], "")) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func Z (aa,ab) = valueOrErrorMessage(addressFromString(aa[ab]), ("Control cfg doesn't contain address at index " + toString(ab))) | |
76 | 78 | ||
77 | 79 | ||
78 | - | let | |
80 | + | let aa = split_4C(Y(this, q()), b) | |
79 | 81 | ||
80 | - | let | |
82 | + | let E = Z(aa, o) | |
81 | 83 | ||
82 | - | let | |
84 | + | let ac = valueOrElse(getInteger(U, "balance_lock_neutrino"), 0) | |
83 | 85 | ||
84 | - | let | |
86 | + | let ad = valueOrElse(getInteger(U, "balance_lock_waves"), 0) | |
85 | 87 | ||
86 | - | let | |
88 | + | let ae = (wavesBalance(U).regular - ad) | |
87 | 89 | ||
88 | - | let | |
90 | + | let af = (((ac + value(assetInfo(W)).quantity) - assetBalance(U, W)) - assetBalance(V, W)) | |
89 | 91 | ||
90 | - | let | |
92 | + | let ag = (af - G(ae, I)) | |
91 | 93 | ||
92 | - | func | |
93 | - | let | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
94 | + | func ah (ai) = { | |
95 | + | let aj = 90 | |
96 | + | let ak = 110 | |
97 | + | let al = ai[0] | |
98 | + | let am = if ((0 >= ai[0])) | |
97 | 99 | then [0] | |
98 | 100 | else { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | then ( | |
101 | + | let an = ((ai[1] * 100) / al) | |
102 | + | let ao = ((ai[2] * 100) / al) | |
103 | + | let ap = ((ai[3] * 100) / al) | |
104 | + | let aq = ((ai[4] * 100) / al) | |
105 | + | let ar = if (if ((ak > an)) | |
106 | + | then (an > aj) | |
105 | 107 | else false) | |
106 | 108 | then [1, 0] | |
107 | 109 | else [0] | |
108 | - | let | |
109 | - | then ( | |
110 | + | let as = if (if ((ak > ao)) | |
111 | + | then (ao > aj) | |
110 | 112 | else false) | |
111 | - | then 2 :: | |
112 | - | else | |
113 | - | let | |
114 | - | then ( | |
113 | + | then 2 :: ar | |
114 | + | else ar | |
115 | + | let at = if (if ((ak > ap)) | |
116 | + | then (ap > aj) | |
115 | 117 | else false) | |
116 | - | then 3 :: | |
117 | - | else | |
118 | - | if (if (( | |
119 | - | then ( | |
118 | + | then 3 :: as | |
119 | + | else as | |
120 | + | if (if ((ak > aq)) | |
121 | + | then (aq > aj) | |
120 | 122 | else false) | |
121 | - | then 4 :: | |
122 | - | else | |
123 | + | then 4 :: at | |
124 | + | else at | |
123 | 125 | } | |
124 | - | let | |
125 | - | then | |
126 | + | let au = if ((size(am) >= 3)) | |
127 | + | then am | |
126 | 128 | else { | |
127 | - | let | |
128 | - | if ((0 >= | |
129 | + | let av = ai[1] | |
130 | + | if ((0 >= av)) | |
129 | 131 | then [1] | |
130 | 132 | else { | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | then ( | |
133 | + | let aw = ((ai[0] * 100) / av) | |
134 | + | let ax = ((ai[2] * 100) / av) | |
135 | + | let ay = ((ai[3] * 100) / av) | |
136 | + | let az = ((ai[4] * 100) / av) | |
137 | + | let ar = if (if ((ak > aw)) | |
138 | + | then (aw > aj) | |
137 | 139 | else false) | |
138 | 140 | then [0, 1] | |
139 | 141 | else [1] | |
140 | - | let | |
141 | - | then ( | |
142 | + | let as = if (if ((ak > ax)) | |
143 | + | then (ax > aj) | |
142 | 144 | else false) | |
143 | - | then 2 :: | |
144 | - | else | |
145 | - | let | |
146 | - | then ( | |
145 | + | then 2 :: ar | |
146 | + | else ar | |
147 | + | let at = if (if ((ak > ay)) | |
148 | + | then (ay > aj) | |
147 | 149 | else false) | |
148 | - | then 3 :: | |
149 | - | else | |
150 | - | if (if (( | |
151 | - | then ( | |
150 | + | then 3 :: as | |
151 | + | else as | |
152 | + | if (if ((ak > az)) | |
153 | + | then (az > aj) | |
152 | 154 | else false) | |
153 | - | then 4 :: | |
154 | - | else | |
155 | + | then 4 :: at | |
156 | + | else at | |
155 | 157 | } | |
156 | 158 | } | |
157 | - | let | |
158 | - | then | |
159 | + | let aA = if ((size(au) >= 3)) | |
160 | + | then au | |
159 | 161 | else { | |
160 | - | let | |
161 | - | if ((0 >= | |
162 | + | let aB = ai[2] | |
163 | + | if ((0 >= aB)) | |
162 | 164 | then [2] | |
163 | 165 | else { | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | then ( | |
166 | + | let aC = ((ai[0] * 100) / aB) | |
167 | + | let aD = ((ai[1] * 100) / aB) | |
168 | + | let aE = ((ai[3] * 100) / aB) | |
169 | + | let aF = ((ai[4] * 100) / aB) | |
170 | + | let ar = if (if ((ak > aC)) | |
171 | + | then (aC > aj) | |
170 | 172 | else false) | |
171 | 173 | then [0, 2] | |
172 | 174 | else [2] | |
173 | - | let | |
174 | - | then ( | |
175 | + | let as = if (if ((ak > aD)) | |
176 | + | then (aD > aj) | |
175 | 177 | else false) | |
176 | - | then 1 :: | |
177 | - | else | |
178 | - | let | |
179 | - | then ( | |
178 | + | then 1 :: ar | |
179 | + | else ar | |
180 | + | let at = if (if ((ak > aE)) | |
181 | + | then (aE > aj) | |
180 | 182 | else false) | |
181 | - | then 3 :: | |
182 | - | else | |
183 | - | if (if (( | |
184 | - | then ( | |
183 | + | then 3 :: as | |
184 | + | else as | |
185 | + | if (if ((ak > aF)) | |
186 | + | then (aF > aj) | |
185 | 187 | else false) | |
186 | - | then 4 :: | |
187 | - | else | |
188 | + | then 4 :: at | |
189 | + | else at | |
188 | 190 | } | |
189 | 191 | } | |
190 | - | let | |
191 | - | then | |
192 | + | let aG = if ((size(aA) >= 3)) | |
193 | + | then aA | |
192 | 194 | else { | |
193 | - | let | |
194 | - | if ((0 >= | |
195 | + | let aH = ai[3] | |
196 | + | if ((0 >= aH)) | |
195 | 197 | then [3] | |
196 | 198 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | then ( | |
199 | + | let aI = ((ai[0] * 100) / aH) | |
200 | + | let aJ = ((ai[1] * 100) / aH) | |
201 | + | let aK = ((ai[2] * 100) / aH) | |
202 | + | let aL = ((ai[4] * 100) / aH) | |
203 | + | let ar = if (if ((ak > aI)) | |
204 | + | then (aI > aj) | |
203 | 205 | else false) | |
204 | 206 | then [0, 3] | |
205 | 207 | else [3] | |
206 | - | let | |
207 | - | then ( | |
208 | + | let as = if (if ((ak > aJ)) | |
209 | + | then (aJ > aj) | |
208 | 210 | else false) | |
209 | - | then 1 :: | |
210 | - | else | |
211 | - | let | |
212 | - | then ( | |
211 | + | then 1 :: ar | |
212 | + | else ar | |
213 | + | let at = if (if ((ak > aK)) | |
214 | + | then (aK > aj) | |
213 | 215 | else false) | |
214 | - | then 2 :: | |
215 | - | else | |
216 | - | if (if (( | |
217 | - | then ( | |
216 | + | then 2 :: as | |
217 | + | else as | |
218 | + | if (if ((ak > aL)) | |
219 | + | then (aL > aj) | |
218 | 220 | else false) | |
219 | - | then 4 :: | |
220 | - | else | |
221 | + | then 4 :: at | |
222 | + | else at | |
221 | 223 | } | |
222 | 224 | } | |
223 | - | if ((size( | |
224 | - | then | |
225 | + | if ((size(aG) >= 3)) | |
226 | + | then aG | |
225 | 227 | else { | |
226 | - | let | |
227 | - | if ((0 >= | |
228 | + | let aM = ai[4] | |
229 | + | if ((0 >= aM)) | |
228 | 230 | then [4] | |
229 | 231 | else { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | then ( | |
232 | + | let aN = ((ai[0] * 100) / aM) | |
233 | + | let aO = ((ai[1] * 100) / aM) | |
234 | + | let aP = ((ai[2] * 100) / aM) | |
235 | + | let aQ = ((ai[3] * 100) / aM) | |
236 | + | let ar = if (if ((ak > aN)) | |
237 | + | then (aN > aj) | |
236 | 238 | else false) | |
237 | 239 | then [0, 4] | |
238 | 240 | else [4] | |
239 | - | let | |
240 | - | then ( | |
241 | + | let as = if (if ((ak > aO)) | |
242 | + | then (aO > aj) | |
241 | 243 | else false) | |
242 | - | then 1 :: | |
243 | - | else | |
244 | - | let | |
245 | - | then ( | |
244 | + | then 1 :: ar | |
245 | + | else ar | |
246 | + | let at = if (if ((ak > aP)) | |
247 | + | then (aP > aj) | |
246 | 248 | else false) | |
247 | - | then 2 :: | |
248 | - | else | |
249 | - | if (if (( | |
250 | - | then ( | |
249 | + | then 2 :: as | |
250 | + | else as | |
251 | + | if (if ((ak > aQ)) | |
252 | + | then (aQ > aj) | |
251 | 253 | else false) | |
252 | - | then 3 :: | |
253 | - | else | |
254 | + | then 3 :: at | |
255 | + | else at | |
254 | 256 | } | |
255 | 257 | } | |
256 | 258 | } | |
257 | 259 | ||
258 | 260 | ||
259 | - | func | |
261 | + | func aR (I) = toBytes((((("WAVESNEUTRINOPREFIX" + "_") + toString(height)) + "_") + toString(I))) | |
260 | 262 | ||
261 | 263 | ||
262 | - | func | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | [IntegerEntry( | |
264 | + | func aS (aT,aU,aV) = { | |
265 | + | let aW = toString(height) | |
266 | + | let aX = toString(aV) | |
267 | + | let aY = makeString(["%s%s%s__common__priceByAsset", aU], b) | |
268 | + | let aZ = makeString(["%s%s%s%d__common__priceByHeight", aU, aW], b) | |
269 | + | let ba = makeString(["%s%s%s%d__common__priceByIndex", aU, aX], b) | |
270 | + | [IntegerEntry(aY, aT), IntegerEntry(ba, aT), IntegerEntry(aZ, aT)] | |
269 | 271 | } | |
270 | 272 | ||
271 | 273 | ||
272 | - | @Callable( | |
273 | - | func constructorV1 ( | |
274 | + | @Callable(bb) | |
275 | + | func constructorV1 (s,t,u,v,w,x,y,z,A,B,C,D,E,F) = if ((bb.caller != this)) | |
274 | 276 | then throw("permissions denied") | |
275 | - | else [StringEntry( | |
277 | + | else [StringEntry(q(), r(s, t, u, v, w, x, y, z, A, B, C, D, E, F))] | |
276 | 278 | ||
277 | 279 | ||
278 | 280 | ||
279 | - | @Callable( | |
280 | - | func callEmergencyShutdown ( | |
281 | - | let | |
282 | - | let | |
283 | - | if (if (( | |
284 | - | then (toString( | |
281 | + | @Callable(bb) | |
282 | + | func callEmergencyShutdown (bc) = { | |
283 | + | let bd = "3MrRCbZhD9cPBT1efEkzAfaeaU26Ukvf9mh" | |
284 | + | let be = toString(bb.caller) | |
285 | + | if (if ((bd != be)) | |
286 | + | then (toString(E) != be) | |
285 | 287 | else false) | |
286 | 288 | then throw("caller must be one an emergency oracle or Governance contract") | |
287 | - | else [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", | |
289 | + | else [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", be), StringEntry("is_blocked_reason", bc)] | |
288 | 290 | } | |
289 | 291 | ||
290 | 292 | ||
291 | 293 | ||
292 | - | @Callable( | |
293 | - | func finalizeCurrentPrice ( | |
294 | + | @Callable(bb) | |
295 | + | func finalizeCurrentPrice (bf,bg,bh,bi,bj,bk,bl,bm,bn,bo) = if (Q) | |
294 | 296 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
295 | 297 | else if ((valueOrElse(getInteger(this, ("price_" + toString(height))), 0) != 0)) | |
296 | 298 | then throw("wait next block") | |
297 | - | else if (( | |
298 | - | then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + | |
299 | + | else if ((T[(height % 5)] != toBase58String(bb.callerPublicKey))) | |
300 | + | then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + T[(height % 5)])) | |
299 | 301 | else { | |
300 | - | let | |
301 | - | then | |
302 | - | else 0, if (sigVerify_8Kb( | |
303 | - | then | |
304 | - | else 0, if (sigVerify_8Kb( | |
305 | - | then | |
306 | - | else 0, if (sigVerify_8Kb( | |
307 | - | then | |
308 | - | else 0, if (sigVerify_8Kb( | |
309 | - | then | |
302 | + | let ai = [if (sigVerify_8Kb(aR(bf), bg, fromBase58String(T[0]))) | |
303 | + | then bf | |
304 | + | else 0, if (sigVerify_8Kb(aR(bh), bi, fromBase58String(T[1]))) | |
305 | + | then bh | |
306 | + | else 0, if (sigVerify_8Kb(aR(bj), bk, fromBase58String(T[2]))) | |
307 | + | then bj | |
308 | + | else 0, if (sigVerify_8Kb(aR(bl), bm, fromBase58String(T[3]))) | |
309 | + | then bl | |
310 | + | else 0, if (sigVerify_8Kb(aR(bn), bo, fromBase58String(T[4]))) | |
311 | + | then bn | |
310 | 312 | else 0] | |
311 | - | let | |
313 | + | let bp = if ((ai[0] == 0)) | |
312 | 314 | then 1 | |
313 | - | else (0 + (if (( | |
315 | + | else (0 + (if ((ai[1] == 0)) | |
314 | 316 | then 1 | |
315 | - | else (0 + (if (( | |
317 | + | else (0 + (if ((ai[2] == 0)) | |
316 | 318 | then 1 | |
317 | - | else (0 + (if (( | |
319 | + | else (0 + (if ((ai[3] == 0)) | |
318 | 320 | then 1 | |
319 | - | else (0 + (if (( | |
321 | + | else (0 + (if ((ai[4] == 0)) | |
320 | 322 | then 1 | |
321 | 323 | else 0)))))))) | |
322 | - | if (( | |
324 | + | if ((bp >= 3)) | |
323 | 325 | then throw("3 prices or more are equals to 0") | |
324 | 326 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | if ((3 > | |
327 | + | let bq = ah(ai) | |
328 | + | let br = size(bq) | |
329 | + | if ((3 > br)) | |
328 | 330 | then throw(((((((((((((((((((((("Could not finalize price because of big variation: height=" + toString(height)) + " | |
329 | - | ") + | |
330 | - | ") + | |
331 | - | ") + | |
332 | - | ") + | |
333 | - | ") + | |
331 | + | ") + T[0]) + "=") + toString(ai[0])) + " | |
332 | + | ") + T[1]) + "=") + toString(ai[1])) + " | |
333 | + | ") + T[2]) + "=") + toString(ai[2])) + " | |
334 | + | ") + T[3]) + "=") + toString(ai[3])) + " | |
335 | + | ") + T[4]) + "=") + toString(ai[4]))) | |
334 | 336 | else { | |
335 | - | let br = ((ah[bp[0]] + ah[bp[1]]) + ah[bp[2]]) | |
336 | - | let bs = if ((bq >= 4)) | |
337 | - | then (br + ah[bp[3]]) | |
338 | - | else br | |
339 | - | let bt = if ((bq >= 5)) | |
340 | - | then (bs + ah[bp[4]]) | |
337 | + | let bs = ((ai[bq[0]] + ai[bq[1]]) + ai[bq[2]]) | |
338 | + | let bt = if ((br >= 4)) | |
339 | + | then (bs + ai[bq[3]]) | |
341 | 340 | else bs | |
342 | - | if ((bq >= 6)) | |
341 | + | let bu = if ((br >= 5)) | |
342 | + | then (bt + ai[bq[4]]) | |
343 | + | else bt | |
344 | + | if ((br >= 6)) | |
343 | 345 | then throw("Invalid pricesInRange creation") | |
344 | 346 | else { | |
345 | - | let aS = (bt / bq) | |
346 | - | let bu = valueOrElse(getInteger("wx_stub_price"), 81109) | |
347 | - | let bv = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" | |
348 | - | let bw = valueOrElse(getInteger("vires_stub_price"), 1330432) | |
349 | - | let bx = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf" | |
350 | - | if (if ((aS >= (H + ((H * Q) / 100)))) | |
347 | + | let aT = (bu / br) | |
348 | + | let bv = valueOrElse(getInteger("wx_stub_price"), 81109) | |
349 | + | let bw = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" | |
350 | + | let bx = valueOrElse(getInteger("vires_stub_price"), 1330432) | |
351 | + | let by = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf" | |
352 | + | let bz = valueOrElse(getInteger("wind_stub_price"), 6177700) | |
353 | + | let bA = "DJ5sGMbBFSNA8yTHPTfMP9QDDHFp6CFToV2poteZm7X3" | |
354 | + | if (if ((aT >= (I + ((I * R) / 100)))) | |
351 | 355 | then true | |
352 | - | else (( | |
356 | + | else ((I - ((I * R) / 100)) >= aT)) | |
353 | 357 | then { | |
354 | - | let | |
355 | - | [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", toString(this)), StringEntry("is_blocked_reason", | |
358 | + | let bc = "automatic emergency shutdown because of large price variability" | |
359 | + | [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", toString(this)), StringEntry("is_blocked_reason", bc), IntegerEntry((("black_swarm_price" + "_") + toString(height)), aT)] | |
356 | 360 | } | |
357 | 361 | else { | |
358 | - | let | |
359 | - | ((([IntegerEntry("price", | |
360 | - | then (( | |
361 | - | else 0)] ++ | |
362 | + | let aV = (P + 1) | |
363 | + | (((([IntegerEntry("price", aT), IntegerEntry(("price_" + toString(height)), aT), IntegerEntry(("price_index_" + toString(aV)), height), IntegerEntry("price_index", aV), IntegerEntry(("indexByHeight_" + toString(height)), aV), IntegerEntry(("priceByIndex_" + toString(aV)), aT), IntegerEntry(("deficit_" + toString(height)), ag), IntegerEntry(("neutrinoSupply_" + toString(height)), af), IntegerEntry(("deficit_percent_" + toString(height)), if ((af != 0)) | |
364 | + | then ((ag * 100) / af) | |
365 | + | else 0)] ++ aS(aT, "WAVES", aV)) ++ aS(bv, bw, aV)) ++ aS(bx, by, aV)) ++ aS(bz, bA, aV)) | |
362 | 366 | } | |
363 | 367 | } | |
364 | 368 | } | |
365 | 369 | } | |
366 | 370 | } | |
367 | 371 | ||
368 | 372 | ||
369 | - | ||
370 | - | @Callable(ba) | |
371 | - | func validatePrice (by,bz,aT) = $Tuple2(nil, true) | |
372 | - | ||
373 | - | ||
374 | - | @Verifier(bA) | |
375 | - | func bB () = { | |
376 | - | let bC = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], a) | |
377 | - | let bD = split(valueOrElse(getString(W, "%s__multisig"), bC), a) | |
378 | - | let bE = ((((if (sigVerify(bA.bodyBytes, bA.proofs[0], fromBase58String(bD[0]))) | |
373 | + | @Verifier(bB) | |
374 | + | func bC () = { | |
375 | + | let bD = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], b) | |
376 | + | let bE = split(valueOrElse(getString(X, "%s__multisig"), bD), b) | |
377 | + | let bF = ((((if (sigVerify(bB.bodyBytes, bB.proofs[0], fromBase58String(bE[0]))) | |
379 | 378 | then 1 | |
380 | - | else 0) + (if (sigVerify( | |
379 | + | else 0) + (if (sigVerify(bB.bodyBytes, bB.proofs[1], fromBase58String(bE[1]))) | |
381 | 380 | then 1 | |
382 | - | else 0)) + (if (sigVerify( | |
381 | + | else 0)) + (if (sigVerify(bB.bodyBytes, bB.proofs[2], fromBase58String(bE[2]))) | |
383 | 382 | then 1 | |
384 | - | else 0)) + (if (sigVerify( | |
383 | + | else 0)) + (if (sigVerify(bB.bodyBytes, bB.proofs[3], fromBase58String(bE[3]))) | |
385 | 384 | then 2 | |
386 | 385 | else 0)) | |
387 | - | ( | |
386 | + | (bF >= 3) | |
388 | 387 | } | |
389 | 388 |
github/deemru/w8io/169f3d6 172.04 ms ◑