tx · EbRNPMnmTWZrq7eC8DG36PnnaMVR3iyKPH7x4T1bbSe 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6: -0.01000000 Waves 2023.03.09 03:36 [2481838] smart account 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6 > SELF 0.00000000 Waves
{ "type": 13, "id": "EbRNPMnmTWZrq7eC8DG36PnnaMVR3iyKPH7x4T1bbSe", "fee": 1000000, "feeAssetId": null, "timestamp": 1678322330781, "version": 2, "chainId": 84, "sender": "3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6", "senderPublicKey": "GmYZFRssDr88KiZt3x4LsJ6qfqaTfMUycQTKZVdipUgS", "proofs": [ "5m9Sh9gGe57Nd3kShG2LbqbgJGrUYBsNkuXa2sukFgC1auiLvrQqXMjL1564NGsBGXS8CCBhh5oKRRCwcqF66k5w" ], "script": "base64:BgIlCAISAwoBARIECgIIARIECgIYGBIECgIICBIDCgEIEgUKAwgICAMADG9wdGlvbnNfYWRkcgkBB0FkZHJlc3MBARoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAEdFJVQgEgv7I1LEj/fS4nZAGEmW42z/vK94nfeiKN08fw7a6U2ZsABHRVU0QBIKskSmq2Qkbr0vzjebBhusOuaVdNUnrKRRynQB0RsCkOBgFpARFyZWlzc3VlRm9yRGVwQWRkcgEIcXVhbnRpdHkECWFkbWluTGlzdAQHJG1hdGNoMAkAnQgCBQxvcHRpb25zX2FkZHICCmFkbWluX2xpc3QDCQABAgUHJG1hdGNoMAIEVW5pdAIFdW5zZXQDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF4BQckbWF0Y2gwBQF4CQACAQILTWF0Y2ggZXJyb3IEEGNhbGxlckFkZHJlc3NTdHIJAKUIAQgFAWkGY2FsbGVyAwkBAiE9AgUJYWRtaW5MaXN0AgV1bnNldAQEdGVzdAkAnQgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQlhZG1pbkxpc3QFEGNhbGxlckF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AIFBHRoaXMJANgEAQgIBQFpBmNhbGxlcgVieXRlcwMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBGhpc3QFByRtYXRjaDAFBGhpc3QCBXVuc2V0AwkBAiE9AgUNaXNLbm93bkNhbGxlcgIFdW5zZXQJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMJAKwCAgkArAICCQCsAgIJAKwCAgUEbmFtZQIBfAUDaW5uAgF8BQRvZ3JuCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgDAhD0FBHVuaXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyAMCEPQUEdFVTRAUDbmlsBQR1bml0CQACAQIVQ2FuIGJlIHVzZWQgb25seSBvbmNlAQJ0eAEGdmVyaWZ5AAQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIPRGF0YVRyYW5zYWN0aW9uBANkdHgFByRtYXRjaDAHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5/EQZew==", "height": 2481838, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HEXE2ZWAwh6hsDvp1GmimaQDJyBZBZ3DR4cGnFYPGz9c Next: C3bC8nrvSTkg9mgfPnoou13FLk48LYTP6uUhZ2taz9dh Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let c = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | - | func reissueForDepAddr (e | |
12 | - | let | |
13 | - | let | |
14 | - | if ($isInstanceOf( | |
11 | + | func reissueForDepAddr (e) = { | |
12 | + | let f = { | |
13 | + | let g = getString(a, "admin_list") | |
14 | + | if ($isInstanceOf(g, "Unit")) | |
15 | 15 | then "unset" | |
16 | - | else if ($isInstanceOf( | |
16 | + | else if ($isInstanceOf(g, "String")) | |
17 | 17 | then { | |
18 | - | let | |
19 | - | | |
18 | + | let h = g | |
19 | + | h | |
20 | 20 | } | |
21 | 21 | else throw("Match error") | |
22 | 22 | } | |
23 | - | let | |
24 | - | if (( | |
23 | + | let i = toString(d.caller) | |
24 | + | if ((f != "unset")) | |
25 | 25 | then { | |
26 | - | let | |
27 | - | let | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
26 | + | let j = getString(addressFromStringValue(f), i) | |
27 | + | let k = { | |
28 | + | let g = j | |
29 | + | if ($isInstanceOf(g, "String")) | |
30 | 30 | then { | |
31 | - | let | |
32 | - | | |
31 | + | let h = g | |
32 | + | h | |
33 | 33 | } | |
34 | - | else if ($isInstanceOf( | |
34 | + | else if ($isInstanceOf(g, "Unit")) | |
35 | 35 | then "no admin" | |
36 | 36 | else throw("Match error") | |
37 | 37 | } | |
38 | - | if (( | |
38 | + | if ((k != "no admin")) | |
39 | 39 | then { | |
40 | - | let | |
41 | - | if (( | |
42 | - | then $Tuple2([ | |
40 | + | let l = Reissue(b, e, true) | |
41 | + | if ((l == l)) | |
42 | + | then $Tuple2([l], (((((((("Reissue error for param: token =>" + toBase58String(b)) + " quantity:") + toString(e)) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ".")) | |
43 | 43 | else throw("Strict value is not equal to itself.") | |
44 | 44 | } | |
45 | - | else throw((((((("You not admin: " + | |
45 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
46 | 46 | } | |
47 | 47 | else throw("Unset admin list") | |
48 | 48 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(d) | |
53 | - | func reissueTokens (e | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
53 | + | func reissueTokens (m,e) = { | |
54 | + | let f = { | |
55 | + | let g = getString(a, "admin_list") | |
56 | + | if ($isInstanceOf(g, "Unit")) | |
57 | 57 | then "unset" | |
58 | - | else if ($isInstanceOf( | |
58 | + | else if ($isInstanceOf(g, "String")) | |
59 | 59 | then { | |
60 | - | let | |
61 | - | | |
60 | + | let h = g | |
61 | + | h | |
62 | 62 | } | |
63 | 63 | else throw("Match error") | |
64 | 64 | } | |
65 | - | let | |
66 | - | if (( | |
65 | + | let i = toString(d.caller) | |
66 | + | if ((f != "unset")) | |
67 | 67 | then { | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
68 | + | let j = getString(addressFromStringValue(f), i) | |
69 | + | let k = { | |
70 | + | let g = j | |
71 | + | if ($isInstanceOf(g, "String")) | |
72 | 72 | then { | |
73 | - | let | |
74 | - | | |
73 | + | let h = g | |
74 | + | h | |
75 | 75 | } | |
76 | - | else if ($isInstanceOf( | |
76 | + | else if ($isInstanceOf(g, "Unit")) | |
77 | 77 | then "no admin" | |
78 | 78 | else throw("Match error") | |
79 | 79 | } | |
80 | - | if (( | |
80 | + | if ((k != "no admin")) | |
81 | 81 | then { | |
82 | - | let | |
83 | - | $Tuple2([ | |
82 | + | let l = Reissue(fromBase58String(m), e, true) | |
83 | + | $Tuple2([l], (((((((("Reissue error for param: token => " + m) + ", quantity:") + toString(e)) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ".")) | |
84 | 84 | } | |
85 | - | else throw((((((("You not admin: " + | |
85 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
86 | 86 | } | |
87 | 87 | else throw("Unset admin list") | |
88 | 88 | } | |
94 | 94 | let p = size(n) | |
95 | 95 | if ((100 >= p)) | |
96 | 96 | then { | |
97 | - | let | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
97 | + | let f = { | |
98 | + | let g = getString(this, "admin_list") | |
99 | + | if ($isInstanceOf(g, "Unit")) | |
100 | 100 | then "unset" | |
101 | - | else if ($isInstanceOf( | |
101 | + | else if ($isInstanceOf(g, "String")) | |
102 | 102 | then { | |
103 | - | let | |
104 | - | | |
103 | + | let h = g | |
104 | + | h | |
105 | 105 | } | |
106 | 106 | else throw("Match error") | |
107 | 107 | } | |
126 | 126 | ||
127 | 127 | D(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(z, 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), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
128 | 128 | } | |
129 | - | let | |
130 | - | if (( | |
129 | + | let i = toString(d.caller) | |
130 | + | if ((f != "unset")) | |
131 | 131 | then { | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | if ($isInstanceOf( | |
132 | + | let j = getString(addressFromStringValue(f), i) | |
133 | + | let k = { | |
134 | + | let g = j | |
135 | + | if ($isInstanceOf(g, "String")) | |
136 | 136 | then { | |
137 | - | let | |
138 | - | | |
137 | + | let h = g | |
138 | + | h | |
139 | 139 | } | |
140 | - | else if ($isInstanceOf( | |
140 | + | else if ($isInstanceOf(g, "Unit")) | |
141 | 141 | then "no admin" | |
142 | 142 | else throw("Match error") | |
143 | 143 | } | |
146 | 146 | StringEntry(G[0], G[1]) | |
147 | 147 | } | |
148 | 148 | ||
149 | - | if (( | |
149 | + | if ((k != "no admin")) | |
150 | 150 | then w | |
151 | - | else throw((((((("You not admin: " + | |
151 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
152 | 152 | } | |
153 | 153 | else throw("Unset admin list") | |
154 | 154 | } | |
159 | 159 | ||
160 | 160 | @Callable(d) | |
161 | 161 | func setOption (H,I) = { | |
162 | - | let | |
163 | - | let | |
164 | - | if ($isInstanceOf( | |
162 | + | let f = { | |
163 | + | let g = getString(this, "admin_list") | |
164 | + | if ($isInstanceOf(g, "Unit")) | |
165 | 165 | then "unset" | |
166 | - | else if ($isInstanceOf( | |
166 | + | else if ($isInstanceOf(g, "String")) | |
167 | 167 | then { | |
168 | - | let | |
169 | - | | |
168 | + | let h = g | |
169 | + | h | |
170 | 170 | } | |
171 | 171 | else throw("Match error") | |
172 | 172 | } | |
173 | - | let | |
174 | - | if (( | |
173 | + | let i = toString(d.caller) | |
174 | + | if ((f != "unset")) | |
175 | 175 | then { | |
176 | - | let | |
177 | - | let | |
178 | - | let | |
179 | - | if ($isInstanceOf( | |
176 | + | let j = getString(addressFromStringValue(f), i) | |
177 | + | let k = { | |
178 | + | let g = j | |
179 | + | if ($isInstanceOf(g, "String")) | |
180 | 180 | then { | |
181 | - | let | |
182 | - | | |
181 | + | let h = g | |
182 | + | h | |
183 | 183 | } | |
184 | - | else if ($isInstanceOf( | |
184 | + | else if ($isInstanceOf(g, "Unit")) | |
185 | 185 | then "no admin" | |
186 | 186 | else throw("Match error") | |
187 | 187 | } | |
188 | - | if (( | |
188 | + | if ((k != "no admin")) | |
189 | 189 | then $Tuple2([StringEntry(H, I)], unit) | |
190 | - | else throw((((((("You not admin: " + | |
190 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
191 | 191 | } | |
192 | 192 | else throw("Unset admin list") | |
193 | 193 | } | |
196 | 196 | ||
197 | 197 | @Callable(d) | |
198 | 198 | func delOption (H) = { | |
199 | - | let | |
200 | - | let | |
201 | - | if ($isInstanceOf( | |
199 | + | let f = { | |
200 | + | let g = getString(this, "admin_list") | |
201 | + | if ($isInstanceOf(g, "Unit")) | |
202 | 202 | then "unset" | |
203 | - | else if ($isInstanceOf( | |
203 | + | else if ($isInstanceOf(g, "String")) | |
204 | 204 | then { | |
205 | - | let | |
206 | - | | |
205 | + | let h = g | |
206 | + | h | |
207 | 207 | } | |
208 | 208 | else throw("Match error") | |
209 | 209 | } | |
210 | - | let | |
211 | - | if (( | |
210 | + | let i = toString(d.caller) | |
211 | + | if ((f != "unset")) | |
212 | 212 | then { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | if ($isInstanceOf( | |
213 | + | let j = getString(addressFromStringValue(f), i) | |
214 | + | let k = { | |
215 | + | let g = j | |
216 | + | if ($isInstanceOf(g, "String")) | |
217 | 217 | then { | |
218 | - | let | |
219 | - | | |
218 | + | let h = g | |
219 | + | h | |
220 | 220 | } | |
221 | - | else if ($isInstanceOf( | |
221 | + | else if ($isInstanceOf(g, "Unit")) | |
222 | 222 | then "no admin" | |
223 | 223 | else throw("Match error") | |
224 | 224 | } | |
225 | - | if (( | |
225 | + | if ((k != "no admin")) | |
226 | 226 | then $Tuple2([DeleteEntry(H)], unit) | |
227 | - | else throw((((((("You not admin: " + | |
227 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
228 | 228 | } | |
229 | 229 | else throw("Unset admin list") | |
230 | 230 | } | |
234 | 234 | @Callable(d) | |
235 | 235 | func regProvider (J,K,L) = { | |
236 | 236 | let M = { | |
237 | - | let | |
238 | - | if ($isInstanceOf( | |
237 | + | let g = getString(this, toBase58String(d.caller.bytes)) | |
238 | + | if ($isInstanceOf(g, "String")) | |
239 | 239 | then { | |
240 | - | let N = | |
240 | + | let N = g | |
241 | 241 | N | |
242 | 242 | } | |
243 | 243 | else "unset" | |
250 | 250 | ||
251 | 251 | @Verifier(O) | |
252 | 252 | func P () = { | |
253 | - | let | |
254 | - | if ($isInstanceOf( | |
253 | + | let g = O | |
254 | + | if ($isInstanceOf(g, "DataTransaction")) | |
255 | 255 | then { | |
256 | - | let Q = | |
256 | + | let Q = g | |
257 | 257 | false | |
258 | 258 | } | |
259 | 259 | else sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') | |
5 | 5 | ||
6 | 6 | let b = base58'DuJUjEZJWmpFUo3bubFX8tomUVitqZZNAPuhd6KWgJNE' | |
7 | 7 | ||
8 | 8 | let c = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | - | func reissueForDepAddr (e | |
12 | - | let | |
13 | - | let | |
14 | - | if ($isInstanceOf( | |
11 | + | func reissueForDepAddr (e) = { | |
12 | + | let f = { | |
13 | + | let g = getString(a, "admin_list") | |
14 | + | if ($isInstanceOf(g, "Unit")) | |
15 | 15 | then "unset" | |
16 | - | else if ($isInstanceOf( | |
16 | + | else if ($isInstanceOf(g, "String")) | |
17 | 17 | then { | |
18 | - | let | |
19 | - | | |
18 | + | let h = g | |
19 | + | h | |
20 | 20 | } | |
21 | 21 | else throw("Match error") | |
22 | 22 | } | |
23 | - | let | |
24 | - | if (( | |
23 | + | let i = toString(d.caller) | |
24 | + | if ((f != "unset")) | |
25 | 25 | then { | |
26 | - | let | |
27 | - | let | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
26 | + | let j = getString(addressFromStringValue(f), i) | |
27 | + | let k = { | |
28 | + | let g = j | |
29 | + | if ($isInstanceOf(g, "String")) | |
30 | 30 | then { | |
31 | - | let | |
32 | - | | |
31 | + | let h = g | |
32 | + | h | |
33 | 33 | } | |
34 | - | else if ($isInstanceOf( | |
34 | + | else if ($isInstanceOf(g, "Unit")) | |
35 | 35 | then "no admin" | |
36 | 36 | else throw("Match error") | |
37 | 37 | } | |
38 | - | if (( | |
38 | + | if ((k != "no admin")) | |
39 | 39 | then { | |
40 | - | let | |
41 | - | if (( | |
42 | - | then $Tuple2([ | |
40 | + | let l = Reissue(b, e, true) | |
41 | + | if ((l == l)) | |
42 | + | then $Tuple2([l], (((((((("Reissue error for param: token =>" + toBase58String(b)) + " quantity:") + toString(e)) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ".")) | |
43 | 43 | else throw("Strict value is not equal to itself.") | |
44 | 44 | } | |
45 | - | else throw((((((("You not admin: " + | |
45 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
46 | 46 | } | |
47 | 47 | else throw("Unset admin list") | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(d) | |
53 | - | func reissueTokens (e | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
53 | + | func reissueTokens (m,e) = { | |
54 | + | let f = { | |
55 | + | let g = getString(a, "admin_list") | |
56 | + | if ($isInstanceOf(g, "Unit")) | |
57 | 57 | then "unset" | |
58 | - | else if ($isInstanceOf( | |
58 | + | else if ($isInstanceOf(g, "String")) | |
59 | 59 | then { | |
60 | - | let | |
61 | - | | |
60 | + | let h = g | |
61 | + | h | |
62 | 62 | } | |
63 | 63 | else throw("Match error") | |
64 | 64 | } | |
65 | - | let | |
66 | - | if (( | |
65 | + | let i = toString(d.caller) | |
66 | + | if ((f != "unset")) | |
67 | 67 | then { | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
68 | + | let j = getString(addressFromStringValue(f), i) | |
69 | + | let k = { | |
70 | + | let g = j | |
71 | + | if ($isInstanceOf(g, "String")) | |
72 | 72 | then { | |
73 | - | let | |
74 | - | | |
73 | + | let h = g | |
74 | + | h | |
75 | 75 | } | |
76 | - | else if ($isInstanceOf( | |
76 | + | else if ($isInstanceOf(g, "Unit")) | |
77 | 77 | then "no admin" | |
78 | 78 | else throw("Match error") | |
79 | 79 | } | |
80 | - | if (( | |
80 | + | if ((k != "no admin")) | |
81 | 81 | then { | |
82 | - | let | |
83 | - | $Tuple2([ | |
82 | + | let l = Reissue(fromBase58String(m), e, true) | |
83 | + | $Tuple2([l], (((((((("Reissue error for param: token => " + m) + ", quantity:") + toString(e)) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ".")) | |
84 | 84 | } | |
85 | - | else throw((((((("You not admin: " + | |
85 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
86 | 86 | } | |
87 | 87 | else throw("Unset admin list") | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | 92 | @Callable(d) | |
93 | 93 | func setOptions (n,o) = { | |
94 | 94 | let p = size(n) | |
95 | 95 | if ((100 >= p)) | |
96 | 96 | then { | |
97 | - | let | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
97 | + | let f = { | |
98 | + | let g = getString(this, "admin_list") | |
99 | + | if ($isInstanceOf(g, "Unit")) | |
100 | 100 | then "unset" | |
101 | - | else if ($isInstanceOf( | |
101 | + | else if ($isInstanceOf(g, "String")) | |
102 | 102 | then { | |
103 | - | let | |
104 | - | | |
103 | + | let h = g | |
104 | + | h | |
105 | 105 | } | |
106 | 106 | else throw("Match error") | |
107 | 107 | } | |
108 | 108 | func q (r,s) = { | |
109 | 109 | let t = r | |
110 | 110 | let u = t._1 | |
111 | 111 | let v = t._2 | |
112 | 112 | $Tuple2((u :+ StringEntry(n[v], s)), (v + 1)) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | let w = { | |
116 | 116 | let x = o | |
117 | 117 | let y = size(x) | |
118 | 118 | let z = $Tuple2(nil, 0) | |
119 | 119 | func A (B,C) = if ((C >= y)) | |
120 | 120 | then B | |
121 | 121 | else q(B, x[C]) | |
122 | 122 | ||
123 | 123 | func D (B,C) = if ((C >= y)) | |
124 | 124 | then B | |
125 | 125 | else throw("List size exceeds 100") | |
126 | 126 | ||
127 | 127 | D(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(A(z, 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), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
128 | 128 | } | |
129 | - | let | |
130 | - | if (( | |
129 | + | let i = toString(d.caller) | |
130 | + | if ((f != "unset")) | |
131 | 131 | then { | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | if ($isInstanceOf( | |
132 | + | let j = getString(addressFromStringValue(f), i) | |
133 | + | let k = { | |
134 | + | let g = j | |
135 | + | if ($isInstanceOf(g, "String")) | |
136 | 136 | then { | |
137 | - | let | |
138 | - | | |
137 | + | let h = g | |
138 | + | h | |
139 | 139 | } | |
140 | - | else if ($isInstanceOf( | |
140 | + | else if ($isInstanceOf(g, "Unit")) | |
141 | 141 | then "no admin" | |
142 | 142 | else throw("Match error") | |
143 | 143 | } | |
144 | 144 | func E (F) = { | |
145 | 145 | let G = split(F, "|") | |
146 | 146 | StringEntry(G[0], G[1]) | |
147 | 147 | } | |
148 | 148 | ||
149 | - | if (( | |
149 | + | if ((k != "no admin")) | |
150 | 150 | then w | |
151 | - | else throw((((((("You not admin: " + | |
151 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
152 | 152 | } | |
153 | 153 | else throw("Unset admin list") | |
154 | 154 | } | |
155 | 155 | else throw("The number of list elements must not exceed 100") | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(d) | |
161 | 161 | func setOption (H,I) = { | |
162 | - | let | |
163 | - | let | |
164 | - | if ($isInstanceOf( | |
162 | + | let f = { | |
163 | + | let g = getString(this, "admin_list") | |
164 | + | if ($isInstanceOf(g, "Unit")) | |
165 | 165 | then "unset" | |
166 | - | else if ($isInstanceOf( | |
166 | + | else if ($isInstanceOf(g, "String")) | |
167 | 167 | then { | |
168 | - | let | |
169 | - | | |
168 | + | let h = g | |
169 | + | h | |
170 | 170 | } | |
171 | 171 | else throw("Match error") | |
172 | 172 | } | |
173 | - | let | |
174 | - | if (( | |
173 | + | let i = toString(d.caller) | |
174 | + | if ((f != "unset")) | |
175 | 175 | then { | |
176 | - | let | |
177 | - | let | |
178 | - | let | |
179 | - | if ($isInstanceOf( | |
176 | + | let j = getString(addressFromStringValue(f), i) | |
177 | + | let k = { | |
178 | + | let g = j | |
179 | + | if ($isInstanceOf(g, "String")) | |
180 | 180 | then { | |
181 | - | let | |
182 | - | | |
181 | + | let h = g | |
182 | + | h | |
183 | 183 | } | |
184 | - | else if ($isInstanceOf( | |
184 | + | else if ($isInstanceOf(g, "Unit")) | |
185 | 185 | then "no admin" | |
186 | 186 | else throw("Match error") | |
187 | 187 | } | |
188 | - | if (( | |
188 | + | if ((k != "no admin")) | |
189 | 189 | then $Tuple2([StringEntry(H, I)], unit) | |
190 | - | else throw((((((("You not admin: " + | |
190 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
191 | 191 | } | |
192 | 192 | else throw("Unset admin list") | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | ||
197 | 197 | @Callable(d) | |
198 | 198 | func delOption (H) = { | |
199 | - | let | |
200 | - | let | |
201 | - | if ($isInstanceOf( | |
199 | + | let f = { | |
200 | + | let g = getString(this, "admin_list") | |
201 | + | if ($isInstanceOf(g, "Unit")) | |
202 | 202 | then "unset" | |
203 | - | else if ($isInstanceOf( | |
203 | + | else if ($isInstanceOf(g, "String")) | |
204 | 204 | then { | |
205 | - | let | |
206 | - | | |
205 | + | let h = g | |
206 | + | h | |
207 | 207 | } | |
208 | 208 | else throw("Match error") | |
209 | 209 | } | |
210 | - | let | |
211 | - | if (( | |
210 | + | let i = toString(d.caller) | |
211 | + | if ((f != "unset")) | |
212 | 212 | then { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | if ($isInstanceOf( | |
213 | + | let j = getString(addressFromStringValue(f), i) | |
214 | + | let k = { | |
215 | + | let g = j | |
216 | + | if ($isInstanceOf(g, "String")) | |
217 | 217 | then { | |
218 | - | let | |
219 | - | | |
218 | + | let h = g | |
219 | + | h | |
220 | 220 | } | |
221 | - | else if ($isInstanceOf( | |
221 | + | else if ($isInstanceOf(g, "Unit")) | |
222 | 222 | then "no admin" | |
223 | 223 | else throw("Match error") | |
224 | 224 | } | |
225 | - | if (( | |
225 | + | if ((k != "no admin")) | |
226 | 226 | then $Tuple2([DeleteEntry(H)], unit) | |
227 | - | else throw((((((("You not admin: " + | |
227 | + | else throw((((((("You not admin: " + f) + ", isAdmin: ") + k) + ", callerAddressStr: ") + i) + ", ")) | |
228 | 228 | } | |
229 | 229 | else throw("Unset admin list") | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | ||
234 | 234 | @Callable(d) | |
235 | 235 | func regProvider (J,K,L) = { | |
236 | 236 | let M = { | |
237 | - | let | |
238 | - | if ($isInstanceOf( | |
237 | + | let g = getString(this, toBase58String(d.caller.bytes)) | |
238 | + | if ($isInstanceOf(g, "String")) | |
239 | 239 | then { | |
240 | - | let N = | |
240 | + | let N = g | |
241 | 241 | N | |
242 | 242 | } | |
243 | 243 | else "unset" | |
244 | 244 | } | |
245 | 245 | if ((M != "unset")) | |
246 | 246 | then $Tuple2([StringEntry(toBase58String(d.caller.bytes), ((((J + "|") + K) + "|") + L)), ScriptTransfer(d.caller, 1000000, unit), ScriptTransfer(d.caller, 1000000, c)], unit) | |
247 | 247 | else throw("Can be used only once") | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | @Verifier(O) | |
252 | 252 | func P () = { | |
253 | - | let | |
254 | - | if ($isInstanceOf( | |
253 | + | let g = O | |
254 | + | if ($isInstanceOf(g, "DataTransaction")) | |
255 | 255 | then { | |
256 | - | let Q = | |
256 | + | let Q = g | |
257 | 257 | false | |
258 | 258 | } | |
259 | 259 | else sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey) | |
260 | 260 | } | |
261 | 261 |
github/deemru/w8io/169f3d6 104.79 ms ◑