tx · J1vhaCPRnMrrRAf1BKTMrHimbcLecqtNbWFqmjrhqdNY 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6: -0.01000000 Waves 2023.03.09 02:05 [2481742] smart account 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6 > SELF 0.00000000 Waves
{ "type": 13, "id": "J1vhaCPRnMrrRAf1BKTMrHimbcLecqtNbWFqmjrhqdNY", "fee": 1000000, "feeAssetId": null, "timestamp": 1678316693671, "version": 2, "chainId": 84, "sender": "3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6", "senderPublicKey": "GmYZFRssDr88KiZt3x4LsJ6qfqaTfMUycQTKZVdipUgS", "proofs": [ "5HbBkUNPiUGmQ6dQLMARCGopSfkFMYQsQpFkRNtYHPhckoug2eVQnkvSdVxnGad9oQzbySgfNgfP5av2ptK79BqV" ], "script": "base64:BgIlCAISAwoBARIECgIIARIECgIYGBIECgIICBIDCgEIEgUKAwgICAMADG9wdGlvbnNfYWRkcgkBB0FkZHJlc3MBARoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAEdFJVQgEgv7I1LEj/fS4nZAGEmW42z/vK94nfeiKN08fw7a6U2ZsABHRVU0QBIKskSmq2Qkbr0vzjebBhusOuaVdNUnrKRRynQB0RsCkOBgFpARFyZWlzc3VlRm9yRGVwQWRkcgEIcXVhbnRpdHkECWFkbWluTGlzdAQHJG1hdGNoMAkAnQgCBQxvcHRpb25zX2FkZHICCmFkbWluX2xpc3QDCQABAgUHJG1hdGNoMAIEVW5pdAIFdW5zZXQDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF4BQckbWF0Y2gwBQF4CQACAQILTWF0Y2ggZXJyb3IEEGNhbGxlckFkZHJlc3NTdHIJAKUIAQgFAWkGY2FsbGVyAwkBAiE9AgUJYWRtaW5MaXN0AgV1bnNldAQEdGVzdAkAnQgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQlhZG1pbkxpc3QFEGNhbGxlckFkZ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MAkAnQgCBQR0aGlzCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMDCQABAgUHJG1hdGNoMAIGU3RyaW5nBARoaXN0BQckbWF0Y2gwBQRoaXN0AgV1bnNldAMJAQIhPQIFDWlzS25vd25DYWxsZXICBXVuc2V0CQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzCQCsAgIJAKwCAgkArAICCQCsAgIFBG5hbWUCAXwFA2lubgIBfAUEb2dybgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAwIQ9BQR1bml0CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgDAhD0FBHRVU0QFA25pbAUEdW5pdAkAAgECFUNhbiBiZSB1c2VkIG9ubHkgb25jZQECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACD0RhdGFUcmFuc2FjdGlvbgQDZHR4BQckbWF0Y2gwBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleXzDrx0=", "height": 2481742, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FYeMVKrH18nYqyey541apASFftx2qbSjVAbHwMD1oGD9 Next: 7qrDyWvjsiuoLanhbcFvzGxuvfAuBoBjbrJyLbaKuRex Diff:
Old | New | Differences | |
---|---|---|---|
32 | 32 | if ((isAdmin != "no admin")) | |
33 | 33 | then { | |
34 | 34 | let reissue = Reissue(tRUB, quantity, true) | |
35 | - | $Tuple2([reissue], (((((("Reissue error for param: token => quantity:" + toString(quantity)) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ".")) | |
35 | + | $Tuple2([reissue], (((((((("Reissue error for param: token =>" + toUtf8String(tRUB)) + " quantity:") + toString(quantity)) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ".")) | |
36 | 36 | } | |
37 | 37 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
38 | 38 | } | |
89 | 89 | throw("Match error") | |
90 | 90 | } | |
91 | 91 | func addStringEntry (accum,nextValue) = { | |
92 | - | let $ | |
93 | - | let result = $ | |
94 | - | let j = $ | |
92 | + | let $t029132936 = accum | |
93 | + | let result = $t029132936._1 | |
94 | + | let j = $t029132936._2 | |
95 | 95 | $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1)) | |
96 | 96 | } | |
97 | 97 |
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 reissueForDepAddr (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(tRUB, quantity, true) | |
35 | - | $Tuple2([reissue], (((((("Reissue error for param: token => quantity:" + toString(quantity)) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ".")) | |
35 | + | $Tuple2([reissue], (((((((("Reissue error for param: token =>" + toUtf8String(tRUB)) + " quantity:") + toString(quantity)) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ".")) | |
36 | 36 | } | |
37 | 37 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
38 | 38 | } | |
39 | 39 | else throw("Unset admin list") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Callable(i) | |
45 | 45 | func reissueTokens (token,quantity) = { | |
46 | 46 | let adminList = match getString(options_addr, "admin_list") { | |
47 | 47 | case _: Unit => | |
48 | 48 | "unset" | |
49 | 49 | case x: String => | |
50 | 50 | x | |
51 | 51 | case _ => | |
52 | 52 | throw("Match error") | |
53 | 53 | } | |
54 | 54 | let callerAddressStr = toString(i.caller) | |
55 | 55 | if ((adminList != "unset")) | |
56 | 56 | then { | |
57 | 57 | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
58 | 58 | let isAdmin = match test { | |
59 | 59 | case x: String => | |
60 | 60 | x | |
61 | 61 | case _: Unit => | |
62 | 62 | "no admin" | |
63 | 63 | case _ => | |
64 | 64 | throw("Match error") | |
65 | 65 | } | |
66 | 66 | if ((isAdmin != "no admin")) | |
67 | 67 | then { | |
68 | 68 | let reissue = Reissue(fromBase58String(token), quantity, true) | |
69 | 69 | $Tuple2([reissue], (((((((("Reissue error for param: token => " + token) + ", quantity:") + toString(quantity)) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ".")) | |
70 | 70 | } | |
71 | 71 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
72 | 72 | } | |
73 | 73 | else throw("Unset admin list") | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Callable(i) | |
79 | 79 | func setOptions (opts,vals) = { | |
80 | 80 | let opt_size = size(opts) | |
81 | 81 | if ((100 >= opt_size)) | |
82 | 82 | then { | |
83 | 83 | let adminList = match getString(this, "admin_list") { | |
84 | 84 | case _: Unit => | |
85 | 85 | "unset" | |
86 | 86 | case x: String => | |
87 | 87 | x | |
88 | 88 | case _ => | |
89 | 89 | throw("Match error") | |
90 | 90 | } | |
91 | 91 | func addStringEntry (accum,nextValue) = { | |
92 | - | let $ | |
93 | - | let result = $ | |
94 | - | let j = $ | |
92 | + | let $t029132936 = accum | |
93 | + | let result = $t029132936._1 | |
94 | + | let j = $t029132936._2 | |
95 | 95 | $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1)) | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let r = { | |
99 | 99 | let $l = vals | |
100 | 100 | let $s = size($l) | |
101 | 101 | let $acc0 = $Tuple2(nil, 0) | |
102 | 102 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
103 | 103 | then $a | |
104 | 104 | else addStringEntry($a, $l[$i]) | |
105 | 105 | ||
106 | 106 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
107 | 107 | then $a | |
108 | 108 | else throw("List size exceeds 100") | |
109 | 109 | ||
110 | 110 | $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) | |
111 | 111 | } | |
112 | 112 | let callerAddressStr = toString(i.caller) | |
113 | 113 | if ((adminList != "unset")) | |
114 | 114 | then { | |
115 | 115 | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
116 | 116 | let isAdmin = match test { | |
117 | 117 | case x: String => | |
118 | 118 | x | |
119 | 119 | case _: Unit => | |
120 | 120 | "no admin" | |
121 | 121 | case _ => | |
122 | 122 | throw("Match error") | |
123 | 123 | } | |
124 | 124 | func add_elm (options) = { | |
125 | 125 | let opt = split(options, "|") | |
126 | 126 | StringEntry(opt[0], opt[1]) | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | if ((isAdmin != "no admin")) | |
130 | 130 | then r | |
131 | 131 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
132 | 132 | } | |
133 | 133 | else throw("Unset admin list") | |
134 | 134 | } | |
135 | 135 | else throw("The number of list elements must not exceed 100") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func setOption (variable,value) = { | |
142 | 142 | let adminList = match getString(this, "admin_list") { | |
143 | 143 | case _: Unit => | |
144 | 144 | "unset" | |
145 | 145 | case x: String => | |
146 | 146 | x | |
147 | 147 | case _ => | |
148 | 148 | throw("Match error") | |
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 | if ((isAdmin != "no admin")) | |
163 | 163 | then $Tuple2([StringEntry(variable, value)], unit) | |
164 | 164 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
165 | 165 | } | |
166 | 166 | else throw("Unset admin list") | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | 171 | @Callable(i) | |
172 | 172 | func delOption (variable) = { | |
173 | 173 | let adminList = match getString(this, "admin_list") { | |
174 | 174 | case _: Unit => | |
175 | 175 | "unset" | |
176 | 176 | case x: String => | |
177 | 177 | x | |
178 | 178 | case _ => | |
179 | 179 | throw("Match error") | |
180 | 180 | } | |
181 | 181 | let callerAddressStr = toString(i.caller) | |
182 | 182 | if ((adminList != "unset")) | |
183 | 183 | then { | |
184 | 184 | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
185 | 185 | let isAdmin = match test { | |
186 | 186 | case x: String => | |
187 | 187 | x | |
188 | 188 | case _: Unit => | |
189 | 189 | "no admin" | |
190 | 190 | case _ => | |
191 | 191 | throw("Match error") | |
192 | 192 | } | |
193 | 193 | if ((isAdmin != "no admin")) | |
194 | 194 | then $Tuple2([DeleteEntry(variable)], unit) | |
195 | 195 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
196 | 196 | } | |
197 | 197 | else throw("Unset admin list") | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | ||
202 | 202 | @Callable(i) | |
203 | 203 | func regProvider (name,inn,ogrn) = { | |
204 | 204 | let isKnownCaller = match getString(this, toBase58String(i.caller.bytes)) { | |
205 | 205 | case hist: String => | |
206 | 206 | hist | |
207 | 207 | case _ => | |
208 | 208 | "unset" | |
209 | 209 | } | |
210 | 210 | if ((isKnownCaller != "unset")) | |
211 | 211 | then $Tuple2([StringEntry(toBase58String(i.caller.bytes), ((((name + "|") + inn) + "|") + ogrn)), ScriptTransfer(i.caller, 1000000, unit), ScriptTransfer(i.caller, 1000000, tUSD)], unit) | |
212 | 212 | else throw("Can be used only once") | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | @Verifier(tx) | |
217 | 217 | func verify () = match tx { | |
218 | 218 | case dtx: DataTransaction => | |
219 | 219 | false | |
220 | 220 | case _ => | |
221 | 221 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
222 | 222 | } | |
223 | 223 |
github/deemru/w8io/169f3d6 36.78 ms ◑