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