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