tx · GhxM5bqNkiUffHBX63xbHQXXAQFCQpovePhYsSusiS24 3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj: -0.01400000 Waves 2019.09.28 00:12 [695364] smart account 3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj > SELF 0.00000000 Waves
{ "type": 13, "id": "GhxM5bqNkiUffHBX63xbHQXXAQFCQpovePhYsSusiS24", "fee": 1400000, "feeAssetId": null, "timestamp": 1569618829265, "version": 1, "sender": "3N4Pj4MutKVgrmcuX7jgyVGWoBhDyKYFZBj", "senderPublicKey": "7YuxEiQSearE3DvFS84DXzV5gad9qxsq4bTy633SAYBj", "proofs": [ "477sdXhmug9L6Nei2vQSUx6ejox3zEGD1E9idoXL1Q3uhfeijMd8kNhFxterwMhZRzHQ5FPsBLAwbjvKtgsta5tK" ], "script": "base64:AAIDAAAAAAAAAAAAAABhAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcAAAAAD0xJU1RTUExJVFNZTUJPTAIAAAABXwAAAAAOTElTVERBVEFTWU1CT0wCAAAAASsAAAAAB1dBVkVMRVQAAAAAA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kABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAACm9yZGVyT3duZXIJAQAAABVjb252ZXJ0Qm9uZFRvTmV1dHJpbm8AAAABBQAAAA5uZXdGaWxsZWRUb3RhbAUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAO1fVaA==", "chainId": 84, "height": 695364, "spentComplexity": 0 } View: original | compacted Prev: EvEr8vfer8vsQBt7b8dFCXnBA5cd7X9H9Gsg7A92f645 Next: 2UDw7KpHif9q93RB2CAmmJdT4Qpig1YwPsAeEPU5fayx 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 | let LISTSPLITSYMBOL = "_" | |
29 | 29 | ||
30 | 30 | let LISTDATASYMBOL = "+" | |
31 | 31 | ||
32 | 32 | let WAVELET = 100000000 | |
33 | 33 | ||
34 | 34 | let CANCELED = "canceled" | |
35 | 35 | ||
36 | 36 | let NEW = "new" | |
37 | 37 | ||
38 | 38 | let FILLED = "filled" | |
39 | 39 | ||
40 | 40 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
41 | 41 | ||
42 | 42 | let BondAssetIdKey = "bond_asset_id" | |
43 | 43 | ||
44 | 44 | let AuctionContractKey = "auction_contract" | |
45 | 45 | ||
46 | 46 | let BalanceLockIntervalKey = "balance_lock_interval" | |
47 | 47 | ||
48 | 48 | let VoteIntervalKey = "vote_interval" | |
49 | 49 | ||
50 | 50 | let MinSwapAmountKey = "min_swap_amount" | |
51 | 51 | ||
52 | 52 | let PriceOffsetKey = "price_offset" | |
53 | 53 | ||
54 | 54 | let ProvidingIntervalKey = "providing_interval" | |
55 | 55 | ||
56 | 56 | let PriceKey = "price" | |
57 | 57 | ||
58 | 58 | let NeutrinoBalanceKey = "neutrino_" | |
59 | 59 | ||
60 | 60 | let WavesBalanceKey = "waves_" | |
61 | 61 | ||
62 | 62 | let BalanceUnlockBlockKey = "balance_block_" | |
63 | 63 | ||
64 | 64 | let OrderbookKey = "orderbook" | |
65 | 65 | ||
66 | 66 | let OrderTotalKey = "order_total_" | |
67 | 67 | ||
68 | 68 | let OrderOwnerKey = "order_owner_" | |
69 | 69 | ||
70 | 70 | let OrderHeightKey = "order_height_" | |
71 | 71 | ||
72 | 72 | let OrderFilledTotalKey = "order_filled_total_" | |
73 | 73 | ||
74 | 74 | let OrderStatusKey = "order_status_" | |
75 | 75 | ||
76 | 76 | let IsBlockedKey = "is_blocked" | |
77 | 77 | ||
78 | 78 | let BlackSwarmPriceKey = "black_swarm_price" | |
79 | 79 | ||
80 | 80 | let AdminVoteKey = "admin_vote_" | |
81 | 81 | ||
82 | 82 | let AdminVotePriceKey = "admin_vote_price_" | |
83 | 83 | ||
84 | 84 | let BlockExpireVoteKey = "vote_expire_block" | |
85 | 85 | ||
86 | 86 | let AdminKey = "admin_" | |
87 | 87 | ||
88 | 88 | let IsPricePendingKey = "is_pending_price" | |
89 | 89 | ||
90 | 90 | let OracleKey = "oracle_" | |
91 | 91 | ||
92 | 92 | let OracleIsProvideKey = "oracle_is_provide_" | |
93 | 93 | ||
94 | 94 | let OracleProvidePriceKey = "oracle_price_provide_" | |
95 | 95 | ||
96 | 96 | let BlockExpireProvidingKey = "providing_expire_block" | |
97 | 97 | ||
98 | 98 | func getAdminKey (count) = (AdminKey + toString(count)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getAdminVoteKey (owner) = (AdminVoteKey + owner) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getAdminVotePriceKey (owner) = (AdminVotePriceKey + owner) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getOracleKey (count) = (OracleKey + toString(count)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getOracleIsProvideKey (owner) = (OracleIsProvideKey + owner) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getOracleProvidePriceKey (owner) = (OracleProvidePriceKey + owner) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getWavesBalanceKey (owner) = (WavesBalanceKey + owner) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getBlackSwarmPriceKey (block) = ((BlackSwarmPriceKey + "_") + toString(block)) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getOrderTotalKey (orderId) = (OrderTotalKey + orderId) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getOrderHeightKey (orderId) = (OrderHeightKey + orderId) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getOrderStatusKey (orderId) = (OrderStatusKey + orderId) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | let price = getNumberByKey(PriceKey) | |
147 | 147 | ||
148 | 148 | func convertNeutrinoToWaves (amount) = ((amount * 100) / price) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func convertWavesToNeutrino (amount) = ((amount * price) / 100) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func convertNeutrinoToBond (amount) = (amount / WAVELET) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func convertBondToNeutrino (amount) = (amount * WAVELET) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount)) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | let providingInterval = getNumberByKey(ProvidingIntervalKey) | |
164 | 164 | ||
165 | 165 | let blockExpireProviding = getNumberByKey(BlockExpireProvidingKey) | |
166 | 166 | ||
167 | 167 | let isPricePending = getBoolByKey(IsPricePendingKey) | |
168 | 168 | ||
169 | 169 | let percentPriceOffset = getNumberByKey(PriceOffsetKey) | |
170 | 170 | ||
171 | 171 | let voteInterval = getNumberByKey(VoteIntervalKey) | |
172 | 172 | ||
173 | 173 | let blockExpireVote = getNumberByKey(BlockExpireVoteKey) | |
174 | 174 | ||
175 | 175 | let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey) | |
176 | 176 | ||
177 | 177 | let isBlocked = getBoolByKey(IsBlockedKey) | |
178 | 178 | ||
179 | 179 | let minSwapAmount = getNumberByKey(MinSwapAmountKey) | |
180 | 180 | ||
181 | 181 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
182 | 182 | ||
183 | 183 | let auctionContract = getStringByKey(AuctionContractKey) | |
184 | 184 | ||
185 | 185 | let reserve = wavesBalance(this) | |
186 | 186 | ||
187 | 187 | let orderbook = getStringByKey(OrderbookKey) | |
188 | 188 | ||
189 | 189 | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
190 | 190 | ||
191 | 191 | let bondSupply = { | |
192 | 192 | let info = extract(assetInfo(bondAssetId)) | |
193 | 193 | (info.quantity - assetBalance(this, bondAssetId)) | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | let neutrinoSupply = { | |
197 | 197 | let info = extract(assetInfo(neutrinoAssetId)) | |
198 | 198 | (info.quantity - assetBalance(this, neutrinoAssetId)) | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply) | |
202 | 202 | ||
203 | 203 | let oracleOne = getStringByKey(getOracleKey(0)) | |
204 | 204 | ||
205 | 205 | let oracleTwo = getStringByKey(getOracleKey(1)) | |
206 | 206 | ||
207 | 207 | let oracleThree = getStringByKey(getOracleKey(2)) | |
208 | 208 | ||
209 | 209 | let adminOne = getStringByKey(getAdminKey(0)) | |
210 | 210 | ||
211 | 211 | let adminTwo = getStringByKey(getAdminKey(1)) | |
212 | 212 | ||
213 | 213 | let adminThree = getStringByKey(getAdminKey(2)) | |
214 | 214 | ||
215 | 215 | func getAdminVoteInt (owner) = if (getBoolByKey(getAdminVoteKey(owner))) | |
216 | 216 | then 1 | |
217 | 217 | else 0 | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func getAdminVotePrice (owner) = getNumberByKey(getAdminVotePriceKey(owner)) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func isOracleProvide (owner) = getBoolByKey(getOracleIsProvideKey(owner)) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func isOracleProvideInt (owner) = if (isOracleProvide(owner)) | |
227 | 227 | then 1 | |
228 | 228 | else 0 | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func getOracleProvidePrice (owner) = getNumberByKey(getOracleProvidePriceKey(owner)) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner)) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner)) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id)) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id)) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id)) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func getOrderElementById (id) = (id + LISTSPLITSYMBOL) | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func addOrder (orderId) = (orderbook + getOrderElementById(orderId)) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func dropOrder (orderId) = { | |
259 | 259 | let parts = split(orderbook, getOrderElementById(orderId)) | |
260 | 260 | (parts[0] + parts[1]) | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | @Callable(i) | |
265 | 265 | func setCurrentPrice (newPrice) = { | |
266 | 266 | let account = toString(i.caller) | |
267 | 267 | let priceProvidingCount = (((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) + 1) | |
268 | 268 | if (isBlocked) | |
269 | 269 | then throw("contract is blocked") | |
270 | 270 | else if (if (if ((account != oracleOne)) | |
271 | 271 | then (account != oracleTwo) | |
272 | 272 | else false) | |
273 | 273 | then (account != oracleThree) | |
274 | 274 | else false) | |
275 | 275 | then throw("permission denied") | |
276 | 276 | else if (if ((blockExpireProviding >= height)) | |
277 | 277 | then isOracleProvide(account) | |
278 | 278 | else false) | |
279 | 279 | then throw("price is already provided") | |
280 | 280 | else if (if ((height > blockExpireProviding)) | |
281 | 281 | then isPricePending | |
282 | 282 | else false) | |
283 | 283 | then throw("use finilizeCurrentPrice") | |
284 | 284 | else WriteSet([DataEntry(getOracleProvidePriceKey(account), newPrice), DataEntry(BlockExpireProvidingKey, if ((height > blockExpireProviding)) | |
285 | 285 | then (height + providingInterval) | |
286 | 286 | else blockExpireProviding), DataEntry(getOracleIsProvideKey(oracleOne), if ((height > blockExpireProviding)) | |
287 | 287 | then false | |
288 | 288 | else isOracleProvide(oracleOne)), DataEntry(getOracleIsProvideKey(oracleTwo), if ((height > blockExpireProviding)) | |
289 | 289 | then false | |
290 | 290 | else isOracleProvide(oracleTwo)), DataEntry(getOracleIsProvideKey(oracleThree), if ((height > blockExpireProviding)) | |
291 | 291 | then false | |
292 | 292 | else isOracleProvide(oracleThree)), DataEntry(getOracleIsProvideKey(account), true), DataEntry(IsPricePendingKey, if (if ((blockExpireProviding >= height)) | |
293 | 293 | then (priceProvidingCount >= 2) | |
294 | 294 | else false) | |
295 | 295 | then true | |
296 | 296 | else isPricePending)]) | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | ||
301 | 301 | @Callable(i) | |
302 | 302 | func finilizeCurrentPrice () = { | |
303 | 303 | let account = toString(i.caller) | |
304 | 304 | let priceProvidingCount = ((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) | |
305 | 305 | let newPrice = ((((getOracleProvidePrice(oracleOne) * isOracleProvideInt(oracleOne)) + (getOracleProvidePrice(oracleTwo) * isOracleProvideInt(oracleTwo))) + (getOracleProvidePrice(oracleThree) * isOracleProvideInt(oracleThree))) / priceProvidingCount) | |
306 | 306 | if (isBlocked) | |
307 | 307 | then throw("contract is blocked") | |
308 | 308 | else if (if (if ((account != oracleOne)) | |
309 | 309 | then (account != oracleTwo) | |
310 | 310 | else false) | |
311 | 311 | then (account != oracleThree) | |
312 | 312 | else false) | |
313 | 313 | then throw("permission denied") | |
314 | 314 | else if (if (!(isPricePending)) | |
315 | 315 | then true | |
316 | 316 | else (blockExpireProviding >= height)) | |
317 | 317 | then throw("wait for the end of the price providing") | |
318 | 318 | else if ((2 > priceProvidingCount)) | |
319 | 319 | then throw("2/3 oracles need to set a price") | |
320 | 320 | else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100)))) | |
321 | 321 | then true | |
322 | 322 | else ((price - ((price * percentPriceOffset) / 100)) >= newPrice)) | |
323 | 323 | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)]) | |
324 | 324 | else WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(IsPricePendingKey, false)]) | |
325 | 325 | } | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | ||
329 | 329 | @Callable(i) | |
330 | 330 | func adminUnlock (newPrice) = { | |
331 | 331 | let account = toString(i.caller) | |
332 | 332 | let adminOneVote = if ((account != adminOne)) | |
333 | 333 | then getAdminVoteInt(adminOne) | |
334 | 334 | else 0 | |
335 | 335 | let adminTwoVote = if ((account != adminTwo)) | |
336 | 336 | then getAdminVoteInt(adminTwo) | |
337 | 337 | else 0 | |
338 | 338 | let adminThreeVote = if ((account != adminThree)) | |
339 | 339 | then getAdminVoteInt(adminThree) | |
340 | 340 | else 0 | |
341 | 341 | let adminOnePrice = if (((getAdminVotePrice(adminOne) * adminOneVote) == newPrice)) | |
342 | 342 | then 1 | |
343 | 343 | else 0 | |
344 | 344 | let adminTwoPrice = if (((getAdminVotePrice(adminTwo) * adminTwoVote) == newPrice)) | |
345 | 345 | then 1 | |
346 | 346 | else 0 | |
347 | 347 | let adminThreePrice = if (((getAdminVotePrice(adminThree) * adminThreeVote) == newPrice)) | |
348 | 348 | then 1 | |
349 | 349 | else 0 | |
350 | 350 | if (!(isBlocked)) | |
351 | 351 | then throw("Contract is not blocked") | |
352 | 352 | else if (if (((((adminOnePrice + adminTwoPrice) + adminThreePrice) + 1) >= 2)) | |
353 | 353 | then (blockExpireVote >= height) | |
354 | 354 | else false) | |
355 | 355 | 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)]) | |
356 | 356 | else WriteSet([DataEntry(getAdminVotePriceKey(account), newPrice), DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote)) | |
357 | 357 | then (height + voteInterval) | |
358 | 358 | else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote)) | |
359 | 359 | then false | |
360 | 360 | else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote)) | |
361 | 361 | then false | |
362 | 362 | else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote)) | |
363 | 363 | then false | |
364 | 364 | else (adminThreeVote == 1)), DataEntry(getAdminVoteKey(account), true)]) | |
365 | 365 | } | |
366 | 366 | ||
367 | 367 | ||
368 | 368 | ||
369 | 369 | @Callable(i) | |
370 | 370 | func adminLock () = { | |
371 | 371 | let account = toString(i.caller) | |
372 | 372 | let adminOneVote = if ((account != adminOne)) | |
373 | 373 | then getAdminVoteInt(adminOne) | |
374 | 374 | else 1 | |
375 | 375 | let adminTwoVote = if ((account != adminTwo)) | |
376 | 376 | then getAdminVoteInt(adminTwo) | |
377 | 377 | else 1 | |
378 | 378 | let adminThreeVote = if ((account != adminThree)) | |
379 | 379 | then getAdminVoteInt(adminThree) | |
380 | 380 | else 1 | |
381 | 381 | if (isBlocked) | |
382 | 382 | then throw("Contract is blocked") | |
383 | 383 | else if ((((adminOneVote + adminTwoVote) + adminThreeVote) >= 2)) | |
384 | 384 | then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0)]) | |
385 | 385 | else WriteSet([DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote)) | |
386 | 386 | then (height + voteInterval) | |
387 | 387 | else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote)) | |
388 | 388 | then false | |
389 | 389 | else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote)) | |
390 | 390 | then false | |
391 | 391 | else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote)) | |
392 | 392 | then false | |
393 | 393 | else (adminThreeVote == 1))]) | |
394 | 394 | } | |
395 | 395 | ||
396 | 396 | ||
397 | 397 | ||
398 | 398 | @Callable(i) | |
399 | 399 | func swapWavesToNeutrino () = { | |
400 | 400 | let pmt = extract(i.payment) | |
401 | 401 | if ((minSwapAmount > pmt.amount)) | |
402 | 402 | then throw("amount less min") | |
403 | 403 | else if (isDefined(pmt.assetId)) | |
404 | 404 | then throw("can use waves only") | |
405 | 405 | else if (isBlocked) | |
406 | 406 | then throw("contract is blocked") | |
407 | 407 | else { | |
408 | 408 | let account = toBase58String(i.caller.bytes) | |
409 | 409 | let amount = convertWavesToNeutrino(pmt.amount) | |
410 | 410 | WriteSet([DataEntry(getNeutrinoBalanceKey(account), (getNeutrinoBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))]) | |
411 | 411 | } | |
412 | 412 | } | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | ||
416 | 416 | @Callable(i) | |
417 | 417 | func swapNeutrinoToWaves () = { | |
418 | 418 | let pmt = extract(i.payment) | |
419 | 419 | if ((minSwapAmount > pmt.amount)) | |
420 | 420 | then throw("amount less min") | |
421 | 421 | else if (isBlocked) | |
422 | 422 | then throw("contract is blocked") | |
423 | 423 | else if ((pmt.assetId != neutrinoAssetId)) | |
424 | 424 | then throw("can use neutrino only") | |
425 | 425 | else { | |
426 | 426 | let account = toBase58String(i.caller.bytes) | |
427 | 427 | let amount = convertNeutrinoToWaves(pmt.amount) | |
428 | 428 | WriteSet([DataEntry(getWavesBalanceKey(account), (getWavesBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))]) | |
429 | 429 | } | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | ||
434 | 434 | @Callable(i) | |
435 | 435 | func withdraw (account) = if ((getUnlockBalanceBlock(account) > height)) | |
436 | 436 | then throw("wait a couple of blocks for withdraw") | |
437 | 437 | else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(account), getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(addressFromStringValue(account), getWavesBalance(account), unit)])) | |
438 | 438 | ||
439 | 439 | ||
440 | 440 | ||
441 | 441 | @Callable(i) | |
442 | 442 | func generateBond () = { | |
443 | 443 | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve)) | |
444 | 444 | let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId) | |
445 | 445 | let amount = (convertNeutrinoToBond(deficit) - balanceAuction) | |
446 | 446 | if (isBlocked) | |
447 | 447 | then throw("contract is blocked") | |
448 | 448 | else if ((amount > 0)) | |
449 | 449 | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)]) | |
450 | 450 | else throw("bond were generated or do not need it") | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | ||
455 | 455 | @Callable(i) | |
456 | 456 | func setOrder () = { | |
457 | 457 | let pmt = extract(i.payment) | |
458 | 458 | let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)))) | |
459 | 459 | if ((pmt.assetId != bondAssetId)) | |
460 | 460 | then throw("can use bond only") | |
461 | 461 | else if ((getOrderOwner(newOrderId) != "")) | |
462 | 462 | then throw("order exists") | |
463 | 463 | 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)]) | |
464 | 464 | } | |
465 | 465 | ||
466 | 466 | ||
467 | 467 | ||
468 | 468 | @Callable(i) | |
469 | 469 | func cancelOrder (orderId) = { | |
470 | 470 | let owner = getOrderOwner(orderId) | |
471 | 471 | let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId)) | |
472 | 472 | if ((owner != toString(i.caller))) | |
473 | 473 | then throw("permission denied") | |
474 | 474 | else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)])) | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
479 | 479 | @Callable(i) | |
480 | 480 | func executeOrder () = { | |
481 | 481 | let orderId = split(orderbook, LISTSPLITSYMBOL)[0] | |
482 | 482 | let orderTotal = getOrderTotal(orderId) | |
483 | 483 | let orderOwner = getOrderOwner(orderId) | |
484 | 484 | let filledTotal = getOrderFilledTotal(orderId) | |
485 | 485 | if (isBlocked) | |
486 | 486 | then throw("contract is blocked") | |
487 | 487 | else if ((0 >= surplus)) | |
488 | 488 | then throw("surplus is less than zero") | |
489 | 489 | else { | |
490 | 490 | let amount = (orderTotal - filledTotal) | |
491 | 491 | let surplusBond = convertNeutrinoToBond(surplus) | |
492 | 492 | let status = if ((surplusBond >= amount)) | |
493 | 493 | then FILLED | |
494 | 494 | else NEW | |
495 | 495 | let newFilledTotal = if ((surplusBond >= amount)) | |
496 | 496 | then orderTotal | |
497 | 497 | else surplusBond | |
498 | 498 | ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)])) | |
499 | 499 | } | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 |
github/deemru/w8io/026f985 40.21 ms ◑