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