tx · CwLg6VqHAWFDSr16B2jA5aaMbaqsfBNM5GvMZMADJ9vb 3Mx16q4Tisr27xu8f3oLzm9TyUTMmcUJuUo: -0.01400000 Waves 2023.02.23 23:56 [2462813] smart account 3Mx16q4Tisr27xu8f3oLzm9TyUTMmcUJuUo > SELF 0.00000000 Waves
{ "type": 13, "id": "CwLg6VqHAWFDSr16B2jA5aaMbaqsfBNM5GvMZMADJ9vb", "fee": 1400000, "feeAssetId": null, "timestamp": 1677184465662, "version": 2, "chainId": 84, "sender": "3Mx16q4Tisr27xu8f3oLzm9TyUTMmcUJuUo", "senderPublicKey": "9Misq1eiu27cRLC6ZiL9S74JdRAWpX1rykUJzFGzf6Rb", "proofs": [ "aENEeMqXXLEikNEzTo6HZUraWs9gZBEAzWyJUaJiJDJz96XosUMoiBd6P4Hwp3ERJYaPW6XZHRB1LUhZWrQjpM4" ], "script": "base64:BgIzCAISBQoDCAgBEgQKAgEIEgQKAgEYEgMKAQgSAwoBCBIAEgASAwoBCBIECgIBARIDCgEIGwAJU0VQQVJBVE9SAgJfXwAIS0VZX0lOSVQCBElOSVQADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAKS0VZX01JTlRFUgIGTUlOVEVSAAlLRVlfQVNTRVQCBUFTU0VUABdLRVlfU1BPTlNPUlNISVBfTUFOQUdFUgITU1BPTlNPUlNISVBfTUFOQUdFUgAHTUFYX0lOVAD//////////38BEF92YWxpZGF0ZUFkZHJlc3MCCGFkZHJlc3NfBGVycl8EByRtYXRjaDAJAKYIAQUIYWRkcmVzc18DCQABAgUHJG1hdGNoMAIHQWRkcmVzcwQBYQUHJG1hdGNoMAYJAAIBBQRlcnJfAQ5fdmFsaWRhdGVBc3NldAIIYXNzZXRJZF8EZXJyXwQHJG1hdGNoMAkA7AcBCQDZBAEFCGFzc2V0SWRfAwkAAQIFByRtYXRjaDACBUFzc2V0BAFhBQckbWF0Y2gwBgkAAgEFBGVycl8BDF92YWxpZ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gkBDV9zYXZlTXVsdGlzaWcBCQERQGV4dHJOYXRpdmUoMTA2MikBBQltdWx0aXNpZ18FBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAckbWF0Y2gwCQCiCAEFDEtFWV9NVUxUSVNJRwMJAAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUJU0VQQVJBVE9SBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleeGfu0U=", "height": 2462813, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DpHcZfXSbPp16RTjX2UVHe3vTm7EQXXwqWZc4TfCkTPt Next: none Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "STATUS" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "MINTER" | |
13 | 13 | ||
14 | 14 | let f = "ASSET" | |
15 | 15 | ||
74 | 74 | func x (y) = [StringEntry(c, toString(y))] | |
75 | 75 | ||
76 | 76 | ||
77 | - | func z () = { | |
78 | - | let l = | |
79 | - | if ($isInstanceOf(l, " | |
77 | + | func z (A) = { | |
78 | + | let l = getBoolean(makeString([e, toString(A)], a)) | |
79 | + | if ($isInstanceOf(l, "Boolean")) | |
80 | 80 | then { | |
81 | 81 | let m = l | |
82 | 82 | m | |
83 | 83 | } | |
84 | - | else | |
84 | + | else false | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | - | func | |
88 | + | func B (A,q) = [BooleanEntry(makeString([e, toString(A)], a), q)] | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func C () = { | |
116 | 116 | func F (G) = [StringEntry(g, toString(G))] | |
117 | 117 | ||
118 | 118 | ||
119 | - | func H (I) = ((z() + I) + a) | |
120 | - | ||
121 | - | ||
122 | - | func J (I) = { | |
123 | - | let K = z() | |
124 | - | let L = { | |
125 | - | let l = indexOf(K, I) | |
126 | - | if ($isInstanceOf(l, "Int")) | |
127 | - | then { | |
128 | - | let m = l | |
129 | - | m | |
130 | - | } | |
131 | - | else throw("_removeMinter: no such minter") | |
132 | - | } | |
133 | - | (take(K, L) + takeRight(K, ((size(K) - size(I)) - L))) | |
134 | - | } | |
135 | - | ||
136 | - | ||
137 | - | func M () = if ((w() == Address(base58''))) | |
119 | + | func H () = if ((w() == Address(base58''))) | |
138 | 120 | then throw("_whenMultisigSet: revert") | |
139 | 121 | else true | |
140 | 122 | ||
141 | 123 | ||
142 | - | func | |
124 | + | func I (J) = if ((J != this)) | |
143 | 125 | then throw("_onlyThisContract: revert") | |
144 | 126 | else true | |
145 | 127 | ||
146 | 128 | ||
147 | - | func | |
129 | + | func K (J) = if (!(z(J))) | |
148 | 130 | then throw("_onlyMinter: revert") | |
149 | 131 | else true | |
150 | 132 | ||
151 | 133 | ||
152 | - | func | |
134 | + | func L (J) = if ((J != E())) | |
153 | 135 | then throw("_onlySponsorshipManager: revert") | |
154 | 136 | else true | |
155 | 137 | ||
156 | 138 | ||
157 | - | func | |
139 | + | func M () = if (t()) | |
158 | 140 | then throw("_whenNotInitialized: revert") | |
159 | 141 | else true | |
160 | 142 | ||
161 | 143 | ||
162 | - | func | |
144 | + | func N () = if (!(t())) | |
163 | 145 | then throw("_whenInitialized: revert") | |
164 | 146 | else true | |
165 | 147 | ||
166 | 148 | ||
167 | - | @Callable(T) | |
168 | - | func init (U,V,W) = { | |
169 | - | let X = if (if (if (if (if (N(T.caller)) | |
170 | - | then R() | |
171 | - | else false) | |
149 | + | @Callable(O) | |
150 | + | func init (P,Q,R) = { | |
151 | + | let S = if (if (if (if (if (I(O.caller)) | |
172 | 152 | then M() | |
173 | 153 | else false) | |
174 | - | then | |
154 | + | then H() | |
175 | 155 | else false) | |
176 | - | then p(size( | |
156 | + | then p(size(P), 4, 16, "init: invalid token name") | |
177 | 157 | else false) | |
178 | - | then p(W, 0, 8, "init: invalid decimals") | |
158 | + | then p(size(Q), 0, 255, "init: invalid token description") | |
159 | + | else false) | |
160 | + | then p(R, 0, 8, "init: invalid decimals") | |
179 | 161 | else false | |
180 | - | if (( | |
162 | + | if ((S == S)) | |
181 | 163 | then { | |
182 | - | let | |
183 | - | let | |
184 | - | $Tuple2(((u(true) ++ D( | |
164 | + | let T = Issue(P, Q, 0, R, true) | |
165 | + | let U = calculateAssetId(T) | |
166 | + | $Tuple2(((u(true) ++ D(U)) ++ [T]), unit) | |
185 | 167 | } | |
186 | 168 | else throw("Strict value is not equal to itself.") | |
187 | 169 | } | |
188 | 170 | ||
189 | 171 | ||
190 | 172 | ||
191 | - | @Callable( | |
192 | - | func mint ( | |
193 | - | let | |
194 | - | then | |
173 | + | @Callable(O) | |
174 | + | func mint (V,W) = { | |
175 | + | let S = if (if (if (N()) | |
176 | + | then K(O.caller) | |
195 | 177 | else false) | |
196 | - | then p( | |
178 | + | then p(V, 0, h, "mint: invalid amount") | |
197 | 179 | else false) | |
198 | - | then i( | |
180 | + | then i(W, "mint: invalid recipient") | |
199 | 181 | else false | |
200 | - | if (( | |
182 | + | if ((S == S)) | |
201 | 183 | then { | |
202 | - | let | |
203 | - | $Tuple2([Reissue( | |
184 | + | let X = C() | |
185 | + | $Tuple2([Reissue(X, V, true), ScriptTransfer(addressFromStringValue(W), V, X)], unit) | |
204 | 186 | } | |
205 | 187 | else throw("Strict value is not equal to itself.") | |
206 | 188 | } | |
207 | 189 | ||
208 | 190 | ||
209 | 191 | ||
210 | - | @Callable( | |
211 | - | func mintMany ( | |
212 | - | let | |
213 | - | then | |
192 | + | @Callable(O) | |
193 | + | func mintMany (V,Y) = { | |
194 | + | let S = if (if (N()) | |
195 | + | then K(O.caller) | |
214 | 196 | else false) | |
215 | - | then p( | |
197 | + | then p(V, 0, h, "mint: invalid amount") | |
216 | 198 | else false | |
217 | - | if (( | |
199 | + | if ((S == S)) | |
218 | 200 | then { | |
219 | - | let | |
220 | - | func | |
201 | + | let X = C() | |
202 | + | func Z (aa,ab) = (aa :+ ScriptTransfer(addressFromStringValue(ab), V, X)) | |
221 | 203 | ||
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | func | |
227 | - | then | |
228 | - | else | |
204 | + | let ac = { | |
205 | + | let ad = Y | |
206 | + | let ae = size(ad) | |
207 | + | let af = nil | |
208 | + | func ag (ah,ai) = if ((ai >= ae)) | |
209 | + | then ah | |
210 | + | else Z(ah, ad[ai]) | |
229 | 211 | ||
230 | - | func | |
231 | - | then | |
212 | + | func aj (ah,ai) = if ((ai >= ae)) | |
213 | + | then ah | |
232 | 214 | else throw("List size exceeds 51") | |
233 | 215 | ||
234 | - | | |
216 | + | aj(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(af, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51) | |
235 | 217 | } | |
236 | - | $Tuple2(([Reissue( | |
218 | + | $Tuple2(([Reissue(X, (V * size(Y)), true)] ++ ac), unit) | |
237 | 219 | } | |
238 | 220 | else throw("Strict value is not equal to itself.") | |
239 | 221 | } | |
240 | 222 | ||
241 | 223 | ||
242 | 224 | ||
243 | - | @Callable( | |
244 | - | func addMinter ( | |
245 | - | let | |
246 | - | then | |
225 | + | @Callable(O) | |
226 | + | func addMinter (A) = { | |
227 | + | let S = if (if (I(O.caller)) | |
228 | + | then N() | |
247 | 229 | else false) | |
248 | - | then i( | |
230 | + | then i(A, "init: invalid minter") | |
249 | 231 | else false | |
250 | - | if (( | |
251 | - | then $Tuple2(A | |
232 | + | if ((S == S)) | |
233 | + | then $Tuple2(B(addressFromStringValue(A), true), unit) | |
252 | 234 | else throw("Strict value is not equal to itself.") | |
253 | 235 | } | |
254 | 236 | ||
255 | 237 | ||
256 | 238 | ||
257 | - | @Callable( | |
258 | - | func removeMinter ( | |
259 | - | let | |
260 | - | then | |
239 | + | @Callable(O) | |
240 | + | func removeMinter (A) = { | |
241 | + | let S = if (if (I(O.caller)) | |
242 | + | then N() | |
261 | 243 | else false) | |
262 | - | then i( | |
244 | + | then i(A, "init: invalid minter") | |
263 | 245 | else false | |
264 | - | if (( | |
265 | - | then $Tuple2(A | |
246 | + | if ((S == S)) | |
247 | + | then $Tuple2(B(addressFromStringValue(A), false), unit) | |
266 | 248 | else throw("Strict value is not equal to itself.") | |
267 | 249 | } | |
268 | 250 | ||
269 | 251 | ||
270 | 252 | ||
271 | - | @Callable( | |
253 | + | @Callable(O) | |
272 | 254 | func getAssetId () = $Tuple2(nil, C()) | |
273 | 255 | ||
274 | 256 | ||
275 | 257 | ||
276 | - | @Callable( | |
258 | + | @Callable(O) | |
277 | 259 | func getDecimals () = { | |
278 | - | let | |
260 | + | let ak = { | |
279 | 261 | let l = assetInfo(C()) | |
280 | 262 | if ($isInstanceOf(l, "Asset")) | |
281 | 263 | then { | |
284 | 266 | } | |
285 | 267 | else throw("getDecimals: revert") | |
286 | 268 | } | |
287 | - | $Tuple2(nil, | |
269 | + | $Tuple2(nil, ak) | |
288 | 270 | } | |
289 | 271 | ||
290 | 272 | ||
291 | 273 | ||
292 | - | @Callable(T) | |
293 | - | func setMultisig (y) = { | |
294 | - | let X = if (N(T.caller)) | |
295 | - | then i(y, "setMultisig: invalid multisig") | |
296 | - | else false | |
297 | - | if ((X == X)) | |
298 | - | then $Tuple2(x(addressFromStringValue(y)), unit) | |
299 | - | else throw("Strict value is not equal to itself.") | |
300 | - | } | |
301 | - | ||
302 | - | ||
303 | - | ||
304 | - | @Callable(T) | |
274 | + | @Callable(O) | |
305 | 275 | func setSponsorshipManager (G) = { | |
306 | - | let | |
276 | + | let S = if (I(O.caller)) | |
307 | 277 | then i(G, "setSponsorshipManager: invalid manager") | |
308 | 278 | else false | |
309 | - | if (( | |
279 | + | if ((S == S)) | |
310 | 280 | then $Tuple2(F(addressFromStringValue(G)), unit) | |
311 | 281 | else throw("Strict value is not equal to itself.") | |
312 | 282 | } | |
313 | 283 | ||
314 | 284 | ||
315 | 285 | ||
316 | - | @Callable( | |
317 | - | func updateSponsorship ( | |
318 | - | let | |
319 | - | then p( | |
286 | + | @Callable(O) | |
287 | + | func updateSponsorship (al,am) = { | |
288 | + | let S = if (if (L(O.caller)) | |
289 | + | then p(al, 0, h, "updateSponsorship: invalid sponsor fee") | |
320 | 290 | else false) | |
321 | - | then p( | |
291 | + | then p(am, 0, h, "updateSponsorship: invalid waves required amount") | |
322 | 292 | else false | |
323 | - | if (( | |
293 | + | if ((S == S)) | |
324 | 294 | then { | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
295 | + | let an = C() | |
296 | + | let ao = assetBalance(this, an) | |
297 | + | let ap = if ((al == 0)) | |
328 | 298 | then unit | |
329 | - | else | |
330 | - | let | |
331 | - | then [ScriptTransfer( | |
299 | + | else al | |
300 | + | let ac = if ((wavesBalance(this).regular > am)) | |
301 | + | then [ScriptTransfer(O.caller, (wavesBalance(this).regular - am), unit)] | |
332 | 302 | else nil | |
333 | - | $Tuple2(( | |
303 | + | $Tuple2((ac ++ [ScriptTransfer(O.caller, ao, an), SponsorFee(an, ap)]), ao) | |
334 | 304 | } | |
335 | 305 | else throw("Strict value is not equal to itself.") | |
336 | 306 | } | |
337 | 307 | ||
338 | 308 | ||
339 | - | @Verifier(av) | |
340 | - | func aw () = { | |
309 | + | ||
310 | + | @Callable(O) | |
311 | + | func setMultisig (y) = { | |
312 | + | let S = if (I(O.caller)) | |
313 | + | then i(y, "setMultisig: invalid multisig") | |
314 | + | else false | |
315 | + | if ((S == S)) | |
316 | + | then $Tuple2(x(addressFromStringValue(y)), unit) | |
317 | + | else throw("Strict value is not equal to itself.") | |
318 | + | } | |
319 | + | ||
320 | + | ||
321 | + | @Verifier(aq) | |
322 | + | func ar () = { | |
341 | 323 | let l = getString(c) | |
342 | 324 | if ($isInstanceOf(l, "String")) | |
343 | 325 | then { | |
344 | - | let | |
345 | - | valueOrElse(getBoolean(addressFromStringValue( | |
326 | + | let as = l | |
327 | + | valueOrElse(getBoolean(addressFromStringValue(as), makeString([d, toString(this), toBase58String(aq.id)], a)), false) | |
346 | 328 | } | |
347 | - | else sigVerify( | |
329 | + | else sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
348 | 330 | } | |
349 | 331 |
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 = "INIT" | |
7 | 7 | ||
8 | 8 | let c = "MULTISIG" | |
9 | 9 | ||
10 | 10 | let d = "STATUS" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "MINTER" | |
13 | 13 | ||
14 | 14 | let f = "ASSET" | |
15 | 15 | ||
16 | 16 | let g = "SPONSORSHIP_MANAGER" | |
17 | 17 | ||
18 | 18 | let h = 9223372036854775807 | |
19 | 19 | ||
20 | 20 | func i (j,k) = { | |
21 | 21 | let l = addressFromString(j) | |
22 | 22 | if ($isInstanceOf(l, "Address")) | |
23 | 23 | then { | |
24 | 24 | let m = l | |
25 | 25 | true | |
26 | 26 | } | |
27 | 27 | else throw(k) | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func n (o,k) = { | |
32 | 32 | let l = assetInfo(fromBase58String(o)) | |
33 | 33 | if ($isInstanceOf(l, "Asset")) | |
34 | 34 | then { | |
35 | 35 | let m = l | |
36 | 36 | true | |
37 | 37 | } | |
38 | 38 | else throw(k) | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func p (q,r,s,k) = if (if ((r > q)) | |
43 | 43 | then true | |
44 | 44 | else (q > s)) | |
45 | 45 | then throw(k) | |
46 | 46 | else true | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func t () = { | |
50 | 50 | let l = getBoolean(b) | |
51 | 51 | if ($isInstanceOf(l, "Boolean")) | |
52 | 52 | then { | |
53 | 53 | let m = l | |
54 | 54 | m | |
55 | 55 | } | |
56 | 56 | else false | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func u (v) = [BooleanEntry(b, v)] | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func w () = { | |
64 | 64 | let l = getString(c) | |
65 | 65 | if ($isInstanceOf(l, "String")) | |
66 | 66 | then { | |
67 | 67 | let m = l | |
68 | 68 | addressFromStringValue(m) | |
69 | 69 | } | |
70 | 70 | else Address(base58'') | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func x (y) = [StringEntry(c, toString(y))] | |
75 | 75 | ||
76 | 76 | ||
77 | - | func z () = { | |
78 | - | let l = | |
79 | - | if ($isInstanceOf(l, " | |
77 | + | func z (A) = { | |
78 | + | let l = getBoolean(makeString([e, toString(A)], a)) | |
79 | + | if ($isInstanceOf(l, "Boolean")) | |
80 | 80 | then { | |
81 | 81 | let m = l | |
82 | 82 | m | |
83 | 83 | } | |
84 | - | else | |
84 | + | else false | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | - | func | |
88 | + | func B (A,q) = [BooleanEntry(makeString([e, toString(A)], a), q)] | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func C () = { | |
92 | 92 | let l = getString(f) | |
93 | 93 | if ($isInstanceOf(l, "String")) | |
94 | 94 | then { | |
95 | 95 | let m = l | |
96 | 96 | fromBase58String(m) | |
97 | 97 | } | |
98 | 98 | else base58'' | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func D (o) = [StringEntry(f, toBase58String(o))] | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func E () = { | |
106 | 106 | let l = getString(g) | |
107 | 107 | if ($isInstanceOf(l, "String")) | |
108 | 108 | then { | |
109 | 109 | let m = l | |
110 | 110 | addressFromStringValue(m) | |
111 | 111 | } | |
112 | 112 | else Address(base58'') | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func F (G) = [StringEntry(g, toString(G))] | |
117 | 117 | ||
118 | 118 | ||
119 | - | func H (I) = ((z() + I) + a) | |
120 | - | ||
121 | - | ||
122 | - | func J (I) = { | |
123 | - | let K = z() | |
124 | - | let L = { | |
125 | - | let l = indexOf(K, I) | |
126 | - | if ($isInstanceOf(l, "Int")) | |
127 | - | then { | |
128 | - | let m = l | |
129 | - | m | |
130 | - | } | |
131 | - | else throw("_removeMinter: no such minter") | |
132 | - | } | |
133 | - | (take(K, L) + takeRight(K, ((size(K) - size(I)) - L))) | |
134 | - | } | |
135 | - | ||
136 | - | ||
137 | - | func M () = if ((w() == Address(base58''))) | |
119 | + | func H () = if ((w() == Address(base58''))) | |
138 | 120 | then throw("_whenMultisigSet: revert") | |
139 | 121 | else true | |
140 | 122 | ||
141 | 123 | ||
142 | - | func | |
124 | + | func I (J) = if ((J != this)) | |
143 | 125 | then throw("_onlyThisContract: revert") | |
144 | 126 | else true | |
145 | 127 | ||
146 | 128 | ||
147 | - | func | |
129 | + | func K (J) = if (!(z(J))) | |
148 | 130 | then throw("_onlyMinter: revert") | |
149 | 131 | else true | |
150 | 132 | ||
151 | 133 | ||
152 | - | func | |
134 | + | func L (J) = if ((J != E())) | |
153 | 135 | then throw("_onlySponsorshipManager: revert") | |
154 | 136 | else true | |
155 | 137 | ||
156 | 138 | ||
157 | - | func | |
139 | + | func M () = if (t()) | |
158 | 140 | then throw("_whenNotInitialized: revert") | |
159 | 141 | else true | |
160 | 142 | ||
161 | 143 | ||
162 | - | func | |
144 | + | func N () = if (!(t())) | |
163 | 145 | then throw("_whenInitialized: revert") | |
164 | 146 | else true | |
165 | 147 | ||
166 | 148 | ||
167 | - | @Callable(T) | |
168 | - | func init (U,V,W) = { | |
169 | - | let X = if (if (if (if (if (N(T.caller)) | |
170 | - | then R() | |
171 | - | else false) | |
149 | + | @Callable(O) | |
150 | + | func init (P,Q,R) = { | |
151 | + | let S = if (if (if (if (if (I(O.caller)) | |
172 | 152 | then M() | |
173 | 153 | else false) | |
174 | - | then | |
154 | + | then H() | |
175 | 155 | else false) | |
176 | - | then p(size( | |
156 | + | then p(size(P), 4, 16, "init: invalid token name") | |
177 | 157 | else false) | |
178 | - | then p(W, 0, 8, "init: invalid decimals") | |
158 | + | then p(size(Q), 0, 255, "init: invalid token description") | |
159 | + | else false) | |
160 | + | then p(R, 0, 8, "init: invalid decimals") | |
179 | 161 | else false | |
180 | - | if (( | |
162 | + | if ((S == S)) | |
181 | 163 | then { | |
182 | - | let | |
183 | - | let | |
184 | - | $Tuple2(((u(true) ++ D( | |
164 | + | let T = Issue(P, Q, 0, R, true) | |
165 | + | let U = calculateAssetId(T) | |
166 | + | $Tuple2(((u(true) ++ D(U)) ++ [T]), unit) | |
185 | 167 | } | |
186 | 168 | else throw("Strict value is not equal to itself.") | |
187 | 169 | } | |
188 | 170 | ||
189 | 171 | ||
190 | 172 | ||
191 | - | @Callable( | |
192 | - | func mint ( | |
193 | - | let | |
194 | - | then | |
173 | + | @Callable(O) | |
174 | + | func mint (V,W) = { | |
175 | + | let S = if (if (if (N()) | |
176 | + | then K(O.caller) | |
195 | 177 | else false) | |
196 | - | then p( | |
178 | + | then p(V, 0, h, "mint: invalid amount") | |
197 | 179 | else false) | |
198 | - | then i( | |
180 | + | then i(W, "mint: invalid recipient") | |
199 | 181 | else false | |
200 | - | if (( | |
182 | + | if ((S == S)) | |
201 | 183 | then { | |
202 | - | let | |
203 | - | $Tuple2([Reissue( | |
184 | + | let X = C() | |
185 | + | $Tuple2([Reissue(X, V, true), ScriptTransfer(addressFromStringValue(W), V, X)], unit) | |
204 | 186 | } | |
205 | 187 | else throw("Strict value is not equal to itself.") | |
206 | 188 | } | |
207 | 189 | ||
208 | 190 | ||
209 | 191 | ||
210 | - | @Callable( | |
211 | - | func mintMany ( | |
212 | - | let | |
213 | - | then | |
192 | + | @Callable(O) | |
193 | + | func mintMany (V,Y) = { | |
194 | + | let S = if (if (N()) | |
195 | + | then K(O.caller) | |
214 | 196 | else false) | |
215 | - | then p( | |
197 | + | then p(V, 0, h, "mint: invalid amount") | |
216 | 198 | else false | |
217 | - | if (( | |
199 | + | if ((S == S)) | |
218 | 200 | then { | |
219 | - | let | |
220 | - | func | |
201 | + | let X = C() | |
202 | + | func Z (aa,ab) = (aa :+ ScriptTransfer(addressFromStringValue(ab), V, X)) | |
221 | 203 | ||
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | func | |
227 | - | then | |
228 | - | else | |
204 | + | let ac = { | |
205 | + | let ad = Y | |
206 | + | let ae = size(ad) | |
207 | + | let af = nil | |
208 | + | func ag (ah,ai) = if ((ai >= ae)) | |
209 | + | then ah | |
210 | + | else Z(ah, ad[ai]) | |
229 | 211 | ||
230 | - | func | |
231 | - | then | |
212 | + | func aj (ah,ai) = if ((ai >= ae)) | |
213 | + | then ah | |
232 | 214 | else throw("List size exceeds 51") | |
233 | 215 | ||
234 | - | | |
216 | + | aj(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(ag(af, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51) | |
235 | 217 | } | |
236 | - | $Tuple2(([Reissue( | |
218 | + | $Tuple2(([Reissue(X, (V * size(Y)), true)] ++ ac), unit) | |
237 | 219 | } | |
238 | 220 | else throw("Strict value is not equal to itself.") | |
239 | 221 | } | |
240 | 222 | ||
241 | 223 | ||
242 | 224 | ||
243 | - | @Callable( | |
244 | - | func addMinter ( | |
245 | - | let | |
246 | - | then | |
225 | + | @Callable(O) | |
226 | + | func addMinter (A) = { | |
227 | + | let S = if (if (I(O.caller)) | |
228 | + | then N() | |
247 | 229 | else false) | |
248 | - | then i( | |
230 | + | then i(A, "init: invalid minter") | |
249 | 231 | else false | |
250 | - | if (( | |
251 | - | then $Tuple2(A | |
232 | + | if ((S == S)) | |
233 | + | then $Tuple2(B(addressFromStringValue(A), true), unit) | |
252 | 234 | else throw("Strict value is not equal to itself.") | |
253 | 235 | } | |
254 | 236 | ||
255 | 237 | ||
256 | 238 | ||
257 | - | @Callable( | |
258 | - | func removeMinter ( | |
259 | - | let | |
260 | - | then | |
239 | + | @Callable(O) | |
240 | + | func removeMinter (A) = { | |
241 | + | let S = if (if (I(O.caller)) | |
242 | + | then N() | |
261 | 243 | else false) | |
262 | - | then i( | |
244 | + | then i(A, "init: invalid minter") | |
263 | 245 | else false | |
264 | - | if (( | |
265 | - | then $Tuple2(A | |
246 | + | if ((S == S)) | |
247 | + | then $Tuple2(B(addressFromStringValue(A), false), unit) | |
266 | 248 | else throw("Strict value is not equal to itself.") | |
267 | 249 | } | |
268 | 250 | ||
269 | 251 | ||
270 | 252 | ||
271 | - | @Callable( | |
253 | + | @Callable(O) | |
272 | 254 | func getAssetId () = $Tuple2(nil, C()) | |
273 | 255 | ||
274 | 256 | ||
275 | 257 | ||
276 | - | @Callable( | |
258 | + | @Callable(O) | |
277 | 259 | func getDecimals () = { | |
278 | - | let | |
260 | + | let ak = { | |
279 | 261 | let l = assetInfo(C()) | |
280 | 262 | if ($isInstanceOf(l, "Asset")) | |
281 | 263 | then { | |
282 | 264 | let m = l | |
283 | 265 | m.decimals | |
284 | 266 | } | |
285 | 267 | else throw("getDecimals: revert") | |
286 | 268 | } | |
287 | - | $Tuple2(nil, | |
269 | + | $Tuple2(nil, ak) | |
288 | 270 | } | |
289 | 271 | ||
290 | 272 | ||
291 | 273 | ||
292 | - | @Callable(T) | |
293 | - | func setMultisig (y) = { | |
294 | - | let X = if (N(T.caller)) | |
295 | - | then i(y, "setMultisig: invalid multisig") | |
296 | - | else false | |
297 | - | if ((X == X)) | |
298 | - | then $Tuple2(x(addressFromStringValue(y)), unit) | |
299 | - | else throw("Strict value is not equal to itself.") | |
300 | - | } | |
301 | - | ||
302 | - | ||
303 | - | ||
304 | - | @Callable(T) | |
274 | + | @Callable(O) | |
305 | 275 | func setSponsorshipManager (G) = { | |
306 | - | let | |
276 | + | let S = if (I(O.caller)) | |
307 | 277 | then i(G, "setSponsorshipManager: invalid manager") | |
308 | 278 | else false | |
309 | - | if (( | |
279 | + | if ((S == S)) | |
310 | 280 | then $Tuple2(F(addressFromStringValue(G)), unit) | |
311 | 281 | else throw("Strict value is not equal to itself.") | |
312 | 282 | } | |
313 | 283 | ||
314 | 284 | ||
315 | 285 | ||
316 | - | @Callable( | |
317 | - | func updateSponsorship ( | |
318 | - | let | |
319 | - | then p( | |
286 | + | @Callable(O) | |
287 | + | func updateSponsorship (al,am) = { | |
288 | + | let S = if (if (L(O.caller)) | |
289 | + | then p(al, 0, h, "updateSponsorship: invalid sponsor fee") | |
320 | 290 | else false) | |
321 | - | then p( | |
291 | + | then p(am, 0, h, "updateSponsorship: invalid waves required amount") | |
322 | 292 | else false | |
323 | - | if (( | |
293 | + | if ((S == S)) | |
324 | 294 | then { | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
295 | + | let an = C() | |
296 | + | let ao = assetBalance(this, an) | |
297 | + | let ap = if ((al == 0)) | |
328 | 298 | then unit | |
329 | - | else | |
330 | - | let | |
331 | - | then [ScriptTransfer( | |
299 | + | else al | |
300 | + | let ac = if ((wavesBalance(this).regular > am)) | |
301 | + | then [ScriptTransfer(O.caller, (wavesBalance(this).regular - am), unit)] | |
332 | 302 | else nil | |
333 | - | $Tuple2(( | |
303 | + | $Tuple2((ac ++ [ScriptTransfer(O.caller, ao, an), SponsorFee(an, ap)]), ao) | |
334 | 304 | } | |
335 | 305 | else throw("Strict value is not equal to itself.") | |
336 | 306 | } | |
337 | 307 | ||
338 | 308 | ||
339 | - | @Verifier(av) | |
340 | - | func aw () = { | |
309 | + | ||
310 | + | @Callable(O) | |
311 | + | func setMultisig (y) = { | |
312 | + | let S = if (I(O.caller)) | |
313 | + | then i(y, "setMultisig: invalid multisig") | |
314 | + | else false | |
315 | + | if ((S == S)) | |
316 | + | then $Tuple2(x(addressFromStringValue(y)), unit) | |
317 | + | else throw("Strict value is not equal to itself.") | |
318 | + | } | |
319 | + | ||
320 | + | ||
321 | + | @Verifier(aq) | |
322 | + | func ar () = { | |
341 | 323 | let l = getString(c) | |
342 | 324 | if ($isInstanceOf(l, "String")) | |
343 | 325 | then { | |
344 | - | let | |
345 | - | valueOrElse(getBoolean(addressFromStringValue( | |
326 | + | let as = l | |
327 | + | valueOrElse(getBoolean(addressFromStringValue(as), makeString([d, toString(this), toBase58String(aq.id)], a)), false) | |
346 | 328 | } | |
347 | - | else sigVerify( | |
329 | + | else sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
348 | 330 | } | |
349 | 331 |
github/deemru/w8io/169f3d6 103.56 ms ◑