tx · 5LWRgKxspmWRZ5VApBsmk7A3vWPYYNiVPVnfrbFocqcg 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh: -0.01400000 Waves 2023.05.04 12:23 [2562827] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves
{ "type": 13, "id": "5LWRgKxspmWRZ5VApBsmk7A3vWPYYNiVPVnfrbFocqcg", "fee": 1400000, "feeAssetId": null, "timestamp": 1683192278603, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "667g779y62Cz61LkXWvF2GbYF9t5rmZzCHUokaqiUrwMBTkpzAu9krNM6fsZrzdyz2ctWZb54oF3XhDMyfDbT7Y2" ], "script": "base64:BgLiEAgCEgkKBwgICBgBCAESABIAEggKBggICAgICBIDCgEYEgMKAQgSABIAEgQKAggIIhBjb250cmFjdEZpbGVuYW1lIgNTRVAiDHdhdmVzQXNzZXRJZCIHVkxUUE9PTCIIU1RCTFBPT0wiEWludmFsaWRQcmljZUFzc2V0Igd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgd0aHJvd1BEIhR0aHJvd0NyZWF0ZU5vdENhbGxlZCIRdGhyb3dZb3VOb3RJc3N1ZXIiD3Rocm93UG9vbEV4aXN0cyIVdGhyb3dBc3NldE5vdFZlcmlmaWVkIhZ0aHJvd0ludmFsaWRQcmljZUFzc2V0IhR0aHJvd0ludmFsaWRGZWVBc3NldCIXdGhyb3dJbnZhbGlkQW1vdW50QXNzZXQiEnRocm93SW52YWxpZFN0YXR1cyIfdGhyb3dDYW5BY3RpdmF0ZU9ubHlQZW5kaW5nUG9vbCIddGhyb3dGYWN0b3J5UmV0dXJuZWROb3RTdHJpbmciHHRocm93SW52YWxpZFByaWNlQXNzZXRBbW91bnQiD3Rocm93SW52YWxpZEZlZSIVdGhyb3dJ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aWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYW8BE3ByaWNlQXNzZXRzUkVBRE9OTFkACQCUCgIFA25pbAkBAmFhAQkAoggBCQEBWAACYW8BDnN0YXR1c1JFQURPTkxZAgFCAUMEAmFBBAJhYwkAoggBCQEBQQIFAUIFAUMDCQABAgUCYWMCBlN0cmluZwQCYWQFAmFjBQJhZAUEdW5pdAkAlAoCBQNuaWwFAmFBAQJiRQECYkYABAJiRwQCYWMJAQJhbAADCQABAgUCYWMCCkJ5dGVWZWN0b3IEAmFwBQJhYwUCYXADCQABAgUCYWMCBFVuaXQIBQJiRQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYkUJYm9keUJ5dGVzCQCRAwIIBQJiRQZwcm9vZnMAAAUCYkd7GB8p", "height": 2562827, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ea32eC29rPLKgGsdNAzU1pGQqq6z88yrJ6Sj8AMF8mYZ Next: 5ifMM8dPiZ7dWFGqw4TSnFr2dnkDQrVkRAbNxZVp7YsU Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = "WAVES" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "VLTPOOL" | |
11 | 11 | ||
12 | - | func e (f) = makeString([a, ": ", f], "") | |
12 | + | let e = "STBLPOOL" | |
13 | + | ||
14 | + | let f = "Invalid price asset" | |
15 | + | ||
16 | + | func g (h) = makeString([a, ": ", h], "") | |
13 | 17 | ||
14 | 18 | ||
15 | - | func | |
19 | + | func i (h) = throw(g(h)) | |
16 | 20 | ||
17 | 21 | ||
18 | - | func | |
22 | + | func j () = i("Permission denied") | |
19 | 23 | ||
20 | 24 | ||
21 | - | func | |
25 | + | func k () = i("Create is not called for assets pair") | |
22 | 26 | ||
23 | 27 | ||
24 | - | func | |
28 | + | func l () = i("You are not amountAsset issuer") | |
25 | 29 | ||
26 | 30 | ||
27 | - | func | |
31 | + | func m () = i("Pool with such assets already exists") | |
28 | 32 | ||
29 | 33 | ||
30 | - | func | |
34 | + | func n () = i("Asset is not verified") | |
31 | 35 | ||
32 | 36 | ||
33 | - | func | |
37 | + | func o () = i(f) | |
34 | 38 | ||
35 | 39 | ||
36 | - | func | |
40 | + | func p () = i("Invalid fee asset") | |
37 | 41 | ||
38 | 42 | ||
39 | - | func | |
43 | + | func q () = i("Invalid amount asset attached") | |
40 | 44 | ||
41 | 45 | ||
42 | - | func | |
46 | + | func r () = i("Invalid status") | |
43 | 47 | ||
44 | 48 | ||
45 | - | func | |
49 | + | func s () = i("Can activate pool only in 'pending' status") | |
46 | 50 | ||
47 | 51 | ||
48 | - | func | |
52 | + | func t () = i("FactoryV2 returned not string") | |
49 | 53 | ||
50 | 54 | ||
51 | - | func | |
55 | + | func u () = i("invalid price asset amount") | |
52 | 56 | ||
53 | 57 | ||
54 | - | func | |
58 | + | func v () = i("invalid fee") | |
55 | 59 | ||
56 | 60 | ||
57 | - | func | |
61 | + | func w () = i("invalid asset pair") | |
58 | 62 | ||
59 | 63 | ||
60 | - | func | |
64 | + | func x () = makeString(["%s", "managerPublicKey"], b) | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func y () = makeString(["%s", "pendingManagerPublicKey"], b) | |
64 | 68 | ||
65 | 69 | ||
66 | - | func | |
70 | + | func z () = makeString(["%s", "adminPubKeys"], b) | |
67 | 71 | ||
68 | 72 | ||
69 | - | func | |
73 | + | func A (B,C) = makeString(["%s%s%s", "status", B, C], b) | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
76 | + | func D () = makeString(["%s", "factoryContract"], b) | |
73 | 77 | ||
74 | 78 | ||
75 | - | func | |
79 | + | func E () = makeString(["%s", "assetsStoreContract"], b) | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
82 | + | func F () = makeString(["%s", "emissionContract"], b) | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func G (B,C) = makeString(["%s%s%s", "suffix", B, C], b) | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func H () = makeString(["%s", "lastIndex"], b) | |
85 | 89 | ||
86 | 90 | ||
87 | - | let | |
91 | + | let I = "u" | |
88 | 92 | ||
89 | - | let | |
93 | + | let J = "pending" | |
90 | 94 | ||
91 | - | let | |
95 | + | let K = "declined" | |
92 | 96 | ||
93 | - | let | |
97 | + | let L = "active" | |
94 | 98 | ||
95 | - | let | |
99 | + | let M = [J, K, L] | |
96 | 100 | ||
97 | - | func | |
101 | + | func N (B,C) = makeString(["%s%s%s", "createCalled", B, C], b) | |
98 | 102 | ||
99 | 103 | ||
100 | - | func | |
104 | + | func O (B,C) = makeString(["%s%s%s", "createCaller", B, C], b) | |
101 | 105 | ||
102 | 106 | ||
103 | - | func | |
107 | + | func P (B,C) = makeString(["%s%s%s", "amountAssetAmount", B, C], b) | |
104 | 108 | ||
105 | 109 | ||
106 | - | func | |
110 | + | func Q (B,C) = makeString(["%s%s%s", "priceAssetAmount", B, C], b) | |
107 | 111 | ||
108 | 112 | ||
109 | - | func | |
113 | + | func R (B,C) = makeString(["%s%s%s", "height", B, C], b) | |
110 | 114 | ||
111 | 115 | ||
112 | - | func | |
116 | + | func S (B,C) = makeString(["%s%s%s", "poolType", B, C], b) | |
113 | 117 | ||
114 | 118 | ||
115 | - | func | |
119 | + | func T () = makeString(["%s", "feeAssetId"], b) | |
116 | 120 | ||
117 | 121 | ||
118 | - | func | |
122 | + | func U () = makeString(["%s", "feeAmount"], b) | |
119 | 123 | ||
120 | 124 | ||
121 | - | func | |
125 | + | func V () = makeString(["%s", "amountAssetMinAmount"], b) | |
122 | 126 | ||
123 | 127 | ||
124 | - | func | |
128 | + | func W () = makeString(["%s", "priceAssetsMinAmount"], b) | |
125 | 129 | ||
126 | 130 | ||
127 | - | func | |
131 | + | func X () = makeString(["%s", "priceAssets"], b) | |
128 | 132 | ||
129 | 133 | ||
130 | - | func X (Y) = { | |
131 | - | let Z = Y | |
132 | - | if ($isInstanceOf(Z, "String")) | |
134 | + | func Y (Z) = valueOrErrorMessage(getString(this, Z), (Z + " is not defined")) | |
135 | + | ||
136 | + | ||
137 | + | func aa (ab) = { | |
138 | + | let ac = ab | |
139 | + | if ($isInstanceOf(ac, "String")) | |
133 | 140 | then { | |
134 | - | let | |
135 | - | if ((size( | |
141 | + | let ad = ac | |
142 | + | if ((size(ad) == 0)) | |
136 | 143 | then nil | |
137 | - | else split( | |
144 | + | else split(ad, b) | |
138 | 145 | } | |
139 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(ac, "Unit")) | |
140 | 147 | then nil | |
141 | 148 | else throw("Match error") | |
142 | 149 | } | |
143 | 150 | ||
144 | 151 | ||
145 | - | let | |
152 | + | let ae = addressFromStringValue(Y(D())) | |
146 | 153 | ||
147 | - | let | |
154 | + | let af = makeString(["%s", "votingEmissionContract"], b) | |
148 | 155 | ||
149 | - | let | |
156 | + | let ag = addressFromStringValue(valueOrErrorMessage(getString(ae, af), g("voting emission contract address is required"))) | |
150 | 157 | ||
151 | - | let | |
158 | + | let ah = makeString(["%s", "votingEmissionCandidateContract"], b) | |
152 | 159 | ||
153 | - | let | |
160 | + | let ai = addressFromStringValue(valueOrErrorMessage(getString(ag, ah), g("voting emission candidate contract address is required"))) | |
154 | 161 | ||
155 | - | func | |
162 | + | func aj (B,C) = valueOrElse(getBoolean(N(B, C)), false) | |
156 | 163 | ||
157 | 164 | ||
158 | - | func | |
165 | + | func ak (B,C) = if (aj(B, C)) | |
159 | 166 | then true | |
160 | - | else | |
167 | + | else k() | |
161 | 168 | ||
162 | 169 | ||
163 | - | func | |
164 | - | let | |
165 | - | if ($isInstanceOf( | |
170 | + | func al () = { | |
171 | + | let ac = getString(x()) | |
172 | + | if ($isInstanceOf(ac, "String")) | |
166 | 173 | then { | |
167 | - | let | |
168 | - | fromBase58String( | |
174 | + | let ad = ac | |
175 | + | fromBase58String(ad) | |
169 | 176 | } | |
170 | - | else if ($isInstanceOf( | |
177 | + | else if ($isInstanceOf(ac, "Unit")) | |
171 | 178 | then unit | |
172 | 179 | else throw("Match error") | |
173 | 180 | } | |
174 | 181 | ||
175 | 182 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
183 | + | func am () = { | |
184 | + | let ac = getString(y()) | |
185 | + | if ($isInstanceOf(ac, "String")) | |
179 | 186 | then { | |
180 | - | let | |
181 | - | fromBase58String( | |
187 | + | let ad = ac | |
188 | + | fromBase58String(ad) | |
182 | 189 | } | |
183 | - | else if ($isInstanceOf( | |
190 | + | else if ($isInstanceOf(ac, "Unit")) | |
184 | 191 | then unit | |
185 | 192 | else throw("Match error") | |
186 | 193 | } | |
187 | 194 | ||
188 | 195 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ($isInstanceOf( | |
196 | + | func an (ao) = { | |
197 | + | let ac = al() | |
198 | + | if ($isInstanceOf(ac, "ByteVector")) | |
192 | 199 | then { | |
193 | - | let | |
194 | - | ( | |
200 | + | let ap = ac | |
201 | + | (ao.callerPublicKey == ap) | |
195 | 202 | } | |
196 | - | else if ($isInstanceOf( | |
197 | - | then ( | |
203 | + | else if ($isInstanceOf(ac, "Unit")) | |
204 | + | then (ao.caller == this) | |
198 | 205 | else throw("Match error") | |
199 | 206 | } | |
200 | 207 | ||
201 | 208 | ||
202 | - | func | |
209 | + | func aq (ao) = if (an(ao)) | |
203 | 210 | then true | |
204 | - | else | |
211 | + | else j() | |
205 | 212 | ||
206 | 213 | ||
207 | - | func | |
208 | - | let | |
209 | - | if (containsElement( | |
214 | + | func ar (ao) = { | |
215 | + | let as = aa(getString(z())) | |
216 | + | if (containsElement(as, toBase58String(ao.callerPublicKey))) | |
210 | 217 | then true | |
211 | - | else | |
218 | + | else aq(ao) | |
212 | 219 | } | |
213 | 220 | ||
214 | 221 | ||
215 | - | func | |
222 | + | func at (au) = (valueOrElse(getInteger(addressFromStringValue(Y(E())), (("status_<" + au) + ">")), 0) == 2) | |
216 | 223 | ||
217 | 224 | ||
218 | - | func | |
219 | - | let | |
220 | - | if ($isInstanceOf( | |
225 | + | func av (aw) = { | |
226 | + | let ac = aw.assetId | |
227 | + | if ($isInstanceOf(ac, "ByteVector")) | |
221 | 228 | then { | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple2(toBase58String( | |
229 | + | let ax = ac | |
230 | + | let ay = value(assetInfo(ax)) | |
231 | + | $Tuple2(toBase58String(ax), ay) | |
225 | 232 | } | |
226 | - | else if ($isInstanceOf( | |
233 | + | else if ($isInstanceOf(ac, "Unit")) | |
227 | 234 | then $Tuple2(c, unit) | |
228 | 235 | else throw("Match error") | |
229 | 236 | } | |
230 | 237 | ||
231 | 238 | ||
232 | - | func | |
239 | + | func az (aA) = containsElement(M, aA) | |
233 | 240 | ||
234 | 241 | ||
235 | - | @Callable(al) | |
236 | - | func constructor (ay,az,aA,aB,aC,aD,aE) = { | |
237 | - | let aF = an(al) | |
238 | - | if ((aF == aF)) | |
239 | - | then [StringEntry(B(), ay), StringEntry(C(), az), StringEntry(D(), aA), StringEntry(T(), makeString(aB, b)), IntegerEntry(S(), aC), StringEntry(Q(), aD), IntegerEntry(R(), aE)] | |
240 | - | else throw("Strict value is not equal to itself.") | |
241 | - | } | |
242 | - | ||
243 | - | ||
244 | - | ||
245 | - | @Callable(al) | |
246 | - | func create () = { | |
247 | - | let aG = value(al.payments[0]) | |
248 | - | let aH = value(al.payments[1]) | |
249 | - | let aI = value(al.payments[2]) | |
250 | - | let aJ = as(aG) | |
242 | + | func aB (ao,aC) = { | |
243 | + | let aD = value(ao.payments[0]) | |
244 | + | let aE = value(ao.payments[1]) | |
245 | + | let aF = value(ao.payments[2]) | |
246 | + | let aG = av(aD) | |
247 | + | let aH = aG._1 | |
248 | + | let aI = aG._2 | |
249 | + | let aJ = av(aE) | |
251 | 250 | let aK = aJ._1 | |
252 | 251 | let aL = aJ._2 | |
253 | - | let aM = | |
252 | + | let aM = av(aF) | |
254 | 253 | let aN = aM._1 | |
255 | 254 | let aO = aM._2 | |
256 | - | let aP = as(aI) | |
257 | - | let aD = aP._1 | |
258 | - | let aQ = aP._2 | |
259 | - | let aR = X(getString(ab, U())) | |
260 | - | let aS = if ((aK != aN)) | |
255 | + | let aP = aa(getString(ae, X())) | |
256 | + | let aQ = if ((aH != aK)) | |
261 | 257 | then true | |
262 | - | else | |
263 | - | if (( | |
258 | + | else w() | |
259 | + | if ((aQ == aQ)) | |
264 | 260 | then { | |
265 | - | let | |
261 | + | let aR = if (if (an(ao)) | |
266 | 262 | then true | |
267 | - | else if (containsElement( | |
268 | - | then | |
263 | + | else if (containsElement(aP, aK)) | |
264 | + | then at(aH) | |
269 | 265 | else false) | |
270 | - | then $Tuple4( | |
271 | - | else if (if (containsElement( | |
272 | - | then | |
266 | + | then $Tuple4(aH, aD.amount, aK, aE.amount) | |
267 | + | else if (if (containsElement(aP, aH)) | |
268 | + | then at(aK) | |
273 | 269 | else false) | |
274 | - | then $Tuple4( | |
275 | - | else | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | then | |
270 | + | then $Tuple4(aK, aE.amount, aH, aD.amount) | |
271 | + | else w() | |
272 | + | let B = aR._1 | |
273 | + | let aS = aR._2 | |
274 | + | let C = aR._3 | |
275 | + | let aT = aR._4 | |
276 | + | let aU = 1 | |
277 | + | let aV = if (an(ao)) | |
278 | + | then aU | |
283 | 279 | else { | |
284 | - | let | |
285 | - | value(parseInt( | |
280 | + | let aW = valueOrErrorMessage(indexOf(aP, C), f) | |
281 | + | value(parseInt(aa(getString(W()))[aW])) | |
286 | 282 | } | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | if ($isInstanceOf( | |
293 | - | then | |
294 | - | else throw(($getType( | |
283 | + | let aX = valueOrElse(getInteger(H()), 0) | |
284 | + | let aY = (aX + 1) | |
285 | + | let aZ = addressFromStringValue(Y(F())) | |
286 | + | let ba = { | |
287 | + | let bb = invoke(ae, "poolExistsREADONLY", [B, C], nil) | |
288 | + | if ($isInstanceOf(bb, "Boolean")) | |
289 | + | then bb | |
290 | + | else throw(($getType(bb) + " couldn't be cast to Boolean")) | |
295 | 291 | } | |
296 | - | let | |
292 | + | let bc = [if (!(aj(B, C))) | |
297 | 293 | then true | |
298 | - | else | |
294 | + | else m(), if (!(ba)) | |
299 | 295 | then true | |
300 | - | else | |
296 | + | else m(), if (if (an(ao)) | |
301 | 297 | then true | |
302 | - | else (getString( | |
298 | + | else (getString(T()) == aN)) | |
303 | 299 | then true | |
304 | - | else | |
300 | + | else p(), if (if (an(ao)) | |
305 | 301 | then true | |
306 | - | else ( | |
302 | + | else (aS >= getIntegerValue(V()))) | |
307 | 303 | then true | |
308 | - | else | |
304 | + | else q(), if (if (an(ao)) | |
309 | 305 | then true | |
310 | - | else ( | |
306 | + | else (aT >= aV)) | |
311 | 307 | then true | |
312 | - | else | |
308 | + | else u(), if (if (an(ao)) | |
313 | 309 | then true | |
314 | - | else ( | |
310 | + | else (aF.amount == getInteger(U()))) | |
315 | 311 | then true | |
316 | - | else | |
317 | - | if (( | |
312 | + | else v()] | |
313 | + | if ((bc == bc)) | |
318 | 314 | then { | |
319 | - | let | |
320 | - | let | |
321 | - | then invoke( | |
315 | + | let bd = 3 | |
316 | + | let be = if ((size(ao.payments) >= bd)) | |
317 | + | then invoke(aZ, "burn", nil, [AttachedPayment(fromBase58String(aN), aF.amount)]) | |
322 | 318 | else unit | |
323 | - | if (( | |
324 | - | then [BooleanEntry( | |
319 | + | if ((be == be)) | |
320 | + | then [BooleanEntry(N(B, C), true), StringEntry(O(B, C), toString(ao.caller)), IntegerEntry(H(), aY), StringEntry(G(B, C), (toString(aY) + I)), IntegerEntry(R(B, C), height), StringEntry(A(B, C), J), IntegerEntry(P(B, C), aS), IntegerEntry(Q(B, C), aT), StringEntry(S(B, C), aC)] | |
325 | 321 | else throw("Strict value is not equal to itself.") | |
326 | 322 | } | |
327 | 323 | else throw("Strict value is not equal to itself.") | |
330 | 326 | } | |
331 | 327 | ||
332 | 328 | ||
329 | + | @Callable(ao) | |
330 | + | func constructor (bf,bg,bh,bi,bj,aN,bk) = { | |
331 | + | let bl = aq(ao) | |
332 | + | if ((bl == bl)) | |
333 | + | then [StringEntry(D(), bf), StringEntry(E(), bg), StringEntry(F(), bh), StringEntry(W(), makeString(bi, b)), IntegerEntry(V(), bj), StringEntry(T(), aN), IntegerEntry(U(), bk)] | |
334 | + | else throw("Strict value is not equal to itself.") | |
335 | + | } | |
333 | 336 | ||
334 | - | @Callable(al) | |
335 | - | func activate (bh,z,bi,A,bj,bk) = { | |
336 | - | let be = [ao(al), if (ag(z, A)) | |
337 | + | ||
338 | + | ||
339 | + | @Callable(ao) | |
340 | + | func create () = aB(ao, d) | |
341 | + | ||
342 | + | ||
343 | + | ||
344 | + | @Callable(ao) | |
345 | + | func createStable () = aB(ao, e) | |
346 | + | ||
347 | + | ||
348 | + | ||
349 | + | @Callable(ao) | |
350 | + | func activate (bm,B,bn,C,bo,bp) = { | |
351 | + | let bc = [ar(ao), if (aj(B, C)) | |
337 | 352 | then true | |
338 | - | else | |
353 | + | else k(), if ((value(getString(A(B, C))) == J)) | |
339 | 354 | then true | |
340 | - | else | |
341 | - | if (( | |
355 | + | else s()] | |
356 | + | if ((bc == bc)) | |
342 | 357 | then { | |
343 | - | let bl = invoke(ab, "activateNewPool", [bh, z, A, ((bi + bj) + "LP"), (((bi + "/") + bj) + " pool liquidity provider token"), 0, "VLTPOOL", bk], nil) | |
344 | - | if ((bl == bl)) | |
358 | + | let bq = getString(this, S(B, C)) | |
359 | + | let br = invoke(ae, "activateNewPool", [bm, B, C, ((bn + bo) + "LP"), (((bn + "/") + bo) + " pool liquidity provider token"), 0, if ((bq == unit)) | |
360 | + | then "VLTPOOL" | |
361 | + | else value(bq), bp], nil) | |
362 | + | if ((br == br)) | |
345 | 363 | then { | |
346 | - | let | |
347 | - | let | |
348 | - | if ($isInstanceOf( | |
364 | + | let bs = { | |
365 | + | let ac = br | |
366 | + | if ($isInstanceOf(ac, "String")) | |
349 | 367 | then { | |
350 | - | let | |
351 | - | | |
368 | + | let ax = ac | |
369 | + | ax | |
352 | 370 | } | |
353 | - | else | |
371 | + | else t() | |
354 | 372 | } | |
355 | - | if (( | |
373 | + | if ((bs == bs)) | |
356 | 374 | then { | |
357 | - | let | |
358 | - | if (( | |
375 | + | let bt = assetBalance(this, fromBase58String(bs)) | |
376 | + | if ((bt == bt)) | |
359 | 377 | then { | |
360 | - | let | |
378 | + | let bu = invoke(addressFromStringValue(bm), "put", [0, false], [AttachedPayment(if ((B == "WAVES")) | |
361 | 379 | then unit | |
362 | - | else fromBase58String( | |
380 | + | else fromBase58String(B), value(getInteger(P(B, C)))), AttachedPayment(if ((C == "WAVES")) | |
363 | 381 | then unit | |
364 | - | else fromBase58String( | |
365 | - | if (( | |
382 | + | else fromBase58String(C), value(getInteger(Q(B, C))))]) | |
383 | + | if ((bu == bu)) | |
366 | 384 | then { | |
367 | - | let | |
368 | - | if (( | |
385 | + | let bv = assetBalance(this, fromBase58String(bs)) | |
386 | + | if ((bv == bv)) | |
369 | 387 | then { | |
370 | - | let | |
371 | - | let | |
372 | - | if (( | |
373 | - | then [StringEntry( | |
388 | + | let bw = value(addressFromString(value(getString(O(B, C))))) | |
389 | + | let bx = invoke(ai, "approve", [B, C], nil) | |
390 | + | if ((bx == bx)) | |
391 | + | then [StringEntry(A(B, C), L), ScriptTransfer(bw, (bv - bt), fromBase58String(bs))] | |
374 | 392 | else throw("Strict value is not equal to itself.") | |
375 | 393 | } | |
376 | 394 | else throw("Strict value is not equal to itself.") | |
388 | 406 | ||
389 | 407 | ||
390 | 408 | ||
391 | - | @Callable( | |
392 | - | func setAdmins ( | |
393 | - | let | |
394 | - | if (( | |
395 | - | then [StringEntry( | |
409 | + | @Callable(ao) | |
410 | + | func setAdmins (by) = { | |
411 | + | let bl = aq(ao) | |
412 | + | if ((bl == bl)) | |
413 | + | then [StringEntry(z(), makeString(by, b))] | |
396 | 414 | else throw("Strict value is not equal to itself.") | |
397 | 415 | } | |
398 | 416 | ||
399 | 417 | ||
400 | 418 | ||
401 | - | @Callable( | |
402 | - | func setManager ( | |
403 | - | let | |
404 | - | if (( | |
419 | + | @Callable(ao) | |
420 | + | func setManager (bz) = { | |
421 | + | let bl = aq(ao) | |
422 | + | if ((bl == bl)) | |
405 | 423 | then { | |
406 | - | let | |
407 | - | if (( | |
408 | - | then [StringEntry( | |
424 | + | let bA = fromBase58String(bz) | |
425 | + | if ((bA == bA)) | |
426 | + | then [StringEntry(y(), bz)] | |
409 | 427 | else throw("Strict value is not equal to itself.") | |
410 | 428 | } | |
411 | 429 | else throw("Strict value is not equal to itself.") | |
413 | 431 | ||
414 | 432 | ||
415 | 433 | ||
416 | - | @Callable( | |
434 | + | @Callable(ao) | |
417 | 435 | func confirmManager () = { | |
418 | - | let | |
419 | - | let | |
436 | + | let bB = am() | |
437 | + | let bC = if (isDefined(bB)) | |
420 | 438 | then true | |
421 | 439 | else throw("No pending manager") | |
422 | - | if (( | |
440 | + | if ((bC == bC)) | |
423 | 441 | then { | |
424 | - | let | |
442 | + | let bD = if ((ao.callerPublicKey == value(bB))) | |
425 | 443 | then true | |
426 | 444 | else throw("You are not pending manager") | |
427 | - | if (( | |
428 | - | then [StringEntry( | |
445 | + | if ((bD == bD)) | |
446 | + | then [StringEntry(x(), toBase58String(value(bB))), DeleteEntry(y())] | |
429 | 447 | else throw("Strict value is not equal to itself.") | |
430 | 448 | } | |
431 | 449 | else throw("Strict value is not equal to itself.") | |
433 | 451 | ||
434 | 452 | ||
435 | 453 | ||
436 | - | @Callable( | |
437 | - | func priceAssetsREADONLY () = $Tuple2(nil, | |
454 | + | @Callable(ao) | |
455 | + | func priceAssetsREADONLY () = $Tuple2(nil, aa(getString(X()))) | |
438 | 456 | ||
439 | 457 | ||
440 | 458 | ||
441 | - | @Callable( | |
442 | - | func statusREADONLY ( | |
443 | - | let | |
444 | - | let | |
445 | - | if ($isInstanceOf( | |
459 | + | @Callable(ao) | |
460 | + | func statusREADONLY (B,C) = { | |
461 | + | let aA = { | |
462 | + | let ac = getString(A(B, C)) | |
463 | + | if ($isInstanceOf(ac, "String")) | |
446 | 464 | then { | |
447 | - | let | |
448 | - | | |
465 | + | let ad = ac | |
466 | + | ad | |
449 | 467 | } | |
450 | 468 | else unit | |
451 | 469 | } | |
452 | - | $Tuple2(nil, | |
470 | + | $Tuple2(nil, aA) | |
453 | 471 | } | |
454 | 472 | ||
455 | 473 | ||
456 | - | @Verifier( | |
457 | - | func | |
458 | - | let | |
459 | - | let | |
460 | - | if ($isInstanceOf( | |
474 | + | @Verifier(bE) | |
475 | + | func bF () = { | |
476 | + | let bG = { | |
477 | + | let ac = al() | |
478 | + | if ($isInstanceOf(ac, "ByteVector")) | |
461 | 479 | then { | |
462 | - | let | |
463 | - | | |
480 | + | let ap = ac | |
481 | + | ap | |
464 | 482 | } | |
465 | - | else if ($isInstanceOf( | |
466 | - | then | |
483 | + | else if ($isInstanceOf(ac, "Unit")) | |
484 | + | then bE.senderPublicKey | |
467 | 485 | else throw("Match error") | |
468 | 486 | } | |
469 | - | sigVerify( | |
487 | + | sigVerify(bE.bodyBytes, bE.proofs[0], bG) | |
470 | 488 | } | |
471 | 489 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "user_pools.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = "WAVES" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "VLTPOOL" | |
11 | 11 | ||
12 | - | func e (f) = makeString([a, ": ", f], "") | |
12 | + | let e = "STBLPOOL" | |
13 | + | ||
14 | + | let f = "Invalid price asset" | |
15 | + | ||
16 | + | func g (h) = makeString([a, ": ", h], "") | |
13 | 17 | ||
14 | 18 | ||
15 | - | func | |
19 | + | func i (h) = throw(g(h)) | |
16 | 20 | ||
17 | 21 | ||
18 | - | func | |
22 | + | func j () = i("Permission denied") | |
19 | 23 | ||
20 | 24 | ||
21 | - | func | |
25 | + | func k () = i("Create is not called for assets pair") | |
22 | 26 | ||
23 | 27 | ||
24 | - | func | |
28 | + | func l () = i("You are not amountAsset issuer") | |
25 | 29 | ||
26 | 30 | ||
27 | - | func | |
31 | + | func m () = i("Pool with such assets already exists") | |
28 | 32 | ||
29 | 33 | ||
30 | - | func | |
34 | + | func n () = i("Asset is not verified") | |
31 | 35 | ||
32 | 36 | ||
33 | - | func | |
37 | + | func o () = i(f) | |
34 | 38 | ||
35 | 39 | ||
36 | - | func | |
40 | + | func p () = i("Invalid fee asset") | |
37 | 41 | ||
38 | 42 | ||
39 | - | func | |
43 | + | func q () = i("Invalid amount asset attached") | |
40 | 44 | ||
41 | 45 | ||
42 | - | func | |
46 | + | func r () = i("Invalid status") | |
43 | 47 | ||
44 | 48 | ||
45 | - | func | |
49 | + | func s () = i("Can activate pool only in 'pending' status") | |
46 | 50 | ||
47 | 51 | ||
48 | - | func | |
52 | + | func t () = i("FactoryV2 returned not string") | |
49 | 53 | ||
50 | 54 | ||
51 | - | func | |
55 | + | func u () = i("invalid price asset amount") | |
52 | 56 | ||
53 | 57 | ||
54 | - | func | |
58 | + | func v () = i("invalid fee") | |
55 | 59 | ||
56 | 60 | ||
57 | - | func | |
61 | + | func w () = i("invalid asset pair") | |
58 | 62 | ||
59 | 63 | ||
60 | - | func | |
64 | + | func x () = makeString(["%s", "managerPublicKey"], b) | |
61 | 65 | ||
62 | 66 | ||
63 | - | func | |
67 | + | func y () = makeString(["%s", "pendingManagerPublicKey"], b) | |
64 | 68 | ||
65 | 69 | ||
66 | - | func | |
70 | + | func z () = makeString(["%s", "adminPubKeys"], b) | |
67 | 71 | ||
68 | 72 | ||
69 | - | func | |
73 | + | func A (B,C) = makeString(["%s%s%s", "status", B, C], b) | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
76 | + | func D () = makeString(["%s", "factoryContract"], b) | |
73 | 77 | ||
74 | 78 | ||
75 | - | func | |
79 | + | func E () = makeString(["%s", "assetsStoreContract"], b) | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
82 | + | func F () = makeString(["%s", "emissionContract"], b) | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func G (B,C) = makeString(["%s%s%s", "suffix", B, C], b) | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func H () = makeString(["%s", "lastIndex"], b) | |
85 | 89 | ||
86 | 90 | ||
87 | - | let | |
91 | + | let I = "u" | |
88 | 92 | ||
89 | - | let | |
93 | + | let J = "pending" | |
90 | 94 | ||
91 | - | let | |
95 | + | let K = "declined" | |
92 | 96 | ||
93 | - | let | |
97 | + | let L = "active" | |
94 | 98 | ||
95 | - | let | |
99 | + | let M = [J, K, L] | |
96 | 100 | ||
97 | - | func | |
101 | + | func N (B,C) = makeString(["%s%s%s", "createCalled", B, C], b) | |
98 | 102 | ||
99 | 103 | ||
100 | - | func | |
104 | + | func O (B,C) = makeString(["%s%s%s", "createCaller", B, C], b) | |
101 | 105 | ||
102 | 106 | ||
103 | - | func | |
107 | + | func P (B,C) = makeString(["%s%s%s", "amountAssetAmount", B, C], b) | |
104 | 108 | ||
105 | 109 | ||
106 | - | func | |
110 | + | func Q (B,C) = makeString(["%s%s%s", "priceAssetAmount", B, C], b) | |
107 | 111 | ||
108 | 112 | ||
109 | - | func | |
113 | + | func R (B,C) = makeString(["%s%s%s", "height", B, C], b) | |
110 | 114 | ||
111 | 115 | ||
112 | - | func | |
116 | + | func S (B,C) = makeString(["%s%s%s", "poolType", B, C], b) | |
113 | 117 | ||
114 | 118 | ||
115 | - | func | |
119 | + | func T () = makeString(["%s", "feeAssetId"], b) | |
116 | 120 | ||
117 | 121 | ||
118 | - | func | |
122 | + | func U () = makeString(["%s", "feeAmount"], b) | |
119 | 123 | ||
120 | 124 | ||
121 | - | func | |
125 | + | func V () = makeString(["%s", "amountAssetMinAmount"], b) | |
122 | 126 | ||
123 | 127 | ||
124 | - | func | |
128 | + | func W () = makeString(["%s", "priceAssetsMinAmount"], b) | |
125 | 129 | ||
126 | 130 | ||
127 | - | func | |
131 | + | func X () = makeString(["%s", "priceAssets"], b) | |
128 | 132 | ||
129 | 133 | ||
130 | - | func X (Y) = { | |
131 | - | let Z = Y | |
132 | - | if ($isInstanceOf(Z, "String")) | |
134 | + | func Y (Z) = valueOrErrorMessage(getString(this, Z), (Z + " is not defined")) | |
135 | + | ||
136 | + | ||
137 | + | func aa (ab) = { | |
138 | + | let ac = ab | |
139 | + | if ($isInstanceOf(ac, "String")) | |
133 | 140 | then { | |
134 | - | let | |
135 | - | if ((size( | |
141 | + | let ad = ac | |
142 | + | if ((size(ad) == 0)) | |
136 | 143 | then nil | |
137 | - | else split( | |
144 | + | else split(ad, b) | |
138 | 145 | } | |
139 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(ac, "Unit")) | |
140 | 147 | then nil | |
141 | 148 | else throw("Match error") | |
142 | 149 | } | |
143 | 150 | ||
144 | 151 | ||
145 | - | let | |
152 | + | let ae = addressFromStringValue(Y(D())) | |
146 | 153 | ||
147 | - | let | |
154 | + | let af = makeString(["%s", "votingEmissionContract"], b) | |
148 | 155 | ||
149 | - | let | |
156 | + | let ag = addressFromStringValue(valueOrErrorMessage(getString(ae, af), g("voting emission contract address is required"))) | |
150 | 157 | ||
151 | - | let | |
158 | + | let ah = makeString(["%s", "votingEmissionCandidateContract"], b) | |
152 | 159 | ||
153 | - | let | |
160 | + | let ai = addressFromStringValue(valueOrErrorMessage(getString(ag, ah), g("voting emission candidate contract address is required"))) | |
154 | 161 | ||
155 | - | func | |
162 | + | func aj (B,C) = valueOrElse(getBoolean(N(B, C)), false) | |
156 | 163 | ||
157 | 164 | ||
158 | - | func | |
165 | + | func ak (B,C) = if (aj(B, C)) | |
159 | 166 | then true | |
160 | - | else | |
167 | + | else k() | |
161 | 168 | ||
162 | 169 | ||
163 | - | func | |
164 | - | let | |
165 | - | if ($isInstanceOf( | |
170 | + | func al () = { | |
171 | + | let ac = getString(x()) | |
172 | + | if ($isInstanceOf(ac, "String")) | |
166 | 173 | then { | |
167 | - | let | |
168 | - | fromBase58String( | |
174 | + | let ad = ac | |
175 | + | fromBase58String(ad) | |
169 | 176 | } | |
170 | - | else if ($isInstanceOf( | |
177 | + | else if ($isInstanceOf(ac, "Unit")) | |
171 | 178 | then unit | |
172 | 179 | else throw("Match error") | |
173 | 180 | } | |
174 | 181 | ||
175 | 182 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
183 | + | func am () = { | |
184 | + | let ac = getString(y()) | |
185 | + | if ($isInstanceOf(ac, "String")) | |
179 | 186 | then { | |
180 | - | let | |
181 | - | fromBase58String( | |
187 | + | let ad = ac | |
188 | + | fromBase58String(ad) | |
182 | 189 | } | |
183 | - | else if ($isInstanceOf( | |
190 | + | else if ($isInstanceOf(ac, "Unit")) | |
184 | 191 | then unit | |
185 | 192 | else throw("Match error") | |
186 | 193 | } | |
187 | 194 | ||
188 | 195 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ($isInstanceOf( | |
196 | + | func an (ao) = { | |
197 | + | let ac = al() | |
198 | + | if ($isInstanceOf(ac, "ByteVector")) | |
192 | 199 | then { | |
193 | - | let | |
194 | - | ( | |
200 | + | let ap = ac | |
201 | + | (ao.callerPublicKey == ap) | |
195 | 202 | } | |
196 | - | else if ($isInstanceOf( | |
197 | - | then ( | |
203 | + | else if ($isInstanceOf(ac, "Unit")) | |
204 | + | then (ao.caller == this) | |
198 | 205 | else throw("Match error") | |
199 | 206 | } | |
200 | 207 | ||
201 | 208 | ||
202 | - | func | |
209 | + | func aq (ao) = if (an(ao)) | |
203 | 210 | then true | |
204 | - | else | |
211 | + | else j() | |
205 | 212 | ||
206 | 213 | ||
207 | - | func | |
208 | - | let | |
209 | - | if (containsElement( | |
214 | + | func ar (ao) = { | |
215 | + | let as = aa(getString(z())) | |
216 | + | if (containsElement(as, toBase58String(ao.callerPublicKey))) | |
210 | 217 | then true | |
211 | - | else | |
218 | + | else aq(ao) | |
212 | 219 | } | |
213 | 220 | ||
214 | 221 | ||
215 | - | func | |
222 | + | func at (au) = (valueOrElse(getInteger(addressFromStringValue(Y(E())), (("status_<" + au) + ">")), 0) == 2) | |
216 | 223 | ||
217 | 224 | ||
218 | - | func | |
219 | - | let | |
220 | - | if ($isInstanceOf( | |
225 | + | func av (aw) = { | |
226 | + | let ac = aw.assetId | |
227 | + | if ($isInstanceOf(ac, "ByteVector")) | |
221 | 228 | then { | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple2(toBase58String( | |
229 | + | let ax = ac | |
230 | + | let ay = value(assetInfo(ax)) | |
231 | + | $Tuple2(toBase58String(ax), ay) | |
225 | 232 | } | |
226 | - | else if ($isInstanceOf( | |
233 | + | else if ($isInstanceOf(ac, "Unit")) | |
227 | 234 | then $Tuple2(c, unit) | |
228 | 235 | else throw("Match error") | |
229 | 236 | } | |
230 | 237 | ||
231 | 238 | ||
232 | - | func | |
239 | + | func az (aA) = containsElement(M, aA) | |
233 | 240 | ||
234 | 241 | ||
235 | - | @Callable(al) | |
236 | - | func constructor (ay,az,aA,aB,aC,aD,aE) = { | |
237 | - | let aF = an(al) | |
238 | - | if ((aF == aF)) | |
239 | - | then [StringEntry(B(), ay), StringEntry(C(), az), StringEntry(D(), aA), StringEntry(T(), makeString(aB, b)), IntegerEntry(S(), aC), StringEntry(Q(), aD), IntegerEntry(R(), aE)] | |
240 | - | else throw("Strict value is not equal to itself.") | |
241 | - | } | |
242 | - | ||
243 | - | ||
244 | - | ||
245 | - | @Callable(al) | |
246 | - | func create () = { | |
247 | - | let aG = value(al.payments[0]) | |
248 | - | let aH = value(al.payments[1]) | |
249 | - | let aI = value(al.payments[2]) | |
250 | - | let aJ = as(aG) | |
242 | + | func aB (ao,aC) = { | |
243 | + | let aD = value(ao.payments[0]) | |
244 | + | let aE = value(ao.payments[1]) | |
245 | + | let aF = value(ao.payments[2]) | |
246 | + | let aG = av(aD) | |
247 | + | let aH = aG._1 | |
248 | + | let aI = aG._2 | |
249 | + | let aJ = av(aE) | |
251 | 250 | let aK = aJ._1 | |
252 | 251 | let aL = aJ._2 | |
253 | - | let aM = | |
252 | + | let aM = av(aF) | |
254 | 253 | let aN = aM._1 | |
255 | 254 | let aO = aM._2 | |
256 | - | let aP = as(aI) | |
257 | - | let aD = aP._1 | |
258 | - | let aQ = aP._2 | |
259 | - | let aR = X(getString(ab, U())) | |
260 | - | let aS = if ((aK != aN)) | |
255 | + | let aP = aa(getString(ae, X())) | |
256 | + | let aQ = if ((aH != aK)) | |
261 | 257 | then true | |
262 | - | else | |
263 | - | if (( | |
258 | + | else w() | |
259 | + | if ((aQ == aQ)) | |
264 | 260 | then { | |
265 | - | let | |
261 | + | let aR = if (if (an(ao)) | |
266 | 262 | then true | |
267 | - | else if (containsElement( | |
268 | - | then | |
263 | + | else if (containsElement(aP, aK)) | |
264 | + | then at(aH) | |
269 | 265 | else false) | |
270 | - | then $Tuple4( | |
271 | - | else if (if (containsElement( | |
272 | - | then | |
266 | + | then $Tuple4(aH, aD.amount, aK, aE.amount) | |
267 | + | else if (if (containsElement(aP, aH)) | |
268 | + | then at(aK) | |
273 | 269 | else false) | |
274 | - | then $Tuple4( | |
275 | - | else | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | then | |
270 | + | then $Tuple4(aK, aE.amount, aH, aD.amount) | |
271 | + | else w() | |
272 | + | let B = aR._1 | |
273 | + | let aS = aR._2 | |
274 | + | let C = aR._3 | |
275 | + | let aT = aR._4 | |
276 | + | let aU = 1 | |
277 | + | let aV = if (an(ao)) | |
278 | + | then aU | |
283 | 279 | else { | |
284 | - | let | |
285 | - | value(parseInt( | |
280 | + | let aW = valueOrErrorMessage(indexOf(aP, C), f) | |
281 | + | value(parseInt(aa(getString(W()))[aW])) | |
286 | 282 | } | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | if ($isInstanceOf( | |
293 | - | then | |
294 | - | else throw(($getType( | |
283 | + | let aX = valueOrElse(getInteger(H()), 0) | |
284 | + | let aY = (aX + 1) | |
285 | + | let aZ = addressFromStringValue(Y(F())) | |
286 | + | let ba = { | |
287 | + | let bb = invoke(ae, "poolExistsREADONLY", [B, C], nil) | |
288 | + | if ($isInstanceOf(bb, "Boolean")) | |
289 | + | then bb | |
290 | + | else throw(($getType(bb) + " couldn't be cast to Boolean")) | |
295 | 291 | } | |
296 | - | let | |
292 | + | let bc = [if (!(aj(B, C))) | |
297 | 293 | then true | |
298 | - | else | |
294 | + | else m(), if (!(ba)) | |
299 | 295 | then true | |
300 | - | else | |
296 | + | else m(), if (if (an(ao)) | |
301 | 297 | then true | |
302 | - | else (getString( | |
298 | + | else (getString(T()) == aN)) | |
303 | 299 | then true | |
304 | - | else | |
300 | + | else p(), if (if (an(ao)) | |
305 | 301 | then true | |
306 | - | else ( | |
302 | + | else (aS >= getIntegerValue(V()))) | |
307 | 303 | then true | |
308 | - | else | |
304 | + | else q(), if (if (an(ao)) | |
309 | 305 | then true | |
310 | - | else ( | |
306 | + | else (aT >= aV)) | |
311 | 307 | then true | |
312 | - | else | |
308 | + | else u(), if (if (an(ao)) | |
313 | 309 | then true | |
314 | - | else ( | |
310 | + | else (aF.amount == getInteger(U()))) | |
315 | 311 | then true | |
316 | - | else | |
317 | - | if (( | |
312 | + | else v()] | |
313 | + | if ((bc == bc)) | |
318 | 314 | then { | |
319 | - | let | |
320 | - | let | |
321 | - | then invoke( | |
315 | + | let bd = 3 | |
316 | + | let be = if ((size(ao.payments) >= bd)) | |
317 | + | then invoke(aZ, "burn", nil, [AttachedPayment(fromBase58String(aN), aF.amount)]) | |
322 | 318 | else unit | |
323 | - | if (( | |
324 | - | then [BooleanEntry( | |
319 | + | if ((be == be)) | |
320 | + | then [BooleanEntry(N(B, C), true), StringEntry(O(B, C), toString(ao.caller)), IntegerEntry(H(), aY), StringEntry(G(B, C), (toString(aY) + I)), IntegerEntry(R(B, C), height), StringEntry(A(B, C), J), IntegerEntry(P(B, C), aS), IntegerEntry(Q(B, C), aT), StringEntry(S(B, C), aC)] | |
325 | 321 | else throw("Strict value is not equal to itself.") | |
326 | 322 | } | |
327 | 323 | else throw("Strict value is not equal to itself.") | |
328 | 324 | } | |
329 | 325 | else throw("Strict value is not equal to itself.") | |
330 | 326 | } | |
331 | 327 | ||
332 | 328 | ||
329 | + | @Callable(ao) | |
330 | + | func constructor (bf,bg,bh,bi,bj,aN,bk) = { | |
331 | + | let bl = aq(ao) | |
332 | + | if ((bl == bl)) | |
333 | + | then [StringEntry(D(), bf), StringEntry(E(), bg), StringEntry(F(), bh), StringEntry(W(), makeString(bi, b)), IntegerEntry(V(), bj), StringEntry(T(), aN), IntegerEntry(U(), bk)] | |
334 | + | else throw("Strict value is not equal to itself.") | |
335 | + | } | |
333 | 336 | ||
334 | - | @Callable(al) | |
335 | - | func activate (bh,z,bi,A,bj,bk) = { | |
336 | - | let be = [ao(al), if (ag(z, A)) | |
337 | + | ||
338 | + | ||
339 | + | @Callable(ao) | |
340 | + | func create () = aB(ao, d) | |
341 | + | ||
342 | + | ||
343 | + | ||
344 | + | @Callable(ao) | |
345 | + | func createStable () = aB(ao, e) | |
346 | + | ||
347 | + | ||
348 | + | ||
349 | + | @Callable(ao) | |
350 | + | func activate (bm,B,bn,C,bo,bp) = { | |
351 | + | let bc = [ar(ao), if (aj(B, C)) | |
337 | 352 | then true | |
338 | - | else | |
353 | + | else k(), if ((value(getString(A(B, C))) == J)) | |
339 | 354 | then true | |
340 | - | else | |
341 | - | if (( | |
355 | + | else s()] | |
356 | + | if ((bc == bc)) | |
342 | 357 | then { | |
343 | - | let bl = invoke(ab, "activateNewPool", [bh, z, A, ((bi + bj) + "LP"), (((bi + "/") + bj) + " pool liquidity provider token"), 0, "VLTPOOL", bk], nil) | |
344 | - | if ((bl == bl)) | |
358 | + | let bq = getString(this, S(B, C)) | |
359 | + | let br = invoke(ae, "activateNewPool", [bm, B, C, ((bn + bo) + "LP"), (((bn + "/") + bo) + " pool liquidity provider token"), 0, if ((bq == unit)) | |
360 | + | then "VLTPOOL" | |
361 | + | else value(bq), bp], nil) | |
362 | + | if ((br == br)) | |
345 | 363 | then { | |
346 | - | let | |
347 | - | let | |
348 | - | if ($isInstanceOf( | |
364 | + | let bs = { | |
365 | + | let ac = br | |
366 | + | if ($isInstanceOf(ac, "String")) | |
349 | 367 | then { | |
350 | - | let | |
351 | - | | |
368 | + | let ax = ac | |
369 | + | ax | |
352 | 370 | } | |
353 | - | else | |
371 | + | else t() | |
354 | 372 | } | |
355 | - | if (( | |
373 | + | if ((bs == bs)) | |
356 | 374 | then { | |
357 | - | let | |
358 | - | if (( | |
375 | + | let bt = assetBalance(this, fromBase58String(bs)) | |
376 | + | if ((bt == bt)) | |
359 | 377 | then { | |
360 | - | let | |
378 | + | let bu = invoke(addressFromStringValue(bm), "put", [0, false], [AttachedPayment(if ((B == "WAVES")) | |
361 | 379 | then unit | |
362 | - | else fromBase58String( | |
380 | + | else fromBase58String(B), value(getInteger(P(B, C)))), AttachedPayment(if ((C == "WAVES")) | |
363 | 381 | then unit | |
364 | - | else fromBase58String( | |
365 | - | if (( | |
382 | + | else fromBase58String(C), value(getInteger(Q(B, C))))]) | |
383 | + | if ((bu == bu)) | |
366 | 384 | then { | |
367 | - | let | |
368 | - | if (( | |
385 | + | let bv = assetBalance(this, fromBase58String(bs)) | |
386 | + | if ((bv == bv)) | |
369 | 387 | then { | |
370 | - | let | |
371 | - | let | |
372 | - | if (( | |
373 | - | then [StringEntry( | |
388 | + | let bw = value(addressFromString(value(getString(O(B, C))))) | |
389 | + | let bx = invoke(ai, "approve", [B, C], nil) | |
390 | + | if ((bx == bx)) | |
391 | + | then [StringEntry(A(B, C), L), ScriptTransfer(bw, (bv - bt), fromBase58String(bs))] | |
374 | 392 | else throw("Strict value is not equal to itself.") | |
375 | 393 | } | |
376 | 394 | else throw("Strict value is not equal to itself.") | |
377 | 395 | } | |
378 | 396 | else throw("Strict value is not equal to itself.") | |
379 | 397 | } | |
380 | 398 | else throw("Strict value is not equal to itself.") | |
381 | 399 | } | |
382 | 400 | else throw("Strict value is not equal to itself.") | |
383 | 401 | } | |
384 | 402 | else throw("Strict value is not equal to itself.") | |
385 | 403 | } | |
386 | 404 | else throw("Strict value is not equal to itself.") | |
387 | 405 | } | |
388 | 406 | ||
389 | 407 | ||
390 | 408 | ||
391 | - | @Callable( | |
392 | - | func setAdmins ( | |
393 | - | let | |
394 | - | if (( | |
395 | - | then [StringEntry( | |
409 | + | @Callable(ao) | |
410 | + | func setAdmins (by) = { | |
411 | + | let bl = aq(ao) | |
412 | + | if ((bl == bl)) | |
413 | + | then [StringEntry(z(), makeString(by, b))] | |
396 | 414 | else throw("Strict value is not equal to itself.") | |
397 | 415 | } | |
398 | 416 | ||
399 | 417 | ||
400 | 418 | ||
401 | - | @Callable( | |
402 | - | func setManager ( | |
403 | - | let | |
404 | - | if (( | |
419 | + | @Callable(ao) | |
420 | + | func setManager (bz) = { | |
421 | + | let bl = aq(ao) | |
422 | + | if ((bl == bl)) | |
405 | 423 | then { | |
406 | - | let | |
407 | - | if (( | |
408 | - | then [StringEntry( | |
424 | + | let bA = fromBase58String(bz) | |
425 | + | if ((bA == bA)) | |
426 | + | then [StringEntry(y(), bz)] | |
409 | 427 | else throw("Strict value is not equal to itself.") | |
410 | 428 | } | |
411 | 429 | else throw("Strict value is not equal to itself.") | |
412 | 430 | } | |
413 | 431 | ||
414 | 432 | ||
415 | 433 | ||
416 | - | @Callable( | |
434 | + | @Callable(ao) | |
417 | 435 | func confirmManager () = { | |
418 | - | let | |
419 | - | let | |
436 | + | let bB = am() | |
437 | + | let bC = if (isDefined(bB)) | |
420 | 438 | then true | |
421 | 439 | else throw("No pending manager") | |
422 | - | if (( | |
440 | + | if ((bC == bC)) | |
423 | 441 | then { | |
424 | - | let | |
442 | + | let bD = if ((ao.callerPublicKey == value(bB))) | |
425 | 443 | then true | |
426 | 444 | else throw("You are not pending manager") | |
427 | - | if (( | |
428 | - | then [StringEntry( | |
445 | + | if ((bD == bD)) | |
446 | + | then [StringEntry(x(), toBase58String(value(bB))), DeleteEntry(y())] | |
429 | 447 | else throw("Strict value is not equal to itself.") | |
430 | 448 | } | |
431 | 449 | else throw("Strict value is not equal to itself.") | |
432 | 450 | } | |
433 | 451 | ||
434 | 452 | ||
435 | 453 | ||
436 | - | @Callable( | |
437 | - | func priceAssetsREADONLY () = $Tuple2(nil, | |
454 | + | @Callable(ao) | |
455 | + | func priceAssetsREADONLY () = $Tuple2(nil, aa(getString(X()))) | |
438 | 456 | ||
439 | 457 | ||
440 | 458 | ||
441 | - | @Callable( | |
442 | - | func statusREADONLY ( | |
443 | - | let | |
444 | - | let | |
445 | - | if ($isInstanceOf( | |
459 | + | @Callable(ao) | |
460 | + | func statusREADONLY (B,C) = { | |
461 | + | let aA = { | |
462 | + | let ac = getString(A(B, C)) | |
463 | + | if ($isInstanceOf(ac, "String")) | |
446 | 464 | then { | |
447 | - | let | |
448 | - | | |
465 | + | let ad = ac | |
466 | + | ad | |
449 | 467 | } | |
450 | 468 | else unit | |
451 | 469 | } | |
452 | - | $Tuple2(nil, | |
470 | + | $Tuple2(nil, aA) | |
453 | 471 | } | |
454 | 472 | ||
455 | 473 | ||
456 | - | @Verifier( | |
457 | - | func | |
458 | - | let | |
459 | - | let | |
460 | - | if ($isInstanceOf( | |
474 | + | @Verifier(bE) | |
475 | + | func bF () = { | |
476 | + | let bG = { | |
477 | + | let ac = al() | |
478 | + | if ($isInstanceOf(ac, "ByteVector")) | |
461 | 479 | then { | |
462 | - | let | |
463 | - | | |
480 | + | let ap = ac | |
481 | + | ap | |
464 | 482 | } | |
465 | - | else if ($isInstanceOf( | |
466 | - | then | |
483 | + | else if ($isInstanceOf(ac, "Unit")) | |
484 | + | then bE.senderPublicKey | |
467 | 485 | else throw("Match error") | |
468 | 486 | } | |
469 | - | sigVerify( | |
487 | + | sigVerify(bE.bodyBytes, bE.proofs[0], bG) | |
470 | 488 | } | |
471 | 489 |
github/deemru/w8io/026f985 166.02 ms ◑