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