tx · PtS5ntcbf1XswAvqwzaCZdGX6Gux7fsgZxdLM7nR2bi

3N5dtgNnQw1xnPHYnPSLaK67moXJr5wtoFb:  -0.01000000 Waves

2021.03.28 16:17 [1457660] smart account 3N5dtgNnQw1xnPHYnPSLaK67moXJr5wtoFb > SELF 0.00000000 Waves

{ "type": 13, "id": "PtS5ntcbf1XswAvqwzaCZdGX6Gux7fsgZxdLM7nR2bi", "fee": 1000000, "feeAssetId": null, "timestamp": 1616937554475, "version": 2, "chainId": 84, "sender": "3N5dtgNnQw1xnPHYnPSLaK67moXJr5wtoFb", "senderPublicKey": "696PZPJJpQCrNHMpTYXhcsCoMotCHKouFEYBLHXwYjxz", "proofs": [ "3zseRPGdPk47s6oLdbya2b7wJ9ENNw2c7H5HDTpnrMZ6vQX2N4Chrdy9pRHWYY2i8YaBrnmpXJMMy8jJxFC6ZMJp" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQESABIDCgEBEgASABIDCgEBAAAAMwAAAAAHdmVyc2lvbgIAAAAFMS4wLjAAAAAACmtleVZlcnNpb24CAAAAB3ZlcnNpb24AAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAC2tleUJhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAAC2tleUJhbGFuY2VCAgAAAA9CX2Fzc2V0X2JhbGFuY2UAAAAAD2tleVNoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAE2tleVNoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAABpjb21taXNzaW9uX3NjYWxlX2RlbGltaXRlcgAAAAAIa2V5Q2F1c2U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AAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcDAwUAAAATY2FsbFRha2VJbnRvQWNjb3VudAYFAAAAC2NhbGxTdGFraW5nBQAAAA1zaWduZWRCeUFkbWluBwQAAAASYWRtaW5QdWJLZXkxU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MQAAAAAAAAAAAQAAAAAAAAAAAAQAAAASYWRtaW5QdWJLZXkyU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAADGFkbWluUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAQAAAASYWRtaW5QdWJLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAgg1TyU=", "height": 1457660, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let version = "1.0.0"
5+
6+let keyVersion = "version"
7+
8+let keyActive = "active"
9+
10+let keyAssetIdA = "A_asset_id"
11+
12+let keyAssetIdB = "B_asset_id"
13+
14+let keyBalanceA = "A_asset_balance"
15+
16+let keyBalanceB = "B_asset_balance"
17+
18+let keyShareAssetId = "share_asset_id"
19+
20+let keyShareAssetSupply = "share_asset_supply"
21+
22+let keyCommission = "commission"
23+
24+let keyCommissionScaleDelimiter = "commission_scale_delimiter"
25+
26+let keyCause = "shutdown_cause"
27+
28+let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
29+
30+let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
31+
32+let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
33+
34+let adminPubKeyStartStop = base58'EtVkT6ed8GtbUiVVEqdmEqsp2J4qbb3rre2HFgxeVYdg'
35+
36+let adminPubKeyStaking = base58'Czn4yoAuUZCVCLJDRfskn8URfkwpknwBTZDbs1wFrY7h'
37+
38+let governanceAddress = Address(base58'3P6J84oH51DzY6xk2mT5TheXRbrCwBMxonp')
39+
40+let stakingAddress = Address(base58'3PNikM6yp4NqcSU8guxQtmR5onr2D4e8yTJ')
41+
42+let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
43+
44+let stakingFeeInUSDN = (9 * value(value(assetInfo(USDN)).minSponsoredFee))
45+
46+let isActive = getBooleanValue(this, keyActive)
47+
48+let strAssetIdA = getStringValue(this, keyAssetIdA)
49+
50+let strAssetIdB = getStringValue(this, keyAssetIdB)
51+
52+let assetIdA = if ((strAssetIdA == "WAVES"))
53+ then unit
54+ else fromBase58String(strAssetIdA)
55+
56+let assetIdB = if ((strAssetIdB == "WAVES"))
57+ then unit
58+ else fromBase58String(strAssetIdB)
59+
60+let assetNameA = match assetIdA {
61+ case id: ByteVector =>
62+ value(assetInfo(id)).name
63+ case waves: Unit =>
64+ "WAVES"
65+ case _ =>
66+ throw("Match error")
67+}
68+
69+let assetNameB = match assetIdB {
70+ case id: ByteVector =>
71+ value(assetInfo(id)).name
72+ case waves: Unit =>
73+ "WAVES"
74+ case _ =>
75+ throw("Match error")
76+}
77+
78+let balanceA = getIntegerValue(this, keyBalanceA)
79+
80+let balanceB = getIntegerValue(this, keyBalanceB)
81+
82+let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId))
83+
84+let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply)
85+
86+let commission = 3000
87+
88+let commissionGovernance = 1200
89+
90+let commissionScaleDelimiter = 1000000
91+
92+let scaleValue3 = 1000
93+
94+let scaleValue8 = 100000000
95+
96+let slippageToleranceDelimiter = 1000
97+
98+let scaleValue8Digits = 8
99+
100+func accountBalance (assetId) = match assetId {
101+ case id: ByteVector =>
102+ assetBalance(this, id)
103+ case waves: Unit =>
104+ wavesBalance(this).available
105+ case _ =>
106+ throw("Match error")
107+}
108+
109+
110+let stakedAmountUSDN = match getInteger(stakingAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))) {
111+ case staked: Int =>
112+ staked
113+ case nothing: Unit =>
114+ 0
115+ case _ =>
116+ throw("Match error")
117+}
118+
119+let availableBalanceA = (balanceA - (if ((assetIdA == USDN))
120+ then stakedAmountUSDN
121+ else 0))
122+
123+let availableBalanceB = (balanceB - (if ((assetIdB == USDN))
124+ then stakedAmountUSDN
125+ else 0))
126+
127+let accountBalanceWithStakedA = (accountBalance(assetIdA) + (if ((assetIdA == USDN))
128+ then stakedAmountUSDN
129+ else 0))
130+
131+let accountBalanceWithStakedB = (accountBalance(assetIdB) + (if ((assetIdB == USDN))
132+ then stakedAmountUSDN
133+ else 0))
134+
135+let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA))
136+ then (accountBalanceWithStakedB >= balanceB)
137+ else false
138+
139+func getAssetInfo (assetId) = match assetId {
140+ case id: ByteVector =>
141+ let stringId = toBase58String(id)
142+ let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
143+ $Tuple3(stringId, info.name, info.decimals)
144+ case waves: Unit =>
145+ $Tuple3("WAVES", "WAVES", 8)
146+ case _ =>
147+ throw("Match error")
148+}
149+
150+
151+func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
152+
153+
154+func deductStakingFee (amount,assetId) = if ((assetId == USDN))
155+ then {
156+ let result = (amount - stakingFeeInUSDN)
157+ if ((0 >= result))
158+ then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N"))
159+ else result
160+ }
161+ else amount
162+
163+
164+func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
165+
166+
167+func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport"))
168+
169+
170+@Callable(i)
171+func init () = {
172+ let $t056405717 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
173+ let pmtAmountA = $t056405717._1
174+ let pmtAssetIdA = $t056405717._2
175+ let $t057225799 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
176+ let pmtAmountB = $t057225799._1
177+ let pmtAssetIdB = $t057225799._2
178+ let $t058045881 = getAssetInfo(pmtAssetIdA)
179+ let pmtStrAssetIdA = $t058045881._1
180+ let pmtAssetNameA = $t058045881._2
181+ let pmtDecimalsA = $t058045881._3
182+ let $t058865963 = getAssetInfo(pmtAssetIdB)
183+ let pmtStrAssetIdB = $t058865963._1
184+ let pmtAssetNameB = $t058865963._2
185+ let pmtDecimalsB = $t058865963._3
186+ if (isDefined(getBoolean(this, keyActive)))
187+ then throw("DApp is already active")
188+ else if ((pmtAssetIdA == pmtAssetIdB))
189+ then throw("Assets must be different")
190+ else {
191+ let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7))
192+ let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this))
193+ let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
194+ let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN))
195+ let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
196+ let shareIssueId = calculateAssetId(shareIssue)
197+[StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)]
198+ }
199+ }
200+
201+
202+
203+@Callable(i)
204+func replenishWithTwoTokens (slippageTolerance) = {
205+ let pmtAssetIdA = i.payments[0].assetId
206+ let pmtAssetIdB = i.payments[1].assetId
207+ let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA)
208+ let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB)
209+ let tokenRatio = fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB))
210+ let ratioShareTokensInA = fraction(pmtAmountA, scaleValue8, balanceA)
211+ let ratioShareTokensInB = fraction(pmtAmountB, scaleValue8, balanceB)
212+ let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8)
213+ if (!(isActive))
214+ then throw("DApp is inactive at this moment")
215+ else if (if ((0 > slippageTolerance))
216+ then true
217+ else (slippageTolerance > slippageToleranceDelimiter))
218+ then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance)))
219+ else if ((size(i.payments) != 2))
220+ then throw("Two attached assets expected")
221+ else if (if ((pmtAssetIdA != assetIdA))
222+ then true
223+ else (pmtAssetIdB != assetIdB))
224+ then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB))
225+ else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio))
226+ then true
227+ else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter)))
228+ then throw("Incorrect assets amount: amounts must have the contract ratio")
229+ else if ((shareTokenToPayAmount == 0))
230+ then throw("Too small amount to replenish")
231+ else if (!(hasEnoughBalance))
232+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
233+ else [IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)]
234+ }
235+
236+
237+
238+@Callable(i)
239+func withdraw () = {
240+ let $t01022410374 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
241+ let pmtAmount = $t01022410374._1
242+ let pmtAssetId = $t01022410374._2
243+ let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA)
244+ let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB)
245+ if (!(isActive))
246+ then throw("DApp is inactive at this moment")
247+ else if ((size(i.payments) != 1))
248+ then throw("One attached payment expected")
249+ else if ((pmtAssetId != shareAssetId))
250+ then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
251+ else if (!(hasEnoughBalance))
252+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
253+ else if (if ((amountToPayA > availableBalanceA))
254+ then true
255+ else (amountToPayB > availableBalanceB))
256+ then throwInsufficientAvailableBalances(amountToPayA, amountToPayB)
257+ else [IntegerEntry(keyBalanceA, (balanceA - amountToPayA)), IntegerEntry(keyBalanceB, (balanceB - amountToPayB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)]
258+ }
259+
260+
261+
262+@Callable(i)
263+func exchange (minAmountToReceive) = {
264+ let $t01176411839 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
265+ let pmtAmount = $t01176411839._1
266+ let pmtAssetId = $t01176411839._2
267+ func calculateFees (tokenFrom,tokenTo) = {
268+ let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom))
269+ let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
270+ let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter)
271+ if ((minAmountToReceive > amountWithFee))
272+ then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive)))
273+ else $Tuple3(amountWithoutFee, amountWithFee, governanceReward)
274+ }
275+
276+ if (!(isActive))
277+ then throw("DApp is inactive at this moment")
278+ else if ((0 >= minAmountToReceive))
279+ then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive)))
280+ else if ((size(i.payments) != 1))
281+ then throw("One attached payment expected")
282+ else if (!(hasEnoughBalance))
283+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
284+ else if ((pmtAssetId == assetIdA))
285+ then {
286+ let assetIdSend = assetIdB
287+ let $t01319813289 = calculateFees(balanceA, balanceB)
288+ let amountWithoutFee = $t01319813289._1
289+ let amountWithFee = $t01319813289._2
290+ let governanceReward = $t01319813289._3
291+ let newBalanceA = (balanceA + pmtAmount)
292+ let newBalanceB = ((balanceB - amountWithFee) - governanceReward)
293+ if (if (if ((assetIdA == USDN))
294+ then (stakedAmountUSDN >= newBalanceA)
295+ else false)
296+ then true
297+ else if ((assetIdB == USDN))
298+ then (stakedAmountUSDN >= newBalanceB)
299+ else false)
300+ then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB)
301+ else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)]
302+ }
303+ else if ((pmtAssetId == assetIdB))
304+ then {
305+ let assetIdSend = assetIdA
306+ let $t01416214253 = calculateFees(balanceB, balanceA)
307+ let amountWithoutFee = $t01416214253._1
308+ let amountWithFee = $t01416214253._2
309+ let governanceReward = $t01416214253._3
310+ let newBalanceA = ((balanceA - amountWithFee) - governanceReward)
311+ let newBalanceB = (balanceB + pmtAmount)
312+ if (if (if ((assetIdA == USDN))
313+ then (stakedAmountUSDN >= newBalanceA)
314+ else false)
315+ then true
316+ else if ((assetIdB == USDN))
317+ then (stakedAmountUSDN >= newBalanceB)
318+ else false)
319+ then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA)
320+ else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)]
321+ }
322+ else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB))
323+ }
324+
325+
326+
327+@Callable(i)
328+func shutdown () = if (!(isActive))
329+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
330+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
331+ then throw("Only admin can call this function")
332+ else suspend("Paused by admin")
333+
334+
335+
336+@Callable(i)
337+func activate () = if (isActive)
338+ then throw("DApp is already active")
339+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
340+ then throw("Only admin can call this function")
341+ else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
342+
343+
344+
345+@Callable(i)
346+func takeIntoAccountExtraFunds (amountLeave) = {
347+ let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA)
348+ let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB)
349+ let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == USDN))
350+ then amountLeave
351+ else 0))
352+ let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == USDN))
353+ then amountLeave
354+ else 0))
355+ if (!(isActive))
356+ then throw("DApp is inactive at this moment")
357+ else if ((i.caller != this))
358+ then throw("Only the DApp itself can call this function")
359+ else if ((0 > amountLeave))
360+ then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave)))
361+ else if (if ((0 > uncountableAmountEnrollAssetA))
362+ then true
363+ else (0 > uncountableAmountEnrollAssetB))
364+ then suspend("Enroll amount negative")
365+ else if (if ((0 > amountEnrollA))
366+ then true
367+ else (0 > amountEnrollB))
368+ then throw("Too large amountLeave")
369+ else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
370+ }
371+
372+
373+@Verifier(tx)
374+func verify () = match tx {
375+ case invoke: InvokeScriptTransaction =>
376+ let callTakeIntoAccount = if ((invoke.dApp == this))
377+ then (invoke.function == "takeIntoAccountExtraFunds")
378+ else false
379+ let callStaking = if ((invoke.dApp == stakingAddress))
380+ then if (if (if ((invoke.function == "lockNeutrino"))
381+ then (size(invoke.payments) == 1)
382+ else false)
383+ then (invoke.payments[0].assetId == USDN)
384+ else false)
385+ then true
386+ else if ((invoke.function == "unlockNeutrino"))
387+ then (size(invoke.payments) == 0)
388+ else false
389+ else false
390+ let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
391+ then true
392+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
393+ then true
394+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
395+ then true
396+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
397+ if (if (callTakeIntoAccount)
398+ then true
399+ else callStaking)
400+ then signedByAdmin
401+ else false
402+ case _ =>
403+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
404+ then 1
405+ else 0
406+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
407+ then 1
408+ else 0
409+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
410+ then 1
411+ else 0
412+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
413+}
414+

github/deemru/w8io/026f985 
31.87 ms