tx · EThUAYTLJZcgQz7e9QoMzt7TYLCAdLMcnD54k3vcyMHD

3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL:  -0.01400000 Waves

2019.09.17 17:45 [680381] smart account 3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL > SELF 0.00000000 Waves

{ "type": 13, "id": "EThUAYTLJZcgQz7e9QoMzt7TYLCAdLMcnD54k3vcyMHD", "fee": 1400000, "feeAssetId": null, "timestamp": 1568731536638, "version": 1, "sender": "3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL", "senderPublicKey": "3nmDHSgwcZ79tNbGjppGBY9MbYm4qLZEJcZ32D2WmxkG", "proofs": [ "NYybfFjNW3VE93sxQyPEksX3NYLJ7CecKWxPr54pTueiNc9ATtJcyaAFeyMswxQyP1fgciesJRCGxvgWnRGeLiU" ], "script": "base64:AAIDAAAAAAAAAAAAAABIAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5S2V5QW5kQWRkcmVzcwAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRt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uYXBzaG90S2V5BQAAAAlvcmRlcmJvb2sJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAGU9yZGVyYm9va1RvdGFsU25hcHNob3RLZXkFAAAADm9yZGVyYm9va1RvdGFsCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABBTbmFwc2hvdEJsb2NrS2V5BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAClN1cnBsdXNLZXkFAAAAB3N1cnBsdXMFAAAAA25pbAkAAAIAAAABAgAAABllcnJvciBjcmVhdGUgbmV3IHNuYXBzaG90AAAAAKhAjPI=", "chainId": 84, "height": 680381, "spentComplexity": 0 } View: original | compacted Prev: aPHLdGAiXHNXmT38w7iD9x8k3eqCxxNs8Z9zL9YVj5G Next: ZKPczXuw6HuFRGxsYXpKuquSGJqew2ptG7CprZ8jUf3 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 getBoolByKey (key) = match getBoolean(this, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 func getNumberByKeyAndAddress (address,key) = match getInteger(addressFromStringValue(address), key) {
2929 case a: Int =>
3030 a
3131 case _ =>
3232 0
3333 }
3434
3535
3636 func getStringByKeyAndAddress (address,key) = match getString(addressFromStringValue(address), key) {
3737 case a: String =>
3838 a
3939 case _ =>
4040 ""
4141 }
4242
4343
4444 func getBoolByKeyAndAddress (address,key) = match getBoolean(addressFromStringValue(address), key) {
4545 case a: Boolean =>
4646 a
4747 case _ =>
4848 false
4949 }
5050
5151
5252 let ListSplitSymbol = "_"
5353
5454 let SnapshotBlockExpire = 5
5555
5656 let BalanceLockBlock = 2
5757
5858 let ListDataSplitSymbol = "+"
5959
6060 let Wavelet = 100000000
6161
6262 let MinimalBondOrder = (10 * Wavelet)
6363
6464 let MinimalSurplus = (10 * Wavelet)
6565
6666 let ApplyBlockTimeout = 10
6767
6868 let LeaseContractKey = "lease_contract"
6969
7070 let NeutrinoAssetIdKey = "neutrino_asset_id"
7171
7272 let BondAssetIdKey = "bond_asset_id"
7373
7474 let AuctionContractKey = "auction_contract"
7575
7676 let PriceKey = "price"
7777
7878 let NeutrinoSupplyKey = "neutrino_supply"
7979
8080 let WavesReserveKey = "waves_reserve"
8181
8282 let NeutrinoBalanceKey = "neutrino_"
8383
8484 let WavesBalanceKey = "waves_"
8585
8686 let BalanceBlockKey = "balance_block_"
8787
8888 let OrderbookKey = "orderbook"
8989
9090 let OrderTotalKey = "order_total_"
9191
9292 let OrderOwnerKey = "order_owner_"
9393
9494 let OrderHeightKey = "order_height_"
9595
9696 let OrderbookTotalKey = "orderbook_total"
9797
9898 let OrderbookTotalSnapshotKey = "orderbook_total_snapshot"
9999
100100 let SurplusKey = "surplus"
101101
102102 let SnapshotBlockKey = "snapshot_block"
103103
104104 let OrderbookSnapshotKey = "orderbook_snapshot"
105105
106106 let BondGeneratedBlockKey = "bond_generated_block"
107107
108108 let AccountSnapshotBlockKey = "account_snapshot_block_"
109109
110110 let AccountSnapshotOwnerKey = "account_snapshot_owner_"
111111
112112 let AccountSnapshotAmountKey = "account_snapshot_amount_"
113113
114114 let AccountSnapshotNodeKey = "account_snapshot_node_"
115115
116116 let SnapshotNodeBalanceKey = "snapshot_node_balance_"
117117
118118 let NodeBalanceKey = "node_balance_"
119119
120120 let IsSentNodeBalanceKey = "is_sent_node_balance_"
121121
122122 let NodeProviderStatus = "node_status"
123123
124124 let price = getNumberByKey(PriceKey)
125125
126126 let reserve = getNumberByKey(WavesReserveKey)
127127
128128 let neutrinoSupply = getNumberByKey(NeutrinoSupplyKey)
129129
130130 let orderbookTotal = getNumberByKey(OrderbookTotalKey)
131131
132132 let orderbook = getStringByKey(OrderbookKey)
133133
134134 let surplus = getNumberByKey(SurplusKey)
135135
136136 let snapshotBlock = getNumberByKey(SnapshotBlockKey)
137137
138138 let lastBondGenerated = getNumberByKey(BondGeneratedBlockKey)
139139
140140 let orderbookSnapshot = getStringByKey(OrderbookSnapshotKey)
141141
142142 let orderbookTotalSnapshot = getNumberByKey(OrderbookTotalSnapshotKey)
143143
144144 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
145145
146146 let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
147147
148148 let auctionContract = getStringByKey(AuctionContractKey)
149149
150150 let leaseContract = getStringByKey(LeaseContractKey)
151151
152152 let bondSupply = {
153153 let info = extract(assetInfo(bondAssetId))
154154 (info.quantity - assetBalance(this, bondAssetId))
155155 }
156156
157157 func getWavesBalance (owner) = getNumberByKey((WavesBalanceKey + owner))
158158
159159
160160 func getNeutrinoBalance (owner) = getNumberByKey((NeutrinoBalanceKey + owner))
161161
162162
163163 func getBalanceBlock (owner) = getNumberByKey((BalanceBlockKey + owner))
164164
165165
166166 func getOrderTotal (id) = getNumberByKey((OrderTotalKey + id))
167167
168168
169169 func getOrderOwner (id) = getStringByKey((OrderOwnerKey + id))
170170
171171
172172 func getAccountSnapshotBlock (id) = getNumberByKey((AccountSnapshotBlockKey + id))
173173
174174
175175 func getAccountSnapshotOwner (id) = getStringByKey((AccountSnapshotOwnerKey + id))
176176
177177
178178 func getAccountSnapshotAmount (id) = getNumberByKey((AccountSnapshotAmountKey + id))
179179
180180
181181 func getNodeBalance (address,block) = getNumberByKeyAndAddress(leaseContract, (((NodeBalanceKey + address) + ListSplitSymbol) + toString(block)))
182182
183183
184184 func isSentNodeBalance (address,block) = getBoolByKey((((IsSentNodeBalanceKey + address) + ListSplitSymbol) + toString(block)))
185185
186186
187187 func convertNeutrinoToWaves (amount) = ((amount * 100) / price)
188188
189189
190190 func convertWavesToNeutrino (amount) = ((amount * price) / 100)
191191
192192
193193 func convertNeutrinoToBond (amount) = (amount / Wavelet)
194194
195195
196196 func convertBondToNeutrino (amount) = (amount * Wavelet)
197197
198198
199199 func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount))
200200
201201
202202 @Callable(i)
203203 func setCurrentPrice (price) = WriteSet([DataEntry(PriceKey, price), DataEntry(((PriceKey + ListSplitSymbol) + toString(height)), price)])
204204
205205
206206
207207 @Callable(i)
208208 func swapWavesToNeutrino () = {
209209 let pmt = extract(i.payment)
210210 if (isDefined(pmt.assetId))
211211 then throw("can use waves only")
212212 else {
213213 let account = toBase58String(i.caller.bytes)
214214 let amount = convertWavesToNeutrino(pmt.amount)
215215 WriteSet([DataEntry((NeutrinoBalanceKey + toString(i.caller)), (amount + getNeutrinoBalance(account))), DataEntry((BalanceBlockKey + toString(i.caller)), height), DataEntry(WavesReserveKey, (reserve + pmt.amount)), DataEntry(NeutrinoSupplyKey, (neutrinoSupply + amount))])
216216 }
217217 }
218218
219219
220220
221221 @Callable(i)
222222 func swapNeutrinoToWaves () = {
223223 let pmt = extract(i.payment)
224224 if ((pmt.assetId != neutrinoAssetId))
225225 then throw("can use neutrino only")
226226 else {
227227 let account = toBase58String(i.caller.bytes)
228228 let amount = convertNeutrinoToWaves(pmt.amount)
229229 WriteSet([DataEntry((WavesBalanceKey + toString(i.caller)), (amount + getWavesBalance(account))), DataEntry((BalanceBlockKey + toString(i.caller)), height), DataEntry(WavesReserveKey, (reserve - amount)), DataEntry(NeutrinoSupplyKey, (neutrinoSupply - pmt.amount))])
230230 }
231231 }
232232
233233
234234
235235 @Callable(i)
236236 func withdraw (account) = if (((getBalanceBlock(account) + BalanceLockBlock) > height))
237237 then throw("wait a couple of blocks for withdraw")
238238 else ScriptResult(WriteSet([DataEntry((WavesBalanceKey + account), 0), DataEntry((NeutrinoBalanceKey + account), 0)]), TransferSet([ScriptTransfer(i.caller, getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(i.caller, getWavesBalance(account), unit)]))
239239
240240
241241
242242 @Callable(i)
243243 func generateBond () = {
244244 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve))
245245 if (if ((deficit >= MinimalBondOrder))
246246 then (height > (lastBondGenerated + SnapshotBlockExpire))
247247 else false)
248248 then ScriptResult(WriteSet([DataEntry(BondGeneratedBlockKey, height)]), TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), convertNeutrinoToBond(deficit), bondAssetId)]))
249249 else throw(("deficit did not reach the threshold. deficit =" + toString(deficit)))
250250 }
251251
252252
253253
254254 @Callable(i)
255255 func setOrder () = {
256256 let pmt = extract(i.payment)
257257 let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height))))
258258 if ((pmt.assetId != bondAssetId))
259259 then throw("can use bond only")
260260 else if ((getOrderOwner(newOrderId) != ""))
261261 then throw("order exists")
262262 else WriteSet([DataEntry(OrderbookTotalKey, (orderbookTotal + pmt.amount)), DataEntry(OrderbookKey, ((orderbook + newOrderId) + ListSplitSymbol)), DataEntry((OrderTotalKey + newOrderId), pmt.amount), DataEntry((OrderOwnerKey + newOrderId), toString(i.caller)), DataEntry((OrderHeightKey + newOrderId), height)])
263263 }
264264
265265
266266
267267 @Callable(i)
268268 func cancelOrder (orderId) = {
269269 let owner = getOrderOwner(orderId)
270270 let total = getOrderTotal(orderId)
271271 if ((owner != toString(i.caller)))
272272 then throw("permission denied")
273273 else {
274274 let newOrderBookOnePart = split(orderbook, (orderId + ListSplitSymbol))[0]
275275 let newOrderBookTwoPart = split(orderbook, (orderId + ListSplitSymbol))[1]
276276 ScriptResult(WriteSet([DataEntry(OrderbookTotalKey, (orderbookTotal - total)), DataEntry(OrderbookKey, (newOrderBookOnePart + newOrderBookTwoPart)), DataEntry((OrderTotalKey + orderId), 0)]), TransferSet([ScriptTransfer(i.caller, total, unit)]))
277277 }
278278 }
279279
280280
281281
282282 @Callable(i)
283283 func executeOrder () = {
284284 let orderId = split(orderbookSnapshot, ListSplitSymbol)[0]
285285 let orderTotal = getOrderTotal(orderId)
286286 if ((0 >= surplus))
287287 then throw("surplus is less than zero")
288288 else {
289289 let parts = split(orderbook, (orderId + ListSplitSymbol))
290290 let newActualOrderbook = (parts[0] + parts[1])
291291 let amount = convertBondToNeutrino((orderTotal - convertNeutrinoToBond(surplus)))
292292 ScriptResult(WriteSet([DataEntry(OrderbookTotalKey, (orderbookTotal - (if ((surplus >= orderTotal))
293293 then orderTotal
294294 else surplus))), DataEntry(OrderbookKey, newActualOrderbook), DataEntry(OrderbookSnapshotKey, split(orderbookSnapshot, (orderId + ListSplitSymbol))[1]), DataEntry((OrderTotalKey + orderId), if ((0 >= amount))
295295 then 0
296296 else amount)]), TransferSet([ScriptTransfer(i.caller, if ((surplus >= orderTotal))
297297 then convertBondToNeutrino(orderTotal)
298298 else surplus, neutrinoAssetId)]))
299299 }
300300 }
301301
302302
303303
304304 @Callable(i)
305305 func createSnapshot () = {
306306 let newSurplus = (convertWavesToNeutrino(reserve) - neutrinoSupply)
307307 if (if ((0 >= newSurplus))
308308 then true
309309 else (MinimalSurplus > newSurplus))
310310 then throw("surplus is less minimum")
311311 else if ((height >= (snapshotBlock + SnapshotBlockExpire)))
312312 then WriteSet([DataEntry(OrderbookSnapshotKey, orderbook), DataEntry(OrderbookTotalSnapshotKey, orderbookTotal), DataEntry(SnapshotBlockKey, height), DataEntry(SurplusKey, surplus)])
313313 else throw("error create new snapshot")
314314 }
315315
316316

github/deemru/w8io/873ac7e 
41.34 ms