tx · BqfApDvCnsC3J3vPvKdmpVhaDYF8s3fr7wqoF24Fq8Bo 3Mxnm4wd25YMdQYKvdQ7NWf2zRoMkPrhLrN: -0.01000000 Waves 2019.11.16 00:01 [766734] smart account 3Mxnm4wd25YMdQYKvdQ7NWf2zRoMkPrhLrN > SELF 0.00000000 Waves
{ "type": 13, "id": "BqfApDvCnsC3J3vPvKdmpVhaDYF8s3fr7wqoF24Fq8Bo", "fee": 1000000, "feeAssetId": null, "timestamp": 1573851679183, "version": 1, "sender": "3Mxnm4wd25YMdQYKvdQ7NWf2zRoMkPrhLrN", "senderPublicKey": "FpjmXEPHMFPsSMkoA7XTMmBU8bnxZFyD1aFSM4Az4fZ1", "proofs": [ "UoGPYZyksqzks4Cs4HX1CwbC2pTRyBLP1qfnkuHkvx5oM3kucWsBUrqm4wuRjnJEuTdKoWZjtoRiEAMErfRmgU7" ], "script": "base64:AAIDAAAAAAAAACwIARIAEgASBQoDCAEIEgASAwoBCBIAEgYKBAgBAQgSAwoBCBIHCgUICAEBCAAAAGYBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBwEA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Complexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
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 = 100 | |
61 | + | ||
62 | + | let CRYTICALSHARE = 20 | |
63 | + | ||
64 | + | let LEASINGSHARE = 90 | |
65 | + | ||
66 | + | let LEASINTXCOUNT = 10 | |
67 | + | ||
68 | + | let DEFICITOFFSET = 10 | |
69 | + | ||
70 | + | let WAVESASSETID = "waves" | |
71 | + | ||
72 | + | let CANCELED = "canceled" | |
73 | + | ||
74 | + | let NEW = "new" | |
75 | + | ||
76 | + | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
77 | + | ||
78 | + | let BondAssetIdKey = "bond_asset_id" | |
79 | + | ||
80 | + | let ReserveContractKey = "reserve_contract" | |
81 | + | ||
82 | + | let AuctionContractKey = "auction_contract" | |
83 | + | ||
84 | + | let LiquidationContractKey = "liquidation_contract" | |
85 | + | ||
86 | + | let RPDContractKey = "rpd_contract" | |
87 | + | ||
88 | + | let ContolContractKey = "control_contract" | |
89 | + | ||
90 | + | let BalanceLockIntervalKey = "balance_lock_interval" | |
91 | + | ||
92 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
93 | + | ||
94 | + | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
95 | + | ||
96 | + | let NodeAddressKey = "node_address" | |
97 | + | ||
98 | + | let NodeOracleProviderKey = "oracle_node_provider" | |
99 | + | ||
100 | + | let LeasingIntervalKey = "leasing_interval" | |
101 | + | ||
102 | + | let RPDBalanceKey = "rpd_balance" | |
103 | + | ||
104 | + | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
105 | + | ||
106 | + | ||
107 | + | let TotalOrderbookKey = "total_orderbook" | |
108 | + | ||
109 | + | let TotalLiquidationOrderbookKey = "total_liquidation_orderbook" | |
110 | + | ||
111 | + | let PriceKey = "price" | |
112 | + | ||
113 | + | let PriceIndexKey = "price_index" | |
114 | + | ||
115 | + | let IsBlockedKey = "is_blocked" | |
116 | + | ||
117 | + | let LeasingExpireBlockKey = "leasing_expire_block" | |
118 | + | ||
119 | + | let IsRebalanceKey = "is_rebalance" | |
120 | + | ||
121 | + | let LeasingTxCountKey = "leasing_index" | |
122 | + | ||
123 | + | let LeasingAmountKey = "leasing_amount" | |
124 | + | ||
125 | + | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
126 | + | ||
127 | + | ||
128 | + | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
129 | + | ||
130 | + | ||
131 | + | let RPDSyncIndexKey = "rpd_sync_index" | |
132 | + | ||
133 | + | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
134 | + | ||
135 | + | ||
136 | + | func getCancelLeaseTxReserveFeeKey (hash) = (("cancel_lease_tx_reserve_fee" + "_") + hash) | |
137 | + | ||
138 | + | ||
139 | + | func getAccountLockedBalanceKey (owner,assetId) = ((("balance_" + assetId) + "_") + owner) | |
140 | + | ||
141 | + | ||
142 | + | func getBalanceUnlockBlockKey (owner) = ("balance_block_" + owner) | |
143 | + | ||
144 | + | ||
145 | + | func getRPDProfitKey (count) = (("rpd_profit" + "_") + toString(count)) | |
146 | + | ||
147 | + | ||
148 | + | func getLockedBalanceKey (assetId) = ("balance_" + assetId) | |
149 | + | ||
150 | + | ||
151 | + | func getLeaseTxStatusKey (hash) = (("lease_tx_status" + "_") + hash) | |
152 | + | ||
153 | + | ||
154 | + | func getLeaseTxAmountByHashKey (hash) = ((LeasingAmountKey + "_") + hash) | |
155 | + | ||
156 | + | ||
157 | + | func getLeaseTxBytesByHashKey (hash) = (("lease_tx" + "_") + hash) | |
158 | + | ||
159 | + | ||
160 | + | func getLeaseTxExpireSendBlockKey (hash) = (("leasing_expire_send" + "_") + hash) | |
161 | + | ||
162 | + | ||
163 | + | func convertNeutrinoToWaves (amount,price) = ((((amount * 100) / price) * WAVELET) / PAULI) | |
164 | + | ||
165 | + | ||
166 | + | func convertWavesToNeutrino (amount,price) = ((((amount * price) / 100) * PAULI) / WAVELET) | |
167 | + | ||
168 | + | ||
169 | + | func convertNeutrinoToBond (amount) = (amount / PAULI) | |
170 | + | ||
171 | + | ||
172 | + | func convertBondToNeutrino (amount) = (amount * PAULI) | |
173 | + | ||
174 | + | ||
175 | + | func convertWavesToBond (amount,price) = convertNeutrinoToBond(convertWavesToNeutrino(amount, price)) | |
176 | + | ||
177 | + | ||
178 | + | func getLockedBalance (assetId) = getNumberByKey(getLockedBalanceKey(assetId)) | |
179 | + | ||
180 | + | ||
181 | + | let liquidationContract = getStringByKey(LiquidationContractKey) | |
182 | + | ||
183 | + | let neutrinoAssetIdString = getStringByKey(NeutrinoAssetIdKey) | |
184 | + | ||
185 | + | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
186 | + | ||
187 | + | let reserveContract = getStringByKey(ReserveContractKey) | |
188 | + | ||
189 | + | let auctionContract = getStringByKey(AuctionContractKey) | |
190 | + | ||
191 | + | let rpdContract = getStringByKey(RPDContractKey) | |
192 | + | ||
193 | + | let controlContract = getStringByKey(ContolContractKey) | |
194 | + | ||
195 | + | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
196 | + | ||
197 | + | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
198 | + | ||
199 | + | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
200 | + | ||
201 | + | let leasingTxCount = getNumberByKey(LeasingTxCountKey) | |
202 | + | ||
203 | + | let isRebalance = getBoolByKey(IsRebalanceKey) | |
204 | + | ||
205 | + | let leasingInterval = getNumberByKey(LeasingIntervalKey) | |
206 | + | ||
207 | + | let leasingExpireBlock = getNumberByKey(LeasingExpireBlockKey) | |
208 | + | ||
209 | + | let leasingAmount = getNumberByKey(LeasingAmountKey) | |
210 | + | ||
211 | + | let nodeAddress = getStringByKey(NodeAddressKey) | |
212 | + | ||
213 | + | let nodeOracleProviderKey = getStringByKey(NodeOracleProviderKey) | |
214 | + | ||
215 | + | let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey) | |
216 | + | ||
217 | + | let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey) | |
218 | + | ||
219 | + | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
220 | + | ||
221 | + | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
222 | + | ||
223 | + | let reserve = (wavesBalance(this) - getLockedBalance(WAVESASSETID)) | |
224 | + | ||
225 | + | let reserveWithoutLeasing = (reserve - leasingAmount) | |
226 | + | ||
227 | + | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
228 | + | ||
229 | + | let bondSupply = (extract(assetInfo(bondAssetId)).quantity - assetBalance(this, bondAssetId)) | |
230 | + | ||
231 | + | let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(this, neutrinoAssetId)) + getLockedBalance(neutrinoAssetIdString)) | |
232 | + | ||
233 | + | let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply) | |
234 | + | ||
235 | + | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice)) | |
236 | + | ||
237 | + | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
238 | + | ||
239 | + | ||
240 | + | let totalLiquidationOrderbook = getNumberByAddressAndKey(auctionContract, TotalLiquidationOrderbookKey) | |
241 | + | ||
242 | + | let totalOrderbook = getNumberByAddressAndKey(auctionContract, TotalOrderbookKey) | |
243 | + | ||
244 | + | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
245 | + | ||
246 | + | ||
247 | + | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
248 | + | ||
249 | + | ||
250 | + | func getCancelLeaseTxReserveFee (hash) = getNumberByKey(getCancelLeaseTxReserveFeeKey(hash)) | |
251 | + | ||
252 | + | ||
253 | + | func getAccountLockedBalance (owner,assetId) = getNumberByKey(getAccountLockedBalanceKey(owner, assetId)) | |
254 | + | ||
255 | + | ||
256 | + | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
257 | + | ||
258 | + | ||
259 | + | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
260 | + | ||
261 | + | ||
262 | + | func getLeaseTxStatus (hash) = getStringByKey(getLeaseTxStatusKey(hash)) | |
263 | + | ||
264 | + | ||
265 | + | func getLeaseTxAmountByHash (hash) = getNumberByKey(getLeaseTxAmountByHashKey(hash)) | |
266 | + | ||
267 | + | ||
268 | + | func getLeaseTxBytesByHash (hash) = getStringByKey(getLeaseTxBytesByHashKey(hash)) | |
269 | + | ||
270 | + | ||
271 | + | func getLeaseTxExpireSendBlock (hash) = getNumberByKey(getLeaseTxExpireSendBlockKey(hash)) | |
272 | + | ||
273 | + | ||
274 | + | @Callable(i) | |
275 | + | func swapWavesToNeutrino () = { | |
276 | + | let pmt = extract(i.payment) | |
277 | + | let account = toString(i.caller) | |
278 | + | if ((minWavesSwapAmount > pmt.amount)) | |
279 | + | then throw((("an amount is less than min available amount: " + toString(minWavesSwapAmount)) + " wavelets")) | |
280 | + | else if (isDefined(pmt.assetId)) | |
281 | + | then throw("can use waves only") | |
282 | + | else if (isBlocked) | |
283 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
284 | + | else if ((getUnlockBalanceBlock(account) > height)) | |
285 | + | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
286 | + | else if ((getAccountLockedBalance(account, WAVESASSETID) != 0)) | |
287 | + | then throw("please withdraw locked funds first") | |
288 | + | else WriteSet([DataEntry(getAccountLockedBalanceKey(account, WAVESASSETID), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(getLockedBalanceKey(WAVESASSETID), (getLockedBalance(WAVESASSETID) + pmt.amount))]) | |
289 | + | } | |
290 | + | ||
291 | + | ||
292 | + | ||
293 | + | @Callable(i) | |
294 | + | func swapNeutrinoToWaves () = { | |
295 | + | let pmt = extract(i.payment) | |
296 | + | let account = toString(i.caller) | |
297 | + | if ((minNeutrinoSwapAmount > pmt.amount)) | |
298 | + | then throw((("an amount is less than min available amount: " + toString(minNeutrinoSwapAmount)) + " neutrino cents")) | |
299 | + | else if (isBlocked) | |
300 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
301 | + | else if ((pmt.assetId != neutrinoAssetId)) | |
302 | + | then throw("can use appropriate neutrino tokens only") | |
303 | + | else if ((getUnlockBalanceBlock(account) > height)) | |
304 | + | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
305 | + | else if ((getAccountLockedBalance(account, neutrinoAssetIdString) != 0)) | |
306 | + | then throw("please withdraw locked funds first") | |
307 | + | else { | |
308 | + | let newLockedBalance = (getLockedBalance(neutrinoAssetIdString) + pmt.amount) | |
309 | + | WriteSet([DataEntry(getAccountLockedBalanceKey(account, neutrinoAssetIdString), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(getLockedBalanceKey(neutrinoAssetIdString), newLockedBalance), DataEntry(IsRebalanceKey, if ((reserveWithoutLeasing >= convertNeutrinoToWaves(newLockedBalance, currentPrice))) | |
310 | + | then false | |
311 | + | else true)]) | |
312 | + | } | |
313 | + | } | |
314 | + | ||
315 | + | ||
316 | + | ||
317 | + | @Callable(i) | |
318 | + | func withdraw (account,index,lockedAssetId) = { | |
319 | + | let unlockHeight = getUnlockBalanceBlock(account) | |
320 | + | let lockedBalance = getAccountLockedBalance(account, lockedAssetId) | |
321 | + | let indexHeight = getHeightPriceByIndex(index) | |
322 | + | let nextIndexHeight = getHeightPriceByIndex((index + 1)) | |
323 | + | let priceByIndex = getPriceHistory(indexHeight) | |
324 | + | let amount = if ((lockedAssetId == neutrinoAssetIdString)) | |
325 | + | then convertNeutrinoToWaves(lockedBalance, priceByIndex) | |
326 | + | else convertWavesToNeutrino(lockedBalance, priceByIndex) | |
327 | + | if (isBlocked) | |
328 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
329 | + | else if ((0 >= amount)) | |
330 | + | then throw((("balance equals zero (" + lockedAssetId) + ")")) | |
331 | + | else if ((unlockHeight > height)) | |
332 | + | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw WAVES funds")) | |
333 | + | else if (if (if ((index > priceIndex)) | |
334 | + | then true | |
335 | + | else (indexHeight > unlockHeight)) | |
336 | + | then true | |
337 | + | else if ((nextIndexHeight != 0)) | |
338 | + | then (unlockHeight >= nextIndexHeight) | |
339 | + | else false) | |
340 | + | then throw("invalid price history index") | |
341 | + | else ScriptResult(WriteSet([DataEntry(getAccountLockedBalanceKey(account, lockedAssetId), 0), DataEntry(getLockedBalanceKey(lockedAssetId), (getLockedBalance(lockedAssetId) - lockedBalance))]), TransferSet([ScriptTransfer(addressFromStringValue(account), amount, if ((lockedAssetId == neutrinoAssetIdString)) | |
342 | + | then unit | |
343 | + | else neutrinoAssetId)])) | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | ||
348 | + | @Callable(i) | |
349 | + | func transferToAuction () = { | |
350 | + | let deficitBondAmount = ((convertNeutrinoToBond(deficit) - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) - totalLiquidationOrderbook) | |
351 | + | let surplusBond = ((convertNeutrinoToBond(surplus) - assetBalance(addressFromStringValue(auctionContract), neutrinoAssetId)) - totalOrderbook) | |
352 | + | if (isBlocked) | |
353 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
354 | + | else if ((deficitBondAmount >= ((neutrinoSupply * DEFICITOFFSET) / 100))) | |
355 | + | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), deficitBondAmount, bondAssetId)]) | |
356 | + | else if ((surplusBond > 0)) | |
357 | + | then TransferSet([ScriptTransfer(addressFromStringValue(liquidationContract), convertBondToNeutrino(surplusBond), neutrinoAssetId)]) | |
358 | + | else throw("bond were generated or do not need it") | |
359 | + | } | |
360 | + | ||
361 | + | ||
362 | + | ||
363 | + | @Callable(i) | |
364 | + | func transfer (account) = { | |
365 | + | let pmt = extract(i.payment) | |
366 | + | TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, pmt.assetId)]) | |
367 | + | } | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(i) | |
372 | + | func nodeReward () = { | |
373 | + | let pmt = value(i.payment) | |
374 | + | if ((i.caller != addressFromStringValue(nodeAddress))) | |
375 | + | then throw("only node account is able to transfer staking rewards from main account") | |
376 | + | else if (isDefined(pmt.assetId)) | |
377 | + | then throw("waves tokens only allowed") | |
378 | + | else { | |
379 | + | let amount = convertWavesToNeutrino(pmt.amount, currentPrice) | |
380 | + | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
381 | + | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)])) | |
382 | + | } | |
383 | + | } | |
384 | + | ||
385 | + | ||
386 | + | ||
387 | + | @Callable(i) | |
388 | + | func registrationLeaseTx (senderPublicKey,fee,timestamp,leaseTxHash) = { | |
389 | + | let totalFreeReserve = (((reserve * LEASINGSHARE) / 100) - convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice)) | |
390 | + | let amount = (totalFreeReserve / LEASINTXCOUNT) | |
391 | + | let txBytes = (((((base58'3h1H' + fromBase58String(senderPublicKey)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp)) | |
392 | + | let txHashBytes = blake2b256(txBytes) | |
393 | + | let txHash = toBase58String(txHashBytes) | |
394 | + | let pmt = extract(i.payment) | |
395 | + | if ((toString(i.caller) == nodeOracleProviderKey)) | |
396 | + | then throw("invalid caller") | |
397 | + | else if (isDefined(pmt.assetId)) | |
398 | + | then throw("invalid paymtn asset") | |
399 | + | else if ((leaseTxHash != txHash)) | |
400 | + | then throw((("invalid tx hash(amount:" + toString(amount)) + ")")) | |
401 | + | else if ((leasingTxCount >= LEASINTXCOUNT)) | |
402 | + | then throw("the number of leasing transactions is equal to the maximum") | |
403 | + | else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
404 | + | then throw("invalid pubKey") | |
405 | + | else if (if ((lastBlock.timestamp > timestamp)) | |
406 | + | then true | |
407 | + | else (timestamp > (lastBlock.timestamp + 5400000))) | |
408 | + | then throw((("invalid timestamp(lastBlock: " + toString(lastBlock.timestamp)) + ")")) | |
409 | + | else if ((getLeaseTxStatus(txHash) != "")) | |
410 | + | then throw("tx is exist") | |
411 | + | else if ((pmt.amount != (fee * 2))) | |
412 | + | then throw("invalid payment amount") | |
413 | + | else if (if ((fee > 1000000)) | |
414 | + | then true | |
415 | + | else (500000 > fee)) | |
416 | + | then throw("invalid fee") | |
417 | + | else if (((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing)) | |
418 | + | then throw((("invalid amount(result:" + toString(((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing))) + ")")) | |
419 | + | else WriteSet([DataEntry(getCancelLeaseTxReserveFeeKey(txHash), fee), DataEntry(LeasingTxCountKey, if ((getLeaseTxStatus(txHash) == "")) | |
420 | + | then (leasingTxCount + 1) | |
421 | + | else leasingTxCount), DataEntry(LeasingAmountKey, (leasingAmount + amount)), DataEntry(LeasingExpireBlockKey, if ((height > leasingExpireBlock)) | |
422 | + | then (height + leasingInterval) | |
423 | + | else leasingExpireBlock), DataEntry(getLeaseTxStatusKey(txHash), NEW), DataEntry(getLeaseTxExpireSendBlockKey(txHash), (height + SENDTXEXPIRE)), DataEntry(getLeaseTxAmountByHashKey(txHash), amount), DataEntry(getLeaseTxBytesByHashKey(txHash), toBase64String(txBytes))]) | |
424 | + | } | |
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | @Callable(i) | |
429 | + | func cancelStuckLeaseTx (txHash) = if (if (if ((getLeaseTxStatus(txHash) == NEW)) | |
430 | + | then !(isDefined(transactionHeightById(fromBase58String(txHash)))) | |
431 | + | else false) | |
432 | + | then (height > getLeaseTxExpireSendBlock(txHash)) | |
433 | + | else false) | |
434 | + | then { | |
435 | + | let amount = getLeaseTxAmountByHash(txHash) | |
436 | + | WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(txHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice))) | |
437 | + | then false | |
438 | + | else true)]) | |
439 | + | } | |
440 | + | else throw("invalid tx hash") | |
441 | + | ||
442 | + | ||
443 | + | ||
444 | + | @Callable(i) | |
445 | + | func registrationUnleaseTx (chainIdString,senderPublicKey,fee,timestamp,leaseTxHash) = { | |
446 | + | let txBytes = (((((base58'gm' + toBytes(chainIdString)) + fromBase58String(senderPublicKey)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash)) | |
447 | + | let txHash = blake2b256(txBytes) | |
448 | + | if ((getLeaseTxStatus(leaseTxHash) != NEW)) | |
449 | + | then throw("invalid tx status") | |
450 | + | else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
451 | + | then throw("invalid pubKey") | |
452 | + | else if (!(isDefined(transactionHeightById(txHash)))) | |
453 | + | then throw("blockchain does not contain this transaction") | |
454 | + | else { | |
455 | + | let amount = getLeaseTxAmountByHash(leaseTxHash) | |
456 | + | WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(leaseTxHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(getLockedBalance(neutrinoAssetIdString), currentPrice))) | |
457 | + | then false | |
458 | + | else true)]) | |
459 | + | } | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | @Verifier(tx) | |
464 | + | func verify () = { | |
465 | + | let id = toBase58String(tx.id) | |
466 | + | match tx { | |
467 | + | case leaseTx: LeaseTransaction => | |
468 | + | if (if ((leasingExpireBlock >= height)) | |
469 | + | then (getLeaseTxExpireSendBlock(id) >= height) | |
470 | + | else false) | |
471 | + | then (getLeaseTxStatus(id) == NEW) | |
472 | + | else false | |
473 | + | case unleaseTx: LeaseCancelTransaction => | |
474 | + | let leaseId = toBase58String(unleaseTx.leaseId) | |
475 | + | if (if (if ((height > leasingExpireBlock)) | |
476 | + | then true | |
477 | + | else isRebalance) | |
478 | + | then (unleaseTx.fee == getCancelLeaseTxReserveFee(leaseId)) | |
479 | + | else false) | |
480 | + | then (getLeaseTxStatus(leaseId) == NEW) | |
481 | + | else false | |
482 | + | case _ => | |
483 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
484 | + | } | |
485 | + | } | |
486 | + |
github/deemru/w8io/026f985 36.07 ms ◑