tx · 7nKtt6LMW7JhHVgixQoGwfZcUu98oj3tUCCPjdEiA7Q9 3MynXwh1Q3aezKeXaEyg2QfQzVgdwkQGxJ3: -0.01000000 Waves 2023.05.26 10:35 [2594651] smart account 3MynXwh1Q3aezKeXaEyg2QfQzVgdwkQGxJ3 > SELF 0.00000000 Waves
{ "type": 13, "id": "7nKtt6LMW7JhHVgixQoGwfZcUu98oj3tUCCPjdEiA7Q9", "fee": 1000000, "feeAssetId": null, "timestamp": 1685086539945, "version": 2, "chainId": 84, "sender": "3MynXwh1Q3aezKeXaEyg2QfQzVgdwkQGxJ3", "senderPublicKey": "FZDxiE5t9yzfQeT5bHVJxFwVhvfDGkYjJM8YeZCKn1HF", "proofs": [ "5mkGh7dnK5YDKr72sxnLmWbTR8G7o3N2zCijcFYiJy7PLpRZKQiZcXuQM7k5VgioTrJ7YLtTmALr7MYBRWW257Eq" ], "script": "base64:BgIHCAISAwoBCBwAA1NFUAICX18AEGNvbnRyYWN0RmlsZW5hbWUCDXRyZWFzdXJ5LnJpZGUAD0FETUlOX0xJU1RfU0laRQAFAAZRVU9SVU0AAwARVFhJRF9CWVRFU19MRU5HVEgAIAEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEYa2V5QWxsb3dlZFR4SWRWb3RlUHJlZml4AQR0eElkCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICCWFsbG93VHhJZAkAzAgCBQR0eElkBQNuaWwFA1NFUAEQa2V5RnVsbEFkbWluVm90ZQIGcHJlZml4DGFkbWluQWRkcmVzcwkAuQkCCQDMCAIFBnByZWZpeAkAzAgCBQxhZG1pbkFkZHJlc3MFA25pbAUDU0VQARNrZXlBZG1pbkFkZHJlc3NMaXN0AAkAuQkCCQDMCAICAiVzCQDMCAICEGFkbWluQWRkcmVzc0xpc3QFA25pbAUDU0VQAQ5rZXlBbGxvd2VkVHh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aWNLZXkDAwkBAiE9AgUTY29uZmlnQWRkcmVzc09wdGlvbgUEdW5pdAkAAAIJAJADAQUQY3VycmVudEFkbWluTGlzdAUPQURNSU5fTElTVF9TSVpFBwMDCQECIT0CBRp2b3RpbmdSZXN1bHRDb250cmFjdE9wdGlvbgUEdW5pdAUKYnlQcm9wb3NhbAcGBQhieUFkbWlucwUHYnlPd25lcu4IJF8=", "height": 2594651, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7w3LiekoSYnp9pFo1CHWJfqkGP7bKDQgYTzJHgVC8cC7 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "__" | |
5 | + | ||
6 | + | let b = "treasury.ride" | |
7 | + | ||
8 | + | let c = 5 | |
9 | + | ||
10 | + | let d = 3 | |
11 | + | ||
12 | + | let e = 32 | |
13 | + | ||
14 | + | func f (g) = ((b + ": ") + g) | |
15 | + | ||
16 | + | ||
17 | + | func h (g) = throw(f(g)) | |
18 | + | ||
19 | + | ||
20 | + | func i (j) = makeString(["%s%s%s", "allowTxId", j], a) | |
21 | + | ||
22 | + | ||
23 | + | func k (l,m) = makeString([l, m], a) | |
24 | + | ||
25 | + | ||
26 | + | func n () = makeString(["%s", "adminAddressList"], a) | |
27 | + | ||
28 | + | ||
29 | + | func o () = makeString(["%s", "txId"], a) | |
30 | + | ||
31 | + | ||
32 | + | func p () = "%s__config" | |
33 | + | ||
34 | + | ||
35 | + | func q () = "contract_voting_result" | |
36 | + | ||
37 | + | ||
38 | + | func r (s,j) = ((("proposal_allow_broadcast_" + toString(s)) + "_") + toBase58String(j)) | |
39 | + | ||
40 | + | ||
41 | + | let t = { | |
42 | + | let u = getString(this, p()) | |
43 | + | if ($isInstanceOf(u, "String")) | |
44 | + | then { | |
45 | + | let g = u | |
46 | + | addressFromString(g) | |
47 | + | } | |
48 | + | else if ($isInstanceOf(u, "Unit")) | |
49 | + | then unit | |
50 | + | else throw("Match error") | |
51 | + | } | |
52 | + | ||
53 | + | let v = valueOrErrorMessage(t, f("invalid config address")) | |
54 | + | ||
55 | + | let w = { | |
56 | + | let u = t | |
57 | + | if ($isInstanceOf(u, "Address")) | |
58 | + | then { | |
59 | + | let x = u | |
60 | + | let y = getString(x, q()) | |
61 | + | if ($isInstanceOf(y, "String")) | |
62 | + | then { | |
63 | + | let g = y | |
64 | + | addressFromString(g) | |
65 | + | } | |
66 | + | else if ($isInstanceOf(y, "Unit")) | |
67 | + | then unit | |
68 | + | else throw("Match error") | |
69 | + | } | |
70 | + | else if ($isInstanceOf(u, "Unit")) | |
71 | + | then unit | |
72 | + | else throw("Match error") | |
73 | + | } | |
74 | + | ||
75 | + | let z = valueOrErrorMessage(w, f("invalid voting result address")) | |
76 | + | ||
77 | + | func A (l,B) = { | |
78 | + | let C = k(l, B) | |
79 | + | valueOrElse(getInteger(C), 0) | |
80 | + | } | |
81 | + | ||
82 | + | ||
83 | + | func D () = { | |
84 | + | let u = getString(this, n()) | |
85 | + | if ($isInstanceOf(u, "String")) | |
86 | + | then { | |
87 | + | let g = u | |
88 | + | split(g, a) | |
89 | + | } | |
90 | + | else nil | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | func E (s) = containsElement(D(), s) | |
95 | + | ||
96 | + | ||
97 | + | func F (x,m) = { | |
98 | + | let G = x | |
99 | + | let H = G._1 | |
100 | + | let l = G._2 | |
101 | + | $Tuple2((H :+ k(l, m)), l) | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | func I (J) = { | |
106 | + | let K = n() | |
107 | + | let L = { | |
108 | + | let M = D() | |
109 | + | let N = size(M) | |
110 | + | let O = $Tuple2(nil, J) | |
111 | + | func P (Q,R) = if ((R >= N)) | |
112 | + | then Q | |
113 | + | else F(Q, M[R]) | |
114 | + | ||
115 | + | func S (Q,R) = if ((R >= N)) | |
116 | + | then Q | |
117 | + | else throw("List size exceeds 5") | |
118 | + | ||
119 | + | S(P(P(P(P(P(O, 0), 1), 2), 3), 4), 5) | |
120 | + | } | |
121 | + | let H = L._1 | |
122 | + | let l = L._2 | |
123 | + | H | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | func T (H,C) = (H + valueOrElse(getInteger(C), 0)) | |
128 | + | ||
129 | + | ||
130 | + | func U (l) = { | |
131 | + | let V = I(l) | |
132 | + | let M = V | |
133 | + | let N = size(M) | |
134 | + | let O = 0 | |
135 | + | func P (Q,R) = if ((R >= N)) | |
136 | + | then Q | |
137 | + | else T(Q, M[R]) | |
138 | + | ||
139 | + | func S (Q,R) = if ((R >= N)) | |
140 | + | then Q | |
141 | + | else throw("List size exceeds 5") | |
142 | + | ||
143 | + | S(P(P(P(P(P(O, 0), 1), 2), 3), 4), 5) | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | func W (H,X) = (H :+ DeleteEntry(X)) | |
148 | + | ||
149 | + | ||
150 | + | func Y (l) = { | |
151 | + | let V = I(l) | |
152 | + | let M = V | |
153 | + | let N = size(M) | |
154 | + | let O = nil | |
155 | + | func P (Q,R) = if ((R >= N)) | |
156 | + | then Q | |
157 | + | else W(Q, M[R]) | |
158 | + | ||
159 | + | func S (Q,R) = if ((R >= N)) | |
160 | + | then Q | |
161 | + | else throw("List size exceeds 5") | |
162 | + | ||
163 | + | S(P(P(P(P(P(O, 0), 1), 2), 3), 4), 5) | |
164 | + | } | |
165 | + | ||
166 | + | ||
167 | + | func Z (aa,J,ab,ac) = { | |
168 | + | let C = k(J, aa) | |
169 | + | let ad = A(J, aa) | |
170 | + | let ae = if (!(E(aa))) | |
171 | + | then h((("Address: " + aa) + " not in Admin list")) | |
172 | + | else if ((ad == 1)) | |
173 | + | then h((C + " you already voted")) | |
174 | + | else unit | |
175 | + | if ((ae == ae)) | |
176 | + | then { | |
177 | + | let V = U(J) | |
178 | + | if (((V + 1) >= ab)) | |
179 | + | then { | |
180 | + | let af = Y(J) | |
181 | + | (af ++ ac) | |
182 | + | } | |
183 | + | else [IntegerEntry(C, 1)] | |
184 | + | } | |
185 | + | else throw("Strict value is not equal to itself.") | |
186 | + | } | |
187 | + | ||
188 | + | ||
189 | + | @Callable(ag) | |
190 | + | func voteForTxId (j) = { | |
191 | + | let aa = toBase58String(ag.caller.bytes) | |
192 | + | let J = i(j) | |
193 | + | let H = [StringEntry(o(), j)] | |
194 | + | let ah = getString(this, o()) | |
195 | + | let ae = [if ((size(fromBase58String(j)) == e)) | |
196 | + | then true | |
197 | + | else h((j + " is not valid txId")), if (if ((ah == unit)) | |
198 | + | then true | |
199 | + | else (value(ah) != j)) | |
200 | + | then true | |
201 | + | else h((j + " is already allowed"))] | |
202 | + | if ((ae == ae)) | |
203 | + | then Z(aa, J, d, H) | |
204 | + | else throw("Strict value is not equal to itself.") | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | @Verifier(ai) | |
209 | + | func aj () = { | |
210 | + | let ak = getString(o()) | |
211 | + | let al = D() | |
212 | + | let am = valueOrElse(getBoolean(z, r(this, ai.id)), false) | |
213 | + | let an = if ((ak != unit)) | |
214 | + | then (ai.id == fromBase58String(value(ak))) | |
215 | + | else false | |
216 | + | let ao = sigVerify(ai.bodyBytes, ai.proofs[0], ai.senderPublicKey) | |
217 | + | if (if ((t != unit)) | |
218 | + | then (size(al) == c) | |
219 | + | else false) | |
220 | + | then if (if ((w != unit)) | |
221 | + | then am | |
222 | + | else false) | |
223 | + | then true | |
224 | + | else an | |
225 | + | else ao | |
226 | + | } | |
227 | + |
github/deemru/w8io/169f3d6 26.34 ms ◑