tx · 26b5Lqbdpmv6r6baxiBU3ggZVJmdXGi5PD2jCYv9Eai1

3MutYfyx2JygTLsEPhjBfX72NsLLfFCvora:  -0.01000000 Waves

2020.01.20 15:40 [862553] smart account 3MutYfyx2JygTLsEPhjBfX72NsLLfFCvora > SELF 0.00000000 Waves

{ "type": 13, "id": "26b5Lqbdpmv6r6baxiBU3ggZVJmdXGi5PD2jCYv9Eai1", "fee": 1000000, "feeAssetId": null, "timestamp": 1579524095423, "version": 1, "sender": "3MutYfyx2JygTLsEPhjBfX72NsLLfFCvora", "senderPublicKey": "CJDX3zridYUtKMewYC6YyPXwF8UW1fqYkatYQ91eP81k", "proofs": [ "3TRW467Qi9uWd8p3xqWZy9J5eMiTwBfehtr1xStaYhEYEfJKTRTUYaq8Ys3q2eUPbDfprbPGhnqyfQjBPW3agMME" ], "script": "base64:AAIDAAAAAAAAABMIARIAEgASBAoCCAESABIDCgEIAAAASwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAA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bUhNZWpabTNXcWVMejZTZHltM2dMRkd0Sm40S1R3eVU1eAkABEwAAAACAgAAACwzV2gyTGFXY2I1Z2c3SzJwUGNXM0VwNkVBdVJCellrQWdyZHB0NDNqVERGYQkABEwAAAACAgAAACw1V1JYRlNqd2NUYk5mS2NKczhacVhtU1NXWXNTVkpVdE12TXFaajVoSDROYwUAAAADbmlsBAAAAAVjb3VudAkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAA5es1no=", "chainId": 84, "height": 862553, "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(addressFromStringValue(address), key) {
29+ case a: Int =>
30+ a
31+ case _ =>
32+ 0
33+}
34+
35+
36+func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) {
37+ case a: String =>
38+ a
39+ case _ =>
40+ ""
41+}
42+
43+
44+func getBoolByAddressAndKey (address,key) = match getBoolean(addressFromStringValue(address), key) {
45+ case a: Boolean =>
46+ a
47+ case _ =>
48+ false
49+}
50+
51+
52+let SENDTXEXPIRE = 30
53+
54+let LISTSPLITSYMBOL = "_"
55+
56+let LISTDATASYMBOL = "+"
57+
58+let WAVELET = 100000000
59+
60+let PAULI = 1000000
61+
62+let DEFICITOFFSET = 5
63+
64+let NeutrinoAssetIdKey = "neutrino_asset_id"
65+
66+let BondAssetIdKey = "bond_asset_id"
67+
68+let AuctionContractKey = "auction_contract"
69+
70+let LiquidationContractKey = "liquidation_contract"
71+
72+let RPDContractKey = "rpd_contract"
73+
74+let ContolContractKey = "control_contract"
75+
76+let BalanceWavesLockIntervalKey = "balance_waves_lock_interval"
77+
78+let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval"
79+
80+let MinWavesSwapAmountKey = "min_waves_swap_amount"
81+
82+let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
83+
84+let NodeOracleProviderPubKeyKey = "node_oracle_provider"
85+
86+let RPDBalanceKey = "rpd_balance"
87+
88+func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId))
89+
90+
91+let PriceKey = "price"
92+
93+let PriceIndexKey = "price_index"
94+
95+let IsBlockedKey = "is_blocked"
96+
97+func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
98+
99+
100+func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
101+
102+
103+let BalanceLockedkKey = "balance_lock_"
104+
105+let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
106+
107+let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
108+
109+func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count))
110+
111+
112+func getCancelLeaseTxReserveFeeKey (hash) = (("cancel_lease_tx_reserve_fee" + "_") + hash)
113+
114+
115+func getWavesLockedBalanceKey (owner) = ((WavesLockedBalanceKey + "_") + owner)
116+
117+
118+func getNeutrinoLockedBalanceKey (owner) = ((NeutrinoLockedBalanceKey + "_") + owner)
119+
120+
121+func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner)
122+
123+
124+func getRPDProfitKey (count) = (("rpd_profit" + "_") + toString(count))
125+
126+
127+func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, 100, price), WAVELET, PAULI)
128+
129+
130+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), PAULI, WAVELET)
131+
132+
133+func convertNeutrinoToBond (amount) = (amount / PAULI)
134+
135+
136+func convertBondToNeutrino (amount) = (amount * PAULI)
137+
138+
139+func convertWavesToBond (amount,price) = convertNeutrinoToBond(convertWavesToNeutrino(amount, price))
140+
141+
142+func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
143+
144+
145+let neutrinoLockedBalance = getNumberByKey(NeutrinoLockedBalanceKey)
146+
147+let wavesLockedBalance = getNumberByKey(WavesLockedBalanceKey)
148+
149+let liquidationContract = getStringByKey(LiquidationContractKey)
150+
151+let neutrinoAssetIdString = getStringByKey(NeutrinoAssetIdKey)
152+
153+let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
154+
155+let auctionContract = getStringByKey(AuctionContractKey)
156+
157+let rpdContract = getStringByKey(RPDContractKey)
158+
159+let controlContract = getStringByKey(ContolContractKey)
160+
161+let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
162+
163+let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey)
164+
165+let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey)
166+
167+let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey))
168+
169+let balanceWavesLockInterval = getNumberByKey(BalanceWavesLockIntervalKey)
170+
171+let balanceNeutrinoLockInterval = getNumberByKey(BalanceNeutrinoLockIntervalKey)
172+
173+let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey)
174+
175+let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey)
176+
177+let reserve = (wavesBalance(this) - wavesLockedBalance)
178+
179+let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
180+
181+let bondSupply = (extract(assetInfo(bondAssetId)).quantity - assetBalance(this, bondAssetId))
182+
183+let neutrinoSupply = (((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(this, neutrinoAssetId)) + neutrinoLockedBalance) - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
184+
185+let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
186+
187+let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice))
188+
189+func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId))
190+
191+
192+func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
193+
194+
195+func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index))
196+
197+
198+func getCancelLeaseTxReserveFee (hash) = getNumberByKey(getCancelLeaseTxReserveFeeKey(hash))
199+
200+
201+func getWavesLockedBalance (owner) = getNumberByKey(getWavesLockedBalanceKey(owner))
202+
203+
204+func getNeutrinoLockedBalance (owner) = getNumberByKey(getNeutrinoLockedBalanceKey(owner))
205+
206+
207+func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner))
208+
209+
210+func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count))
211+
212+
213+@Callable(i)
214+func swapWavesToNeutrino () = {
215+ let pmt = extract(i.payment)
216+ let account = toString(i.caller)
217+ if ((minWavesSwapAmount > pmt.amount))
218+ then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets."))
219+ else if (isDefined(pmt.assetId))
220+ then throw("Only Waves token is allowed for swapping.")
221+ else if (isBlocked)
222+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
223+ else if ((getUnlockBalanceBlock(account) > height))
224+ then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks"))
225+ else if (if ((getNeutrinoLockedBalance(account) != 0))
226+ then true
227+ else (getWavesLockedBalance(account) != 0))
228+ then throw("please withdraw locked funds first")
229+ else WriteSet([DataEntry(getWavesLockedBalanceKey(account), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceWavesLockInterval)), DataEntry(WavesLockedBalanceKey, (wavesLockedBalance + pmt.amount))])
230+ }
231+
232+
233+
234+@Callable(i)
235+func swapNeutrinoToWaves () = {
236+ let pmt = extract(i.payment)
237+ let account = toString(i.caller)
238+ if ((minNeutrinoSwapAmount > pmt.amount))
239+ then throw((("The specified Neutrino amount is less than the required minimum of " + toString(minNeutrinoSwapAmount)) + " Neutrino cents."))
240+ else if (isBlocked)
241+ then throw("The contract is blocked by EMERGENCY SHUTDOWN. Please wait for reactivation by emergency oracles.")
242+ else if ((pmt.assetId != neutrinoAssetId))
243+ then throw("Only appropriate Neutrino tokens are allowed for swapping.")
244+ else if ((getUnlockBalanceBlock(account) > height))
245+ then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks"))
246+ else if (if ((getNeutrinoLockedBalance(account) != 0))
247+ then true
248+ else (getWavesLockedBalance(account) != 0))
249+ then throw("please withdraw locked funds first")
250+ else WriteSet([DataEntry(getNeutrinoLockedBalanceKey(account), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceNeutrinoLockInterval)), DataEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance + pmt.amount))])
251+ }
252+
253+
254+
255+@Callable(i)
256+func withdraw (account,index) = {
257+ let unlockHeight = getUnlockBalanceBlock(account)
258+ let userWavesLockedBalance = getWavesLockedBalance(account)
259+ let userNeutrinoLockedBalance = getNeutrinoLockedBalance(account)
260+ let indexHeight = getHeightPriceByIndex(index)
261+ let prevIndexHeight = getHeightPriceByIndex((index - 1))
262+ let priceByIndex = getPriceHistory(indexHeight)
263+ let neutrinoAmount = convertWavesToNeutrino(userWavesLockedBalance, priceByIndex)
264+ let wavesAmount = convertNeutrinoToWaves(userNeutrinoLockedBalance, priceByIndex)
265+ if (isBlocked)
266+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
267+ else if ((unlockHeight > height))
268+ then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw WAVES funds"))
269+ else if (if (if ((index > priceIndex))
270+ then true
271+ else (unlockHeight > indexHeight))
272+ then true
273+ else if ((prevIndexHeight != 0))
274+ then (prevIndexHeight >= unlockHeight)
275+ else false)
276+ then throw("invalid price history index")
277+ else if (if ((0 >= neutrinoAmount))
278+ then (0 >= wavesAmount)
279+ else false)
280+ then throw("balance equals zero")
281+ else ScriptResult(WriteSet([DataEntry(getWavesLockedBalanceKey(account), 0), DataEntry(getNeutrinoLockedBalanceKey(account), 0), DataEntry(WavesLockedBalanceKey, (wavesLockedBalance - userWavesLockedBalance)), DataEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance - userNeutrinoLockedBalance))]), TransferSet([ScriptTransfer(addressFromStringValue(account), wavesAmount, unit), ScriptTransfer(addressFromStringValue(account), neutrinoAmount, neutrinoAssetId)]))
282+ }
283+
284+
285+
286+@Callable(i)
287+func transferToAuction () = {
288+ let deficitBondAmount = (convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
289+ let surplusBond = convertNeutrinoToBond(surplus)
290+ let minDeficit = ((convertNeutrinoToBond(neutrinoSupply) * DEFICITOFFSET) / 100)
291+ if (isBlocked)
292+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
293+ else if (if ((deficitBondAmount >= minDeficit))
294+ then (deficitBondAmount > 0)
295+ else false)
296+ then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), deficitBondAmount, bondAssetId)])
297+ else if ((surplusBond > 0))
298+ then TransferSet([ScriptTransfer(addressFromStringValue(liquidationContract), convertBondToNeutrino(surplusBond), neutrinoAssetId)])
299+ else throw(((((((("bond were generated or do not need it. Deficit:" + toString(deficitBondAmount)) + "|") + toString(minDeficit)) + ". Surplus:") + toString(surplusBond)) + "|") + toString(surplus)))
300+ }
301+
302+
303+
304+@Callable(i)
305+func transfer (account) = {
306+ let pmt = extract(i.payment)
307+ TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, pmt.assetId)])
308+ }
309+
310+
311+@Verifier(tx)
312+func verify () = {
313+ let id = toBase58String(tx.id)
314+ match tx {
315+ case leasingTx: LeaseCancelTransaction|LeaseTransaction =>
316+ sigVerify(tx.bodyBytes, tx.proofs[0], nodeOracleProviderPubKey)
317+ case _ =>
318+ let pubKeyAdminsList = ["BLEoguzPVKVTfXxxT3W7Rqf8aUm2ggC9Vemd2MQawM2G", "FWVffYr2ALmHMejZm3WqeLz6Sdym3gLFGtJn4KTwyU5x", "3Wh2LaWcb5gg7K2pPcW3Ep6EAuRBzYkAgrdpt43jTDFa", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
319+ let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
320+ then 1
321+ else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
322+ then 1
323+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
324+ then 1
325+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
326+ then 2
327+ else 0))
328+ (count >= 3)
329+ }
330+ }
331+

github/deemru/w8io/026f985 
25.23 ms