tx · AbKzGgoyXD78oYVqqA8tzZ8HChnQzyoDg9V168np9vLL 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T: -0.01400000 Waves 2023.05.10 13:18 [2571658] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves
{ "type": 13, "id": "AbKzGgoyXD78oYVqqA8tzZ8HChnQzyoDg9V168np9vLL", "fee": 1400000, "feeAssetId": null, "timestamp": 1683713888978, "version": 2, "chainId": 84, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "3kEos3gpx3oWZcG6WUZesSHjboNCPKAFjyWSs52U8f1EporDV9KngRujWL9RcAzRbeC6EVwTiiPjX6LTqjs9dkU3" ], "script": "base64:BgKiDAgCEg0KCwgICAgICAEIAQgBEgMKAQESBAoCCAgSBQoDCAgEEgQKAggIEgMKAQESAwoBARIECgIICBIECgIICCIJc2VwYXJhdG9yIgxrZXlGZWVBbW91bnQiDmtleVVzZG5Bc3NldElkIg5rZXlFcG9jaExlbmd0aCIRa2V5RmluYWxpemVSZXdhcmQiDGtleVd4QXNzZXRJZCIWa2V5QXNzZXRzU3RvcmVDb250cmFjdCITa2V5VXNlclBvb2xDb250cmFjdCITa2V5RW1pc3Npb25Db250cmFjdCITa2V5Qm9vc3RpbmdDb250cmFjdCISa2V5RmFjdG9yeUNvbnRyYWN0IhlrZXlWb3RpbmdFbWlzc2lvbkNvbnRyYWN0IgxrZXlUaHJlc2hvbGQiD2dldFN0cmluZ09yRmFpbCIDa2V5IgxnZXRJbnRPckZhaWwiEGtleUluTGlzdEFzc2V0SWQiDWFtb3VudEFzc2V0SWQiDHByaWNlQXNzZXRJZCIPa2V5U3VnZ2VzdEluZGV4Ig5rZXlTdGFydEhlaWdodCIMc3VnZ2VzdEluZGV4Ig9rZXlWb3RpbmdSZXN1bHQiCnRvdGF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ml0BQJhUQkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFXAQdhcHByb3ZlAgFyAXMEAmFXAwkAAAIIBQFXBmNhbGxlcgUBUgYJAQFZAQUBVwMJAAACBQJhVwUCYVcEAmFVCQDMCAIJAPwHBAUBUQIWc2V0V3hFbWlzc2lvblBvb2xMYWJlbAkAzAgCBQFyCQDMCAIFAXMFA25pbAUDbmlsCQDMCAIJAPwHBAUBUwIGY3JlYXRlCQDMCAIFAXIJAMwIAgUBcwUDbmlsBQNuaWwFA25pbAMJAAACBQJhVQUCYVUJAJQKAgUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJhWAECYVkABAJhWgQBTAkBAVQAAwkAAQIFAUwCCkJ5dGVWZWN0b3IEAVgFAUwFAVgDCQABAgUBTAIEVW5pdAgFAmFYD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJhWAlib2R5Qnl0ZXMJAJEDAggFAmFYBnByb29mcwAABQJhWlVPg14=", "height": 2571658, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6mJoi84NMtLPsVKujuiyDpB2TUDHx7qcAZE9KoSqQSZj Next: none Diff:
Old | New | Differences | |
---|---|---|---|
70 | 70 | func I () = "%s__managerPublicKey" | |
71 | 71 | ||
72 | 72 | ||
73 | - | func J () = "%s__ | |
73 | + | func J () = "%s__managerVaultAddress" | |
74 | 74 | ||
75 | 75 | ||
76 | - | let K = addressFromStringValue(n(g)) | |
76 | + | func K () = { | |
77 | + | let L = getString(J()) | |
78 | + | if ($isInstanceOf(L, "String")) | |
79 | + | then { | |
80 | + | let M = L | |
81 | + | addressFromStringValue(M) | |
82 | + | } | |
83 | + | else this | |
84 | + | } | |
77 | 85 | ||
78 | - | let L = addressFromStringValue(n(j)) | |
79 | 86 | ||
80 | - | let | |
87 | + | let N = addressFromStringValue(n(g)) | |
81 | 88 | ||
82 | - | let | |
89 | + | let O = addressFromStringValue(n(j)) | |
83 | 90 | ||
84 | - | let | |
91 | + | let P = addressFromStringValue(n(i)) | |
85 | 92 | ||
86 | - | let | |
93 | + | let Q = addressFromStringValue(n(k)) | |
87 | 94 | ||
88 | - | func Q () = { | |
89 | - | let R = getString(I()) | |
90 | - | if ($isInstanceOf(R, "String")) | |
95 | + | let R = addressFromStringValue(n(h)) | |
96 | + | ||
97 | + | let S = addressFromStringValue(n(l)) | |
98 | + | ||
99 | + | func T () = { | |
100 | + | let U = K() | |
101 | + | let L = getString(U, I()) | |
102 | + | if ($isInstanceOf(L, "String")) | |
91 | 103 | then { | |
92 | - | let | |
93 | - | fromBase58String( | |
104 | + | let M = L | |
105 | + | fromBase58String(M) | |
94 | 106 | } | |
95 | - | else if ($isInstanceOf( | |
107 | + | else if ($isInstanceOf(L, "Unit")) | |
96 | 108 | then unit | |
97 | 109 | else throw("Match error") | |
98 | 110 | } | |
99 | 111 | ||
100 | 112 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
113 | + | func V (W) = { | |
114 | + | let L = T() | |
115 | + | if ($isInstanceOf(L, "ByteVector")) | |
104 | 116 | then { | |
105 | - | let | |
106 | - | | |
117 | + | let X = L | |
118 | + | (W.callerPublicKey == X) | |
107 | 119 | } | |
108 | - | else if ($isInstanceOf( | |
109 | - | then | |
120 | + | else if ($isInstanceOf(L, "Unit")) | |
121 | + | then (W.caller == this) | |
110 | 122 | else throw("Match error") | |
111 | 123 | } | |
112 | 124 | ||
113 | 125 | ||
114 | - | func U (V) = { | |
115 | - | let R = Q() | |
116 | - | if ($isInstanceOf(R, "ByteVector")) | |
117 | - | then { | |
118 | - | let W = R | |
119 | - | (V.callerPublicKey == W) | |
120 | - | } | |
121 | - | else if ($isInstanceOf(R, "Unit")) | |
122 | - | then (V.caller == this) | |
123 | - | else throw("Match error") | |
124 | - | } | |
125 | - | ||
126 | - | ||
127 | - | func X (V) = if (U(V)) | |
126 | + | func Y (W) = if (V(W)) | |
128 | 127 | then true | |
129 | 128 | else throw("permission denied") | |
130 | 129 | ||
131 | 130 | ||
132 | - | func | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
131 | + | func Z (aa) = { | |
132 | + | let L = aa | |
133 | + | if ($isInstanceOf(L, "Int")) | |
135 | 134 | then { | |
136 | - | let | |
137 | - | | |
135 | + | let ab = L | |
136 | + | ab | |
138 | 137 | } | |
139 | 138 | else throw("failed to cast into Integer") | |
140 | 139 | } | |
141 | 140 | ||
142 | 141 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
142 | + | @Callable(W) | |
143 | + | func constructor (ac,ad,ae,af,ag,ah,ai,aj,ak,al,am) = { | |
144 | + | let an = [Y(W), if (isDefined(addressFromString(ac))) | |
146 | 145 | then true | |
147 | - | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString( | |
146 | + | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(ad))) | |
148 | 147 | then true | |
149 | - | else throw("Invalid boosting contract address"), if (isDefined(addressFromString( | |
148 | + | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(ag))) | |
150 | 149 | then true | |
151 | - | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString( | |
150 | + | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(ae))) | |
152 | 151 | then true | |
153 | - | else throw("Invalid emission contract address"), if (isDefined(addressFromString( | |
152 | + | else throw("Invalid emission contract address"), if (isDefined(addressFromString(af))) | |
154 | 153 | then true | |
155 | - | else throw("Invalid factory contract address"), if (( | |
154 | + | else throw("Invalid factory contract address"), if ((ai >= 0)) | |
156 | 155 | then true | |
157 | - | else throw("Invalid fee amount"), if (( | |
156 | + | else throw("Invalid fee amount"), if ((ak > 0)) | |
158 | 157 | then true | |
159 | - | else throw("Invalid voting duration"), if (( | |
158 | + | else throw("Invalid voting duration"), if ((am >= 0)) | |
160 | 159 | then true | |
161 | - | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String( | |
160 | + | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(aj)))) | |
162 | 161 | then true | |
163 | - | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String( | |
162 | + | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(al)))) | |
164 | 163 | then true | |
165 | 164 | else throw("Invalid USDN asset ID")] | |
166 | - | if (( | |
167 | - | then $Tuple2([StringEntry(g, | |
165 | + | if ((an == an)) | |
166 | + | then $Tuple2([StringEntry(g, ac), StringEntry(j, ad), StringEntry(i, ae), StringEntry(k, af), StringEntry(h, ag), StringEntry(l, ah), IntegerEntry(b, ai), IntegerEntry(d, ak), IntegerEntry(e, am), StringEntry(f, aj), StringEntry(c, al)], unit) | |
168 | 167 | else throw("Strict value is not equal to itself.") | |
169 | 168 | } | |
170 | 169 | ||
171 | 170 | ||
172 | 171 | ||
173 | - | @Callable( | |
174 | - | func constructorV2 ( | |
175 | - | let | |
172 | + | @Callable(W) | |
173 | + | func constructorV2 (ao) = { | |
174 | + | let an = [Y(W), if ((ao > 0)) | |
176 | 175 | then true | |
177 | 176 | else throw("invalid threshold")] | |
178 | - | if (( | |
179 | - | then $Tuple2([IntegerEntry(m, | |
177 | + | if ((an == an)) | |
178 | + | then $Tuple2([IntegerEntry(m, ao)], unit) | |
180 | 179 | else throw("Strict value is not equal to itself.") | |
181 | 180 | } | |
182 | 181 | ||
183 | 182 | ||
184 | 183 | ||
185 | - | @Callable( | |
184 | + | @Callable(W) | |
186 | 185 | func suggest (r,s) = { | |
187 | 186 | let G = $Tuple2(r, s) | |
188 | - | let | |
189 | - | let | |
187 | + | let ap = value(W.payments[0]) | |
188 | + | let aq = if ((r == "WAVES")) | |
190 | 189 | then unit | |
191 | 190 | else { | |
192 | - | let | |
193 | - | if (( | |
191 | + | let ar = valueOrErrorMessage(assetInfo(fromBase58String(r)), "invalid amountAssetId ID") | |
192 | + | if ((ar.scripted == false)) | |
194 | 193 | then true | |
195 | 194 | else throw("asset is smart") | |
196 | 195 | } | |
197 | - | if (( | |
196 | + | if ((aq == aq)) | |
198 | 197 | then { | |
199 | - | let | |
198 | + | let an = [if ((toBase58String(value(ap.assetId)) == value(getString(f)))) | |
200 | 199 | then true | |
201 | - | else throw("invalid fee asset"), if (( | |
200 | + | else throw("invalid fee asset"), if ((ap.amount == value(getInteger(b)))) | |
202 | 201 | then true | |
203 | 202 | else throw("invalid fee amount"), if ((getInteger(q(r, s)) == unit)) | |
204 | 203 | then true | |
205 | - | else throw("already in voting list"), if (!(valueOrElse(getBoolean( | |
204 | + | else throw("already in voting list"), if (!(valueOrElse(getBoolean(S, F(G)), false))) | |
206 | 205 | then true | |
207 | 206 | else throw("pool is in emission voting list")] | |
208 | - | if (( | |
207 | + | if ((an == an)) | |
209 | 208 | then { | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
209 | + | let as = { | |
210 | + | let L = invoke(R, "statusREADONLY", [r, s], nil) | |
211 | + | if ($isInstanceOf(L, "String")) | |
213 | 212 | then { | |
214 | - | let | |
215 | - | if (( | |
213 | + | let M = L | |
214 | + | if ((M == "active")) | |
216 | 215 | then true | |
217 | 216 | else throw("user pool is not active") | |
218 | 217 | } | |
219 | 218 | else throw("user pool is not active") | |
220 | 219 | } | |
221 | - | if (( | |
220 | + | if ((as == as)) | |
222 | 221 | then { | |
223 | - | let | |
222 | + | let at = if (V(W)) | |
224 | 223 | then unit | |
225 | 224 | else { | |
226 | - | let | |
227 | - | let | |
228 | - | if ($isInstanceOf( | |
225 | + | let au = { | |
226 | + | let L = invoke(N, "isVerifiedREADONLY", [r], nil) | |
227 | + | if ($isInstanceOf(L, "Boolean")) | |
229 | 228 | then { | |
230 | - | let | |
231 | - | if ( | |
229 | + | let av = L | |
230 | + | if (av) | |
232 | 231 | then true | |
233 | 232 | else throw("asset is not verified") | |
234 | 233 | } | |
235 | 234 | else throw("asset is not verified") | |
236 | 235 | } | |
237 | - | if (( | |
236 | + | if ((au == au)) | |
238 | 237 | then unit | |
239 | 238 | else throw("Strict value is not equal to itself.") | |
240 | 239 | } | |
241 | - | if (( | |
240 | + | if ((at == at)) | |
242 | 241 | then { | |
243 | - | let | |
244 | - | if (( | |
242 | + | let aw = invoke(P, "burn", nil, [AttachedPayment(ap.assetId, ap.amount)]) | |
243 | + | if ((aw == aw)) | |
245 | 244 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
245 | + | let ax = { | |
246 | + | let L = getInteger(t(r, s)) | |
247 | + | if ($isInstanceOf(L, "Int")) | |
249 | 248 | then { | |
250 | - | let | |
251 | - | ( | |
249 | + | let ay = L | |
250 | + | (ay + 1) | |
252 | 251 | } | |
253 | 252 | else 0 | |
254 | 253 | } | |
255 | - | $Tuple2([IntegerEntry(q(r, s), | |
254 | + | $Tuple2([IntegerEntry(q(r, s), ax), IntegerEntry(u(r, s, ax), height), StringEntry(w(r, s, ax), x("0", "0")), IntegerEntry(t(r, s), ax)], unit) | |
256 | 255 | } | |
257 | 256 | else throw("Strict value is not equal to itself.") | |
258 | 257 | } | |
267 | 266 | ||
268 | 267 | ||
269 | 268 | ||
270 | - | @Callable( | |
271 | - | func vote (r,s, | |
269 | + | @Callable(W) | |
270 | + | func vote (r,s,az) = { | |
272 | 271 | let v = value(getInteger(q(r, s))) | |
273 | - | let | |
274 | - | let | |
272 | + | let aA = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
273 | + | let an = [if (isDefined(getInteger(q(r, s)))) | |
275 | 274 | then true | |
276 | - | else throw("the token isn't on the voting list"), if (( | |
275 | + | else throw("the token isn't on the voting list"), if ((aA > height)) | |
277 | 276 | then true | |
278 | 277 | else throw("too late to vote")] | |
279 | - | if (( | |
278 | + | if ((an == an)) | |
280 | 279 | then { | |
281 | - | let D = invoke( | |
282 | - | let | |
280 | + | let D = invoke(O, "getUserGwxAmountAtHeightREADONLY", [toString(W.caller), aA], nil) | |
281 | + | let aB = if ((Z(D) > 0)) | |
283 | 282 | then true | |
284 | 283 | else throw("you don't have gwx") | |
285 | - | if (( | |
284 | + | if ((aB == aB)) | |
286 | 285 | then { | |
287 | 286 | let E = { | |
288 | - | let | |
289 | - | if ($isInstanceOf( | |
287 | + | let L = getString(A(r, s, v, toString(W.caller))) | |
288 | + | if ($isInstanceOf(L, "String")) | |
290 | 289 | then { | |
291 | - | let | |
292 | - | let E = split( | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | then ( | |
290 | + | let M = L | |
291 | + | let E = split(M, a) | |
292 | + | let aC = E[1] | |
293 | + | let aD = E[2] | |
294 | + | let aE = if (if ((aD == "yes")) | |
295 | + | then (az == true) | |
297 | 296 | else false) | |
298 | 297 | then true | |
299 | - | else if (( | |
300 | - | then ( | |
298 | + | else if ((aD == "no")) | |
299 | + | then (az == false) | |
301 | 300 | else false | |
302 | - | let | |
303 | - | then ( | |
301 | + | let aF = if (aE) | |
302 | + | then (Z(D) == parseIntValue(aC)) | |
304 | 303 | else false | |
305 | - | let | |
306 | - | then | |
304 | + | let aG = if (if (aE) | |
305 | + | then aF | |
307 | 306 | else false) | |
308 | 307 | then throw("you already voted") | |
309 | 308 | else invoke(this, "cancelVote", [r, s], nil) | |
310 | - | | |
309 | + | aG | |
311 | 310 | } | |
312 | - | else if ($isInstanceOf( | |
311 | + | else if ($isInstanceOf(L, "Unit")) | |
313 | 312 | then { | |
314 | - | let | |
315 | - | | |
313 | + | let aH = L | |
314 | + | aH | |
316 | 315 | } | |
317 | 316 | else throw("Match error") | |
318 | 317 | } | |
319 | 318 | if ((E == E)) | |
320 | 319 | then { | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
320 | + | let aI = split(value(getString(w(r, s, v))), a) | |
321 | + | let aJ = aI[1] | |
322 | + | let aK = aI[2] | |
323 | + | let aL = if (az) | |
325 | 324 | then { | |
326 | - | let | |
327 | - | [toString( | |
325 | + | let aM = (parseIntValue(aJ) + Z(D)) | |
326 | + | [toString(aM), aK] | |
328 | 327 | } | |
329 | 328 | else { | |
330 | - | let | |
331 | - | [ | |
329 | + | let aN = (parseIntValue(aK) + Z(D)) | |
330 | + | [aJ, toString(aN)] | |
332 | 331 | } | |
333 | - | let | |
334 | - | let | |
335 | - | $Tuple2([StringEntry(w(r, s, v), x( | |
332 | + | let aO = A(r, s, v, toString(W.caller)) | |
333 | + | let aC = C(toString(Z(D)), az) | |
334 | + | $Tuple2([StringEntry(w(r, s, v), x(aL[0], aL[1])), StringEntry(aO, aC)], unit) | |
336 | 335 | } | |
337 | 336 | else throw("Strict value is not equal to itself.") | |
338 | 337 | } | |
343 | 342 | ||
344 | 343 | ||
345 | 344 | ||
346 | - | @Callable( | |
345 | + | @Callable(W) | |
347 | 346 | func cancelVote (r,s) = { | |
348 | - | let | |
349 | - | then toString( | |
350 | - | else toString( | |
347 | + | let aP = if ((W.caller == this)) | |
348 | + | then toString(W.originCaller) | |
349 | + | else toString(W.caller) | |
351 | 350 | let v = value(getInteger(q(r, s))) | |
352 | - | let | |
351 | + | let an = [if (isDefined(getString(w(r, s, v)))) | |
353 | 352 | then true | |
354 | 353 | else throw("no vote for assets pair")] | |
355 | - | if (( | |
354 | + | if ((an == an)) | |
356 | 355 | then { | |
357 | - | let E = split(value(getString(A(r, s, v, | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
356 | + | let E = split(value(getString(A(r, s, v, aP))), a) | |
357 | + | let aC = E[1] | |
358 | + | let aD = E[2] | |
359 | + | let aI = split(value(getString(w(r, s, v))), a) | |
360 | + | let aJ = aI[1] | |
361 | + | let aK = aI[2] | |
362 | + | let aQ = if ((aD == "yes")) | |
364 | 363 | then { | |
365 | - | let | |
366 | - | $Tuple2([StringEntry(w(r, s, v), x(toString( | |
364 | + | let aM = (parseIntValue(aJ) - parseIntValue(aC)) | |
365 | + | $Tuple2([StringEntry(w(r, s, v), x(toString(aM), aK)), DeleteEntry(A(r, s, v, aP))], unit) | |
367 | 366 | } | |
368 | 367 | else { | |
369 | - | let | |
370 | - | $Tuple2([StringEntry(w(r, s, v), x( | |
368 | + | let aN = (parseIntValue(aK) - parseIntValue(aC)) | |
369 | + | $Tuple2([StringEntry(w(r, s, v), x(aJ, toString(aN))), DeleteEntry(A(r, s, v, aP))], unit) | |
371 | 370 | } | |
372 | - | | |
371 | + | aQ | |
373 | 372 | } | |
374 | 373 | else throw("Strict value is not equal to itself.") | |
375 | 374 | } | |
376 | 375 | ||
377 | 376 | ||
378 | 377 | ||
379 | - | @Callable( | |
380 | - | func setFee ( | |
381 | - | let | |
382 | - | if (( | |
383 | - | then [IntegerEntry(b, | |
378 | + | @Callable(W) | |
379 | + | func setFee (aR) = { | |
380 | + | let an = [Y(W)] | |
381 | + | if ((an == an)) | |
382 | + | then [IntegerEntry(b, aR)] | |
384 | 383 | else throw("Strict value is not equal to itself.") | |
385 | 384 | } | |
386 | 385 | ||
387 | 386 | ||
388 | 387 | ||
389 | - | @Callable( | |
390 | - | func setThreshold ( | |
391 | - | let | |
388 | + | @Callable(W) | |
389 | + | func setThreshold (aS) = { | |
390 | + | let an = [Y(W), if ((aS > 0)) | |
392 | 391 | then true | |
393 | 392 | else throw("invalid threshold")] | |
394 | - | if (( | |
395 | - | then $Tuple2([IntegerEntry(m, | |
393 | + | if ((an == an)) | |
394 | + | then $Tuple2([IntegerEntry(m, aS)], unit) | |
396 | 395 | else throw("Strict value is not equal to itself.") | |
397 | 396 | } | |
398 | 397 | ||
399 | 398 | ||
400 | 399 | ||
401 | - | @Callable( | |
400 | + | @Callable(W) | |
402 | 401 | func finalize (r,s) = { | |
403 | 402 | let v = value(getInteger(q(r, s))) | |
404 | - | let | |
405 | - | let | |
403 | + | let aA = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
404 | + | let an = [if (isDefined(getInteger(q(r, s)))) | |
406 | 405 | then true | |
407 | - | else throw("no assets pair"), if ((height >= | |
406 | + | else throw("no assets pair"), if ((height >= aA)) | |
408 | 407 | then true | |
409 | 408 | else throw("insufficient height for completion")] | |
410 | - | if (( | |
409 | + | if ((an == an)) | |
411 | 410 | then { | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | then ( | |
411 | + | let aI = split(value(getString(w(r, s, v))), a) | |
412 | + | let aJ = parseIntValue(aI[1]) | |
413 | + | let aK = parseIntValue(aI[2]) | |
414 | + | let aT = (aJ + aK) | |
415 | + | let ao = p(m) | |
416 | + | let aQ = if (if ((aT >= ao)) | |
417 | + | then (aJ > aK) | |
419 | 418 | else false) | |
420 | 419 | then { | |
421 | - | let | |
422 | - | if (( | |
420 | + | let aU = invoke(Q, "setWxEmissionPoolLabel", [r, s], nil) | |
421 | + | if ((aU == aU)) | |
423 | 422 | then { | |
424 | - | let | |
425 | - | if (( | |
423 | + | let aV = invoke(S, "create", [r, s], nil) | |
424 | + | if ((aV == aV)) | |
426 | 425 | then $Tuple2([DeleteEntry(q(r, s))], unit) | |
427 | 426 | else throw("Strict value is not equal to itself.") | |
428 | 427 | } | |
429 | 428 | else throw("Strict value is not equal to itself.") | |
430 | 429 | } | |
431 | 430 | else $Tuple2([DeleteEntry(q(r, s))], unit) | |
432 | - | | |
431 | + | aQ | |
433 | 432 | } | |
434 | 433 | else throw("Strict value is not equal to itself.") | |
435 | 434 | } | |
436 | 435 | ||
437 | 436 | ||
438 | 437 | ||
439 | - | @Callable( | |
438 | + | @Callable(W) | |
440 | 439 | func approve (r,s) = { | |
441 | - | let | |
440 | + | let aW = if ((W.caller == R)) | |
442 | 441 | then true | |
443 | - | else | |
444 | - | if (( | |
442 | + | else Y(W) | |
443 | + | if ((aW == aW)) | |
445 | 444 | then { | |
446 | - | let | |
447 | - | if (( | |
445 | + | let aU = [invoke(Q, "setWxEmissionPoolLabel", [r, s], nil), invoke(S, "create", [r, s], nil)] | |
446 | + | if ((aU == aU)) | |
448 | 447 | then $Tuple2(nil, unit) | |
449 | 448 | else throw("Strict value is not equal to itself.") | |
450 | 449 | } | |
452 | 451 | } | |
453 | 452 | ||
454 | 453 | ||
455 | - | ||
456 | - | @Callable(V) | |
457 | - | func setManager (aW) = { | |
458 | - | let aV = X(V) | |
459 | - | if ((aV == aV)) | |
460 | - | then { | |
461 | - | let aX = fromBase58String(aW) | |
462 | - | if ((aX == aX)) | |
463 | - | then [StringEntry(J(), aW)] | |
464 | - | else throw("Strict value is not equal to itself.") | |
465 | - | } | |
466 | - | else throw("Strict value is not equal to itself.") | |
467 | - | } | |
468 | - | ||
469 | - | ||
470 | - | ||
471 | - | @Callable(V) | |
472 | - | func confirmManager () = { | |
473 | - | let aY = T() | |
474 | - | let aZ = if (isDefined(aY)) | |
475 | - | then true | |
476 | - | else throw("no pending manager") | |
477 | - | if ((aZ == aZ)) | |
478 | - | then { | |
479 | - | let ba = if ((V.callerPublicKey == value(aY))) | |
480 | - | then true | |
481 | - | else throw("you are not pending manager") | |
482 | - | if ((ba == ba)) | |
483 | - | then [StringEntry(I(), toBase58String(value(aY))), DeleteEntry(J())] | |
484 | - | else throw("Strict value is not equal to itself.") | |
485 | - | } | |
486 | - | else throw("Strict value is not equal to itself.") | |
487 | - | } | |
488 | - | ||
489 | - | ||
490 | - | @Verifier(bb) | |
491 | - | func bc () = { | |
492 | - | let bd = { | |
493 | - | let R = Q() | |
494 | - | if ($isInstanceOf(R, "ByteVector")) | |
454 | + | @Verifier(aX) | |
455 | + | func aY () = { | |
456 | + | let aZ = { | |
457 | + | let L = T() | |
458 | + | if ($isInstanceOf(L, "ByteVector")) | |
495 | 459 | then { | |
496 | - | let | |
497 | - | | |
460 | + | let X = L | |
461 | + | X | |
498 | 462 | } | |
499 | - | else if ($isInstanceOf( | |
500 | - | then | |
463 | + | else if ($isInstanceOf(L, "Unit")) | |
464 | + | then aX.senderPublicKey | |
501 | 465 | else throw("Match error") | |
502 | 466 | } | |
503 | - | sigVerify( | |
467 | + | sigVerify(aX.bodyBytes, aX.proofs[0], aZ) | |
504 | 468 | } | |
505 | 469 |
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 = makeString(["%s", "fee"], a) | |
7 | 7 | ||
8 | 8 | let c = makeString(["%s", "usdnAssetId"], a) | |
9 | 9 | ||
10 | 10 | let d = makeString(["%s", "epochLength"], a) | |
11 | 11 | ||
12 | 12 | let e = makeString(["%s", "finalizeReward"], a) | |
13 | 13 | ||
14 | 14 | let f = makeString(["%s", "wxAssetId"], a) | |
15 | 15 | ||
16 | 16 | let g = makeString(["%s", "assetsStoreContract"], a) | |
17 | 17 | ||
18 | 18 | let h = makeString(["%s", "userPoolContract"], a) | |
19 | 19 | ||
20 | 20 | let i = makeString(["%s", "emissionContract"], a) | |
21 | 21 | ||
22 | 22 | let j = makeString(["%s", "boostingContract"], a) | |
23 | 23 | ||
24 | 24 | let k = makeString(["%s", "factoryContract"], a) | |
25 | 25 | ||
26 | 26 | let l = makeString(["%s", "votingEmissionContract"], a) | |
27 | 27 | ||
28 | 28 | let m = makeString(["%s", "votingThreshold"], a) | |
29 | 29 | ||
30 | 30 | func n (o) = valueOrErrorMessage(getString(this, o), (o + " is not defined")) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func p (o) = valueOrErrorMessage(getInteger(this, o), (o + " is not defined")) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func q (r,s) = makeString(["%s%s%s", "inList", r, s], a) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func t (r,s) = makeString(["%s%s%s", "suggestIndex", r, s], a) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func u (r,s,v) = makeString(["%s%s%s%d", "startHeight", r, s, toString(v)], a) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func w (r,s,v) = makeString(["%s%s%s%d", "votingResult", r, s, toString(v)], a) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func x (y,z) = makeString(["%d%d", y, z], a) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func A (r,s,v,B) = makeString(["%s%s%s%d%s", "vote", r, s, toString(v), B], a) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func C (D,E) = { | |
55 | 55 | let o = if (E) | |
56 | 56 | then makeString(["%d%s", D, "yes"], a) | |
57 | 57 | else makeString(["%d%s", D, "no"], a) | |
58 | 58 | o | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func F (G) = { | |
63 | 63 | let H = G | |
64 | 64 | let r = H._1 | |
65 | 65 | let s = H._2 | |
66 | 66 | makeString(["%s%s%s", "inList", r, s], a) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func I () = "%s__managerPublicKey" | |
71 | 71 | ||
72 | 72 | ||
73 | - | func J () = "%s__ | |
73 | + | func J () = "%s__managerVaultAddress" | |
74 | 74 | ||
75 | 75 | ||
76 | - | let K = addressFromStringValue(n(g)) | |
76 | + | func K () = { | |
77 | + | let L = getString(J()) | |
78 | + | if ($isInstanceOf(L, "String")) | |
79 | + | then { | |
80 | + | let M = L | |
81 | + | addressFromStringValue(M) | |
82 | + | } | |
83 | + | else this | |
84 | + | } | |
77 | 85 | ||
78 | - | let L = addressFromStringValue(n(j)) | |
79 | 86 | ||
80 | - | let | |
87 | + | let N = addressFromStringValue(n(g)) | |
81 | 88 | ||
82 | - | let | |
89 | + | let O = addressFromStringValue(n(j)) | |
83 | 90 | ||
84 | - | let | |
91 | + | let P = addressFromStringValue(n(i)) | |
85 | 92 | ||
86 | - | let | |
93 | + | let Q = addressFromStringValue(n(k)) | |
87 | 94 | ||
88 | - | func Q () = { | |
89 | - | let R = getString(I()) | |
90 | - | if ($isInstanceOf(R, "String")) | |
95 | + | let R = addressFromStringValue(n(h)) | |
96 | + | ||
97 | + | let S = addressFromStringValue(n(l)) | |
98 | + | ||
99 | + | func T () = { | |
100 | + | let U = K() | |
101 | + | let L = getString(U, I()) | |
102 | + | if ($isInstanceOf(L, "String")) | |
91 | 103 | then { | |
92 | - | let | |
93 | - | fromBase58String( | |
104 | + | let M = L | |
105 | + | fromBase58String(M) | |
94 | 106 | } | |
95 | - | else if ($isInstanceOf( | |
107 | + | else if ($isInstanceOf(L, "Unit")) | |
96 | 108 | then unit | |
97 | 109 | else throw("Match error") | |
98 | 110 | } | |
99 | 111 | ||
100 | 112 | ||
101 | - | func | |
102 | - | let | |
103 | - | if ($isInstanceOf( | |
113 | + | func V (W) = { | |
114 | + | let L = T() | |
115 | + | if ($isInstanceOf(L, "ByteVector")) | |
104 | 116 | then { | |
105 | - | let | |
106 | - | | |
117 | + | let X = L | |
118 | + | (W.callerPublicKey == X) | |
107 | 119 | } | |
108 | - | else if ($isInstanceOf( | |
109 | - | then | |
120 | + | else if ($isInstanceOf(L, "Unit")) | |
121 | + | then (W.caller == this) | |
110 | 122 | else throw("Match error") | |
111 | 123 | } | |
112 | 124 | ||
113 | 125 | ||
114 | - | func U (V) = { | |
115 | - | let R = Q() | |
116 | - | if ($isInstanceOf(R, "ByteVector")) | |
117 | - | then { | |
118 | - | let W = R | |
119 | - | (V.callerPublicKey == W) | |
120 | - | } | |
121 | - | else if ($isInstanceOf(R, "Unit")) | |
122 | - | then (V.caller == this) | |
123 | - | else throw("Match error") | |
124 | - | } | |
125 | - | ||
126 | - | ||
127 | - | func X (V) = if (U(V)) | |
126 | + | func Y (W) = if (V(W)) | |
128 | 127 | then true | |
129 | 128 | else throw("permission denied") | |
130 | 129 | ||
131 | 130 | ||
132 | - | func | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
131 | + | func Z (aa) = { | |
132 | + | let L = aa | |
133 | + | if ($isInstanceOf(L, "Int")) | |
135 | 134 | then { | |
136 | - | let | |
137 | - | | |
135 | + | let ab = L | |
136 | + | ab | |
138 | 137 | } | |
139 | 138 | else throw("failed to cast into Integer") | |
140 | 139 | } | |
141 | 140 | ||
142 | 141 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
142 | + | @Callable(W) | |
143 | + | func constructor (ac,ad,ae,af,ag,ah,ai,aj,ak,al,am) = { | |
144 | + | let an = [Y(W), if (isDefined(addressFromString(ac))) | |
146 | 145 | then true | |
147 | - | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString( | |
146 | + | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(ad))) | |
148 | 147 | then true | |
149 | - | else throw("Invalid boosting contract address"), if (isDefined(addressFromString( | |
148 | + | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(ag))) | |
150 | 149 | then true | |
151 | - | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString( | |
150 | + | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(ae))) | |
152 | 151 | then true | |
153 | - | else throw("Invalid emission contract address"), if (isDefined(addressFromString( | |
152 | + | else throw("Invalid emission contract address"), if (isDefined(addressFromString(af))) | |
154 | 153 | then true | |
155 | - | else throw("Invalid factory contract address"), if (( | |
154 | + | else throw("Invalid factory contract address"), if ((ai >= 0)) | |
156 | 155 | then true | |
157 | - | else throw("Invalid fee amount"), if (( | |
156 | + | else throw("Invalid fee amount"), if ((ak > 0)) | |
158 | 157 | then true | |
159 | - | else throw("Invalid voting duration"), if (( | |
158 | + | else throw("Invalid voting duration"), if ((am >= 0)) | |
160 | 159 | then true | |
161 | - | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String( | |
160 | + | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(aj)))) | |
162 | 161 | then true | |
163 | - | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String( | |
162 | + | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(al)))) | |
164 | 163 | then true | |
165 | 164 | else throw("Invalid USDN asset ID")] | |
166 | - | if (( | |
167 | - | then $Tuple2([StringEntry(g, | |
165 | + | if ((an == an)) | |
166 | + | then $Tuple2([StringEntry(g, ac), StringEntry(j, ad), StringEntry(i, ae), StringEntry(k, af), StringEntry(h, ag), StringEntry(l, ah), IntegerEntry(b, ai), IntegerEntry(d, ak), IntegerEntry(e, am), StringEntry(f, aj), StringEntry(c, al)], unit) | |
168 | 167 | else throw("Strict value is not equal to itself.") | |
169 | 168 | } | |
170 | 169 | ||
171 | 170 | ||
172 | 171 | ||
173 | - | @Callable( | |
174 | - | func constructorV2 ( | |
175 | - | let | |
172 | + | @Callable(W) | |
173 | + | func constructorV2 (ao) = { | |
174 | + | let an = [Y(W), if ((ao > 0)) | |
176 | 175 | then true | |
177 | 176 | else throw("invalid threshold")] | |
178 | - | if (( | |
179 | - | then $Tuple2([IntegerEntry(m, | |
177 | + | if ((an == an)) | |
178 | + | then $Tuple2([IntegerEntry(m, ao)], unit) | |
180 | 179 | else throw("Strict value is not equal to itself.") | |
181 | 180 | } | |
182 | 181 | ||
183 | 182 | ||
184 | 183 | ||
185 | - | @Callable( | |
184 | + | @Callable(W) | |
186 | 185 | func suggest (r,s) = { | |
187 | 186 | let G = $Tuple2(r, s) | |
188 | - | let | |
189 | - | let | |
187 | + | let ap = value(W.payments[0]) | |
188 | + | let aq = if ((r == "WAVES")) | |
190 | 189 | then unit | |
191 | 190 | else { | |
192 | - | let | |
193 | - | if (( | |
191 | + | let ar = valueOrErrorMessage(assetInfo(fromBase58String(r)), "invalid amountAssetId ID") | |
192 | + | if ((ar.scripted == false)) | |
194 | 193 | then true | |
195 | 194 | else throw("asset is smart") | |
196 | 195 | } | |
197 | - | if (( | |
196 | + | if ((aq == aq)) | |
198 | 197 | then { | |
199 | - | let | |
198 | + | let an = [if ((toBase58String(value(ap.assetId)) == value(getString(f)))) | |
200 | 199 | then true | |
201 | - | else throw("invalid fee asset"), if (( | |
200 | + | else throw("invalid fee asset"), if ((ap.amount == value(getInteger(b)))) | |
202 | 201 | then true | |
203 | 202 | else throw("invalid fee amount"), if ((getInteger(q(r, s)) == unit)) | |
204 | 203 | then true | |
205 | - | else throw("already in voting list"), if (!(valueOrElse(getBoolean( | |
204 | + | else throw("already in voting list"), if (!(valueOrElse(getBoolean(S, F(G)), false))) | |
206 | 205 | then true | |
207 | 206 | else throw("pool is in emission voting list")] | |
208 | - | if (( | |
207 | + | if ((an == an)) | |
209 | 208 | then { | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
209 | + | let as = { | |
210 | + | let L = invoke(R, "statusREADONLY", [r, s], nil) | |
211 | + | if ($isInstanceOf(L, "String")) | |
213 | 212 | then { | |
214 | - | let | |
215 | - | if (( | |
213 | + | let M = L | |
214 | + | if ((M == "active")) | |
216 | 215 | then true | |
217 | 216 | else throw("user pool is not active") | |
218 | 217 | } | |
219 | 218 | else throw("user pool is not active") | |
220 | 219 | } | |
221 | - | if (( | |
220 | + | if ((as == as)) | |
222 | 221 | then { | |
223 | - | let | |
222 | + | let at = if (V(W)) | |
224 | 223 | then unit | |
225 | 224 | else { | |
226 | - | let | |
227 | - | let | |
228 | - | if ($isInstanceOf( | |
225 | + | let au = { | |
226 | + | let L = invoke(N, "isVerifiedREADONLY", [r], nil) | |
227 | + | if ($isInstanceOf(L, "Boolean")) | |
229 | 228 | then { | |
230 | - | let | |
231 | - | if ( | |
229 | + | let av = L | |
230 | + | if (av) | |
232 | 231 | then true | |
233 | 232 | else throw("asset is not verified") | |
234 | 233 | } | |
235 | 234 | else throw("asset is not verified") | |
236 | 235 | } | |
237 | - | if (( | |
236 | + | if ((au == au)) | |
238 | 237 | then unit | |
239 | 238 | else throw("Strict value is not equal to itself.") | |
240 | 239 | } | |
241 | - | if (( | |
240 | + | if ((at == at)) | |
242 | 241 | then { | |
243 | - | let | |
244 | - | if (( | |
242 | + | let aw = invoke(P, "burn", nil, [AttachedPayment(ap.assetId, ap.amount)]) | |
243 | + | if ((aw == aw)) | |
245 | 244 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
245 | + | let ax = { | |
246 | + | let L = getInteger(t(r, s)) | |
247 | + | if ($isInstanceOf(L, "Int")) | |
249 | 248 | then { | |
250 | - | let | |
251 | - | ( | |
249 | + | let ay = L | |
250 | + | (ay + 1) | |
252 | 251 | } | |
253 | 252 | else 0 | |
254 | 253 | } | |
255 | - | $Tuple2([IntegerEntry(q(r, s), | |
254 | + | $Tuple2([IntegerEntry(q(r, s), ax), IntegerEntry(u(r, s, ax), height), StringEntry(w(r, s, ax), x("0", "0")), IntegerEntry(t(r, s), ax)], unit) | |
256 | 255 | } | |
257 | 256 | else throw("Strict value is not equal to itself.") | |
258 | 257 | } | |
259 | 258 | else throw("Strict value is not equal to itself.") | |
260 | 259 | } | |
261 | 260 | else throw("Strict value is not equal to itself.") | |
262 | 261 | } | |
263 | 262 | else throw("Strict value is not equal to itself.") | |
264 | 263 | } | |
265 | 264 | else throw("Strict value is not equal to itself.") | |
266 | 265 | } | |
267 | 266 | ||
268 | 267 | ||
269 | 268 | ||
270 | - | @Callable( | |
271 | - | func vote (r,s, | |
269 | + | @Callable(W) | |
270 | + | func vote (r,s,az) = { | |
272 | 271 | let v = value(getInteger(q(r, s))) | |
273 | - | let | |
274 | - | let | |
272 | + | let aA = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
273 | + | let an = [if (isDefined(getInteger(q(r, s)))) | |
275 | 274 | then true | |
276 | - | else throw("the token isn't on the voting list"), if (( | |
275 | + | else throw("the token isn't on the voting list"), if ((aA > height)) | |
277 | 276 | then true | |
278 | 277 | else throw("too late to vote")] | |
279 | - | if (( | |
278 | + | if ((an == an)) | |
280 | 279 | then { | |
281 | - | let D = invoke( | |
282 | - | let | |
280 | + | let D = invoke(O, "getUserGwxAmountAtHeightREADONLY", [toString(W.caller), aA], nil) | |
281 | + | let aB = if ((Z(D) > 0)) | |
283 | 282 | then true | |
284 | 283 | else throw("you don't have gwx") | |
285 | - | if (( | |
284 | + | if ((aB == aB)) | |
286 | 285 | then { | |
287 | 286 | let E = { | |
288 | - | let | |
289 | - | if ($isInstanceOf( | |
287 | + | let L = getString(A(r, s, v, toString(W.caller))) | |
288 | + | if ($isInstanceOf(L, "String")) | |
290 | 289 | then { | |
291 | - | let | |
292 | - | let E = split( | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | then ( | |
290 | + | let M = L | |
291 | + | let E = split(M, a) | |
292 | + | let aC = E[1] | |
293 | + | let aD = E[2] | |
294 | + | let aE = if (if ((aD == "yes")) | |
295 | + | then (az == true) | |
297 | 296 | else false) | |
298 | 297 | then true | |
299 | - | else if (( | |
300 | - | then ( | |
298 | + | else if ((aD == "no")) | |
299 | + | then (az == false) | |
301 | 300 | else false | |
302 | - | let | |
303 | - | then ( | |
301 | + | let aF = if (aE) | |
302 | + | then (Z(D) == parseIntValue(aC)) | |
304 | 303 | else false | |
305 | - | let | |
306 | - | then | |
304 | + | let aG = if (if (aE) | |
305 | + | then aF | |
307 | 306 | else false) | |
308 | 307 | then throw("you already voted") | |
309 | 308 | else invoke(this, "cancelVote", [r, s], nil) | |
310 | - | | |
309 | + | aG | |
311 | 310 | } | |
312 | - | else if ($isInstanceOf( | |
311 | + | else if ($isInstanceOf(L, "Unit")) | |
313 | 312 | then { | |
314 | - | let | |
315 | - | | |
313 | + | let aH = L | |
314 | + | aH | |
316 | 315 | } | |
317 | 316 | else throw("Match error") | |
318 | 317 | } | |
319 | 318 | if ((E == E)) | |
320 | 319 | then { | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
320 | + | let aI = split(value(getString(w(r, s, v))), a) | |
321 | + | let aJ = aI[1] | |
322 | + | let aK = aI[2] | |
323 | + | let aL = if (az) | |
325 | 324 | then { | |
326 | - | let | |
327 | - | [toString( | |
325 | + | let aM = (parseIntValue(aJ) + Z(D)) | |
326 | + | [toString(aM), aK] | |
328 | 327 | } | |
329 | 328 | else { | |
330 | - | let | |
331 | - | [ | |
329 | + | let aN = (parseIntValue(aK) + Z(D)) | |
330 | + | [aJ, toString(aN)] | |
332 | 331 | } | |
333 | - | let | |
334 | - | let | |
335 | - | $Tuple2([StringEntry(w(r, s, v), x( | |
332 | + | let aO = A(r, s, v, toString(W.caller)) | |
333 | + | let aC = C(toString(Z(D)), az) | |
334 | + | $Tuple2([StringEntry(w(r, s, v), x(aL[0], aL[1])), StringEntry(aO, aC)], unit) | |
336 | 335 | } | |
337 | 336 | else throw("Strict value is not equal to itself.") | |
338 | 337 | } | |
339 | 338 | else throw("Strict value is not equal to itself.") | |
340 | 339 | } | |
341 | 340 | else throw("Strict value is not equal to itself.") | |
342 | 341 | } | |
343 | 342 | ||
344 | 343 | ||
345 | 344 | ||
346 | - | @Callable( | |
345 | + | @Callable(W) | |
347 | 346 | func cancelVote (r,s) = { | |
348 | - | let | |
349 | - | then toString( | |
350 | - | else toString( | |
347 | + | let aP = if ((W.caller == this)) | |
348 | + | then toString(W.originCaller) | |
349 | + | else toString(W.caller) | |
351 | 350 | let v = value(getInteger(q(r, s))) | |
352 | - | let | |
351 | + | let an = [if (isDefined(getString(w(r, s, v)))) | |
353 | 352 | then true | |
354 | 353 | else throw("no vote for assets pair")] | |
355 | - | if (( | |
354 | + | if ((an == an)) | |
356 | 355 | then { | |
357 | - | let E = split(value(getString(A(r, s, v, | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
356 | + | let E = split(value(getString(A(r, s, v, aP))), a) | |
357 | + | let aC = E[1] | |
358 | + | let aD = E[2] | |
359 | + | let aI = split(value(getString(w(r, s, v))), a) | |
360 | + | let aJ = aI[1] | |
361 | + | let aK = aI[2] | |
362 | + | let aQ = if ((aD == "yes")) | |
364 | 363 | then { | |
365 | - | let | |
366 | - | $Tuple2([StringEntry(w(r, s, v), x(toString( | |
364 | + | let aM = (parseIntValue(aJ) - parseIntValue(aC)) | |
365 | + | $Tuple2([StringEntry(w(r, s, v), x(toString(aM), aK)), DeleteEntry(A(r, s, v, aP))], unit) | |
367 | 366 | } | |
368 | 367 | else { | |
369 | - | let | |
370 | - | $Tuple2([StringEntry(w(r, s, v), x( | |
368 | + | let aN = (parseIntValue(aK) - parseIntValue(aC)) | |
369 | + | $Tuple2([StringEntry(w(r, s, v), x(aJ, toString(aN))), DeleteEntry(A(r, s, v, aP))], unit) | |
371 | 370 | } | |
372 | - | | |
371 | + | aQ | |
373 | 372 | } | |
374 | 373 | else throw("Strict value is not equal to itself.") | |
375 | 374 | } | |
376 | 375 | ||
377 | 376 | ||
378 | 377 | ||
379 | - | @Callable( | |
380 | - | func setFee ( | |
381 | - | let | |
382 | - | if (( | |
383 | - | then [IntegerEntry(b, | |
378 | + | @Callable(W) | |
379 | + | func setFee (aR) = { | |
380 | + | let an = [Y(W)] | |
381 | + | if ((an == an)) | |
382 | + | then [IntegerEntry(b, aR)] | |
384 | 383 | else throw("Strict value is not equal to itself.") | |
385 | 384 | } | |
386 | 385 | ||
387 | 386 | ||
388 | 387 | ||
389 | - | @Callable( | |
390 | - | func setThreshold ( | |
391 | - | let | |
388 | + | @Callable(W) | |
389 | + | func setThreshold (aS) = { | |
390 | + | let an = [Y(W), if ((aS > 0)) | |
392 | 391 | then true | |
393 | 392 | else throw("invalid threshold")] | |
394 | - | if (( | |
395 | - | then $Tuple2([IntegerEntry(m, | |
393 | + | if ((an == an)) | |
394 | + | then $Tuple2([IntegerEntry(m, aS)], unit) | |
396 | 395 | else throw("Strict value is not equal to itself.") | |
397 | 396 | } | |
398 | 397 | ||
399 | 398 | ||
400 | 399 | ||
401 | - | @Callable( | |
400 | + | @Callable(W) | |
402 | 401 | func finalize (r,s) = { | |
403 | 402 | let v = value(getInteger(q(r, s))) | |
404 | - | let | |
405 | - | let | |
403 | + | let aA = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
404 | + | let an = [if (isDefined(getInteger(q(r, s)))) | |
406 | 405 | then true | |
407 | - | else throw("no assets pair"), if ((height >= | |
406 | + | else throw("no assets pair"), if ((height >= aA)) | |
408 | 407 | then true | |
409 | 408 | else throw("insufficient height for completion")] | |
410 | - | if (( | |
409 | + | if ((an == an)) | |
411 | 410 | then { | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | then ( | |
411 | + | let aI = split(value(getString(w(r, s, v))), a) | |
412 | + | let aJ = parseIntValue(aI[1]) | |
413 | + | let aK = parseIntValue(aI[2]) | |
414 | + | let aT = (aJ + aK) | |
415 | + | let ao = p(m) | |
416 | + | let aQ = if (if ((aT >= ao)) | |
417 | + | then (aJ > aK) | |
419 | 418 | else false) | |
420 | 419 | then { | |
421 | - | let | |
422 | - | if (( | |
420 | + | let aU = invoke(Q, "setWxEmissionPoolLabel", [r, s], nil) | |
421 | + | if ((aU == aU)) | |
423 | 422 | then { | |
424 | - | let | |
425 | - | if (( | |
423 | + | let aV = invoke(S, "create", [r, s], nil) | |
424 | + | if ((aV == aV)) | |
426 | 425 | then $Tuple2([DeleteEntry(q(r, s))], unit) | |
427 | 426 | else throw("Strict value is not equal to itself.") | |
428 | 427 | } | |
429 | 428 | else throw("Strict value is not equal to itself.") | |
430 | 429 | } | |
431 | 430 | else $Tuple2([DeleteEntry(q(r, s))], unit) | |
432 | - | | |
431 | + | aQ | |
433 | 432 | } | |
434 | 433 | else throw("Strict value is not equal to itself.") | |
435 | 434 | } | |
436 | 435 | ||
437 | 436 | ||
438 | 437 | ||
439 | - | @Callable( | |
438 | + | @Callable(W) | |
440 | 439 | func approve (r,s) = { | |
441 | - | let | |
440 | + | let aW = if ((W.caller == R)) | |
442 | 441 | then true | |
443 | - | else | |
444 | - | if (( | |
442 | + | else Y(W) | |
443 | + | if ((aW == aW)) | |
445 | 444 | then { | |
446 | - | let | |
447 | - | if (( | |
445 | + | let aU = [invoke(Q, "setWxEmissionPoolLabel", [r, s], nil), invoke(S, "create", [r, s], nil)] | |
446 | + | if ((aU == aU)) | |
448 | 447 | then $Tuple2(nil, unit) | |
449 | 448 | else throw("Strict value is not equal to itself.") | |
450 | 449 | } | |
451 | 450 | else throw("Strict value is not equal to itself.") | |
452 | 451 | } | |
453 | 452 | ||
454 | 453 | ||
455 | - | ||
456 | - | @Callable(V) | |
457 | - | func setManager (aW) = { | |
458 | - | let aV = X(V) | |
459 | - | if ((aV == aV)) | |
460 | - | then { | |
461 | - | let aX = fromBase58String(aW) | |
462 | - | if ((aX == aX)) | |
463 | - | then [StringEntry(J(), aW)] | |
464 | - | else throw("Strict value is not equal to itself.") | |
465 | - | } | |
466 | - | else throw("Strict value is not equal to itself.") | |
467 | - | } | |
468 | - | ||
469 | - | ||
470 | - | ||
471 | - | @Callable(V) | |
472 | - | func confirmManager () = { | |
473 | - | let aY = T() | |
474 | - | let aZ = if (isDefined(aY)) | |
475 | - | then true | |
476 | - | else throw("no pending manager") | |
477 | - | if ((aZ == aZ)) | |
478 | - | then { | |
479 | - | let ba = if ((V.callerPublicKey == value(aY))) | |
480 | - | then true | |
481 | - | else throw("you are not pending manager") | |
482 | - | if ((ba == ba)) | |
483 | - | then [StringEntry(I(), toBase58String(value(aY))), DeleteEntry(J())] | |
484 | - | else throw("Strict value is not equal to itself.") | |
485 | - | } | |
486 | - | else throw("Strict value is not equal to itself.") | |
487 | - | } | |
488 | - | ||
489 | - | ||
490 | - | @Verifier(bb) | |
491 | - | func bc () = { | |
492 | - | let bd = { | |
493 | - | let R = Q() | |
494 | - | if ($isInstanceOf(R, "ByteVector")) | |
454 | + | @Verifier(aX) | |
455 | + | func aY () = { | |
456 | + | let aZ = { | |
457 | + | let L = T() | |
458 | + | if ($isInstanceOf(L, "ByteVector")) | |
495 | 459 | then { | |
496 | - | let | |
497 | - | | |
460 | + | let X = L | |
461 | + | X | |
498 | 462 | } | |
499 | - | else if ($isInstanceOf( | |
500 | - | then | |
463 | + | else if ($isInstanceOf(L, "Unit")) | |
464 | + | then aX.senderPublicKey | |
501 | 465 | else throw("Match error") | |
502 | 466 | } | |
503 | - | sigVerify( | |
467 | + | sigVerify(aX.bodyBytes, aX.proofs[0], aZ) | |
504 | 468 | } | |
505 | 469 |
github/deemru/w8io/169f3d6 139.63 ms ◑