tx · HrYmWNzyHft45jNm2oSb2azkTdfvvAQAeqHWKtjwUW8k

3N9be2mwrA52WJho6DiesZkk4351GvpnWuj:  -0.01400000 Waves

2022.03.24 09:26 [1977639] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves

{ "type": 13, "id": "HrYmWNzyHft45jNm2oSb2azkTdfvvAQAeqHWKtjwUW8k", "fee": 1400000, "feeAssetId": null, "timestamp": 1648103221142, "version": 1, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "4c1qoFtPJDqoCZ49ZVPfg945fmydBLDTVrqhYnwb2PuEjiUDZZwRfAuo6LrdGMKYBoWjiYYkd3fk98yxn2NJKRNn", "5tvonumqXTvB1uMMdM3EeCjLrCe45tSDa58nt5TzRX9WPfJ74MBRSTcAjV9pdKZ9upimd77SNxrNcBfqkCHD4CJm", "4n5saztkTZKo3DSwDN4eBXWHkhchL9RarH8k4m7oWRLBFauQLywYCH2dJTeoQc3XXALXS8kUkHe9tGBuyDGfYai5" ], "script": "base64:AAIFAAAAAAAAADQIAhIOCgwICAgICAgBAQEBAQESBQoDCAgBEgASABIFCgMIAQgSABIECgIBCBIAEgQKAggBAAAAdQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAA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AAAAAAA8kz8tE=", "chainId": 84, "height": 1977639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GYffL1ZfVL6Lwz5DfunscQ3hkzUvnyFiBCKMMKSYkZD5 Next: FtDNSChYhtAPm16gApha11hdpHjD7oyD4GUyieiUry2c Diff:
OldNewDifferences
400400 }
401401
402402
403-@Callable(i)
404403 func commonWithdraw (account,index,swapTxId,withdrawTxId) = {
405- let checkCaller = thisOnly(i)
406- if ((checkCaller == checkCaller))
407- then if ((size(i.payments) != 0))
408- then throw("no payments allowed")
409- else {
410- let userAddress = addressFromStringValue(account)
411- let feeManagerAddress = feeManagerAddressREAD()
412- let dataArray = swapDataFailOrREAD(account, swapTxId)
413- let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
414- let swapType = dataArray[sIdxSwapType]
415- let inAmount = parseIntValue(dataArray[sIdxInAmount])
416- let swapStatus = dataArray[sIdxStatus]
417- let startHeight = parseIntValue(dataArray[sIdxStartHeight])
418- let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
419- let totalLocked = totalLockedREAD(swapType)
420- let totalLockedByUser = totalLockedByUserREAD(swapType, account)
421- let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
422- let indexHeight = getHeightPriceByIndex(index)
423- let prevIndexHeight = getHeightPriceByIndex((index - 1))
424- let priceByIndex = getPriceHistory(indexHeight)
425- let outAmountGrossTuple = if ((swapType == "waves"))
426- then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
427- else if ((swapType == "neutrino"))
428- then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
429- else throw(("Unsupported swap type " + swapType))
430- let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
431- let outNetAmount = payoutsArray[IdxNetAmount]
432- let outFeeAmount = payoutsArray[IdxFeeAmount]
433- if (isBlocked)
434- then emergencyShutdownFAIL()
435- else if ((swapStatus != "PENDING"))
436- then throw("swap has been already processed")
437- else if ((unlockHeight > height))
438- then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
439- else if (if (if ((index > priceIndex))
440- then true
441- else (unlockHeight > indexHeight))
442- then true
443- else if ((prevIndexHeight != 0))
444- then (prevIndexHeight >= unlockHeight)
404+ let userAddress = addressFromStringValue(account)
405+ let feeManagerAddress = feeManagerAddressREAD()
406+ let dataArray = swapDataFailOrREAD(account, swapTxId)
407+ let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
408+ let swapType = dataArray[sIdxSwapType]
409+ let inAmount = parseIntValue(dataArray[sIdxInAmount])
410+ let swapStatus = dataArray[sIdxStatus]
411+ let startHeight = parseIntValue(dataArray[sIdxStartHeight])
412+ let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
413+ let totalLocked = totalLockedREAD(swapType)
414+ let totalLockedByUser = totalLockedByUserREAD(swapType, account)
415+ let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
416+ let indexHeight = getHeightPriceByIndex(index)
417+ let prevIndexHeight = getHeightPriceByIndex((index - 1))
418+ let priceByIndex = getPriceHistory(indexHeight)
419+ let outAmountGrossTuple = if ((swapType == "waves"))
420+ then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
421+ else if ((swapType == "neutrino"))
422+ then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
423+ else throw(("Unsupported swap type " + swapType))
424+ let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
425+ let outNetAmount = payoutsArray[IdxNetAmount]
426+ let outFeeAmount = payoutsArray[IdxFeeAmount]
427+ if (isBlocked)
428+ then emergencyShutdownFAIL()
429+ else if ((swapStatus != "PENDING"))
430+ then throw("swap has been already processed")
431+ else if ((unlockHeight > height))
432+ then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
433+ else if (if (if ((index > priceIndex))
434+ then true
435+ else (unlockHeight > indexHeight))
436+ then true
437+ else if ((prevIndexHeight != 0))
438+ then (prevIndexHeight >= unlockHeight)
439+ else false)
440+ then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
441+ else if ((0 >= payoutsArray[IdxGrossAmount]))
442+ then throw("balance equals zero")
443+ else if (if ((0 > outFeePart))
444+ then true
445+ else (outFeePart >= PAULI))
446+ then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
447+ else {
448+ let leasePart = if (if ((swapType == "neutrino"))
449+ then (outAmountGrossTuple._1 > 0)
445450 else false)
446- then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
447- else if ((0 >= payoutsArray[IdxGrossAmount]))
448- then throw("balance equals zero")
449- else if (if ((0 > outFeePart))
450- then true
451- else (outFeePart >= PAULI))
452- then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
453- else {
454- let leasePart = if (if ((swapType == "neutrino"))
455- then (outAmountGrossTuple._1 > 0)
456- else false)
457- then prepareUnleaseAndLease(outAmountGrossTuple._1)
458- else nil
459- let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
460- if ((nsbtStakingDeposit == nsbtStakingDeposit))
461- then $Tuple2((leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, toBase58String(i.transactionId)))]), unit)
462- else throw("Strict value is not equal to itself.")
463- }
464- }
465- else throw("Strict value is not equal to itself.")
451+ then prepareUnleaseAndLease(outAmountGrossTuple._1)
452+ else nil
453+ let state = (leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, withdrawTxId))])
454+ $Tuple2(state, AttachedPayment(outAmountGrossTuple._2, outFeeAmount))
455+ }
466456 }
467-
468457
469458
470459 @Callable(i)
492481
493482
494483 @Callable(i)
495-func swapWavesToNeutrino () = {
496- let pmt = value(i.payments[0])
497- if (isDefined(pmt.assetId))
498- then throw("Only Waves token is allowed for swapping.")
499- else if ((size(i.payments) > 1))
500- then throw("swapWavesToNeutrino require only one payment")
484+func swapWavesToNeutrino () = if ((size(i.payments) != 1))
485+ then throw("swapWavesToNeutrino require only one payment")
486+ else {
487+ let pmt = value(i.payments[0])
488+ if (isDefined(pmt.assetId))
489+ then throw("Only Waves token is allowed for swapping.")
501490 else {
502491 let userAddress = toString(i.caller)
503492 let txId58 = toBase58String(i.transactionId)
505494 let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
506495 commonSwapResult
507496 }
508- }
497+ }
509498
510499
511500
512501 @Callable(i)
513-func swapNeutrinoToWaves () = {
514- let pmt = value(i.payments[0])
515- if ((pmt.assetId != neutrinoAssetId))
516- then throw("Only appropriate Neutrino tokens are allowed for swapping.")
517- else if ((size(i.payments) > 1))
518- then throw("swapNeutrinoToWaves require only one payment")
502+func swapNeutrinoToWaves () = if ((size(i.payments) != 1))
503+ then throw("swapNeutrinoToWaves require only one payment")
504+ else {
505+ let pmt = value(i.payments[0])
506+ if ((pmt.assetId != neutrinoAssetId))
507+ then throw("Only appropriate Neutrino tokens are allowed for swapping.")
519508 else {
520509 let userAddress = toString(i.caller)
521510 let txId58 = toBase58String(i.transactionId)
523512 let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
524513 commonSwapResult
525514 }
526- }
515+ }
527516
528517
529518
531520 func withdraw (account,index,swapTxId) = if ((size(i.payments) != 0))
532521 then throw("no payments allowed")
533522 else {
534- let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil)
535- if ((commonWithdrawInv == commonWithdrawInv))
536- then nil
523+ let $t02418624290 = commonWithdraw(account, index, swapTxId, toBase58String(i.transactionId))
524+ let state = $t02418624290._1
525+ let depositPayment = $t02418624290._2
526+ let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [depositPayment])
527+ if ((nsbtStakingDeposit == nsbtStakingDeposit))
528+ then state
537529 else throw("Strict value is not equal to itself.")
538530 }
539531
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
55
66
77 func getStringByKey (key) = valueOrElse(getString(this, key), "")
88
99
1010 func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
1111
1212
1313 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
1414
1515
1616 func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
1717
1818
1919 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false)
2020
2121
2222 func asAnyList (val) = match val {
2323 case valAnyLyst: List[Any] =>
2424 valAnyLyst
2525 case _ =>
2626 throw("fail to cast into List[Any]")
2727 }
2828
2929
3030 func asString (val) = match val {
3131 case valStr: String =>
3232 valStr
3333 case _ =>
3434 throw("fail to cast into String")
3535 }
3636
3737
3838 func asInt (val) = match val {
3939 case valInt: Int =>
4040 valInt
4141 case _ =>
4242 throw("fail to cast into Int")
4343 }
4444
4545
4646 func asSwapParamsSTRUCT (val) = match val {
4747 case struct: (Int, Int, Int, Int, Int) =>
4848 struct
4949 case _ =>
5050 throw("fail to cast into Int")
5151 }
5252
5353
5454 let pubKeyAdminsList = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
5555
5656 let SEP = "__"
5757
5858 let WAVELET = 100000000
5959
6060 let PAULI = 1000000
6161
6262 let PRICELET = 1000000
6363
6464 let DEFAULTSWAPFEE = 20000
6565
6666 let IdxNetAmount = 0
6767
6868 let IdxFeeAmount = 1
6969
7070 let IdxGrossAmount = 2
7171
7272 let NeutrinoAssetIdKey = "neutrino_asset_id"
7373
7474 let BondAssetIdKey = "bond_asset_id"
7575
7676 let AuctionContractKey = "auction_contract"
7777
7878 let NsbtStakingContractKey = "nsbtStakingContract"
7979
8080 let LiquidationContractKey = "liquidation_contract"
8181
8282 let RPDContractKey = "rpd_contract"
8383
8484 let ContolContractKey = "control_contract"
8585
8686 let MathContractKey = "math_contract"
8787
8888 let BalanceWavesLockIntervalKey = "balance_waves_lock_interval"
8989
9090 let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval"
9191
9292 let MinWavesSwapAmountKey = "min_waves_swap_amount"
9393
9494 let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
9595
9696 let NodeOracleProviderPubKeyKey = "node_oracle_provider"
9797
9898 let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart"
9999
100100 let WavesOutFeePartKey = "wavesOut_swap_feePart"
101101
102102 let FeesManagerAddressKey = "fees_manager_address"
103103
104104 let PriceKey = "price"
105105
106106 let PriceIndexKey = "price_index"
107107
108108 let IsBlockedKey = "is_blocked"
109109
110110 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
111111
112112
113113 func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
114114
115115
116116 func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP))
117117
118118
119119 func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx))
120120
121121
122122 func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET))
123123
124124
125125 func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner)
126126
127127
128128 func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP)
129129
130130
131131 func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP)
132132
133133
134134 func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount")
135135
136136
137137 func totalLockedKEY (swapType) = ("balance_lock_" + swapType)
138138
139139
140140 func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_")
141141
142142
143143 func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval")
144144
145145
146146 func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval"
147147
148148
149149 func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart")
150150
151151
152152 func swapsTimeframeKEY () = "swaps_timeframe"
153153
154154
155155 func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0)
156156
157157
158158 func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440)
159159
160160
161161 func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0)
162162
163163
164164 func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0)
165165
166166
167167 func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440)
168168
169169
170170 func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1)
171171
172172
173173 func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP)
174174
175175
176176 func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP)
177177
178178
179179 func feeManagerAddressREAD () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format"))
180180
181181
182182 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
183183
184184
185185 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
186186
187187
188188 func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
189189
190190
191191 func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
192192
193193
194194 func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount)))
195195
196196
197197 func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
198198
199199
200200 func priceIndexFAIL (index,priceIndex,indexHeight,unlockHeight,prevIndexHeight) = throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight)))
201201
202202
203203 let liquidationContract = getStringByKey(LiquidationContractKey)
204204
205205 let nsbtStakingContractStr = getStringByKey(NsbtStakingContractKey)
206206
207207 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
208208
209209 let auctionContract = getStringByKey(AuctionContractKey)
210210
211211 let rpdContract = getStringByKey(RPDContractKey)
212212
213213 let controlContract = getStringByKey(ContolContractKey)
214214
215215 let mathContractAddress = getStringByKey(MathContractKey)
216216
217217 let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey)
218218
219219 let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey)
220220
221221 let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey))
222222
223223 let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z")
224224
225225 let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF")
226226
227227 let neutrinoContract = this
228228
229229 let mathContract = addressFromStringValue(mathContractAddress)
230230
231231 let nsbtStakingContract = addressFromStringValue(nsbtStakingContractStr)
232232
233233 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
234234
235235 func checkIsValidMinSponsoredFee (tx) = {
236236 let MINTRANSFERFEE = 100000
237237 let SponsoredFeeUpperBound = 1000
238238 let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice)
239239 let minNeutrinoFee = (realNeutrinoFee * 2)
240240 let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100)
241241 let inputFee = value(tx.minSponsoredAssetFee)
242242 if (if ((inputFee >= minNeutrinoFee))
243243 then (maxNeutrinoFee >= inputFee)
244244 else false)
245245 then (tx.assetId == neutrinoAssetId)
246246 else false
247247 }
248248
249249
250250 func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
251251
252252
253253 func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index))
254254
255255
256256 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
257257
258258
259259 let sIdxSwapType = 1
260260
261261 let sIdxStatus = 2
262262
263263 let sIdxInAmount = 3
264264
265265 let sIdxPrice = 4
266266
267267 let sIdxOutNetAmount = 5
268268
269269 let sIdxOutFeeAmount = 6
270270
271271 let sIdxStartHeight = 7
272272
273273 let sIdxStartTimestamp = 8
274274
275275 let sIdxEndHeight = 9
276276
277277 let sIdxEndTimestamp = 10
278278
279279 let sIdxSelfUnlockHeight = 11
280280
281281 let sIdxRandUnlockHeight = 12
282282
283283 let sIdxIndex = 13
284284
285285 let sIdxWithdrawTxId = 14
286286
287287 let sIdxMinRand = 15
288288
289289 let sIdxMaxRand = 16
290290
291291 func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP)
292292
293293
294294 func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax) = makeString(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId, randMin, randMax], SEP)
295295
296296
297297 func pendingSwapDATA (swapType,inAssetAmount,selfUnlockHeight) = strSwapDATA(swapType, "PENDING", toString(inAssetAmount), "0", "0", "0", toString(height), toString(lastBlock.timestamp), "0", "0", toString(selfUnlockHeight), "0", "0", "NULL", "0", "0")
298298
299299
300300 func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId) = strSwapDATA(dataArray[sIdxSwapType], "FINISHED", dataArray[sIdxInAmount], toString(price), toString(outNetAmount), toString(outFeeAmount), dataArray[sIdxStartHeight], dataArray[sIdxStartTimestamp], toString(height), toString(lastBlock.timestamp), dataArray[sIdxSelfUnlockHeight], toString(randUnlockHeight), toString(index), withdrawTxId, dataArray[sIdxMinRand], dataArray[sIdxMaxRand])
301301
302302
303303 func swapDataFailOrREAD (userAddress,swapTxId) = {
304304 let swapKey = swapKEY(userAddress, swapTxId)
305305 split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP)
306306 }
307307
308308
309309 func applyFees (amountGross,feePart) = {
310310 let feeAmount = fraction(amountGross, feePart, PAULI)
311311 [(amountGross - feeAmount), feeAmount, amountGross]
312312 }
313313
314314
315315 func abs (x) = if ((0 > x))
316316 then -(x)
317317 else x
318318
319319
320320 func selectNode (unleaseAmount) = {
321321 let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship())
322322 let oldLeased0 = getNumberByKey(getLeaseAmountKey(0))
323323 let oldLeased1 = getNumberByKey(getLeaseAmountKey(1))
324324 let newLeased0 = (amountToLease + oldLeased0)
325325 let newLeased1 = (amountToLease + oldLeased1)
326326 if (if ((newLeased0 > 0))
327327 then true
328328 else (newLeased1 > 0))
329329 then {
330330 let delta0 = abs((newLeased0 - oldLeased1))
331331 let delta1 = abs((newLeased1 - oldLeased0))
332332 if ((delta1 >= delta0))
333333 then $Tuple2(0, newLeased0)
334334 else $Tuple2(1, newLeased1)
335335 }
336336 else $Tuple2(-1, 0)
337337 }
338338
339339
340340 func thisOnly (i) = if ((i.caller != this))
341341 then throw("Permission denied: this contract only allowed")
342342 else true
343343
344344
345345 func prepareUnleaseAndLease (unleaseAmount) = {
346346 let nodeTuple = selectNode(unleaseAmount)
347347 let nodeIndex = nodeTuple._1
348348 let newLeaseAmount = nodeTuple._2
349349 if ((newLeaseAmount > 0))
350350 then {
351351 let leaseIdKey = getLeaseIdKey(nodeIndex)
352352 let oldLease = getBinary(this, leaseIdKey)
353353 let unleaseOrEmpty = if (isDefined(oldLease))
354354 then [LeaseCancel(value(oldLease))]
355355 else nil
356356 let leaseAmountKey = getLeaseAmountKey(nodeIndex)
357357 let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount)
358358 (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, calculateLeaseId(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)])
359359 }
360360 else nil
361361 }
362362
363363
364364 func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapParamsByUserSYSREADONLY) = {
365365 let $t01560515685 = swapParamsByUserSYSREADONLY
366366 let swapLimitMax = $t01560515685._1
367367 let swapLimitSpent = $t01560515685._2
368368 let blcks2LmtReset = $t01560515685._3
369369 let minSwapAmount = minSwapAmountREAD(swapType)
370370 let totalLocked = totalLockedREAD(swapType)
371371 let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr)
372372 let nodeAddress = getStakingNodeByIndex(0)
373373 let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex))
374374 let isSwapByNode = (nodeAddress == userAddressStr)
375375 let balanceLockMaxInterval = if (isSwapByNode)
376376 then nodeBalanceLockIntervalREAD()
377377 else balanceLockIntervalREAD(swapType)
378378 let selfUnlockHeight = (height + balanceLockMaxInterval)
379379 let swapUsdnVolume = if ((swapType == "neutrino"))
380380 then pmtAmount
381381 else convertWavesToNeutrino(pmtAmount, priceByIndex)
382382 if ((minSwapAmount > pmtAmount))
383383 then minSwapAmountFAIL(swapType, minSwapAmount)
384384 else if (if (!(isSwapByNode))
385385 then (swapLimitSpent > 0)
386386 else false)
387387 then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset))))
388388 else if (if (!(isSwapByNode))
389389 then (swapUsdnVolume > swapLimitMax)
390390 else false)
391391 then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax)))
392392 else if (isBlocked)
393393 then emergencyShutdownFAIL()
394394 else {
395395 let leasePart = if ((swapType == "waves"))
396396 then prepareUnleaseAndLease(0)
397397 else nil
398398 $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit)
399399 }
400400 }
401401
402402
403-@Callable(i)
404403 func commonWithdraw (account,index,swapTxId,withdrawTxId) = {
405- let checkCaller = thisOnly(i)
406- if ((checkCaller == checkCaller))
407- then if ((size(i.payments) != 0))
408- then throw("no payments allowed")
409- else {
410- let userAddress = addressFromStringValue(account)
411- let feeManagerAddress = feeManagerAddressREAD()
412- let dataArray = swapDataFailOrREAD(account, swapTxId)
413- let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
414- let swapType = dataArray[sIdxSwapType]
415- let inAmount = parseIntValue(dataArray[sIdxInAmount])
416- let swapStatus = dataArray[sIdxStatus]
417- let startHeight = parseIntValue(dataArray[sIdxStartHeight])
418- let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
419- let totalLocked = totalLockedREAD(swapType)
420- let totalLockedByUser = totalLockedByUserREAD(swapType, account)
421- let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
422- let indexHeight = getHeightPriceByIndex(index)
423- let prevIndexHeight = getHeightPriceByIndex((index - 1))
424- let priceByIndex = getPriceHistory(indexHeight)
425- let outAmountGrossTuple = if ((swapType == "waves"))
426- then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
427- else if ((swapType == "neutrino"))
428- then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
429- else throw(("Unsupported swap type " + swapType))
430- let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
431- let outNetAmount = payoutsArray[IdxNetAmount]
432- let outFeeAmount = payoutsArray[IdxFeeAmount]
433- if (isBlocked)
434- then emergencyShutdownFAIL()
435- else if ((swapStatus != "PENDING"))
436- then throw("swap has been already processed")
437- else if ((unlockHeight > height))
438- then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
439- else if (if (if ((index > priceIndex))
440- then true
441- else (unlockHeight > indexHeight))
442- then true
443- else if ((prevIndexHeight != 0))
444- then (prevIndexHeight >= unlockHeight)
404+ let userAddress = addressFromStringValue(account)
405+ let feeManagerAddress = feeManagerAddressREAD()
406+ let dataArray = swapDataFailOrREAD(account, swapTxId)
407+ let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
408+ let swapType = dataArray[sIdxSwapType]
409+ let inAmount = parseIntValue(dataArray[sIdxInAmount])
410+ let swapStatus = dataArray[sIdxStatus]
411+ let startHeight = parseIntValue(dataArray[sIdxStartHeight])
412+ let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
413+ let totalLocked = totalLockedREAD(swapType)
414+ let totalLockedByUser = totalLockedByUserREAD(swapType, account)
415+ let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
416+ let indexHeight = getHeightPriceByIndex(index)
417+ let prevIndexHeight = getHeightPriceByIndex((index - 1))
418+ let priceByIndex = getPriceHistory(indexHeight)
419+ let outAmountGrossTuple = if ((swapType == "waves"))
420+ then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
421+ else if ((swapType == "neutrino"))
422+ then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
423+ else throw(("Unsupported swap type " + swapType))
424+ let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
425+ let outNetAmount = payoutsArray[IdxNetAmount]
426+ let outFeeAmount = payoutsArray[IdxFeeAmount]
427+ if (isBlocked)
428+ then emergencyShutdownFAIL()
429+ else if ((swapStatus != "PENDING"))
430+ then throw("swap has been already processed")
431+ else if ((unlockHeight > height))
432+ then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
433+ else if (if (if ((index > priceIndex))
434+ then true
435+ else (unlockHeight > indexHeight))
436+ then true
437+ else if ((prevIndexHeight != 0))
438+ then (prevIndexHeight >= unlockHeight)
439+ else false)
440+ then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
441+ else if ((0 >= payoutsArray[IdxGrossAmount]))
442+ then throw("balance equals zero")
443+ else if (if ((0 > outFeePart))
444+ then true
445+ else (outFeePart >= PAULI))
446+ then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
447+ else {
448+ let leasePart = if (if ((swapType == "neutrino"))
449+ then (outAmountGrossTuple._1 > 0)
445450 else false)
446- then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
447- else if ((0 >= payoutsArray[IdxGrossAmount]))
448- then throw("balance equals zero")
449- else if (if ((0 > outFeePart))
450- then true
451- else (outFeePart >= PAULI))
452- then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
453- else {
454- let leasePart = if (if ((swapType == "neutrino"))
455- then (outAmountGrossTuple._1 > 0)
456- else false)
457- then prepareUnleaseAndLease(outAmountGrossTuple._1)
458- else nil
459- let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
460- if ((nsbtStakingDeposit == nsbtStakingDeposit))
461- then $Tuple2((leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, toBase58String(i.transactionId)))]), unit)
462- else throw("Strict value is not equal to itself.")
463- }
464- }
465- else throw("Strict value is not equal to itself.")
451+ then prepareUnleaseAndLease(outAmountGrossTuple._1)
452+ else nil
453+ let state = (leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, withdrawTxId))])
454+ $Tuple2(state, AttachedPayment(outAmountGrossTuple._2, outFeeAmount))
455+ }
466456 }
467-
468457
469458
470459 @Callable(i)
471460 func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = {
472461 let checkCaller = thisOnly(i)
473462 if ((checkCaller == checkCaller))
474463 then if ((size(i.payments) != 0))
475464 then throw("no payments allowed")
476465 else [StringEntry(NeutrinoAssetIdKey, neutrinoAssetIdPrm), StringEntry(BondAssetIdKey, bondAssetIdPrm), StringEntry(AuctionContractKey, auctionContractPrm), StringEntry(LiquidationContractKey, liquidationContractPrm), StringEntry(RPDContractKey, rpdContractPrm), StringEntry(NodeOracleProviderPubKeyKey, nodeOracleProviderPubKeyPrm), IntegerEntry(BalanceWavesLockIntervalKey, balanceWavesLockIntervalPrm), IntegerEntry(BalanceNeutrinoLockIntervalKey, balanceNeutrinoLockIntervalPrm), IntegerEntry(MinWavesSwapAmountKey, minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)]
477466 else throw("Strict value is not equal to itself.")
478467 }
479468
480469
481470
482471 @Callable(i)
483472 func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = {
484473 let checkCaller = thisOnly(i)
485474 if ((checkCaller == checkCaller))
486475 then if ((size(i.payments) != 0))
487476 then throw("no payments allowed")
488477 else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
489478 else throw("Strict value is not equal to itself.")
490479 }
491480
492481
493482
494483 @Callable(i)
495-func swapWavesToNeutrino () = {
496- let pmt = value(i.payments[0])
497- if (isDefined(pmt.assetId))
498- then throw("Only Waves token is allowed for swapping.")
499- else if ((size(i.payments) > 1))
500- then throw("swapWavesToNeutrino require only one payment")
484+func swapWavesToNeutrino () = if ((size(i.payments) != 1))
485+ then throw("swapWavesToNeutrino require only one payment")
486+ else {
487+ let pmt = value(i.payments[0])
488+ if (isDefined(pmt.assetId))
489+ then throw("Only Waves token is allowed for swapping.")
501490 else {
502491 let userAddress = toString(i.caller)
503492 let txId58 = toBase58String(i.transactionId)
504493 let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
505494 let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
506495 commonSwapResult
507496 }
508- }
497+ }
509498
510499
511500
512501 @Callable(i)
513-func swapNeutrinoToWaves () = {
514- let pmt = value(i.payments[0])
515- if ((pmt.assetId != neutrinoAssetId))
516- then throw("Only appropriate Neutrino tokens are allowed for swapping.")
517- else if ((size(i.payments) > 1))
518- then throw("swapNeutrinoToWaves require only one payment")
502+func swapNeutrinoToWaves () = if ((size(i.payments) != 1))
503+ then throw("swapNeutrinoToWaves require only one payment")
504+ else {
505+ let pmt = value(i.payments[0])
506+ if ((pmt.assetId != neutrinoAssetId))
507+ then throw("Only appropriate Neutrino tokens are allowed for swapping.")
519508 else {
520509 let userAddress = toString(i.caller)
521510 let txId58 = toBase58String(i.transactionId)
522511 let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
523512 let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
524513 commonSwapResult
525514 }
526- }
515+ }
527516
528517
529518
530519 @Callable(i)
531520 func withdraw (account,index,swapTxId) = if ((size(i.payments) != 0))
532521 then throw("no payments allowed")
533522 else {
534- let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil)
535- if ((commonWithdrawInv == commonWithdrawInv))
536- then nil
523+ let $t02418624290 = commonWithdraw(account, index, swapTxId, toBase58String(i.transactionId))
524+ let state = $t02418624290._1
525+ let depositPayment = $t02418624290._2
526+ let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [depositPayment])
527+ if ((nsbtStakingDeposit == nsbtStakingDeposit))
528+ then state
537529 else throw("Strict value is not equal to itself.")
538530 }
539531
540532
541533
542534 @Callable(i)
543535 func transferToAuction () = if ((size(i.payments) != 0))
544536 then throw("no payments allowed")
545537 else {
546538 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
547539 let reserve = asInt(neutrinoMetrics[3])
548540 let neutrinoSupply = asInt(neutrinoMetrics[5])
549541 let surplus = asInt(neutrinoMetrics[6])
550542 let nsbtSupply = asInt(neutrinoMetrics[9])
551543 let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
552544 let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
553545 if (isBlocked)
554546 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
555547 else if ((auctionNBAmount > (1 * PAULI)))
556548 then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)]
557549 else if ((surplusWithLiquidation >= (1 * PAULI)))
558550 then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]
559551 else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus)))
560552 }
561553
562554
563555
564556 @Callable(i)
565557 func transferUsdnToUser (amount,addr) = if ((i.caller != addressFromStringValue(auctionContract)))
566558 then throw("Only auction contract is authorized")
567559 else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)]
568560
569561
570562
571563 @Callable(i)
572564 func acceptWaves () = if ((i.caller != addressFromStringValue(auctionContract)))
573565 then throw("Currently only auction contract is allowed to call")
574566 else $Tuple2(prepareUnleaseAndLease(0), "success")
575567
576568
577569
578570 @Callable(i)
579571 func swapParamsByUserSYSREADONLY (userAddressStr,nsbtDiff) = {
580572 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressStr], nil))
581573 if ((nsbtData == nsbtData))
582574 then {
583575 let gnsbtAmt = (asInt(nsbtData[0]) + nsbtDiff)
584576 let gnsbtAmtTotal = (asInt(nsbtData[1]) + nsbtDiff)
585577 let swapLimitMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil))
586578 let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0)
587579 let swapLimitTimelifeBlocks = swapsTimeframeREAD()
588580 let passedBlocksAfterLastSwap = (height - lastSwapHeight)
589581 let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks)
590582 let swapLimitSpent = if (isSwapTimelifeNew)
591583 then 0
592584 else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0)
593585 let blcks2LmtReset = if (isSwapTimelifeNew)
594586 then 0
595587 else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap)
596588 $Tuple2(nil, $Tuple5(swapLimitMax, swapLimitSpent, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal))
597589 }
598590 else throw("Strict value is not equal to itself.")
599591 }
600592
601593
602594 @Verifier(tx)
603595 func verify () = {
604596 let id = toBase58String(tx.id)
605597 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
606598 then 1
607599 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
608600 then 1
609601 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
610602 then 1
611603 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
612604 then 2
613605 else 0))
614606 match tx {
615607 case sponsorTx: SponsorFeeTransaction =>
616608 if (checkIsValidMinSponsoredFee(sponsorTx))
617609 then (count >= 3)
618610 else false
619611 case _ =>
620612 (count >= 3)
621613 }
622614 }
623615

github/deemru/w8io/026f985 
83.83 ms