tx · DvWKBSGRxUCpy1wx9tViiYeAdSqEL54QcWrbTv9VU3vV 3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F: -0.01400000 Waves 2019.11.01 22:44 [746231] smart account 3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F > SELF 0.00000000 Waves
{ "type": 13, "id": "DvWKBSGRxUCpy1wx9tViiYeAdSqEL54QcWrbTv9VU3vV", "fee": 1400000, "feeAssetId": null, "timestamp": 1572637453672, "version": 1, "sender": "3MyDtNTkCNyRCw3o2qv5BPPS7vvUosiQe6F", "senderPublicKey": "3z5txV1G5GKezwMRCHZDkLThqb1Yggepxvi2wq6iP6oz", "proofs": [ "3XETw6VaTfFEGY8rtH8MQdrLbQu6pk64rHK73j2Y6bW729d5dgNXnQnT9vxbqYL8gYjqpRJbfWDFX1dDQrMxtT8f" ], "script": "base64:AAIDAAAAAAAAADQIARIAEgASBAoCCAESABIAEgMKAQgSABIDCgEIEgASBgoECAEBCBIDCgEIEgcKBQgIAQEIAAAAfwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXROdW1iZXJ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AAAABCAUAAAACdHgAAAACaWQEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABBMZWFzZVRyYW5zYWN0aW9uBAAAAAdsZWFzZVR4BQAAAAckbWF0Y2gwAwMJAABnAAAAAgUAAAASbGVhc2luZ0V4cGlyZUJsb2NrBQAAAAZoZWlnaHQJAABnAAAAAgkBAAAAGWdldExlYXNlVHhFeHBpcmVTZW5kQmxvY2sAAAABBQAAAAJpZAUAAAAGaGVpZ2h0BwkAAAAAAAACCQEAAAATZ2V0TGVhc2VUeFN0YXR1c0tleQAAAAEFAAAAAmlkBQAAAANORVcHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABZMZWFzZUNhbmNlbFRyYW5zYWN0aW9uBAAAAAl1bmxlYXNlVHgFAAAAByRtYXRjaDADAwMJAABmAAAAAgUAAAAGaGVpZ2h0BQAAABJsZWFzaW5nRXhwaXJlQmxvY2sGBQAAAAtpc1JlYmFsYW5jZQMJAABnAAAAAggFAAAACXVubGVhc2VUeAAAAANmZWUAAAAAAAAHoSAJAABnAAAAAgAAAAAAAA9CQAgFAAAACXVubGVhc2VUeAAAAANmZWUHBwkAAAAAAAACCQEAAAATZ2V0TGVhc2VUeFN0YXR1c0tleQAAAAEJAAJYAAAAAQgFAAAACXVubGVhc2VUeAAAAAdsZWFzZUlkBQAAAANORVcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleakzpJ4=", "chainId": 84, "height": 746231, "spentComplexity": 0 } View: original | compacted Prev: FL2vJe5e3WkAS7kZsk4SVohpvsLPvBriWWY7dRrc2Rv7 Next: FtZp6uV39UF5dVuX19wNmQjkjBnLPGBRjJSG6mGXE11K Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | 5 | case a: Int => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringByKey (key) = match getString(this, key) { | |
13 | 13 | case a: String => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | "" | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | 21 | case a: Boolean => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getBoolByAddressAndKey (address,key) = match getBoolean(addressFromStringValue(address), key) { | |
45 | 45 | case a: Boolean => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | false | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | let SENDTXEXPIRE = 30 | |
53 | 53 | ||
54 | 54 | let LISTSPLITSYMBOL = "_" | |
55 | 55 | ||
56 | 56 | let LISTDATASYMBOL = "+" | |
57 | 57 | ||
58 | 58 | let WAVELET = 100000000 | |
59 | 59 | ||
60 | 60 | let PAULI = 100 | |
61 | 61 | ||
62 | 62 | let CRYTICALSHARE = 20 | |
63 | 63 | ||
64 | 64 | let LEASINGSHARE = 90 | |
65 | 65 | ||
66 | 66 | let LEASINTXCOUNT = 10 | |
67 | 67 | ||
68 | 68 | let CANCELED = "canceled" | |
69 | 69 | ||
70 | 70 | let NEW = "new" | |
71 | 71 | ||
72 | 72 | let FILLED = "filled" | |
73 | 73 | ||
74 | 74 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
75 | 75 | ||
76 | 76 | let BondAssetIdKey = "bond_asset_id" | |
77 | 77 | ||
78 | 78 | let ReserveContractKey = "reserve_contract" | |
79 | 79 | ||
80 | 80 | let AuctionContractKey = "auction_contract" | |
81 | 81 | ||
82 | 82 | let RPDContractKey = "rpd_contract" | |
83 | 83 | ||
84 | 84 | let ContolContractKey = "control_contract" | |
85 | 85 | ||
86 | 86 | let BalanceLockIntervalKey = "balance_lock_interval" | |
87 | 87 | ||
88 | 88 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
89 | 89 | ||
90 | 90 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
91 | 91 | ||
92 | 92 | let NodeAddressKey = "node_address" | |
93 | 93 | ||
94 | 94 | let LeasingIntervalKey = "leasing_interval" | |
95 | 95 | ||
96 | 96 | let PriceKey = "price" | |
97 | 97 | ||
98 | 98 | let PriceIndexKey = "price_index" | |
99 | 99 | ||
100 | 100 | let ScriptUpdateIntervalKey = "script_update_interval" | |
101 | 101 | ||
102 | 102 | let NeutrinoBalanceKey = "neutrino_" | |
103 | 103 | ||
104 | 104 | let WavesBalanceKey = "waves_" | |
105 | 105 | ||
106 | 106 | let BalanceUnlockBlockKey = "balance_block_" | |
107 | 107 | ||
108 | 108 | let OrderbookKey = "orderbook" | |
109 | 109 | ||
110 | 110 | let OrderTotalKey = "order_total_" | |
111 | 111 | ||
112 | 112 | let OrderOwnerKey = "order_owner_" | |
113 | 113 | ||
114 | 114 | let OrderHeightKey = "order_height_" | |
115 | 115 | ||
116 | 116 | let OrderFilledTotalKey = "order_filled_total_" | |
117 | 117 | ||
118 | 118 | let OrderStatusKey = "order_status_" | |
119 | 119 | ||
120 | 120 | let RPDSyncIndexKey = "rpd_sync_index" | |
121 | 121 | ||
122 | 122 | let RPDProfitKey = "rpd_profit" | |
123 | 123 | ||
124 | 124 | let RPDBalanceKey = "rpd_balance" | |
125 | 125 | ||
126 | 126 | let IsBlockedKey = "is_blocked" | |
127 | 127 | ||
128 | 128 | let IsLeasingProfitTxExistKey = "is_leasing_profit" | |
129 | 129 | ||
130 | 130 | let ScriptUpdateBlockKey = "script_update_block" | |
131 | 131 | ||
132 | 132 | let LeaseTxKey = "lease_tx" | |
133 | 133 | ||
134 | 134 | let LeaseTxStatusKey = "lease_tx_status" | |
135 | 135 | ||
136 | 136 | let LeasingAmountKey = "leasing_amount" | |
137 | 137 | ||
138 | 138 | let LeaseTxExpireSendBlockKey = "leasing_expire_send" | |
139 | 139 | ||
140 | 140 | let LeasingExpireBlockKey = "leasing_expire_block" | |
141 | 141 | ||
142 | 142 | let IsRebalanceKey = "is_rebalance" | |
143 | 143 | ||
144 | 144 | let SwapLockedBalanceKey = "swap_locked_balance" | |
145 | 145 | ||
146 | 146 | let SwapNeutrinoLockedBalanceKey = "swap_neutrino_locked_balance" | |
147 | 147 | ||
148 | 148 | let LeasingTxCountKey = "leasing_index" | |
149 | 149 | ||
150 | 150 | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func getRPDProfitKey (count) = ((RPDProfitKey + "_") + toString(count)) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func getWavesBalanceKey (owner) = (WavesBalanceKey + owner) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func getOrderTotalKey (orderId) = (OrderTotalKey + orderId) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getOrderHeightKey (orderId) = (OrderHeightKey + orderId) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getOrderStatusKey (orderId) = (OrderStatusKey + orderId) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getLeaseTxStatusKey (hash) = ((LeaseTxStatusKey + "_") + hash) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func getLeaseTxAmountByHashKey (hash) = ((LeasingAmountKey + "_") + hash) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getLeaseTxBytesByHashKey (hash) = ((LeaseTxKey + "_") + hash) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func getLeaseTxExpireSendBlockKey (hash) = ((LeaseTxExpireSendBlockKey + "_") + hash) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getIsRebalanceByAddressKey (address) = ((IsRebalanceKey + "_") + address) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | let controlContract = getStringByKey(ContolContractKey) | |
205 | 205 | ||
206 | 206 | let price = getNumberByAddressAndKey(controlContract, PriceKey) | |
207 | 207 | ||
208 | 208 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
209 | 209 | ||
210 | 210 | func convertNeutrinoToWavesByPrice (amount,convertPrice) = ((((amount * 100) / convertPrice) * WAVELET) / PAULI) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func convertNeutrinoToWaves (amount) = ((((amount * 100) / price) * WAVELET) / PAULI) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func convertWavesToNeutrino (amount) = ((((amount * price) / 100) * PAULI) / WAVELET) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func convertNeutrinoToBond (amount) = (amount / PAULI) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func convertBondToNeutrino (amount) = (amount * PAULI) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount)) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | let leasingTxCount = getNumberByKey(LeasingTxCountKey) | |
229 | 229 | ||
230 | 230 | let isRebalance = getBoolByKey(IsRebalanceKey) | |
231 | 231 | ||
232 | 232 | let leasingInterval = getNumberByKey(LeasingIntervalKey) | |
233 | 233 | ||
234 | 234 | let leasingExpireBlock = getNumberByKey(LeasingExpireBlockKey) | |
235 | 235 | ||
236 | 236 | let leasingAmount = getNumberByKey(LeasingAmountKey) | |
237 | 237 | ||
238 | 238 | let swapNeutrinoLockedBalance = getNumberByKey(SwapNeutrinoLockedBalanceKey) | |
239 | 239 | ||
240 | 240 | let swapWavesLockedBalance = getNumberByKey(SwapLockedBalanceKey) | |
241 | 241 | ||
242 | 242 | let nodeAddress = getStringByKey(NodeAddressKey) | |
243 | 243 | ||
244 | 244 | let scriptUpdateInterval = getNumberByAddressAndKey(ContolContractKey, ScriptUpdateIntervalKey) | |
245 | 245 | ||
246 | 246 | let scriptUpdateBlock = getNumberByAddressAndKey(controlContract, ScriptUpdateBlockKey) | |
247 | 247 | ||
248 | 248 | let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey) | |
249 | 249 | ||
250 | 250 | let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey) | |
251 | 251 | ||
252 | 252 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
253 | 253 | ||
254 | 254 | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
255 | 255 | ||
256 | 256 | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
257 | 257 | ||
258 | 258 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
259 | 259 | ||
260 | 260 | let reserveContract = getStringByKey(ReserveContractKey) | |
261 | 261 | ||
262 | 262 | let auctionContract = getStringByKey(AuctionContractKey) | |
263 | 263 | ||
264 | 264 | let rpdContract = getStringByKey(RPDContractKey) | |
265 | 265 | ||
266 | 266 | let reserve = (wavesBalance(this) - swapWavesLockedBalance) | |
267 | 267 | ||
268 | 268 | let reserveWithoutLeasing = (reserve - leasingAmount) | |
269 | 269 | ||
270 | 270 | let orderbook = getStringByKey(OrderbookKey) | |
271 | 271 | ||
272 | 272 | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
273 | 273 | ||
274 | 274 | let bondSupply = { | |
275 | 275 | let info = extract(assetInfo(bondAssetId)) | |
276 | 276 | (info.quantity - assetBalance(this, bondAssetId)) | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | let neutrinoSupply = { | |
280 | 280 | let info = extract(assetInfo(neutrinoAssetId)) | |
281 | 281 | ((info.quantity - assetBalance(this, neutrinoAssetId)) + swapNeutrinoLockedBalance) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply) | |
285 | 285 | ||
286 | 286 | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve)) | |
287 | 287 | ||
288 | 288 | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner)) | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner)) | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id)) | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id)) | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id)) | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id)) | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | func getLeaseTxStatus (hash) = getStringByKey(getLeaseTxStatusKey(hash)) | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getLeaseTxAmountByHash (hash) = getNumberByKey(getLeaseTxAmountByHashKey(hash)) | |
325 | 325 | ||
326 | 326 | ||
327 | 327 | func getLeaseTxBytesByHash (hash) = getStringByKey(getLeaseTxBytesByHashKey(hash)) | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | func getLeaseTxExpireSendBlock (hash) = getNumberByKey(getLeaseTxExpireSendBlockKey(hash)) | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | func getOrderElementById (id) = (id + LISTSPLITSYMBOL) | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | func addOrder (orderId) = (orderbook + getOrderElementById(orderId)) | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | func dropOrder (orderId) = { | |
340 | 340 | let parts = split(orderbook, getOrderElementById(orderId)) | |
341 | 341 | (parts[0] + parts[1]) | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | @Callable(i) | |
346 | 346 | func swapWavesToNeutrino () = { | |
347 | 347 | let pmt = extract(i.payment) | |
348 | 348 | if ((minWavesSwapAmount > pmt.amount)) | |
349 | 349 | then throw("amount less min") | |
350 | 350 | else if (isDefined(pmt.assetId)) | |
351 | 351 | then throw("can use waves only") | |
352 | 352 | else if (isBlocked) | |
353 | 353 | then throw("contract is blocked") | |
354 | 354 | else { | |
355 | 355 | let amount = convertWavesToNeutrino(pmt.amount) | |
356 | 356 | TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)]) | |
357 | 357 | } | |
358 | 358 | } | |
359 | 359 | ||
360 | 360 | ||
361 | 361 | ||
362 | 362 | @Callable(i) | |
363 | 363 | func swapNeutrinoToWaves () = { | |
364 | 364 | let pmt = extract(i.payment) | |
365 | 365 | let account = toString(i.caller) | |
366 | 366 | if ((minNeutrinoSwapAmount > pmt.amount)) | |
367 | 367 | then throw("amount less min") | |
368 | 368 | else if (isBlocked) | |
369 | 369 | then throw("contract is blocked") | |
370 | 370 | else if ((pmt.assetId != neutrinoAssetId)) | |
371 | 371 | then throw("can use neutrino only") | |
372 | 372 | else if ((getUnlockBalanceBlock(account) > height)) | |
373 | 373 | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
374 | 374 | else if ((getNeutrinoBalance(account) != 0)) | |
375 | 375 | then throw("use withdraw") | |
376 | 376 | else { | |
377 | 377 | let neutrinoAmount = pmt.amount | |
378 | 378 | let newSwapNeutrinoLockedBalance = (swapNeutrinoLockedBalance + neutrinoAmount) | |
379 | 379 | WriteSet([DataEntry(getNeutrinoBalanceKey(account), (getNeutrinoBalance(account) + neutrinoAmount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval)), DataEntry(SwapNeutrinoLockedBalanceKey, newSwapNeutrinoLockedBalance), DataEntry(IsRebalanceKey, if ((reserveWithoutLeasing >= convertNeutrinoToWaves(newSwapNeutrinoLockedBalance))) | |
380 | 380 | then false | |
381 | 381 | else true)]) | |
382 | 382 | } | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | ||
387 | 387 | @Callable(i) | |
388 | 388 | func withdraw (account,index) = { | |
389 | 389 | let indexHeight = getHeightPriceByIndex(index) | |
390 | 390 | let nextIndexHeight = getHeightPriceByIndex((index + 1)) | |
391 | 391 | let unlockHeight = getUnlockBalanceBlock(account) | |
392 | 392 | let neutrinoAmount = getNeutrinoBalance(account) | |
393 | 393 | let indexPrice = getPriceHistory(indexHeight) | |
394 | 394 | let amount = convertNeutrinoToWavesByPrice(neutrinoAmount, indexPrice) | |
395 | 395 | let totalWavesWithdraw = (getWavesBalance(account) + amount) | |
396 | 396 | if (isBlocked) | |
397 | 397 | then throw("contract is blocked") | |
398 | 398 | else if ((unlockHeight > height)) | |
399 | 399 | then throw("wait a couple of blocks for withdraw") | |
400 | 400 | else if (if (if ((index > priceIndex)) | |
401 | 401 | then true | |
402 | 402 | else (indexHeight > unlockHeight)) | |
403 | 403 | then true | |
404 | 404 | else if ((nextIndexHeight != 0)) | |
405 | 405 | then (unlockHeight >= nextIndexHeight) | |
406 | 406 | else false) | |
407 | 407 | then throw("invalid index") | |
408 | 408 | else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0), DataEntry(SwapLockedBalanceKey, (swapWavesLockedBalance - getWavesBalance(account))), DataEntry(SwapNeutrinoLockedBalanceKey, (swapNeutrinoLockedBalance - neutrinoAmount))]), TransferSet([ScriptTransfer(addressFromStringValue(account), totalWavesWithdraw, unit)])) | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | ||
413 | 413 | @Callable(i) | |
414 | 414 | func generateBond () = { | |
415 | 415 | let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId) | |
416 | 416 | let amount = (convertNeutrinoToBond(deficit) - balanceAuction) | |
417 | 417 | if (isBlocked) | |
418 | 418 | then throw("contract is blocked") | |
419 | 419 | else if ((amount >= 10)) | |
420 | 420 | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)]) | |
421 | 421 | else throw("bond were generated or do not need it") | |
422 | 422 | } | |
423 | 423 | ||
424 | 424 | ||
425 | 425 | ||
426 | 426 | @Callable(i) | |
427 | 427 | func setOrder () = { | |
428 | 428 | let pmt = extract(i.payment) | |
429 | 429 | let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)))) | |
430 | 430 | if ((pmt.assetId != bondAssetId)) | |
431 | 431 | then throw("can use bond only") | |
432 | 432 | else if ((getOrderOwner(newOrderId) != "")) | |
433 | 433 | then throw("order exists") | |
434 | 434 | 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)]) | |
435 | 435 | } | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | ||
439 | 439 | @Callable(i) | |
440 | 440 | func cancelOrder (orderId) = { | |
441 | 441 | let owner = getOrderOwner(orderId) | |
442 | 442 | let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId)) | |
443 | 443 | if ((owner != toString(i.caller))) | |
444 | 444 | then throw("permission denied") | |
445 | 445 | else if ((getOrderStatus(orderId) != NEW)) | |
446 | 446 | then throw("invalid order status") | |
447 | 447 | else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)])) | |
448 | 448 | } | |
449 | 449 | ||
450 | 450 | ||
451 | 451 | ||
452 | 452 | @Callable(i) | |
453 | 453 | func executeOrder () = { | |
454 | 454 | let orderId = split(orderbook, LISTSPLITSYMBOL)[0] | |
455 | 455 | let orderTotal = getOrderTotal(orderId) | |
456 | 456 | let orderOwner = getOrderOwner(orderId) | |
457 | 457 | let filledTotal = getOrderFilledTotal(orderId) | |
458 | 458 | let surplusBond = convertNeutrinoToBond(surplus) | |
459 | 459 | if (isBlocked) | |
460 | 460 | then throw("contract is blocked") | |
461 | 461 | else if ((0 >= surplusBond)) | |
462 | 462 | then throw("surplus is less than zero") | |
463 | 463 | else if (if ((orderOwner == "")) | |
464 | 464 | then (surplusBond >= 10) | |
465 | 465 | else false) | |
466 | 466 | then { | |
467 | 467 | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
468 | 468 | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), surplus), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), surplus, neutrinoAssetId)])) | |
469 | 469 | } | |
470 | 470 | else { | |
471 | 471 | let amount = (orderTotal - filledTotal) | |
472 | 472 | let status = if ((surplusBond >= amount)) | |
473 | 473 | then FILLED | |
474 | 474 | else NEW | |
475 | 475 | let newFilledTotal = if ((surplusBond >= amount)) | |
476 | 476 | then amount | |
477 | 477 | else surplusBond | |
478 | 478 | ScriptResult(WriteSet([DataEntry(OrderbookKey, if ((surplusBond >= amount)) | |
479 | 479 | then dropOrder(orderId) | |
480 | 480 | else orderbook), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)])) | |
481 | 481 | } | |
482 | 482 | } | |
483 | 483 | ||
484 | 484 | ||
485 | 485 | ||
486 | 486 | @Callable(i) | |
487 | 487 | func transfer (account) = { | |
488 | 488 | let pmt = extract(i.payment) | |
489 | 489 | TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, pmt.assetId)]) | |
490 | 490 | } | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | ||
494 | 494 | @Callable(i) | |
495 | 495 | func nodeReward () = { | |
496 | 496 | let pmt = value(i.payment) | |
497 | 497 | if ((i.caller != addressFromStringValue(nodeAddress))) | |
498 | 498 | then throw("permission denied") | |
499 | 499 | else if (isDefined(pmt.assetId)) | |
500 | 500 | then throw("waves only") | |
501 | 501 | else { | |
502 | 502 | let amount = convertWavesToNeutrino(pmt.amount) | |
503 | 503 | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
504 | 504 | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)])) | |
505 | 505 | } | |
506 | 506 | } | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | ||
510 | 510 | @Callable(i) | |
511 | 511 | func registrationLeaseTx (senderPublicKey,fee,timestamp,leaseTxHash) = { | |
512 | 512 | let totalFreeReserve = (((reserve * LEASINGSHARE) / 100) - convertNeutrinoToWaves(swapNeutrinoLockedBalance)) | |
513 | 513 | let amount = (totalFreeReserve / LEASINTXCOUNT) | |
514 | 514 | let txBytes = (((((base58'3h1H' + fromBase58String(senderPublicKey)) + fromBase58String(nodeAddress)) + toBytes(amount)) + toBytes(fee)) + toBytes(timestamp)) | |
515 | 515 | let txHashBytes = blake2b256(txBytes) | |
516 | 516 | let txHash = toBase58String(txHashBytes) | |
517 | 517 | if ((leaseTxHash != txHash)) | |
518 | 518 | then throw("invalid tx hash") | |
519 | 519 | else if ((leasingTxCount >= LEASINTXCOUNT)) | |
520 | 520 | then throw("the number of leasing transactions is equal to the maximum") | |
521 | 521 | else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
522 | 522 | then throw("invalid pubKey") | |
523 | 523 | else if (if ((lastBlock.timestamp > timestamp)) | |
524 | 524 | then true | |
525 | 525 | else (timestamp > (lastBlock.timestamp + 5400000))) | |
526 | 526 | then throw((("invalid timestamp(lastBlock: " + toString(lastBlock.timestamp)) + ")")) | |
527 | 527 | else if ((getLeaseTxStatus(txHash) == "")) | |
528 | 528 | then throw("tx is exist") | |
529 | 529 | else if (if ((fee > 1000000)) | |
530 | 530 | then true | |
531 | 531 | else (500000 > fee)) | |
532 | 532 | then throw("invalid fee") | |
533 | 533 | else if (((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing)) | |
534 | 534 | then throw((("invalid amount(result:" + toString(((totalFreeReserve - (leasingAmount + amount)) > reserveWithoutLeasing))) + ")")) | |
535 | 535 | else WriteSet([DataEntry(LeasingTxCountKey, if ((getLeaseTxStatus(txHash) == "")) | |
536 | 536 | then (leasingTxCount + 1) | |
537 | 537 | else leasingTxCount), DataEntry(LeasingAmountKey, (leasingAmount + amount)), DataEntry(LeasingExpireBlockKey, if ((height > leasingExpireBlock)) | |
538 | 538 | then (height + leasingInterval) | |
539 | 539 | else leasingExpireBlock), DataEntry(getLeaseTxStatusKey(txHash), NEW), DataEntry(getLeaseTxExpireSendBlockKey(txHash), (height + SENDTXEXPIRE)), DataEntry(getLeaseTxAmountByHashKey(txHash), amount), DataEntry(getLeaseTxBytesByHashKey(txHash), toBase64String(txBytes))]) | |
540 | 540 | } | |
541 | 541 | ||
542 | 542 | ||
543 | 543 | ||
544 | 544 | @Callable(i) | |
545 | 545 | func cancelStuckLeaseTx (txHash) = if (if (if ((getLeaseTxStatus(txHash) == NEW)) | |
546 | 546 | then !(isDefined(transactionHeightById(fromBase58String(txHash)))) | |
547 | 547 | else false) | |
548 | 548 | then (height > getLeaseTxExpireSendBlock(txHash)) | |
549 | 549 | else false) | |
550 | 550 | then { | |
551 | 551 | let amount = getLeaseTxAmountByHash(txHash) | |
552 | 552 | WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(txHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(swapNeutrinoLockedBalance))) | |
553 | 553 | then false | |
554 | 554 | else true)]) | |
555 | 555 | } | |
556 | 556 | else throw("invalid tx hash") | |
557 | 557 | ||
558 | 558 | ||
559 | 559 | ||
560 | 560 | @Callable(i) | |
561 | 561 | func registrationUnleaseTx (chainIdString,senderPublicKey,fee,timestamp,leaseTxHash) = { | |
562 | 562 | let txBytes = (((((base58'gm' + toBytes(chainIdString)) + fromBase58String(senderPublicKey)) + toBytes(fee)) + toBytes(timestamp)) + fromBase58String(leaseTxHash)) | |
563 | 563 | let txHash = blake2b256(txBytes) | |
564 | 564 | if ((getLeaseTxStatus(leaseTxHash) != NEW)) | |
565 | 565 | then throw("invalid tx status") | |
566 | 566 | else if ((this != addressFromPublicKey(fromBase58String(senderPublicKey)))) | |
567 | 567 | then throw("invalid pubKey") | |
568 | 568 | else if (!(isDefined(transactionHeightById(txHash)))) | |
569 | 569 | then throw("blockchain does not contain this transaction") | |
570 | 570 | else { | |
571 | 571 | let amount = getLeaseTxAmountByHash(leaseTxHash) | |
572 | 572 | WriteSet([DataEntry(LeasingTxCountKey, (leasingTxCount - 1)), DataEntry(LeasingAmountKey, (leasingAmount - amount)), DataEntry(getLeaseTxStatusKey(leaseTxHash), CANCELED), DataEntry(IsRebalanceKey, if (((reserveWithoutLeasing - amount) >= convertNeutrinoToWaves(swapNeutrinoLockedBalance))) | |
573 | 573 | then false | |
574 | 574 | else true)]) | |
575 | 575 | } | |
576 | 576 | } | |
577 | 577 | ||
578 | 578 | ||
579 | 579 | @Verifier(tx) | |
580 | 580 | func verify () = { | |
581 | 581 | let id = toBase58String(tx.id) | |
582 | 582 | match tx { | |
583 | 583 | case leaseTx: LeaseTransaction => | |
584 | 584 | if (if ((leasingExpireBlock >= height)) | |
585 | 585 | then (getLeaseTxExpireSendBlock(id) >= height) | |
586 | 586 | else false) | |
587 | 587 | then (getLeaseTxStatusKey(id) == NEW) | |
588 | 588 | else false | |
589 | 589 | case unleaseTx: LeaseCancelTransaction => | |
590 | 590 | if (if (if ((height > leasingExpireBlock)) | |
591 | 591 | then true | |
592 | 592 | else isRebalance) | |
593 | 593 | then if ((unleaseTx.fee >= 500000)) | |
594 | 594 | then (1000000 >= unleaseTx.fee) | |
595 | 595 | else false | |
596 | 596 | else false) | |
597 | 597 | then (getLeaseTxStatusKey(toBase58String(unleaseTx.leaseId)) == NEW) | |
598 | 598 | else false | |
599 | 599 | case _ => | |
600 | 600 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
601 | 601 | } | |
602 | 602 | } | |
603 | 603 |
github/deemru/w8io/026f985 48.23 ms ◑