tx · HsiKpMmvk6CyZ3nZqTjSQUqxUNUbhcBS8YadFpE1Mxyg 3NAT7BF2asd6erL44NwzhXU12zGHN8aGmT9: -0.01000000 Waves 2023.02.27 18:04 [2468266] smart account 3NAT7BF2asd6erL44NwzhXU12zGHN8aGmT9 > SELF 0.00000000 Waves
{ "type": 13, "id": "HsiKpMmvk6CyZ3nZqTjSQUqxUNUbhcBS8YadFpE1Mxyg", "fee": 1000000, "feeAssetId": null, "timestamp": 1677510319063, "version": 2, "chainId": 84, "sender": "3NAT7BF2asd6erL44NwzhXU12zGHN8aGmT9", "senderPublicKey": "2kq1LCvVtB3kRvk7LYxSSvRNSXzF94gFvcnVwRiKsDdM", "proofs": [ "3R6747M72n9zbgZx3u7bUNdd5a8VzdYWafxqm72NAMrg9sda5E4JzMt8Biv3y3sJKk39eXcvrSCxorpyfMxBxPyn" ], "script": "base64:BgImCAISBAoCCBgSABIAEgUKAwQBCBIAEgMKAQESAwoBARIAEgMKAQEpAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAMa1VTRE5BZGRyZXNzAhhzdGFraW5nX3VzZG5uc2J0X2FkZHJlc3MADGtFVVJOQWRkcmVzcwIUc3Rha2luZ19ldXJuX2FkZHJlc3MADGtMZWFzaW5nUG9vbAIPbGVhc2luZ19hZGRyZXNzAA5rTGVhc2luZ0Ftb3VudAIObGVhc2luZ19hbW91bnQACmtMZWFzaW5nSWQCCmxlYXNpbmdfaWQADWtBZG1pblB1YktleTECC2FkbWluX3B1Yl8xAA1rQWRtaW5QdWJLZXkyAgthZG1pbl9wdWJfMgANa0FkbWluUHViS2V5MwILYWRtaW5fcHViXzMAEmtBZG1pbkludm9rZVB1YktleQIQYWRtaW5faW52b2tlX3B1YgANa0NwbW1Db250cmFjdAINY3BtbV9jb250cmFjdAAMa1VTRE5Bc3NldElkAg11c2RuX2Fzc2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RtaW5QdWJLZXkzU2lnbmVkAAIFE211bHRpU2lnbmVkQnlBZG1pbnOCFYaH", "height": 2468266, "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 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(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 | + | })) | |
279 | + | ||
280 | + | ||
281 | + | ||
282 | + | @Callable(i) | |
283 | + | func reissueShareToken (amount) = valueOrElse(isGlobalCaller(i.caller), valueOrElse(isActive(), { | |
284 | + | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
285 | + | [Reissue(shareAssetId, amount, true), ScriptTransfer(i.caller, amount, shareAssetId)] | |
286 | + | })) | |
287 | + | ||
288 | + | ||
289 | + | ||
290 | + | @Callable(i) | |
291 | + | func replenishWithTwoTokens (slippageTolerance) = callCommon("replenishWithTwoTokens", i.caller.bytes, ["false", "0"], i.payments) | |
292 | + | ||
293 | + | ||
294 | + | ||
295 | + | @Callable(i) | |
296 | + | func withdraw () = callCommon("withdraw", i.caller.bytes, ["0"], i.payments) | |
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | @Callable(i) | |
301 | + | func exchange (minAmountToReceive) = callCommon("exchange", i.caller.bytes, [toString(minAmountToReceive)], i.payments) | |
302 | + | ||
303 | + | ||
304 | + | @Verifier(tx) | |
305 | + | func verify () = { | |
306 | + | let multiSignedByAdmins = { | |
307 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
308 | + | then 1 | |
309 | + | else 0 | |
310 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
311 | + | then 1 | |
312 | + | else 0 | |
313 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
314 | + | then 1 | |
315 | + | else 0 | |
316 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
317 | + | } | |
318 | + | multiSignedByAdmins | |
319 | + | } | |
320 | + |
github/deemru/w8io/026f985 21.92 ms ◑