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