tx · 9wZwj18qCh1QMfRKaxzXwxG7uwvchbS6utsMjc6td8ML

3MwLuek2V6JjKybacSPjk4uo78pNkttERW1:  -0.01400000 Waves

2019.10.08 13:45 [710720] smart account 3MwLuek2V6JjKybacSPjk4uo78pNkttERW1 > SELF 0.00000000 Waves

{ "type": 13, "id": "9wZwj18qCh1QMfRKaxzXwxG7uwvchbS6utsMjc6td8ML", "fee": 1400000, "feeAssetId": null, "timestamp": 1570531535796, "version": 1, "sender": "3MwLuek2V6JjKybacSPjk4uo78pNkttERW1", "senderPublicKey": "J9XYsY58fH56YchACAvg2gFhmBF95dSf8LXAJB499n1J", "proofs": [ "2CCBmriCE2ATTc38MAZ2uqigGnZw2drmbENzeNGPb8evX1drR6k2t9KQMFhtpcW59vbDQrNozRm31T9Z6fEoe1SM" ], "script": "base64:AAIDAAAAAAAAAAAAAAApAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAYZ2V0U3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gkAAGkAAAACCQAAaAAAAAIFAAAADGZpbGxlZEFtb3VudAUAAAAKb3JkZXJQcmljZQAAAAAAAAAAZAUAAAANQ0VOVFNJTkRPTExBUgQAAAAGc3RhdHVzAwkAAGcAAAACBQAAAApib25kQW1vdW50BQAAAAZhbW91bnQFAAAABkZJTExFRAUAAAADTkVXCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAMT3JkZXJCb29rS2V5BQAAAAxuZXdPcmRlcmJvb2sJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABZnZXRPcmRlckZpbGxlZFRvdGFsS2V5AAAAAQUAAAAHb3JkZXJJZAkAAGQAAAACBQAAAAtmaWxsZWRUb3RhbAUAAAAFdG90YWwJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABFnZXRPcmRlclN0YXR1c0tleQAAAAEFAAAAB29yZGVySWQFAAAABnN0YXR1cwUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAKb3JkZXJPd25lcgUAAAAMZmlsbGVkQW1vdW50BQAAAAtib25kQXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAEG5ldXRyaW5vQ29udHJhY3QFAAAABXRvdGFsBQAAAA9uZXV0cmlub0Fzc2V0SWQFAAAAA25pbAAAAAAJin7r", "chainId": 84, "height": 710720, "spentComplexity": 0 } View: original | compacted Prev: DRMj4qAzS5cn8zDw9jmVZKyxwpYHguNEgpXAyEyHCHDE Next: H5rvSmHfZ2Zn7K4uEUhYt7WZeh1XoEHNE9RMpwNpDWxs Diff:
OldNewDifferences
2525 }
2626
2727
28+func getStringByAddressAndKey (address,key) = match getString(this, key) {
29+ case a: String =>
30+ a
31+ case _ =>
32+ ""
33+}
34+
35+
2836 let ORDERSPLITSYMBOL = "_"
2937
30-let WAVELET = 100000000
38+let CENTSINDOLLAR = 100
3139
3240 let CANCELED = "canceled"
3341
7583 func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId)
7684
7785
78-let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
79-
80-let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
81-
8286 let neutrinoContract = getStringByKey(NeutrinoContractKey)
8387
8488 let price = getNumberByAddressAndKey(neutrinoContract, PriceKey)
89+
90+let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
91+
92+let bondAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, BondAssetIdKey))
8593
8694 let orderbook = getStringByKey(OrderBookKey)
8795
180188 @Callable(i)
181189 func executeOrder () = {
182190 let bondBalance = assetBalance(this, bondAssetId)
183- let deficit = ((neutrinoSupply - ((reserve * price) / 100)) / WAVELET)
191+ let deficit = ((neutrinoSupply - ((reserve * price) / 100)) / CENTSINDOLLAR)
184192 let deficitPositive = if ((0 >= deficit))
185193 then 0
186194 else deficit
198206 let orderTotal = getOrderTotal(orderId)
199207 let orderPrice = getOrderPrice(orderId)
200208 let orderOwner = getOrderOwner(orderId)
201- let amount = ((((orderTotal - filledTotal) * 100) / orderPrice) / WAVELET)
209+ let amount = ((((orderTotal - filledTotal) * 100) / orderPrice) / CENTSINDOLLAR)
202210 let newOrderbook = if ((bondAmount >= amount))
203211 then dropOrder(orderId)
204212 else orderbook
205213 let filledAmount = if ((bondAmount >= amount))
206214 then amount
207215 else bondAmount
208- let total = (((filledAmount * orderPrice) / 100) * WAVELET)
216+ let total = (((filledAmount * orderPrice) / 100) * CENTSINDOLLAR)
209217 let status = if ((bondAmount >= amount))
210218 then FILLED
211219 else NEW
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getNumberByKey (key) = match getInteger(this, key) {
1313 case a: Int =>
1414 a
1515 case _ =>
1616 0
1717 }
1818
1919
2020 func getStringByKey (key) = match getString(this, key) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 ""
2525 }
2626
2727
28+func getStringByAddressAndKey (address,key) = match getString(this, key) {
29+ case a: String =>
30+ a
31+ case _ =>
32+ ""
33+}
34+
35+
2836 let ORDERSPLITSYMBOL = "_"
2937
30-let WAVELET = 100000000
38+let CENTSINDOLLAR = 100
3139
3240 let CANCELED = "canceled"
3341
3442 let NEW = "new"
3543
3644 let FILLED = "filled"
3745
3846 let OrderBookKey = "orderbook"
3947
4048 let OrderPriceKey = "order_price_"
4149
4250 let OrderTotalKey = "order_total_"
4351
4452 let OrderFilledTotalKey = "order_filled_total_"
4553
4654 let OrderOwnerKey = "order_owner_"
4755
4856 let OrderHeightKey = "order_height_"
4957
5058 let OrderStatusKey = "order_status_"
5159
5260 let PriceKey = "price"
5361
5462 let BondAssetIdKey = "bond_asset_id"
5563
5664 let NeutrinoAssetIdKey = "neutrino_asset_id"
5765
5866 let NeutrinoContractKey = "neutrino_contract"
5967
6068 func getOrderPriceKey (orderId) = (OrderPriceKey + orderId)
6169
6270
6371 func getOrderTotalKey (orderId) = (OrderTotalKey + orderId)
6472
6573
6674 func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId)
6775
6876
6977 func getOrderHeightKey (orderId) = (OrderHeightKey + orderId)
7078
7179
7280 func getOrderStatusKey (orderId) = (OrderStatusKey + orderId)
7381
7482
7583 func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId)
7684
7785
78-let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
79-
80-let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
81-
8286 let neutrinoContract = getStringByKey(NeutrinoContractKey)
8387
8488 let price = getNumberByAddressAndKey(neutrinoContract, PriceKey)
89+
90+let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
91+
92+let bondAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, BondAssetIdKey))
8593
8694 let orderbook = getStringByKey(OrderBookKey)
8795
8896 let reserve = wavesBalance(addressFromStringValue(neutrinoContract))
8997
9098 let neutrinoSupply = {
9199 let info = extract(assetInfo(neutrinoAssetId))
92100 (info.quantity - assetBalance(addressFromStringValue(neutrinoContract), neutrinoAssetId))
93101 }
94102
95103 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
96104
97105
98106 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
99107
100108
101109 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
102110
103111
104112 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
105113
106114
107115 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
108116
109117
110118 func getOrderElementById (id) = (id + ORDERSPLITSYMBOL)
111119
112120
113121 func addOrder (orderId,position) = {
114122 let orders = split(orderbook, ORDERSPLITSYMBOL)
115123 let newOrder = getOrderElementById(orderId)
116124 if ((position == 0))
117125 then (newOrder + orderbook)
118126 else if ((position >= (size(orders) - 1)))
119127 then (orderbook + newOrder)
120128 else {
121129 let parts = split(orderbook, getOrderElementById(orders[position]))
122130 (((parts[0] + newOrder) + getOrderElementById(orders[position])) + parts[1])
123131 }
124132 }
125133
126134
127135 func dropOrder (orderId) = {
128136 let parts = split(orderbook, getOrderElementById(orderId))
129137 (parts[0] + parts[1])
130138 }
131139
132140
133141 @Callable(i)
134142 func setOrder (price,position) = {
135143 let pmt = extract(i.payment)
136144 let newOrderId = toBase58String(keccak256((((toBytes(price) + toBytes(pmt.amount)) + i.caller.bytes) + toBytes(height))))
137145 if ((pmt.assetId != neutrinoAssetId))
138146 then throw("can use neutrino only")
139147 else if ((0 >= price))
140148 then throw("price less zero")
141149 else if ((getOrderOwner(newOrderId) != ""))
142150 then throw("order exists")
143151 else {
144152 let orders = split(orderbook, ORDERSPLITSYMBOL)
145153 let nextOrderId = if ((position == 0))
146154 then ""
147155 else orders[(position - 1)]
148156 let nextOrderPrice = getOrderPrice(nextOrderId)
149157 let isNextOrderError = if (if ((nextOrderId != ""))
150158 then (price > nextOrderPrice)
151159 else false)
152160 then true
153161 else false
154162 let prevOrderId = orders[position]
155163 let prevOrderPrice = getOrderPrice(prevOrderId)
156164 let isPrevOrderError = if ((prevOrderPrice >= price))
157165 then true
158166 else false
159167 if (if (isNextOrderError)
160168 then true
161169 else isPrevOrderError)
162170 then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError)))
163171 else WriteSet([DataEntry(OrderBookKey, addOrder(newOrderId, position)), DataEntry(getOrderPriceKey(newOrderId), price), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
164172 }
165173 }
166174
167175
168176
169177 @Callable(i)
170178 func cancelOrder (orderId) = {
171179 let owner = getOrderOwner(orderId)
172180 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
173181 if ((owner != toString(i.caller)))
174182 then throw("permission denied")
175183 else ScriptResult(WriteSet([DataEntry(OrderBookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)]))
176184 }
177185
178186
179187
180188 @Callable(i)
181189 func executeOrder () = {
182190 let bondBalance = assetBalance(this, bondAssetId)
183- let deficit = ((neutrinoSupply - ((reserve * price) / 100)) / WAVELET)
191+ let deficit = ((neutrinoSupply - ((reserve * price) / 100)) / CENTSINDOLLAR)
184192 let deficitPositive = if ((0 >= deficit))
185193 then 0
186194 else deficit
187195 let bondAmount = if ((deficitPositive >= bondBalance))
188196 then bondBalance
189197 else deficitPositive
190198 let returnAmount = if ((deficitPositive >= bondBalance))
191199 then 0
192200 else (bondBalance - deficitPositive)
193201 if ((bondAmount == 0))
194202 then TransferSet([ScriptTransfer(addressFromStringValue(neutrinoContract), returnAmount, bondAssetId)])
195203 else {
196204 let orderId = split(orderbook, ORDERSPLITSYMBOL)[0]
197205 let filledTotal = getOrderFilledTotal(orderId)
198206 let orderTotal = getOrderTotal(orderId)
199207 let orderPrice = getOrderPrice(orderId)
200208 let orderOwner = getOrderOwner(orderId)
201- let amount = ((((orderTotal - filledTotal) * 100) / orderPrice) / WAVELET)
209+ let amount = ((((orderTotal - filledTotal) * 100) / orderPrice) / CENTSINDOLLAR)
202210 let newOrderbook = if ((bondAmount >= amount))
203211 then dropOrder(orderId)
204212 else orderbook
205213 let filledAmount = if ((bondAmount >= amount))
206214 then amount
207215 else bondAmount
208- let total = (((filledAmount * orderPrice) / 100) * WAVELET)
216+ let total = (((filledAmount * orderPrice) / 100) * CENTSINDOLLAR)
209217 let status = if ((bondAmount >= amount))
210218 then FILLED
211219 else NEW
212220 ScriptResult(WriteSet([DataEntry(OrderBookKey, newOrderbook), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + total)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), filledAmount, bondAssetId), ScriptTransfer(addressFromStringValue(neutrinoContract), total, neutrinoAssetId)]))
213221 }
214222 }
215223
216224

github/deemru/w8io/026f985 
55.30 ms