tx · 4bAeou5bfvyqX1uAvWssALbnd3fv9789zGMyt5EBwzk5 3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL: -0.01400000 Waves 2019.09.17 19:30 [680488] smart account 3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL > SELF 0.00000000 Waves
{ "type": 13, "id": "4bAeou5bfvyqX1uAvWssALbnd3fv9789zGMyt5EBwzk5", "fee": 1400000, "feeAssetId": null, "timestamp": 1568737834352, "version": 1, "sender": "3MrtHeXquGPcRd3YjJQHfY1Ss6oSDpfxGuL", "senderPublicKey": "3nmDHSgwcZ79tNbGjppGBY9MbYm4qLZEJcZ32D2WmxkG", "proofs": [ "4XP4BdiAWR1H2Vae8nCy6ng9WTzQkrc1WvtmmDvn1enYJ25JBPPiBkkkyRmQyaiyhaHyfJifwBAwW91KLwrJM2eq" ], "script": "base64:AAIDAAAAAAAAAAAAAABFAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5S2V5QW5kQWRkcmVzcwAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRt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kBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEU9yZGVyYm9va1RvdGFsS2V5CQAAZQAAAAIFAAAADm9yZGVyYm9va1RvdGFsAwkAAGcAAAACBQAAAAdzdXJwbHVzBQAAAApvcmRlclRvdGFsBQAAAApvcmRlclRvdGFsBQAAAAdzdXJwbHVzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAxPcmRlcmJvb2tLZXkJAAGRAAAAAgkABLUAAAACBQAAAAlvcmRlcmJvb2sJAAEsAAAAAgUAAAAHb3JkZXJJZAUAAAAPTGlzdFNwbGl0U3ltYm9sAAAAAAAAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADU9yZGVyVG90YWxLZXkFAAAAB29yZGVySWQDCQAAZwAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAAAAAAAAAAAAAUAAAAGYW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAwkAAGcAAAACBQAAAAdzdXJwbHVzBQAAAApvcmRlclRvdGFsCQEAAAAVY29udmVydEJvbmRUb05ldXRyaW5vAAAAAQUAAAAKb3JkZXJUb3RhbAUAAAAHc3VycGx1cwUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAONmqMA==", "chainId": 84, "height": 680488, "spentComplexity": 0 } View: original | compacted Prev: 2KWuYvG4V9xQimb77YjU5gGFxETjWPe7o3sCa78dpCXW Next: HPmzcftg1528BsG3TJBPHXbhcsCSiC9cSMNcbrQ9oaSj Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | 5 | case a: Int => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringByKey (key) = match getString(this, key) { | |
13 | 13 | case a: String => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | "" | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | 21 | case a: Boolean => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getNumberByKeyAndAddress (address,key) = match getInteger(addressFromStringValue(address), key) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getStringByKeyAndAddress (address,key) = match getString(addressFromStringValue(address), key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getBoolByKeyAndAddress (address,key) = match getBoolean(addressFromStringValue(address), key) { | |
45 | 45 | case a: Boolean => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | false | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | let ListSplitSymbol = "_" | |
53 | 53 | ||
54 | 54 | let SnapshotBlockExpire = 5 | |
55 | 55 | ||
56 | 56 | let BalanceLockBlock = 2 | |
57 | 57 | ||
58 | 58 | let ListDataSplitSymbol = "+" | |
59 | 59 | ||
60 | 60 | let Wavelet = 100000000 | |
61 | 61 | ||
62 | 62 | let MinimalBondOrder = (10 * Wavelet) | |
63 | 63 | ||
64 | 64 | let MinimalSurplus = (10 * Wavelet) | |
65 | 65 | ||
66 | 66 | let ApplyBlockTimeout = 10 | |
67 | 67 | ||
68 | 68 | let LeaseContractKey = "lease_contract" | |
69 | 69 | ||
70 | 70 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
71 | 71 | ||
72 | 72 | let BondAssetIdKey = "bond_asset_id" | |
73 | 73 | ||
74 | 74 | let AuctionContractKey = "auction_contract" | |
75 | 75 | ||
76 | 76 | let PriceKey = "price" | |
77 | 77 | ||
78 | 78 | let NeutrinoBalanceKey = "neutrino_" | |
79 | 79 | ||
80 | 80 | let WavesBalanceKey = "waves_" | |
81 | 81 | ||
82 | 82 | let BalanceBlockKey = "balance_block_" | |
83 | 83 | ||
84 | 84 | let OrderbookKey = "orderbook" | |
85 | 85 | ||
86 | 86 | let OrderTotalKey = "order_total_" | |
87 | 87 | ||
88 | 88 | let OrderOwnerKey = "order_owner_" | |
89 | 89 | ||
90 | 90 | let OrderHeightKey = "order_height_" | |
91 | 91 | ||
92 | 92 | let OrderbookTotalKey = "orderbook_total" | |
93 | 93 | ||
94 | 94 | let OrderbookTotalSnapshotKey = "orderbook_total_snapshot" | |
95 | 95 | ||
96 | 96 | let SnapshotBlockKey = "snapshot_block" | |
97 | 97 | ||
98 | 98 | let OrderbookSnapshotKey = "orderbook_snapshot" | |
99 | 99 | ||
100 | 100 | let BondGeneratedBlockKey = "bond_generated_block" | |
101 | 101 | ||
102 | 102 | let AccountSnapshotBlockKey = "account_snapshot_block_" | |
103 | 103 | ||
104 | 104 | let AccountSnapshotOwnerKey = "account_snapshot_owner_" | |
105 | 105 | ||
106 | 106 | let AccountSnapshotAmountKey = "account_snapshot_amount_" | |
107 | 107 | ||
108 | 108 | let AccountSnapshotNodeKey = "account_snapshot_node_" | |
109 | 109 | ||
110 | 110 | let SnapshotNodeBalanceKey = "snapshot_node_balance_" | |
111 | 111 | ||
112 | 112 | let NodeBalanceKey = "node_balance_" | |
113 | 113 | ||
114 | 114 | let IsSentNodeBalanceKey = "is_sent_node_balance_" | |
115 | 115 | ||
116 | 116 | let NodeProviderStatus = "node_status" | |
117 | 117 | ||
118 | 118 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
119 | 119 | ||
120 | 120 | let price = getNumberByKey(PriceKey) | |
121 | 121 | ||
122 | 122 | let reserve = wavesBalance(this) | |
123 | 123 | ||
124 | 124 | let neutrinoSupply = { | |
125 | 125 | let info = extract(assetInfo(neutrinoAssetId)) | |
126 | 126 | (info.quantity - assetBalance(this, neutrinoAssetId)) | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | let orderbookTotal = getNumberByKey(OrderbookTotalKey) | |
130 | 130 | ||
131 | 131 | let orderbook = getStringByKey(OrderbookKey) | |
132 | 132 | ||
133 | 133 | let snapshotBlock = getNumberByKey(SnapshotBlockKey) | |
134 | 134 | ||
135 | 135 | let lastBondGenerated = getNumberByKey(BondGeneratedBlockKey) | |
136 | 136 | ||
137 | 137 | let orderbookSnapshot = getStringByKey(OrderbookSnapshotKey) | |
138 | 138 | ||
139 | 139 | let orderbookTotalSnapshot = getNumberByKey(OrderbookTotalSnapshotKey) | |
140 | 140 | ||
141 | 141 | let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey)) | |
142 | 142 | ||
143 | 143 | let auctionContract = getStringByKey(AuctionContractKey) | |
144 | 144 | ||
145 | 145 | let leaseContract = getStringByKey(LeaseContractKey) | |
146 | 146 | ||
147 | 147 | let bondSupply = { | |
148 | 148 | let info = extract(assetInfo(bondAssetId)) | |
149 | 149 | (info.quantity - assetBalance(this, bondAssetId)) | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | func getWavesBalance (owner) = getNumberByKey((WavesBalanceKey + owner)) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getNeutrinoBalance (owner) = getNumberByKey((NeutrinoBalanceKey + owner)) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getBalanceBlock (owner) = getNumberByKey((BalanceBlockKey + owner)) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getOrderTotal (id) = getNumberByKey((OrderTotalKey + id)) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func getOrderOwner (id) = getStringByKey((OrderOwnerKey + id)) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func getAccountSnapshotBlock (id) = getNumberByKey((AccountSnapshotBlockKey + id)) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func getAccountSnapshotOwner (id) = getStringByKey((AccountSnapshotOwnerKey + id)) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func getAccountSnapshotAmount (id) = getNumberByKey((AccountSnapshotAmountKey + id)) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getNodeBalance (address,block) = getNumberByKeyAndAddress(leaseContract, (((NodeBalanceKey + address) + ListSplitSymbol) + toString(block))) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func isSentNodeBalance (address,block) = getBoolByKey((((IsSentNodeBalanceKey + address) + ListSplitSymbol) + toString(block))) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func convertNeutrinoToWaves (amount) = ((amount * 100) / price) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func convertWavesToNeutrino (amount) = ((amount * price) / 100) | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func convertNeutrinoToBond (amount) = (amount / Wavelet) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func convertBondToNeutrino (amount) = (amount * Wavelet) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount)) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply) | |
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func setCurrentPrice (price) = WriteSet([DataEntry(PriceKey, price), DataEntry(((PriceKey + ListSplitSymbol) + toString(height)), price)]) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | 204 | @Callable(i) | |
205 | 205 | func swapWavesToNeutrino () = { | |
206 | 206 | let pmt = extract(i.payment) | |
207 | 207 | if (isDefined(pmt.assetId)) | |
208 | 208 | then throw("can use waves only") | |
209 | 209 | else { | |
210 | 210 | let account = toBase58String(i.caller.bytes) | |
211 | 211 | let amount = convertWavesToNeutrino(pmt.amount) | |
212 | 212 | WriteSet([DataEntry((NeutrinoBalanceKey + toString(i.caller)), (amount + getNeutrinoBalance(account))), DataEntry((BalanceBlockKey + toString(i.caller)), height)]) | |
213 | 213 | } | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | ||
218 | 218 | @Callable(i) | |
219 | 219 | func swapNeutrinoToWaves () = { | |
220 | 220 | let pmt = extract(i.payment) | |
221 | 221 | if ((pmt.assetId != neutrinoAssetId)) | |
222 | 222 | then throw("can use neutrino only") | |
223 | 223 | else { | |
224 | 224 | let account = toBase58String(i.caller.bytes) | |
225 | 225 | let amount = convertNeutrinoToWaves(pmt.amount) | |
226 | 226 | WriteSet([DataEntry((WavesBalanceKey + toString(i.caller)), (amount + getWavesBalance(account))), DataEntry((BalanceBlockKey + toString(i.caller)), height)]) | |
227 | 227 | } | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | ||
232 | 232 | @Callable(i) | |
233 | 233 | func withdraw (account) = if (((getBalanceBlock(account) + BalanceLockBlock) > height)) | |
234 | 234 | then throw("wait a couple of blocks for withdraw") | |
235 | 235 | else ScriptResult(WriteSet([DataEntry((WavesBalanceKey + account), 0), DataEntry((NeutrinoBalanceKey + account), 0)]), TransferSet([ScriptTransfer(i.caller, getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(i.caller, getWavesBalance(account), unit)])) | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | ||
239 | 239 | @Callable(i) | |
240 | 240 | func generateBond () = { | |
241 | 241 | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve)) | |
242 | 242 | let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId) | |
243 | 243 | let amount = (convertNeutrinoToBond(deficit) - balanceAuction) | |
244 | 244 | if ((amount > 0)) | |
245 | 245 | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)]) | |
246 | 246 | else throw(("deficit did not reach the threshold. deficit =" + toString(deficit))) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | ||
251 | 251 | @Callable(i) | |
252 | 252 | func setOrder () = { | |
253 | 253 | let pmt = extract(i.payment) | |
254 | 254 | let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)))) | |
255 | 255 | if ((pmt.assetId != bondAssetId)) | |
256 | 256 | then throw("can use bond only") | |
257 | 257 | else if ((getOrderOwner(newOrderId) != "")) | |
258 | 258 | then throw("order exists") | |
259 | 259 | 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)]) | |
260 | 260 | } | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | ||
264 | 264 | @Callable(i) | |
265 | 265 | func cancelOrder (orderId) = { | |
266 | 266 | let owner = getOrderOwner(orderId) | |
267 | 267 | let total = getOrderTotal(orderId) | |
268 | 268 | if ((owner != toString(i.caller))) | |
269 | 269 | then throw("permission denied") | |
270 | 270 | else { | |
271 | 271 | let newOrderBookOnePart = split(orderbook, (orderId + ListSplitSymbol))[0] | |
272 | 272 | let newOrderBookTwoPart = split(orderbook, (orderId + ListSplitSymbol))[1] | |
273 | 273 | ScriptResult(WriteSet([DataEntry(OrderbookTotalKey, (orderbookTotal - total)), DataEntry(OrderbookKey, (newOrderBookOnePart + newOrderBookTwoPart)), DataEntry((OrderTotalKey + orderId), 0)]), TransferSet([ScriptTransfer(i.caller, total, unit)])) | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | ||
279 | 279 | @Callable(i) | |
280 | 280 | func executeOrder () = { | |
281 | 281 | let orderId = split(orderbook, ListSplitSymbol)[0] | |
282 | 282 | let orderTotal = getOrderTotal(orderId) | |
283 | 283 | if ((0 >= surplus)) | |
284 | 284 | then throw("surplus is less than zero") | |
285 | 285 | else { | |
286 | 286 | let amount = convertBondToNeutrino((orderTotal - convertNeutrinoToBond(surplus))) | |
287 | 287 | ScriptResult(WriteSet([DataEntry(OrderbookTotalKey, (orderbookTotal - (if ((surplus >= orderTotal)) | |
288 | 288 | then orderTotal | |
289 | 289 | else surplus))), DataEntry(OrderbookKey, split(orderbook, (orderId + ListSplitSymbol))[1]), DataEntry((OrderTotalKey + orderId), if ((0 >= amount)) | |
290 | 290 | then 0 | |
291 | 291 | else amount)]), TransferSet([ScriptTransfer(i.caller, if ((surplus >= orderTotal)) | |
292 | 292 | then convertBondToNeutrino(orderTotal) | |
293 | 293 | else surplus, neutrinoAssetId)])) | |
294 | 294 | } | |
295 | 295 | } | |
296 | 296 | ||
297 | 297 |
github/deemru/w8io/169f3d6 36.02 ms ◑