tx · 8Q3j931QAsG2YDZcEDB8cDkcQRtxpEShvrobTZsNjn1q

3MpQvABYaGz83T1mCcR4iX8irMhvVVARchB:  -0.01000000 Waves

2019.11.22 16:48 [776498] smart account 3MpQvABYaGz83T1mCcR4iX8irMhvVVARchB > SELF 0.00000000 Waves

{ "type": 13, "id": "8Q3j931QAsG2YDZcEDB8cDkcQRtxpEShvrobTZsNjn1q", "fee": 1000000, "feeAssetId": null, "timestamp": 1574430531356, "version": 1, "sender": "3MpQvABYaGz83T1mCcR4iX8irMhvVVARchB", "senderPublicKey": "5xwE5h3tN4TNU8uz13josXEpivshSnQPze4KvM1pJ19g", "proofs": [ "5uf93TazqMThYntLuRdAxJgYUpG29SzhYWJCS1KPS2WYLK4XDsATL1UK2WJi721cmmgwsL8w4hy2F315zJn13ETR" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAAyAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQa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J5AAAAAgUAAAAUU2NyaXB0VXBkYXRlQmxvY2tLZXkDCQAAZgAAAAIFAAAAEHVwZGF0ZVZvdGVzQ291bnQFAAAAE2JmdENvZWZmaWNpZW50QWRtaW4JAABkAAAAAgUAAAAGaGVpZ2h0BQAAABRzY3JpcHRVcGRhdGVJbnRlcnZhbAUAAAARc2NyaXB0VXBkYXRlQmxvY2sFAAAAC3Jlc2V0UmVzdWx0CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJCbG9ja0V4cGlyZVZvdGVLZXkDCQAAZgAAAAIFAAAABmhlaWdodAUAAAAPYmxvY2tFeHBpcmVWb3RlCQAAZAAAAAIFAAAABmhlaWdodAUAAAAMdm90ZUludGVydmFsBQAAAA9ibG9ja0V4cGlyZVZvdGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABVnZXRBZG1pblZvdGVBY3Rpb25LZXkAAAABBQAAAAdhY2NvdW50BQAAAAZhY3Rpb24FAAAAA25pbAAAAAAkH44Z", "chainId": 84, "height": 776498, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
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 AdminsKey = "admins"
64+
65+let VoteIntervalKey = "vote_interval"
66+
67+let CoefficientOracleKey = "coefficient_oracle"
68+
69+let CoefficientAdminKey = "coefficient_admin"
70+
71+let ScriptUpdateIntervalKey = "script_update_interval"
72+
73+let PriceOffsetKey = "price_offset"
74+
75+let PriceKey = "price"
76+
77+let IsBlockedKey = "is_blocked"
78+
79+let BlockExpireVoteKey = "vote_expire_block"
80+
81+let ScriptUpdateBlockKey = "script_update_block"
82+
83+let PriceIndexKey = "price_index"
84+
85+func getAdminVoteKey (owner) = ("admin_vote_" + owner)
86+
87+
88+func getAdminVoteActionKey (owner) = ((getAdminVoteKey(owner) + "_") + "action")
89+
90+
91+func getBlackSwarmPriceKey (block) = (("black_swarm_price" + "_") + toString(block))
92+
93+
94+func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
95+
96+
97+func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
98+
99+
100+func getOracleProvidePriceKey (height) = ("price_" + toString(height))
101+
102+
103+let price = getNumberByKey(PriceKey)
104+
105+let priceIndex = getNumberByKey(PriceIndexKey)
106+
107+let blockExpireVote = getNumberByKey(BlockExpireVoteKey)
108+
109+let scriptUpdateBlock = getNumberByKey(ScriptUpdateBlockKey)
110+
111+let scriptUpdateInterval = getNumberByKey(ScriptUpdateIntervalKey)
112+
113+let isBlocked = getBoolByKey(IsBlockedKey)
114+
115+let bftCoefficientOracle = getNumberByKey(CoefficientOracleKey)
116+
117+let bftCoefficientAdmin = getNumberByKey(CoefficientAdminKey)
118+
119+let percentPriceOffset = getNumberByKey(PriceOffsetKey)
120+
121+let voteInterval = getNumberByKey(VoteIntervalKey)
122+
123+let oracles = getStringByKey(OraclesKey)
124+
125+let admins = getStringByKey(AdminsKey)
126+
127+let oraclesList = convertJsonArrayToList(oracles)
128+
129+let adminsList = convertJsonArrayToList(admins)
130+
131+func getAdminVoteAction (owner) = getStringByKey(getAdminVoteActionKey(owner))
132+
133+
134+func getOracleProvideHeight (owner,height) = getNumberByAddressAndKey(addressFromStringValue(owner), getOracleProvidePriceKey(height))
135+
136+
137+func isOracle (address) = isDefined(indexOf(oracles, address))
138+
139+
140+func isAdmin (address) = isDefined(indexOf(admins, address))
141+
142+
143+func filterAdminsVoteByAction (result,address,action) = address :: result
144+
145+
146+func filterAdminsVoteByBlockAction (result,address) = filterAdminsVoteByAction(result, address, BLOCK)
147+
148+
149+func filterAdminsVoteByUnblockAction (result,address) = filterAdminsVoteByAction(result, address, UNBLOCK)
150+
151+
152+func filterAdminsVoteByUpdateAction (result,address) = filterAdminsVoteByAction(result, address, UPDATE)
153+
154+
155+@Callable(i)
156+func finalizeCurrentPrice () = {
157+ let prices = [getOracleProvideHeight(oraclesList[0], height), getOracleProvideHeight(oraclesList[1], height), getOracleProvideHeight(oraclesList[2], height), getOracleProvideHeight(oraclesList[3], height), getOracleProvideHeight(oraclesList[4], height)]
158+ let priceProvidingCount = if ((prices[0] != 0))
159+ then 1
160+ else (0 + (if ((prices[1] != 0))
161+ then 1
162+ else (0 + (if ((prices[2] != 0))
163+ then 1
164+ else (0 + (if ((prices[3] != 0))
165+ then 1
166+ else (0 + (if ((prices[4] != 0))
167+ then 1
168+ else 0))))))))
169+ let priceSum = ((((prices[0] + prices[1]) + prices[2]) + prices[3]) + prices[4])
170+ let newPrice = (priceSum / priceProvidingCount)
171+ if (isBlocked)
172+ then throw("contract is blocked")
173+ else if ((bftCoefficientOracle > priceProvidingCount))
174+ then throw("3/5 oracles need to set a price")
175+ else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
176+ then true
177+ else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
178+ then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)])
179+ else {
180+ let newPriceIndex = (priceIndex + 1)
181+ WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(PriceIndexKey, newPriceIndex), DataEntry(getHeightPriceByIndexKey(newPriceIndex), height)])
182+ }
183+ }
184+
185+
186+
187+@Callable(i)
188+func vote (action) = {
189+ let account = toString(i.caller)
190+ let adminsListWithoutAccount = convertJsonArrayToList(dropElementInJsonArray(admins, account))
191+ let lastAction = getAdminVoteAction(account)
192+ let blockVotes = {
193+ let $list62536321 = adminsListWithoutAccount
194+ let $size62536321 = size($list62536321)
195+ let $acc062536321 = nil
196+ if (($size62536321 == 0))
197+ then $acc062536321
198+ else {
199+ let $acc162536321 = filterAdminsVoteByBlockAction($acc062536321, $list62536321[0])
200+ if (($size62536321 == 1))
201+ then $acc162536321
202+ else {
203+ let $acc262536321 = filterAdminsVoteByBlockAction($acc162536321, $list62536321[1])
204+ if (($size62536321 == 2))
205+ then $acc262536321
206+ else {
207+ let $acc362536321 = filterAdminsVoteByBlockAction($acc262536321, $list62536321[2])
208+ if (($size62536321 == 3))
209+ then $acc362536321
210+ else {
211+ let $acc462536321 = filterAdminsVoteByBlockAction($acc362536321, $list62536321[3])
212+ if (($size62536321 == 4))
213+ then $acc462536321
214+ else {
215+ let $acc562536321 = filterAdminsVoteByBlockAction($acc462536321, $list62536321[4])
216+ if (($size62536321 == 5))
217+ then $acc562536321
218+ else {
219+ let $acc662536321 = filterAdminsVoteByBlockAction($acc562536321, $list62536321[5])
220+ throw("List size exceed 5")
221+ }
222+ }
223+ }
224+ }
225+ }
226+ }
227+ }
228+ let unblockVotes = {
229+ let $list63456415 = adminsListWithoutAccount
230+ let $size63456415 = size($list63456415)
231+ let $acc063456415 = nil
232+ if (($size63456415 == 0))
233+ then $acc063456415
234+ else {
235+ let $acc163456415 = filterAdminsVoteByUnblockAction($acc063456415, $list63456415[0])
236+ if (($size63456415 == 1))
237+ then $acc163456415
238+ else {
239+ let $acc263456415 = filterAdminsVoteByUnblockAction($acc163456415, $list63456415[1])
240+ if (($size63456415 == 2))
241+ then $acc263456415
242+ else {
243+ let $acc363456415 = filterAdminsVoteByUnblockAction($acc263456415, $list63456415[2])
244+ if (($size63456415 == 3))
245+ then $acc363456415
246+ else {
247+ let $acc463456415 = filterAdminsVoteByUnblockAction($acc363456415, $list63456415[3])
248+ if (($size63456415 == 4))
249+ then $acc463456415
250+ else {
251+ let $acc563456415 = filterAdminsVoteByUnblockAction($acc463456415, $list63456415[4])
252+ if (($size63456415 == 5))
253+ then $acc563456415
254+ else {
255+ let $acc663456415 = filterAdminsVoteByUnblockAction($acc563456415, $list63456415[5])
256+ throw("List size exceed 5")
257+ }
258+ }
259+ }
260+ }
261+ }
262+ }
263+ }
264+ let updateVotes = {
265+ let $list64386507 = adminsListWithoutAccount
266+ let $size64386507 = size($list64386507)
267+ let $acc064386507 = nil
268+ if (($size64386507 == 0))
269+ then $acc064386507
270+ else {
271+ let $acc164386507 = filterAdminsVoteByUpdateAction($acc064386507, $list64386507[0])
272+ if (($size64386507 == 1))
273+ then $acc164386507
274+ else {
275+ let $acc264386507 = filterAdminsVoteByUpdateAction($acc164386507, $list64386507[1])
276+ if (($size64386507 == 2))
277+ then $acc264386507
278+ else {
279+ let $acc364386507 = filterAdminsVoteByUpdateAction($acc264386507, $list64386507[2])
280+ if (($size64386507 == 3))
281+ then $acc364386507
282+ else {
283+ let $acc464386507 = filterAdminsVoteByUpdateAction($acc364386507, $list64386507[3])
284+ if (($size64386507 == 4))
285+ then $acc464386507
286+ else {
287+ let $acc564386507 = filterAdminsVoteByUpdateAction($acc464386507, $list64386507[4])
288+ if (($size64386507 == 5))
289+ then $acc564386507
290+ else {
291+ let $acc664386507 = filterAdminsVoteByUpdateAction($acc564386507, $list64386507[5])
292+ throw("List size exceed 5")
293+ }
294+ }
295+ }
296+ }
297+ }
298+ }
299+ }
300+ let blockVoteCount = (size(blockVotes) + (if ((action == BLOCK))
301+ then 1
302+ else 0))
303+ let unblockVoteCount = (size(unblockVotes) + (if ((action == UNBLOCK))
304+ then 1
305+ else 0))
306+ let updateVotesCount = (size(updateVotes) + (if ((action == UPDATE))
307+ then 1
308+ else 0))
309+ let resetResult = [DataEntry(BlockExpireVoteKey, 0), DataEntry(getAdminVoteActionKey(adminsListWithoutAccount[0]), ""), DataEntry(getAdminVoteActionKey(adminsListWithoutAccount[1]), ""), DataEntry(getAdminVoteActionKey(adminsListWithoutAccount[2]), ""), DataEntry(getAdminVoteActionKey(adminsListWithoutAccount[3]), "")]
310+ if (if ((blockVoteCount >= bftCoefficientAdmin))
311+ then true
312+ else (unblockVoteCount >= bftCoefficientAdmin))
313+ then WriteSet(DataEntry(IsBlockedKey, if ((blockVoteCount >= bftCoefficientAdmin))
314+ then true
315+ else false) :: resetResult)
316+ else if ((updateVotesCount > bftCoefficientAdmin))
317+ then WriteSet(DataEntry(ScriptUpdateBlockKey, if ((updateVotesCount > bftCoefficientAdmin))
318+ then (height + scriptUpdateInterval)
319+ else scriptUpdateBlock) :: resetResult)
320+ else WriteSet([DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote))
321+ then (height + voteInterval)
322+ else blockExpireVote), DataEntry(getAdminVoteActionKey(account), action)])
323+ }
324+
325+

github/deemru/w8io/026f985 
85.26 ms