tx · DPeGDW8zQk1YMbSFraj12hNYkK8DXnoy44q9d4iiUPA3

3NAMiUq5LDz5Cs1QmrFyxE9ERfw5FviKNg3:  -0.02100000 Waves

2022.07.06 10:40 [2127539] smart account 3NAMiUq5LDz5Cs1QmrFyxE9ERfw5FviKNg3 > SELF 0.00000000 Waves

{ "type": 13, "id": "DPeGDW8zQk1YMbSFraj12hNYkK8DXnoy44q9d4iiUPA3", "fee": 2100000, "feeAssetId": null, "timestamp": 1657093250463, "version": 2, "chainId": 84, "sender": "3NAMiUq5LDz5Cs1QmrFyxE9ERfw5FviKNg3", "senderPublicKey": "CrhBQ3EirHV3itLiADANEmGMthAWUCQMuCkTXrAxJvyQ", "proofs": [ "4YeixvGt1AJhJCVWtDexmk8HrEnyz2HoKBmX7bGPqF6iSJtASbUYAfbmc79mBiKCRSsnn3ska36RnxvRbbYvanNK" ], "script": "base64:AAIFAAAAAAAAAB4IAhIDCgEEEgUKAwgBARIAEgASAwoBARIFCgMEAQgAAABRAAAAAAd2ZXJzaW9uAgAAAAUyLjAuMAAAAAAIa1ZlcnNpb24CAAAAB3ZlcnNpb24AAAAAB2tBY3RpdmUCAAAABmFjdGl2ZQAAAAAHa0Fzc2V0cwIAAAAJYXNzZXRfaWRzAAAAAA1rQXNzZXRCYWxhbmNlAgAAAA5fYXNzZXRfYmFsYW5jZQAAAAANa1NoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAEWtTaGFyZUFzc2V0U3VwcGx5AgAAABJzaGFyZV9hc3NldF9zdXBwbHkAAAAABGtGZWUCAAAACmNvbW1pc3Npb24AAAAACmtJbnZhcmlhbnQCAAAACWludmFyaWFudAAAAAAGa0NhdXNlAgAAAA5zaHV0ZG93bl9jYXVzZQAAAAAMa1VTRE5BZGRyZXNzAgAAABhzdGFraW5nX3VzZG5uc2J0X2FkZHJlc3MAAAAADGtFVVJOQWRkcmVzcwIAAAAUc3Rha2luZ19ldXJuX2FkZHJlc3MAAAAACmtEaX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leTMGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAARYWRtaW5QdWJLZXlJbnZva2UDAwUAAAATY2FsbFRha2VJbnRvQWNjb3VudAUAAAANc2lnbmVkQnlBZG1pbgcGBQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5zBQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5ztU9nOw==", "height": 2127539, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9LDX1qWA7kjJHKGKizdxveLAQb9cdb4tVMWToNyKQx45 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let version = "2.0.0"
5+
6+let kVersion = "version"
7+
8+let kActive = "active"
9+
10+let kAssets = "asset_ids"
11+
12+let kAssetBalance = "_asset_balance"
13+
14+let kShareAssetId = "share_asset_id"
15+
16+let kShareAssetSupply = "share_asset_supply"
17+
18+let kFee = "commission"
19+
20+let kInvariant = "invariant"
21+
22+let kCause = "shutdown_cause"
23+
24+let kUSDNAddress = "staking_usdnnsbt_address"
25+
26+let kEURNAddress = "staking_eurn_address"
27+
28+let kDiscounts = "discounts"
29+
30+let kDiscountValues = "discount_values"
31+
32+let kUserSwopInGov = "_SWOP_amount"
33+
34+let kFirstHarvest = "first_harvest"
35+
36+let kFirstHarvestHeight = "first_harvest_height"
37+
38+let kShareLimit = "share_limit_on_first_harvest"
39+
40+let kBasePeriod = "base_period"
41+
42+let kPeriodLength = "period_length"
43+
44+let kStartHeight = "start_height"
45+
46+let kAdminPubKey1 = "admin_pub_1"
47+
48+let kAdminPubKey2 = "admin_pub_2"
49+
50+let kAdminPubKey3 = "admin_pub_3"
51+
52+let kAdminInvokePubKey = "admin_invoke_pub"
53+
54+let kMoneyBoxAddress = "money_box_address"
55+
56+let kGovAddress = "governance_address"
57+
58+let kVotingAddress = "voting_address"
59+
60+let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
61+
62+func getBase58FromOracle (key) = match getString(oracle, key) {
63+ case string: String =>
64+ fromBase58String(string)
65+ case nothing =>
66+ throw((key + "is empty"))
67+}
68+
69+
70+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
71+
72+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
73+
74+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
75+
76+let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
77+
78+let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
79+
80+let govAddress = Address(getBase58FromOracle(kGovAddress))
81+
82+let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
83+
84+let votingAddress = Address(getBase58FromOracle(kVotingAddress))
85+
86+let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
87+
88+let stakingAssets = [toBase58String(USDN)]
89+
90+let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
91+
92+let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
93+
94+let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
95+
96+let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
97+
98+let active = getBooleanValue(this, kActive)
99+
100+let shareSupply = getIntegerValue(this, kShareAssetSupply)
101+
102+let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
103+
104+let exchangeAssets = getString(this, kAssets)
105+
106+let fee = getIntegerValue(this, kFee)
107+
108+let feeGovernance = fraction(fee, 40, 100)
109+
110+let feeScale6 = 1000000
111+
112+let scale3 = 1000
113+
114+let scale8 = 100000000
115+
116+let scale16 = 10000000000000000
117+
118+let slippageScale3 = 1000
119+
120+let digits8 = 8
121+
122+let dAppThreshold = 50
123+
124+let dAppThresholdScale2 = 100
125+
126+let exchangeRatioLimitMin = 90000000
127+
128+let exchangeRatioLimitMax = 110000000
129+
130+let alpha = 50
131+
132+let alphaDigits = 2
133+
134+let beta = 4600000000000000
135+
136+func accountBalance (assetId) = match assetId {
137+ case id: ByteVector =>
138+ assetBalance(this, id)
139+ case waves: Unit =>
140+ wavesBalance(this).available
141+ case _ =>
142+ throw("Match error")
143+}
144+
145+
146+func stakedAmount (assetId) = {
147+ let stakedAmountCalculated = match assetId {
148+ case aId: ByteVector =>
149+ if ((aId == USDN))
150+ then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
151+ else 0
152+ case _: Unit =>
153+ 0
154+ case _ =>
155+ throw("Match error")
156+ }
157+ match stakedAmountCalculated {
158+ case i: Int =>
159+ i
160+ case _ =>
161+ 0
162+ }
163+ }
164+
165+
166+func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2)
167+
168+
169+func invariantCalc (x,y) = {
170+ let sk = skewness(x, y)
171+ (fraction((x + y), scale16, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(x), toBigInt(y), toBigInt(scale8)), 0, toBigInt(5), 1, (digits8 / 2), DOWN)), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8)))
172+ }
173+
174+
175+func calculateSendAmount (balanceFrom,balanceTo,invariant,amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount) = {
176+ let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000))
177+ let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount)
178+ func getStepAmount (acc,step) = if ((acc._1 == -1))
179+ then {
180+ let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3))
181+ let stepInvariant = invariantCalc(balanceFrom, (balanceTo - amountToSend))
182+ if ((stepInvariant > invariant))
183+ then $Tuple2(amountToSend, stepInvariant)
184+ else $Tuple2(-1, 0)
185+ }
186+ else acc
187+
188+ let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000)
189+ if ((0 > amountToSendMin._1))
190+ then throw("Price is worse than minReceived")
191+ else {
192+ let invEstimated = invariantCalc(balanceFrom, (balanceTo - amountToSendEstimated))
193+ if ((invariant > invEstimated))
194+ then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated)))
195+ then throw("The requested price is too not profitable for user")
196+ else {
197+ let a = {
198+ let $l = [25, 200, 500]
199+ let $s = size($l)
200+ let $acc0 = $Tuple2(-1, 0)
201+ func $f0_1 ($a,$i) = if (($i >= $s))
202+ then $a
203+ else getStepAmount($a, $l[$i])
204+
205+ func $f0_2 ($a,$i) = if (($i >= $s))
206+ then $a
207+ else throw("List size exceeds 3")
208+
209+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
210+ }
211+ if ((0 > a._1))
212+ then amountToSendMin._1
213+ else a._1
214+ }
215+ else {
216+ let a = {
217+ let $l = [-500, -200, -25]
218+ let $s = size($l)
219+ let $acc0 = $Tuple2(-1, 0)
220+ func $f0_1 ($a,$i) = if (($i >= $s))
221+ then $a
222+ else getStepAmount($a, $l[$i])
223+
224+ func $f0_2 ($a,$i) = if (($i >= $s))
225+ then $a
226+ else throw("List size exceeds 3")
227+
228+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
229+ }
230+ let tupleSendBetter = if ((0 > a._1))
231+ then $Tuple2(amountToSendEstimated, invEstimated)
232+ else a
233+ if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2)))
234+ then throw("The requested price is too not profitable for user")
235+ else tupleSendBetter._1
236+ }
237+ }
238+ }
239+
240+
241+func getAssetInfo (assetId) = match assetId {
242+ case id: ByteVector =>
243+ let stringId = toBase58String(id)
244+ let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
245+ $Tuple3(stringId, info.name, info.decimals)
246+ case waves: Unit =>
247+ $Tuple3("WAVES", "WAVES", 8)
248+ case _ =>
249+ throw("Match error")
250+}
251+
252+
253+func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
254+
255+
256+func throwIsActive () = throw("DApp is already active")
257+
258+
259+func isActive () = if (active)
260+ then unit
261+ else throw("DApp is inactive at this moment")
262+
263+
264+func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
265+ then unit
266+ else throw("Only admin can call this function")
267+
268+
269+func throwAssets () = throw("Incorrect assets attached.")
270+
271+
272+func throwOnePayment () = throw("One attached payment expected")
273+
274+
275+func throwThreshold (threshold,amountA,amountB,assetIdA,assetIdB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + toBase58String(assetIdA)) + ", ") + toString(amountB)) + " ") + toBase58String(assetIdB)))
276+
277+
278+func suspendSuspicious (balanceA,assetIdA,balanceB,assetIdB) = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + toBase58String(assetIdA)) + ", ") + toString(balanceB)) + " ") + toBase58String(assetIdB)) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + toBase58String(assetIdA)) + ", ") + toString(accountBalance(assetIdB))) + " ") + toBase58String(assetIdB)))
279+
280+
281+func calcStakingFuncAndAddres (stake,assetId) = if (stake)
282+ then $Tuple2("lockNeutrino", stakingUSDNAddress)
283+ else $Tuple2("unlockNeutrino", stakingUSDNAddress)
284+
285+
286+func calcStakingParams (stake,amount,assetId) = if (stake)
287+ then {
288+ let $t086658731 = calcStakingFuncAndAddres(stake, assetId)
289+ let call = $t086658731._1
290+ let stakingAddr = $t086658731._2
291+ $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
292+ }
293+ else {
294+ let $t088178883 = calcStakingFuncAndAddres(stake, assetId)
295+ let call = $t088178883._1
296+ let stakingAddr = $t088178883._2
297+ $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
298+ }
299+
300+
301+func calculateFeeDiscount (userAddr) = {
302+ let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
303+ let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
304+ let discounts = split(getStringValue(oracle, kDiscounts), ",")
305+ if (if ((swopAmount >= parseIntValue(discountValues[0])))
306+ then (parseIntValue(discountValues[1]) > swopAmount)
307+ else false)
308+ then (feeScale6 - parseIntValue(discounts[0]))
309+ else if (if ((swopAmount >= parseIntValue(discountValues[1])))
310+ then (parseIntValue(discountValues[2]) > swopAmount)
311+ else false)
312+ then (feeScale6 - parseIntValue(discounts[1]))
313+ else if (if ((swopAmount >= parseIntValue(discountValues[2])))
314+ then (parseIntValue(discountValues[3]) > swopAmount)
315+ else false)
316+ then (feeScale6 - parseIntValue(discounts[2]))
317+ else if (if ((swopAmount >= parseIntValue(discountValues[3])))
318+ then (parseIntValue(discountValues[4]) > swopAmount)
319+ else false)
320+ then (feeScale6 - parseIntValue(discounts[3]))
321+ else if ((swopAmount >= parseIntValue(discountValues[4])))
322+ then (feeScale6 - parseIntValue(discounts[4]))
323+ else feeScale6
324+ }
325+
326+
327+func getPoolBalances (assetIdA,assetIdB) = {
328+ let balanceA = getIntegerValue(this, (toBase58String(assetIdA) + kAssetBalance))
329+ let balanceB = getIntegerValue(this, (toBase58String(assetIdB) + kAssetBalance))
330+ let stakedAmountA = stakedAmount(assetIdA)
331+ let stakedAmountB = stakedAmount(assetIdB)
332+ let accountBalanceA = (accountBalance(assetIdA) + stakedAmountA)
333+ let accountBalanceB = (accountBalance(assetIdB) + stakedAmountB)
334+ $Tuple4(balanceA, balanceB, accountBalanceA, accountBalanceB)
335+ }
336+
337+
338+@Callable(i)
339+func init (firstHarvest) = if (isDefined(getBoolean(this, kActive)))
340+ then throwIsActive()
341+ else {
342+ func parseInitPayments (acc,payment) = {
343+ let $t01079110825 = acc
344+ let entries = $t01079110825._1
345+ let assetIds = $t01079110825._2
346+ let sum = $t01079110825._3
347+ let $t01083810920 = $Tuple2(payment.amount, toBase58String(value(payment.assetId)))
348+ let amount = $t01083810920._1
349+ let assetId = $t01083810920._2
350+ let stake = if (containsElement(stakingAssets, assetId))
351+ then invoke(this, "stakeUnstake", [true, amount, assetId], nil)
352+ else 0
353+ if ((stake == stake))
354+ then if (contains(assetIds, assetId))
355+ then throw("Assets must be different")
356+ else $Tuple3((entries :+ IntegerEntry((assetId + kAssetBalance), amount)), if ((size(assetIds) == 0))
357+ then assetId
358+ else ((assetIds + ",") + assetId), (sum + amount))
359+ else throw("Strict value is not equal to itself.")
360+ }
361+
362+ let $t01149511585 = {
363+ let $l = i.payments
364+ let $s = size($l)
365+ let $acc0 = $Tuple3(nil, "", 0)
366+ func $f0_1 ($a,$i) = if (($i >= $s))
367+ then $a
368+ else parseInitPayments($a, $l[$i])
369+
370+ func $f0_2 ($a,$i) = if (($i >= $s))
371+ then $a
372+ else throw("List size exceeds 10")
373+
374+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
375+ }
376+ let balanceEntries = $t01149511585._1
377+ let assetIds = $t01149511585._2
378+ let sum = $t01149511585._3
379+ let shareName = "s_Multi_USD"
380+ let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
381+ let shareDecimals = 6
382+ let shareInitialSupply = sum
383+ let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
384+ let shareIssueId = calculateAssetId(shareIssue)
385+ let baseEntry = ([StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssets, assetIds), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] ++ balanceEntries)
386+ if (firstHarvest)
387+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
388+ else baseEntry
389+ }
390+
391+
392+
393+@Callable(i)
394+func exchange (exchangeAseetId,estimatedAmountToReceive,minAmountToReceive) = {
395+ let $t01305613131 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
396+ let pmtAmount = $t01305613131._1
397+ let pmtAssetId = $t01305613131._2
398+ let $t01313613276 = getPoolBalances(value(pmtAssetId), fromBase58String(exchangeAseetId))
399+ let balanceFrom = $t01313613276._1
400+ let balanceTo = $t01313613276._2
401+ let accountBalanceFrom = $t01313613276._3
402+ let accountBalanceTo = $t01313613276._4
403+ let pmtStrAssetId = toBase58String(value(pmtAssetId))
404+ if ((0 >= estimatedAmountToReceive))
405+ then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
406+ else if ((minAmountToReceive > estimatedAmountToReceive))
407+ then throw("Minimal amount can't be greater than estimated.")
408+ else if ((size(i.payments) != 1))
409+ then throwOnePayment()
410+ else if (if ((balanceFrom > accountBalanceFrom))
411+ then true
412+ else (balanceTo > accountBalanceTo))
413+ then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(balanceFrom, value(pmtAssetId), balanceTo, fromBase58String(exchangeAseetId)))
414+ else if (if (!(contains(value(exchangeAssets), pmtStrAssetId)))
415+ then true
416+ else !(contains(value(exchangeAssets), exchangeAseetId)))
417+ then throwAssets()
418+ else if ((10000000 > pmtAmount))
419+ then throw("Only swap of 10.000000 or more tokens is allowed")
420+ else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
421+ then true
422+ else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
423+ then throw("Incorrect args and pmt ratio")
424+ else {
425+ let invariant = invariantCalc(balanceFrom, balanceTo)
426+ let amount = calculateSendAmount(balanceFrom, balanceTo, invariant, estimatedAmountToReceive, minAmountToReceive, pmtAmount)
427+ let feeDiscount = calculateFeeDiscount(i.originCaller)
428+ let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
429+ let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
430+ let $t01491315022 = $Tuple2((balanceFrom + pmtAmount), ((balanceTo - amountMinusFee) - governanceReward))
431+ let newBalanceFrom = $t01491315022._1
432+ let newBalanceTo = $t01491315022._2
433+ let dAppThresholdAmount = fraction((newBalanceFrom + newBalanceTo), dAppThreshold, (2 * dAppThresholdScale2))
434+ if (if ((dAppThresholdAmount > newBalanceFrom))
435+ then true
436+ else (dAppThresholdAmount > newBalanceTo))
437+ then throwThreshold(dAppThresholdAmount, newBalanceFrom, newBalanceTo, value(pmtAssetId), fromBase58String(exchangeAseetId))
438+ else {
439+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
440+ then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
441+ else 0
442+ if ((stake1 == stake1))
443+ then {
444+ let stake2 = if (containsElement(stakingAssets, exchangeAseetId))
445+ then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), exchangeAseetId], nil)
446+ else 0
447+ if ((stake2 == stake2))
448+ then $Tuple2([IntegerEntry((pmtStrAssetId + kAssetBalance), newBalanceFrom), IntegerEntry((exchangeAseetId + kAssetBalance), newBalanceTo), ScriptTransfer(i.caller, amountMinusFee, fromBase58String(exchangeAseetId)), ScriptTransfer(moneyBoxAddress, governanceReward, fromBase58String(exchangeAseetId))], $Tuple2(amountMinusFee, fromBase58String(exchangeAseetId)))
449+ else throw("Strict value is not equal to itself.")
450+ }
451+ else throw("Strict value is not equal to itself.")
452+ }
453+ }
454+ }
455+
456+
457+
458+@Callable(i)
459+func shutdown () = valueOrElse(isAdminCall(i), if (!(active))
460+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
461+ else suspend("Paused by admin"))
462+
463+
464+
465+@Callable(i)
466+func activate () = valueOrElse(isAdminCall(i), if (active)
467+ then throwIsActive()
468+ else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
469+
470+
471+
472+@Callable(i)
473+func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), [IntegerEntry(kShareLimit, shareLimit)]))
474+
475+
476+
477+@Callable(i)
478+func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
479+ then throw("Only contract itself can invoke this function")
480+ else {
481+ let $t01736717470 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
482+ let call = $t01736717470._1
483+ let addr = $t01736717470._2
484+ let params = $t01736717470._3
485+ let payments = $t01736717470._4
486+ let inv = invoke(addr, call, params, payments)
487+ if ((inv == inv))
488+ then nil
489+ else throw("Strict value is not equal to itself.")
490+ }
491+
492+
493+@Verifier(tx)
494+func verify () = {
495+ let multiSignedByAdmins = {
496+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
497+ then 1
498+ else 0
499+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
500+ then 1
501+ else 0
502+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
503+ then 1
504+ else 0
505+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
506+ }
507+ match tx {
508+ case inv: InvokeScriptTransaction =>
509+ let callTakeIntoAccount = if ((inv.dApp == this))
510+ then (inv.function == "takeIntoAccountExtraFunds")
511+ else false
512+ let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
513+ then true
514+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
515+ then true
516+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
517+ then true
518+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
519+ if (if (callTakeIntoAccount)
520+ then signedByAdmin
521+ else false)
522+ then true
523+ else multiSignedByAdmins
524+ case _ =>
525+ multiSignedByAdmins
526+ }
527+ }
528+

github/deemru/w8io/026f985 
64.00 ms