tx · DNsRoo9qyV1GZgFRbnXLjvVJQDFhRp2VCL48XxtJ1grS

3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX:  -0.10000000 Waves

2020.04.01 05:31 [934476] smart account 3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX > SELF 0.00000000 Waves

{ "type": 13, "id": "DNsRoo9qyV1GZgFRbnXLjvVJQDFhRp2VCL48XxtJ1grS", "fee": 10000000, "feeAssetId": null, "timestamp": 1585708294544, "version": 1, "sender": "3MyiJb9yZnpyXJADhdEoNk3MT3FHKmbYRJX", "senderPublicKey": "HDqeggkNi96GMzyGv4AQMQms43nwSrvgMjTDznyivt8R", "proofs": [ "39MVAkGCgfTsdq4PDPxA693ovceQoedezyUsaCa1wkWVTPzc5k5HVZ2VUnW1EkjwEoLE7SdfPfyCX6eZetfYEBvj" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASAwoBCBIAAAAAOAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBb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RklMTEVEAgAAAAAFAAAACmZpcnN0T3JkZXIJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADUZpcnN0T3JkZXJLZXkDCQAAAAAAAAIFAAAACW5ld1N0YXR1cwUAAAAGRklMTEVEBQAAAAluZXh0T3JkZXIFAAAACmZpcnN0T3JkZXIJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADExhc3RPcmRlcktleQMDCQAAAAAAAAIFAAAACW5ld1N0YXR1cwUAAAAGRklMTEVECQAAAAAAAAIFAAAACmZpcnN0T3JkZXIFAAAACWxhc3RPcmRlcgcCAAAAAAUAAAAJbGFzdE9yZGVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAWZ2V0T3JkZXJGaWxsZWRUb3RhbEtleQAAAAEFAAAACmZpcnN0T3JkZXIJAABkAAAAAgUAAAALZmlsbGVkVG90YWwFAAAAE2ZpbGxhYmxlT3JkZXJBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABFnZXRPcmRlclN0YXR1c0tleQAAAAEFAAAACmZpcnN0T3JkZXIFAAAACW5ld1N0YXR1cwUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAKb3JkZXJPd25lcgUAAAATZmlsbGFibGVPcmRlckFtb3VudAUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAiW8FIw==", "chainId": 84, "height": 934476, "spentComplexity": 0 } View: original | compacted Prev: 9u6QN8bi6cTkE6EZSvwLXGhTvS9PW9U6BjVszUdgAbLL Next: 4VSTT8eRL6S9jKtBHf13B3wWr3bdyohT4nRGrziftbNb Diff:
OldNewDifferences
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)
204+ let nextOrder = getOrderNext(lastOrder)
204205 if (((1 + 1) > 1))
205206 then throw("running here!")
206207 else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
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)
204+ let nextOrder = getOrderNext(lastOrder)
204205 if (((1 + 1) > 1))
205206 then throw("running here!")
206207 else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId)])
207208 }
208209
209210
210211
211212 @Callable(i)
212213 func cancelOrder (orderId) = {
213214 let owner = getOrderOwner(orderId)
214215 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
215216 let nextOrder = getOrderNext(orderId)
216217 let prevOrder = getOrderPrev(orderId)
217218 if (isBlocked)
218219 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
219220 else if ((owner != toString(i.caller)))
220221 then throw("permission denied")
221222 else if ((getOrderStatus(orderId) != NEW))
222223 then throw("invalid order status")
223224 else ScriptResult(WriteSet([DataEntry(FirstOrderKey, if ((firstOrder == orderId))
224225 then nextOrder
225226 else firstOrder), DataEntry(LastOrderKey, if ((lastOrder == orderId))
226227 then prevOrder
227228 else lastOrder), DataEntry(getOrderNextKey(prevOrder), nextOrder), DataEntry(getOrderPrevKey(nextOrder), prevOrder), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
228229 }
229230
230231
231232
232233 @Callable(i)
233234 func liquidateBond () = {
234235 let surplusPositive = if ((0 >= surplus))
235236 then 0
236237 else surplus
237238 let liquidationBalance = assetBalance(this, neutrinoAssetId)
238239 let returnAmount = if ((surplusPositive >= liquidationBalance))
239240 then 0
240241 else (liquidationBalance - surplusPositive)
241242 let surplusBond = surplusPositive
242243 if (isBlocked)
243244 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
244245 else if (if ((returnAmount == 0))
245246 then (liquidationBalance == 0)
246247 else false)
247248 then throw("cannot liquidate order without neutrino on the smart contract")
248249 else if ((returnAmount > 0))
249250 then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)])
250251 else if ((0 >= surplusBond))
251252 then throw("there is no proficit on the smart contract now")
252253 else if ((firstOrder == ""))
253254 then throw("empty orderbook")
254255 else {
255256 let nextOrder = getOrderNext(firstOrder)
256257 let orderTotal = getOrderTotal(firstOrder)
257258 let orderOwner = getOrderOwner(firstOrder)
258259 let filledTotal = getOrderFilledTotal(firstOrder)
259260 let amount = (orderTotal - filledTotal)
260261 let newStatus = if ((surplusBond >= amount))
261262 then FILLED
262263 else NEW
263264 let fillableOrderAmount = if ((surplusBond >= amount))
264265 then amount
265266 else surplusBond
266267 ScriptResult(WriteSet([DataEntry(getOrderPrevKey(nextOrder), if ((newStatus == FILLED))
267268 then ""
268269 else firstOrder), DataEntry(FirstOrderKey, if ((newStatus == FILLED))
269270 then nextOrder
270271 else firstOrder), DataEntry(LastOrderKey, if (if ((newStatus == FILLED))
271272 then (firstOrder == lastOrder)
272273 else false)
273274 then ""
274275 else lastOrder), DataEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + fillableOrderAmount)), DataEntry(getOrderStatusKey(firstOrder), newStatus)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), fillableOrderAmount, neutrinoAssetId)]))
275276 }
276277 }
277278
278279

github/deemru/w8io/169f3d6 
63.34 ms