tx · 8Ae4zRaZ1YLsPkcSsmhFAMf2aqkKwvP2YQ9MhUMCi1ue

3MqAXcQCPvqvYZuVJhaXEeJZ3Rja1MUq2LY:  -0.14000000 Waves

2022.12.05 13:11 [2346922] smart account 3MqAXcQCPvqvYZuVJhaXEeJZ3Rja1MUq2LY > SELF 0.00000000 Waves

{ "type": 13, "id": "8Ae4zRaZ1YLsPkcSsmhFAMf2aqkKwvP2YQ9MhUMCi1ue", "fee": 14000000, "feeAssetId": null, "timestamp": 1670235039940, "version": 2, "chainId": 84, "sender": "3MqAXcQCPvqvYZuVJhaXEeJZ3Rja1MUq2LY", "senderPublicKey": "FfjixqhdoWY77CNzgw1CJPMaUJ1wBFaQSY4GrTetjwzH", "proofs": [ "5ZLYpka8qYhnS8ow2GbFGcCDE22PFdUJ9B115PGLSgzobUXjzx8RpWMa9fmDJMAwK9VRNB3BJwTG75amR3qspfdN" ], "script": "base64:BgIkCAISBAoCCBgSABIAEgUKAwQBCBIDCgEBEgMKAQESABIDCgEBKQAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADGtVU0ROQWRkcmVzcwIYc3Rha2luZ191c2RubnNidF9hZGRyZXNzAAxrRVVSTkFkZHJlc3MCFHN0YWtpbmdfZXVybl9hZGRyZXNzAAxrTGVhc2luZ1Bvb2wCD2xlYXNpbmdfYWRkcmVzcwAOa0xlYXNpbmdBbW91bnQCDmxlYXNpbmdfYW1vdW50AAprTGVhc2luZ0lkAgpsZWFzaW5nX2lkAA1rQWRtaW5QdWJLZXkxAgthZG1pbl9wdWJfMQANa0FkbWluUHViS2V5MgILYWRtaW5fcHViXzIADWtBZG1pblB1YktleTMCC2FkbWluX3B1Yl8zABJrQWRtaW5JbnZva2VQdWJLZXkCEGFkbWluX2ludm9rZV9wdWIADWtDcG1tQ29udHJhY3QCDWNwbW1fY29udHJhY3QADGtVU0ROQ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ZW5zARFzbGlwcGFnZVRvbGVyYW5jZQkBCmNhbGxDb21tb24EAhZyZXBsZW5pc2hXaXRoVHdvVG9rZW5zCAgFAWkGY2FsbGVyBWJ5dGVzCQDMCAICBWZhbHNlCQDMCAICATAFA25pbAgFAWkIcGF5bWVudHMBaQEId2l0aGRyYXcACQEKY2FsbENvbW1vbgQCCHdpdGhkcmF3CAgFAWkGY2FsbGVyBWJ5dGVzCQDMCAICATAFA25pbAgFAWkIcGF5bWVudHMBaQEIZXhjaGFuZ2UBEm1pbkFtb3VudFRvUmVjZWl2ZQkBCmNhbGxDb21tb24EAghleGNoYW5nZQgIBQFpBmNhbGxlcgVieXRlcwkAzAgCCQCkAwEFEm1pbkFtb3VudFRvUmVjZWl2ZQUDbmlsCAUBaQhwYXltZW50cwECdHgBBnZlcmlmeQAEE211bHRpU2lnbmVkQnlBZG1pbnMEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgUTbXVsdGlTaWduZWRCeUFkbWluc1AR26c=", "height": 2346922, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: FWA7eC8WRVRpJvBm2rM8KnLSzEG9CifK3SbKgwiC1zbd Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let kActive = "active"
5+
6+let kActiveGlob = "active_all_contracts"
7+
8+let kCause = "shutdown_cause"
9+
10+let kUSDNAddress = "staking_usdnnsbt_address"
11+
12+let kEURNAddress = "staking_eurn_address"
13+
14+let kLeasingPool = "leasing_address"
15+
16+let kLeasingAmount = "leasing_amount"
17+
18+let kLeasingId = "leasing_id"
19+
20+let kAdminPubKey1 = "admin_pub_1"
21+
22+let kAdminPubKey2 = "admin_pub_2"
23+
24+let kAdminPubKey3 = "admin_pub_3"
25+
26+let kAdminInvokePubKey = "admin_invoke_pub"
27+
28+let kCpmmContract = "cpmm_contract"
29+
30+let kUSDNAssetId = "usdn_asset_id"
31+
32+let kEURNAssetId = "eurn_asset_id"
33+
34+let kStakingAssets = "staking_assets"
35+
36+let kShareAssetId = "share_asset_id"
37+
38+let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
39+
40+func getBase58FromOracle (key) = match getString(oracle, key) {
41+ case string: String =>
42+ fromBase58String(string)
43+ case nothing =>
44+ throw((key + "is empty"))
45+}
46+
47+
48+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
49+
50+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
51+
52+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
53+
54+let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
55+
56+let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
57+
58+let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress))
59+
60+let cpmmContract = Address(getBase58FromOracle(kCpmmContract))
61+
62+let USDN = getBase58FromOracle(kUSDNAssetId)
63+
64+let EURN = getBase58FromOracle(kEURNAssetId)
65+
66+let stakingAssets = getStringValue(oracle, kStakingAssets)
67+
68+let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
69+
70+let active = valueOrElse(getBoolean(this, kActive), true)
71+
72+func isActive () = if (if (active)
73+ then activeGlob
74+ else false)
75+ then unit
76+ else throw("DApp is inactive at this moment")
77+
78+
79+func isGlobalCaller (caller) = if ((caller == cpmmContract))
80+ then unit
81+ else throw("Only global Contract can invoke this function")
82+
83+
84+func isAdminCall (callerPubKey) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], callerPubKey))
85+ then unit
86+ else throw("Only admin can call this function")
87+
88+
89+func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
90+
91+
92+func calcStakingFuncAndAddres (stake,assetId) = if (stake)
93+ then if ((assetId == USDN))
94+ then $Tuple2("lockNeutrino", stakingUSDNAddress)
95+ else $Tuple2("startStaking", stakingEURNAddress)
96+ else if ((assetId == USDN))
97+ then $Tuple2("unlockNeutrino", stakingUSDNAddress)
98+ else $Tuple2("stopStaking", stakingEURNAddress)
99+
100+
101+func calcStakingParams (stake,amount,assetId) = if (stake)
102+ then {
103+ let $t025932659 = calcStakingFuncAndAddres(stake, assetId)
104+ let call = $t025932659._1
105+ let stakingAddr = $t025932659._2
106+ $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
107+ }
108+ else {
109+ let $t027452811 = calcStakingFuncAndAddres(stake, assetId)
110+ let call = $t027452811._1
111+ let stakingAddr = $t027452811._2
112+ $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
113+ }
114+
115+
116+func collectPayments (acc,payment) = {
117+ let $t029733016 = acc
118+ let paymentAmounts = $t029733016._1
119+ let paymentAssetIds = $t029733016._2
120+ $Tuple2((paymentAmounts :+ payment.amount), (paymentAssetIds :+ (if ((payment.assetId == unit))
121+ then base58''
122+ else payment.assetId)))
123+ }
124+
125+
126+func collectState (result,source) = match source {
127+ case e: Issue|Burn|Reissue|ScriptTransfer|BinaryEntry|BooleanEntry|StringEntry|IntegerEntry =>
128+ (result :+ e)
129+ case _ =>
130+ result
131+}
132+
133+
134+func collectData (result,source) = match source {
135+ case v: String =>
136+ (result :+ v)
137+ case v: Int =>
138+ (result :+ v)
139+ case v: Boolean =>
140+ (result :+ v)
141+ case v: ByteVector =>
142+ (result :+ v)
143+ case v: Unit =>
144+ (result :+ v)
145+ case _ =>
146+ throw()
147+}
148+
149+
150+func callCommon (funcName,caller,args,payments) = valueOrElse(isActive(), {
151+ let $t039364020 = {
152+ let $l = payments
153+ let $s = size($l)
154+ let $acc0 = $Tuple2(nil, nil)
155+ func $f0_1 ($a,$i) = if (($i >= $s))
156+ then $a
157+ else collectPayments($a, $l[$i])
158+
159+ func $f0_2 ($a,$i) = if (($i >= $s))
160+ then $a
161+ else throw("List size exceeds 10")
162+
163+ $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)
164+ }
165+ let paymentAmounts = $t039364020._1
166+ let paymentAssetIds = $t039364020._2
167+ let lockPayment = if (if ((funcName == "replenishWithTwoTokens"))
168+ then (size(payments) == 3)
169+ else false)
170+ then [payments[2]]
171+ else if (if ((funcName == "replenishWithOneToken"))
172+ then (size(payments) == 2)
173+ else false)
174+ then [payments[1]]
175+ else nil
176+ let $t042494406 = {
177+ let @ = reentrantInvoke(cpmmContract, funcName, [caller, args, paymentAmounts, paymentAssetIds], lockPayment)
178+ if ($isInstanceOf(@, "(List[Any], List[Any])"))
179+ then @
180+ else throw(($getType(@) + " couldn't be cast to (List[Any], List[Any])"))
181+ }
182+ if (($t042494406 == $t042494406))
183+ then {
184+ let data = $t042494406._2
185+ let actions = $t042494406._1
186+ let mappedData = {
187+ let $l = data
188+ let $s = size($l)
189+ let $acc0 = nil
190+ func $f1_1 ($a,$i) = if (($i >= $s))
191+ then $a
192+ else collectData($a, $l[$i])
193+
194+ func $f1_2 ($a,$i) = if (($i >= $s))
195+ then $a
196+ else throw("List size exceeds 10")
197+
198+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
199+ }
200+ let mappedActions = {
201+ let $l = actions
202+ let $s = size($l)
203+ let $acc0 = nil
204+ func $f2_1 ($a,$i) = if (($i >= $s))
205+ then $a
206+ else collectState($a, $l[$i])
207+
208+ func $f2_2 ($a,$i) = if (($i >= $s))
209+ then $a
210+ else throw("List size exceeds 15")
211+
212+ $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
213+ }
214+ $Tuple2(mappedActions, mappedData)
215+ }
216+ else throw("Strict value is not equal to itself.")
217+ })
218+
219+
220+@Callable(i)
221+func callFunction (funcName,args) = callCommon(funcName, i.caller.bytes, args, i.payments)
222+
223+
224+
225+@Callable(i)
226+func shutdown () = valueOrElse(isAdminCall(i.callerPublicKey), if (!(active))
227+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
228+ else suspend("Paused by admin"))
229+
230+
231+
232+@Callable(i)
233+func activate () = valueOrElse(isAdminCall(i.callerPublicKey), if (active)
234+ then throw("DApp is already active")
235+ else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
236+
237+
238+
239+@Callable(i)
240+func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isActive(), if ((i.caller != cpmmContract))
241+ then throw("Only global Contract can invoke this function")
242+ else if ((assetIdString == "WAVES"))
243+ then {
244+ let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
245+ let leasingId = getBinary(this, kLeasingId)
246+ let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
247+ let newLeaseAmount = if (stake)
248+ then (leasingAmount + amount)
249+ else (leasingAmount - amount)
250+ let newLease = Lease(pool, newLeaseAmount)
251+ let newLeaseId = calculateLeaseId(newLease)
252+ let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
253+ match leasingId {
254+ case lId: ByteVector =>
255+ ([LeaseCancel(lId)] ++ baseEtry)
256+ case _ =>
257+ baseEtry
258+ }
259+ }
260+ else {
261+ let $t064026505 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
262+ let call = $t064026505._1
263+ let addr = $t064026505._2
264+ let params = $t064026505._3
265+ let payments = $t064026505._4
266+ let inv = invoke(addr, call, params, payments)
267+ if ((inv == inv))
268+ then nil
269+ else throw("Strict value is not equal to itself.")
270+ })
271+
272+
273+
274+@Callable(i)
275+func reissueShareToken (amount) = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), {
276+ let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
277+[Reissue(shareAssetId, amount, true), ScriptTransfer(i.caller, amount, shareAssetId)]
278+ }))
279+
280+
281+
282+@Callable(i)
283+func replenishWithTwoTokens (slippageTolerance) = callCommon("replenishWithTwoTokens", i.caller.bytes, ["false", "0"], i.payments)
284+
285+
286+
287+@Callable(i)
288+func withdraw () = callCommon("withdraw", i.caller.bytes, ["0"], i.payments)
289+
290+
291+
292+@Callable(i)
293+func exchange (minAmountToReceive) = callCommon("exchange", i.caller.bytes, [toString(minAmountToReceive)], i.payments)
294+
295+
296+@Verifier(tx)
297+func verify () = {
298+ let multiSignedByAdmins = {
299+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
300+ then 1
301+ else 0
302+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
303+ then 1
304+ else 0
305+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
306+ then 1
307+ else 0
308+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
309+ }
310+ multiSignedByAdmins
311+ }
312+

github/deemru/w8io/169f3d6 
18.53 ms