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:BgInCAISEAoOCAgICAgICAgICAgICAgSAwoBCBIMCgoBAgECAQIBAgECLAALcmV2aXNpb25OdW0CAAADU0VQAgJfXwAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENvbnRyb2xDZmdOc2J0U3Rha2luZ0RhcHAACAAZSWR4Q29udHJvbENmZ01lZGlhdG9yR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Byb29mcwAACQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAAAAAEAAAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEJANkEAQkAkQMCBRBwdWJLZXlBZG1pbnNMaXN0AAEAAQAAAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgkA2QQBCQCRAwIFEHB1YktleUFkbWluc0xpc3QAAgABAAADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwADCQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAADAAIAAAkAZwIFBWNvdW50AANTTysJ", "height": 3046567, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J89hJBRUFTkgdm6Ftvy1cBjJq2DD3qr7dqhVq88EjbWG Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let revisionNum = ""
5+
46 let SEP = "__"
57
68 let IdxControlCfgNeutrinoDapp = 1
347349 let wxAssetId = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"
348350 let newViresPrice = valueOrElse(getInteger("vires_stub_price"), 1330432)
349351 let viresAssetId = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf"
352+ let newWindPrice = valueOrElse(getInteger("wind_stub_price"), 6177700)
353+ let windAssetId = "DJ5sGMbBFSNA8yTHPTfMP9QDDHFp6CFToV2poteZm7X3"
350354 if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
351355 then true
352356 else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
356360 }
357361 else {
358362 let newPriceIndex = (priceIndex + 1)
359- ((([IntegerEntry("price", newPrice), IntegerEntry(("price_" + toString(height)), newPrice), IntegerEntry(("price_index_" + toString(newPriceIndex)), height), IntegerEntry("price_index", newPriceIndex), IntegerEntry(("indexByHeight_" + toString(height)), newPriceIndex), IntegerEntry(("priceByIndex_" + toString(newPriceIndex)), newPrice), IntegerEntry(("deficit_" + toString(height)), deficit), IntegerEntry(("neutrinoSupply_" + toString(height)), neutrinoSupply), IntegerEntry(("deficit_percent_" + toString(height)), if ((neutrinoSupply != 0))
363+ (((([IntegerEntry("price", newPrice), IntegerEntry(("price_" + toString(height)), newPrice), IntegerEntry(("price_index_" + toString(newPriceIndex)), height), IntegerEntry("price_index", newPriceIndex), IntegerEntry(("indexByHeight_" + toString(height)), newPriceIndex), IntegerEntry(("priceByIndex_" + toString(newPriceIndex)), newPrice), IntegerEntry(("deficit_" + toString(height)), deficit), IntegerEntry(("neutrinoSupply_" + toString(height)), neutrinoSupply), IntegerEntry(("deficit_percent_" + toString(height)), if ((neutrinoSupply != 0))
360364 then ((deficit * 100) / neutrinoSupply)
361- else 0)] ++ PriceEntry(newPrice, "WAVES", newPriceIndex)) ++ PriceEntry(newWxPrice, wxAssetId, newPriceIndex)) ++ PriceEntry(newViresPrice, viresAssetId, newPriceIndex))
365+ else 0)] ++ PriceEntry(newPrice, "WAVES", newPriceIndex)) ++ PriceEntry(newWxPrice, wxAssetId, newPriceIndex)) ++ PriceEntry(newViresPrice, viresAssetId, newPriceIndex)) ++ PriceEntry(newWindPrice, windAssetId, newPriceIndex))
362366 }
363367 }
364368 }
365369 }
366370 }
367-
368-
369-
370-@Callable(i)
371-func validatePrice (averagingPeriodMs,toleranceX6,assetIdStr) = $Tuple2(nil, true)
372371
373372
374373 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let revisionNum = ""
5+
46 let SEP = "__"
57
68 let IdxControlCfgNeutrinoDapp = 1
79
810 let IdxControlCfgAuctionDapp = 2
911
1012 let IdxControlCfgRpdDapp = 3
1113
1214 let IdxControlCfgMathDapp = 4
1315
1416 let IdxControlCfgLiquidationDapp = 5
1517
1618 let IdxControlCfgRestDapp = 6
1719
1820 let IdxControlCfgNodeRegistryDapp = 7
1921
2022 let IdxControlCfgNsbtStakingDapp = 8
2123
2224 let IdxControlCfgMediatorDapp = 9
2325
2426 let IdxControlCfgSurfStakingDapp = 10
2527
2628 let IdxControlCfgGnsbtControllerDapp = 11
2729
2830 let IdxControlCfgRestV2Dapp = 12
2931
3032 let IdxControlCfgGovernanceDapp = 13
3133
3234 let IdxControlCfgPegProviderDapp = 14
3335
3436 func keyControlConfig () = "%s__controlConfig"
3537
3638
3739 func dataControlCfg (neutrinoContract,auctionContract,rpdContract,mathContract,liquidationContract,restContract,nodeRegistryContract,nsbtStakingContract,mediatorContract,surfStakingContract,gnsbtControllerContract,restV2Contract,governanceContract,doraContract) = makeString(["%s%s%s%s%s%s%s%s%s%s%s%s%s%s", neutrinoContract, auctionContract, rpdContract, mathContract, liquidationContract, restContract, nodeRegistryContract, nsbtStakingContract, mediatorContract, surfStakingContract, gnsbtControllerContract, restV2Contract, governanceContract, doraContract], SEP)
3840
3941
4042 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 1000000), 1000000, 100000000)
4143
4244
4345 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
4446
4547
4648 func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
4749
4850
4951 func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
5052
5153
5254 let price = valueOrElse(getInteger(this, "price"), 0)
5355
5456 let priceIndex = valueOrElse(getInteger(this, "price_index"), 0)
5557
5658 let isBlocked = valueOrElse(getBoolean(this, "is_blocked"), false)
5759
5860 let percentPriceOffset = 1000
5961
6062 let pubKeyOracles = valueOrElse(getString(this, "oracles"), "")
6163
6264 let pubKeyOraclesList = convertJsonArrayToList(pubKeyOracles)
6365
6466 let neutrinoAddress = Address(base58'3N9be2mwrA52WJho6DiesZkk4351GvpnWuj')
6567
6668 let liquidationAddress = Address(base58'3N24ZPUAMhFm76N3vbNiiDtFqfUnmBHTc5N')
6769
6870 let neutrinoAsset = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
6971
7072 let controlContract = this
7173
7274 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
7375
7476
7577 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
7678
7779
7880 let controlCfg = split_4C(getStringOrFail(this, keyControlConfig()), SEP)
7981
8082 let governanceContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp)
8183
8284 let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoAddress, "balance_lock_neutrino"), 0)
8385
8486 let wavesLockedBalance = valueOrElse(getInteger(neutrinoAddress, "balance_lock_waves"), 0)
8587
8688 let reserve = (wavesBalance(neutrinoAddress).regular - wavesLockedBalance)
8789
8890 let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAsset)).quantity) - assetBalance(neutrinoAddress, neutrinoAsset)) - assetBalance(liquidationAddress, neutrinoAsset))
8991
9092 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, price))
9193
9294 func findPricesInRange (prices) = {
9395 let minPercentBound = 90
9496 let maxPercentBound = 110
9597 let p0 = prices[0]
9698 let check0 = if ((0 >= prices[0]))
9799 then [0]
98100 else {
99101 let p01 = ((prices[1] * 100) / p0)
100102 let p02 = ((prices[2] * 100) / p0)
101103 let p03 = ((prices[3] * 100) / p0)
102104 let p04 = ((prices[4] * 100) / p0)
103105 let array1 = if (if ((maxPercentBound > p01))
104106 then (p01 > minPercentBound)
105107 else false)
106108 then [1, 0]
107109 else [0]
108110 let array2 = if (if ((maxPercentBound > p02))
109111 then (p02 > minPercentBound)
110112 else false)
111113 then 2 :: array1
112114 else array1
113115 let array3 = if (if ((maxPercentBound > p03))
114116 then (p03 > minPercentBound)
115117 else false)
116118 then 3 :: array2
117119 else array2
118120 if (if ((maxPercentBound > p04))
119121 then (p04 > minPercentBound)
120122 else false)
121123 then 4 :: array3
122124 else array3
123125 }
124126 let check1 = if ((size(check0) >= 3))
125127 then check0
126128 else {
127129 let p1 = prices[1]
128130 if ((0 >= p1))
129131 then [1]
130132 else {
131133 let p10 = ((prices[0] * 100) / p1)
132134 let p12 = ((prices[2] * 100) / p1)
133135 let p13 = ((prices[3] * 100) / p1)
134136 let p14 = ((prices[4] * 100) / p1)
135137 let array1 = if (if ((maxPercentBound > p10))
136138 then (p10 > minPercentBound)
137139 else false)
138140 then [0, 1]
139141 else [1]
140142 let array2 = if (if ((maxPercentBound > p12))
141143 then (p12 > minPercentBound)
142144 else false)
143145 then 2 :: array1
144146 else array1
145147 let array3 = if (if ((maxPercentBound > p13))
146148 then (p13 > minPercentBound)
147149 else false)
148150 then 3 :: array2
149151 else array2
150152 if (if ((maxPercentBound > p14))
151153 then (p14 > minPercentBound)
152154 else false)
153155 then 4 :: array3
154156 else array3
155157 }
156158 }
157159 let check2 = if ((size(check1) >= 3))
158160 then check1
159161 else {
160162 let p2 = prices[2]
161163 if ((0 >= p2))
162164 then [2]
163165 else {
164166 let p20 = ((prices[0] * 100) / p2)
165167 let p21 = ((prices[1] * 100) / p2)
166168 let p23 = ((prices[3] * 100) / p2)
167169 let p24 = ((prices[4] * 100) / p2)
168170 let array1 = if (if ((maxPercentBound > p20))
169171 then (p20 > minPercentBound)
170172 else false)
171173 then [0, 2]
172174 else [2]
173175 let array2 = if (if ((maxPercentBound > p21))
174176 then (p21 > minPercentBound)
175177 else false)
176178 then 1 :: array1
177179 else array1
178180 let array3 = if (if ((maxPercentBound > p23))
179181 then (p23 > minPercentBound)
180182 else false)
181183 then 3 :: array2
182184 else array2
183185 if (if ((maxPercentBound > p24))
184186 then (p24 > minPercentBound)
185187 else false)
186188 then 4 :: array3
187189 else array3
188190 }
189191 }
190192 let check3 = if ((size(check2) >= 3))
191193 then check2
192194 else {
193195 let p3 = prices[3]
194196 if ((0 >= p3))
195197 then [3]
196198 else {
197199 let p30 = ((prices[0] * 100) / p3)
198200 let p31 = ((prices[1] * 100) / p3)
199201 let p32 = ((prices[2] * 100) / p3)
200202 let p34 = ((prices[4] * 100) / p3)
201203 let array1 = if (if ((maxPercentBound > p30))
202204 then (p30 > minPercentBound)
203205 else false)
204206 then [0, 3]
205207 else [3]
206208 let array2 = if (if ((maxPercentBound > p31))
207209 then (p31 > minPercentBound)
208210 else false)
209211 then 1 :: array1
210212 else array1
211213 let array3 = if (if ((maxPercentBound > p32))
212214 then (p32 > minPercentBound)
213215 else false)
214216 then 2 :: array2
215217 else array2
216218 if (if ((maxPercentBound > p34))
217219 then (p34 > minPercentBound)
218220 else false)
219221 then 4 :: array3
220222 else array3
221223 }
222224 }
223225 if ((size(check3) >= 3))
224226 then check3
225227 else {
226228 let p4 = prices[4]
227229 if ((0 >= p4))
228230 then [4]
229231 else {
230232 let p40 = ((prices[0] * 100) / p4)
231233 let p41 = ((prices[1] * 100) / p4)
232234 let p42 = ((prices[2] * 100) / p4)
233235 let p43 = ((prices[3] * 100) / p4)
234236 let array1 = if (if ((maxPercentBound > p40))
235237 then (p40 > minPercentBound)
236238 else false)
237239 then [0, 4]
238240 else [4]
239241 let array2 = if (if ((maxPercentBound > p41))
240242 then (p41 > minPercentBound)
241243 else false)
242244 then 1 :: array1
243245 else array1
244246 let array3 = if (if ((maxPercentBound > p42))
245247 then (p42 > minPercentBound)
246248 else false)
247249 then 2 :: array2
248250 else array2
249251 if (if ((maxPercentBound > p43))
250252 then (p43 > minPercentBound)
251253 else false)
252254 then 3 :: array3
253255 else array3
254256 }
255257 }
256258 }
257259
258260
259261 func formattingPriceMsg (price) = toBytes((((("WAVESNEUTRINOPREFIX" + "_") + toString(height)) + "_") + toString(price)))
260262
261263
262264 func PriceEntry (newPrice,assetIdStr,newPriceIndex) = {
263265 let heightStr = toString(height)
264266 let newPriceIndexStr = toString(newPriceIndex)
265267 let priceByAssetKEY = makeString(["%s%s%s__common__priceByAsset", assetIdStr], SEP)
266268 let priceByHeightKEY = makeString(["%s%s%s%d__common__priceByHeight", assetIdStr, heightStr], SEP)
267269 let priceByIndexKEY = makeString(["%s%s%s%d__common__priceByIndex", assetIdStr, newPriceIndexStr], SEP)
268270 [IntegerEntry(priceByAssetKEY, newPrice), IntegerEntry(priceByIndexKEY, newPrice), IntegerEntry(priceByHeightKEY, newPrice)]
269271 }
270272
271273
272274 @Callable(i)
273275 func constructorV1 (neutrinoContract,auctionContract,rpdContract,mathContract,liquidationContract,restContract,nodeRegistryContract,nsbtStakingContract,mediatorContract,surfStakingContract,gnsbtControllerContract,restV2Contract,governanceContract,doraContract) = if ((i.caller != this))
274276 then throw("permissions denied")
275277 else [StringEntry(keyControlConfig(), dataControlCfg(neutrinoContract, auctionContract, rpdContract, mathContract, liquidationContract, restContract, nodeRegistryContract, nsbtStakingContract, mediatorContract, surfStakingContract, gnsbtControllerContract, restV2Contract, governanceContract, doraContract))]
276278
277279
278280
279281 @Callable(i)
280282 func callEmergencyShutdown (reason) = {
281283 let AutoEmergencyOracleAddress = "3MrRCbZhD9cPBT1efEkzAfaeaU26Ukvf9mh"
282284 let callerAddress = toString(i.caller)
283285 if (if ((AutoEmergencyOracleAddress != callerAddress))
284286 then (toString(governanceContract) != callerAddress)
285287 else false)
286288 then throw("caller must be one an emergency oracle or Governance contract")
287289 else [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", callerAddress), StringEntry("is_blocked_reason", reason)]
288290 }
289291
290292
291293
292294 @Callable(i)
293295 func finalizeCurrentPrice (price1,sign1,price2,sign2,price3,sign3,price4,sign4,price5,sign5) = if (isBlocked)
294296 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
295297 else if ((valueOrElse(getInteger(this, ("price_" + toString(height))), 0) != 0))
296298 then throw("wait next block")
297299 else if ((pubKeyOraclesList[(height % 5)] != toBase58String(i.callerPublicKey)))
298300 then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + pubKeyOraclesList[(height % 5)]))
299301 else {
300302 let prices = [if (sigVerify_8Kb(formattingPriceMsg(price1), sign1, fromBase58String(pubKeyOraclesList[0])))
301303 then price1
302304 else 0, if (sigVerify_8Kb(formattingPriceMsg(price2), sign2, fromBase58String(pubKeyOraclesList[1])))
303305 then price2
304306 else 0, if (sigVerify_8Kb(formattingPriceMsg(price3), sign3, fromBase58String(pubKeyOraclesList[2])))
305307 then price3
306308 else 0, if (sigVerify_8Kb(formattingPriceMsg(price4), sign4, fromBase58String(pubKeyOraclesList[3])))
307309 then price4
308310 else 0, if (sigVerify_8Kb(formattingPriceMsg(price5), sign5, fromBase58String(pubKeyOraclesList[4])))
309311 then price5
310312 else 0]
311313 let zeroPriceCount = if ((prices[0] == 0))
312314 then 1
313315 else (0 + (if ((prices[1] == 0))
314316 then 1
315317 else (0 + (if ((prices[2] == 0))
316318 then 1
317319 else (0 + (if ((prices[3] == 0))
318320 then 1
319321 else (0 + (if ((prices[4] == 0))
320322 then 1
321323 else 0))))))))
322324 if ((zeroPriceCount >= 3))
323325 then throw("3 prices or more are equals to 0")
324326 else {
325327 let pricesInRange = findPricesInRange(prices)
326328 let priceProvidingCount = size(pricesInRange)
327329 if ((3 > priceProvidingCount))
328330 then throw(((((((((((((((((((((("Could not finalize price because of big variation: height=" + toString(height)) + "
329331 ") + pubKeyOraclesList[0]) + "=") + toString(prices[0])) + "
330332 ") + pubKeyOraclesList[1]) + "=") + toString(prices[1])) + "
331333 ") + pubKeyOraclesList[2]) + "=") + toString(prices[2])) + "
332334 ") + pubKeyOraclesList[3]) + "=") + toString(prices[3])) + "
333335 ") + pubKeyOraclesList[4]) + "=") + toString(prices[4])))
334336 else {
335337 let sum1 = ((prices[pricesInRange[0]] + prices[pricesInRange[1]]) + prices[pricesInRange[2]])
336338 let sum2 = if ((priceProvidingCount >= 4))
337339 then (sum1 + prices[pricesInRange[3]])
338340 else sum1
339341 let priceSum = if ((priceProvidingCount >= 5))
340342 then (sum2 + prices[pricesInRange[4]])
341343 else sum2
342344 if ((priceProvidingCount >= 6))
343345 then throw("Invalid pricesInRange creation")
344346 else {
345347 let newPrice = (priceSum / priceProvidingCount)
346348 let newWxPrice = valueOrElse(getInteger("wx_stub_price"), 81109)
347349 let wxAssetId = "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"
348350 let newViresPrice = valueOrElse(getInteger("vires_stub_price"), 1330432)
349351 let viresAssetId = "9RE43pPoy64Hy9BmC9xM9DG1hKqnAMAqNRnbAniqZ1Pf"
352+ let newWindPrice = valueOrElse(getInteger("wind_stub_price"), 6177700)
353+ let windAssetId = "DJ5sGMbBFSNA8yTHPTfMP9QDDHFp6CFToV2poteZm7X3"
350354 if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
351355 then true
352356 else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
353357 then {
354358 let reason = "automatic emergency shutdown because of large price variability"
355359 [BooleanEntry("is_blocked", true), StringEntry("is_blocked_caller", toString(this)), StringEntry("is_blocked_reason", reason), IntegerEntry((("black_swarm_price" + "_") + toString(height)), newPrice)]
356360 }
357361 else {
358362 let newPriceIndex = (priceIndex + 1)
359- ((([IntegerEntry("price", newPrice), IntegerEntry(("price_" + toString(height)), newPrice), IntegerEntry(("price_index_" + toString(newPriceIndex)), height), IntegerEntry("price_index", newPriceIndex), IntegerEntry(("indexByHeight_" + toString(height)), newPriceIndex), IntegerEntry(("priceByIndex_" + toString(newPriceIndex)), newPrice), IntegerEntry(("deficit_" + toString(height)), deficit), IntegerEntry(("neutrinoSupply_" + toString(height)), neutrinoSupply), IntegerEntry(("deficit_percent_" + toString(height)), if ((neutrinoSupply != 0))
363+ (((([IntegerEntry("price", newPrice), IntegerEntry(("price_" + toString(height)), newPrice), IntegerEntry(("price_index_" + toString(newPriceIndex)), height), IntegerEntry("price_index", newPriceIndex), IntegerEntry(("indexByHeight_" + toString(height)), newPriceIndex), IntegerEntry(("priceByIndex_" + toString(newPriceIndex)), newPrice), IntegerEntry(("deficit_" + toString(height)), deficit), IntegerEntry(("neutrinoSupply_" + toString(height)), neutrinoSupply), IntegerEntry(("deficit_percent_" + toString(height)), if ((neutrinoSupply != 0))
360364 then ((deficit * 100) / neutrinoSupply)
361- else 0)] ++ PriceEntry(newPrice, "WAVES", newPriceIndex)) ++ PriceEntry(newWxPrice, wxAssetId, newPriceIndex)) ++ PriceEntry(newViresPrice, viresAssetId, newPriceIndex))
365+ else 0)] ++ PriceEntry(newPrice, "WAVES", newPriceIndex)) ++ PriceEntry(newWxPrice, wxAssetId, newPriceIndex)) ++ PriceEntry(newViresPrice, viresAssetId, newPriceIndex)) ++ PriceEntry(newWindPrice, windAssetId, newPriceIndex))
362366 }
363367 }
364368 }
365369 }
366370 }
367-
368-
369-
370-@Callable(i)
371-func validatePrice (averagingPeriodMs,toleranceX6,assetIdStr) = $Tuple2(nil, true)
372371
373372
374373 @Verifier(tx)
375374 func verify () = {
376375 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
377376 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
378377 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
379378 then 1
380379 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
381380 then 1
382381 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
383382 then 1
384383 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
385384 then 2
386385 else 0))
387386 (count >= 3)
388387 }
389388

github/deemru/w8io/026f985 
51.13 ms