tx · CG6VUPhpexxZvZsosyhmmsDCaCz6SLpybkjJWVq8QT3G 3Mwm8B9Uv8agLfsT6DtUpMHJ9DyLniY7Tq3: -0.01000000 Waves 2020.02.10 17:38 [893303] smart account 3Mwm8B9Uv8agLfsT6DtUpMHJ9DyLniY7Tq3 > SELF 0.00000000 Waves
{ "type": 13, "id": "CG6VUPhpexxZvZsosyhmmsDCaCz6SLpybkjJWVq8QT3G", "fee": 1000000, "feeAssetId": null, "timestamp": 1581345497623, "version": 1, "sender": "3Mwm8B9Uv8agLfsT6DtUpMHJ9DyLniY7Tq3", "senderPublicKey": "HyRvzjRVRCHvu6D6gaz7hfUFfESr7DgpQmiPVizwNLkN", "proofs": [ "2Kyfss2mQvbSZ5uHR7iuf3xCyaSSzXSxve6HFkjKkQsQor4sybVqGc28ACiAPmj2ZhA4iZhkGaXk4TAENyCRB78q" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAIgEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5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AAAIFAAAABXByaWNlCQAAaQAAAAIJAABoAAAAAgUAAAAFcHJpY2UFAAAAEnBlcmNlbnRQcmljZU9mZnNldAAAAAAAAAAAZAUAAAAIbmV3UHJpY2UJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADElzQmxvY2tlZEtleQYJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABVnZXRCbGFja1N3YXJtUHJpY2VLZXkAAAABBQAAAAZoZWlnaHQFAAAACG5ld1ByaWNlBQAAAANuaWwEAAAADW5ld1ByaWNlSW5kZXgJAABkAAAAAgUAAAAKcHJpY2VJbmRleAAAAAAAAAAAAQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIUHJpY2VLZXkFAAAACG5ld1ByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAASZ2V0UHJpY2VIaXN0b3J5S2V5AAAAAQUAAAAGaGVpZ2h0BQAAAAhuZXdQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANUHJpY2VJbmRleEtleQUAAAANbmV3UHJpY2VJbmRleAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAGGdldEhlaWdodFByaWNlQnlJbmRleEtleQAAAAEFAAAADW5ld1ByaWNlSW5kZXgFAAAABmhlaWdodAUAAAADbmlsAAAAAIkNEck=", "chainId": 84, "height": 893303, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | + | case a: Int => | |
6 | + | a | |
7 | + | case _ => | |
8 | + | 0 | |
9 | + | } | |
10 | + | ||
11 | + | ||
12 | + | func getStringByKey (key) = match getString(this, key) { | |
13 | + | case a: String => | |
14 | + | a | |
15 | + | case _ => | |
16 | + | "" | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | + | case a: Boolean => | |
22 | + | a | |
23 | + | case _ => | |
24 | + | false | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | func getNumberByAddressAndKey (address,key) = match getInteger(address, key) { | |
29 | + | case a: Int => | |
30 | + | a | |
31 | + | case _ => | |
32 | + | 0 | |
33 | + | } | |
34 | + | ||
35 | + | ||
36 | + | func getStringByAddressAndKey (address,key) = match getString(address, key) { | |
37 | + | case a: String => | |
38 | + | a | |
39 | + | case _ => | |
40 | + | "" | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func dropElementInJsonArray (array,element) = { | |
45 | + | let splitedArray = split(array, element) | |
46 | + | if ((take(splitedArray[1], 1) == ",")) | |
47 | + | then (splitedArray[0] + drop(splitedArray[1], 1)) | |
48 | + | else (dropRight(splitedArray[0], 1) + splitedArray[1]) | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
53 | + | ||
54 | + | ||
55 | + | let BLOCK = "block" | |
56 | + | ||
57 | + | let UNBLOCK = "unblock" | |
58 | + | ||
59 | + | let UPDATE = "update" | |
60 | + | ||
61 | + | let OraclesKey = "oracles" | |
62 | + | ||
63 | + | let PriceOffsetKey = "price_offset" | |
64 | + | ||
65 | + | let PriceKey = "price" | |
66 | + | ||
67 | + | let IsBlockedKey = "is_blocked" | |
68 | + | ||
69 | + | let PriceIndexKey = "price_index" | |
70 | + | ||
71 | + | func getBlackSwarmPriceKey (block) = (("black_swarm_price" + "_") + toString(block)) | |
72 | + | ||
73 | + | ||
74 | + | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
75 | + | ||
76 | + | ||
77 | + | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
78 | + | ||
79 | + | ||
80 | + | func getOracleProvidePriceKey (height) = ("price_" + toString(height)) | |
81 | + | ||
82 | + | ||
83 | + | let price = getNumberByKey(PriceKey) | |
84 | + | ||
85 | + | let priceIndex = getNumberByKey(PriceIndexKey) | |
86 | + | ||
87 | + | let isBlocked = getBoolByKey(IsBlockedKey) | |
88 | + | ||
89 | + | let bftCoefficientOracle = 3 | |
90 | + | ||
91 | + | let percentPriceOffset = getNumberByKey(PriceOffsetKey) | |
92 | + | ||
93 | + | let oracles = getStringByKey(OraclesKey) | |
94 | + | ||
95 | + | let oraclesList = convertJsonArrayToList(oracles) | |
96 | + | ||
97 | + | func getOracleProvideHeight (owner,height) = getNumberByAddressAndKey(addressFromStringValue(owner), getOracleProvidePriceKey(height)) | |
98 | + | ||
99 | + | ||
100 | + | func getPriceHistory (height) = getNumberByKey(getPriceHistoryKey(height)) | |
101 | + | ||
102 | + | ||
103 | + | func isOracle (address) = isDefined(indexOf(oracles, address)) | |
104 | + | ||
105 | + | ||
106 | + | func filterAdminsVoteByAction (result,address,action) = address :: result | |
107 | + | ||
108 | + | ||
109 | + | func filterAdminsVoteByBlockAction (result,address) = filterAdminsVoteByAction(result, address, BLOCK) | |
110 | + | ||
111 | + | ||
112 | + | func filterAdminsVoteByUnblockAction (result,address) = filterAdminsVoteByAction(result, address, UNBLOCK) | |
113 | + | ||
114 | + | ||
115 | + | func filterAdminsVoteByUpdateAction (result,address) = filterAdminsVoteByAction(result, address, UPDATE) | |
116 | + | ||
117 | + | ||
118 | + | func findPricesInRange (prices) = { | |
119 | + | let minPercentBound = 90 | |
120 | + | let maxPercentBound = 110 | |
121 | + | let p0 = prices[0] | |
122 | + | let check0 = if ((0 >= prices[0])) | |
123 | + | then [0] | |
124 | + | else { | |
125 | + | let p01 = ((prices[1] * 100) / p0) | |
126 | + | let p02 = ((prices[2] * 100) / p0) | |
127 | + | let p03 = ((prices[3] * 100) / p0) | |
128 | + | let p04 = ((prices[4] * 100) / p0) | |
129 | + | let array1 = if (if ((maxPercentBound > p01)) | |
130 | + | then (p01 > minPercentBound) | |
131 | + | else false) | |
132 | + | then [1, 0] | |
133 | + | else [0] | |
134 | + | let array2 = if (if ((maxPercentBound > p02)) | |
135 | + | then (p02 > minPercentBound) | |
136 | + | else false) | |
137 | + | then 2 :: array1 | |
138 | + | else array1 | |
139 | + | let array3 = if (if ((maxPercentBound > p03)) | |
140 | + | then (p03 > minPercentBound) | |
141 | + | else false) | |
142 | + | then 3 :: array2 | |
143 | + | else array2 | |
144 | + | if (if ((maxPercentBound > p04)) | |
145 | + | then (p04 > minPercentBound) | |
146 | + | else false) | |
147 | + | then 4 :: array3 | |
148 | + | else array3 | |
149 | + | } | |
150 | + | let check1 = if ((size(check0) >= 3)) | |
151 | + | then check0 | |
152 | + | else { | |
153 | + | let p1 = prices[1] | |
154 | + | if ((0 >= p1)) | |
155 | + | then [1] | |
156 | + | else { | |
157 | + | let p10 = ((prices[0] * 100) / p1) | |
158 | + | let p12 = ((prices[2] * 100) / p1) | |
159 | + | let p13 = ((prices[3] * 100) / p1) | |
160 | + | let p14 = ((prices[4] * 100) / p1) | |
161 | + | let array1 = if (if ((maxPercentBound > p10)) | |
162 | + | then (p10 > minPercentBound) | |
163 | + | else false) | |
164 | + | then [0, 1] | |
165 | + | else [1] | |
166 | + | let array2 = if (if ((maxPercentBound > p12)) | |
167 | + | then (p12 > minPercentBound) | |
168 | + | else false) | |
169 | + | then 2 :: array1 | |
170 | + | else array1 | |
171 | + | let array3 = if (if ((maxPercentBound > p13)) | |
172 | + | then (p13 > minPercentBound) | |
173 | + | else false) | |
174 | + | then 3 :: array2 | |
175 | + | else array2 | |
176 | + | if (if ((maxPercentBound > p14)) | |
177 | + | then (p14 > minPercentBound) | |
178 | + | else false) | |
179 | + | then 4 :: array3 | |
180 | + | else array3 | |
181 | + | } | |
182 | + | } | |
183 | + | let check2 = if ((size(check1) >= 3)) | |
184 | + | then check1 | |
185 | + | else { | |
186 | + | let p2 = prices[2] | |
187 | + | if ((0 >= p2)) | |
188 | + | then [2] | |
189 | + | else { | |
190 | + | let p20 = ((prices[0] * 100) / p2) | |
191 | + | let p21 = ((prices[1] * 100) / p2) | |
192 | + | let p23 = ((prices[3] * 100) / p2) | |
193 | + | let p24 = ((prices[4] * 100) / p2) | |
194 | + | let array1 = if (if ((maxPercentBound > p20)) | |
195 | + | then (p20 > minPercentBound) | |
196 | + | else false) | |
197 | + | then [0, 2] | |
198 | + | else [2] | |
199 | + | let array2 = if (if ((maxPercentBound > p21)) | |
200 | + | then (p21 > minPercentBound) | |
201 | + | else false) | |
202 | + | then 1 :: array1 | |
203 | + | else array1 | |
204 | + | let array3 = if (if ((maxPercentBound > p23)) | |
205 | + | then (p23 > minPercentBound) | |
206 | + | else false) | |
207 | + | then 3 :: array2 | |
208 | + | else array2 | |
209 | + | if (if ((maxPercentBound > p24)) | |
210 | + | then (p24 > minPercentBound) | |
211 | + | else false) | |
212 | + | then 4 :: array3 | |
213 | + | else array3 | |
214 | + | } | |
215 | + | } | |
216 | + | let check3 = if ((size(check2) >= 3)) | |
217 | + | then check2 | |
218 | + | else { | |
219 | + | let p3 = prices[3] | |
220 | + | if ((0 >= p3)) | |
221 | + | then [3] | |
222 | + | else { | |
223 | + | let p30 = ((prices[0] * 100) / p3) | |
224 | + | let p31 = ((prices[1] * 100) / p3) | |
225 | + | let p32 = ((prices[2] * 100) / p3) | |
226 | + | let p34 = ((prices[4] * 100) / p3) | |
227 | + | let array1 = if (if ((maxPercentBound > p30)) | |
228 | + | then (p30 > minPercentBound) | |
229 | + | else false) | |
230 | + | then [0, 3] | |
231 | + | else [3] | |
232 | + | let array2 = if (if ((maxPercentBound > p31)) | |
233 | + | then (p31 > minPercentBound) | |
234 | + | else false) | |
235 | + | then 1 :: array1 | |
236 | + | else array1 | |
237 | + | let array3 = if (if ((maxPercentBound > p32)) | |
238 | + | then (p32 > minPercentBound) | |
239 | + | else false) | |
240 | + | then 2 :: array2 | |
241 | + | else array2 | |
242 | + | if (if ((maxPercentBound > p34)) | |
243 | + | then (p34 > minPercentBound) | |
244 | + | else false) | |
245 | + | then 4 :: array3 | |
246 | + | else array3 | |
247 | + | } | |
248 | + | } | |
249 | + | if ((size(check3) >= 3)) | |
250 | + | then check3 | |
251 | + | else { | |
252 | + | let p4 = prices[4] | |
253 | + | if ((0 >= p4)) | |
254 | + | then [4] | |
255 | + | else { | |
256 | + | let p40 = ((prices[0] * 100) / p4) | |
257 | + | let p41 = ((prices[1] * 100) / p4) | |
258 | + | let p42 = ((prices[2] * 100) / p4) | |
259 | + | let p43 = ((prices[3] * 100) / p4) | |
260 | + | let array1 = if (if ((maxPercentBound > p40)) | |
261 | + | then (p40 > minPercentBound) | |
262 | + | else false) | |
263 | + | then [0, 4] | |
264 | + | else [4] | |
265 | + | let array2 = if (if ((maxPercentBound > p41)) | |
266 | + | then (p41 > minPercentBound) | |
267 | + | else false) | |
268 | + | then 1 :: array1 | |
269 | + | else array1 | |
270 | + | let array3 = if (if ((maxPercentBound > p42)) | |
271 | + | then (p42 > minPercentBound) | |
272 | + | else false) | |
273 | + | then 2 :: array2 | |
274 | + | else array2 | |
275 | + | if (if ((maxPercentBound > p43)) | |
276 | + | then (p43 > minPercentBound) | |
277 | + | else false) | |
278 | + | then 3 :: array3 | |
279 | + | else array3 | |
280 | + | } | |
281 | + | } | |
282 | + | } | |
283 | + | ||
284 | + | ||
285 | + | @Callable(i) | |
286 | + | func finalizeCurrentPrice () = { | |
287 | + | let prices = [getOracleProvideHeight(oraclesList[0], height), getOracleProvideHeight(oraclesList[1], height), getOracleProvideHeight(oraclesList[2], height), getOracleProvideHeight(oraclesList[3], height), getOracleProvideHeight(oraclesList[4], height)] | |
288 | + | let pricesInRange = findPricesInRange(prices) | |
289 | + | let priceProvidingCount = size(pricesInRange) | |
290 | + | if ((3 > priceProvidingCount)) | |
291 | + | then throw("Could not finalize price because of big variation") | |
292 | + | else { | |
293 | + | let sum1 = ((prices[pricesInRange[0]] + prices[pricesInRange[1]]) + prices[pricesInRange[2]]) | |
294 | + | let sum2 = if ((priceProvidingCount >= 4)) | |
295 | + | then (sum1 + prices[pricesInRange[3]]) | |
296 | + | else sum1 | |
297 | + | let priceSum = if ((priceProvidingCount >= 5)) | |
298 | + | then (sum2 + prices[pricesInRange[4]]) | |
299 | + | else sum2 | |
300 | + | if ((priceProvidingCount >= 6)) | |
301 | + | then throw("Invalid pricesInRange creation") | |
302 | + | else { | |
303 | + | let newPrice = (priceSum / priceProvidingCount) | |
304 | + | if (isBlocked) | |
305 | + | then throw("contract is blocked") | |
306 | + | else if ((getPriceHistory(height) != 0)) | |
307 | + | then throw("wait next block") | |
308 | + | else if ((bftCoefficientOracle > priceProvidingCount)) | |
309 | + | then throw((((toString(bftCoefficientOracle) + "/5 oracles need to set a price (") + toString(priceProvidingCount)) + ")")) | |
310 | + | else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100)))) | |
311 | + | then true | |
312 | + | else ((price - ((price * percentPriceOffset) / 100)) >= newPrice)) | |
313 | + | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)]) | |
314 | + | else { | |
315 | + | let newPriceIndex = (priceIndex + 1) | |
316 | + | WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(PriceIndexKey, newPriceIndex), DataEntry(getHeightPriceByIndexKey(newPriceIndex), height)]) | |
317 | + | } | |
318 | + | } | |
319 | + | } | |
320 | + | } | |
321 | + | ||
322 | + |
github/deemru/w8io/169f3d6 36.28 ms ◑