tx · CbuxTXgujJpCcxsWrCB5c8yy6653gmqZrQPpTe6hQc3q 3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62: -0.02000000 Waves 2021.01.22 19:18 [1364906] smart account 3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62 > SELF 0.00000000 Waves
{ "type": 13, "id": "CbuxTXgujJpCcxsWrCB5c8yy6653gmqZrQPpTe6hQc3q", "fee": 2000000, "feeAssetId": null, "timestamp": 1611332283609, "version": 1, "sender": "3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62", "senderPublicKey": "6PBV8fVJwLaUQbCyG7iqoKR3x1nqFRZFNeuN9qodoiTu", "proofs": [ "4gijk7EG1ukcmaw2E6BJQuWptjM4cxVENHujs5xXB7jvYRyh4sersr24Tfmeeh4sDKBPxJHLfazgBJr3hL9h5sKF", "64bifFtpFz8YHEFAy52vHdn6bKd4NDboXs4eNinVB9vwsLkCB7hP1mUDspDrBuSHBTkUhxpZxG3YdKbhjBokRM7p", "33ohysNDNhMJzNc6ZTr1xZYh7aVzKkjhpERnR9RinLwnQQ3ZpMc4hWbGuKKQMWWApY4Rjy9W5nFMw4qrk4iUwNMA" ], "script": "base64:AAIEAAAAAAAAABEIAhIECgIBCBIAEgMKAQgSAAAAADsBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkHAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbmRL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AAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADbru9Hg==", "chainId": 84, "height": 1364906, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 51vNC5dKpKsd6aahk5aZbbZKKMT5vHpbDmz9JV6frXRv Next: none Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
38 | 38 | ||
39 | 39 | let ControlContractKey = "control_contract" | |
40 | + | ||
41 | + | let AuctionContractKey = "auction_contract" | |
40 | 42 | ||
41 | 43 | let BalanceLockedkKey = "balance_lock_" | |
42 | 44 | ||
84 | 86 | let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey)) | |
85 | 87 | ||
86 | 88 | let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey)) | |
89 | + | ||
90 | + | let auctionContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, AuctionContractKey)) | |
87 | 91 | ||
88 | 92 | let liquidationContract = this | |
89 | 93 | ||
297 | 301 | then nextOrder | |
298 | 302 | else firstOrder), IntegerEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), StringEntry(getOrderStatusKey(firstOrder), newStatus), StringEntry(CurrentDefaultOrderKey, if ((newStatus == NEW)) | |
299 | 303 | then currentDefaultOrder | |
300 | - | else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer( | |
304 | + | else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(auctionContract, finalNBTFillable, bondAssetId)] | |
301 | 305 | } | |
302 | 306 | } | |
303 | 307 | } | |
305 | 309 | ||
306 | 310 | @Verifier(tx) | |
307 | 311 | func verify () = { | |
308 | - | let pubKeyAdminsList = [" | |
312 | + | let pubKeyAdminsList = ["GJdLSaLiv5K7xuejac8mcRcHoyo3dPrESrvktG3a6MAR", "3xumx4hrPpeeoo79HLGbZCgfz95L39ZFdxxwWeSUC2Pu", "D4CqtK5fBsnzRo33ZMhrM7niLseDH2uRoK6weBq2JQ3A", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
309 | 313 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
310 | 314 | then 1 | |
311 | 315 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let WAVELET = 100000000 | |
20 | 20 | ||
21 | 21 | let PAULI = 1000000 | |
22 | 22 | ||
23 | 23 | let PRICELET = 1000000 | |
24 | 24 | ||
25 | 25 | let CANCELED = "canceled" | |
26 | 26 | ||
27 | 27 | let NEW = "new" | |
28 | 28 | ||
29 | 29 | let FILLED = "filled" | |
30 | 30 | ||
31 | 31 | let NeutrinoContractKey = "neutrino_contract" | |
32 | 32 | ||
33 | 33 | let PriceKey = "price" | |
34 | 34 | ||
35 | 35 | let BondAssetIdKey = "bond_asset_id" | |
36 | 36 | ||
37 | 37 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
38 | 38 | ||
39 | 39 | let ControlContractKey = "control_contract" | |
40 | + | ||
41 | + | let AuctionContractKey = "auction_contract" | |
40 | 42 | ||
41 | 43 | let BalanceLockedkKey = "balance_lock_" | |
42 | 44 | ||
43 | 45 | let WavesLockedBalanceKey = (BalanceLockedkKey + "waves") | |
44 | 46 | ||
45 | 47 | let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino") | |
46 | 48 | ||
47 | 49 | let FirstOrderKey = "order_first" | |
48 | 50 | ||
49 | 51 | let CurrentDefaultOrderKey = "order_default" | |
50 | 52 | ||
51 | 53 | func getOrderPriceKey (orderId) = ("order_price_" + orderId) | |
52 | 54 | ||
53 | 55 | ||
54 | 56 | func getOrderTotalKey (orderId) = ("order_total_" + orderId) | |
55 | 57 | ||
56 | 58 | ||
57 | 59 | func getOrderOwnerKey (orderId) = ("order_owner_" + orderId) | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | func getOrderHeightKey (orderId) = ("order_height_" + orderId) | |
61 | 63 | ||
62 | 64 | ||
63 | 65 | func getOrderStatusKey (orderId) = ("order_status_" + orderId) | |
64 | 66 | ||
65 | 67 | ||
66 | 68 | func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId) | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func getPrevOrderKey (orderId) = ("order_prev_" + orderId) | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | func getNextOrderKey (orderId) = ("order_next_" + orderId) | |
73 | 75 | ||
74 | 76 | ||
75 | 77 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
76 | 78 | ||
77 | 79 | ||
78 | 80 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
79 | 81 | ||
80 | 82 | ||
81 | 83 | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
82 | 84 | ||
83 | 85 | ||
84 | 86 | let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey)) | |
85 | 87 | ||
86 | 88 | let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey)) | |
89 | + | ||
90 | + | let auctionContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, AuctionContractKey)) | |
87 | 91 | ||
88 | 92 | let liquidationContract = this | |
89 | 93 | ||
90 | 94 | let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey)) | |
91 | 95 | ||
92 | 96 | let bondAssetId = fromBase58String("BGhPYquXSK6UYjnPLEn94gFhetp4Jvf7toekEY4x1VDH") | |
93 | 97 | ||
94 | 98 | let firstOrder = getStringByKey(FirstOrderKey) | |
95 | 99 | ||
96 | 100 | let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked") | |
97 | 101 | ||
98 | 102 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
99 | 103 | ||
100 | 104 | let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey) | |
101 | 105 | ||
102 | 106 | let wavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey) | |
103 | 107 | ||
104 | 108 | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
105 | 109 | ||
106 | 110 | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
107 | 111 | ||
108 | 112 | let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply) | |
109 | 113 | ||
110 | 114 | func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id)) | |
111 | 115 | ||
112 | 116 | ||
113 | 117 | func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id)) | |
114 | 118 | ||
115 | 119 | ||
116 | 120 | func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id)) | |
117 | 121 | ||
118 | 122 | ||
119 | 123 | func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id)) | |
120 | 124 | ||
121 | 125 | ||
122 | 126 | func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id)) | |
123 | 127 | ||
124 | 128 | ||
125 | 129 | func getOrderHeight (id) = getNumberByKey(getOrderHeightKey(id)) | |
126 | 130 | ||
127 | 131 | ||
128 | 132 | func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id)) | |
129 | 133 | ||
130 | 134 | ||
131 | 135 | func getNextOrder (id) = getStringByKey(getNextOrderKey(id)) | |
132 | 136 | ||
133 | 137 | ||
134 | 138 | let currentDefaultOrder = getStringByKey(CurrentDefaultOrderKey) | |
135 | 139 | ||
136 | 140 | func generateDataEntryToAddOrder (price,newOrderId,i,prevOrder,nextOrder,firstOrder) = { | |
137 | 141 | let amount = value(i.payments[0]).amount | |
138 | 142 | let isOneForOneOrder = (price == 100) | |
139 | 143 | let isFirstOrderEmty = (firstOrder == "") | |
140 | 144 | let isNewOrderPriceLowerThanCurrentFirstOrder = (getOrderPrice(firstOrder) > price) | |
141 | 145 | let newFirstOrder = if (isFirstOrderEmty) | |
142 | 146 | then newOrderId | |
143 | 147 | else if (isNewOrderPriceLowerThanCurrentFirstOrder) | |
144 | 148 | then newOrderId | |
145 | 149 | else firstOrder | |
146 | 150 | [StringEntry(getPrevOrderKey(newOrderId), prevOrder), StringEntry(getNextOrderKey(newOrderId), nextOrder), StringEntry(getNextOrderKey(prevOrder), if ((prevOrder == "")) | |
147 | 151 | then prevOrder | |
148 | 152 | else newOrderId), StringEntry(getPrevOrderKey(nextOrder), if ((nextOrder == "")) | |
149 | 153 | then nextOrder | |
150 | 154 | else newOrderId), StringEntry(FirstOrderKey, newFirstOrder), IntegerEntry(getOrderPriceKey(newOrderId), price), IntegerEntry(getOrderTotalKey(newOrderId), amount), StringEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), IntegerEntry(getOrderHeightKey(newOrderId), height), StringEntry(getOrderStatusKey(newOrderId), NEW), StringEntry(CurrentDefaultOrderKey, if (isOneForOneOrder) | |
151 | 155 | then newOrderId | |
152 | 156 | else currentDefaultOrder)] | |
153 | 157 | } | |
154 | 158 | ||
155 | 159 | ||
156 | 160 | func internalAddLiquidationOrder (i,price,prevOrder) = { | |
157 | 161 | let pmt = value(i.payments[0]) | |
158 | 162 | let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId))) | |
159 | 163 | let owner = toString(i.caller) | |
160 | 164 | let isEmptyPrevOrder = (prevOrder == "") | |
161 | 165 | let isEmptyFirstOrder = (firstOrder == "") | |
162 | 166 | if (isBlocked) | |
163 | 167 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
164 | 168 | else if ((PAULI > pmt.amount)) | |
165 | 169 | then throw("order amount should be higher than 1 NSBT") | |
166 | 170 | else if ((100 > price)) | |
167 | 171 | then throw(("price should be equal or higher than 1 nsbt for 1 usdn. i.e. >= 100; price: " + toString(price))) | |
168 | 172 | else if ((pmt.assetId != bondAssetId)) | |
169 | 173 | then throw("can use appropriate neutrino base tokens (nsbt) only") | |
170 | 174 | else if ((getOrderOwner(newOrderId) != "")) | |
171 | 175 | then throw("the order already exists") | |
172 | 176 | else if (if (!(isEmptyPrevOrder)) | |
173 | 177 | then (getOrderStatus(prevOrder) != NEW) | |
174 | 178 | else false) | |
175 | 179 | then throw("prev order status is not new") | |
176 | 180 | else if (if (isEmptyFirstOrder) | |
177 | 181 | then !(isEmptyPrevOrder) | |
178 | 182 | else false) | |
179 | 183 | then throw("wrong prev order parameter") | |
180 | 184 | else { | |
181 | 185 | let nextOrder = if (isEmptyPrevOrder) | |
182 | 186 | then firstOrder | |
183 | 187 | else getNextOrder(prevOrder) | |
184 | 188 | let isEmptyNextOrder = (nextOrder == "") | |
185 | 189 | if (isEmptyFirstOrder) | |
186 | 190 | then generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder) | |
187 | 191 | else { | |
188 | 192 | let nextOrderPrice = getNumberByKey(getOrderPriceKey(nextOrder)) | |
189 | 193 | let prevOrderPrice = getNumberByKey(getOrderPriceKey(prevOrder)) | |
190 | 194 | let isNextOrderError = if (!(isEmptyNextOrder)) | |
191 | 195 | then (price >= nextOrderPrice) | |
192 | 196 | else false | |
193 | 197 | let isPrevOrderError = if (!(isEmptyPrevOrder)) | |
194 | 198 | then (prevOrderPrice > price) | |
195 | 199 | else false | |
196 | 200 | if (if (isNextOrderError) | |
197 | 201 | then true | |
198 | 202 | else isPrevOrderError) | |
199 | 203 | then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError))) | |
200 | 204 | else generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder) | |
201 | 205 | } | |
202 | 206 | } | |
203 | 207 | } | |
204 | 208 | ||
205 | 209 | ||
206 | 210 | func computeCurrentDefaultOrder (id) = if ((id != currentDefaultOrder)) | |
207 | 211 | then currentDefaultOrder | |
208 | 212 | else "" | |
209 | 213 | ||
210 | 214 | ||
211 | 215 | @Callable(i) | |
212 | 216 | func addLiquidationOrderWithPrice (price,prevOrder) = throw("Method has been deprecated: please use addLiquidationOrder method without parameters") | |
213 | 217 | ||
214 | 218 | ||
215 | 219 | ||
216 | 220 | @Callable(i) | |
217 | 221 | func addLiquidationOrder () = internalAddLiquidationOrder(i, 100, currentDefaultOrder) | |
218 | 222 | ||
219 | 223 | ||
220 | 224 | ||
221 | 225 | @Callable(i) | |
222 | 226 | func cancelOrder (orderId) = { | |
223 | 227 | let owner = getOrderOwner(orderId) | |
224 | 228 | let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId)) | |
225 | 229 | let caller = toString(i.caller) | |
226 | 230 | let nextOrder = getNextOrder(orderId) | |
227 | 231 | let prevOrder = getPrevOrder(orderId) | |
228 | 232 | let isDefaultOrder = (orderId == currentDefaultOrder) | |
229 | 233 | let isPrevCanBecomeDefault = (getOrderStatus(prevOrder) == NEW) | |
230 | 234 | let newDefaultOrder = if (isDefaultOrder) | |
231 | 235 | then if (isPrevCanBecomeDefault) | |
232 | 236 | then prevOrder | |
233 | 237 | else "" | |
234 | 238 | else currentDefaultOrder | |
235 | 239 | if (isBlocked) | |
236 | 240 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
237 | 241 | else if ((owner != caller)) | |
238 | 242 | then throw("permission denied") | |
239 | 243 | else if ((getOrderStatus(orderId) != NEW)) | |
240 | 244 | then throw("invalid order status") | |
241 | 245 | else [StringEntry(CurrentDefaultOrderKey, newDefaultOrder), StringEntry(FirstOrderKey, if ((firstOrder == orderId)) | |
242 | 246 | then nextOrder | |
243 | 247 | else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, bondAssetId)] | |
244 | 248 | } | |
245 | 249 | ||
246 | 250 | ||
247 | 251 | ||
248 | 252 | @Callable(i) | |
249 | 253 | func liquidateBond () = { | |
250 | 254 | let liquidationBalance = assetBalance(this, neutrinoAssetId) | |
251 | 255 | let surplusPositive = if ((0 >= surplus)) | |
252 | 256 | then 0 | |
253 | 257 | else surplus | |
254 | 258 | let usdnAmount = if ((surplusPositive >= liquidationBalance)) | |
255 | 259 | then liquidationBalance | |
256 | 260 | else surplusPositive | |
257 | 261 | let returnAmount = if ((surplusPositive >= liquidationBalance)) | |
258 | 262 | then 0 | |
259 | 263 | else (liquidationBalance - surplusPositive) | |
260 | 264 | if (isBlocked) | |
261 | 265 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles") | |
262 | 266 | else if ((liquidationBalance == 0)) | |
263 | 267 | then throw("without base tokens to liquidate") | |
264 | 268 | else if ((returnAmount > 0)) | |
265 | 269 | then [ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)] | |
266 | 270 | else if ((firstOrder == "")) | |
267 | 271 | then throw("empty orderbook") | |
268 | 272 | else { | |
269 | 273 | let nextOrder = getNextOrder(firstOrder) | |
270 | 274 | let filledTotal = getOrderFilledTotal(firstOrder) | |
271 | 275 | let nsbt2UsdnPrice = getOrderPrice(firstOrder) | |
272 | 276 | let remainedTotal = (getOrderTotal(firstOrder) - filledTotal) | |
273 | 277 | let totalUSDNRequiredToFillOrderX100 = fraction(remainedTotal, nsbt2UsdnPrice, 1) | |
274 | 278 | let totalUSDNRequiredToFillOrder = (totalUSDNRequiredToFillOrderX100 / 100) | |
275 | 279 | let isOrderFullyFilable = (usdnAmount >= totalUSDNRequiredToFillOrder) | |
276 | 280 | let fillableOrderAmountX100 = if (isOrderFullyFilable) | |
277 | 281 | then totalUSDNRequiredToFillOrderX100 | |
278 | 282 | else (usdnAmount * 100) | |
279 | 283 | let finalNBTFillable = fraction(fillableOrderAmountX100, 1, nsbt2UsdnPrice) | |
280 | 284 | let fillableOrderAmount = (fillableOrderAmountX100 / 100) | |
281 | 285 | let nbTokensLiquidateCondition = (fraction((surplus + neutrinoSupply), 100, neutrinoSupply) >= nsbt2UsdnPrice) | |
282 | 286 | if (!(nbTokensLiquidateCondition)) | |
283 | 287 | then throw(("innapropriate surplus: " + toString(surplus))) | |
284 | 288 | else { | |
285 | 289 | let isNothingToFillNow = (remainedTotal == 0) | |
286 | 290 | let isNothingToFillAtAll = ((filledTotal + finalNBTFillable) == getOrderTotal(firstOrder)) | |
287 | 291 | let newStatus = if (if (isOrderFullyFilable) | |
288 | 292 | then if (isNothingToFillNow) | |
289 | 293 | then true | |
290 | 294 | else isNothingToFillAtAll | |
291 | 295 | else false) | |
292 | 296 | then FILLED | |
293 | 297 | else NEW | |
294 | 298 | [StringEntry(getPrevOrderKey(nextOrder), if ((newStatus == FILLED)) | |
295 | 299 | then "" | |
296 | 300 | else firstOrder), StringEntry(FirstOrderKey, if ((newStatus == FILLED)) | |
297 | 301 | then nextOrder | |
298 | 302 | else firstOrder), IntegerEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), StringEntry(getOrderStatusKey(firstOrder), newStatus), StringEntry(CurrentDefaultOrderKey, if ((newStatus == NEW)) | |
299 | 303 | then currentDefaultOrder | |
300 | - | else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer( | |
304 | + | else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(auctionContract, finalNBTFillable, bondAssetId)] | |
301 | 305 | } | |
302 | 306 | } | |
303 | 307 | } | |
304 | 308 | ||
305 | 309 | ||
306 | 310 | @Verifier(tx) | |
307 | 311 | func verify () = { | |
308 | - | let pubKeyAdminsList = [" | |
312 | + | let pubKeyAdminsList = ["GJdLSaLiv5K7xuejac8mcRcHoyo3dPrESrvktG3a6MAR", "3xumx4hrPpeeoo79HLGbZCgfz95L39ZFdxxwWeSUC2Pu", "D4CqtK5fBsnzRo33ZMhrM7niLseDH2uRoK6weBq2JQ3A", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
309 | 313 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
310 | 314 | then 1 | |
311 | 315 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
312 | 316 | then 1 | |
313 | 317 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
314 | 318 | then 1 | |
315 | 319 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
316 | 320 | then 2 | |
317 | 321 | else 0)) | |
318 | 322 | (count >= 3) | |
319 | 323 | } | |
320 | 324 |
github/deemru/w8io/169f3d6 64.20 ms ◑