tx · 2KXASVrMqv4T7NUuGZBKeW1CFXJp365BfscnUBpAzXUB

3NCCxt72qfGYBPUNx6zM49UDV9r4LvrtzeY:  -0.01800000 Waves

2024.12.10 20:30 [3408804] smart account 3NCCxt72qfGYBPUNx6zM49UDV9r4LvrtzeY > SELF 0.00000000 Waves

{ "type": 13, "id": "2KXASVrMqv4T7NUuGZBKeW1CFXJp365BfscnUBpAzXUB", "fee": 1800000, "feeAssetId": null, "timestamp": 1733851711997, "version": 2, "chainId": 84, "sender": "3NCCxt72qfGYBPUNx6zM49UDV9r4LvrtzeY", "senderPublicKey": "D14bs2ieC42BPAapbooQT637A3iD7mXwJ9bgfDGXBHcX", "proofs": [ "5XJsfUqQ4UjyhqNoeohEmreq24Fbodra6oLJ57vvuGX9Y1qX4VNbTiSMs7ohWrZbvvNcbjB2jzuGFVP5vcvR9nog" ], "script": "base64:BwItCAISBQoDCAgIEgYKBAgICAgSBQoDCAgIEgQKAggEEgMKAQgSAwoBCBIDCgEIPwAJU0VQQVJBVE9SAgJfXwAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTAAhLRVlfSU5JVAIESU5JVAANS0VZX1NFUVVFTkNFUgIJU0VRVUVOQ0VSABNLRVlfQUNDT1VOVF9TVE9SQUdFAg9BQ0NPVU5UX1NUT1JBR0UAEUtFWV9GRUVfUkVDSVBJRU5UAg1GRUVfUkVDSVBJRU5UAApLRVlfU1lNQk9MAgZTWU1CT0wAF0tFWV9PUkRFUl9GSUxMRURfQU1PVU5UAhNPUkRFUl9GSUxMRURfQU1PVU5UABZLRVlfUkVXQVJEX0RJU1RSSUJVVE9SAhJSRVdBUkRfRElTVFJJQlVUT1IAFkZVTkNfRVhURVJOQUxfVFJBTlNGRVICEGV4dGVybmFsVHJhbnNmZXIAEUZVTkNfQ0xBSU1fUkVXQVJEAgtjbGFpbVJld2FyZAALU1BPVF9XQUxMRVQCBFNQT1QAEE9SREVSX1RZUEVfTElNSVQA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VeEnhuH5qtM3 Next: none Diff:
OldNewDifferences
268268 func _validateOrderSignature (orderHash_,signature_,web3Id_,alg_,err_) = {
269269 let result = if ((alg_ == ALG_TYPE_WAVES))
270270 then {
271- let hashWithPrefix = keccak256_16Kb((WAVES_PREFIX + toBytes(toBase58String(orderHash_))))
272- sigVerify(hashWithPrefix, signature_, web3Id_)
271+ let msg = (WAVES_PREFIX + toBytes(toBase58String(orderHash_)))
272+ sigVerify(msg, signature_, web3Id_)
273273 }
274274 else if ((alg_ == ALG_TYPE_EVM))
275275 then {
298298 let web3Id = fromBase58String(fields[5])
299299 let alg = valueOrErrorMessage(parseInt(fields[6]), (err_ + ": inv alg"))
300300 let signature = fromBase58String(fields[7])
301- let $t085009538 = if (if ((type == ORDER_TYPE_LIMIT))
301+ let $t084629500 = if (if ((type == ORDER_TYPE_LIMIT))
302302 then (version == ORDER_VERSION_1)
303303 else false)
304304 then {
320320 else $Tuple4(ZERO_BIGINT, ZERO_BIGINT, amount, (toBytes(amount) + toBytes(ZERO_BIGINT)))
321321 }
322322 else throw((err_ + ": inv type & version"))
323- let price = $t085009538._1
324- let baseAmount = $t085009538._2
325- let quoteAmount = $t085009538._3
326- let orderDetailsBytes = $t085009538._4
323+ let price = $t084629500._1
324+ let baseAmount = $t084629500._2
325+ let quoteAmount = $t084629500._3
326+ let orderDetailsBytes = $t084629500._4
327327 let orderBytes = ((((((((toBytes(type) + toBytes(version)) + toBytes(size(symbol))) + toBytes(symbol)) + toBytes(side)) + toBytes(ts)) + web3Id) + toBytes(alg)) + orderDetailsBytes)
328328 let orderHash = keccak256_32Kb(orderBytes)
329329 let err = if (if (if (if (if (if (if (_validateOrderType(type, version, (err_ + ": inv order type")))
369369
370370 @Callable(i)
371371 func trade (makerOrder_,takerOrder_,baseFee_,quoteFee_) = {
372- let $t01135411683 = _parseOrder(makerOrder_, "trade: invalid maker order")
373- let makerOrderType = $t01135411683._1
374- let makerOrderSymbol = $t01135411683._2
375- let makerOrderSide = $t01135411683._3
376- let makerOrderPrice = $t01135411683._4
377- let makerOrderBaseAmount = $t01135411683._5
378- let makerOrderQuoteAmount = $t01135411683._6
379- let makerOrderHash = $t01135411683._7
380- let makerOrderWeb3Id = $t01135411683._8
381- let makerOrderAlg = $t01135411683._9
382- let makerOrderSignature = $t01135411683._10
383- let $t01168912018 = _parseOrder(takerOrder_, "trade: invalid taker order")
384- let takerOrderType = $t01168912018._1
385- let takerOrderSymbol = $t01168912018._2
386- let takerOrderSide = $t01168912018._3
387- let takerOrderPrice = $t01168912018._4
388- let takerOrderBaseAmount = $t01168912018._5
389- let takerOrderQuoteAmount = $t01168912018._6
390- let takerOrderHash = $t01168912018._7
391- let takerOrderWeb3Id = $t01168912018._8
392- let takerOrderAlg = $t01168912018._9
393- let takerOrderSignature = $t01168912018._10
372+ let $t01131611645 = _parseOrder(makerOrder_, "trade: invalid maker order")
373+ let makerOrderType = $t01131611645._1
374+ let makerOrderSymbol = $t01131611645._2
375+ let makerOrderSide = $t01131611645._3
376+ let makerOrderPrice = $t01131611645._4
377+ let makerOrderBaseAmount = $t01131611645._5
378+ let makerOrderQuoteAmount = $t01131611645._6
379+ let makerOrderHash = $t01131611645._7
380+ let makerOrderWeb3Id = $t01131611645._8
381+ let makerOrderAlg = $t01131611645._9
382+ let makerOrderSignature = $t01131611645._10
383+ let $t01165111980 = _parseOrder(takerOrder_, "trade: invalid taker order")
384+ let takerOrderType = $t01165111980._1
385+ let takerOrderSymbol = $t01165111980._2
386+ let takerOrderSide = $t01165111980._3
387+ let takerOrderPrice = $t01165111980._4
388+ let takerOrderBaseAmount = $t01165111980._5
389+ let takerOrderQuoteAmount = $t01165111980._6
390+ let takerOrderHash = $t01165111980._7
391+ let takerOrderWeb3Id = $t01165111980._8
392+ let takerOrderAlg = $t01165111980._9
393+ let takerOrderSignature = $t01165111980._10
394394 let baseFee = valueOrErrorMessage(parseBigInt(baseFee_), "trade: baseFee not int")
395395 let quoteFee = valueOrErrorMessage(parseBigInt(quoteFee_), "trade: quoteFee not int")
396396 let tradePrice = makerOrderPrice
425425 then {
426426 let makerAddress = _convertWeb3IdToAddress(makerOrderWeb3Id, makerOrderAlg)
427427 let takerAddress = _convertWeb3IdToAddress(takerOrderWeb3Id, takerOrderAlg)
428- let $t01417514598 = if ((makerOrderSide == ORDER_SIDE_BUY))
428+ let $t01413714560 = if ((makerOrderSide == ORDER_SIDE_BUY))
429429 then $Tuple2(makerAddress, takerAddress)
430430 else $Tuple2(takerAddress, makerAddress)
431- let buyer = $t01417514598._1
432- let seller = $t01417514598._2
431+ let buyer = $t01413714560._1
432+ let seller = $t01413714560._2
433433 let assets = split(makerOrderSymbol, "-")
434434 let baseAsset = assets[0]
435435 let quoteAsset = assets[1]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEPARATOR = "__"
55
66 let KEY_MULTISIG = "MULTISIG"
77
88 let KEY_STATUS = "STATUS"
99
1010 let KEY_INIT = "INIT"
1111
1212 let KEY_SEQUENCER = "SEQUENCER"
1313
1414 let KEY_ACCOUNT_STORAGE = "ACCOUNT_STORAGE"
1515
1616 let KEY_FEE_RECIPIENT = "FEE_RECIPIENT"
1717
1818 let KEY_SYMBOL = "SYMBOL"
1919
2020 let KEY_ORDER_FILLED_AMOUNT = "ORDER_FILLED_AMOUNT"
2121
2222 let KEY_REWARD_DISTRIBUTOR = "REWARD_DISTRIBUTOR"
2323
2424 let FUNC_EXTERNAL_TRANSFER = "externalTransfer"
2525
2626 let FUNC_CLAIM_REWARD = "claimReward"
2727
2828 let SPOT_WALLET = "SPOT"
2929
3030 let ORDER_TYPE_LIMIT = 1
3131
3232 let ORDER_TYPE_MARKET = 2
3333
3434 let ORDER_VERSION_1 = 1
3535
3636 let ORDER_SIDE_BUY = 1
3737
3838 let ORDER_SIDE_SELL = 2
3939
4040 let ALG_TYPE_WAVES = 1
4141
4242 let ALG_TYPE_EVM = 2
4343
4444 let ZERO_BIGINT = toBigInt(0)
4545
4646 let ONE_BIGINT = toBigInt(1)
4747
4848 let MULTIPLIER = toBigInt(100000000)
4949
5050 let FEE_MAX_TOLERANCE = toBigInt(100000)
5151
5252 let WAVES_PREFIX = base58'7YXq4t'
5353
5454 let EVM_PREFIX = base58'G5Nu92G2p7moXW9qjjN3na7gtq4dWCeVdaSjry'
5555
5656 func _validateAddress (address_,err_) = match addressFromString(address_) {
5757 case a: Address =>
5858 true
5959 case _ =>
6060 throw(err_)
6161 }
6262
6363
6464 func _validateBigInt (val_,lowerBoundary_,err_) = if ((lowerBoundary_ > val_))
6565 then throw(err_)
6666 else true
6767
6868
6969 func _validateIntEqual (val1_,val2_,err_) = if ((val1_ != val2_))
7070 then throw(err_)
7171 else true
7272
7373
7474 func _validateIntNotEqual (val1_,val2_,err_) = if ((val1_ == val2_))
7575 then throw(err_)
7676 else true
7777
7878
7979 func _validateString (val_,err_) = if (if ((0 >= size(val_)))
8080 then true
8181 else contains(val_, SEPARATOR))
8282 then throw(err_)
8383 else true
8484
8585
8686 func _validateStringEqual (val1_,val2_,err_) = if ((val1_ != val2_))
8787 then throw(err_)
8888 else true
8989
9090
9191 func _loadInit () = match getBoolean(KEY_INIT) {
9292 case a: Boolean =>
9393 a
9494 case _ =>
9595 false
9696 }
9797
9898
9999 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
100100
101101
102102 func _loadMultisig () = match getString(KEY_MULTISIG) {
103103 case a: String =>
104104 addressFromStringValue(a)
105105 case _ =>
106106 Address(base58'')
107107 }
108108
109109
110110 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
111111
112112
113113 func _loadSequencer () = match getString(KEY_SEQUENCER) {
114114 case a: String =>
115115 addressFromStringValue(a)
116116 case _ =>
117117 Address(base58'')
118118 }
119119
120120
121121 func _saveSequencer (sequencer_) = [StringEntry(KEY_SEQUENCER, toString(sequencer_))]
122122
123123
124124 func _loadAccountStorage () = match getString(KEY_ACCOUNT_STORAGE) {
125125 case a: String =>
126126 addressFromStringValue(a)
127127 case _ =>
128128 Address(base58'')
129129 }
130130
131131
132132 func _saveAccountStorage (accountStorage_) = [StringEntry(KEY_ACCOUNT_STORAGE, toString(accountStorage_))]
133133
134134
135135 func _loadFeeRecipient () = match getString(KEY_FEE_RECIPIENT) {
136136 case a: String =>
137137 a
138138 case _ =>
139139 ""
140140 }
141141
142142
143143 func _saveFeeRecipient (feeRecipient_) = [StringEntry(KEY_FEE_RECIPIENT, feeRecipient_)]
144144
145145
146146 func _loadRewardDistributor () = match getString(KEY_REWARD_DISTRIBUTOR) {
147147 case a: String =>
148148 a
149149 case _ =>
150150 ""
151151 }
152152
153153
154154 func _saveRewardDistributor (distributor_) = [StringEntry(KEY_REWARD_DISTRIBUTOR, distributor_)]
155155
156156
157157 func _loadSymbol (symbol_) = match getBoolean(makeString([KEY_SYMBOL, symbol_], SEPARATOR)) {
158158 case a: Boolean =>
159159 a
160160 case _ =>
161161 false
162162 }
163163
164164
165165 func _saveSymbol (symbol_,val_) = [BooleanEntry(makeString([KEY_SYMBOL, symbol_], SEPARATOR), val_)]
166166
167167
168168 func _loadOrderFilledAmount (orderHash_) = match getString(makeString([KEY_ORDER_FILLED_AMOUNT, toBase58String(orderHash_)], SEPARATOR)) {
169169 case a: String =>
170170 parseBigIntValue(a)
171171 case _ =>
172172 ZERO_BIGINT
173173 }
174174
175175
176176 func _saveOrderFilledAmount (orderHash_,amount_) = [StringEntry(makeString([KEY_ORDER_FILLED_AMOUNT, toBase58String(orderHash_)], SEPARATOR), toString(amount_))]
177177
178178
179179 func _onlyThisContract (caller_) = if ((caller_ != this))
180180 then throw("_onlyThisContract: revert")
181181 else true
182182
183183
184184 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
185185 then throw("_whenMultisigSet: revert")
186186 else true
187187
188188
189189 func _whenNotInitialized () = if (_loadInit())
190190 then throw("_whenNotInitialized: revert")
191191 else true
192192
193193
194194 func _whenInitialized () = if (!(_loadInit()))
195195 then throw("_whenInitialized: revert")
196196 else true
197197
198198
199199 func _validateSequencer (caller,err_) = if ((_loadSequencer() != caller))
200200 then throw(err_)
201201 else true
202202
203203
204204 func _validateOrderType (type_,version_,err_) = if (if ((type_ != ORDER_TYPE_LIMIT))
205205 then (type_ != ORDER_TYPE_MARKET)
206206 else false)
207207 then throw(err_)
208208 else if ((version_ != ORDER_VERSION_1))
209209 then throw(err_)
210210 else true
211211
212212
213213 func _validateOrderSymbol (symbol_,err_) = if (!(_loadSymbol(symbol_)))
214214 then throw(err_)
215215 else true
216216
217217
218218 func _validateOrderSide (side_,err_) = if (if ((side_ != ORDER_SIDE_BUY))
219219 then (side_ != ORDER_SIDE_SELL)
220220 else false)
221221 then throw(err_)
222222 else true
223223
224224
225225 func _validateOrderPrices (makerOrderPrice_,takerOrderPrice_,takerOrderSide_,takerOrderType_,err_) = {
226226 let result = if ((takerOrderType_ == ORDER_TYPE_MARKET))
227227 then true
228228 else if ((takerOrderSide_ == ORDER_SIDE_BUY))
229229 then (takerOrderPrice_ >= makerOrderPrice_)
230230 else if ((takerOrderSide_ == ORDER_SIDE_SELL))
231231 then (makerOrderPrice_ >= takerOrderPrice_)
232232 else false
233233 if (!(result))
234234 then throw(err_)
235235 else true
236236 }
237237
238238
239239 func _validateSignatureFormat (signature_,alg_,err_) = if ((alg_ == ALG_TYPE_WAVES))
240240 then if ((size(signature_) != 64))
241241 then throw(err_)
242242 else true
243243 else if ((alg_ == ALG_TYPE_EVM))
244244 then if ((size(signature_) != 65))
245245 then throw(err_)
246246 else true
247247 else throw((err_ + ": inv alg"))
248248
249249
250250 func _validateWeb3Id (web3Id_,alg_,err_) = if ((alg_ == ALG_TYPE_WAVES))
251251 then if ((size(web3Id_) != 32))
252252 then throw(err_)
253253 else true
254254 else if ((alg_ == ALG_TYPE_EVM))
255255 then if ((size(web3Id_) != 20))
256256 then throw(err_)
257257 else true
258258 else throw((err_ + ": inv alg"))
259259
260260
261261 func _convertWeb3IdToAddress (web3Id_,alg_) = if ((alg_ == ALG_TYPE_WAVES))
262262 then toString(addressFromPublicKey(web3Id_))
263263 else if ((alg_ == ALG_TYPE_EVM))
264264 then ("0x" + toBase16String(web3Id_))
265265 else throw("_convertWeb3IdToAddress: revert")
266266
267267
268268 func _validateOrderSignature (orderHash_,signature_,web3Id_,alg_,err_) = {
269269 let result = if ((alg_ == ALG_TYPE_WAVES))
270270 then {
271- let hashWithPrefix = keccak256_16Kb((WAVES_PREFIX + toBytes(toBase58String(orderHash_))))
272- sigVerify(hashWithPrefix, signature_, web3Id_)
271+ let msg = (WAVES_PREFIX + toBytes(toBase58String(orderHash_)))
272+ sigVerify(msg, signature_, web3Id_)
273273 }
274274 else if ((alg_ == ALG_TYPE_EVM))
275275 then {
276276 let hashWithPrefix = keccak256_16Kb((EVM_PREFIX + orderHash_))
277277 (takeRight(keccak256_16Kb(ecrecover(hashWithPrefix, signature_)), 20) == web3Id_)
278278 }
279279 else throw((err_ + ": inv alg"))
280280 if (!(result))
281281 then throw(err_)
282282 else true
283283 }
284284
285285
286286 func _validateFeeTolerance (amount_,fee_,err_) = if ((fee_ > fraction(amount_, FEE_MAX_TOLERANCE, MULTIPLIER, DOWN)))
287287 then throw(err_)
288288 else true
289289
290290
291291 func _parseOrder (order_,err_) = {
292292 let fields = split(order_, SEPARATOR)
293293 let type = valueOrErrorMessage(parseInt(fields[0]), (err_ + ": inv type"))
294294 let version = valueOrErrorMessage(parseInt(fields[1]), (err_ + ": inv version"))
295295 let symbol = fields[2]
296296 let side = valueOrErrorMessage(parseInt(fields[3]), (err_ + ": inv side"))
297297 let ts = valueOrErrorMessage(parseInt(fields[4]), (err_ + ": inv ts"))
298298 let web3Id = fromBase58String(fields[5])
299299 let alg = valueOrErrorMessage(parseInt(fields[6]), (err_ + ": inv alg"))
300300 let signature = fromBase58String(fields[7])
301- let $t085009538 = if (if ((type == ORDER_TYPE_LIMIT))
301+ let $t084629500 = if (if ((type == ORDER_TYPE_LIMIT))
302302 then (version == ORDER_VERSION_1)
303303 else false)
304304 then {
305305 let price = valueOrErrorMessage(parseBigInt(fields[8]), (err_ + ": inv price"))
306306 let amount = valueOrErrorMessage(parseBigInt(fields[9]), (err_ + ": inv amount"))
307307 let orderDetailsBytes = (toBytes(price) + toBytes(amount))
308308 $Tuple4(price, amount, ZERO_BIGINT, orderDetailsBytes)
309309 }
310310 else if (if ((type == ORDER_TYPE_MARKET))
311311 then (version == ORDER_VERSION_1)
312312 else false)
313313 then {
314314 let amount = valueOrErrorMessage(parseBigInt(fields[8]), (err_ + ": inv amount"))
315315 let isBaseAmount = if ((valueOrErrorMessage(parseBigInt(fields[9]), (err_ + ": inv isBaseAmount")) == ZERO_BIGINT))
316316 then false
317317 else true
318318 if (isBaseAmount)
319319 then $Tuple4(ZERO_BIGINT, amount, ZERO_BIGINT, (toBytes(amount) + toBytes(ONE_BIGINT)))
320320 else $Tuple4(ZERO_BIGINT, ZERO_BIGINT, amount, (toBytes(amount) + toBytes(ZERO_BIGINT)))
321321 }
322322 else throw((err_ + ": inv type & version"))
323- let price = $t085009538._1
324- let baseAmount = $t085009538._2
325- let quoteAmount = $t085009538._3
326- let orderDetailsBytes = $t085009538._4
323+ let price = $t084629500._1
324+ let baseAmount = $t084629500._2
325+ let quoteAmount = $t084629500._3
326+ let orderDetailsBytes = $t084629500._4
327327 let orderBytes = ((((((((toBytes(type) + toBytes(version)) + toBytes(size(symbol))) + toBytes(symbol)) + toBytes(side)) + toBytes(ts)) + web3Id) + toBytes(alg)) + orderDetailsBytes)
328328 let orderHash = keccak256_32Kb(orderBytes)
329329 let err = if (if (if (if (if (if (if (_validateOrderType(type, version, (err_ + ": inv order type")))
330330 then _validateOrderSymbol(symbol, (err_ + ": inv order symbol"))
331331 else false)
332332 then _validateOrderSide(side, (err_ + ": inv order side"))
333333 else false)
334334 then _validateWeb3Id(web3Id, alg, (err_ + ": inv order web3Id"))
335335 else false)
336336 then _validateSignatureFormat(signature, alg, (err_ + ": inv sig format"))
337337 else false)
338338 then _validateBigInt(price, ZERO_BIGINT, (err_ + ": neg price"))
339339 else false)
340340 then _validateBigInt(baseAmount, ZERO_BIGINT, (err_ + ": neg base amount"))
341341 else false)
342342 then _validateBigInt(quoteAmount, ZERO_BIGINT, (err_ + ": neg quote amount"))
343343 else false
344344 if ((err == err))
345345 then $Tuple10(type, symbol, side, price, baseAmount, quoteAmount, orderHash, web3Id, alg, signature)
346346 else throw("Strict value is not equal to itself.")
347347 }
348348
349349
350350 @Callable(i)
351351 func init (sequencer_,accountStorage_,feeRecipient_) = {
352352 let err = if (if (if (if (if (_onlyThisContract(i.caller))
353353 then _whenNotInitialized()
354354 else false)
355355 then _whenMultisigSet()
356356 else false)
357357 then _validateAddress(sequencer_, "init: invalid sequencer")
358358 else false)
359359 then _validateAddress(accountStorage_, "init: invalid accountStorage")
360360 else false)
361361 then _validateString(feeRecipient_, "init: invalid feeRecipient")
362362 else false
363363 if ((err == err))
364364 then $Tuple2((((_saveInit(true) ++ _saveSequencer(addressFromStringValue(sequencer_))) ++ _saveAccountStorage(addressFromStringValue(accountStorage_))) ++ _saveFeeRecipient(feeRecipient_)), unit)
365365 else throw("Strict value is not equal to itself.")
366366 }
367367
368368
369369
370370 @Callable(i)
371371 func trade (makerOrder_,takerOrder_,baseFee_,quoteFee_) = {
372- let $t01135411683 = _parseOrder(makerOrder_, "trade: invalid maker order")
373- let makerOrderType = $t01135411683._1
374- let makerOrderSymbol = $t01135411683._2
375- let makerOrderSide = $t01135411683._3
376- let makerOrderPrice = $t01135411683._4
377- let makerOrderBaseAmount = $t01135411683._5
378- let makerOrderQuoteAmount = $t01135411683._6
379- let makerOrderHash = $t01135411683._7
380- let makerOrderWeb3Id = $t01135411683._8
381- let makerOrderAlg = $t01135411683._9
382- let makerOrderSignature = $t01135411683._10
383- let $t01168912018 = _parseOrder(takerOrder_, "trade: invalid taker order")
384- let takerOrderType = $t01168912018._1
385- let takerOrderSymbol = $t01168912018._2
386- let takerOrderSide = $t01168912018._3
387- let takerOrderPrice = $t01168912018._4
388- let takerOrderBaseAmount = $t01168912018._5
389- let takerOrderQuoteAmount = $t01168912018._6
390- let takerOrderHash = $t01168912018._7
391- let takerOrderWeb3Id = $t01168912018._8
392- let takerOrderAlg = $t01168912018._9
393- let takerOrderSignature = $t01168912018._10
372+ let $t01131611645 = _parseOrder(makerOrder_, "trade: invalid maker order")
373+ let makerOrderType = $t01131611645._1
374+ let makerOrderSymbol = $t01131611645._2
375+ let makerOrderSide = $t01131611645._3
376+ let makerOrderPrice = $t01131611645._4
377+ let makerOrderBaseAmount = $t01131611645._5
378+ let makerOrderQuoteAmount = $t01131611645._6
379+ let makerOrderHash = $t01131611645._7
380+ let makerOrderWeb3Id = $t01131611645._8
381+ let makerOrderAlg = $t01131611645._9
382+ let makerOrderSignature = $t01131611645._10
383+ let $t01165111980 = _parseOrder(takerOrder_, "trade: invalid taker order")
384+ let takerOrderType = $t01165111980._1
385+ let takerOrderSymbol = $t01165111980._2
386+ let takerOrderSide = $t01165111980._3
387+ let takerOrderPrice = $t01165111980._4
388+ let takerOrderBaseAmount = $t01165111980._5
389+ let takerOrderQuoteAmount = $t01165111980._6
390+ let takerOrderHash = $t01165111980._7
391+ let takerOrderWeb3Id = $t01165111980._8
392+ let takerOrderAlg = $t01165111980._9
393+ let takerOrderSignature = $t01165111980._10
394394 let baseFee = valueOrErrorMessage(parseBigInt(baseFee_), "trade: baseFee not int")
395395 let quoteFee = valueOrErrorMessage(parseBigInt(quoteFee_), "trade: quoteFee not int")
396396 let tradePrice = makerOrderPrice
397397 let makerOrderFilledAmount = _loadOrderFilledAmount(makerOrderHash)
398398 let makerOrderBaseAmountFree = (makerOrderBaseAmount - makerOrderFilledAmount)
399399 let takerOrderFilledAmount = _loadOrderFilledAmount(takerOrderHash)
400400 let takerOrderBaseAmountFree = if ((takerOrderBaseAmount == ZERO_BIGINT))
401401 then fraction((takerOrderQuoteAmount - takerOrderFilledAmount), MULTIPLIER, tradePrice, DOWN)
402402 else (takerOrderBaseAmount - takerOrderFilledAmount)
403403 let tradeBaseAmount = min([makerOrderBaseAmountFree, takerOrderBaseAmountFree])
404404 let tradeQuoteAmount = fraction(tradeBaseAmount, tradePrice, MULTIPLIER, DOWN)
405405 let err = if (if (if (if (if (if (if (if (if (_validateSequencer(i.caller, "trade: invalid sequencer"))
406406 then _validateBigInt(tradeBaseAmount, ZERO_BIGINT, "trade: neg trade amount")
407407 else false)
408408 then _validateIntEqual(makerOrderType, ORDER_TYPE_LIMIT, "trade: maker is not limit")
409409 else false)
410410 then _validateStringEqual(makerOrderSymbol, takerOrderSymbol, "trade: symbol mismatch")
411411 else false)
412412 then _validateIntNotEqual(makerOrderSide, takerOrderSide, "trade: side mismatch")
413413 else false)
414414 then _validateOrderSignature(makerOrderHash, makerOrderSignature, makerOrderWeb3Id, makerOrderAlg, "trade: invalid maker sig")
415415 else false)
416416 then _validateOrderSignature(takerOrderHash, takerOrderSignature, takerOrderWeb3Id, takerOrderAlg, "trade: invalid taker sig")
417417 else false)
418418 then _validateFeeTolerance(tradeBaseAmount, baseFee, "trade: base fee too much")
419419 else false)
420420 then _validateFeeTolerance(tradeQuoteAmount, quoteFee, "trade: quote fee too much")
421421 else false)
422422 then _validateOrderPrices(makerOrderPrice, takerOrderPrice, takerOrderSide, takerOrderType, "trade: prices mismatch")
423423 else false
424424 if ((err == err))
425425 then {
426426 let makerAddress = _convertWeb3IdToAddress(makerOrderWeb3Id, makerOrderAlg)
427427 let takerAddress = _convertWeb3IdToAddress(takerOrderWeb3Id, takerOrderAlg)
428- let $t01417514598 = if ((makerOrderSide == ORDER_SIDE_BUY))
428+ let $t01413714560 = if ((makerOrderSide == ORDER_SIDE_BUY))
429429 then $Tuple2(makerAddress, takerAddress)
430430 else $Tuple2(takerAddress, makerAddress)
431- let buyer = $t01417514598._1
432- let seller = $t01417514598._2
431+ let buyer = $t01413714560._1
432+ let seller = $t01413714560._2
433433 let assets = split(makerOrderSymbol, "-")
434434 let baseAsset = assets[0]
435435 let quoteAsset = assets[1]
436436 let feeRecipient = _loadFeeRecipient()
437437 let storageInvocation = invoke(_loadAccountStorage(), FUNC_EXTERNAL_TRANSFER, [SPOT_WALLET, baseAsset, seller, buyer, toString(tradeBaseAmount), toString(baseFee), feeRecipient], nil)
438438 if ((storageInvocation == storageInvocation))
439439 then {
440440 let storageInvocation1 = invoke(_loadAccountStorage(), FUNC_EXTERNAL_TRANSFER, [SPOT_WALLET, quoteAsset, buyer, seller, toString(tradeQuoteAmount), toString(quoteFee), feeRecipient], nil)
441441 if ((storageInvocation1 == storageInvocation1))
442442 then {
443443 let newMakerOrderFilledAmount = (makerOrderFilledAmount + tradeBaseAmount)
444444 let newTakerOrderFilledAmount = if ((takerOrderBaseAmount == ZERO_BIGINT))
445445 then (takerOrderFilledAmount + tradeQuoteAmount)
446446 else (takerOrderFilledAmount + tradeBaseAmount)
447447 $Tuple2((_saveOrderFilledAmount(makerOrderHash, newMakerOrderFilledAmount) ++ _saveOrderFilledAmount(takerOrderHash, newTakerOrderFilledAmount)), unit)
448448 }
449449 else throw("Strict value is not equal to itself.")
450450 }
451451 else throw("Strict value is not equal to itself.")
452452 }
453453 else throw("Strict value is not equal to itself.")
454454 }
455455
456456
457457
458458 @Callable(i)
459459 func claimReward (user_,currency_,amount_) = {
460460 let amount = valueOrErrorMessage(parseBigInt(amount_), "claimReward: amount not int")
461461 let err = if (if (if (_validateSequencer(i.caller, "claimReward: invalid sequencer"))
462462 then _validateString(user_, "claimReward: invalid user")
463463 else false)
464464 then _validateString(currency_, "claimReward: invalid currency")
465465 else false)
466466 then _validateBigInt(amount, ZERO_BIGINT, "claimReward: neg amount")
467467 else false
468468 if ((err == err))
469469 then {
470470 let storageInvocation = invoke(_loadAccountStorage(), FUNC_CLAIM_REWARD, [_loadRewardDistributor(), user_, currency_, amount_], nil)
471471 if ((storageInvocation == storageInvocation))
472472 then $Tuple2(nil, unit)
473473 else throw("Strict value is not equal to itself.")
474474 }
475475 else throw("Strict value is not equal to itself.")
476476 }
477477
478478
479479
480480 @Callable(i)
481481 func updateSymbol (symbol_,allowance_) = {
482482 let err = if (_onlyThisContract(i.caller))
483483 then _validateString(symbol_, "updateSymbol: invalid symbol")
484484 else false
485485 if ((err == err))
486486 then $Tuple2(_saveSymbol(symbol_, allowance_), unit)
487487 else throw("Strict value is not equal to itself.")
488488 }
489489
490490
491491
492492 @Callable(i)
493493 func updateFeeRecipient (feeRecipient_) = {
494494 let err = if (if (_onlyThisContract(i.caller))
495495 then _whenInitialized()
496496 else false)
497497 then _validateString(feeRecipient_, "updateFeeRecipient: invalid feeRecipient")
498498 else false
499499 if ((err == err))
500500 then $Tuple2(_saveFeeRecipient(feeRecipient_), unit)
501501 else throw("Strict value is not equal to itself.")
502502 }
503503
504504
505505
506506 @Callable(i)
507507 func updateRewardDistributor (rewardDistributor_) = {
508508 let err = if (if (_onlyThisContract(i.caller))
509509 then _whenInitialized()
510510 else false)
511511 then _validateString(rewardDistributor_, "updateRewardDistributor: invalid rewardDistributor")
512512 else false
513513 if ((err == err))
514514 then $Tuple2(_saveRewardDistributor(rewardDistributor_), unit)
515515 else throw("Strict value is not equal to itself.")
516516 }
517517
518518
519519
520520 @Callable(i)
521521 func setMultisig (multisig_) = {
522522 let err = if (_onlyThisContract(i.caller))
523523 then _validateAddress(multisig_, "setMultisig: invalid multisig")
524524 else false
525525 if ((err == err))
526526 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
527527 else throw("Strict value is not equal to itself.")
528528 }
529529
530530
531531 @Verifier(tx)
532532 func verify () = match getString(KEY_MULTISIG) {
533533 case multisig: String =>
534534 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
535535 case _ =>
536536 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
537537 }
538538

github/deemru/w8io/169f3d6 
87.59 ms