tx · 4Y9jYWx7yUsE7iovoPcK72UaVd8dFr5EXXqKapA9fdne

3N1rzvSD6e3e8EAAe58DSPPmAmgHzU8keGW:  -0.10000000 Waves

2023.01.24 11:59 [2418832] smart account 3N1rzvSD6e3e8EAAe58DSPPmAmgHzU8keGW > SELF 0.00000000 Waves

{ "type": 13, "id": "4Y9jYWx7yUsE7iovoPcK72UaVd8dFr5EXXqKapA9fdne", "fee": 10000000, "feeAssetId": null, "timestamp": 1674550823472, "version": 2, "chainId": 84, "sender": "3N1rzvSD6e3e8EAAe58DSPPmAmgHzU8keGW", "senderPublicKey": "DfabAmKWXpe5iKMWYEYbph4E3w2pTX8Znzgh2MgxqKuc", "proofs": [ "u9T1ScKFEzx3h7MV3W9HjVGiNB91jy3f6jY7sDvNW9iwyqaMjshvDZwVAZAzwpeU6yUQdBq8MRosvPPsyXSGSQa", "3BZqj5bP3KC7oQs4eQowyVjUBrPoNJd8VE1PWb9QPpawVzvRUpLwXV4UsFUmU6tVDzWE9PQzf7romWiB9ZXLRiW2" ], "script": "base64:BgImCAISBAoCCBgSABIAEgUKAwQBCBIAEgMKAQESAwoBARIAEgMKAQEpAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAMa1VTRE5BZGRyZXNzAhhzdGFraW5nX3VzZG5uc2J0X2FkZHJlc3MADGtFVVJOQWRkcmVzcwIUc3Rha2luZ19ldXJuX2FkZHJlc3MADGtMZWFzaW5nUG9vbAIPbGVhc2luZ19hZGRyZXNzAA5rTGVhc2luZ0Ftb3VudAIObGVhc2luZ19hbW91bnQACmtMZWFzaW5nSWQCCmxlYXNpbmdfaWQADWtBZG1pblB1YktleTECC2FkbWluX3B1Yl8xAA1rQWRtaW5QdWJLZXkyAgthZG1pbl9wdWJfMgANa0FkbWluUHViS2V5MwILYWRtaW5fcHViXzMAEmtBZG1pbkludm9rZVB1Ykt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ACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIFE211bHRpU2lnbmVkQnlBZG1pbnOCFYaH", "height": 2418832, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6x5vRTZqZcXoeH4miDhJWU9qEGeSRHjv2aAFBnueiDBe Next: HFyovmwqN3XHpwLkhrjkRH9bLQVMW1imRcrDmsVDdDfR Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kActive = "active"
5+
6+let kActiveGlob = "active_all_contracts"
57
68 let kCause = "shutdown_cause"
79
6365
6466 let stakingAssets = getStringValue(oracle, kStakingAssets)
6567
68+let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
69+
6670 let active = valueOrElse(getBoolean(this, kActive), true)
6771
68-func isActive () = if (active)
72+func isActive () = if (if (active)
73+ then activeGlob
74+ else false)
6975 then unit
7076 else throw("DApp is inactive at this moment")
7177
94100
95101 func calcStakingParams (stake,amount,assetId) = if (stake)
96102 then {
97- let $t024732539 = calcStakingFuncAndAddres(stake, assetId)
98- let call = $t024732539._1
99- let stakingAddr = $t024732539._2
103+ let $t025932659 = calcStakingFuncAndAddres(stake, assetId)
104+ let call = $t025932659._1
105+ let stakingAddr = $t025932659._2
100106 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
101107 }
102108 else {
103- let $t026252691 = calcStakingFuncAndAddres(stake, assetId)
104- let call = $t026252691._1
105- let stakingAddr = $t026252691._2
109+ let $t027452811 = calcStakingFuncAndAddres(stake, assetId)
110+ let call = $t027452811._1
111+ let stakingAddr = $t027452811._2
106112 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
107113 }
108114
109115
110116 func collectPayments (acc,payment) = {
111- let $t028532896 = acc
112- let paymentAmounts = $t028532896._1
113- let paymentAssetIds = $t028532896._2
117+ let $t029733016 = acc
118+ let paymentAmounts = $t029733016._1
119+ let paymentAssetIds = $t029733016._2
114120 $Tuple2((paymentAmounts :+ payment.amount), (paymentAssetIds :+ (if ((payment.assetId == unit))
115121 then base58''
116122 else payment.assetId)))
134140 (result :+ v)
135141 case v: ByteVector =>
136142 (result :+ v)
143+ case v: Unit =>
144+ (result :+ v)
137145 case _ =>
138146 throw()
139147 }
140148
141149
142150 func callCommon (funcName,caller,args,payments) = valueOrElse(isActive(), {
143- let $t037773861 = {
151+ let $t039364020 = {
144152 let $l = payments
145153 let $s = size($l)
146154 let $acc0 = $Tuple2(nil, nil)
154162
155163 $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)
156164 }
157- let paymentAmounts = $t037773861._1
158- let paymentAssetIds = $t037773861._2
159- let $t038664014 = {
160- let @ = reentrantInvoke(cpmmContract, funcName, [caller, args, paymentAmounts, paymentAssetIds], nil)
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)
161178 if ($isInstanceOf(@, "(List[Any], List[Any])"))
162179 then @
163180 else throw(($getType(@) + " couldn't be cast to (List[Any], List[Any])"))
164181 }
165- if (($t038664014 == $t038664014))
182+ if (($t042494406 == $t042494406))
166183 then {
167- let data = $t038664014._2
168- let actions = $t038664014._1
184+ let data = $t042494406._2
185+ let actions = $t042494406._1
169186 let mappedData = {
170187 let $l = data
171188 let $s = size($l)
220237
221238
222239 @Callable(i)
223-func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isActive(), if ((i.caller != cpmmContract))
224- then throw("Only global Contract can invoke this function")
225- else if ((assetIdString == "WAVES"))
226- then {
227- let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
228- let leasingId = getBinary(this, kLeasingId)
229- let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
230- let newLeaseAmount = if (stake)
231- then (leasingAmount + amount)
232- else (leasingAmount - amount)
233- let newLease = Lease(pool, newLeaseAmount)
234- let newLeaseId = calculateLeaseId(newLease)
235- let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
236- match leasingId {
237- case lId: ByteVector =>
238- ([LeaseCancel(lId)] ++ baseEtry)
239- case _ =>
240- baseEtry
241- }
242- }
243- else {
244- let $t060106113 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
245- let call = $t060106113._1
246- let addr = $t060106113._2
247- let params = $t060106113._3
248- let payments = $t060106113._4
249- let inv = invoke(addr, call, params, payments)
250- if ((inv == inv))
251- then nil
252- else throw("Strict value is not equal to itself.")
253- })
240+func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), if ((assetIdString == "WAVES"))
241+ then {
242+ let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
243+ let leasingId = getBinary(this, kLeasingId)
244+ let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
245+ let newLeaseAmount = if (stake)
246+ then (leasingAmount + amount)
247+ else (leasingAmount - amount)
248+ let newLease = Lease(pool, newLeaseAmount)
249+ let newLeaseId = calculateLeaseId(newLease)
250+ let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
251+ match leasingId {
252+ case lId: ByteVector =>
253+ ([LeaseCancel(lId)] ++ baseEtry)
254+ case _ =>
255+ baseEtry
256+ }
257+ }
258+ else {
259+ let $t063246427 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
260+ let call = $t063246427._1
261+ let addr = $t063246427._2
262+ let params = $t063246427._3
263+ let payments = $t063246427._4
264+ let inv = invoke(addr, call, params, payments)
265+ if ((inv == inv))
266+ then nil
267+ else throw("Strict value is not equal to itself.")
268+ }))
269+
270+
271+
272+@Callable(i)
273+func claimNetrinoRewards () = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), {
274+ let inv = invoke(stakingUSDNAddress, "claimRewards", nil, nil)
275+ if ((inv == inv))
276+ then $Tuple2(nil, inv)
277+ else throw("Strict value is not equal to itself.")
278+ }))
254279
255280
256281
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kActive = "active"
5+
6+let kActiveGlob = "active_all_contracts"
57
68 let kCause = "shutdown_cause"
79
810 let kUSDNAddress = "staking_usdnnsbt_address"
911
1012 let kEURNAddress = "staking_eurn_address"
1113
1214 let kLeasingPool = "leasing_address"
1315
1416 let kLeasingAmount = "leasing_amount"
1517
1618 let kLeasingId = "leasing_id"
1719
1820 let kAdminPubKey1 = "admin_pub_1"
1921
2022 let kAdminPubKey2 = "admin_pub_2"
2123
2224 let kAdminPubKey3 = "admin_pub_3"
2325
2426 let kAdminInvokePubKey = "admin_invoke_pub"
2527
2628 let kCpmmContract = "cpmm_contract"
2729
2830 let kUSDNAssetId = "usdn_asset_id"
2931
3032 let kEURNAssetId = "eurn_asset_id"
3133
3234 let kStakingAssets = "staking_assets"
3335
3436 let kShareAssetId = "share_asset_id"
3537
3638 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
3739
3840 func getBase58FromOracle (key) = match getString(oracle, key) {
3941 case string: String =>
4042 fromBase58String(string)
4143 case nothing =>
4244 throw((key + "is empty"))
4345 }
4446
4547
4648 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
4749
4850 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
4951
5052 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
5153
5254 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
5355
5456 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
5557
5658 let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress))
5759
5860 let cpmmContract = Address(getBase58FromOracle(kCpmmContract))
5961
6062 let USDN = getBase58FromOracle(kUSDNAssetId)
6163
6264 let EURN = getBase58FromOracle(kEURNAssetId)
6365
6466 let stakingAssets = getStringValue(oracle, kStakingAssets)
6567
68+let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
69+
6670 let active = valueOrElse(getBoolean(this, kActive), true)
6771
68-func isActive () = if (active)
72+func isActive () = if (if (active)
73+ then activeGlob
74+ else false)
6975 then unit
7076 else throw("DApp is inactive at this moment")
7177
7278
7379 func isGlobalCaller (caller) = if ((caller == cpmmContract))
7480 then unit
7581 else throw("Only global Contract can invoke this function")
7682
7783
7884 func isAdminCall (callerPubKey) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], callerPubKey))
7985 then unit
8086 else throw("Only admin can call this function")
8187
8288
8389 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
8490
8591
8692 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
8793 then if ((assetId == USDN))
8894 then $Tuple2("lockNeutrino", stakingUSDNAddress)
8995 else $Tuple2("startStaking", stakingEURNAddress)
9096 else if ((assetId == USDN))
9197 then $Tuple2("unlockNeutrino", stakingUSDNAddress)
9298 else $Tuple2("stopStaking", stakingEURNAddress)
9399
94100
95101 func calcStakingParams (stake,amount,assetId) = if (stake)
96102 then {
97- let $t024732539 = calcStakingFuncAndAddres(stake, assetId)
98- let call = $t024732539._1
99- let stakingAddr = $t024732539._2
103+ let $t025932659 = calcStakingFuncAndAddres(stake, assetId)
104+ let call = $t025932659._1
105+ let stakingAddr = $t025932659._2
100106 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
101107 }
102108 else {
103- let $t026252691 = calcStakingFuncAndAddres(stake, assetId)
104- let call = $t026252691._1
105- let stakingAddr = $t026252691._2
109+ let $t027452811 = calcStakingFuncAndAddres(stake, assetId)
110+ let call = $t027452811._1
111+ let stakingAddr = $t027452811._2
106112 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
107113 }
108114
109115
110116 func collectPayments (acc,payment) = {
111- let $t028532896 = acc
112- let paymentAmounts = $t028532896._1
113- let paymentAssetIds = $t028532896._2
117+ let $t029733016 = acc
118+ let paymentAmounts = $t029733016._1
119+ let paymentAssetIds = $t029733016._2
114120 $Tuple2((paymentAmounts :+ payment.amount), (paymentAssetIds :+ (if ((payment.assetId == unit))
115121 then base58''
116122 else payment.assetId)))
117123 }
118124
119125
120126 func collectState (result,source) = match source {
121127 case e: Issue|Burn|Reissue|ScriptTransfer|BinaryEntry|BooleanEntry|StringEntry|IntegerEntry =>
122128 (result :+ e)
123129 case _ =>
124130 result
125131 }
126132
127133
128134 func collectData (result,source) = match source {
129135 case v: String =>
130136 (result :+ v)
131137 case v: Int =>
132138 (result :+ v)
133139 case v: Boolean =>
134140 (result :+ v)
135141 case v: ByteVector =>
136142 (result :+ v)
143+ case v: Unit =>
144+ (result :+ v)
137145 case _ =>
138146 throw()
139147 }
140148
141149
142150 func callCommon (funcName,caller,args,payments) = valueOrElse(isActive(), {
143- let $t037773861 = {
151+ let $t039364020 = {
144152 let $l = payments
145153 let $s = size($l)
146154 let $acc0 = $Tuple2(nil, nil)
147155 func $f0_1 ($a,$i) = if (($i >= $s))
148156 then $a
149157 else collectPayments($a, $l[$i])
150158
151159 func $f0_2 ($a,$i) = if (($i >= $s))
152160 then $a
153161 else throw("List size exceeds 10")
154162
155163 $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)
156164 }
157- let paymentAmounts = $t037773861._1
158- let paymentAssetIds = $t037773861._2
159- let $t038664014 = {
160- let @ = reentrantInvoke(cpmmContract, funcName, [caller, args, paymentAmounts, paymentAssetIds], nil)
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)
161178 if ($isInstanceOf(@, "(List[Any], List[Any])"))
162179 then @
163180 else throw(($getType(@) + " couldn't be cast to (List[Any], List[Any])"))
164181 }
165- if (($t038664014 == $t038664014))
182+ if (($t042494406 == $t042494406))
166183 then {
167- let data = $t038664014._2
168- let actions = $t038664014._1
184+ let data = $t042494406._2
185+ let actions = $t042494406._1
169186 let mappedData = {
170187 let $l = data
171188 let $s = size($l)
172189 let $acc0 = nil
173190 func $f1_1 ($a,$i) = if (($i >= $s))
174191 then $a
175192 else collectData($a, $l[$i])
176193
177194 func $f1_2 ($a,$i) = if (($i >= $s))
178195 then $a
179196 else throw("List size exceeds 10")
180197
181198 $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)
182199 }
183200 let mappedActions = {
184201 let $l = actions
185202 let $s = size($l)
186203 let $acc0 = nil
187204 func $f2_1 ($a,$i) = if (($i >= $s))
188205 then $a
189206 else collectState($a, $l[$i])
190207
191208 func $f2_2 ($a,$i) = if (($i >= $s))
192209 then $a
193210 else throw("List size exceeds 15")
194211
195212 $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)
196213 }
197214 $Tuple2(mappedActions, mappedData)
198215 }
199216 else throw("Strict value is not equal to itself.")
200217 })
201218
202219
203220 @Callable(i)
204221 func callFunction (funcName,args) = callCommon(funcName, i.caller.bytes, args, i.payments)
205222
206223
207224
208225 @Callable(i)
209226 func shutdown () = valueOrElse(isAdminCall(i.callerPublicKey), if (!(active))
210227 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
211228 else suspend("Paused by admin"))
212229
213230
214231
215232 @Callable(i)
216233 func activate () = valueOrElse(isAdminCall(i.callerPublicKey), if (active)
217234 then throw("DApp is already active")
218235 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
219236
220237
221238
222239 @Callable(i)
223-func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isActive(), if ((i.caller != cpmmContract))
224- then throw("Only global Contract can invoke this function")
225- else if ((assetIdString == "WAVES"))
226- then {
227- let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
228- let leasingId = getBinary(this, kLeasingId)
229- let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
230- let newLeaseAmount = if (stake)
231- then (leasingAmount + amount)
232- else (leasingAmount - amount)
233- let newLease = Lease(pool, newLeaseAmount)
234- let newLeaseId = calculateLeaseId(newLease)
235- let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
236- match leasingId {
237- case lId: ByteVector =>
238- ([LeaseCancel(lId)] ++ baseEtry)
239- case _ =>
240- baseEtry
241- }
242- }
243- else {
244- let $t060106113 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
245- let call = $t060106113._1
246- let addr = $t060106113._2
247- let params = $t060106113._3
248- let payments = $t060106113._4
249- let inv = invoke(addr, call, params, payments)
250- if ((inv == inv))
251- then nil
252- else throw("Strict value is not equal to itself.")
253- })
240+func stakeUnstake (stake,amount,assetIdString) = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), if ((assetIdString == "WAVES"))
241+ then {
242+ let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
243+ let leasingId = getBinary(this, kLeasingId)
244+ let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
245+ let newLeaseAmount = if (stake)
246+ then (leasingAmount + amount)
247+ else (leasingAmount - amount)
248+ let newLease = Lease(pool, newLeaseAmount)
249+ let newLeaseId = calculateLeaseId(newLease)
250+ let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
251+ match leasingId {
252+ case lId: ByteVector =>
253+ ([LeaseCancel(lId)] ++ baseEtry)
254+ case _ =>
255+ baseEtry
256+ }
257+ }
258+ else {
259+ let $t063246427 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
260+ let call = $t063246427._1
261+ let addr = $t063246427._2
262+ let params = $t063246427._3
263+ let payments = $t063246427._4
264+ let inv = invoke(addr, call, params, payments)
265+ if ((inv == inv))
266+ then nil
267+ else throw("Strict value is not equal to itself.")
268+ }))
269+
270+
271+
272+@Callable(i)
273+func claimNetrinoRewards () = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), {
274+ let inv = invoke(stakingUSDNAddress, "claimRewards", nil, nil)
275+ if ((inv == inv))
276+ then $Tuple2(nil, inv)
277+ else throw("Strict value is not equal to itself.")
278+ }))
254279
255280
256281
257282 @Callable(i)
258283 func reissueShareToken (amount) = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), {
259284 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
260285 [Reissue(shareAssetId, amount, true), ScriptTransfer(i.caller, amount, shareAssetId)]
261286 }))
262287
263288
264289
265290 @Callable(i)
266291 func replenishWithTwoTokens (slippageTolerance) = callCommon("replenishWithTwoTokens", i.caller.bytes, ["false", "0"], i.payments)
267292
268293
269294
270295 @Callable(i)
271296 func withdraw () = callCommon("withdraw", i.caller.bytes, ["0"], i.payments)
272297
273298
274299
275300 @Callable(i)
276301 func exchange (minAmountToReceive) = callCommon("exchange", i.caller.bytes, [toString(minAmountToReceive)], i.payments)
277302
278303
279304 @Verifier(tx)
280305 func verify () = {
281306 let multiSignedByAdmins = {
282307 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
283308 then 1
284309 else 0
285310 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
286311 then 1
287312 else 0
288313 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
289314 then 1
290315 else 0
291316 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
292317 }
293318 multiSignedByAdmins
294319 }
295320

github/deemru/w8io/169f3d6 
39.58 ms