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