tx · 69yZ25d8wkjX6uiqJpNqZwDvsnNFMpEVZJg49AdzH5Pa 3NAkju9iBgPL4dGnif72y53rch54Nq6E9y7: -0.01000000 Waves 2019.10.17 20:53 [724333] smart account 3NAkju9iBgPL4dGnif72y53rch54Nq6E9y7 > SELF 0.00000000 Waves
{ "type": 13, "id": "69yZ25d8wkjX6uiqJpNqZwDvsnNFMpEVZJg49AdzH5Pa", "fee": 1000000, "feeAssetId": null, "timestamp": 1571334661827, "version": 1, "sender": "3NAkju9iBgPL4dGnif72y53rch54Nq6E9y7", "senderPublicKey": "6coXHKQBxpD2DUWFE9x4AxS6KSUkocVRGip2sV1nb4iq", "proofs": [ "3tMcXcNHiazdxKKyMgkt6LjDw2onisn8kdWvDZA48cNVbKczQyaEhzZAkVJ7hMFWpcDnE2hdzFtdP27BNFqLhVrC" ], "script": "base64:AAIDAAAAAAAAAC8IARIAEgASABIDCgEIEgASABIDCgEIEgASAwoBCBIAEgYKBAgBAQESBgoECAgBAQAAAGkBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBwEAAAAYZ2V0TnVtYmVyQnlBZ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0BQAAABJsZWFzaW5nRXhwaXJlQmxvY2sGBQAAAAtpc1JlYmFsYW5jZQcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5yKcegw==", "chainId": 84, "height": 724333, "spentComplexity": 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 | + | func isInt (val) = match val { | |
53 | + | case a: Int => | |
54 | + | true | |
55 | + | case _ => | |
56 | + | false | |
57 | + | } | |
58 | + | ||
59 | + | ||
60 | + | let LISTSPLITSYMBOL = "_" | |
61 | + | ||
62 | + | let LISTDATASYMBOL = "+" | |
63 | + | ||
64 | + | let WAVELET = 100000000 | |
65 | + | ||
66 | + | let PAULI = 100 | |
67 | + | ||
68 | + | let CRYTICALSHARE = 20 | |
69 | + | ||
70 | + | let LEASINGSHARE = 50 | |
71 | + | ||
72 | + | let CANCELED = "canceled" | |
73 | + | ||
74 | + | let NEW = "new" | |
75 | + | ||
76 | + | let FILLED = "filled" | |
77 | + | ||
78 | + | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
79 | + | ||
80 | + | let BondAssetIdKey = "bond_asset_id" | |
81 | + | ||
82 | + | let AuctionContractKey = "auction_contract" | |
83 | + | ||
84 | + | let RPDContractKey = "rpd_contract" | |
85 | + | ||
86 | + | let ContolContractKey = "control_contract" | |
87 | + | ||
88 | + | let BalanceLockIntervalKey = "balance_lock_interval" | |
89 | + | ||
90 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
91 | + | ||
92 | + | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
93 | + | ||
94 | + | let NodeAddressKey = "node_address" | |
95 | + | ||
96 | + | let LeasingIntervalKey = "leasing_interval" | |
97 | + | ||
98 | + | let PriceKey = "price" | |
99 | + | ||
100 | + | let ScriptUpdateIntervalKey = "script_update_interval" | |
101 | + | ||
102 | + | let NeutrinoBalanceKey = "neutrino_" | |
103 | + | ||
104 | + | let WavesBalanceKey = "waves_" | |
105 | + | ||
106 | + | let BalanceUnlockBlockKey = "balance_block_" | |
107 | + | ||
108 | + | let OrderbookKey = "orderbook" | |
109 | + | ||
110 | + | let OrderTotalKey = "order_total_" | |
111 | + | ||
112 | + | let OrderOwnerKey = "order_owner_" | |
113 | + | ||
114 | + | let OrderHeightKey = "order_height_" | |
115 | + | ||
116 | + | let OrderFilledTotalKey = "order_filled_total_" | |
117 | + | ||
118 | + | let OrderStatusKey = "order_status_" | |
119 | + | ||
120 | + | let RPDSyncIndexKey = "rpd_sync_index" | |
121 | + | ||
122 | + | let RPDProfitKey = "rpd_profit" | |
123 | + | ||
124 | + | let RPDBalanceKey = "rpd_balance" | |
125 | + | ||
126 | + | let IsBlockedKey = "is_blocked" | |
127 | + | ||
128 | + | let IsLeasingProfitTxExistKey = "is_leasing_profit" | |
129 | + | ||
130 | + | let ScriptUpdateBlockKey = "script_update_block" | |
131 | + | ||
132 | + | let LeaseTxKey = "lease_tx" | |
133 | + | ||
134 | + | let LeaseTxHashKey = "lease_tx_hash" | |
135 | + | ||
136 | + | let LeasingAmountKey = "leasing_amount" | |
137 | + | ||
138 | + | let LeaseTxExpireSendBlockKey = "leasing_expire_send" | |
139 | + | ||
140 | + | let LeasingExpireBlockKey = "leasing_expire_block" | |
141 | + | ||
142 | + | let IsRebalanceKey = "is_rebalance" | |
143 | + | ||
144 | + | let SwapLockedBalanceKey = "swap_locked_balance" | |
145 | + | ||
146 | + | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
147 | + | ||
148 | + | ||
149 | + | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
150 | + | ||
151 | + | ||
152 | + | func getRPDProfitKey (count) = ((RPDProfitKey + "_") + toString(count)) | |
153 | + | ||
154 | + | ||
155 | + | func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner) | |
156 | + | ||
157 | + | ||
158 | + | func getWavesBalanceKey (owner) = (WavesBalanceKey + owner) | |
159 | + | ||
160 | + | ||
161 | + | func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner) | |
162 | + | ||
163 | + | ||
164 | + | func getOrderTotalKey (orderId) = (OrderTotalKey + orderId) | |
165 | + | ||
166 | + | ||
167 | + | func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId) | |
168 | + | ||
169 | + | ||
170 | + | func getOrderHeightKey (orderId) = (OrderHeightKey + orderId) | |
171 | + | ||
172 | + | ||
173 | + | func getOrderStatusKey (orderId) = (OrderStatusKey + orderId) | |
174 | + | ||
175 | + | ||
176 | + | func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId) | |
177 | + | ||
178 | + | ||
179 | + | let controlContract = getStringByKey(ContolContractKey) | |
180 | + | ||
181 | + | let price = getNumberByAddressAndKey(controlContract, PriceKey) | |
182 | + | ||
183 | + | func convertNeutrinoToWaves (amount) = ((((amount * 100) / price) * WAVELET) / PAULI) | |
184 | + | ||
185 | + | ||
186 | + | func convertWavesToNeutrino (amount) = ((((amount * price) / 100) * PAULI) / WAVELET) | |
187 | + | ||
188 | + | ||
189 | + | func convertNeutrinoToBond (amount) = (amount / PAULI) | |
190 | + | ||
191 | + | ||
192 | + | func convertBondToNeutrino (amount) = (amount * PAULI) | |
193 | + | ||
194 | + | ||
195 | + | func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount)) | |
196 | + | ||
197 | + | ||
198 | + | let isRebalance = getBoolByKey(IsRebalanceKey) | |
199 | + | ||
200 | + | let leasingInterval = getNumberByKey(LeasingIntervalKey) | |
201 | + | ||
202 | + | let leaseTxExpireSendBlock = getNumberByKey(LeaseTxExpireSendBlockKey) | |
203 | + | ||
204 | + | let leasingExpireBlock = getNumberByKey(LeasingExpireBlockKey) | |
205 | + | ||
206 | + | let leaseTxHash = getStringByKey(LeaseTxHashKey) | |
207 | + | ||
208 | + | let leaseTxBytes = getStringByKey(LeaseTxKey) | |
209 | + | ||
210 | + | let leasingAmount = getNumberByKey(LeasingAmountKey) | |
211 | + | ||
212 | + | let swapLockedBalance = getNumberByKey(SwapLockedBalanceKey) | |
213 | + | ||
214 | + | let nodeAddress = getStringByKey(NodeAddressKey) | |
215 | + | ||
216 | + | let scriptUpdateInterval = getNumberByAddressAndKey(ContolContractKey, ScriptUpdateIntervalKey) | |
217 | + | ||
218 | + | let scriptUpdateBlock = getNumberByAddressAndKey(controlContract, ScriptUpdateBlockKey) | |
219 | + | ||
220 | + | let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey) | |
221 | + | ||
222 | + | let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey) | |
223 | + | ||
224 | + | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
225 | + | ||
226 | + | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
227 | + | ||
228 | + | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
229 | + | ||
230 | + | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
231 | + | ||
232 | + | let auctionContract = getStringByKey(AuctionContractKey) | |
233 | + | ||
234 | + | let rpdContract = getStringByKey(RPDContractKey) | |
235 | + | ||
236 | + | let reserve = (wavesBalance(this) - swapLockedBalance) | |
237 | + | ||
238 | + | let reserveWithoutLeasing = ((wavesBalance(this) - (leasingAmount * (if (isInt(transactionHeightById(fromBase58String(leaseTxHash)))) | |
239 | + | then 1 | |
240 | + | else 0))) - swapLockedBalance) | |
241 | + | ||
242 | + | let orderbook = getStringByKey(OrderbookKey) | |
243 | + | ||
244 | + | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
245 | + | ||
246 | + | let bondSupply = { | |
247 | + | let info = extract(assetInfo(bondAssetId)) | |
248 | + | (info.quantity - assetBalance(this, bondAssetId)) | |
249 | + | } | |
250 | + | ||
251 | + | let neutrinoSupply = { | |
252 | + | let info = extract(assetInfo(neutrinoAssetId)) | |
253 | + | (info.quantity - assetBalance(this, neutrinoAssetId)) | |
254 | + | } | |
255 | + | ||
256 | + | let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply) | |
257 | + | ||
258 | + | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
259 | + | ||
260 | + | ||
261 | + | func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner)) | |
262 | + | ||
263 | + | ||
264 | + | func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner)) | |
265 | + | ||
266 | + | ||
267 | + | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
268 | + | ||
269 | + | ||
270 | + | func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id)) | |
271 | + | ||
272 | + | ||
273 | + | func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id)) | |
274 | + | ||
275 | + | ||
276 | + | func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id)) | |
277 | + | ||
278 | + | ||
279 | + | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
280 | + | ||
281 | + | ||
282 | + | func getOrderElementById (id) = (id + LISTSPLITSYMBOL) | |
283 | + | ||
284 | + | ||
285 | + | func addOrder (orderId) = (orderbook + getOrderElementById(orderId)) | |
286 | + | ||
287 | + | ||
288 | + | func dropOrder (orderId) = { | |
289 | + | let parts = split(orderbook, getOrderElementById(orderId)) | |
290 | + | (parts[0] + parts[1]) | |
291 | + | } | |
292 | + | ||
293 | + | ||
294 | + | @Callable(i) | |
295 | + | func setPrice () = WriteSet([DataEntry(PriceKey, price)]) | |
296 | + | ||
297 | + | ||
298 | + | ||
299 | + | @Callable(i) | |
300 | + | func swapWavesToNeutrino () = { | |
301 | + | let pmt = extract(i.payment) | |
302 | + | if ((minWavesSwapAmount > pmt.amount)) | |
303 | + | then throw("amount less min") | |
304 | + | else if (isDefined(pmt.assetId)) | |
305 | + | then throw("can use waves only") | |
306 | + | else if (isBlocked) | |
307 | + | then throw("contract is blocked") | |
308 | + | else { | |
309 | + | let amount = convertWavesToNeutrino(pmt.amount) | |
310 | + | TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)]) | |
311 | + | } | |
312 | + | } | |
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | @Callable(i) | |
317 | + | func swapNeutrinoToWaves () = { | |
318 | + | let pmt = extract(i.payment) | |
319 | + | if ((minNeutrinoSwapAmount > pmt.amount)) | |
320 | + | then throw("amount less min") | |
321 | + | else if (isBlocked) | |
322 | + | then throw("contract is blocked") | |
323 | + | else if ((pmt.assetId != neutrinoAssetId)) | |
324 | + | then throw("can use neutrino only") | |
325 | + | else { | |
326 | + | let account = toBase58String(i.caller.bytes) | |
327 | + | let amount = convertNeutrinoToWaves(pmt.amount) | |
328 | + | WriteSet([DataEntry(getWavesBalanceKey(account), (getWavesBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(IsRebalanceKey, (((reserve * CRYTICALSHARE) / 100) >= (reserveWithoutLeasing - amount))), DataEntry(SwapLockedBalanceKey, (swapLockedBalance + amount))]) | |
329 | + | } | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | @Callable(i) | |
335 | + | func withdraw (account) = if ((getUnlockBalanceBlock(account) > height)) | |
336 | + | then throw("wait a couple of blocks for withdraw") | |
337 | + | else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0), DataEntry(SwapLockedBalanceKey, (swapLockedBalance - getWavesBalance(account)))]), TransferSet([ScriptTransfer(addressFromStringValue(account), getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(addressFromStringValue(account), getWavesBalance(account), unit)])) | |
338 | + | ||
339 | + | ||
340 | + | ||
341 | + | @Callable(i) | |
342 | + | func generateBond () = { | |
343 | + | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve)) | |
344 | + | let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId) | |
345 | + | let amount = (convertNeutrinoToBond(deficit) - balanceAuction) | |
346 | + | if (isBlocked) | |
347 | + | then throw("contract is blocked") | |
348 | + | else if ((amount >= 10)) | |
349 | + | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)]) | |
350 | + | else throw("bond were generated or do not need it") | |
351 | + | } | |
352 | + | ||
353 | + | ||
354 | + | ||
355 | + | @Callable(i) | |
356 | + | func setOrder () = { | |
357 | + | let pmt = extract(i.payment) | |
358 | + | let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)))) | |
359 | + | if ((pmt.assetId != bondAssetId)) | |
360 | + | then throw("can use bond only") | |
361 | + | else if ((getOrderOwner(newOrderId) != "")) | |
362 | + | then throw("order exists") | |
363 | + | else WriteSet([DataEntry(OrderbookKey, addOrder(newOrderId)), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)]) | |
364 | + | } | |
365 | + | ||
366 | + | ||
367 | + | ||
368 | + | @Callable(i) | |
369 | + | func cancelOrder (orderId) = { | |
370 | + | let owner = getOrderOwner(orderId) | |
371 | + | let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId)) | |
372 | + | if ((owner != toString(i.caller))) | |
373 | + | then throw("permission denied") | |
374 | + | else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)])) | |
375 | + | } | |
376 | + | ||
377 | + | ||
378 | + | ||
379 | + | @Callable(i) | |
380 | + | func executeOrder () = { | |
381 | + | let orderId = split(orderbook, LISTSPLITSYMBOL)[0] | |
382 | + | let orderTotal = getOrderTotal(orderId) | |
383 | + | let orderOwner = getOrderOwner(orderId) | |
384 | + | let filledTotal = getOrderFilledTotal(orderId) | |
385 | + | if (isBlocked) | |
386 | + | then throw("contract is blocked") | |
387 | + | else if ((0 >= surplus)) | |
388 | + | then throw("surplus is less than zero") | |
389 | + | else if (if ((orderOwner == "")) | |
390 | + | then (surplus >= 10) | |
391 | + | else false) | |
392 | + | then { | |
393 | + | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
394 | + | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), surplus), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), surplus, neutrinoAssetId)])) | |
395 | + | } | |
396 | + | else { | |
397 | + | let amount = (orderTotal - filledTotal) | |
398 | + | let surplusBond = convertNeutrinoToBond(surplus) | |
399 | + | let status = if ((surplusBond >= amount)) | |
400 | + | then FILLED | |
401 | + | else NEW | |
402 | + | let newFilledTotal = if ((surplusBond >= amount)) | |
403 | + | then orderTotal | |
404 | + | else surplusBond | |
405 | + | ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)])) | |
406 | + | } | |
407 | + | } | |
408 | + | ||
409 | + | ||
410 | + | ||
411 | + | @Callable(i) | |
412 | + | func transfer (account) = { | |
413 | + | let pmt = extract(i.payment) | |
414 | + | if (isDefined(pmt.assetId)) | |
415 | + | then throw("can use waves only at the moment") | |
416 | + | else TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, unit)]) | |
417 | + | } | |
418 | + | ||
419 | + | ||
420 | + | ||
421 | + | @Callable(i) | |
422 | + | func nodeReward () = { | |
423 | + | let pmt = value(i.payment) | |
424 | + | if ((i.caller != addressFromStringValue(nodeAddress))) | |
425 | + | then throw("permission denied") | |
426 | + | else if (isDefined(pmt.assetId)) | |
427 | + | then throw("waves only") | |
428 | + | else { | |
429 | + | let amount = convertWavesToNeutrino(pmt.amount) | |
430 | + | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
431 | + | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)])) | |
432 | + | } | |
433 | + | } | |
434 | + | ||
435 | + | ||
436 | + | ||
437 | + | @Callable(i) | |
438 | + | func registrationLeaseTx (senderPublicKey,amount,fee,timestamp) = { | |
439 | + | let txBytes = (((((base58'3h1H' + fromBase58String(senderPublicKey)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp)) | |
440 | + | let balance = ((reserve * LEASINGSHARE) / 100) | |
441 | + | let txHashBytes = blake2b256(txBytes) | |
442 | + | let txHash = toBase58String(txHashBytes) | |
443 | + | if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
444 | + | then throw("invalid pubKey") | |
445 | + | else if (if ((lastBlock.timestamp > timestamp)) | |
446 | + | then true | |
447 | + | else (timestamp > (lastBlock.timestamp + 5400000))) | |
448 | + | then throw((("invalid timestamp(lastBlock: " + toString(lastBlock.timestamp)) + ")")) | |
449 | + | else if (if ((leaseTxHash != "")) | |
450 | + | then if (isInt(transactionHeightById(fromBase58String(leaseTxHash)))) | |
451 | + | then true | |
452 | + | else (leaseTxExpireSendBlock >= height) | |
453 | + | else false) | |
454 | + | then throw("leasing not canceled") | |
455 | + | else if (if ((fee > 1000000)) | |
456 | + | then true | |
457 | + | else (500000 > fee)) | |
458 | + | then throw("invalid fee") | |
459 | + | else if (if ((amount != balance)) | |
460 | + | then true | |
461 | + | else (amount == 0)) | |
462 | + | then throw((("invalid amount(leaseAmount:" + toString(balance)) + ")")) | |
463 | + | else WriteSet([DataEntry(LeaseTxKey, toBase64String(txBytes)), DataEntry(LeaseTxHashKey, txHash), DataEntry(LeasingAmountKey, balance), DataEntry(LeaseTxExpireSendBlockKey, (height + 30)), DataEntry(LeasingExpireBlockKey, (height + leasingInterval))]) | |
464 | + | } | |
465 | + | ||
466 | + | ||
467 | + | ||
468 | + | @Callable(i) | |
469 | + | func registrationUnleaseTx (chainIdString,senderPublicKey,fee,timestamp) = { | |
470 | + | let txBytes = (((((base58'gm' + toBytes(chainIdString)) + fromBase58String(senderPublicKey)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash)) | |
471 | + | let txHash = blake2b256(txBytes) | |
472 | + | if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
473 | + | then throw("invalid pubKey") | |
474 | + | else if (!(isInt(transactionHeightById(txHash)))) | |
475 | + | then throw("blockchain does not contain this transaction") | |
476 | + | else if (if ((fee > 1000000)) | |
477 | + | then true | |
478 | + | else (500000 > fee)) | |
479 | + | then throw("invalid fee") | |
480 | + | else WriteSet([DataEntry(LeaseTxKey, ""), DataEntry(LeaseTxHashKey, ""), DataEntry(LeasingAmountKey, 0), DataEntry(LeaseTxExpireSendBlockKey, 0), DataEntry(LeasingExpireBlockKey, 0), DataEntry(IsRebalanceKey, false)]) | |
481 | + | } | |
482 | + | ||
483 | + | ||
484 | + | @Verifier(tx) | |
485 | + | func verify () = match tx { | |
486 | + | case leaseTx: LeaseTransaction => | |
487 | + | if (if ((fromBase58String(leaseTxHash) == leaseTx.id)) | |
488 | + | then (leasingExpireBlock >= height) | |
489 | + | else false) | |
490 | + | then (leaseTxExpireSendBlock >= height) | |
491 | + | else false | |
492 | + | case unleaseTx: LeaseCancelTransaction => | |
493 | + | if ((fromBase58String(leaseTxHash) == unleaseTx.leaseId)) | |
494 | + | then if ((height > leasingExpireBlock)) | |
495 | + | then true | |
496 | + | else isRebalance | |
497 | + | else false | |
498 | + | case _ => | |
499 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
500 | + | } | |
501 | + |
github/deemru/w8io/026f985 44.60 ms ◑