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