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