tx · C4XZSBFndDbybXHs9EzPDfkXAvhrG7sWnKHANTw58CxQ 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9: -0.01000000 Waves 2023.10.06 11:29 [2786525] smart account 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9 > SELF 0.00000000 Waves
{ "type": 13, "id": "C4XZSBFndDbybXHs9EzPDfkXAvhrG7sWnKHANTw58CxQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1696580947698, "version": 2, "chainId": 84, "sender": "3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9", "senderPublicKey": "4AVkL2DQJ8sngCNyArYueNuPS7cvygnakPJhU65LfPfu", "proofs": [ "2c785faqZZewAuGyxnkNh7UQkcXo8ZGTKuTcMfm32AJk6uD1TP119wsAEDoVv2RKSiz7BCePBAsTJL7e51tdHYt3", "3ozynsi9iySg3cFMTFiqHWB2A9YQEPv1e1QnHKtNe9DpQEaPMwdBkVYDFZZMVYM2N8VPmytE3vQVRNgou4PnK3r1" ], "script": "base64:BgIMCAISAwoBGBIDCgEYEQAOQVhMWV9NQUlOX0FERFIJAQdBZGRyZXNzAQEaAVRHYdFKTc5/+9vupfS91sItmkjqQtK5YZsAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAKa1NoYXJlUG9vbAIMX3Bvb2xTaGFyZUlkAAVrUG9vbAIFcG9vbF8ACWtBZG1pbjFQSwIVZ3JvdXAxX2FkbWluMV9wdWJfa2V5AAlrQWRtaW4yUEsCFWdyb3VwMV9hZG1pbjJfcHViX2tleQAJa0FkbWluM1BLAhVncm91cDFfYWRtaW4zX3B1Yl9rZXkAD2tPcGVyYXRvckNhbGxQSwISYWRtaW5fY2FsbF9wdWJfa2V5AAhhZG1pbjFQSwkA2QQBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUOQVhMWV9NQUlOX0FERFIFCWtBZG1pbjFQSwISQ2FuJ3QgZ2V0IGFkbWluMVBLAAhhZG1pbjJQSw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QSwABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCGFkbWluMlBLAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAKnrvk9", "height": 2786525, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KcDP7dECm24742GLrcxsJrfdci3sMYsEYeBj6PpJPpj Next: AEWQDPGy8gZPtmCjHCTbEmw7MYrNENUFpeUekH5LXinY Diff:
Old | New | Differences | |
---|---|---|---|
83 | 83 | M(L(L(L(F, 0), 1), 2), 3) | |
84 | 84 | } | |
85 | 85 | let N = split(z[4], ",") | |
86 | - | let w = parseIntValue(z[ | |
86 | + | let w = parseIntValue(z[5]) | |
87 | 87 | [A, B, C, K, N, w] | |
88 | 88 | } | |
89 | 89 | invoke(t, "routingTrade", y, u) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS') | |
5 | 5 | ||
6 | 6 | let b = "SF" | |
7 | 7 | ||
8 | 8 | let c = "WX" | |
9 | 9 | ||
10 | 10 | let d = "_poolShareId" | |
11 | 11 | ||
12 | 12 | let e = "pool_" | |
13 | 13 | ||
14 | 14 | let f = "group1_admin1_pub_key" | |
15 | 15 | ||
16 | 16 | let g = "group1_admin2_pub_key" | |
17 | 17 | ||
18 | 18 | let h = "group1_admin3_pub_key" | |
19 | 19 | ||
20 | 20 | let i = "admin_call_pub_key" | |
21 | 21 | ||
22 | 22 | let j = fromBase58String(valueOrErrorMessage(getString(a, f), "Can't get admin1PK")) | |
23 | 23 | ||
24 | 24 | let k = fromBase58String(valueOrErrorMessage(getString(a, g), "Can't get admin2PK")) | |
25 | 25 | ||
26 | 26 | let l = fromBase58String(valueOrErrorMessage(getString(a, h), "Can't get admin3PK")) | |
27 | 27 | ||
28 | 28 | let m = fromBase58String(valueOrErrorMessage(getString(a, i), "Can't get operatorPK")) | |
29 | 29 | ||
30 | 30 | func n () = throw("Wrong pool type") | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func o (p,q) = (p :+ parseIntValue(q)) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func r (s) = { | |
37 | 37 | let t = addressFromStringValue(s[1]) | |
38 | 38 | let u = { | |
39 | 39 | let v = split(s[2], "|") | |
40 | 40 | [AttachedPayment(fromBase58String(v[0]), parseIntValue(v[1]))] | |
41 | 41 | } | |
42 | 42 | let w = s[3] | |
43 | 43 | invoke(t, "callFunction", ["exchange", [w]], u) | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func x (s) = { | |
48 | 48 | let t = addressFromStringValue(s[1]) | |
49 | 49 | let u = { | |
50 | 50 | let v = split(s[2], "|") | |
51 | 51 | [AttachedPayment(fromBase58String(v[0]), parseIntValue(v[1]))] | |
52 | 52 | } | |
53 | 53 | let y = { | |
54 | 54 | let z = split(s[3], "|") | |
55 | 55 | let A = split(z[0], ",") | |
56 | 56 | let B = split(z[1], ",") | |
57 | 57 | let C = { | |
58 | 58 | let D = split(z[2], ",") | |
59 | 59 | let E = size(D) | |
60 | 60 | let F = nil | |
61 | 61 | func G (H,I) = if ((I >= E)) | |
62 | 62 | then H | |
63 | 63 | else o(H, D[I]) | |
64 | 64 | ||
65 | 65 | func J (H,I) = if ((I >= E)) | |
66 | 66 | then H | |
67 | 67 | else throw("List size exceeds 3") | |
68 | 68 | ||
69 | 69 | J(G(G(G(F, 0), 1), 2), 3) | |
70 | 70 | } | |
71 | 71 | let K = { | |
72 | 72 | let D = split(z[3], ",") | |
73 | 73 | let E = size(D) | |
74 | 74 | let F = nil | |
75 | 75 | func L (H,I) = if ((I >= E)) | |
76 | 76 | then H | |
77 | 77 | else o(H, D[I]) | |
78 | 78 | ||
79 | 79 | func M (H,I) = if ((I >= E)) | |
80 | 80 | then H | |
81 | 81 | else throw("List size exceeds 3") | |
82 | 82 | ||
83 | 83 | M(L(L(L(F, 0), 1), 2), 3) | |
84 | 84 | } | |
85 | 85 | let N = split(z[4], ",") | |
86 | - | let w = parseIntValue(z[ | |
86 | + | let w = parseIntValue(z[5]) | |
87 | 87 | [A, B, C, K, N, w] | |
88 | 88 | } | |
89 | 89 | invoke(t, "routingTrade", y, u) | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(O) | |
94 | 94 | func exchangeLps (P) = { | |
95 | 95 | func Q (p,R) = { | |
96 | 96 | let S = fromBase58String(R) | |
97 | 97 | let T = assetBalance(this, S) | |
98 | 98 | let U = valueOrErrorMessage(getString(a, (R + d)), ("Can't get pool of lp:" + R)) | |
99 | 99 | let V = valueOrErrorMessage(getString(a, (e + U)), "Pool is not inited") | |
100 | 100 | let W = valueOrErrorMessage(addressFromString(U), "unknown addr") | |
101 | 101 | if ((T > 0)) | |
102 | 102 | then { | |
103 | 103 | let X = if ((V == b)) | |
104 | 104 | then invoke(W, "callFunction", ["withdraw", ["0"]], [AttachedPayment(S, T)]) | |
105 | 105 | else if ((V == c)) | |
106 | 106 | then invoke(W, "get", nil, [AttachedPayment(S, T)]) | |
107 | 107 | else n() | |
108 | 108 | if ((X == X)) | |
109 | 109 | then (p :+ true) | |
110 | 110 | else throw("Strict value is not equal to itself.") | |
111 | 111 | } | |
112 | 112 | else (p :+ false) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | let Y = { | |
116 | 116 | let D = P | |
117 | 117 | let E = size(D) | |
118 | 118 | let F = nil | |
119 | 119 | func G (H,I) = if ((I >= E)) | |
120 | 120 | then H | |
121 | 121 | else Q(H, D[I]) | |
122 | 122 | ||
123 | 123 | func J (H,I) = if ((I >= E)) | |
124 | 124 | then H | |
125 | 125 | else throw("List size exceeds 50") | |
126 | 126 | ||
127 | 127 | J(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(F, 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) | |
128 | 128 | } | |
129 | 129 | $Tuple2(nil, Y) | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | ||
134 | 134 | @Callable(O) | |
135 | 135 | func exchangeTokens (Z) = { | |
136 | 136 | func aa (ab,ac) = { | |
137 | 137 | let s = split(ac, "__") | |
138 | 138 | if ((s[0] == "directSwopfiCPMM")) | |
139 | 139 | then { | |
140 | 140 | let X = r(s) | |
141 | 141 | if ((X == X)) | |
142 | 142 | then (ab :+ X) | |
143 | 143 | else throw("Strict value is not equal to itself.") | |
144 | 144 | } | |
145 | 145 | else if ((s[0] == "routingSwopfi")) | |
146 | 146 | then { | |
147 | 147 | let X = x(s) | |
148 | 148 | if ((X == X)) | |
149 | 149 | then (ab :+ X) | |
150 | 150 | else throw("Strict value is not equal to itself.") | |
151 | 151 | } | |
152 | 152 | else throw("Unknown route type") | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | let Y = { | |
156 | 156 | let D = Z | |
157 | 157 | let E = size(D) | |
158 | 158 | let F = nil | |
159 | 159 | func G (H,I) = if ((I >= E)) | |
160 | 160 | then H | |
161 | 161 | else aa(H, D[I]) | |
162 | 162 | ||
163 | 163 | func J (H,I) = if ((I >= E)) | |
164 | 164 | then H | |
165 | 165 | else throw("List size exceeds 30") | |
166 | 166 | ||
167 | 167 | J(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(F, 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) | |
168 | 168 | } | |
169 | 169 | if ((Y == Y)) | |
170 | 170 | then nil | |
171 | 171 | else throw("Strict value is not equal to itself.") | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | @Verifier(ad) | |
176 | 176 | func ae () = { | |
177 | 177 | let af = ad | |
178 | 178 | if ($isInstanceOf(af, "InvokeScriptTransaction")) | |
179 | 179 | then { | |
180 | 180 | let X = af | |
181 | 181 | let ag = if ((X.fee == 900000)) | |
182 | 182 | then (X.feeAssetId == unit) | |
183 | 183 | else false | |
184 | 184 | let ah = (X.function == "exchangeLps") | |
185 | 185 | let ai = (X.function == "exchangeTokens") | |
186 | 186 | let aj = if (sigVerify(ad.bodyBytes, ad.proofs[0], j)) | |
187 | 187 | then 1 | |
188 | 188 | else 0 | |
189 | 189 | let ak = if (sigVerify(ad.bodyBytes, ad.proofs[0], k)) | |
190 | 190 | then 1 | |
191 | 191 | else 0 | |
192 | 192 | let al = if (sigVerify(ad.bodyBytes, ad.proofs[0], l)) | |
193 | 193 | then 1 | |
194 | 194 | else 0 | |
195 | 195 | let am = if (sigVerify(ad.bodyBytes, ad.proofs[0], m)) | |
196 | 196 | then 1 | |
197 | 197 | else 0 | |
198 | 198 | let an = ((((aj + ak) + al) + am) >= 1) | |
199 | 199 | if (if (ag) | |
200 | 200 | then if (ah) | |
201 | 201 | then true | |
202 | 202 | else ai | |
203 | 203 | else false) | |
204 | 204 | then an | |
205 | 205 | else false | |
206 | 206 | } | |
207 | 207 | else { | |
208 | 208 | let aj = if (sigVerify(ad.bodyBytes, ad.proofs[0], j)) | |
209 | 209 | then 1 | |
210 | 210 | else 0 | |
211 | 211 | let ak = if (sigVerify(ad.bodyBytes, ad.proofs[1], k)) | |
212 | 212 | then 1 | |
213 | 213 | else 0 | |
214 | 214 | let al = if (sigVerify(ad.bodyBytes, ad.proofs[2], l)) | |
215 | 215 | then 1 | |
216 | 216 | else 0 | |
217 | 217 | (((aj + ak) + al) >= 2) | |
218 | 218 | } | |
219 | 219 | } | |
220 | 220 |
github/deemru/w8io/026f985 40.88 ms ◑