tx · 8gFnpGLG8kyBB79WmacHiX6EWmBBh3aAFHFvVCrShpLB 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9: -0.01100000 Waves 2023.10.06 11:58 [2786553] smart account 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9 > SELF 0.00000000 Waves
{ "type": 13, "id": "8gFnpGLG8kyBB79WmacHiX6EWmBBh3aAFHFvVCrShpLB", "fee": 1100000, "feeAssetId": null, "timestamp": 1696582730622, "version": 2, "chainId": 84, "sender": "3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9", "senderPublicKey": "4AVkL2DQJ8sngCNyArYueNuPS7cvygnakPJhU65LfPfu", "proofs": [ "5ugFQgM5BbC3JC35wag7V4qR2BZNjCQSQ1MiHnzkGrpph9Da4ZgfxF9NUtWfqijVsm1Z5zNRU2g5Kb4N2xEh9cLr", "3Bv6qh8hDxB4ytG8Xr2ujfE2gRf4KJg4aaYj6YxM4YgHPDX1wFf2BZNHB2imychYzkd13vgn9gbxwzzgiLDCF3Gx" ], "script": "base64:BgIOCAISAwoBGBIDCgEYEgAcAA5BWExZX01BSU5fQUREUgkBB0FkZHJlc3MBARoBVEdh0UpNzn/72+6l9L3Wwi2aSOpC0rlhmwAMQVhMWV9GQVJNSU5HCQEHQWRkcmVzcwEBGgFUiFrCGKZVQmFa0TmuSd5FGDc6uNWQtIjpAA5BWExZX1RPS0VOT01JQwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFDEFYTFlfRkFSTUlORwIRdG9rZW5vbWljQ29udHJhY3QCGENhbid0IGdldCB0b2tlbm9taWMgYWRkcgANQVhMWV9URUFNX0JPWAkBB0FkZHJlc3MBARoBVOklXEf1z5bkgzXbUQsFjOvwGd12KKCp+gAMQVhMWV9TVEFLSU5HCQEHQWRkcmVzcwEBGgFUoahv7LNLfrTJXgHTjP0PfUhduUwxjCRLAAdTRl9QT09MAgJTRgAHV1h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AwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCGFkbWluMVBLAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUIYWRtaW4yUEsAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQhhZG1pbjNQSwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAs7MAUc=", "height": 2786553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EmgAvuhRknuiKRvjrYgSmCVBFbk8Uju4iHUtrqH1EKUL Next: ALZKUyddDKRobCPxTP4i9YR6x5H38DarJhEm6UNJnXrA Diff:
Old | New | Differences | |
---|---|---|---|
209 | 209 | else if ((0 >= toStaking)) | |
210 | 210 | then throw("No tokens to airdrop") | |
211 | 211 | else { | |
212 | - | let inv = invoke(axlyPool, "callFunction", ["exchange", [" | |
212 | + | let inv = invoke(axlyPool, "callFunction", ["exchange", ["1"]], [AttachedPayment(unit, toStaking)]) | |
213 | 213 | if ((inv == inv)) | |
214 | 214 | then { | |
215 | 215 | let axlyBalance = assetBalance(this, axlyId) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let AXLY_MAIN_ADDR = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS') | |
5 | 5 | ||
6 | 6 | let AXLY_FARMING = Address(base58'3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn') | |
7 | 7 | ||
8 | 8 | let AXLY_TOKENOMIC = addressFromStringValue(valueOrErrorMessage(getString(AXLY_FARMING, "tokenomicContract"), "Can't get tokenomic addr")) | |
9 | 9 | ||
10 | 10 | let AXLY_TEAM_BOX = Address(base58'3NBAqyU7HpCjXtX7ymiEGiUkrw7qe9bSdxm') | |
11 | 11 | ||
12 | 12 | let AXLY_STAKING = Address(base58'3N4erM2YbPHzpzNT31KQbgHxQoRdiJdFFTY') | |
13 | 13 | ||
14 | 14 | let SF_POOL = "SF" | |
15 | 15 | ||
16 | 16 | let WX_POOL = "WX" | |
17 | 17 | ||
18 | 18 | let AMOUNT_WAVES_FOR_FEE = 100000000 | |
19 | 19 | ||
20 | 20 | let PERCENT_TO_TEAM = 50 | |
21 | 21 | ||
22 | 22 | let kAxlyPool = "axlyPool" | |
23 | 23 | ||
24 | 24 | let kAXLYTokenId = "axlyTokenId" | |
25 | 25 | ||
26 | 26 | let kSharePool = "_poolShareId" | |
27 | 27 | ||
28 | 28 | let kPool = "pool_" | |
29 | 29 | ||
30 | 30 | let kAdmin1PK = "group1_admin1_pub_key" | |
31 | 31 | ||
32 | 32 | let kAdmin2PK = "group1_admin2_pub_key" | |
33 | 33 | ||
34 | 34 | let kAdmin3PK = "group1_admin3_pub_key" | |
35 | 35 | ||
36 | 36 | let kOperatorCallPK = "admin_call_pub_key" | |
37 | 37 | ||
38 | 38 | let admin1PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin1PK), "Can't get admin1PK")) | |
39 | 39 | ||
40 | 40 | let admin2PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin2PK), "Can't get admin2PK")) | |
41 | 41 | ||
42 | 42 | let admin3PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin3PK), "Can't get admin3PK")) | |
43 | 43 | ||
44 | 44 | let operatorPK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kOperatorCallPK), "Can't get operatorPK")) | |
45 | 45 | ||
46 | 46 | let axlyId = fromBase58String(valueOrErrorMessage(getString(AXLY_TOKENOMIC, kAXLYTokenId), "Can't get axly token id")) | |
47 | 47 | ||
48 | 48 | let axlyPool = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(AXLY_FARMING, kAxlyPool), "Can't get axlyPool key")), "Can't get axly pool") | |
49 | 49 | ||
50 | 50 | func unknownPoolType () = throw("Wrong pool type") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func isSelfCall (i) = if ((i.caller == this)) | |
54 | 54 | then unit | |
55 | 55 | else throw("Only contract itself can call this function") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func listToInt (a,item) = (a :+ parseIntValue(item)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func directSwopfiCPMM (rArgs) = { | |
62 | 62 | let dApp = addressFromStringValue(rArgs[1]) | |
63 | 63 | let pmt = { | |
64 | 64 | let pmtP = split(rArgs[2], "|") | |
65 | 65 | [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))] | |
66 | 66 | } | |
67 | 67 | let minToRecive = rArgs[3] | |
68 | 68 | invoke(dApp, "callFunction", ["exchange", [minToRecive]], pmt) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func directRoutingSwopfi (rArgs) = { | |
73 | 73 | let dApp = addressFromStringValue(rArgs[1]) | |
74 | 74 | let pmt = { | |
75 | 75 | let pmtP = split(rArgs[2], "|") | |
76 | 76 | [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))] | |
77 | 77 | } | |
78 | 78 | let args = { | |
79 | 79 | let eArgs = split(rArgs[3], "|") | |
80 | 80 | let exchangers = split(eArgs[0], ",") | |
81 | 81 | let exchangersType = split(eArgs[1], ",") | |
82 | 82 | let args1 = { | |
83 | 83 | let $l = split(eArgs[2], ",") | |
84 | 84 | let $s = size($l) | |
85 | 85 | let $acc0 = nil | |
86 | 86 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
87 | 87 | then $a | |
88 | 88 | else listToInt($a, $l[$i]) | |
89 | 89 | ||
90 | 90 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
91 | 91 | then $a | |
92 | 92 | else throw("List size exceeds 3") | |
93 | 93 | ||
94 | 94 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
95 | 95 | } | |
96 | 96 | let args2 = { | |
97 | 97 | let $l = split(eArgs[3], ",") | |
98 | 98 | let $s = size($l) | |
99 | 99 | let $acc0 = nil | |
100 | 100 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
101 | 101 | then $a | |
102 | 102 | else listToInt($a, $l[$i]) | |
103 | 103 | ||
104 | 104 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
105 | 105 | then $a | |
106 | 106 | else throw("List size exceeds 3") | |
107 | 107 | ||
108 | 108 | $f1_2($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3) | |
109 | 109 | } | |
110 | 110 | let routingAssetsKeys = split(eArgs[4], ",") | |
111 | 111 | let minToRecive = parseIntValue(eArgs[5]) | |
112 | 112 | [exchangers, exchangersType, args1, args2, routingAssetsKeys, minToRecive] | |
113 | 113 | } | |
114 | 114 | invoke(dApp, "routingTrade", args, pmt) | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | @Callable(i) | |
119 | 119 | func exchangeLps (lps) = valueOrElse(isSelfCall(i), { | |
120 | 120 | func exLP (a,lp) = { | |
121 | 121 | let lpB = fromBase58String(lp) | |
122 | 122 | let balance = assetBalance(this, lpB) | |
123 | 123 | let pool = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (lp + kSharePool)), ("Can't get pool of lp:" + lp)) | |
124 | 124 | let pType = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (kPool + pool)), "Pool is not inited") | |
125 | 125 | let poolAddr = valueOrErrorMessage(addressFromString(pool), "unknown addr") | |
126 | 126 | if ((balance > 0)) | |
127 | 127 | then { | |
128 | 128 | let inv = if ((pType == SF_POOL)) | |
129 | 129 | then invoke(poolAddr, "callFunction", ["withdraw", ["0"]], [AttachedPayment(lpB, balance)]) | |
130 | 130 | else if ((pType == WX_POOL)) | |
131 | 131 | then invoke(poolAddr, "get", nil, [AttachedPayment(lpB, balance)]) | |
132 | 132 | else unknownPoolType() | |
133 | 133 | if ((inv == inv)) | |
134 | 134 | then (a :+ true) | |
135 | 135 | else throw("Strict value is not equal to itself.") | |
136 | 136 | } | |
137 | 137 | else (a :+ false) | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | let res = { | |
141 | 141 | let $l = lps | |
142 | 142 | let $s = size($l) | |
143 | 143 | let $acc0 = nil | |
144 | 144 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
145 | 145 | then $a | |
146 | 146 | else exLP($a, $l[$i]) | |
147 | 147 | ||
148 | 148 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
149 | 149 | then $a | |
150 | 150 | else throw("List size exceeds 50") | |
151 | 151 | ||
152 | 152 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
153 | 153 | } | |
154 | 154 | $Tuple2(nil, res) | |
155 | 155 | }) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(i) | |
160 | 160 | func exchangeTokens (routes) = valueOrElse(isSelfCall(i), { | |
161 | 161 | func exchangeToken (r,route) = { | |
162 | 162 | let rArgs = split(route, "__") | |
163 | 163 | if ((rArgs[0] == "directSwopfiCPMM")) | |
164 | 164 | then { | |
165 | 165 | let inv = directSwopfiCPMM(rArgs) | |
166 | 166 | if ((inv == inv)) | |
167 | 167 | then (r :+ inv) | |
168 | 168 | else throw("Strict value is not equal to itself.") | |
169 | 169 | } | |
170 | 170 | else if ((rArgs[0] == "routingSwopfi")) | |
171 | 171 | then { | |
172 | 172 | let inv = directRoutingSwopfi(rArgs) | |
173 | 173 | if ((inv == inv)) | |
174 | 174 | then (r :+ inv) | |
175 | 175 | else throw("Strict value is not equal to itself.") | |
176 | 176 | } | |
177 | 177 | else throw("Unknown route type") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | let res = { | |
181 | 181 | let $l = routes | |
182 | 182 | let $s = size($l) | |
183 | 183 | let $acc0 = nil | |
184 | 184 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
185 | 185 | then $a | |
186 | 186 | else exchangeToken($a, $l[$i]) | |
187 | 187 | ||
188 | 188 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
189 | 189 | then $a | |
190 | 190 | else throw("List size exceeds 30") | |
191 | 191 | ||
192 | 192 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
193 | 193 | } | |
194 | 194 | if ((res == res)) | |
195 | 195 | then nil | |
196 | 196 | else throw("Strict value is not equal to itself.") | |
197 | 197 | }) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | ||
201 | 201 | @Callable(i) | |
202 | 202 | func airdropStaking () = valueOrElse(isSelfCall(i), { | |
203 | 203 | let wBalance = wavesBalance(this).available | |
204 | 204 | let bAirdrop = (wBalance - AMOUNT_WAVES_FOR_FEE) | |
205 | 205 | let toTeam = fraction(bAirdrop, PERCENT_TO_TEAM, 100) | |
206 | 206 | let toStaking = (bAirdrop - toTeam) | |
207 | 207 | if ((0 >= bAirdrop)) | |
208 | 208 | then throw("No tokens to airdrop") | |
209 | 209 | else if ((0 >= toStaking)) | |
210 | 210 | then throw("No tokens to airdrop") | |
211 | 211 | else { | |
212 | - | let inv = invoke(axlyPool, "callFunction", ["exchange", [" | |
212 | + | let inv = invoke(axlyPool, "callFunction", ["exchange", ["1"]], [AttachedPayment(unit, toStaking)]) | |
213 | 213 | if ((inv == inv)) | |
214 | 214 | then { | |
215 | 215 | let axlyBalance = assetBalance(this, axlyId) | |
216 | 216 | if ((axlyBalance == axlyBalance)) | |
217 | 217 | then { | |
218 | 218 | let invA = invoke(AXLY_STAKING, "airdrop", nil, [AttachedPayment(axlyId, axlyBalance)]) | |
219 | 219 | if ((invA == invA)) | |
220 | 220 | then [ScriptTransfer(AXLY_TEAM_BOX, toTeam, unit)] | |
221 | 221 | else throw("Strict value is not equal to itself.") | |
222 | 222 | } | |
223 | 223 | else throw("Strict value is not equal to itself.") | |
224 | 224 | } | |
225 | 225 | else throw("Strict value is not equal to itself.") | |
226 | 226 | } | |
227 | 227 | }) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | @Verifier(tx) | |
231 | 231 | func verify () = match tx { | |
232 | 232 | case inv: InvokeScriptTransaction => | |
233 | 233 | let isRightFee = if ((inv.fee == 900000)) | |
234 | 234 | then (inv.feeAssetId == unit) | |
235 | 235 | else false | |
236 | 236 | let isExLpCall = (inv.function == "exchangeLps") | |
237 | 237 | let isExTokensCall = (inv.function == "exchangeTokens") | |
238 | 238 | let isAirdropStaking = (inv.function == "airdropStaking") | |
239 | 239 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK)) | |
240 | 240 | then 1 | |
241 | 241 | else 0 | |
242 | 242 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin2PK)) | |
243 | 243 | then 1 | |
244 | 244 | else 0 | |
245 | 245 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin3PK)) | |
246 | 246 | then 1 | |
247 | 247 | else 0 | |
248 | 248 | let adminPubKeyCallSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], operatorPK)) | |
249 | 249 | then 1 | |
250 | 250 | else 0 | |
251 | 251 | let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyCallSigned) >= 1) | |
252 | 252 | if (if (isRightFee) | |
253 | 253 | then if (if (isExLpCall) | |
254 | 254 | then true | |
255 | 255 | else isExTokensCall) | |
256 | 256 | then true | |
257 | 257 | else isAirdropStaking | |
258 | 258 | else false) | |
259 | 259 | then signedByOneAdmin | |
260 | 260 | else false | |
261 | 261 | case _ => | |
262 | 262 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK)) | |
263 | 263 | then 1 | |
264 | 264 | else 0 | |
265 | 265 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK)) | |
266 | 266 | then 1 | |
267 | 267 | else 0 | |
268 | 268 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK)) | |
269 | 269 | then 1 | |
270 | 270 | else 0 | |
271 | 271 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
272 | 272 | } | |
273 | 273 |
github/deemru/w8io/026f985 32.79 ms ◑