tx · 5WdRpAruCrvGsG8f4usC1W29JMVC9fTpWN1y3L4LxHny

3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX:  -0.10000000 Waves

2020.04.01 05:35 [934481] smart account 3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX > SELF 0.00000000 Waves

{ "type": 13, "id": "5WdRpAruCrvGsG8f4usC1W29JMVC9fTpWN1y3L4LxHny", "fee": 10000000, "feeAssetId": null, "timestamp": 1585708509613, "version": 1, "sender": "3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX", "senderPublicKey": "HDqeggkNi96GMzyGv4AQMQms43nwSrvgMjTDznyivt8R", "proofs": [ "2bsZBqEJAFxPRmzGM5BrHE1HvwXGhrgR7yMXofUs5Ns8GvKHU46Muuohqu6AC7wUpVQHWhi3UzfiHjW4MDefdFA" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASAwoBCBIAAAAAOAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbmRL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AAAADbmlsAAAAAHQNonA=", "chainId": 84, "height": 934481, "spentComplexity": 0 } View: original | compacted Prev: 4VSTT8eRL6S9jKtBHf13B3wWr3bdyohT4nRGrziftbNb Next: 2eRMakZAiTVoQTjgwM4DZZy2tdVZ6gmu1Yic1DngK2Pb Diff:
OldNewDifferences
203203 let owner = toString(i.caller)
204204 let nextOrder = getOrderNext(lastOrder)
205205 let orderStatus = getOrderStatus(lastOrder)
206- if (((1 + 1) > 1))
207- then throw("running here!")
208- else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
206+ if (isBlocked)
207+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
208+ else if (((1 + 1) > 1))
209+ then throw("running here!")
210+ else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
209211 }
210212
211213
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = match getInteger(this, key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getStringByKey (key) = match getString(this, key) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func getBoolByAddressAndKey (address,key) = match getBoolean(address, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 func getStringByAddressAndKey (address,key) = match getString(address, key) {
2929 case a: String =>
3030 a
3131 case _ =>
3232 ""
3333 }
3434
3535
3636 func getNumberByAddressAndKey (address,key) = match getInteger(address, key) {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
4242
4343
4444 let WAVELET = 100000000
4545
4646 let ORDERSPLITSYMBOL = "_"
4747
4848 let PAULI = 1000000
4949
5050 let PERCENTACCURACY = 1000
5151
5252 let MAXDISCOUNT = 50
5353
5454 let CANCELED = "canceled"
5555
5656 let NEW = "new"
5757
5858 let FILLED = "filled"
5959
6060 let NeutrinoContractKey = "neutrino_contract"
6161
6262 let PriceKey = "price"
6363
6464 let BondAssetIdKey = "bond_asset_id"
6565
6666 let NeutrinoAssetIdKey = "neutrino_asset_id"
6767
6868 let ControlContractKey = "control_contract"
6969
7070 let BalanceLockedkKey = "balance_lock_"
7171
7272 let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
7373
7474 let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
7575
7676 let FirstOrderKey = "order_first"
7777
7878 let LastOrderKey = "order_last"
7979
8080 func getOrderPrevKey (orderId) = ("order_prev_" + orderId)
8181
8282
8383 func getOrderNextKey (orderId) = ("order_next_" + orderId)
8484
8585
8686 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
8787
8888
8989 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
9090
9191
9292 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
9393
9494
9595 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
9696
9797
9898 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
9999
100100
101101 func getLastOrderOwnerKey (owner) = ("last_order_owner_" + owner)
102102
103103
104104 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, 100, price), WAVELET, PAULI)
105105
106106
107107 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), PAULI, WAVELET)
108108
109109
110110 func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
111111
112112
113113 let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey))
114114
115115 let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey))
116116
117117 let liquidationContract = this
118118
119119 let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
120120
121121 let bondAssetId = fromBase58String("Qh28HvUAcFboD1GsAcyURQjNW6mdpuGvXVgFS9e3CzC")
122122
123123 let firstOrder = getStringByKey(FirstOrderKey)
124124
125125 let lastOrder = getStringByKey(LastOrderKey)
126126
127127 let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
128128
129129 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
130130
131131 let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey)
132132
133133 let wavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey)
134134
135135 let reserve = (wavesBalance(neutrinoContract) - wavesLockedBalance)
136136
137137 let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
138138
139139 let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
140140
141141 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
142142
143143
144144 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
145145
146146
147147 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
148148
149149
150150 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
151151
152152
153153 func getOrderPrev (id) = getStringByKey(getOrderPrevKey(id))
154154
155155
156156 func getOrderNext (id) = getStringByKey(getOrderNextKey(id))
157157
158158
159159 func getOrderHeight (id) = getNumberByKey(getOrderHeightKey(id))
160160
161161
162162 func getLastOrderOwner (owner) = getStringByKey(getLastOrderOwnerKey(owner))
163163
164164
165165 @Callable(i)
166166 func addLiquidationOrder () = {
167167 let pmt = extract(i.payment)
168168 let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId)))
169169 let nextOrder = getOrderNext(lastOrder)
170170 let orderStatus = getOrderStatus(lastOrder)
171171 let owner = toString(i.caller)
172172 if (isBlocked)
173173 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
174174 else if ((pmt.assetId != bondAssetId))
175175 then throw("can use appropriate neutrino bonds tokens only")
176176 else if ((getOrderOwner(newOrderId) != ""))
177177 then throw("an order is already exists")
178178 else if ((nextOrder != ""))
179179 then throw(("nextOrder is not last. Info:" + nextOrder))
180180 else if (if ((firstOrder != ""))
181181 then (lastOrder == "")
182182 else false)
183183 then throw("invalid last order")
184184 else if (if ((firstOrder != ""))
185185 then (orderStatus != NEW)
186186 else false)
187187 then throw("last order status is not new")
188188 else if ((PAULI > pmt.amount))
189189 then throw("order amount must be higher than 1 NSBT")
190190 else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId), DataEntry(getOrderPrevKey(newOrderId), lastOrder), DataEntry(getOrderNextKey(lastOrder), if ((lastOrder == ""))
191191 then ""
192192 else newOrderId), DataEntry(FirstOrderKey, if ((firstOrder == ""))
193193 then newOrderId
194194 else firstOrder), DataEntry(LastOrderKey, newOrderId), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), owner), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
195195 }
196196
197197
198198
199199 @Callable(i)
200200 func addLiquidationOrderTest () = {
201201 let pmt = extract(i.payment)
202202 let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId)))
203203 let owner = toString(i.caller)
204204 let nextOrder = getOrderNext(lastOrder)
205205 let orderStatus = getOrderStatus(lastOrder)
206- if (((1 + 1) > 1))
207- then throw("running here!")
208- else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
206+ if (isBlocked)
207+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
208+ else if (((1 + 1) > 1))
209+ then throw("running here!")
210+ else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
209211 }
210212
211213
212214
213215 @Callable(i)
214216 func cancelOrder (orderId) = {
215217 let owner = getOrderOwner(orderId)
216218 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
217219 let nextOrder = getOrderNext(orderId)
218220 let prevOrder = getOrderPrev(orderId)
219221 if (isBlocked)
220222 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
221223 else if ((owner != toString(i.caller)))
222224 then throw("permission denied")
223225 else if ((getOrderStatus(orderId) != NEW))
224226 then throw("invalid order status")
225227 else ScriptResult(WriteSet([DataEntry(FirstOrderKey, if ((firstOrder == orderId))
226228 then nextOrder
227229 else firstOrder), DataEntry(LastOrderKey, if ((lastOrder == orderId))
228230 then prevOrder
229231 else lastOrder), DataEntry(getOrderNextKey(prevOrder), nextOrder), DataEntry(getOrderPrevKey(nextOrder), prevOrder), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
230232 }
231233
232234
233235
234236 @Callable(i)
235237 func liquidateBond () = {
236238 let surplusPositive = if ((0 >= surplus))
237239 then 0
238240 else surplus
239241 let liquidationBalance = assetBalance(this, neutrinoAssetId)
240242 let returnAmount = if ((surplusPositive >= liquidationBalance))
241243 then 0
242244 else (liquidationBalance - surplusPositive)
243245 let surplusBond = surplusPositive
244246 if (isBlocked)
245247 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
246248 else if (if ((returnAmount == 0))
247249 then (liquidationBalance == 0)
248250 else false)
249251 then throw("cannot liquidate order without neutrino on the smart contract")
250252 else if ((returnAmount > 0))
251253 then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)])
252254 else if ((0 >= surplusBond))
253255 then throw("there is no proficit on the smart contract now")
254256 else if ((firstOrder == ""))
255257 then throw("empty orderbook")
256258 else {
257259 let nextOrder = getOrderNext(firstOrder)
258260 let orderTotal = getOrderTotal(firstOrder)
259261 let orderOwner = getOrderOwner(firstOrder)
260262 let filledTotal = getOrderFilledTotal(firstOrder)
261263 let amount = (orderTotal - filledTotal)
262264 let newStatus = if ((surplusBond >= amount))
263265 then FILLED
264266 else NEW
265267 let fillableOrderAmount = if ((surplusBond >= amount))
266268 then amount
267269 else surplusBond
268270 ScriptResult(WriteSet([DataEntry(getOrderPrevKey(nextOrder), if ((newStatus == FILLED))
269271 then ""
270272 else firstOrder), DataEntry(FirstOrderKey, if ((newStatus == FILLED))
271273 then nextOrder
272274 else firstOrder), DataEntry(LastOrderKey, if (if ((newStatus == FILLED))
273275 then (firstOrder == lastOrder)
274276 else false)
275277 then ""
276278 else lastOrder), DataEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + fillableOrderAmount)), DataEntry(getOrderStatusKey(firstOrder), newStatus)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), fillableOrderAmount, neutrinoAssetId)]))
277279 }
278280 }
279281
280282

github/deemru/w8io/169f3d6 
37.21 ms