tx · AtfGtTHi9aaqg2CKM11VaAinGnnHWtqfupyHA3kMD8mQ 3N1xMZuhBESXRLRkDdNhuaFbhVwCR7xipHM: -0.01000000 Waves 2019.12.24 17:24 [823202] smart account 3N1xMZuhBESXRLRkDdNhuaFbhVwCR7xipHM > SELF 0.00000000 Waves
{ "type": 13, "id": "AtfGtTHi9aaqg2CKM11VaAinGnnHWtqfupyHA3kMD8mQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1577197461554, "version": 1, "sender": "3N1xMZuhBESXRLRkDdNhuaFbhVwCR7xipHM", "senderPublicKey": "AGSxrxNsSqDSP86bEHZjiGFm1e8VDYpfvgHLJTkmyyJY", "proofs": [ "3LeGx2aQ8qPJ1ZrCJabAYaiX2JbhiNvvUiNTnGzoPpEyXFj9k9FR7cZKZSHHBefL2b2kXYQyDYrrhDsbdKYvw4P1" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAALwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAA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lEYXRhRW50cnkAAAACBQAAAA1QcmljZUluZGV4S2V5BQAAAA1uZXdQcmljZUluZGV4CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAYZ2V0SGVpZ2h0UHJpY2VCeUluZGV4S2V5AAAAAQUAAAANbmV3UHJpY2VJbmRleAUAAAAGaGVpZ2h0BQAAAANuaWwAAAAAwbtcww==", "chainId": 84, "height": 823202, "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 CONFIRMTX = "confirm_tx" | |
58 | + | ||
59 | + | let NONE = "none" | |
60 | + | ||
61 | + | let OraclesKey = "oracles" | |
62 | + | ||
63 | + | let AdminsKey = "admins" | |
64 | + | ||
65 | + | let VoteIntervalKey = "vote_interval" | |
66 | + | ||
67 | + | let CoefficientOracleKey = "coefficient_oracle" | |
68 | + | ||
69 | + | let CoefficientAdminKey = "coefficient_admin" | |
70 | + | ||
71 | + | let PriceOffsetKey = "price_offset" | |
72 | + | ||
73 | + | let PriceKey = "price" | |
74 | + | ||
75 | + | let IsBlockedKey = "is_blocked" | |
76 | + | ||
77 | + | let BlockExpireVoteKey = "vote_expire_block" | |
78 | + | ||
79 | + | let PriceIndexKey = "price_index" | |
80 | + | ||
81 | + | let LastConfirmTxKey = "last_confirm_tx" | |
82 | + | ||
83 | + | func getAdminVoteKey (owner) = ("admin_vote_" + owner) | |
84 | + | ||
85 | + | ||
86 | + | func getAdminVoteArgumentsKey (owner) = (("vote_action_" + owner) + "_arguments") | |
87 | + | ||
88 | + | ||
89 | + | func getBlackSwarmPriceKey (block) = (("black_swarm_price" + "_") + toString(block)) | |
90 | + | ||
91 | + | ||
92 | + | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
93 | + | ||
94 | + | ||
95 | + | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
96 | + | ||
97 | + | ||
98 | + | func getOracleProvidePriceKey (height) = ("price_" + toString(height)) | |
99 | + | ||
100 | + | ||
101 | + | let price = getNumberByKey(PriceKey) | |
102 | + | ||
103 | + | let priceIndex = getNumberByKey(PriceIndexKey) | |
104 | + | ||
105 | + | let isBlocked = getBoolByKey(IsBlockedKey) | |
106 | + | ||
107 | + | let bftCoefficientOracle = getNumberByKey(CoefficientOracleKey) | |
108 | + | ||
109 | + | let bftCoefficientAdmin = getNumberByKey(CoefficientAdminKey) | |
110 | + | ||
111 | + | let percentPriceOffset = getNumberByKey(PriceOffsetKey) | |
112 | + | ||
113 | + | let voteInterval = getNumberByKey(VoteIntervalKey) | |
114 | + | ||
115 | + | let blockExpireVote = getNumberByKey(BlockExpireVoteKey) | |
116 | + | ||
117 | + | let oracles = getStringByKey(OraclesKey) | |
118 | + | ||
119 | + | let oraclesList = convertJsonArrayToList(oracles) | |
120 | + | ||
121 | + | func getAdminVote (owner) = getStringByKey(getAdminVoteKey(owner)) | |
122 | + | ||
123 | + | ||
124 | + | func getAdminVoteArguments (owner) = getStringByKey(getAdminVoteArgumentsKey(owner)) | |
125 | + | ||
126 | + | ||
127 | + | func getOracleProvideHeight (owner,height) = getNumberByAddressAndKey(addressFromStringValue(owner), getOracleProvidePriceKey(height)) | |
128 | + | ||
129 | + | ||
130 | + | func getPriceHistory (height) = getNumberByKey(getPriceHistoryKey(height)) | |
131 | + | ||
132 | + | ||
133 | + | func isOracle (address) = isDefined(indexOf(oracles, address)) | |
134 | + | ||
135 | + | ||
136 | + | func foldSummByAction (result,address,action) = if ((getAdminVote(address) == action)) | |
137 | + | then 1 | |
138 | + | else 0 | |
139 | + | ||
140 | + | ||
141 | + | func foldSummByBlock (result,address) = (result + foldSummByAction(result, address, BLOCK)) | |
142 | + | ||
143 | + | ||
144 | + | func foldSummByConfirmTx (result,address) = (result + foldSummByAction(result, address, CONFIRMTX)) | |
145 | + | ||
146 | + | ||
147 | + | func summByAction (admins,action) = if ((action == BLOCK)) | |
148 | + | then { | |
149 | + | let $list41334168 = admins | |
150 | + | let $size41334168 = size($list41334168) | |
151 | + | let $acc041334168 = 0 | |
152 | + | if (($size41334168 == 0)) | |
153 | + | then $acc041334168 | |
154 | + | else { | |
155 | + | let $acc141334168 = foldSummByBlock($acc041334168, $list41334168[0]) | |
156 | + | if (($size41334168 == 1)) | |
157 | + | then $acc141334168 | |
158 | + | else { | |
159 | + | let $acc241334168 = foldSummByBlock($acc141334168, $list41334168[1]) | |
160 | + | if (($size41334168 == 2)) | |
161 | + | then $acc241334168 | |
162 | + | else { | |
163 | + | let $acc341334168 = foldSummByBlock($acc241334168, $list41334168[2]) | |
164 | + | if (($size41334168 == 3)) | |
165 | + | then $acc341334168 | |
166 | + | else { | |
167 | + | let $acc441334168 = foldSummByBlock($acc341334168, $list41334168[3]) | |
168 | + | if (($size41334168 == 4)) | |
169 | + | then $acc441334168 | |
170 | + | else { | |
171 | + | let $acc541334168 = foldSummByBlock($acc441334168, $list41334168[4]) | |
172 | + | if (($size41334168 == 5)) | |
173 | + | then $acc541334168 | |
174 | + | else { | |
175 | + | let $acc641334168 = foldSummByBlock($acc541334168, $list41334168[5]) | |
176 | + | throw("List size exceed 5") | |
177 | + | } | |
178 | + | } | |
179 | + | } | |
180 | + | } | |
181 | + | } | |
182 | + | } | |
183 | + | } | |
184 | + | else if ((action == CONFIRMTX)) | |
185 | + | then { | |
186 | + | let $list42154254 = admins | |
187 | + | let $size42154254 = size($list42154254) | |
188 | + | let $acc042154254 = 0 | |
189 | + | if (($size42154254 == 0)) | |
190 | + | then $acc042154254 | |
191 | + | else { | |
192 | + | let $acc142154254 = foldSummByConfirmTx($acc042154254, $list42154254[0]) | |
193 | + | if (($size42154254 == 1)) | |
194 | + | then $acc142154254 | |
195 | + | else { | |
196 | + | let $acc242154254 = foldSummByConfirmTx($acc142154254, $list42154254[1]) | |
197 | + | if (($size42154254 == 2)) | |
198 | + | then $acc242154254 | |
199 | + | else { | |
200 | + | let $acc342154254 = foldSummByConfirmTx($acc242154254, $list42154254[2]) | |
201 | + | if (($size42154254 == 3)) | |
202 | + | then $acc342154254 | |
203 | + | else { | |
204 | + | let $acc442154254 = foldSummByConfirmTx($acc342154254, $list42154254[3]) | |
205 | + | if (($size42154254 == 4)) | |
206 | + | then $acc442154254 | |
207 | + | else { | |
208 | + | let $acc542154254 = foldSummByConfirmTx($acc442154254, $list42154254[4]) | |
209 | + | if (($size42154254 == 5)) | |
210 | + | then $acc542154254 | |
211 | + | else { | |
212 | + | let $acc642154254 = foldSummByConfirmTx($acc542154254, $list42154254[5]) | |
213 | + | throw("List size exceed 5") | |
214 | + | } | |
215 | + | } | |
216 | + | } | |
217 | + | } | |
218 | + | } | |
219 | + | } | |
220 | + | } | |
221 | + | else throw("action not found") | |
222 | + | ||
223 | + | ||
224 | + | func summByArguments (admins,arguments) = (((((if ((getAdminVoteArguments(admins[0]) == arguments)) | |
225 | + | then 1 | |
226 | + | else 0) + (if ((getAdminVoteArguments(admins[1]) == arguments)) | |
227 | + | then 1 | |
228 | + | else 0)) + (if ((getAdminVoteArguments(admins[2]) == arguments)) | |
229 | + | then 1 | |
230 | + | else 0)) + (if ((getAdminVoteArguments(admins[3]) == arguments)) | |
231 | + | then 1 | |
232 | + | else 0)) + (if ((getAdminVoteArguments(admins[4]) == arguments)) | |
233 | + | then 1 | |
234 | + | else 0)) | |
235 | + | ||
236 | + | ||
237 | + | @Callable(i) | |
238 | + | func finalizeCurrentPrice () = { | |
239 | + | let prices = [getOracleProvideHeight(oraclesList[0], height), getOracleProvideHeight(oraclesList[1], height), getOracleProvideHeight(oraclesList[2], height), getOracleProvideHeight(oraclesList[3], height), getOracleProvideHeight(oraclesList[4], height)] | |
240 | + | let priceProvidingCount = (((((if ((prices[0] != 0)) | |
241 | + | then 1 | |
242 | + | else 0) + (if ((prices[1] != 0)) | |
243 | + | then 1 | |
244 | + | else 0)) + (if ((prices[2] != 0)) | |
245 | + | then 1 | |
246 | + | else 0)) + (if ((prices[3] != 0)) | |
247 | + | then 1 | |
248 | + | else 0)) + (if ((prices[4] != 0)) | |
249 | + | then 1 | |
250 | + | else 0)) | |
251 | + | let priceSum = ((((prices[0] + prices[1]) + prices[2]) + prices[3]) + prices[4]) | |
252 | + | let newPrice = (priceSum / priceProvidingCount) | |
253 | + | if (isBlocked) | |
254 | + | then throw("contract is blocked") | |
255 | + | else if ((getPriceHistory(height) != 0)) | |
256 | + | then throw("wait next block") | |
257 | + | else if ((bftCoefficientOracle > priceProvidingCount)) | |
258 | + | then throw((((toString(bftCoefficientOracle) + "/5 oracles need to set a price (") + toString(priceProvidingCount)) + ")")) | |
259 | + | else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100)))) | |
260 | + | then true | |
261 | + | else ((price - ((price * percentPriceOffset) / 100)) >= newPrice)) | |
262 | + | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)]) | |
263 | + | else { | |
264 | + | let newPriceIndex = (priceIndex + 1) | |
265 | + | WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(PriceIndexKey, newPriceIndex), DataEntry(getHeightPriceByIndexKey(newPriceIndex), height)]) | |
266 | + | } | |
267 | + | } | |
268 | + | ||
269 | + |
github/deemru/w8io/169f3d6 25.02 ms ◑