tx · 8bNHCHF7acgxdBkCPDJwbEZB9HQETXUdBgwQLC67119p 3NAkAohdf8uoZPHTPz9bWBzM9QxhmtG6Atw: -0.01000000 Waves 2020.12.09 03:23 [1300396] smart account 3NAkAohdf8uoZPHTPz9bWBzM9QxhmtG6Atw > SELF 0.00000000 Waves
{ "type": 13, "id": "8bNHCHF7acgxdBkCPDJwbEZB9HQETXUdBgwQLC67119p", "fee": 1000000, "feeAssetId": null, "timestamp": 1607473389943, "version": 2, "chainId": 84, "sender": "3NAkAohdf8uoZPHTPz9bWBzM9QxhmtG6Atw", "senderPublicKey": "FJ1vnBKqEmRyAovyjYpzoBxpnwPR83zDp9i7RzMQrdnw", "proofs": [ "4NK4ZRzaCREtW5YEf3WTybLxx6uaLZcmHi58Y8X8Y4T1f3yRgqZBYyhcPvThA6wCvzatrm4koLnMXqR7FLLrVXw4" ], "script": "base64:AAIEAAAAAAAAAA4IAhIAEgASBAoCCAESAAAAAFMBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkHAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAB2FkZHJlc3MFAAAAA2tleQAAAAAAAAAAAAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGR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lvbiBieSBlbWVyZ2VuY3kgb3JhY2xlcwMJAABmAAAAAgUAAAAPYXVjdGlvbk5CQW1vdW50CQAAaAAAAAIAAAAAAAAAAAEFAAAABVBBVUxJCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAD2F1Y3Rpb25Db250cmFjdAUAAAAPYXVjdGlvbk5CQW1vdW50BQAAAAtib25kQXNzZXRJZAUAAAADbmlsAwkAAGcAAAACBQAAABZzdXJwbHVzV2l0aExpcXVpZGF0aW9uCQAAaAAAAAIAAAAAAAAAAAEFAAAABVBBVUxJCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAE2xpcXVpZGF0aW9uQ29udHJhY3QFAAAAFnN1cnBsdXNXaXRoTGlxdWlkYXRpb24FAAAAD25ldXRyaW5vQXNzZXRJZAUAAAADbmlsCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAvYm9uZCB3ZXJlIGdlbmVyYXRlZCBvciBkbyBub3QgbmVlZCBpdC4gRGVmaWNpdDoJAAGkAAAAAQUAAAAPYXVjdGlvbk5CQW1vdW50AgAAAAF8CQABpAAAAAEAAAAAAAAAAAACAAAACi4gU3VycGx1czoJAAGkAAAAAQUAAAAWc3VycGx1c1dpdGhMaXF1aWRhdGlvbgIAAAABfAkAAaQAAAABBQAAAAdzdXJwbHVzAAAAAIOR5DI=", "height": 1300396, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
5 | + | ||
6 | + | ||
7 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
8 | + | ||
9 | + | ||
10 | + | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
11 | + | ||
12 | + | ||
13 | + | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0) | |
14 | + | ||
15 | + | ||
16 | + | func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "") | |
17 | + | ||
18 | + | ||
19 | + | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false) | |
20 | + | ||
21 | + | ||
22 | + | let pubKeyAdminsList = ["FJ1vnBKqEmRyAovyjYpzoBxpnwPR83zDp9i7RzMQrdnw", "FJ1vnBKqEmRyAovyjYpzoBxpnwPR83zDp9i7RzMQrdnw", "FJ1vnBKqEmRyAovyjYpzoBxpnwPR83zDp9i7RzMQrdnw", "FJ1vnBKqEmRyAovyjYpzoBxpnwPR83zDp9i7RzMQrdnw"] | |
23 | + | ||
24 | + | let SENDTXEXPIRE = 30 | |
25 | + | ||
26 | + | let LISTSPLITSYMBOL = "_" | |
27 | + | ||
28 | + | let LISTDATASYMBOL = "+" | |
29 | + | ||
30 | + | let WAVELET = 100000000 | |
31 | + | ||
32 | + | let PAULI = 1000000 | |
33 | + | ||
34 | + | let PRICELET = 1000000 | |
35 | + | ||
36 | + | let DEFAULTSWAPFEE = 20000 | |
37 | + | ||
38 | + | let IdxNetAmount = 0 | |
39 | + | ||
40 | + | let IdxFeeAmount = 1 | |
41 | + | ||
42 | + | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
43 | + | ||
44 | + | let BondAssetIdKey = "bond_asset_id" | |
45 | + | ||
46 | + | let AuctionContractKey = "auction_contract" | |
47 | + | ||
48 | + | let LiquidationContractKey = "liquidation_contract" | |
49 | + | ||
50 | + | let RPDContractKey = "rpd_contract" | |
51 | + | ||
52 | + | let ContolContractKey = "control_contract" | |
53 | + | ||
54 | + | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
55 | + | ||
56 | + | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
57 | + | ||
58 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
59 | + | ||
60 | + | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
61 | + | ||
62 | + | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
63 | + | ||
64 | + | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
65 | + | ||
66 | + | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
67 | + | ||
68 | + | let FeesManagerAddressKey = "fees_manager_address" | |
69 | + | ||
70 | + | let RPDBalanceKey = "rpd_balance" | |
71 | + | ||
72 | + | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
73 | + | ||
74 | + | ||
75 | + | let PriceKey = "price" | |
76 | + | ||
77 | + | let PriceIndexKey = "price_index" | |
78 | + | ||
79 | + | let IsBlockedKey = "is_blocked" | |
80 | + | ||
81 | + | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
82 | + | ||
83 | + | ||
84 | + | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
85 | + | ||
86 | + | ||
87 | + | let BalanceLockedkKey = "balance_lock_" | |
88 | + | ||
89 | + | let WavesLockedBalanceKey = (BalanceLockedkKey + "waves") | |
90 | + | ||
91 | + | let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino") | |
92 | + | ||
93 | + | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
94 | + | ||
95 | + | ||
96 | + | func getCancelLeaseTxReserveFeeKey (hash) = (("cancel_lease_tx_reserve_fee" + "_") + hash) | |
97 | + | ||
98 | + | ||
99 | + | func getWavesLockedBalanceKey (owner) = ((WavesLockedBalanceKey + "_") + owner) | |
100 | + | ||
101 | + | ||
102 | + | func getNeutrinoLockedBalanceKey (owner) = ((NeutrinoLockedBalanceKey + "_") + owner) | |
103 | + | ||
104 | + | ||
105 | + | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
106 | + | ||
107 | + | ||
108 | + | func getRPDProfitKey (count) = (("rpd_profit" + "_") + toString(count)) | |
109 | + | ||
110 | + | ||
111 | + | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
112 | + | ||
113 | + | ||
114 | + | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
115 | + | ||
116 | + | ||
117 | + | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
118 | + | ||
119 | + | ||
120 | + | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
121 | + | ||
122 | + | ||
123 | + | let liquidationContract = getStringByKey(LiquidationContractKey) | |
124 | + | ||
125 | + | let neutrinoAssetIdString = getStringByKey(NeutrinoAssetIdKey) | |
126 | + | ||
127 | + | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
128 | + | ||
129 | + | let auctionContract = getStringByKey(AuctionContractKey) | |
130 | + | ||
131 | + | let rpdContract = getStringByKey(RPDContractKey) | |
132 | + | ||
133 | + | let controlContract = getStringByKey(ContolContractKey) | |
134 | + | ||
135 | + | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
136 | + | ||
137 | + | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
138 | + | ||
139 | + | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
140 | + | ||
141 | + | let balanceWavesLockInterval = getNumberByKey(BalanceWavesLockIntervalKey) | |
142 | + | ||
143 | + | let balanceNeutrinoLockInterval = getNumberByKey(BalanceNeutrinoLockIntervalKey) | |
144 | + | ||
145 | + | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
146 | + | ||
147 | + | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
148 | + | ||
149 | + | let bondAssetId = fromBase58String("6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g") | |
150 | + | ||
151 | + | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
152 | + | ||
153 | + | let neutrinoContract = this | |
154 | + | ||
155 | + | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
156 | + | ||
157 | + | let neutrinoLockedBalance = getNumberByKey(NeutrinoLockedBalanceKey) | |
158 | + | ||
159 | + | let wavesLockedBalance = getNumberByKey(WavesLockedBalanceKey) | |
160 | + | ||
161 | + | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
162 | + | ||
163 | + | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
164 | + | ||
165 | + | let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply) | |
166 | + | ||
167 | + | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice)) | |
168 | + | ||
169 | + | func checkIsValidMinSponsoredFee (tx) = { | |
170 | + | let MINTRANSFERFEE = 100000 | |
171 | + | let SponsoredFeeUpperBound = 1000 | |
172 | + | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice) | |
173 | + | let minNeutrinoFee = (realNeutrinoFee * 2) | |
174 | + | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
175 | + | let inputFee = value(tx.minSponsoredAssetFee) | |
176 | + | if (if ((inputFee >= minNeutrinoFee)) | |
177 | + | then (maxNeutrinoFee >= inputFee) | |
178 | + | else false) | |
179 | + | then (tx.assetId == neutrinoAssetId) | |
180 | + | else false | |
181 | + | } | |
182 | + | ||
183 | + | ||
184 | + | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
185 | + | ||
186 | + | ||
187 | + | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
188 | + | ||
189 | + | ||
190 | + | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
191 | + | ||
192 | + | ||
193 | + | func getCancelLeaseTxReserveFee (hash) = getNumberByKey(getCancelLeaseTxReserveFeeKey(hash)) | |
194 | + | ||
195 | + | ||
196 | + | func getWavesLockedBalance (owner) = getNumberByKey(getWavesLockedBalanceKey(owner)) | |
197 | + | ||
198 | + | ||
199 | + | func getNeutrinoLockedBalance (owner) = getNumberByKey(getNeutrinoLockedBalanceKey(owner)) | |
200 | + | ||
201 | + | ||
202 | + | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
203 | + | ||
204 | + | ||
205 | + | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
206 | + | ||
207 | + | ||
208 | + | func applyFees (amountGross,feePart) = { | |
209 | + | let feeAmount = fraction(amountGross, feePart, PAULI) | |
210 | + | [(amountGross - feeAmount), feeAmount] | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | @Callable(i) | |
215 | + | func swapWavesToNeutrino () = { | |
216 | + | let pmt = value(i.payments[0]) | |
217 | + | let account = toString(i.caller) | |
218 | + | if ((minWavesSwapAmount > pmt.amount)) | |
219 | + | then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets.")) | |
220 | + | else if (isDefined(pmt.assetId)) | |
221 | + | then throw("Only Waves token is allowed for swapping.") | |
222 | + | else if (isBlocked) | |
223 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
224 | + | else if ((getUnlockBalanceBlock(account) > height)) | |
225 | + | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
226 | + | else if (if ((getNeutrinoLockedBalance(account) != 0)) | |
227 | + | then true | |
228 | + | else (getWavesLockedBalance(account) != 0)) | |
229 | + | then throw("please withdraw locked funds first") | |
230 | + | else [IntegerEntry(getWavesLockedBalanceKey(account), pmt.amount), IntegerEntry(getBalanceUnlockBlockKey(account), (height + balanceWavesLockInterval)), IntegerEntry(WavesLockedBalanceKey, (wavesLockedBalance + pmt.amount))] | |
231 | + | } | |
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | @Callable(i) | |
236 | + | func swapNeutrinoToWaves () = { | |
237 | + | let pmt = value(i.payments[0]) | |
238 | + | let account = toString(i.caller) | |
239 | + | if ((minNeutrinoSwapAmount > pmt.amount)) | |
240 | + | then throw((("The specified Neutrino amount is less than the required minimum of " + toString(minNeutrinoSwapAmount)) + " Neutrino cents.")) | |
241 | + | else if (isBlocked) | |
242 | + | then throw("The contract is blocked by EMERGENCY SHUTDOWN. Please wait for reactivation by emergency oracles.") | |
243 | + | else if ((pmt.assetId != neutrinoAssetId)) | |
244 | + | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
245 | + | else if ((getUnlockBalanceBlock(account) > height)) | |
246 | + | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
247 | + | else if (if ((getNeutrinoLockedBalance(account) != 0)) | |
248 | + | then true | |
249 | + | else (getWavesLockedBalance(account) != 0)) | |
250 | + | then throw("please withdraw locked funds first") | |
251 | + | else [IntegerEntry(getNeutrinoLockedBalanceKey(account), pmt.amount), IntegerEntry(getBalanceUnlockBlockKey(account), (height + balanceNeutrinoLockInterval)), IntegerEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance + pmt.amount))] | |
252 | + | } | |
253 | + | ||
254 | + | ||
255 | + | ||
256 | + | @Callable(i) | |
257 | + | func withdraw (account,index) = { | |
258 | + | let userAddress = addressFromStringValue(account) | |
259 | + | let feeManagerAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format")) | |
260 | + | let unlockHeight = getUnlockBalanceBlock(account) | |
261 | + | let userWavesLockedBalance = getWavesLockedBalance(account) | |
262 | + | let userNeutrinoLockedBalance = getNeutrinoLockedBalance(account) | |
263 | + | let indexHeight = getHeightPriceByIndex(index) | |
264 | + | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
265 | + | let priceByIndex = getPriceHistory(indexHeight) | |
266 | + | let neutrinoAmountGross = convertWavesToNeutrino(userWavesLockedBalance, priceByIndex) | |
267 | + | let wavesAmountGross = convertNeutrinoToWaves(userNeutrinoLockedBalance, priceByIndex) | |
268 | + | let neutrinoOutFeePart = valueOrElse(getInteger(this, NeutrinoOutFeePartKey), DEFAULTSWAPFEE) | |
269 | + | let wavesOutFeePart = valueOrElse(getInteger(this, WavesOutFeePartKey), DEFAULTSWAPFEE) | |
270 | + | let neutrinoPayoutsArray = applyFees(neutrinoAmountGross, neutrinoOutFeePart) | |
271 | + | let wavesPayoutsArray = applyFees(wavesAmountGross, wavesOutFeePart) | |
272 | + | if (isBlocked) | |
273 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
274 | + | else if ((unlockHeight > height)) | |
275 | + | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw WAVES funds")) | |
276 | + | else if (if (if ((index > priceIndex)) | |
277 | + | then true | |
278 | + | else (unlockHeight > indexHeight)) | |
279 | + | then true | |
280 | + | else if ((prevIndexHeight != 0)) | |
281 | + | then (prevIndexHeight >= unlockHeight) | |
282 | + | else false) | |
283 | + | then throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight))) | |
284 | + | else if (if ((0 >= neutrinoAmountGross)) | |
285 | + | then (0 >= wavesAmountGross) | |
286 | + | else false) | |
287 | + | then throw("balance equals zero") | |
288 | + | else if (if (if (if ((0 > neutrinoOutFeePart)) | |
289 | + | then true | |
290 | + | else (neutrinoOutFeePart >= PAULI)) | |
291 | + | then true | |
292 | + | else (0 > wavesOutFeePart)) | |
293 | + | then true | |
294 | + | else (wavesOutFeePart >= PAULI)) | |
295 | + | then throw(((("invalid fees data: neutrinoOutFeePart=" + toString(neutrinoOutFeePart)) + " wavesOutFeePart=") + toString(wavesOutFeePart))) | |
296 | + | else [IntegerEntry(getWavesLockedBalanceKey(account), 0), IntegerEntry(getNeutrinoLockedBalanceKey(account), 0), IntegerEntry(WavesLockedBalanceKey, (wavesLockedBalance - userWavesLockedBalance)), IntegerEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance - userNeutrinoLockedBalance)), ScriptTransfer(userAddress, wavesPayoutsArray[IdxNetAmount], unit), ScriptTransfer(feeManagerAddress, wavesPayoutsArray[IdxFeeAmount], unit), ScriptTransfer(userAddress, neutrinoPayoutsArray[IdxNetAmount], neutrinoAssetId), ScriptTransfer(feeManagerAddress, neutrinoPayoutsArray[IdxFeeAmount], neutrinoAssetId)] | |
297 | + | } | |
298 | + | ||
299 | + | ||
300 | + | ||
301 | + | @Callable(i) | |
302 | + | func transferToAuction () = { | |
303 | + | let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) | |
304 | + | let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
305 | + | if (isBlocked) | |
306 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
307 | + | else if ((auctionNBAmount > (1 * PAULI))) | |
308 | + | then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)] | |
309 | + | else if ((surplusWithLiquidation >= (1 * PAULI))) | |
310 | + | then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)] | |
311 | + | else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus))) | |
312 | + | } | |
313 | + | ||
314 | + |
github/deemru/w8io/169f3d6 22.72 ms ◑