tx · 7fwdKZDFUwdE91XzWuwWaoYBDXXNTyU9zxYKDdkRUBhn 3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq: -0.01300000 Waves 2023.02.03 10:10 [2433121] smart account 3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq > SELF 0.00000000 Waves
{ "type": 13, "id": "7fwdKZDFUwdE91XzWuwWaoYBDXXNTyU9zxYKDdkRUBhn", "fee": 1300000, "feeAssetId": null, "timestamp": 1675408301289, "version": 1, "sender": "3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq", "senderPublicKey": "2u2wYYcVBQv43Cc71zkhHPPitkqgg6dqTZ3nUMvYJ1uq", "proofs": [ "4BXt34owmTmgaDDBU2rPdH9tXEPQJPYc9ctcdaMRgUwjznbYtpyZZcFrGpvBkvPnknvAjqskPjcoRK7hx6b8X79y" ], "script": "base64:BgIXCAISBQoDAQgIEgUKAwEICBIDCgEIEgAUAANTRVACAl9fAAhmZWVTY2FsZQkAtgIBAKCNBgEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQR0aGlzBQNrZXkJAKwCAgIVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQNrZXkADHBvb2xEaXNhYmxlZAkAAgECDVBvb2wgZGlzYWJsZWQADHBvb2xOb3RFeGlzdAkAAgECEVBvb2wgaXMgbm90IGV4aXN0AA5zbGlwcGFnZVRvb0JpZwkAAgECE1NsaXBwYWdlIGlzIHRvbyBiaWcBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAmZjAAITJXNfX2ZhY3RvcnlDb250cmFjdAAPZmFjdG9yeUNvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBCQEPZ2V0U3RyaW5nT3JGYWls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ub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQ5jb25maXJtTWFuYWdlcgAEAnBtCQEdcGVuZGluZ01hbmFnZXJQdWJsaWNLZXlPclVuaXQABAVoYXNQTQMJAQlpc0RlZmluZWQBBQJwbQYJAAIBAhJubyBwZW5kaW5nIG1hbmFnZXIDCQAAAgUFaGFzUE0FBWhhc1BNBAdjaGVja1BNAwkAAAIIBQFpD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCcG0GCQACAQIbeW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFB2NoZWNrUE0FB2NoZWNrUE0JAMwIAgkBC1N0cmluZ0VudHJ5AgkBE2tleU1hbmFnZXJQdWJsaWNLZXkACQDYBAEJAQV2YWx1ZQEFAnBtCQDMCAIJAQtEZWxldGVFbnRyeQEJARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleRToe7g=", "chainId": 84, "height": 2433121, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8fyTTicxNy8FUm7EdqywTq3einNg2xS3SFpygPNt2VnA Next: 3g5NcMPY9HAShJa14jcya7jbSGYd2nEV69qgeRrpajxG Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | ||
15 | 15 | let g = throw("Slippage is too big") | |
16 | 16 | ||
17 | - | let h = throw("Test error here") | |
18 | - | ||
19 | - | func i () = "%s__managerPublicKey" | |
17 | + | func h () = "%s__managerPublicKey" | |
20 | 18 | ||
21 | 19 | ||
22 | - | func | |
20 | + | func i () = "%s__pendingManagerPublicKey" | |
23 | 21 | ||
24 | 22 | ||
25 | - | func | |
23 | + | func j () = "%s__factoryContract" | |
26 | 24 | ||
27 | 25 | ||
28 | - | let | |
26 | + | let k = addressFromStringValue(c(j())) | |
29 | 27 | ||
30 | - | func | |
28 | + | func l () = makeString(["%s", "feeLiquidityContractAddress"], a) | |
31 | 29 | ||
32 | 30 | ||
33 | - | func | |
31 | + | func m () = makeString(["%s", "feeLiquidity"], a) | |
34 | 32 | ||
35 | 33 | ||
36 | - | func | |
34 | + | func n () = makeString(["%s", "protocolFee"], a) | |
37 | 35 | ||
38 | 36 | ||
39 | - | func | |
40 | - | let | |
41 | - | if ($isInstanceOf( | |
37 | + | func o (p) = { | |
38 | + | let q = p | |
39 | + | if ($isInstanceOf(q, "Int")) | |
42 | 40 | then { | |
43 | - | let | |
44 | - | | |
41 | + | let r = q | |
42 | + | r | |
45 | 43 | } | |
46 | 44 | else throw("fail to cast into Int") | |
47 | 45 | } | |
48 | 46 | ||
49 | 47 | ||
50 | - | func | |
48 | + | func s (t,u) = makeString(["%d%d", toString(t), toString(u)], a) | |
51 | 49 | ||
52 | 50 | ||
53 | - | func | |
54 | - | let | |
55 | - | if ($isInstanceOf( | |
51 | + | func v () = { | |
52 | + | let q = getString(h()) | |
53 | + | if ($isInstanceOf(q, "String")) | |
56 | 54 | then { | |
57 | - | let | |
58 | - | fromBase58String( | |
55 | + | let w = q | |
56 | + | fromBase58String(w) | |
59 | 57 | } | |
60 | - | else if ($isInstanceOf( | |
58 | + | else if ($isInstanceOf(q, "Unit")) | |
61 | 59 | then unit | |
62 | 60 | else throw("Match error") | |
63 | 61 | } | |
64 | 62 | ||
65 | 63 | ||
66 | - | func | |
67 | - | let | |
68 | - | if ($isInstanceOf( | |
64 | + | func x () = { | |
65 | + | let q = getString(i()) | |
66 | + | if ($isInstanceOf(q, "String")) | |
69 | 67 | then { | |
70 | - | let | |
71 | - | fromBase58String( | |
68 | + | let w = q | |
69 | + | fromBase58String(w) | |
72 | 70 | } | |
73 | - | else if ($isInstanceOf( | |
71 | + | else if ($isInstanceOf(q, "Unit")) | |
74 | 72 | then unit | |
75 | 73 | else throw("Match error") | |
76 | 74 | } | |
77 | 75 | ||
78 | 76 | ||
79 | - | func | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
77 | + | func y (z) = { | |
78 | + | let q = v() | |
79 | + | if ($isInstanceOf(q, "ByteVector")) | |
82 | 80 | then { | |
83 | - | let | |
84 | - | ( | |
81 | + | let A = q | |
82 | + | (z.callerPublicKey == A) | |
85 | 83 | } | |
86 | - | else if ($isInstanceOf( | |
87 | - | then ( | |
84 | + | else if ($isInstanceOf(q, "Unit")) | |
85 | + | then (z.caller == this) | |
88 | 86 | else throw("Match error") | |
89 | 87 | } | |
90 | 88 | ||
91 | 89 | ||
92 | - | func | |
90 | + | func B (z) = if (y(z)) | |
93 | 91 | then true | |
94 | 92 | else throw("permission denied") | |
95 | 93 | ||
96 | 94 | ||
97 | - | func | |
95 | + | func C (D) = if ((D == "WAVES")) | |
98 | 96 | then wavesBalance(this).available | |
99 | - | else assetBalance(this, fromBase58String( | |
97 | + | else assetBalance(this, fromBase58String(D)) | |
100 | 98 | ||
101 | 99 | ||
102 | - | @Callable( | |
103 | - | func swapCalculateREADONLY (F,G | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
100 | + | @Callable(z) | |
101 | + | func swapCalculateREADONLY (E,F,G) = { | |
102 | + | let H = value(getInteger(n())) | |
103 | + | let I = fraction(toBigInt(E), toBigInt(H), b) | |
104 | + | let J = fraction(toBigInt(E), toBigInt(H), b) | |
105 | + | let K = (toBigInt(E) - I) | |
106 | + | let L = (K - J) | |
107 | + | let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil) | |
108 | + | let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil) | |
109 | + | let O = if ((M != unit)) | |
112 | 110 | then { | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | if ($isInstanceOf( | |
117 | - | then | |
118 | - | else throw(($getType( | |
111 | + | let P = false | |
112 | + | let Q = { | |
113 | + | let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil) | |
114 | + | if ($isInstanceOf(R, "Address")) | |
115 | + | then R | |
116 | + | else throw(($getType(R) + " couldn't be cast to Address")) | |
119 | 117 | } | |
120 | - | $Tuple2( | |
118 | + | $Tuple2(P, Q) | |
121 | 119 | } | |
122 | - | else if (( | |
120 | + | else if ((N != unit)) | |
123 | 121 | then { | |
124 | - | let | |
125 | - | let | |
126 | - | $Tuple2( | |
122 | + | let P = true | |
123 | + | let Q = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil) | |
124 | + | $Tuple2(P, Q) | |
127 | 125 | } | |
128 | - | else | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | if ($isInstanceOf( | |
134 | - | then | |
135 | - | else throw(($getType( | |
126 | + | else f | |
127 | + | let P = O._1 | |
128 | + | let Q = O._2 | |
129 | + | let S = { | |
130 | + | let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil) | |
131 | + | if ($isInstanceOf(R, "Boolean")) | |
132 | + | then R | |
133 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
136 | 134 | } | |
137 | - | let | |
135 | + | let T = if (S) | |
138 | 136 | then true | |
139 | 137 | else e | |
140 | - | if (( | |
138 | + | if ((T == T)) | |
141 | 139 | then { | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | if ($isInstanceOf( | |
146 | - | then | |
147 | - | else throw(($getType( | |
140 | + | let U = addressFromStringValue(valueOrElse(Q, "")) | |
141 | + | let V = { | |
142 | + | let R = invoke(U, "calculateAmountOutForSwapREADONLY", [L, P], nil) | |
143 | + | if ($isInstanceOf(R, "Int")) | |
144 | + | then R | |
145 | + | else throw(($getType(R) + " couldn't be cast to Int")) | |
148 | 146 | } | |
149 | - | $Tuple2(nil, | |
147 | + | $Tuple2(nil, V) | |
150 | 148 | } | |
151 | 149 | else throw("Strict value is not equal to itself.") | |
152 | 150 | } | |
153 | 151 | ||
154 | 152 | ||
155 | 153 | ||
156 | - | @Callable( | |
157 | - | func swap (X | |
158 | - | let | |
159 | - | let | |
154 | + | @Callable(z) | |
155 | + | func swap (W,G,X) = { | |
156 | + | let Y = value(z.payments[0]) | |
157 | + | let F = if ((Y.assetId == unit)) | |
160 | 158 | then toBytes("WAVES") | |
161 | - | else value( | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
159 | + | else value(Y.assetId) | |
160 | + | let E = value(Y.amount) | |
161 | + | let H = value(getInteger(n())) | |
162 | + | let I = fraction(toBigInt(E), toBigInt(H), b) | |
163 | + | let J = fraction(toBigInt(E), toBigInt(H), b) | |
164 | + | let K = (toBigInt(E) - I) | |
165 | + | let L = (K - J) | |
166 | + | let Z = [if ((size(z.payments) == 1)) | |
169 | 167 | then true | |
170 | 168 | else throw("exactly 1 payment are expected")] | |
171 | - | if (( | |
169 | + | if ((Z == Z)) | |
172 | 170 | then { | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
171 | + | let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil) | |
172 | + | let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil) | |
173 | + | let aa = if ((M != unit)) | |
176 | 174 | then { | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | if ($isInstanceOf( | |
181 | - | then | |
182 | - | else throw(($getType( | |
175 | + | let P = false | |
176 | + | let Q = { | |
177 | + | let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil) | |
178 | + | if ($isInstanceOf(R, "Address")) | |
179 | + | then R | |
180 | + | else throw(($getType(R) + " couldn't be cast to Address")) | |
183 | 181 | } | |
184 | - | $Tuple2( | |
182 | + | $Tuple2(P, Q) | |
185 | 183 | } | |
186 | - | else if (( | |
184 | + | else if ((N != unit)) | |
187 | 185 | then { | |
188 | - | let | |
189 | - | let | |
190 | - | $Tuple2( | |
186 | + | let P = true | |
187 | + | let Q = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil) | |
188 | + | $Tuple2(P, Q) | |
191 | 189 | } | |
192 | 190 | else f | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | - | then | |
199 | - | else throw(($getType( | |
191 | + | let P = aa._1 | |
192 | + | let Q = aa._2 | |
193 | + | let S = { | |
194 | + | let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil) | |
195 | + | if ($isInstanceOf(R, "Boolean")) | |
196 | + | then R | |
197 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
200 | 198 | } | |
201 | - | let | |
199 | + | let T = if (S) | |
202 | 200 | then true | |
203 | 201 | else e | |
204 | - | if (( | |
202 | + | if ((T == T)) | |
205 | 203 | then { | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | if ($isInstanceOf( | |
210 | - | then | |
211 | - | else throw(($getType( | |
204 | + | let U = addressFromStringValue(valueOrElse(Q, "")) | |
205 | + | let V = { | |
206 | + | let R = invoke(U, "calculateAmountOutForSwapAndSendTokens", [L, P, W, X], [AttachedPayment(F, toInt(K))]) | |
207 | + | if ($isInstanceOf(R, "Boolean")) | |
208 | + | then R | |
209 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
212 | 210 | } | |
213 | - | $Tuple2(nil, | |
211 | + | $Tuple2(nil, V) | |
214 | 212 | } | |
215 | 213 | else throw("Strict value is not equal to itself.") | |
216 | 214 | } | |
219 | 217 | ||
220 | 218 | ||
221 | 219 | ||
222 | - | @Callable( | |
223 | - | func setManager ( | |
224 | - | let | |
225 | - | if (( | |
220 | + | @Callable(z) | |
221 | + | func setManager (ab) = { | |
222 | + | let ac = B(z) | |
223 | + | if ((ac == ac)) | |
226 | 224 | then { | |
227 | - | let | |
228 | - | if (( | |
229 | - | then [StringEntry( | |
225 | + | let ad = fromBase58String(ab) | |
226 | + | if ((ad == ad)) | |
227 | + | then [StringEntry(i(), ab)] | |
230 | 228 | else throw("Strict value is not equal to itself.") | |
231 | 229 | } | |
232 | 230 | else throw("Strict value is not equal to itself.") | |
234 | 232 | ||
235 | 233 | ||
236 | 234 | ||
237 | - | @Callable( | |
235 | + | @Callable(z) | |
238 | 236 | func confirmManager () = { | |
239 | - | let | |
240 | - | let | |
237 | + | let ae = x() | |
238 | + | let af = if (isDefined(ae)) | |
241 | 239 | then true | |
242 | 240 | else throw("no pending manager") | |
243 | - | if (( | |
241 | + | if ((af == af)) | |
244 | 242 | then { | |
245 | - | let | |
243 | + | let ag = if ((z.callerPublicKey == value(ae))) | |
246 | 244 | then true | |
247 | 245 | else throw("you are not pending manager") | |
248 | - | if (( | |
249 | - | then [StringEntry( | |
246 | + | if ((ag == ag)) | |
247 | + | then [StringEntry(h(), toBase58String(value(ae))), DeleteEntry(i())] | |
250 | 248 | else throw("Strict value is not equal to itself.") | |
251 | 249 | } | |
252 | 250 | else throw("Strict value is not equal to itself.") | |
253 | 251 | } | |
254 | 252 | ||
255 | 253 | ||
256 | - | @Verifier( | |
257 | - | func | |
258 | - | let | |
259 | - | let | |
260 | - | if ($isInstanceOf( | |
254 | + | @Verifier(ah) | |
255 | + | func ai () = { | |
256 | + | let aj = { | |
257 | + | let q = v() | |
258 | + | if ($isInstanceOf(q, "ByteVector")) | |
261 | 259 | then { | |
262 | - | let | |
263 | - | | |
260 | + | let A = q | |
261 | + | A | |
264 | 262 | } | |
265 | - | else if ($isInstanceOf( | |
266 | - | then | |
263 | + | else if ($isInstanceOf(q, "Unit")) | |
264 | + | then ah.senderPublicKey | |
267 | 265 | else throw("Match error") | |
268 | 266 | } | |
269 | - | sigVerify( | |
267 | + | sigVerify(ah.bodyBytes, ah.proofs[0], aj) | |
270 | 268 | } | |
271 | 269 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = toBigInt(100000) | |
7 | 7 | ||
8 | 8 | func c (d) = valueOrErrorMessage(getString(this, d), ("No data for this.key=" + d)) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | let e = throw("Pool disabled") | |
12 | 12 | ||
13 | 13 | let f = throw("Pool is not exist") | |
14 | 14 | ||
15 | 15 | let g = throw("Slippage is too big") | |
16 | 16 | ||
17 | - | let h = throw("Test error here") | |
18 | - | ||
19 | - | func i () = "%s__managerPublicKey" | |
17 | + | func h () = "%s__managerPublicKey" | |
20 | 18 | ||
21 | 19 | ||
22 | - | func | |
20 | + | func i () = "%s__pendingManagerPublicKey" | |
23 | 21 | ||
24 | 22 | ||
25 | - | func | |
23 | + | func j () = "%s__factoryContract" | |
26 | 24 | ||
27 | 25 | ||
28 | - | let | |
26 | + | let k = addressFromStringValue(c(j())) | |
29 | 27 | ||
30 | - | func | |
28 | + | func l () = makeString(["%s", "feeLiquidityContractAddress"], a) | |
31 | 29 | ||
32 | 30 | ||
33 | - | func | |
31 | + | func m () = makeString(["%s", "feeLiquidity"], a) | |
34 | 32 | ||
35 | 33 | ||
36 | - | func | |
34 | + | func n () = makeString(["%s", "protocolFee"], a) | |
37 | 35 | ||
38 | 36 | ||
39 | - | func | |
40 | - | let | |
41 | - | if ($isInstanceOf( | |
37 | + | func o (p) = { | |
38 | + | let q = p | |
39 | + | if ($isInstanceOf(q, "Int")) | |
42 | 40 | then { | |
43 | - | let | |
44 | - | | |
41 | + | let r = q | |
42 | + | r | |
45 | 43 | } | |
46 | 44 | else throw("fail to cast into Int") | |
47 | 45 | } | |
48 | 46 | ||
49 | 47 | ||
50 | - | func | |
48 | + | func s (t,u) = makeString(["%d%d", toString(t), toString(u)], a) | |
51 | 49 | ||
52 | 50 | ||
53 | - | func | |
54 | - | let | |
55 | - | if ($isInstanceOf( | |
51 | + | func v () = { | |
52 | + | let q = getString(h()) | |
53 | + | if ($isInstanceOf(q, "String")) | |
56 | 54 | then { | |
57 | - | let | |
58 | - | fromBase58String( | |
55 | + | let w = q | |
56 | + | fromBase58String(w) | |
59 | 57 | } | |
60 | - | else if ($isInstanceOf( | |
58 | + | else if ($isInstanceOf(q, "Unit")) | |
61 | 59 | then unit | |
62 | 60 | else throw("Match error") | |
63 | 61 | } | |
64 | 62 | ||
65 | 63 | ||
66 | - | func | |
67 | - | let | |
68 | - | if ($isInstanceOf( | |
64 | + | func x () = { | |
65 | + | let q = getString(i()) | |
66 | + | if ($isInstanceOf(q, "String")) | |
69 | 67 | then { | |
70 | - | let | |
71 | - | fromBase58String( | |
68 | + | let w = q | |
69 | + | fromBase58String(w) | |
72 | 70 | } | |
73 | - | else if ($isInstanceOf( | |
71 | + | else if ($isInstanceOf(q, "Unit")) | |
74 | 72 | then unit | |
75 | 73 | else throw("Match error") | |
76 | 74 | } | |
77 | 75 | ||
78 | 76 | ||
79 | - | func | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
77 | + | func y (z) = { | |
78 | + | let q = v() | |
79 | + | if ($isInstanceOf(q, "ByteVector")) | |
82 | 80 | then { | |
83 | - | let | |
84 | - | ( | |
81 | + | let A = q | |
82 | + | (z.callerPublicKey == A) | |
85 | 83 | } | |
86 | - | else if ($isInstanceOf( | |
87 | - | then ( | |
84 | + | else if ($isInstanceOf(q, "Unit")) | |
85 | + | then (z.caller == this) | |
88 | 86 | else throw("Match error") | |
89 | 87 | } | |
90 | 88 | ||
91 | 89 | ||
92 | - | func | |
90 | + | func B (z) = if (y(z)) | |
93 | 91 | then true | |
94 | 92 | else throw("permission denied") | |
95 | 93 | ||
96 | 94 | ||
97 | - | func | |
95 | + | func C (D) = if ((D == "WAVES")) | |
98 | 96 | then wavesBalance(this).available | |
99 | - | else assetBalance(this, fromBase58String( | |
97 | + | else assetBalance(this, fromBase58String(D)) | |
100 | 98 | ||
101 | 99 | ||
102 | - | @Callable( | |
103 | - | func swapCalculateREADONLY (F,G | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
100 | + | @Callable(z) | |
101 | + | func swapCalculateREADONLY (E,F,G) = { | |
102 | + | let H = value(getInteger(n())) | |
103 | + | let I = fraction(toBigInt(E), toBigInt(H), b) | |
104 | + | let J = fraction(toBigInt(E), toBigInt(H), b) | |
105 | + | let K = (toBigInt(E) - I) | |
106 | + | let L = (K - J) | |
107 | + | let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil) | |
108 | + | let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil) | |
109 | + | let O = if ((M != unit)) | |
112 | 110 | then { | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | if ($isInstanceOf( | |
117 | - | then | |
118 | - | else throw(($getType( | |
111 | + | let P = false | |
112 | + | let Q = { | |
113 | + | let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil) | |
114 | + | if ($isInstanceOf(R, "Address")) | |
115 | + | then R | |
116 | + | else throw(($getType(R) + " couldn't be cast to Address")) | |
119 | 117 | } | |
120 | - | $Tuple2( | |
118 | + | $Tuple2(P, Q) | |
121 | 119 | } | |
122 | - | else if (( | |
120 | + | else if ((N != unit)) | |
123 | 121 | then { | |
124 | - | let | |
125 | - | let | |
126 | - | $Tuple2( | |
122 | + | let P = true | |
123 | + | let Q = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil) | |
124 | + | $Tuple2(P, Q) | |
127 | 125 | } | |
128 | - | else | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | if ($isInstanceOf( | |
134 | - | then | |
135 | - | else throw(($getType( | |
126 | + | else f | |
127 | + | let P = O._1 | |
128 | + | let Q = O._2 | |
129 | + | let S = { | |
130 | + | let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil) | |
131 | + | if ($isInstanceOf(R, "Boolean")) | |
132 | + | then R | |
133 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
136 | 134 | } | |
137 | - | let | |
135 | + | let T = if (S) | |
138 | 136 | then true | |
139 | 137 | else e | |
140 | - | if (( | |
138 | + | if ((T == T)) | |
141 | 139 | then { | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | if ($isInstanceOf( | |
146 | - | then | |
147 | - | else throw(($getType( | |
140 | + | let U = addressFromStringValue(valueOrElse(Q, "")) | |
141 | + | let V = { | |
142 | + | let R = invoke(U, "calculateAmountOutForSwapREADONLY", [L, P], nil) | |
143 | + | if ($isInstanceOf(R, "Int")) | |
144 | + | then R | |
145 | + | else throw(($getType(R) + " couldn't be cast to Int")) | |
148 | 146 | } | |
149 | - | $Tuple2(nil, | |
147 | + | $Tuple2(nil, V) | |
150 | 148 | } | |
151 | 149 | else throw("Strict value is not equal to itself.") | |
152 | 150 | } | |
153 | 151 | ||
154 | 152 | ||
155 | 153 | ||
156 | - | @Callable( | |
157 | - | func swap (X | |
158 | - | let | |
159 | - | let | |
154 | + | @Callable(z) | |
155 | + | func swap (W,G,X) = { | |
156 | + | let Y = value(z.payments[0]) | |
157 | + | let F = if ((Y.assetId == unit)) | |
160 | 158 | then toBytes("WAVES") | |
161 | - | else value( | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
159 | + | else value(Y.assetId) | |
160 | + | let E = value(Y.amount) | |
161 | + | let H = value(getInteger(n())) | |
162 | + | let I = fraction(toBigInt(E), toBigInt(H), b) | |
163 | + | let J = fraction(toBigInt(E), toBigInt(H), b) | |
164 | + | let K = (toBigInt(E) - I) | |
165 | + | let L = (K - J) | |
166 | + | let Z = [if ((size(z.payments) == 1)) | |
169 | 167 | then true | |
170 | 168 | else throw("exactly 1 payment are expected")] | |
171 | - | if (( | |
169 | + | if ((Z == Z)) | |
172 | 170 | then { | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
171 | + | let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil) | |
172 | + | let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil) | |
173 | + | let aa = if ((M != unit)) | |
176 | 174 | then { | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | if ($isInstanceOf( | |
181 | - | then | |
182 | - | else throw(($getType( | |
175 | + | let P = false | |
176 | + | let Q = { | |
177 | + | let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil) | |
178 | + | if ($isInstanceOf(R, "Address")) | |
179 | + | then R | |
180 | + | else throw(($getType(R) + " couldn't be cast to Address")) | |
183 | 181 | } | |
184 | - | $Tuple2( | |
182 | + | $Tuple2(P, Q) | |
185 | 183 | } | |
186 | - | else if (( | |
184 | + | else if ((N != unit)) | |
187 | 185 | then { | |
188 | - | let | |
189 | - | let | |
190 | - | $Tuple2( | |
186 | + | let P = true | |
187 | + | let Q = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil) | |
188 | + | $Tuple2(P, Q) | |
191 | 189 | } | |
192 | 190 | else f | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | - | then | |
199 | - | else throw(($getType( | |
191 | + | let P = aa._1 | |
192 | + | let Q = aa._2 | |
193 | + | let S = { | |
194 | + | let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil) | |
195 | + | if ($isInstanceOf(R, "Boolean")) | |
196 | + | then R | |
197 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
200 | 198 | } | |
201 | - | let | |
199 | + | let T = if (S) | |
202 | 200 | then true | |
203 | 201 | else e | |
204 | - | if (( | |
202 | + | if ((T == T)) | |
205 | 203 | then { | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | if ($isInstanceOf( | |
210 | - | then | |
211 | - | else throw(($getType( | |
204 | + | let U = addressFromStringValue(valueOrElse(Q, "")) | |
205 | + | let V = { | |
206 | + | let R = invoke(U, "calculateAmountOutForSwapAndSendTokens", [L, P, W, X], [AttachedPayment(F, toInt(K))]) | |
207 | + | if ($isInstanceOf(R, "Boolean")) | |
208 | + | then R | |
209 | + | else throw(($getType(R) + " couldn't be cast to Boolean")) | |
212 | 210 | } | |
213 | - | $Tuple2(nil, | |
211 | + | $Tuple2(nil, V) | |
214 | 212 | } | |
215 | 213 | else throw("Strict value is not equal to itself.") | |
216 | 214 | } | |
217 | 215 | else throw("Strict value is not equal to itself.") | |
218 | 216 | } | |
219 | 217 | ||
220 | 218 | ||
221 | 219 | ||
222 | - | @Callable( | |
223 | - | func setManager ( | |
224 | - | let | |
225 | - | if (( | |
220 | + | @Callable(z) | |
221 | + | func setManager (ab) = { | |
222 | + | let ac = B(z) | |
223 | + | if ((ac == ac)) | |
226 | 224 | then { | |
227 | - | let | |
228 | - | if (( | |
229 | - | then [StringEntry( | |
225 | + | let ad = fromBase58String(ab) | |
226 | + | if ((ad == ad)) | |
227 | + | then [StringEntry(i(), ab)] | |
230 | 228 | else throw("Strict value is not equal to itself.") | |
231 | 229 | } | |
232 | 230 | else throw("Strict value is not equal to itself.") | |
233 | 231 | } | |
234 | 232 | ||
235 | 233 | ||
236 | 234 | ||
237 | - | @Callable( | |
235 | + | @Callable(z) | |
238 | 236 | func confirmManager () = { | |
239 | - | let | |
240 | - | let | |
237 | + | let ae = x() | |
238 | + | let af = if (isDefined(ae)) | |
241 | 239 | then true | |
242 | 240 | else throw("no pending manager") | |
243 | - | if (( | |
241 | + | if ((af == af)) | |
244 | 242 | then { | |
245 | - | let | |
243 | + | let ag = if ((z.callerPublicKey == value(ae))) | |
246 | 244 | then true | |
247 | 245 | else throw("you are not pending manager") | |
248 | - | if (( | |
249 | - | then [StringEntry( | |
246 | + | if ((ag == ag)) | |
247 | + | then [StringEntry(h(), toBase58String(value(ae))), DeleteEntry(i())] | |
250 | 248 | else throw("Strict value is not equal to itself.") | |
251 | 249 | } | |
252 | 250 | else throw("Strict value is not equal to itself.") | |
253 | 251 | } | |
254 | 252 | ||
255 | 253 | ||
256 | - | @Verifier( | |
257 | - | func | |
258 | - | let | |
259 | - | let | |
260 | - | if ($isInstanceOf( | |
254 | + | @Verifier(ah) | |
255 | + | func ai () = { | |
256 | + | let aj = { | |
257 | + | let q = v() | |
258 | + | if ($isInstanceOf(q, "ByteVector")) | |
261 | 259 | then { | |
262 | - | let | |
263 | - | | |
260 | + | let A = q | |
261 | + | A | |
264 | 262 | } | |
265 | - | else if ($isInstanceOf( | |
266 | - | then | |
263 | + | else if ($isInstanceOf(q, "Unit")) | |
264 | + | then ah.senderPublicKey | |
267 | 265 | else throw("Match error") | |
268 | 266 | } | |
269 | - | sigVerify( | |
267 | + | sigVerify(ah.bodyBytes, ah.proofs[0], aj) | |
270 | 268 | } | |
271 | 269 |
github/deemru/w8io/169f3d6 90.60 ms ◑