tx · BzueMva26Ws7xRq6UMtjat9mVCtTRtXCbcKqSBmRwDby

3N4kg7XLajQwLPkKWgyNAygZHXMPqNrYYAh:  -0.01000000 Waves

2021.03.29 16:25 [1459095] smart account 3N4kg7XLajQwLPkKWgyNAygZHXMPqNrYYAh > SELF 0.00000000 Waves

{ "type": 13, "id": "BzueMva26Ws7xRq6UMtjat9mVCtTRtXCbcKqSBmRwDby", "fee": 1000000, "feeAssetId": null, "timestamp": 1617024344641, "version": 2, "chainId": 84, "sender": "3N4kg7XLajQwLPkKWgyNAygZHXMPqNrYYAh", "senderPublicKey": "GMMJcSYaaxShk19RZgxrPpJWFahr9Vz1Bjm3bBvsFEVu", "proofs": [ "3DZUrisGtcKV2irAEbLgBf5yz8iSiR2m7rfcJqScnEXaNmZeVQ7NNQV8yTxLWh5u6Dt5dJCsK1t1eSn8y9Pqt8Uy" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQESABIDCgEBEgASABIDCgEBAAAAMwAAAAAHdmVyc2lvbgIAAAAFMS4wLjAAAAAACmtleVZlcnNpb24CAAAAB3ZlcnNpb24AAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAC2tleUJhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAAC2tleUJhbGFuY2VCAgAAAA9CX2Fzc2V0X2JhbGFuY2UAAAAAD2tleVNoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAE2tleVNoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAABpjb21taXNzaW9uX3NjYWxlX2RlbGltaXRlcgAAAAAIa2V5Q2F1c2U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XkzU2lnbmVkAAAAAAAAAAAC5fFL3w==", "height": 1459095, "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 $t059045981 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
173+ let pmtAmountA = $t059045981._1
174+ let pmtAssetIdA = $t059045981._2
175+ let $t059866063 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
176+ let pmtAmountB = $t059866063._1
177+ let pmtAssetIdB = $t059866063._2
178+ let $t060686145 = getAssetInfo(pmtAssetIdA)
179+ let pmtStrAssetIdA = $t060686145._1
180+ let pmtAssetNameA = $t060686145._2
181+ let pmtDecimalsA = $t060686145._3
182+ let $t061506227 = getAssetInfo(pmtAssetIdB)
183+ let pmtStrAssetIdB = $t061506227._1
184+ let pmtAssetNameB = $t061506227._2
185+ let pmtDecimalsB = $t061506227._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+ func sendAmountToSendBack (tokenFrom,tokenTo) = if ((ratioShareTokensInB > ratioShareTokensInA))
214+ then {
215+ let tokenToSendB = fraction((ratioShareTokensInB - ratioShareTokensInA), pmtAmountB, scaleValue8)
216+ let tokenToSendAssetIdB = pmtAssetIdB
217+ $Tuple2(tokenToSendB, tokenToSendAssetIdB)
218+ }
219+ else if ((ratioShareTokensInA > ratioShareTokensInB))
220+ then {
221+ let tokenToSendA = fraction((ratioShareTokensInA - ratioShareTokensInB), pmtAmountA, scaleValue8)
222+ let tokenToSendAssetIdA = pmtAssetIdA
223+ $Tuple2(tokenToSendA, tokenToSendAssetIdA)
224+ }
225+ else $Tuple2(0, pmtAssetIdA)
226+
227+ let $t0974910021 = sendAmountToSendBack(balanceA, balanceB)
228+ let tokenToSendAmount = $t0974910021._1
229+ let tokenToSendAssetId = $t0974910021._2
230+ if (!(isActive))
231+ then throw("DApp is inactive at this moment")
232+ else if (if ((0 > slippageTolerance))
233+ then true
234+ else (slippageTolerance > slippageToleranceDelimiter))
235+ then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance)))
236+ else if ((size(i.payments) != 2))
237+ then throw("Two attached assets expected")
238+ else if (if ((pmtAssetIdA != assetIdA))
239+ then true
240+ else (pmtAssetIdB != assetIdB))
241+ then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB))
242+ else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio))
243+ then true
244+ else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter)))
245+ then throw("Incorrect assets amount: amounts must have the contract ratio")
246+ else if ((shareTokenToPayAmount == 0))
247+ then throw("Too small amount to replenish")
248+ else if (!(hasEnoughBalance))
249+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
250+ else [IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), ScriptTransfer(i.caller, tokenToSendAmount, tokenToSendAssetId)]
251+ }
252+
253+
254+
255+@Callable(i)
256+func withdraw () = {
257+ let $t01178511935 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
258+ let pmtAmount = $t01178511935._1
259+ let pmtAssetId = $t01178511935._2
260+ let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA)
261+ let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB)
262+ if (!(isActive))
263+ then throw("DApp is inactive at this moment")
264+ else if ((size(i.payments) != 1))
265+ then throw("One attached payment expected")
266+ else if ((pmtAssetId != shareAssetId))
267+ then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
268+ else if (!(hasEnoughBalance))
269+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
270+ else if (if ((amountToPayA > availableBalanceA))
271+ then true
272+ else (amountToPayB > availableBalanceB))
273+ then throwInsufficientAvailableBalances(amountToPayA, amountToPayB)
274+ 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)]
275+ }
276+
277+
278+
279+@Callable(i)
280+func exchange (minAmountToReceive) = {
281+ let $t01332613401 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
282+ let pmtAmount = $t01332613401._1
283+ let pmtAssetId = $t01332613401._2
284+ func calculateFees (tokenFrom,tokenTo) = {
285+ let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom))
286+ let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
287+ let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter)
288+ if ((minAmountToReceive > amountWithFee))
289+ then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive)))
290+ else $Tuple3(amountWithoutFee, amountWithFee, governanceReward)
291+ }
292+
293+ if (!(isActive))
294+ then throw("DApp is inactive at this moment")
295+ else if ((0 >= minAmountToReceive))
296+ then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive)))
297+ else if ((size(i.payments) != 1))
298+ then throw("One attached payment expected")
299+ else if (!(hasEnoughBalance))
300+ then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB))
301+ else if ((pmtAssetId == assetIdA))
302+ then {
303+ let assetIdSend = assetIdB
304+ let $t01476014851 = calculateFees(balanceA, balanceB)
305+ let amountWithoutFee = $t01476014851._1
306+ let amountWithFee = $t01476014851._2
307+ let governanceReward = $t01476014851._3
308+ let newBalanceA = (balanceA + pmtAmount)
309+ let newBalanceB = ((balanceB - amountWithFee) - governanceReward)
310+ if (if (if ((assetIdA == USDN))
311+ then (stakedAmountUSDN >= newBalanceA)
312+ else false)
313+ then true
314+ else if ((assetIdB == USDN))
315+ then (stakedAmountUSDN >= newBalanceB)
316+ else false)
317+ then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB)
318+ else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)]
319+ }
320+ else if ((pmtAssetId == assetIdB))
321+ then {
322+ let assetIdSend = assetIdA
323+ let $t01572415815 = calculateFees(balanceB, balanceA)
324+ let amountWithoutFee = $t01572415815._1
325+ let amountWithFee = $t01572415815._2
326+ let governanceReward = $t01572415815._3
327+ let newBalanceA = ((balanceA - amountWithFee) - governanceReward)
328+ let newBalanceB = (balanceB + pmtAmount)
329+ if (if (if ((assetIdA == USDN))
330+ then (stakedAmountUSDN >= newBalanceA)
331+ else false)
332+ then true
333+ else if ((assetIdB == USDN))
334+ then (stakedAmountUSDN >= newBalanceB)
335+ else false)
336+ then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA)
337+ else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)]
338+ }
339+ else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB))
340+ }
341+
342+
343+
344+@Callable(i)
345+func shutdown () = if (!(isActive))
346+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
347+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
348+ then throw("Only admin can call this function")
349+ else suspend("Paused by admin")
350+
351+
352+
353+@Callable(i)
354+func activate () = if (isActive)
355+ then throw("DApp is already active")
356+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
357+ then throw("Only admin can call this function")
358+ else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
359+
360+
361+
362+@Callable(i)
363+func takeIntoAccountExtraFunds (amountLeave) = {
364+ let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA)
365+ let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB)
366+ let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == USDN))
367+ then amountLeave
368+ else 0))
369+ let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == USDN))
370+ then amountLeave
371+ else 0))
372+ if (!(isActive))
373+ then throw("DApp is inactive at this moment")
374+ else if ((i.caller != this))
375+ then throw("Only the DApp itself can call this function")
376+ else if ((0 > amountLeave))
377+ then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave)))
378+ else if (if ((0 > uncountableAmountEnrollAssetA))
379+ then true
380+ else (0 > uncountableAmountEnrollAssetB))
381+ then suspend("Enroll amount negative")
382+ else if (if ((0 > amountEnrollA))
383+ then true
384+ else (0 > amountEnrollB))
385+ then throw("Too large amountLeave")
386+ else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
387+ }
388+
389+
390+@Verifier(tx)
391+func verify () = match tx {
392+ case invoke: InvokeScriptTransaction =>
393+ let callTakeIntoAccount = if ((invoke.dApp == this))
394+ then (invoke.function == "takeIntoAccountExtraFunds")
395+ else false
396+ let callStaking = if ((invoke.dApp == stakingAddress))
397+ then if (if (if ((invoke.function == "lockNeutrino"))
398+ then (size(invoke.payments) == 1)
399+ else false)
400+ then (invoke.payments[0].assetId == USDN)
401+ else false)
402+ then true
403+ else if ((invoke.function == "unlockNeutrino"))
404+ then (size(invoke.payments) == 0)
405+ else false
406+ else false
407+ let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
408+ then true
409+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
410+ then true
411+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
412+ then true
413+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
414+ if (if (callTakeIntoAccount)
415+ then true
416+ else callStaking)
417+ then signedByAdmin
418+ else false
419+ case _ =>
420+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
421+ then 1
422+ else 0
423+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
424+ then 1
425+ else 0
426+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
427+ then 1
428+ else 0
429+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
430+}
431+

github/deemru/w8io/026f985 
47.24 ms