tx · oLGVt6pb2pBjhivDQ7Yuoo7KX86HE9y6fSGVYNjv9RG

3MzpqUDAkmPQNhDvTfe8oxDHLfhn6zCJMVV:  -0.01400000 Waves

2020.03.27 23:04 [928295] smart account 3MzpqUDAkmPQNhDvTfe8oxDHLfhn6zCJMVV > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
29.55 ms