tx · 58WAMj2f6x9KH3G2YpFkzmBBSzkRX3ciBz66VBz5eiJU

3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F:  -0.01400000 Waves

2019.11.18 17:58 [770716] smart account 3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F > SELF 0.00000000 Waves

{ "type": 13, "id": "58WAMj2f6x9KH3G2YpFkzmBBSzkRX3ciBz66VBz5eiJU", "fee": 1400000, "feeAssetId": null, "timestamp": 1574089106343, "version": 1, "sender": "3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F", "senderPublicKey": "3z5txV1G5GKezwMRCHZDkLThqb1Yggepxvi2wq6iP6oz", "proofs": [ "5Z3P6ks1vWDJi9TS1AZ3KxAsbGZJz2MR1GPHZrh5e5Vprc4KnMZRezcrDxw3kdUdpVv7aktGXkQ7krCdhCXVPAmb" ], "script": "base64:AAIDAAAAAAAAACwIARIAEgASBQoDCAEIEgASAwoBCBIAEgYKBAgBAQgSAwoBCBIHCgUICAEBCAAAAGIBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBwEAAAAYZ2V0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UAAAACaWQFAAAAA05FVwcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFkxlYXNlQ2FuY2VsVHJhbnNhY3Rpb24EAAAACXVubGVhc2VUeAUAAAAHJG1hdGNoMAQAAAAHbGVhc2VJZAkAAlgAAAABCAUAAAAJdW5sZWFzZVR4AAAAB2xlYXNlSWQDAwMJAABmAAAAAgUAAAAGaGVpZ2h0BQAAABJsZWFzaW5nRXhwaXJlQmxvY2sGBQAAAAtpc1JlYmFsYW5jZQkAAAAAAAACCAUAAAAJdW5sZWFzZVR4AAAAA2ZlZQkBAAAAGmdldENhbmNlbExlYXNlVHhSZXNlcnZlRmVlAAAAAQUAAAAHbGVhc2VJZAcJAAAAAAAAAgkBAAAAEGdldExlYXNlVHhTdGF0dXMAAAABBQAAAAdsZWFzZUlkBQAAAANORVcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRYTJkg=", "chainId": 84, "height": 770716, "spentComplexity": 0 } View: original | compacted Prev: 3WumQczKo5CDMk4ysHafZzPMo3hiRhhfCteKFe9XS1xr Next: 7pz4Zto5oFkVMu55VJizdhvUkBeES52L4uweQcsfmPo8 Diff:
OldNewDifferences
103103
104104 func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId))
105105
106-
107-let TotalOrderbookKey = "total_orderbook"
108-
109-let TotalLiquidationOrderbookKey = "total_liquidation_orderbook"
110106
111107 let PriceKey = "price"
112108
237233 func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId))
238234
239235
240-let totalLiquidationOrderbook = getNumberByAddressAndKey(auctionContract, TotalLiquidationOrderbookKey)
241-
242-let totalOrderbook = getNumberByAddressAndKey(auctionContract, TotalOrderbookKey)
243-
244236 func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
245237
246238
347339
348340 @Callable(i)
349341 func transferToAuction () = {
350- let deficitBondAmount = ((convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) - totalLiquidationOrderbook)
351- let surplusBond = ((convertNeutrinoToBond(surplus) - assetBalance(addressFromStringValue(auctionContract), neutrinoAssetId)) - totalOrderbook)
342+ let deficitBondAmount = (convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
343+ let surplusBond = (convertNeutrinoToBond(surplus) - assetBalance(addressFromStringValue(auctionContract), neutrinoAssetId))
352344 if (isBlocked)
353345 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
354- else if ((deficitBondAmount >= ((neutrinoSupply * DEFICITOFFSET) / 100)))
346+ else if ((deficitBondAmount >= ((convertNeutrinoToBond(neutrinoSupply) * DEFICITOFFSET) / 100)))
355347 then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), deficitBondAmount, bondAssetId)])
356348 else if ((surplusBond > 0))
357349 then TransferSet([ScriptTransfer(addressFromStringValue(liquidationContract), convertBondToNeutrino(surplusBond), neutrinoAssetId)])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = match getInteger(this, key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getStringByKey (key) = match getString(this, key) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func getBoolByKey (key) = match getBoolean(this, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
2929 case a: Int =>
3030 a
3131 case _ =>
3232 0
3333 }
3434
3535
3636 func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) {
3737 case a: String =>
3838 a
3939 case _ =>
4040 ""
4141 }
4242
4343
4444 func getBoolByAddressAndKey (address,key) = match getBoolean(addressFromStringValue(address), key) {
4545 case a: Boolean =>
4646 a
4747 case _ =>
4848 false
4949 }
5050
5151
5252 let SENDTXEXPIRE = 30
5353
5454 let LISTSPLITSYMBOL = "_"
5555
5656 let LISTDATASYMBOL = "+"
5757
5858 let WAVELET = 100000000
5959
6060 let PAULI = 100
6161
6262 let CRYTICALSHARE = 20
6363
6464 let LEASINGSHARE = 90
6565
6666 let LEASINTXCOUNT = 10
6767
6868 let DEFICITOFFSET = 10
6969
7070 let WAVESASSETID = "waves"
7171
7272 let CANCELED = "canceled"
7373
7474 let NEW = "new"
7575
7676 let NeutrinoAssetIdKey = "neutrino_asset_id"
7777
7878 let BondAssetIdKey = "bond_asset_id"
7979
8080 let ReserveContractKey = "reserve_contract"
8181
8282 let AuctionContractKey = "auction_contract"
8383
8484 let LiquidationContractKey = "liquidation_contract"
8585
8686 let RPDContractKey = "rpd_contract"
8787
8888 let ContolContractKey = "control_contract"
8989
9090 let BalanceLockIntervalKey = "balance_lock_interval"
9191
9292 let MinWavesSwapAmountKey = "min_waves_swap_amount"
9393
9494 let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
9595
9696 let NodeAddressKey = "node_address"
9797
9898 let NodeOracleProviderKey = "oracle_node_provider"
9999
100100 let LeasingIntervalKey = "leasing_interval"
101101
102102 let RPDBalanceKey = "rpd_balance"
103103
104104 func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId))
105105
106-
107-let TotalOrderbookKey = "total_orderbook"
108-
109-let TotalLiquidationOrderbookKey = "total_liquidation_orderbook"
110106
111107 let PriceKey = "price"
112108
113109 let PriceIndexKey = "price_index"
114110
115111 let IsBlockedKey = "is_blocked"
116112
117113 let LeasingExpireBlockKey = "leasing_expire_block"
118114
119115 let IsRebalanceKey = "is_rebalance"
120116
121117 let LeasingTxCountKey = "leasing_index"
122118
123119 let LeasingAmountKey = "leasing_amount"
124120
125121 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
126122
127123
128124 func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
129125
130126
131127 let RPDSyncIndexKey = "rpd_sync_index"
132128
133129 func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count))
134130
135131
136132 func getCancelLeaseTxReserveFeeKey (hash) = (("cancel_lease_tx_reserve_fee" + "_") + hash)
137133
138134
139135 func getAccountLockedBalanceKey (owner,assetId) = ((("balance_" + assetId) + "_") + owner)
140136
141137
142138 func getBalanceUnlockBlockKey (owner) = ("balance_block_" + owner)
143139
144140
145141 func getRPDProfitKey (count) = (("rpd_profit" + "_") + toString(count))
146142
147143
148144 func getLockedBalanceKey (assetId) = ("balance_" + assetId)
149145
150146
151147 func getLeaseTxStatusKey (hash) = (("lease_tx_status" + "_") + hash)
152148
153149
154150 func getLeaseTxAmountByHashKey (hash) = ((LeasingAmountKey + "_") + hash)
155151
156152
157153 func getLeaseTxBytesByHashKey (hash) = (("lease_tx" + "_") + hash)
158154
159155
160156 func getLeaseTxExpireSendBlockKey (hash) = (("leasing_expire_send" + "_") + hash)
161157
162158
163159 func convertNeutrinoToWaves (amount,price) = ((((amount * 100) / price) * WAVELET) / PAULI)
164160
165161
166162 func convertWavesToNeutrino (amount,price) = ((((amount * price) / 100) * PAULI) / WAVELET)
167163
168164
169165 func convertNeutrinoToBond (amount) = (amount / PAULI)
170166
171167
172168 func convertBondToNeutrino (amount) = (amount * PAULI)
173169
174170
175171 func convertWavesToBond (amount,price) = convertNeutrinoToBond(convertWavesToNeutrino(amount, price))
176172
177173
178174 func getLockedBalance (assetId) = getNumberByKey(getLockedBalanceKey(assetId))
179175
180176
181177 let liquidationContract = getStringByKey(LiquidationContractKey)
182178
183179 let neutrinoAssetIdString = getStringByKey(NeutrinoAssetIdKey)
184180
185181 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
186182
187183 let reserveContract = getStringByKey(ReserveContractKey)
188184
189185 let auctionContract = getStringByKey(AuctionContractKey)
190186
191187 let rpdContract = getStringByKey(RPDContractKey)
192188
193189 let controlContract = getStringByKey(ContolContractKey)
194190
195191 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
196192
197193 let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey)
198194
199195 let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey)
200196
201197 let leasingTxCount = getNumberByKey(LeasingTxCountKey)
202198
203199 let isRebalance = getBoolByKey(IsRebalanceKey)
204200
205201 let leasingInterval = getNumberByKey(LeasingIntervalKey)
206202
207203 let leasingExpireBlock = getNumberByKey(LeasingExpireBlockKey)
208204
209205 let leasingAmount = getNumberByKey(LeasingAmountKey)
210206
211207 let nodeAddress = getStringByKey(NodeAddressKey)
212208
213209 let nodeOracleProviderKey = getStringByKey(NodeOracleProviderKey)
214210
215211 let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey)
216212
217213 let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey)
218214
219215 let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey)
220216
221217 let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey)
222218
223219 let reserve = (wavesBalance(this) - getLockedBalance(WAVESASSETID))
224220
225221 let reserveWithoutLeasing = (reserve - leasingAmount)
226222
227223 let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
228224
229225 let bondSupply = (extract(assetInfo(bondAssetId)).quantity - assetBalance(this, bondAssetId))
230226
231227 let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(this, neutrinoAssetId)) + getLockedBalance(neutrinoAssetIdString))
232228
233229 let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
234230
235231 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice))
236232
237233 func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId))
238234
239235
240-let totalLiquidationOrderbook = getNumberByAddressAndKey(auctionContract, TotalLiquidationOrderbookKey)
241-
242-let totalOrderbook = getNumberByAddressAndKey(auctionContract, TotalOrderbookKey)
243-
244236 func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
245237
246238
247239 func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index))
248240
249241
250242 func getCancelLeaseTxReserveFee (hash) = getNumberByKey(getCancelLeaseTxReserveFeeKey(hash))
251243
252244
253245 func getAccountLockedBalance (owner,assetId) = getNumberByKey(getAccountLockedBalanceKey(owner, assetId))
254246
255247
256248 func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner))
257249
258250
259251 func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count))
260252
261253
262254 func getLeaseTxStatus (hash) = getStringByKey(getLeaseTxStatusKey(hash))
263255
264256
265257 func getLeaseTxAmountByHash (hash) = getNumberByKey(getLeaseTxAmountByHashKey(hash))
266258
267259
268260 func getLeaseTxBytesByHash (hash) = getStringByKey(getLeaseTxBytesByHashKey(hash))
269261
270262
271263 func getLeaseTxExpireSendBlock (hash) = getNumberByKey(getLeaseTxExpireSendBlockKey(hash))
272264
273265
274266 @Callable(i)
275267 func swapWavesToNeutrino () = {
276268 let pmt = extract(i.payment)
277269 let account = toString(i.caller)
278270 if ((minWavesSwapAmount > pmt.amount))
279271 then throw((("an amount is less than min available amount: " + toString(minWavesSwapAmount)) + " wavelets"))
280272 else if (isDefined(pmt.assetId))
281273 then throw("can use waves only")
282274 else if (isBlocked)
283275 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
284276 else if ((getUnlockBalanceBlock(account) > height))
285277 then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks"))
286278 else if ((getAccountLockedBalance(account, WAVESASSETID) != 0))
287279 then throw("please withdraw locked funds first")
288280 else WriteSet([DataEntry(getAccountLockedBalanceKey(account, WAVESASSETID), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(getLockedBalanceKey(WAVESASSETID), (getLockedBalance(WAVESASSETID) + pmt.amount))])
289281 }
290282
291283
292284
293285 @Callable(i)
294286 func swapNeutrinoToWaves () = {
295287 let pmt = extract(i.payment)
296288 let account = toString(i.caller)
297289 if ((minNeutrinoSwapAmount > pmt.amount))
298290 then throw((("an amount is less than min available amount: " + toString(minNeutrinoSwapAmount)) + " neutrino cents"))
299291 else if (isBlocked)
300292 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
301293 else if ((pmt.assetId != neutrinoAssetId))
302294 then throw("can use appropriate neutrino tokens only")
303295 else if ((getUnlockBalanceBlock(account) > height))
304296 then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks"))
305297 else if ((getAccountLockedBalance(account, neutrinoAssetIdString) != 0))
306298 then throw("please withdraw locked funds first")
307299 else {
308300 let newLockedBalance = (getLockedBalance(neutrinoAssetIdString) + pmt.amount)
309301 WriteSet([DataEntry(getAccountLockedBalanceKey(account, neutrinoAssetIdString), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(getLockedBalanceKey(neutrinoAssetIdString), newLockedBalance), DataEntry(IsRebalanceKey, if ((reserveWithoutLeasing >= convertNeutrinoToWaves(newLockedBalance, currentPrice)))
310302 then false
311303 else true)])
312304 }
313305 }
314306
315307
316308
317309 @Callable(i)
318310 func withdraw (account,index,lockedAssetId) = {
319311 let unlockHeight = getUnlockBalanceBlock(account)
320312 let lockedBalance = getAccountLockedBalance(account, lockedAssetId)
321313 let indexHeight = getHeightPriceByIndex(index)
322314 let nextIndexHeight = getHeightPriceByIndex((index + 1))
323315 let priceByIndex = getPriceHistory(indexHeight)
324316 let amount = if ((lockedAssetId == neutrinoAssetIdString))
325317 then convertNeutrinoToWaves(lockedBalance, priceByIndex)
326318 else convertWavesToNeutrino(lockedBalance, priceByIndex)
327319 if (isBlocked)
328320 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
329321 else if ((0 >= amount))
330322 then throw((("balance equals zero (" + lockedAssetId) + ")"))
331323 else if ((unlockHeight > height))
332324 then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw WAVES funds"))
333325 else if (if (if ((index > priceIndex))
334326 then true
335327 else (indexHeight > unlockHeight))
336328 then true
337329 else if ((nextIndexHeight != 0))
338330 then (unlockHeight >= nextIndexHeight)
339331 else false)
340332 then throw("invalid price history index")
341333 else ScriptResult(WriteSet([DataEntry(getAccountLockedBalanceKey(account, lockedAssetId), 0), DataEntry(getLockedBalanceKey(lockedAssetId), (getLockedBalance(lockedAssetId) - lockedBalance))]), TransferSet([ScriptTransfer(addressFromStringValue(account), amount, if ((lockedAssetId == neutrinoAssetIdString))
342334 then unit
343335 else neutrinoAssetId)]))
344336 }
345337
346338
347339
348340 @Callable(i)
349341 func transferToAuction () = {
350- let deficitBondAmount = ((convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) - totalLiquidationOrderbook)
351- let surplusBond = ((convertNeutrinoToBond(surplus) - assetBalance(addressFromStringValue(auctionContract), neutrinoAssetId)) - totalOrderbook)
342+ let deficitBondAmount = (convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
343+ let surplusBond = (convertNeutrinoToBond(surplus) - assetBalance(addressFromStringValue(auctionContract), neutrinoAssetId))
352344 if (isBlocked)
353345 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
354- else if ((deficitBondAmount >= ((neutrinoSupply * DEFICITOFFSET) / 100)))
346+ else if ((deficitBondAmount >= ((convertNeutrinoToBond(neutrinoSupply) * DEFICITOFFSET) / 100)))
355347 then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), deficitBondAmount, bondAssetId)])
356348 else if ((surplusBond > 0))
357349 then TransferSet([ScriptTransfer(addressFromStringValue(liquidationContract), convertBondToNeutrino(surplusBond), neutrinoAssetId)])
358350 else throw("bond were generated or do not need it")
359351 }
360352
361353
362354
363355 @Callable(i)
364356 func transfer (account) = {
365357 let pmt = extract(i.payment)
366358 TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, pmt.assetId)])
367359 }
368360
369361
370362
371363 @Callable(i)
372364 func nodeReward () = {
373365 let pmt = value(i.payment)
374366 if ((i.caller != addressFromStringValue(nodeAddress)))
375367 then throw("only node account is able to transfer staking rewards from main account")
376368 else if (isDefined(pmt.assetId))
377369 then throw("waves tokens only allowed")
378370 else {
379371 let amount = convertWavesToNeutrino(pmt.amount, currentPrice)
380372 let newRpdSyncIndex = (rpdSyncIndex + 1)
381373 ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)]))
382374 }
383375 }
384376
385377
386378
387379 @Callable(i)
388380 func registrationLeaseTx (senderPublicKey,fee,timestamp,leaseTxHash) = {
389381 let totalFreeReserve = (((reserve * LEASINGSHARE) / 100) - convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice))
390382 let amount = (totalFreeReserve / LEASINTXCOUNT)
391383 let txBytes = (((((base58'3h1H' + fromBase58String(senderPublicKey)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp))
392384 let txHashBytes = blake2b256(txBytes)
393385 let txHash = toBase58String(txHashBytes)
394386 let pmt = extract(i.payment)
395387 if ((toString(i.caller) == nodeOracleProviderKey))
396388 then throw("invalid caller")
397389 else if (isDefined(pmt.assetId))
398390 then throw("invalid paymtn asset")
399391 else if ((leaseTxHash != txHash))
400392 then throw((("invalid tx hash(amount:" + toString(amount)) + ")"))
401393 else if ((leasingTxCount >= LEASINTXCOUNT))
402394 then throw("the number of leasing transactions is equal to the maximum")
403395 else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey))))
404396 then throw("invalid pubKey")
405397 else if (if ((lastBlock.timestamp > timestamp))
406398 then true
407399 else (timestamp > (lastBlock.timestamp + 5400000)))
408400 then throw((("invalid timestamp(lastBlock: " + toString(lastBlock.timestamp)) + ")"))
409401 else if ((getLeaseTxStatus(txHash) != ""))
410402 then throw("tx is exist")
411403 else if ((pmt.amount != (fee * 2)))
412404 then throw("invalid payment amount")
413405 else if (if ((fee > 1000000))
414406 then true
415407 else (500000 > fee))
416408 then throw("invalid fee")
417409 else if (((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing))
418410 then throw((("invalid amount(result:" + toString(((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing))) + ")"))
419411 else WriteSet([DataEntry(getCancelLeaseTxReserveFeeKey(txHash), fee), DataEntry(LeasingTxCountKey, if ((getLeaseTxStatus(txHash) == ""))
420412 then (leasingTxCount + 1)
421413 else leasingTxCount), DataEntry(LeasingAmountKey, (leasingAmount + amount)), DataEntry(LeasingExpireBlockKey, if ((height > leasingExpireBlock))
422414 then (height + leasingInterval)
423415 else leasingExpireBlock), DataEntry(getLeaseTxStatusKey(txHash), NEW), DataEntry(getLeaseTxExpireSendBlockKey(txHash), (height + SENDTXEXPIRE)), DataEntry(getLeaseTxAmountByHashKey(txHash), amount), DataEntry(getLeaseTxBytesByHashKey(txHash), toBase64String(txBytes))])
424416 }
425417
426418
427419
428420 @Callable(i)
429421 func cancelStuckLeaseTx (txHash) = if (if (if ((getLeaseTxStatus(txHash) == NEW))
430422 then !(isDefined(transactionHeightById(fromBase58String(txHash))))
431423 else false)
432424 then (height > getLeaseTxExpireSendBlock(txHash))
433425 else false)
434426 then {
435427 let amount = getLeaseTxAmountByHash(txHash)
436428 WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(txHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice)))
437429 then false
438430 else true)])
439431 }
440432 else throw("invalid tx hash")
441433
442434
443435
444436 @Callable(i)
445437 func registrationUnleaseTx (chainIdString,senderPublicKey,fee,timestamp,leaseTxHash) = {
446438 let txBytes = (((((base58'gm' + toBytes(chainIdString)) + fromBase58String(senderPublicKey)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash))
447439 let txHash = blake2b256(txBytes)
448440 if ((getLeaseTxStatus(leaseTxHash) != NEW))
449441 then throw("invalid tx status")
450442 else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey))))
451443 then throw("invalid pubKey")
452444 else if (!(isDefined(transactionHeightById(txHash))))
453445 then throw("blockchain does not contain this transaction")
454446 else {
455447 let amount = getLeaseTxAmountByHash(leaseTxHash)
456448 WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(leaseTxHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice)))
457449 then false
458450 else true)])
459451 }
460452 }
461453
462454
463455 @Verifier(tx)
464456 func verify () = {
465457 let id = toBase58String(tx.id)
466458 match tx {
467459 case leaseTx: LeaseTransaction =>
468460 if (if ((leasingExpireBlock >= height))
469461 then (getLeaseTxExpireSendBlock(id) >= height)
470462 else false)
471463 then (getLeaseTxStatus(id) == NEW)
472464 else false
473465 case unleaseTx: LeaseCancelTransaction =>
474466 let leaseId = toBase58String(unleaseTx.leaseId)
475467 if (if (if ((height > leasingExpireBlock))
476468 then true
477469 else isRebalance)
478470 then (unleaseTx.fee == getCancelLeaseTxReserveFee(leaseId))
479471 else false)
480472 then (getLeaseTxStatus(leaseId) == NEW)
481473 else false
482474 case _ =>
483475 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
484476 }
485477 }
486478

github/deemru/w8io/026f985 
73.87 ms