tx · 8M7Vhsc4YYVbpyUyxpUrXehUV5fmMbv4EeiPLXN9b3qS 3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj: -0.01400000 Waves 2019.10.10 13:59 [713662] smart account 3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj > SELF 0.00000000 Waves
{ "type": 13, "id": "8M7Vhsc4YYVbpyUyxpUrXehUV5fmMbv4EeiPLXN9b3qS", "fee": 1400000, "feeAssetId": null, "timestamp": 1570705174993, "version": 1, "sender": "3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj", "senderPublicKey": "7YuxEiQSearE3DvFS84DXzV5gad9qxsq4bTy633SAYBj", "proofs": [ "MJoHXUCixvjQ2t2V36zTcekXpbJG3nsuZ9Lx7TQ911ftvx4QkVYW7LEtfANJrdZtJNiDBa69nha7ioFeR5gY7yr" ], "script": "base64:AAIDAAAAAAAAAAAAAAB3AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAA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ANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQTGVhc2VUcmFuc2FjdGlvbgQAAAAHbGVhc2VUeAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkBAAAAGWdldE93bmVyUHViS2V5QnlMZWFzZVR4SWQAAAABCQACWAAAAAEIBQAAAAdsZWFzZVR4AAAAAmlkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABZMZWFzZUNhbmNlbFRyYW5zYWN0aW9uBAAAAAl1bmxlYXNlVHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAABlnZXRPd25lclB1YktleUJ5TGVhc2VUeElkAAAAAQkAAlgAAAABCAUAAAAJdW5sZWFzZVR4AAAAB2xlYXNlSWQJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5F4Gytw==", "chainId": 84, "height": 713662, "spentComplexity": 0 } View: original | compacted Prev: 44YpwBoTQpDScBqHTXBfTsNjjdmYNksj3S9hwvje94Mk Next: AjxmAyBmg6NhyfiEgatzbnCi3MfvUGqGVofNEry9Pjnf 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(this, key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | let LISTSPLITSYMBOL = "_" | |
45 | 45 | ||
46 | 46 | let LISTDATASYMBOL = "+" | |
47 | 47 | ||
48 | 48 | let WAVELET = 100000000 | |
49 | 49 | ||
50 | 50 | let CENTSINDOLLAR = 100 | |
51 | 51 | ||
52 | 52 | let CANCELED = "canceled" | |
53 | 53 | ||
54 | 54 | let NEW = "new" | |
55 | 55 | ||
56 | 56 | let FILLED = "filled" | |
57 | 57 | ||
58 | 58 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
59 | 59 | ||
60 | 60 | let BondAssetIdKey = "bond_asset_id" | |
61 | 61 | ||
62 | 62 | let AuctionContractKey = "auction_contract" | |
63 | 63 | ||
64 | 64 | let RPDContractKey = "rpd_contract" | |
65 | 65 | ||
66 | 66 | let BalanceLockIntervalKey = "balance_lock_interval" | |
67 | 67 | ||
68 | 68 | let VoteIntervalKey = "vote_interval" | |
69 | 69 | ||
70 | 70 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
71 | 71 | ||
72 | 72 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
73 | 73 | ||
74 | 74 | let PriceOffsetKey = "price_offset" | |
75 | 75 | ||
76 | 76 | let ProvidingIntervalKey = "providing_interval" | |
77 | 77 | ||
78 | 78 | let PriceKey = "price" | |
79 | 79 | ||
80 | 80 | let NeutrinoBalanceKey = "neutrino_" | |
81 | 81 | ||
82 | 82 | let WavesBalanceKey = "waves_" | |
83 | 83 | ||
84 | 84 | let BalanceUnlockBlockKey = "balance_block_" | |
85 | 85 | ||
86 | 86 | let OrderbookKey = "orderbook" | |
87 | 87 | ||
88 | 88 | let OrderTotalKey = "order_total_" | |
89 | 89 | ||
90 | 90 | let OrderOwnerKey = "order_owner_" | |
91 | 91 | ||
92 | 92 | let OrderHeightKey = "order_height_" | |
93 | 93 | ||
94 | 94 | let OrderFilledTotalKey = "order_filled_total_" | |
95 | 95 | ||
96 | 96 | let OrderStatusKey = "order_status_" | |
97 | 97 | ||
98 | 98 | let RPDSyncIndexKey = "rpd_sync_index" | |
99 | 99 | ||
100 | 100 | let RPDProfitKey = "rpd_profit" | |
101 | 101 | ||
102 | 102 | let RPDBalanceKey = "rpd_balance" | |
103 | 103 | ||
104 | 104 | let IsBlockedKey = "is_blocked" | |
105 | 105 | ||
106 | 106 | let BlackSwarmPriceKey = "black_swarm_price" | |
107 | 107 | ||
108 | 108 | let AdminVoteKey = "admin_vote_" | |
109 | 109 | ||
110 | 110 | let AdminVotePriceKey = "admin_vote_price_" | |
111 | 111 | ||
112 | 112 | let BlockExpireVoteKey = "vote_expire_block" | |
113 | 113 | ||
114 | 114 | let AdminKey = "admin_" | |
115 | 115 | ||
116 | 116 | let IsPricePendingKey = "is_pending_price" | |
117 | 117 | ||
118 | 118 | let OracleKey = "oracle_" | |
119 | 119 | ||
120 | 120 | let OracleIsProvideKey = "oracle_is_provide_" | |
121 | 121 | ||
122 | 122 | let OracleProvidePriceKey = "oracle_price_provide_" | |
123 | 123 | ||
124 | 124 | let BlockExpireProvidingKey = "providing_expire_block" | |
125 | 125 | ||
126 | 126 | let ApprovedLeaseTxKey = "leasetx" | |
127 | 127 | ||
128 | 128 | let IsLeasingProfitTxExistKey = "is_leasing_profit" | |
129 | 129 | ||
130 | 130 | func getAdminKey (count) = (AdminKey + toString(count)) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getAdminVoteKey (owner) = (AdminVoteKey + owner) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getAdminVotePriceKey (owner) = (AdminVotePriceKey + owner) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getOracleKey (count) = (OracleKey + toString(count)) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getOracleIsProvideKey (owner) = (OracleIsProvideKey + owner) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getOracleProvidePriceKey (owner) = (OracleProvidePriceKey + owner) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func getRPDProfitKey (count) = ((RPDProfitKey + "_") + toString(count)) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func getWavesBalanceKey (owner) = (WavesBalanceKey + owner) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func getBlackSwarmPriceKey (block) = ((BlackSwarmPriceKey + "_") + toString(block)) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func getOwnerPubKeyByLeaseTxIdKey (txId) = ((ApprovedLeaseTxKey + "_") + txId) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func getIsLeasingProfitTxExistKey (txId) = ((IsLeasingProfitTxExistKey + "_") + txId) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getOrderTotalKey (orderId) = (OrderTotalKey + orderId) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func getOrderHeightKey (orderId) = (OrderHeightKey + orderId) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func getOrderStatusKey (orderId) = (OrderStatusKey + orderId) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | let price = getNumberByKey(PriceKey) | |
194 | 194 | ||
195 | 195 | func convertNeutrinoToWaves (amount) = ((((amount * 100) / price) * WAVELET) / CENTSINDOLLAR) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func convertWavesToNeutrino (amount) = ((((amount * price) / 100) * CENTSINDOLLAR) / WAVELET) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func convertNeutrinoToBond (amount) = (amount / CENTSINDOLLAR) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func convertBondToNeutrino (amount) = (amount * CENTSINDOLLAR) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount)) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | let providingInterval = getNumberByKey(ProvidingIntervalKey) | |
211 | 211 | ||
212 | 212 | let blockExpireProviding = getNumberByKey(BlockExpireProvidingKey) | |
213 | 213 | ||
214 | 214 | let isPricePending = getBoolByKey(IsPricePendingKey) | |
215 | 215 | ||
216 | 216 | let percentPriceOffset = getNumberByKey(PriceOffsetKey) | |
217 | 217 | ||
218 | 218 | let rpdSyncIndex = getNumberByKey(RPDSyncIndexKey) | |
219 | 219 | ||
220 | 220 | let voteInterval = getNumberByKey(VoteIntervalKey) | |
221 | 221 | ||
222 | 222 | let blockExpireVote = getNumberByKey(BlockExpireVoteKey) | |
223 | 223 | ||
224 | 224 | let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey) | |
225 | 225 | ||
226 | 226 | let isBlocked = getBoolByKey(IsBlockedKey) | |
227 | 227 | ||
228 | 228 | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
229 | 229 | ||
230 | 230 | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
231 | 231 | ||
232 | 232 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
233 | 233 | ||
234 | 234 | let auctionContract = getStringByKey(AuctionContractKey) | |
235 | 235 | ||
236 | 236 | let rpdContract = getStringByKey(RPDContractKey) | |
237 | 237 | ||
238 | 238 | let reserve = wavesBalance(this) | |
239 | 239 | ||
240 | 240 | let orderbook = getStringByKey(OrderbookKey) | |
241 | 241 | ||
242 | 242 | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
243 | 243 | ||
244 | 244 | let bondSupply = { | |
245 | 245 | let info = extract(assetInfo(bondAssetId)) | |
246 | 246 | (info.quantity - assetBalance(this, bondAssetId)) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | let neutrinoSupply = { | |
250 | 250 | let info = extract(assetInfo(neutrinoAssetId)) | |
251 | 251 | (info.quantity - assetBalance(this, neutrinoAssetId)) | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply) | |
255 | 255 | ||
256 | 256 | let oracleOne = getStringByKey(getOracleKey(0)) | |
257 | 257 | ||
258 | 258 | let oracleTwo = getStringByKey(getOracleKey(1)) | |
259 | 259 | ||
260 | 260 | let oracleThree = getStringByKey(getOracleKey(2)) | |
261 | 261 | ||
262 | 262 | let adminOne = getStringByKey(getAdminKey(0)) | |
263 | 263 | ||
264 | 264 | let adminTwo = getStringByKey(getAdminKey(1)) | |
265 | 265 | ||
266 | 266 | let adminThree = getStringByKey(getAdminKey(2)) | |
267 | 267 | ||
268 | 268 | func getOwnerPubKeyByLeaseTxId (owner) = getStringByAddressAndKey(rpdContract, getOwnerPubKeyByLeaseTxIdKey(owner)) | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func isLeasingProfitTxExist (txId) = getBoolByKey(getIsLeasingProfitTxExistKey(txId)) | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | func getAdminVoteInt (owner) = if (getBoolByKey(getAdminVoteKey(owner))) | |
278 | 278 | then 1 | |
279 | 279 | else 0 | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func getAdminVotePrice (owner) = getNumberByKey(getAdminVotePriceKey(owner)) | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func isOracleProvide (owner) = getBoolByKey(getOracleIsProvideKey(owner)) | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | func isOracleProvideInt (owner) = if (isOracleProvide(owner)) | |
289 | 289 | then 1 | |
290 | 290 | else 0 | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func getOracleProvidePrice (owner) = getNumberByKey(getOracleProvidePriceKey(owner)) | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner)) | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner)) | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id)) | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id)) | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id)) | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func getOrderElementById (id) = (id + LISTSPLITSYMBOL) | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | func addOrder (orderId) = (orderbook + getOrderElementById(orderId)) | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | func dropOrder (orderId) = { | |
324 | 324 | let parts = split(orderbook, getOrderElementById(orderId)) | |
325 | 325 | (parts[0] + parts[1]) | |
326 | 326 | } | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | @Callable(i) | |
330 | 330 | func setCurrentPrice (newPrice) = { | |
331 | 331 | let account = toString(i.caller) | |
332 | 332 | let priceProvidingCount = (((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) + 1) | |
333 | 333 | if (isBlocked) | |
334 | 334 | then throw("contract is blocked") | |
335 | 335 | else if (if (if ((account != oracleOne)) | |
336 | 336 | then (account != oracleTwo) | |
337 | 337 | else false) | |
338 | 338 | then (account != oracleThree) | |
339 | 339 | else false) | |
340 | 340 | then throw("permission denied") | |
341 | 341 | else if (if ((blockExpireProviding >= height)) | |
342 | 342 | then isOracleProvide(account) | |
343 | 343 | else false) | |
344 | 344 | then throw("price is already provided") | |
345 | 345 | else if (if ((height > blockExpireProviding)) | |
346 | 346 | then isPricePending | |
347 | 347 | else false) | |
348 | 348 | then throw("use finilizeCurrentPrice") | |
349 | 349 | else WriteSet([DataEntry(getOracleProvidePriceKey(account), newPrice), DataEntry(BlockExpireProvidingKey, if ((height > blockExpireProviding)) | |
350 | 350 | then (height + providingInterval) | |
351 | 351 | else blockExpireProviding), DataEntry(getOracleIsProvideKey(oracleOne), if ((height > blockExpireProviding)) | |
352 | 352 | then false | |
353 | 353 | else isOracleProvide(oracleOne)), DataEntry(getOracleIsProvideKey(oracleTwo), if ((height > blockExpireProviding)) | |
354 | 354 | then false | |
355 | 355 | else isOracleProvide(oracleTwo)), DataEntry(getOracleIsProvideKey(oracleThree), if ((height > blockExpireProviding)) | |
356 | 356 | then false | |
357 | 357 | else isOracleProvide(oracleThree)), DataEntry(getOracleIsProvideKey(account), true), DataEntry(IsPricePendingKey, if (if ((blockExpireProviding >= height)) | |
358 | 358 | then (priceProvidingCount >= 2) | |
359 | 359 | else false) | |
360 | 360 | then true | |
361 | 361 | else isPricePending)]) | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | ||
366 | 366 | @Callable(i) | |
367 | 367 | func finilizeCurrentPrice () = { | |
368 | 368 | let account = toString(i.caller) | |
369 | 369 | let priceProvidingCount = ((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) | |
370 | 370 | let newPrice = ((((getOracleProvidePrice(oracleOne) * isOracleProvideInt(oracleOne)) + (getOracleProvidePrice(oracleTwo) * isOracleProvideInt(oracleTwo))) + (getOracleProvidePrice(oracleThree) * isOracleProvideInt(oracleThree))) / priceProvidingCount) | |
371 | 371 | if (isBlocked) | |
372 | 372 | then throw("contract is blocked") | |
373 | 373 | else if (if (if ((account != oracleOne)) | |
374 | 374 | then (account != oracleTwo) | |
375 | 375 | else false) | |
376 | 376 | then (account != oracleThree) | |
377 | 377 | else false) | |
378 | 378 | then throw("permission denied") | |
379 | 379 | else if (if (!(isPricePending)) | |
380 | 380 | then true | |
381 | 381 | else (blockExpireProviding >= height)) | |
382 | 382 | then throw("wait for the end of the price providing") | |
383 | 383 | else if ((2 > priceProvidingCount)) | |
384 | 384 | then throw("2/3 oracles need to set a price") | |
385 | 385 | else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100)))) | |
386 | 386 | then true | |
387 | 387 | else ((price - ((price * percentPriceOffset) / 100)) >= newPrice)) | |
388 | 388 | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)]) | |
389 | 389 | else WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(IsPricePendingKey, false)]) | |
390 | 390 | } | |
391 | 391 | ||
392 | 392 | ||
393 | 393 | ||
394 | 394 | @Callable(i) | |
395 | 395 | func adminUnlock (newPrice) = { | |
396 | 396 | let account = toString(i.caller) | |
397 | 397 | let adminOneVote = if ((account != adminOne)) | |
398 | 398 | then getAdminVoteInt(adminOne) | |
399 | 399 | else 0 | |
400 | 400 | let adminTwoVote = if ((account != adminTwo)) | |
401 | 401 | then getAdminVoteInt(adminTwo) | |
402 | 402 | else 0 | |
403 | 403 | let adminThreeVote = if ((account != adminThree)) | |
404 | 404 | then getAdminVoteInt(adminThree) | |
405 | 405 | else 0 | |
406 | 406 | let adminOnePrice = if (((getAdminVotePrice(adminOne) * adminOneVote) == newPrice)) | |
407 | 407 | then 1 | |
408 | 408 | else 0 | |
409 | 409 | let adminTwoPrice = if (((getAdminVotePrice(adminTwo) * adminTwoVote) == newPrice)) | |
410 | 410 | then 1 | |
411 | 411 | else 0 | |
412 | 412 | let adminThreePrice = if (((getAdminVotePrice(adminThree) * adminThreeVote) == newPrice)) | |
413 | 413 | then 1 | |
414 | 414 | else 0 | |
415 | 415 | if (!(isBlocked)) | |
416 | 416 | then throw("Contract is not blocked") | |
417 | 417 | else if (if (((((adminOnePrice + adminTwoPrice) + adminThreePrice) + 1) >= 2)) | |
418 | 418 | then (blockExpireVote >= height) | |
419 | 419 | else false) | |
420 | 420 | then WriteSet([DataEntry(IsBlockedKey, false), DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0), DataEntry(BlockExpireProvidingKey, 0), DataEntry(IsPricePendingKey, false)]) | |
421 | 421 | else WriteSet([DataEntry(getAdminVotePriceKey(account), newPrice), DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote)) | |
422 | 422 | then (height + voteInterval) | |
423 | 423 | else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote)) | |
424 | 424 | then false | |
425 | 425 | else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote)) | |
426 | 426 | then false | |
427 | 427 | else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote)) | |
428 | 428 | then false | |
429 | 429 | else (adminThreeVote == 1)), DataEntry(getAdminVoteKey(account), true)]) | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | ||
434 | 434 | @Callable(i) | |
435 | 435 | func adminLock () = { | |
436 | 436 | let account = toString(i.caller) | |
437 | 437 | let adminOneVote = if ((account != adminOne)) | |
438 | 438 | then getAdminVoteInt(adminOne) | |
439 | 439 | else 1 | |
440 | 440 | let adminTwoVote = if ((account != adminTwo)) | |
441 | 441 | then getAdminVoteInt(adminTwo) | |
442 | 442 | else 1 | |
443 | 443 | let adminThreeVote = if ((account != adminThree)) | |
444 | 444 | then getAdminVoteInt(adminThree) | |
445 | 445 | else 1 | |
446 | 446 | if (isBlocked) | |
447 | 447 | then throw("Contract is blocked") | |
448 | 448 | else if ((((adminOneVote + adminTwoVote) + adminThreeVote) >= 2)) | |
449 | 449 | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0)]) | |
450 | 450 | else WriteSet([DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote)) | |
451 | 451 | then (height + voteInterval) | |
452 | 452 | else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote)) | |
453 | 453 | then false | |
454 | 454 | else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote)) | |
455 | 455 | then false | |
456 | 456 | else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote)) | |
457 | 457 | then false | |
458 | 458 | else (adminThreeVote == 1))]) | |
459 | 459 | } | |
460 | 460 | ||
461 | 461 | ||
462 | 462 | ||
463 | 463 | @Callable(i) | |
464 | 464 | func swapWavesToNeutrino () = { | |
465 | 465 | let pmt = extract(i.payment) | |
466 | 466 | if ((minWavesSwapAmount > pmt.amount)) | |
467 | 467 | then throw("amount less min") | |
468 | 468 | else if (isDefined(pmt.assetId)) | |
469 | 469 | then throw("can use waves only") | |
470 | 470 | else if (isBlocked) | |
471 | 471 | then throw("contract is blocked") | |
472 | 472 | else { | |
473 | 473 | let amount = convertWavesToNeutrino(pmt.amount) | |
474 | 474 | TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)]) | |
475 | 475 | } | |
476 | 476 | } | |
477 | 477 | ||
478 | 478 | ||
479 | 479 | ||
480 | 480 | @Callable(i) | |
481 | 481 | func swapNeutrinoToWaves () = { | |
482 | 482 | let pmt = extract(i.payment) | |
483 | 483 | if ((minNeutrinoSwapAmount > pmt.amount)) | |
484 | 484 | then throw("amount less min") | |
485 | 485 | else if (isBlocked) | |
486 | 486 | then throw("contract is blocked") | |
487 | 487 | else if ((pmt.assetId != neutrinoAssetId)) | |
488 | 488 | then throw("can use neutrino only") | |
489 | 489 | else { | |
490 | 490 | let account = toBase58String(i.caller.bytes) | |
491 | 491 | let amount = convertNeutrinoToWaves(pmt.amount) | |
492 | 492 | WriteSet([DataEntry(getWavesBalanceKey(account), (getWavesBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))]) | |
493 | 493 | } | |
494 | 494 | } | |
495 | 495 | ||
496 | 496 | ||
497 | 497 | ||
498 | 498 | @Callable(i) | |
499 | 499 | func withdraw (account) = if ((getUnlockBalanceBlock(account) > height)) | |
500 | 500 | then throw("wait a couple of blocks for withdraw") | |
501 | 501 | else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(account), getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(addressFromStringValue(account), getWavesBalance(account), unit)])) | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | ||
505 | 505 | @Callable(i) | |
506 | 506 | func generateBond () = { | |
507 | 507 | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve)) | |
508 | 508 | let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId) | |
509 | 509 | let amount = (convertNeutrinoToBond(deficit) - balanceAuction) | |
510 | 510 | if (isBlocked) | |
511 | 511 | then throw("contract is blocked") | |
512 | 512 | else if ((amount > 0)) | |
513 | 513 | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)]) | |
514 | 514 | else throw("bond were generated or do not need it") | |
515 | 515 | } | |
516 | 516 | ||
517 | 517 | ||
518 | 518 | ||
519 | 519 | @Callable(i) | |
520 | 520 | func setOrder () = { | |
521 | 521 | let pmt = extract(i.payment) | |
522 | 522 | let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)))) | |
523 | 523 | if ((pmt.assetId != bondAssetId)) | |
524 | 524 | then throw("can use bond only") | |
525 | 525 | else if ((getOrderOwner(newOrderId) != "")) | |
526 | 526 | then throw("order exists") | |
527 | 527 | 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)]) | |
528 | 528 | } | |
529 | 529 | ||
530 | 530 | ||
531 | 531 | ||
532 | 532 | @Callable(i) | |
533 | 533 | func cancelOrder (orderId) = { | |
534 | 534 | let owner = getOrderOwner(orderId) | |
535 | 535 | let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId)) | |
536 | 536 | if ((owner != toString(i.caller))) | |
537 | 537 | then throw("permission denied") | |
538 | 538 | else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)])) | |
539 | 539 | } | |
540 | 540 | ||
541 | 541 | ||
542 | 542 | ||
543 | 543 | @Callable(i) | |
544 | 544 | func addLeasingCheck (id) = { | |
545 | 545 | let tx = value(transferTransactionById(fromBase58String(id))) | |
546 | 546 | if (if ((tx.recipient != addressFromStringValue(rpdContract))) | |
547 | 547 | then true | |
548 | 548 | else isLeasingProfitTxExist(id)) | |
549 | 549 | then throw("invalid transaction id") | |
550 | 550 | else { | |
551 | 551 | let amount = convertWavesToNeutrino(tx.amount) | |
552 | 552 | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
553 | 553 | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), amount), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId)), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, bondAssetId), getRPDContractBalance(bondAssetId)), DataEntry(getIsLeasingProfitTxExistKey(id), true)]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), amount, neutrinoAssetId)])) | |
554 | 554 | } | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | ||
559 | 559 | @Callable(i) | |
560 | 560 | func executeOrder () = { | |
561 | 561 | let orderId = split(orderbook, LISTSPLITSYMBOL)[0] | |
562 | 562 | let orderTotal = getOrderTotal(orderId) | |
563 | 563 | let orderOwner = getOrderOwner(orderId) | |
564 | 564 | let filledTotal = getOrderFilledTotal(orderId) | |
565 | 565 | if (isBlocked) | |
566 | 566 | then throw("contract is blocked") | |
567 | 567 | else if ((0 >= surplus)) | |
568 | 568 | then throw("surplus is less than zero") | |
569 | 569 | else if ((orderOwner == "")) | |
570 | 570 | then { | |
571 | 571 | let newRpdSyncIndex = (rpdSyncIndex + 1) | |
572 | 572 | ScriptResult(WriteSet([DataEntry(RPDSyncIndexKey, newRpdSyncIndex), DataEntry(getRPDProfitKey(rpdSyncIndex), surplus), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, neutrinoAssetId), getRPDContractBalance(neutrinoAssetId)), DataEntry(getRPDSnapshotContractBalanceKey(rpdSyncIndex, bondAssetId), getRPDContractBalance(bondAssetId))]), TransferSet([ScriptTransfer(addressFromStringValue(rpdContract), surplus, neutrinoAssetId)])) | |
573 | 573 | } | |
574 | 574 | else { | |
575 | 575 | let amount = (orderTotal - filledTotal) | |
576 | 576 | let surplusBond = convertNeutrinoToBond(surplus) | |
577 | 577 | let status = if ((surplusBond >= amount)) | |
578 | 578 | then FILLED | |
579 | 579 | else NEW | |
580 | 580 | let newFilledTotal = if ((surplusBond >= amount)) | |
581 | 581 | then orderTotal | |
582 | 582 | else surplusBond | |
583 | 583 | ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)])) | |
584 | 584 | } | |
585 | 585 | } | |
586 | 586 | ||
587 | 587 | ||
588 | 588 | ||
589 | 589 | @Callable(i) | |
590 | 590 | func transfer (account) = { | |
591 | 591 | let pmt = extract(i.payment) | |
592 | 592 | if (isDefined(pmt.assetId)) | |
593 | 593 | then throw("can use waves only at the moment") | |
594 | 594 | else TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, unit)]) | |
595 | 595 | } | |
596 | 596 | ||
597 | 597 | ||
598 | 598 | @Verifier(tx) | |
599 | 599 | func verify () = match tx { | |
600 | 600 | case leaseTx: LeaseTransaction => | |
601 | 601 | sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(leaseTx.id)))) | |
602 | 602 | case unleaseTx: LeaseCancelTransaction => | |
603 | 603 | sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getOwnerPubKeyByLeaseTxId(toBase58String(unleaseTx.leaseId)))) | |
604 | 604 | case _ => | |
605 | 605 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
606 | 606 | } | |
607 | 607 |
github/deemru/w8io/026f985 47.39 ms ◑