tx · HV3fFkUaikCTs9gUWtc5M4sitXDqQq2W9fdnPuw917Ti 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx: -0.01300000 Waves 2023.07.04 17:30 [2651279] smart account 3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx > SELF 0.00000000 Waves
{ "type": 13, "id": "HV3fFkUaikCTs9gUWtc5M4sitXDqQq2W9fdnPuw917Ti", "fee": 1300000, "feeAssetId": null, "timestamp": 1688481017507, "version": 1, "sender": "3MuS6qVvhBR6wSynFRdcE3fVqmGBjoc7Hhx", "senderPublicKey": "62CHk4MqTdq3LqeUycy7TPnpvwrjgerSa2FqAY2EafXn", "proofs": [ "3TCV1D5CAmfQShiEqJyAzrdE1hPkLjTbtKUvvvTHDonyXx35Yoz6V9nEnWUsMCvcqJBSEh656bVwWgNQGnj7hEjE" ], "script": "base64:BwJaCAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIDCgEBEgMKAQESBQoDAgECEgQKAgIBEgQKAgIBEgUKAwEBARIAEgMKAQgSABIAEgMKAQgSABIDCgEILwADU0VQAgJfXwAQY29udHJhY3RGaWxlbmFtZQIMZmFjdG9yeS5yaWRlAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAA9BRE1JTl9MSVNUX1NJWkUABQAGUVVPUlVNAAMAEVRYSURfQllURVNfTEVOR1RIACABGGtleUFsbG93ZWRUeElkVm90ZVByZWZpeAEEdHhJZAkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAglhbGxvd1R4SWQJAMwIAgUEdHhJZAUDbmlsBQNTRVABEGtleUZ1bGxBZG1pblZvdGUCBnByZWZpeAxhZG1pbkFkZHJlc3MJALkJAgkAzAgCBQZwcmVmaXgJAMwIAgUMYWRtaW5BZGRyZXNzBQNuaWwFA1NFUAETa2V5QWRtaW5BZGRyZXNzTGlzdA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2J5T3duZXIDCQBnAgkAkAMBCQENZ2V0QWRtaW5zTGlzdAAFBlFVT1JVTQcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkDAwUKYnlQcm9wb3NhbAYFCGJ5QWRtaW5zBgUHYnlPd25lcsGySmY=", "chainId": 84, "height": 2651279, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6UzAfASQVx6Ecb3dsUB23K3RdxiobYfiwWjAXX1MSv9x Next: HKTE68oavY7L6zq5obn9VT2M2nJfeRK41Xcq2hUx9h5S Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | func e (d) = throw(c(d)) | |
12 | 12 | ||
13 | 13 | ||
14 | - | func f () = "%s__calculator" | |
14 | + | let f = 5 | |
15 | + | ||
16 | + | let g = 3 | |
17 | + | ||
18 | + | let h = 32 | |
19 | + | ||
20 | + | func i (j) = makeString(["%s%s%s", "allowTxId", j], a) | |
15 | 21 | ||
16 | 22 | ||
17 | - | func | |
23 | + | func k (l,m) = makeString([l, m], a) | |
18 | 24 | ||
19 | 25 | ||
20 | - | func | |
26 | + | func n () = makeString(["%s", "adminAddressList"], a) | |
21 | 27 | ||
22 | 28 | ||
23 | - | func | |
29 | + | func o () = makeString(["%s", "txId"], a) | |
24 | 30 | ||
25 | 31 | ||
26 | - | func j () = "%s__nextBlockToProcess" | |
32 | + | func p (l,q) = { | |
33 | + | let r = k(l, q) | |
34 | + | valueOrElse(getInteger(r), 0) | |
35 | + | } | |
27 | 36 | ||
28 | 37 | ||
29 | - | func k () = "%s__lpAssetId" | |
38 | + | func s () = { | |
39 | + | let t = getString(this, n()) | |
40 | + | if ($isInstanceOf(t, "String")) | |
41 | + | then { | |
42 | + | let d = t | |
43 | + | split(d, a) | |
44 | + | } | |
45 | + | else nil | |
46 | + | } | |
30 | 47 | ||
31 | 48 | ||
32 | - | let l = { | |
33 | - | let m = getString(this, f()) | |
34 | - | if ($isInstanceOf(m, "String")) | |
49 | + | func u (v) = containsElement(s(), v) | |
50 | + | ||
51 | + | ||
52 | + | func w (x,m) = { | |
53 | + | let y = x | |
54 | + | let z = y._1 | |
55 | + | let l = y._2 | |
56 | + | $Tuple2((z :+ k(l, m)), l) | |
57 | + | } | |
58 | + | ||
59 | + | ||
60 | + | func A (B) = { | |
61 | + | let C = n() | |
62 | + | let D = { | |
63 | + | let E = s() | |
64 | + | let F = size(E) | |
65 | + | let G = $Tuple2(nil, B) | |
66 | + | func H (I,J) = if ((J >= F)) | |
67 | + | then I | |
68 | + | else w(I, E[J]) | |
69 | + | ||
70 | + | func K (I,J) = if ((J >= F)) | |
71 | + | then I | |
72 | + | else throw("List size exceeds 5") | |
73 | + | ||
74 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
75 | + | } | |
76 | + | let z = D._1 | |
77 | + | let l = D._2 | |
78 | + | z | |
79 | + | } | |
80 | + | ||
81 | + | ||
82 | + | func L (z,r) = (z + valueOrElse(getInteger(r), 0)) | |
83 | + | ||
84 | + | ||
85 | + | func M (l) = { | |
86 | + | let N = A(l) | |
87 | + | let E = N | |
88 | + | let F = size(E) | |
89 | + | let G = 0 | |
90 | + | func H (I,J) = if ((J >= F)) | |
91 | + | then I | |
92 | + | else L(I, E[J]) | |
93 | + | ||
94 | + | func K (I,J) = if ((J >= F)) | |
95 | + | then I | |
96 | + | else throw("List size exceeds 5") | |
97 | + | ||
98 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | func O (z,P) = (z :+ DeleteEntry(P)) | |
103 | + | ||
104 | + | ||
105 | + | func Q (l) = { | |
106 | + | let N = A(l) | |
107 | + | let E = N | |
108 | + | let F = size(E) | |
109 | + | let G = nil | |
110 | + | func H (I,J) = if ((J >= F)) | |
111 | + | then I | |
112 | + | else O(I, E[J]) | |
113 | + | ||
114 | + | func K (I,J) = if ((J >= F)) | |
115 | + | then I | |
116 | + | else throw("List size exceeds 5") | |
117 | + | ||
118 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func R (S,B,T,U) = { | |
123 | + | let r = k(B, S) | |
124 | + | let V = p(B, S) | |
125 | + | let W = if (!(u(S))) | |
126 | + | then e((("Address: " + S) + " not in Admin list")) | |
127 | + | else if ((V == 1)) | |
128 | + | then e((r + " you already voted")) | |
129 | + | else unit | |
130 | + | if ((W == W)) | |
35 | 131 | then { | |
36 | - | let d = m | |
132 | + | let N = M(B) | |
133 | + | if (((N + 1) >= T)) | |
134 | + | then { | |
135 | + | let X = Q(B) | |
136 | + | (X ++ U) | |
137 | + | } | |
138 | + | else [IntegerEntry(r, 1)] | |
139 | + | } | |
140 | + | else throw("Strict value is not equal to itself.") | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | func Y () = "%s__calculator" | |
145 | + | ||
146 | + | ||
147 | + | func Z () = "%s__proxyTreasury" | |
148 | + | ||
149 | + | ||
150 | + | func aa () = "%s__child" | |
151 | + | ||
152 | + | ||
153 | + | func ab () = "%s__blockProcessingReward" | |
154 | + | ||
155 | + | ||
156 | + | func ac () = "%s__nextBlockToProcess" | |
157 | + | ||
158 | + | ||
159 | + | func ad () = "%s__lpAssetId" | |
160 | + | ||
161 | + | ||
162 | + | let ae = { | |
163 | + | let t = getString(this, Y()) | |
164 | + | if ($isInstanceOf(t, "String")) | |
165 | + | then { | |
166 | + | let d = t | |
37 | 167 | addressFromString(d) | |
38 | 168 | } | |
39 | - | else if ($isInstanceOf( | |
169 | + | else if ($isInstanceOf(t, "Unit")) | |
40 | 170 | then unit | |
41 | 171 | else throw("Match error") | |
42 | 172 | } | |
43 | 173 | ||
44 | - | let | |
174 | + | let af = valueOrErrorMessage(ae, c("invalid calculator address")) | |
45 | 175 | ||
46 | - | let | |
47 | - | let | |
48 | - | if ($isInstanceOf( | |
176 | + | let ag = { | |
177 | + | let t = getString(this, Z()) | |
178 | + | if ($isInstanceOf(t, "String")) | |
49 | 179 | then { | |
50 | - | let d = | |
180 | + | let d = t | |
51 | 181 | addressFromString(d) | |
52 | 182 | } | |
53 | - | else if ($isInstanceOf( | |
183 | + | else if ($isInstanceOf(t, "Unit")) | |
54 | 184 | then unit | |
55 | 185 | else throw("Match error") | |
56 | 186 | } | |
57 | 187 | ||
58 | - | let | |
188 | + | let ah = valueOrErrorMessage(ag, c("invalid proxy treasury address")) | |
59 | 189 | ||
60 | - | func | |
190 | + | func ai () = "%s__config" | |
61 | 191 | ||
62 | 192 | ||
63 | - | func | |
193 | + | func aj () = "contract_children" | |
64 | 194 | ||
65 | 195 | ||
66 | - | func | |
196 | + | func ak () = "contract_voting_result" | |
67 | 197 | ||
68 | 198 | ||
69 | - | func | |
199 | + | func al (v,j) = ((("proposal_allow_broadcast_" + toString(v)) + "_") + toBase58String(j)) | |
70 | 200 | ||
71 | 201 | ||
72 | - | func | |
202 | + | func am (an,ao) = makeString(["investor", toString(an), toString(ao)], "_") | |
73 | 203 | ||
74 | 204 | ||
75 | - | let | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
205 | + | let ap = { | |
206 | + | let t = getString(this, ai()) | |
207 | + | if ($isInstanceOf(t, "String")) | |
78 | 208 | then { | |
79 | - | let d = | |
209 | + | let d = t | |
80 | 210 | addressFromString(d) | |
81 | 211 | } | |
82 | - | else if ($isInstanceOf( | |
212 | + | else if ($isInstanceOf(t, "Unit")) | |
83 | 213 | then unit | |
84 | 214 | else throw("Match error") | |
85 | 215 | } | |
86 | 216 | ||
87 | - | let | |
217 | + | let aq = valueOrErrorMessage(ap, c("invalid config address")) | |
88 | 218 | ||
89 | - | let | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
219 | + | let ar = { | |
220 | + | let t = ap | |
221 | + | if ($isInstanceOf(t, "Address")) | |
92 | 222 | then { | |
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
223 | + | let x = t | |
224 | + | let as = getString(x, ak()) | |
225 | + | if ($isInstanceOf(as, "String")) | |
96 | 226 | then { | |
97 | - | let d = | |
227 | + | let d = as | |
98 | 228 | addressFromString(d) | |
99 | 229 | } | |
100 | - | else if ($isInstanceOf( | |
230 | + | else if ($isInstanceOf(as, "Unit")) | |
101 | 231 | then unit | |
102 | 232 | else throw("Match error") | |
103 | 233 | } | |
104 | - | else if ($isInstanceOf( | |
234 | + | else if ($isInstanceOf(t, "Unit")) | |
105 | 235 | then unit | |
106 | 236 | else throw("Match error") | |
107 | 237 | } | |
108 | 238 | ||
109 | - | let | |
239 | + | let at = valueOrErrorMessage(ar, c("invalid voting result address")) | |
110 | 240 | ||
111 | - | let | |
112 | - | let | |
113 | - | if ($isInstanceOf( | |
241 | + | let au = { | |
242 | + | let t = ap | |
243 | + | if ($isInstanceOf(t, "Address")) | |
114 | 244 | then { | |
115 | - | let | |
116 | - | let | |
117 | - | if ($isInstanceOf( | |
245 | + | let x = t | |
246 | + | let as = getString(x, aj()) | |
247 | + | if ($isInstanceOf(as, "String")) | |
118 | 248 | then { | |
119 | - | let d = | |
249 | + | let d = as | |
120 | 250 | addressFromString(d) | |
121 | 251 | } | |
122 | - | else if ($isInstanceOf( | |
252 | + | else if ($isInstanceOf(as, "Unit")) | |
123 | 253 | then unit | |
124 | 254 | else throw("Match error") | |
125 | 255 | } | |
126 | - | else if ($isInstanceOf( | |
256 | + | else if ($isInstanceOf(t, "Unit")) | |
127 | 257 | then unit | |
128 | 258 | else throw("Match error") | |
129 | 259 | } | |
130 | 260 | ||
131 | - | let | |
261 | + | let av = valueOrErrorMessage(au, c("invalid children address")) | |
132 | 262 | ||
133 | - | let | |
134 | - | let | |
135 | - | if ($isInstanceOf( | |
263 | + | let aw = { | |
264 | + | let t = getString(this, ad()) | |
265 | + | if ($isInstanceOf(t, "String")) | |
136 | 266 | then { | |
137 | - | let d = | |
267 | + | let d = t | |
138 | 268 | fromBase58String(d) | |
139 | 269 | } | |
140 | - | else if ($isInstanceOf( | |
270 | + | else if ($isInstanceOf(t, "Unit")) | |
141 | 271 | then unit | |
142 | 272 | else throw("Match error") | |
143 | 273 | } | |
144 | 274 | ||
145 | - | let | |
275 | + | let ax = valueOrErrorMessage(aw, c("invalid lpAssetId")) | |
146 | 276 | ||
147 | - | func | |
277 | + | func ay (az,v) = if ((az.caller == v)) | |
148 | 278 | then true | |
149 | 279 | else e("permission denied") | |
150 | 280 | ||
151 | 281 | ||
152 | - | func | |
282 | + | func aA (az) = ay(az, this) | |
153 | 283 | ||
154 | 284 | ||
155 | - | func | |
285 | + | func aB (az) = ay(az, af) | |
156 | 286 | ||
157 | 287 | ||
158 | - | @Callable( | |
159 | - | func stringEntry ( | |
160 | - | then $Tuple2([StringEntry( | |
288 | + | @Callable(az) | |
289 | + | func stringEntry (P,aC) = if (aB(az)) | |
290 | + | then $Tuple2([StringEntry(P, aC)], P) | |
161 | 291 | else $Tuple2(nil, unit) | |
162 | 292 | ||
163 | 293 | ||
164 | 294 | ||
165 | - | @Callable( | |
166 | - | func integerEntry ( | |
167 | - | then $Tuple2([IntegerEntry( | |
295 | + | @Callable(az) | |
296 | + | func integerEntry (P,aC) = if (aB(az)) | |
297 | + | then $Tuple2([IntegerEntry(P, aC)], P) | |
168 | 298 | else $Tuple2(nil, unit) | |
169 | 299 | ||
170 | 300 | ||
171 | 301 | ||
172 | - | @Callable( | |
173 | - | func booleanEntry ( | |
174 | - | then $Tuple2([BooleanEntry( | |
302 | + | @Callable(az) | |
303 | + | func booleanEntry (P,aC) = if (aB(az)) | |
304 | + | then $Tuple2([BooleanEntry(P, aC)], P) | |
175 | 305 | else $Tuple2(nil, unit) | |
176 | 306 | ||
177 | 307 | ||
178 | 308 | ||
179 | - | @Callable( | |
180 | - | func binaryEntry ( | |
181 | - | then $Tuple2([BinaryEntry( | |
309 | + | @Callable(az) | |
310 | + | func binaryEntry (P,aC) = if (aB(az)) | |
311 | + | then $Tuple2([BinaryEntry(P, aC)], P) | |
182 | 312 | else $Tuple2(nil, unit) | |
183 | 313 | ||
184 | 314 | ||
185 | 315 | ||
186 | - | @Callable( | |
187 | - | func deleteEntry ( | |
188 | - | then $Tuple2([DeleteEntry( | |
316 | + | @Callable(az) | |
317 | + | func deleteEntry (P) = if (aB(az)) | |
318 | + | then $Tuple2([DeleteEntry(P)], P) | |
189 | 319 | else $Tuple2(nil, unit) | |
190 | 320 | ||
191 | 321 | ||
192 | 322 | ||
193 | - | @Callable( | |
194 | - | func reissue ( | |
195 | - | then $Tuple2([Reissue( | |
323 | + | @Callable(az) | |
324 | + | func reissue (aD) = if (aB(az)) | |
325 | + | then $Tuple2([Reissue(ax, aD, true)], aD) | |
196 | 326 | else $Tuple2(nil, unit) | |
197 | 327 | ||
198 | 328 | ||
199 | 329 | ||
200 | - | @Callable( | |
201 | - | func burn ( | |
202 | - | then $Tuple2([Burn( | |
330 | + | @Callable(az) | |
331 | + | func burn (aD) = if (aB(az)) | |
332 | + | then $Tuple2([Burn(ax, aD)], aD) | |
203 | 333 | else $Tuple2(nil, unit) | |
204 | 334 | ||
205 | 335 | ||
206 | 336 | ||
207 | - | @Callable( | |
208 | - | func transferAsset ( | |
209 | - | then $Tuple2([ScriptTransfer(Address( | |
337 | + | @Callable(az) | |
338 | + | func transferAsset (aE,aD,aF) = if (aB(az)) | |
339 | + | then $Tuple2([ScriptTransfer(Address(aE), aD, aF)], aD) | |
210 | 340 | else $Tuple2(nil, unit) | |
211 | 341 | ||
212 | 342 | ||
213 | 343 | ||
214 | - | @Callable( | |
215 | - | func transferWaves ( | |
216 | - | then $Tuple2([ScriptTransfer(Address( | |
344 | + | @Callable(az) | |
345 | + | func transferWaves (aE,aD) = if (aB(az)) | |
346 | + | then $Tuple2([ScriptTransfer(Address(aE), aD, unit)], aD) | |
217 | 347 | else $Tuple2(nil, unit) | |
218 | 348 | ||
219 | 349 | ||
220 | 350 | ||
221 | - | @Callable( | |
222 | - | func transferFromProxyTreasury ( | |
223 | - | then $Tuple2(nil, invoke( | |
351 | + | @Callable(az) | |
352 | + | func transferFromProxyTreasury (aG,aH) = if (aB(az)) | |
353 | + | then $Tuple2(nil, invoke(ah, "transferWaves", [aG, aH], nil)) | |
224 | 354 | else $Tuple2(nil, unit) | |
225 | 355 | ||
226 | 356 | ||
227 | 357 | ||
228 | - | @Callable( | |
229 | - | func finalize ( | |
358 | + | @Callable(az) | |
359 | + | func finalize (aI,aJ,aK) = $Tuple2(nil, reentrantInvoke(af, "finalize", [az.caller.bytes, aI, aJ, aK], az.payments)) | |
230 | 360 | ||
231 | 361 | ||
232 | 362 | ||
233 | - | @Callable( | |
234 | - | func claimLP () = $Tuple2(nil, reentrantInvoke( | |
363 | + | @Callable(az) | |
364 | + | func claimLP () = $Tuple2(nil, reentrantInvoke(af, "claimLP", [az.caller.bytes], az.payments)) | |
235 | 365 | ||
236 | 366 | ||
237 | 367 | ||
238 | - | @Callable( | |
239 | - | func claimWaves ( | |
368 | + | @Callable(az) | |
369 | + | func claimWaves (aL) = $Tuple2(nil, reentrantInvoke(af, "claimWaves", [az.caller.bytes, fromBase58String(aL)], az.payments)) | |
240 | 370 | ||
241 | 371 | ||
242 | 372 | ||
243 | - | @Callable( | |
244 | - | func invest () = $Tuple2(nil, reentrantInvoke( | |
373 | + | @Callable(az) | |
374 | + | func invest () = $Tuple2(nil, reentrantInvoke(af, "invest", [az.caller.bytes], az.payments)) | |
245 | 375 | ||
246 | 376 | ||
247 | 377 | ||
248 | - | @Callable( | |
249 | - | func withdraw () = $Tuple2(nil, reentrantInvoke( | |
378 | + | @Callable(az) | |
379 | + | func withdraw () = $Tuple2(nil, reentrantInvoke(af, "withdraw", [az.caller.bytes], az.payments)) | |
250 | 380 | ||
251 | 381 | ||
252 | 382 | ||
253 | - | @Callable( | |
254 | - | func cancelWithdraw ( | |
383 | + | @Callable(az) | |
384 | + | func cancelWithdraw (aL) = $Tuple2(nil, reentrantInvoke(af, "cancelWithdraw", [az.caller.bytes, fromBase58String(aL)], az.payments)) | |
255 | 385 | ||
256 | 386 | ||
257 | 387 | ||
258 | - | @Callable( | |
259 | - | func processBlocks () = $Tuple2(nil, reentrantInvoke( | |
388 | + | @Callable(az) | |
389 | + | func processBlocks () = $Tuple2(nil, reentrantInvoke(af, "processBlocks", [az.caller.bytes], az.payments)) | |
260 | 390 | ||
261 | 391 | ||
262 | - | @Verifier(Y) | |
263 | - | func Z () = { | |
264 | - | let aa = valueOrElse(getBoolean(E, t(this, Y.id)), false) | |
265 | - | let ab = sigVerify(Y.bodyBytes, Y.proofs[0], Y.senderPublicKey) | |
266 | - | if ((B != unit)) | |
267 | - | then if (aa) | |
268 | - | then true | |
269 | - | else ab | |
270 | - | else ab | |
392 | + | ||
393 | + | @Callable(az) | |
394 | + | func voteForTxId (j) = { | |
395 | + | let S = toBase58String(az.caller.bytes) | |
396 | + | let B = i(j) | |
397 | + | let z = [StringEntry(o(), j)] | |
398 | + | let aM = getString(this, o()) | |
399 | + | let W = [if ((size(fromBase58String(j)) == h)) | |
400 | + | then true | |
401 | + | else e((j + " is not valid txId")), if (if ((aM == unit)) | |
402 | + | then true | |
403 | + | else (value(aM) != j)) | |
404 | + | then true | |
405 | + | else e((j + " is already allowed"))] | |
406 | + | if ((W == W)) | |
407 | + | then R(S, B, g, z) | |
408 | + | else throw("Strict value is not equal to itself.") | |
409 | + | } | |
410 | + | ||
411 | + | ||
412 | + | @Verifier(aN) | |
413 | + | func aO () = { | |
414 | + | let aP = { | |
415 | + | let t = ar | |
416 | + | if ($isInstanceOf(t, "Address")) | |
417 | + | then { | |
418 | + | let aQ = t | |
419 | + | valueOrElse(getBoolean(aQ, al(this, aN.id)), false) | |
420 | + | } | |
421 | + | else false | |
422 | + | } | |
423 | + | let aR = (aN.id == fromBase58String(valueOrElse(getString(this, o()), ""))) | |
424 | + | let aS = if ((size(s()) >= g)) | |
425 | + | then false | |
426 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
427 | + | if (if (aP) | |
428 | + | then true | |
429 | + | else aR) | |
430 | + | then true | |
431 | + | else aS | |
271 | 432 | } | |
272 | 433 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "factory.ride" | |
7 | 7 | ||
8 | 8 | func c (d) = ((b + ": ") + d) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func e (d) = throw(c(d)) | |
12 | 12 | ||
13 | 13 | ||
14 | - | func f () = "%s__calculator" | |
14 | + | let f = 5 | |
15 | + | ||
16 | + | let g = 3 | |
17 | + | ||
18 | + | let h = 32 | |
19 | + | ||
20 | + | func i (j) = makeString(["%s%s%s", "allowTxId", j], a) | |
15 | 21 | ||
16 | 22 | ||
17 | - | func | |
23 | + | func k (l,m) = makeString([l, m], a) | |
18 | 24 | ||
19 | 25 | ||
20 | - | func | |
26 | + | func n () = makeString(["%s", "adminAddressList"], a) | |
21 | 27 | ||
22 | 28 | ||
23 | - | func | |
29 | + | func o () = makeString(["%s", "txId"], a) | |
24 | 30 | ||
25 | 31 | ||
26 | - | func j () = "%s__nextBlockToProcess" | |
32 | + | func p (l,q) = { | |
33 | + | let r = k(l, q) | |
34 | + | valueOrElse(getInteger(r), 0) | |
35 | + | } | |
27 | 36 | ||
28 | 37 | ||
29 | - | func k () = "%s__lpAssetId" | |
38 | + | func s () = { | |
39 | + | let t = getString(this, n()) | |
40 | + | if ($isInstanceOf(t, "String")) | |
41 | + | then { | |
42 | + | let d = t | |
43 | + | split(d, a) | |
44 | + | } | |
45 | + | else nil | |
46 | + | } | |
30 | 47 | ||
31 | 48 | ||
32 | - | let l = { | |
33 | - | let m = getString(this, f()) | |
34 | - | if ($isInstanceOf(m, "String")) | |
49 | + | func u (v) = containsElement(s(), v) | |
50 | + | ||
51 | + | ||
52 | + | func w (x,m) = { | |
53 | + | let y = x | |
54 | + | let z = y._1 | |
55 | + | let l = y._2 | |
56 | + | $Tuple2((z :+ k(l, m)), l) | |
57 | + | } | |
58 | + | ||
59 | + | ||
60 | + | func A (B) = { | |
61 | + | let C = n() | |
62 | + | let D = { | |
63 | + | let E = s() | |
64 | + | let F = size(E) | |
65 | + | let G = $Tuple2(nil, B) | |
66 | + | func H (I,J) = if ((J >= F)) | |
67 | + | then I | |
68 | + | else w(I, E[J]) | |
69 | + | ||
70 | + | func K (I,J) = if ((J >= F)) | |
71 | + | then I | |
72 | + | else throw("List size exceeds 5") | |
73 | + | ||
74 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
75 | + | } | |
76 | + | let z = D._1 | |
77 | + | let l = D._2 | |
78 | + | z | |
79 | + | } | |
80 | + | ||
81 | + | ||
82 | + | func L (z,r) = (z + valueOrElse(getInteger(r), 0)) | |
83 | + | ||
84 | + | ||
85 | + | func M (l) = { | |
86 | + | let N = A(l) | |
87 | + | let E = N | |
88 | + | let F = size(E) | |
89 | + | let G = 0 | |
90 | + | func H (I,J) = if ((J >= F)) | |
91 | + | then I | |
92 | + | else L(I, E[J]) | |
93 | + | ||
94 | + | func K (I,J) = if ((J >= F)) | |
95 | + | then I | |
96 | + | else throw("List size exceeds 5") | |
97 | + | ||
98 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | func O (z,P) = (z :+ DeleteEntry(P)) | |
103 | + | ||
104 | + | ||
105 | + | func Q (l) = { | |
106 | + | let N = A(l) | |
107 | + | let E = N | |
108 | + | let F = size(E) | |
109 | + | let G = nil | |
110 | + | func H (I,J) = if ((J >= F)) | |
111 | + | then I | |
112 | + | else O(I, E[J]) | |
113 | + | ||
114 | + | func K (I,J) = if ((J >= F)) | |
115 | + | then I | |
116 | + | else throw("List size exceeds 5") | |
117 | + | ||
118 | + | K(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5) | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func R (S,B,T,U) = { | |
123 | + | let r = k(B, S) | |
124 | + | let V = p(B, S) | |
125 | + | let W = if (!(u(S))) | |
126 | + | then e((("Address: " + S) + " not in Admin list")) | |
127 | + | else if ((V == 1)) | |
128 | + | then e((r + " you already voted")) | |
129 | + | else unit | |
130 | + | if ((W == W)) | |
35 | 131 | then { | |
36 | - | let d = m | |
132 | + | let N = M(B) | |
133 | + | if (((N + 1) >= T)) | |
134 | + | then { | |
135 | + | let X = Q(B) | |
136 | + | (X ++ U) | |
137 | + | } | |
138 | + | else [IntegerEntry(r, 1)] | |
139 | + | } | |
140 | + | else throw("Strict value is not equal to itself.") | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | func Y () = "%s__calculator" | |
145 | + | ||
146 | + | ||
147 | + | func Z () = "%s__proxyTreasury" | |
148 | + | ||
149 | + | ||
150 | + | func aa () = "%s__child" | |
151 | + | ||
152 | + | ||
153 | + | func ab () = "%s__blockProcessingReward" | |
154 | + | ||
155 | + | ||
156 | + | func ac () = "%s__nextBlockToProcess" | |
157 | + | ||
158 | + | ||
159 | + | func ad () = "%s__lpAssetId" | |
160 | + | ||
161 | + | ||
162 | + | let ae = { | |
163 | + | let t = getString(this, Y()) | |
164 | + | if ($isInstanceOf(t, "String")) | |
165 | + | then { | |
166 | + | let d = t | |
37 | 167 | addressFromString(d) | |
38 | 168 | } | |
39 | - | else if ($isInstanceOf( | |
169 | + | else if ($isInstanceOf(t, "Unit")) | |
40 | 170 | then unit | |
41 | 171 | else throw("Match error") | |
42 | 172 | } | |
43 | 173 | ||
44 | - | let | |
174 | + | let af = valueOrErrorMessage(ae, c("invalid calculator address")) | |
45 | 175 | ||
46 | - | let | |
47 | - | let | |
48 | - | if ($isInstanceOf( | |
176 | + | let ag = { | |
177 | + | let t = getString(this, Z()) | |
178 | + | if ($isInstanceOf(t, "String")) | |
49 | 179 | then { | |
50 | - | let d = | |
180 | + | let d = t | |
51 | 181 | addressFromString(d) | |
52 | 182 | } | |
53 | - | else if ($isInstanceOf( | |
183 | + | else if ($isInstanceOf(t, "Unit")) | |
54 | 184 | then unit | |
55 | 185 | else throw("Match error") | |
56 | 186 | } | |
57 | 187 | ||
58 | - | let | |
188 | + | let ah = valueOrErrorMessage(ag, c("invalid proxy treasury address")) | |
59 | 189 | ||
60 | - | func | |
190 | + | func ai () = "%s__config" | |
61 | 191 | ||
62 | 192 | ||
63 | - | func | |
193 | + | func aj () = "contract_children" | |
64 | 194 | ||
65 | 195 | ||
66 | - | func | |
196 | + | func ak () = "contract_voting_result" | |
67 | 197 | ||
68 | 198 | ||
69 | - | func | |
199 | + | func al (v,j) = ((("proposal_allow_broadcast_" + toString(v)) + "_") + toBase58String(j)) | |
70 | 200 | ||
71 | 201 | ||
72 | - | func | |
202 | + | func am (an,ao) = makeString(["investor", toString(an), toString(ao)], "_") | |
73 | 203 | ||
74 | 204 | ||
75 | - | let | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
205 | + | let ap = { | |
206 | + | let t = getString(this, ai()) | |
207 | + | if ($isInstanceOf(t, "String")) | |
78 | 208 | then { | |
79 | - | let d = | |
209 | + | let d = t | |
80 | 210 | addressFromString(d) | |
81 | 211 | } | |
82 | - | else if ($isInstanceOf( | |
212 | + | else if ($isInstanceOf(t, "Unit")) | |
83 | 213 | then unit | |
84 | 214 | else throw("Match error") | |
85 | 215 | } | |
86 | 216 | ||
87 | - | let | |
217 | + | let aq = valueOrErrorMessage(ap, c("invalid config address")) | |
88 | 218 | ||
89 | - | let | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
219 | + | let ar = { | |
220 | + | let t = ap | |
221 | + | if ($isInstanceOf(t, "Address")) | |
92 | 222 | then { | |
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
223 | + | let x = t | |
224 | + | let as = getString(x, ak()) | |
225 | + | if ($isInstanceOf(as, "String")) | |
96 | 226 | then { | |
97 | - | let d = | |
227 | + | let d = as | |
98 | 228 | addressFromString(d) | |
99 | 229 | } | |
100 | - | else if ($isInstanceOf( | |
230 | + | else if ($isInstanceOf(as, "Unit")) | |
101 | 231 | then unit | |
102 | 232 | else throw("Match error") | |
103 | 233 | } | |
104 | - | else if ($isInstanceOf( | |
234 | + | else if ($isInstanceOf(t, "Unit")) | |
105 | 235 | then unit | |
106 | 236 | else throw("Match error") | |
107 | 237 | } | |
108 | 238 | ||
109 | - | let | |
239 | + | let at = valueOrErrorMessage(ar, c("invalid voting result address")) | |
110 | 240 | ||
111 | - | let | |
112 | - | let | |
113 | - | if ($isInstanceOf( | |
241 | + | let au = { | |
242 | + | let t = ap | |
243 | + | if ($isInstanceOf(t, "Address")) | |
114 | 244 | then { | |
115 | - | let | |
116 | - | let | |
117 | - | if ($isInstanceOf( | |
245 | + | let x = t | |
246 | + | let as = getString(x, aj()) | |
247 | + | if ($isInstanceOf(as, "String")) | |
118 | 248 | then { | |
119 | - | let d = | |
249 | + | let d = as | |
120 | 250 | addressFromString(d) | |
121 | 251 | } | |
122 | - | else if ($isInstanceOf( | |
252 | + | else if ($isInstanceOf(as, "Unit")) | |
123 | 253 | then unit | |
124 | 254 | else throw("Match error") | |
125 | 255 | } | |
126 | - | else if ($isInstanceOf( | |
256 | + | else if ($isInstanceOf(t, "Unit")) | |
127 | 257 | then unit | |
128 | 258 | else throw("Match error") | |
129 | 259 | } | |
130 | 260 | ||
131 | - | let | |
261 | + | let av = valueOrErrorMessage(au, c("invalid children address")) | |
132 | 262 | ||
133 | - | let | |
134 | - | let | |
135 | - | if ($isInstanceOf( | |
263 | + | let aw = { | |
264 | + | let t = getString(this, ad()) | |
265 | + | if ($isInstanceOf(t, "String")) | |
136 | 266 | then { | |
137 | - | let d = | |
267 | + | let d = t | |
138 | 268 | fromBase58String(d) | |
139 | 269 | } | |
140 | - | else if ($isInstanceOf( | |
270 | + | else if ($isInstanceOf(t, "Unit")) | |
141 | 271 | then unit | |
142 | 272 | else throw("Match error") | |
143 | 273 | } | |
144 | 274 | ||
145 | - | let | |
275 | + | let ax = valueOrErrorMessage(aw, c("invalid lpAssetId")) | |
146 | 276 | ||
147 | - | func | |
277 | + | func ay (az,v) = if ((az.caller == v)) | |
148 | 278 | then true | |
149 | 279 | else e("permission denied") | |
150 | 280 | ||
151 | 281 | ||
152 | - | func | |
282 | + | func aA (az) = ay(az, this) | |
153 | 283 | ||
154 | 284 | ||
155 | - | func | |
285 | + | func aB (az) = ay(az, af) | |
156 | 286 | ||
157 | 287 | ||
158 | - | @Callable( | |
159 | - | func stringEntry ( | |
160 | - | then $Tuple2([StringEntry( | |
288 | + | @Callable(az) | |
289 | + | func stringEntry (P,aC) = if (aB(az)) | |
290 | + | then $Tuple2([StringEntry(P, aC)], P) | |
161 | 291 | else $Tuple2(nil, unit) | |
162 | 292 | ||
163 | 293 | ||
164 | 294 | ||
165 | - | @Callable( | |
166 | - | func integerEntry ( | |
167 | - | then $Tuple2([IntegerEntry( | |
295 | + | @Callable(az) | |
296 | + | func integerEntry (P,aC) = if (aB(az)) | |
297 | + | then $Tuple2([IntegerEntry(P, aC)], P) | |
168 | 298 | else $Tuple2(nil, unit) | |
169 | 299 | ||
170 | 300 | ||
171 | 301 | ||
172 | - | @Callable( | |
173 | - | func booleanEntry ( | |
174 | - | then $Tuple2([BooleanEntry( | |
302 | + | @Callable(az) | |
303 | + | func booleanEntry (P,aC) = if (aB(az)) | |
304 | + | then $Tuple2([BooleanEntry(P, aC)], P) | |
175 | 305 | else $Tuple2(nil, unit) | |
176 | 306 | ||
177 | 307 | ||
178 | 308 | ||
179 | - | @Callable( | |
180 | - | func binaryEntry ( | |
181 | - | then $Tuple2([BinaryEntry( | |
309 | + | @Callable(az) | |
310 | + | func binaryEntry (P,aC) = if (aB(az)) | |
311 | + | then $Tuple2([BinaryEntry(P, aC)], P) | |
182 | 312 | else $Tuple2(nil, unit) | |
183 | 313 | ||
184 | 314 | ||
185 | 315 | ||
186 | - | @Callable( | |
187 | - | func deleteEntry ( | |
188 | - | then $Tuple2([DeleteEntry( | |
316 | + | @Callable(az) | |
317 | + | func deleteEntry (P) = if (aB(az)) | |
318 | + | then $Tuple2([DeleteEntry(P)], P) | |
189 | 319 | else $Tuple2(nil, unit) | |
190 | 320 | ||
191 | 321 | ||
192 | 322 | ||
193 | - | @Callable( | |
194 | - | func reissue ( | |
195 | - | then $Tuple2([Reissue( | |
323 | + | @Callable(az) | |
324 | + | func reissue (aD) = if (aB(az)) | |
325 | + | then $Tuple2([Reissue(ax, aD, true)], aD) | |
196 | 326 | else $Tuple2(nil, unit) | |
197 | 327 | ||
198 | 328 | ||
199 | 329 | ||
200 | - | @Callable( | |
201 | - | func burn ( | |
202 | - | then $Tuple2([Burn( | |
330 | + | @Callable(az) | |
331 | + | func burn (aD) = if (aB(az)) | |
332 | + | then $Tuple2([Burn(ax, aD)], aD) | |
203 | 333 | else $Tuple2(nil, unit) | |
204 | 334 | ||
205 | 335 | ||
206 | 336 | ||
207 | - | @Callable( | |
208 | - | func transferAsset ( | |
209 | - | then $Tuple2([ScriptTransfer(Address( | |
337 | + | @Callable(az) | |
338 | + | func transferAsset (aE,aD,aF) = if (aB(az)) | |
339 | + | then $Tuple2([ScriptTransfer(Address(aE), aD, aF)], aD) | |
210 | 340 | else $Tuple2(nil, unit) | |
211 | 341 | ||
212 | 342 | ||
213 | 343 | ||
214 | - | @Callable( | |
215 | - | func transferWaves ( | |
216 | - | then $Tuple2([ScriptTransfer(Address( | |
344 | + | @Callable(az) | |
345 | + | func transferWaves (aE,aD) = if (aB(az)) | |
346 | + | then $Tuple2([ScriptTransfer(Address(aE), aD, unit)], aD) | |
217 | 347 | else $Tuple2(nil, unit) | |
218 | 348 | ||
219 | 349 | ||
220 | 350 | ||
221 | - | @Callable( | |
222 | - | func transferFromProxyTreasury ( | |
223 | - | then $Tuple2(nil, invoke( | |
351 | + | @Callable(az) | |
352 | + | func transferFromProxyTreasury (aG,aH) = if (aB(az)) | |
353 | + | then $Tuple2(nil, invoke(ah, "transferWaves", [aG, aH], nil)) | |
224 | 354 | else $Tuple2(nil, unit) | |
225 | 355 | ||
226 | 356 | ||
227 | 357 | ||
228 | - | @Callable( | |
229 | - | func finalize ( | |
358 | + | @Callable(az) | |
359 | + | func finalize (aI,aJ,aK) = $Tuple2(nil, reentrantInvoke(af, "finalize", [az.caller.bytes, aI, aJ, aK], az.payments)) | |
230 | 360 | ||
231 | 361 | ||
232 | 362 | ||
233 | - | @Callable( | |
234 | - | func claimLP () = $Tuple2(nil, reentrantInvoke( | |
363 | + | @Callable(az) | |
364 | + | func claimLP () = $Tuple2(nil, reentrantInvoke(af, "claimLP", [az.caller.bytes], az.payments)) | |
235 | 365 | ||
236 | 366 | ||
237 | 367 | ||
238 | - | @Callable( | |
239 | - | func claimWaves ( | |
368 | + | @Callable(az) | |
369 | + | func claimWaves (aL) = $Tuple2(nil, reentrantInvoke(af, "claimWaves", [az.caller.bytes, fromBase58String(aL)], az.payments)) | |
240 | 370 | ||
241 | 371 | ||
242 | 372 | ||
243 | - | @Callable( | |
244 | - | func invest () = $Tuple2(nil, reentrantInvoke( | |
373 | + | @Callable(az) | |
374 | + | func invest () = $Tuple2(nil, reentrantInvoke(af, "invest", [az.caller.bytes], az.payments)) | |
245 | 375 | ||
246 | 376 | ||
247 | 377 | ||
248 | - | @Callable( | |
249 | - | func withdraw () = $Tuple2(nil, reentrantInvoke( | |
378 | + | @Callable(az) | |
379 | + | func withdraw () = $Tuple2(nil, reentrantInvoke(af, "withdraw", [az.caller.bytes], az.payments)) | |
250 | 380 | ||
251 | 381 | ||
252 | 382 | ||
253 | - | @Callable( | |
254 | - | func cancelWithdraw ( | |
383 | + | @Callable(az) | |
384 | + | func cancelWithdraw (aL) = $Tuple2(nil, reentrantInvoke(af, "cancelWithdraw", [az.caller.bytes, fromBase58String(aL)], az.payments)) | |
255 | 385 | ||
256 | 386 | ||
257 | 387 | ||
258 | - | @Callable( | |
259 | - | func processBlocks () = $Tuple2(nil, reentrantInvoke( | |
388 | + | @Callable(az) | |
389 | + | func processBlocks () = $Tuple2(nil, reentrantInvoke(af, "processBlocks", [az.caller.bytes], az.payments)) | |
260 | 390 | ||
261 | 391 | ||
262 | - | @Verifier(Y) | |
263 | - | func Z () = { | |
264 | - | let aa = valueOrElse(getBoolean(E, t(this, Y.id)), false) | |
265 | - | let ab = sigVerify(Y.bodyBytes, Y.proofs[0], Y.senderPublicKey) | |
266 | - | if ((B != unit)) | |
267 | - | then if (aa) | |
268 | - | then true | |
269 | - | else ab | |
270 | - | else ab | |
392 | + | ||
393 | + | @Callable(az) | |
394 | + | func voteForTxId (j) = { | |
395 | + | let S = toBase58String(az.caller.bytes) | |
396 | + | let B = i(j) | |
397 | + | let z = [StringEntry(o(), j)] | |
398 | + | let aM = getString(this, o()) | |
399 | + | let W = [if ((size(fromBase58String(j)) == h)) | |
400 | + | then true | |
401 | + | else e((j + " is not valid txId")), if (if ((aM == unit)) | |
402 | + | then true | |
403 | + | else (value(aM) != j)) | |
404 | + | then true | |
405 | + | else e((j + " is already allowed"))] | |
406 | + | if ((W == W)) | |
407 | + | then R(S, B, g, z) | |
408 | + | else throw("Strict value is not equal to itself.") | |
409 | + | } | |
410 | + | ||
411 | + | ||
412 | + | @Verifier(aN) | |
413 | + | func aO () = { | |
414 | + | let aP = { | |
415 | + | let t = ar | |
416 | + | if ($isInstanceOf(t, "Address")) | |
417 | + | then { | |
418 | + | let aQ = t | |
419 | + | valueOrElse(getBoolean(aQ, al(this, aN.id)), false) | |
420 | + | } | |
421 | + | else false | |
422 | + | } | |
423 | + | let aR = (aN.id == fromBase58String(valueOrElse(getString(this, o()), ""))) | |
424 | + | let aS = if ((size(s()) >= g)) | |
425 | + | then false | |
426 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
427 | + | if (if (aP) | |
428 | + | then true | |
429 | + | else aR) | |
430 | + | then true | |
431 | + | else aS | |
271 | 432 | } | |
272 | 433 |
github/deemru/w8io/169f3d6 106.59 ms ◑