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