tx · VwoaJahGxRFgd7qJgR6tMGD8d1NvARuLWcEhZpqaMdw 3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR: -0.01300000 Waves 2023.09.07 10:50 [2744682] smart account 3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR > SELF 0.00000000 Waves
{ "type": 13, "id": "VwoaJahGxRFgd7qJgR6tMGD8d1NvARuLWcEhZpqaMdw", "fee": 1300000, "feeAssetId": null, "timestamp": 1694073087944, "version": 2, "chainId": 84, "sender": "3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR", "senderPublicKey": "B2SJ1BXVdLQeEg3kiwBCznf5t6GjLEz81mEWEV3fs2vF", "proofs": [ "5snQFGNyfAfbk4cnJFdqjGSvDAXjorANriLeeupPBB2WbvHJMfANXU4tXv1ZqwHtNPzUzdsGVzmvHtY4Ab6aD2NE" ], "script": "base64:BgIgCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQETAANTRVACAl9fARBibG9ja0hlaWdodEVycm9yAAkAAgECL1RoZSBibG9jaydzIGhlaWdodCBpcyB0b28gYmlnIGZvciB0aGlzIHByb3Bvc2FsARBhbHJlYWR5Vm90ZUVycm9yAAkAAgECFllvdSBoYXZlIGFscmVhZHkgdm90ZWQBC25vVm90ZUVycm9yAAkAAgECGllvdSBoYXZlIG5vdCBhbHJlYWR5IHZvdGVkARJnd3hDb250cmFjdEFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgISZ3d4Q29udHJhY3RBZGRyZXNzBQNuaWwFA1NFUAEPa2V5Q3VycmVudEluZGV4AAkAuQkCCQDMCAICAiVzCQDMCAICDGN1cnJlbnRJbmRleAUDbmlsBQNTRVABD2tleVByb3Bvc2FsSW5mbwEGbnVtYmVyCQC5CQIJAMwIAgIEJXMlZAkAzAgCAgxwcm9wb3NhbEluZm8JAMwIAgkApAMBBQZudW1iZXIFA25pbAUDU0VQARZrZXlQcm9wb3NhbERlc2NyaXB0aW9uAQZudW1iZXIJ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"spentComplexity": 0 } View: original | compacted Prev: Gqh8hArjrKASenSz5eyTKEuv4fXkEf3yWjSEcfCAv8Aq Next: BHU3ZmXnHA4rWxAojSG7hbLfn6gzpRbtrt93MFWxVB6t Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = "proposal.ride" | |
7 | - | ||
8 | - | func c (d) = makeString([b, ": ", d], "") | |
6 | + | func b () = throw("The block's height is too big for this proposal") | |
9 | 7 | ||
10 | 8 | ||
11 | - | func | |
9 | + | func c () = throw("You have already voted") | |
12 | 10 | ||
13 | 11 | ||
14 | - | func | |
12 | + | func d () = throw("You have not already voted") | |
15 | 13 | ||
16 | 14 | ||
17 | - | func | |
15 | + | func e () = makeString(["%s", "gwxContractAddress"], a) | |
18 | 16 | ||
19 | 17 | ||
20 | - | func | |
18 | + | func f () = makeString(["%s", "currentIndex"], a) | |
21 | 19 | ||
22 | 20 | ||
23 | - | func | |
21 | + | func g (h) = makeString(["%s%d", "proposalInfo", toString(h)], a) | |
24 | 22 | ||
25 | 23 | ||
26 | - | func | |
24 | + | func i (h) = makeString(["%s%d", "proposalDescription", toString(h)], a) | |
27 | 25 | ||
28 | 26 | ||
29 | - | func | |
27 | + | func j (h,k) = makeString(["%s%d%s", "userVoteOnProposal", toString(h), k], a) | |
30 | 28 | ||
31 | 29 | ||
32 | - | func | |
30 | + | func l () = "%s__managerPublicKey" | |
33 | 31 | ||
34 | 32 | ||
35 | - | func | |
33 | + | func m () = "%s__managerVaultAddress" | |
36 | 34 | ||
37 | 35 | ||
38 | - | func | |
36 | + | func n () = getIntegerValue(this, f()) | |
39 | 37 | ||
40 | 38 | ||
41 | - | func q () = "%s__managerVaultAddress" | |
42 | - | ||
43 | - | ||
44 | - | func r () = getIntegerValue(this, j()) | |
45 | - | ||
46 | - | ||
47 | - | func s () = { | |
48 | - | let t = getString(q()) | |
49 | - | if ($isInstanceOf(t, "String")) | |
39 | + | func o () = { | |
40 | + | let p = getString(m()) | |
41 | + | if ($isInstanceOf(p, "String")) | |
50 | 42 | then { | |
51 | - | let | |
52 | - | addressFromStringValue( | |
43 | + | let q = p | |
44 | + | addressFromStringValue(q) | |
53 | 45 | } | |
54 | 46 | else this | |
55 | 47 | } | |
56 | 48 | ||
57 | 49 | ||
58 | - | let v = 1 | |
59 | - | ||
60 | - | let w = 2 | |
61 | - | ||
62 | - | let x = 3 | |
63 | - | ||
64 | - | let y = 4 | |
65 | - | ||
66 | - | let z = 5 | |
67 | - | ||
68 | - | func A (B,C,D,E,F) = makeString(["%d%d%d%d%d", B, C, D, E, F], a) | |
50 | + | func r (s,t,u,v,w) = makeString(["%d%d%d%d%d", s, t, u, v, w], a) | |
69 | 51 | ||
70 | 52 | ||
71 | - | let G = 1 | |
72 | - | ||
73 | - | let H = 2 | |
74 | - | ||
75 | - | func I (J,K) = makeString(["%d%d", J, K], a) | |
53 | + | func x (y,z) = makeString(["%d%d", y, z], a) | |
76 | 54 | ||
77 | 55 | ||
78 | - | func | |
79 | - | let | |
80 | - | if ($isInstanceOf( | |
56 | + | func A (B) = { | |
57 | + | let p = B | |
58 | + | if ($isInstanceOf(p, "Int")) | |
81 | 59 | then { | |
82 | - | let | |
83 | - | | |
60 | + | let C = p | |
61 | + | C | |
84 | 62 | } | |
85 | 63 | else throw("fail to cast into Int") | |
86 | 64 | } | |
87 | 65 | ||
88 | 66 | ||
89 | - | func | |
90 | - | let | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
67 | + | func D () = { | |
68 | + | let E = o() | |
69 | + | let p = getString(E, l()) | |
70 | + | if ($isInstanceOf(p, "String")) | |
93 | 71 | then { | |
94 | - | let | |
95 | - | fromBase58String( | |
72 | + | let q = p | |
73 | + | fromBase58String(q) | |
96 | 74 | } | |
97 | - | else if ($isInstanceOf( | |
75 | + | else if ($isInstanceOf(p, "Unit")) | |
98 | 76 | then unit | |
99 | 77 | else throw("Match error") | |
100 | 78 | } | |
101 | 79 | ||
102 | 80 | ||
103 | - | func | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
81 | + | func F (G) = { | |
82 | + | let p = D() | |
83 | + | if ($isInstanceOf(p, "ByteVector")) | |
106 | 84 | then { | |
107 | - | let | |
108 | - | ( | |
85 | + | let H = p | |
86 | + | (G.callerPublicKey == H) | |
109 | 87 | } | |
110 | - | else if ($isInstanceOf( | |
111 | - | then ( | |
88 | + | else if ($isInstanceOf(p, "Unit")) | |
89 | + | then (G.caller == this) | |
112 | 90 | else throw("Match error") | |
113 | 91 | } | |
114 | 92 | ||
115 | 93 | ||
116 | - | func | |
94 | + | func I (G) = if (F(G)) | |
117 | 95 | then true | |
118 | 96 | else throw("permission denied") | |
119 | 97 | ||
120 | 98 | ||
121 | - | @Callable( | |
122 | - | func startNewVote ( | |
123 | - | let | |
124 | - | if (( | |
99 | + | @Callable(G) | |
100 | + | func startNewVote (s,J,K,u) = { | |
101 | + | let L = [I(G)] | |
102 | + | if ((L == L)) | |
125 | 103 | then { | |
126 | - | let | |
127 | - | [IntegerEntry( | |
104 | + | let M = n() | |
105 | + | [IntegerEntry(f(), (M + 1)), StringEntry(g(M), r(s, toString((lastBlock.height + K)), toString(u), "0", "0")), StringEntry(i(M), J)] | |
128 | 106 | } | |
129 | 107 | else throw("Strict value is not equal to itself.") | |
130 | 108 | } | |
131 | 109 | ||
132 | 110 | ||
133 | 111 | ||
134 | - | @Callable( | |
135 | - | func voteFor ( | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
112 | + | @Callable(G) | |
113 | + | func voteFor (N,O) = { | |
114 | + | let P = "EMPTY" | |
115 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
116 | + | let R = split(Q, a) | |
117 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
118 | + | let L = [if ((Q != P)) | |
141 | 119 | then true | |
142 | - | else throw("No such vote"), if ((value(parseInt( | |
120 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
143 | 121 | then true | |
144 | - | else | |
122 | + | else b(), if ((S == P)) | |
145 | 123 | then true | |
146 | - | else | |
147 | - | if (( | |
124 | + | else c()] | |
125 | + | if ((L == L)) | |
148 | 126 | then { | |
149 | - | let | |
150 | - | let | |
127 | + | let z = A(invoke(addressFromStringValue(getStringValue(e())), "getUserGwxAmountAtHeightREADONLY", [toString(G.caller), value(parseInt(R[2]))], nil)) | |
128 | + | let T = if (O) | |
151 | 129 | then { | |
152 | - | let | |
153 | - | let | |
154 | - | $Tuple2( | |
130 | + | let U = StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) + z)), R[5])) | |
131 | + | let V = StringEntry(j(N, toString(G.caller)), x("1", toString(z))) | |
132 | + | $Tuple2(U, V) | |
155 | 133 | } | |
156 | 134 | else { | |
157 | - | let | |
158 | - | let | |
159 | - | $Tuple2( | |
135 | + | let U = StringEntry(g(N), r(R[1], R[2], R[3], R[4], toString((value(parseInt(R[5])) + z)))) | |
136 | + | let V = StringEntry(j(N, toString(G.caller)), x("0", toString(z))) | |
137 | + | $Tuple2(U, V) | |
160 | 138 | } | |
161 | - | let | |
162 | - | let | |
163 | - | [ | |
139 | + | let U = T._1 | |
140 | + | let V = T._2 | |
141 | + | [U, V] | |
164 | 142 | } | |
165 | 143 | else throw("Strict value is not equal to itself.") | |
166 | 144 | } | |
167 | 145 | ||
168 | 146 | ||
169 | 147 | ||
170 | - | @Callable( | |
171 | - | func deleteVote ( | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
148 | + | @Callable(G) | |
149 | + | func deleteVote (N) = { | |
150 | + | let P = "EMPTY" | |
151 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
152 | + | let R = split(Q, a) | |
153 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
154 | + | let W = split(S, a) | |
155 | + | let L = [if ((Q != P)) | |
178 | 156 | then true | |
179 | - | else throw("No such vote"), if ((value(parseInt( | |
157 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
180 | 158 | then true | |
181 | - | else | |
159 | + | else b(), if ((S != P)) | |
182 | 160 | then true | |
183 | - | else | |
184 | - | if (( | |
161 | + | else d()] | |
162 | + | if ((L == L)) | |
185 | 163 | then { | |
186 | - | let | |
187 | - | then StringEntry( | |
188 | - | else StringEntry( | |
189 | - | [ | |
164 | + | let X = if ((W[1] == "1")) | |
165 | + | then StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) - value(parseInt(W[2])))), R[5])) | |
166 | + | else StringEntry(g(N), r(R[1], R[2], R[3], R[4], toString((value(parseInt(R[5])) - value(parseInt(W[2])))))) | |
167 | + | [X, DeleteEntry(j(N, toString(G.caller)))] | |
190 | 168 | } | |
191 | 169 | else throw("Strict value is not equal to itself.") | |
192 | 170 | } | |
193 | 171 | ||
194 | 172 | ||
195 | 173 | ||
196 | - | @Callable( | |
197 | - | func changeVote ( | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
174 | + | @Callable(G) | |
175 | + | func changeVote (N,O) = { | |
176 | + | let P = "EMPTY" | |
177 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
178 | + | let R = split(Q, a) | |
179 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
180 | + | let W = split(S, a) | |
181 | + | let L = [if ((Q != P)) | |
204 | 182 | then true | |
205 | - | else throw("No such vote"), if ((value(parseInt( | |
183 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
206 | 184 | then true | |
207 | - | else | |
185 | + | else b(), if ((S != P)) | |
208 | 186 | then true | |
209 | - | else | |
210 | - | if (( | |
187 | + | else d()] | |
188 | + | if ((L == L)) | |
211 | 189 | then { | |
212 | - | let | |
213 | - | let | |
190 | + | let z = A(invoke(addressFromStringValue(getStringValue(e())), "getUserGwxAmountAtHeightREADONLY", [toString(G.caller), value(parseInt(R[3]))], nil)) | |
191 | + | let Y = if (O) | |
214 | 192 | then { | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | $Tuple3( | |
193 | + | let Z = z | |
194 | + | let aa = 0 | |
195 | + | let ab = 1 | |
196 | + | $Tuple3(Z, aa, ab) | |
219 | 197 | } | |
220 | 198 | else { | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple3( | |
199 | + | let Z = 0 | |
200 | + | let aa = z | |
201 | + | let ab = 0 | |
202 | + | $Tuple3(Z, aa, ab) | |
225 | 203 | } | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | then StringEntry( | |
231 | - | else StringEntry( | |
232 | - | [ | |
204 | + | let ac = Y._1 | |
205 | + | let ad = Y._2 | |
206 | + | let ae = Y._3 | |
207 | + | let X = if ((W[1] == "1")) | |
208 | + | then StringEntry(g(N), r(R[1], R[2], R[3], toString(((value(parseInt(R[4])) - value(parseInt(W[2]))) + ac)), toString((value(parseInt(R[5])) + ad)))) | |
209 | + | else StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) + ac)), toString(((value(parseInt(R[5])) - value(parseInt(W[2]))) + ad)))) | |
210 | + | [X, StringEntry(j(N, toString(G.caller)), x(toString(ae), toString(z)))] | |
233 | 211 | } | |
234 | 212 | else throw("Strict value is not equal to itself.") | |
235 | 213 | } | |
236 | 214 | ||
237 | 215 | ||
238 | 216 | ||
239 | - | @Callable( | |
240 | - | func getResultREADONLY ( | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
217 | + | @Callable(G) | |
218 | + | func getResultREADONLY (N) = { | |
219 | + | let P = "EMPTY" | |
220 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
221 | + | let R = split(Q, a) | |
222 | + | let L = [if ((Q != P)) | |
245 | 223 | then true | |
246 | 224 | else throw("No such vote")] | |
247 | - | if (( | |
225 | + | if ((L == L)) | |
248 | 226 | then { | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | $Tuple2(nil, [ | |
227 | + | let u = R[3] | |
228 | + | let v = R[4] | |
229 | + | let w = R[5] | |
230 | + | $Tuple2(nil, [v, w, u]) | |
253 | 231 | } | |
254 | 232 | else throw("Strict value is not equal to itself.") | |
255 | 233 | } | |
256 | 234 | ||
257 | 235 | ||
258 | - | @Verifier( | |
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | if ($isInstanceOf( | |
236 | + | @Verifier(af) | |
237 | + | func ag () = { | |
238 | + | let ah = { | |
239 | + | let p = D() | |
240 | + | if ($isInstanceOf(p, "ByteVector")) | |
263 | 241 | then { | |
264 | - | let | |
265 | - | | |
242 | + | let H = p | |
243 | + | H | |
266 | 244 | } | |
267 | - | else if ($isInstanceOf( | |
268 | - | then | |
245 | + | else if ($isInstanceOf(p, "Unit")) | |
246 | + | then af.senderPublicKey | |
269 | 247 | else throw("Match error") | |
270 | 248 | } | |
271 | - | sigVerify( | |
249 | + | sigVerify(af.bodyBytes, af.proofs[0], ah) | |
272 | 250 | } | |
273 | 251 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = "proposal.ride" | |
7 | - | ||
8 | - | func c (d) = makeString([b, ": ", d], "") | |
6 | + | func b () = throw("The block's height is too big for this proposal") | |
9 | 7 | ||
10 | 8 | ||
11 | - | func | |
9 | + | func c () = throw("You have already voted") | |
12 | 10 | ||
13 | 11 | ||
14 | - | func | |
12 | + | func d () = throw("You have not already voted") | |
15 | 13 | ||
16 | 14 | ||
17 | - | func | |
15 | + | func e () = makeString(["%s", "gwxContractAddress"], a) | |
18 | 16 | ||
19 | 17 | ||
20 | - | func | |
18 | + | func f () = makeString(["%s", "currentIndex"], a) | |
21 | 19 | ||
22 | 20 | ||
23 | - | func | |
21 | + | func g (h) = makeString(["%s%d", "proposalInfo", toString(h)], a) | |
24 | 22 | ||
25 | 23 | ||
26 | - | func | |
24 | + | func i (h) = makeString(["%s%d", "proposalDescription", toString(h)], a) | |
27 | 25 | ||
28 | 26 | ||
29 | - | func | |
27 | + | func j (h,k) = makeString(["%s%d%s", "userVoteOnProposal", toString(h), k], a) | |
30 | 28 | ||
31 | 29 | ||
32 | - | func | |
30 | + | func l () = "%s__managerPublicKey" | |
33 | 31 | ||
34 | 32 | ||
35 | - | func | |
33 | + | func m () = "%s__managerVaultAddress" | |
36 | 34 | ||
37 | 35 | ||
38 | - | func | |
36 | + | func n () = getIntegerValue(this, f()) | |
39 | 37 | ||
40 | 38 | ||
41 | - | func q () = "%s__managerVaultAddress" | |
42 | - | ||
43 | - | ||
44 | - | func r () = getIntegerValue(this, j()) | |
45 | - | ||
46 | - | ||
47 | - | func s () = { | |
48 | - | let t = getString(q()) | |
49 | - | if ($isInstanceOf(t, "String")) | |
39 | + | func o () = { | |
40 | + | let p = getString(m()) | |
41 | + | if ($isInstanceOf(p, "String")) | |
50 | 42 | then { | |
51 | - | let | |
52 | - | addressFromStringValue( | |
43 | + | let q = p | |
44 | + | addressFromStringValue(q) | |
53 | 45 | } | |
54 | 46 | else this | |
55 | 47 | } | |
56 | 48 | ||
57 | 49 | ||
58 | - | let v = 1 | |
59 | - | ||
60 | - | let w = 2 | |
61 | - | ||
62 | - | let x = 3 | |
63 | - | ||
64 | - | let y = 4 | |
65 | - | ||
66 | - | let z = 5 | |
67 | - | ||
68 | - | func A (B,C,D,E,F) = makeString(["%d%d%d%d%d", B, C, D, E, F], a) | |
50 | + | func r (s,t,u,v,w) = makeString(["%d%d%d%d%d", s, t, u, v, w], a) | |
69 | 51 | ||
70 | 52 | ||
71 | - | let G = 1 | |
72 | - | ||
73 | - | let H = 2 | |
74 | - | ||
75 | - | func I (J,K) = makeString(["%d%d", J, K], a) | |
53 | + | func x (y,z) = makeString(["%d%d", y, z], a) | |
76 | 54 | ||
77 | 55 | ||
78 | - | func | |
79 | - | let | |
80 | - | if ($isInstanceOf( | |
56 | + | func A (B) = { | |
57 | + | let p = B | |
58 | + | if ($isInstanceOf(p, "Int")) | |
81 | 59 | then { | |
82 | - | let | |
83 | - | | |
60 | + | let C = p | |
61 | + | C | |
84 | 62 | } | |
85 | 63 | else throw("fail to cast into Int") | |
86 | 64 | } | |
87 | 65 | ||
88 | 66 | ||
89 | - | func | |
90 | - | let | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
67 | + | func D () = { | |
68 | + | let E = o() | |
69 | + | let p = getString(E, l()) | |
70 | + | if ($isInstanceOf(p, "String")) | |
93 | 71 | then { | |
94 | - | let | |
95 | - | fromBase58String( | |
72 | + | let q = p | |
73 | + | fromBase58String(q) | |
96 | 74 | } | |
97 | - | else if ($isInstanceOf( | |
75 | + | else if ($isInstanceOf(p, "Unit")) | |
98 | 76 | then unit | |
99 | 77 | else throw("Match error") | |
100 | 78 | } | |
101 | 79 | ||
102 | 80 | ||
103 | - | func | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
81 | + | func F (G) = { | |
82 | + | let p = D() | |
83 | + | if ($isInstanceOf(p, "ByteVector")) | |
106 | 84 | then { | |
107 | - | let | |
108 | - | ( | |
85 | + | let H = p | |
86 | + | (G.callerPublicKey == H) | |
109 | 87 | } | |
110 | - | else if ($isInstanceOf( | |
111 | - | then ( | |
88 | + | else if ($isInstanceOf(p, "Unit")) | |
89 | + | then (G.caller == this) | |
112 | 90 | else throw("Match error") | |
113 | 91 | } | |
114 | 92 | ||
115 | 93 | ||
116 | - | func | |
94 | + | func I (G) = if (F(G)) | |
117 | 95 | then true | |
118 | 96 | else throw("permission denied") | |
119 | 97 | ||
120 | 98 | ||
121 | - | @Callable( | |
122 | - | func startNewVote ( | |
123 | - | let | |
124 | - | if (( | |
99 | + | @Callable(G) | |
100 | + | func startNewVote (s,J,K,u) = { | |
101 | + | let L = [I(G)] | |
102 | + | if ((L == L)) | |
125 | 103 | then { | |
126 | - | let | |
127 | - | [IntegerEntry( | |
104 | + | let M = n() | |
105 | + | [IntegerEntry(f(), (M + 1)), StringEntry(g(M), r(s, toString((lastBlock.height + K)), toString(u), "0", "0")), StringEntry(i(M), J)] | |
128 | 106 | } | |
129 | 107 | else throw("Strict value is not equal to itself.") | |
130 | 108 | } | |
131 | 109 | ||
132 | 110 | ||
133 | 111 | ||
134 | - | @Callable( | |
135 | - | func voteFor ( | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
112 | + | @Callable(G) | |
113 | + | func voteFor (N,O) = { | |
114 | + | let P = "EMPTY" | |
115 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
116 | + | let R = split(Q, a) | |
117 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
118 | + | let L = [if ((Q != P)) | |
141 | 119 | then true | |
142 | - | else throw("No such vote"), if ((value(parseInt( | |
120 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
143 | 121 | then true | |
144 | - | else | |
122 | + | else b(), if ((S == P)) | |
145 | 123 | then true | |
146 | - | else | |
147 | - | if (( | |
124 | + | else c()] | |
125 | + | if ((L == L)) | |
148 | 126 | then { | |
149 | - | let | |
150 | - | let | |
127 | + | let z = A(invoke(addressFromStringValue(getStringValue(e())), "getUserGwxAmountAtHeightREADONLY", [toString(G.caller), value(parseInt(R[2]))], nil)) | |
128 | + | let T = if (O) | |
151 | 129 | then { | |
152 | - | let | |
153 | - | let | |
154 | - | $Tuple2( | |
130 | + | let U = StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) + z)), R[5])) | |
131 | + | let V = StringEntry(j(N, toString(G.caller)), x("1", toString(z))) | |
132 | + | $Tuple2(U, V) | |
155 | 133 | } | |
156 | 134 | else { | |
157 | - | let | |
158 | - | let | |
159 | - | $Tuple2( | |
135 | + | let U = StringEntry(g(N), r(R[1], R[2], R[3], R[4], toString((value(parseInt(R[5])) + z)))) | |
136 | + | let V = StringEntry(j(N, toString(G.caller)), x("0", toString(z))) | |
137 | + | $Tuple2(U, V) | |
160 | 138 | } | |
161 | - | let | |
162 | - | let | |
163 | - | [ | |
139 | + | let U = T._1 | |
140 | + | let V = T._2 | |
141 | + | [U, V] | |
164 | 142 | } | |
165 | 143 | else throw("Strict value is not equal to itself.") | |
166 | 144 | } | |
167 | 145 | ||
168 | 146 | ||
169 | 147 | ||
170 | - | @Callable( | |
171 | - | func deleteVote ( | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
148 | + | @Callable(G) | |
149 | + | func deleteVote (N) = { | |
150 | + | let P = "EMPTY" | |
151 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
152 | + | let R = split(Q, a) | |
153 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
154 | + | let W = split(S, a) | |
155 | + | let L = [if ((Q != P)) | |
178 | 156 | then true | |
179 | - | else throw("No such vote"), if ((value(parseInt( | |
157 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
180 | 158 | then true | |
181 | - | else | |
159 | + | else b(), if ((S != P)) | |
182 | 160 | then true | |
183 | - | else | |
184 | - | if (( | |
161 | + | else d()] | |
162 | + | if ((L == L)) | |
185 | 163 | then { | |
186 | - | let | |
187 | - | then StringEntry( | |
188 | - | else StringEntry( | |
189 | - | [ | |
164 | + | let X = if ((W[1] == "1")) | |
165 | + | then StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) - value(parseInt(W[2])))), R[5])) | |
166 | + | else StringEntry(g(N), r(R[1], R[2], R[3], R[4], toString((value(parseInt(R[5])) - value(parseInt(W[2])))))) | |
167 | + | [X, DeleteEntry(j(N, toString(G.caller)))] | |
190 | 168 | } | |
191 | 169 | else throw("Strict value is not equal to itself.") | |
192 | 170 | } | |
193 | 171 | ||
194 | 172 | ||
195 | 173 | ||
196 | - | @Callable( | |
197 | - | func changeVote ( | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
174 | + | @Callable(G) | |
175 | + | func changeVote (N,O) = { | |
176 | + | let P = "EMPTY" | |
177 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
178 | + | let R = split(Q, a) | |
179 | + | let S = valueOrElse(getString(this, j(N, toString(G.caller))), P) | |
180 | + | let W = split(S, a) | |
181 | + | let L = [if ((Q != P)) | |
204 | 182 | then true | |
205 | - | else throw("No such vote"), if ((value(parseInt( | |
183 | + | else throw("No such vote"), if ((value(parseInt(R[2])) > lastBlock.height)) | |
206 | 184 | then true | |
207 | - | else | |
185 | + | else b(), if ((S != P)) | |
208 | 186 | then true | |
209 | - | else | |
210 | - | if (( | |
187 | + | else d()] | |
188 | + | if ((L == L)) | |
211 | 189 | then { | |
212 | - | let | |
213 | - | let | |
190 | + | let z = A(invoke(addressFromStringValue(getStringValue(e())), "getUserGwxAmountAtHeightREADONLY", [toString(G.caller), value(parseInt(R[3]))], nil)) | |
191 | + | let Y = if (O) | |
214 | 192 | then { | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | $Tuple3( | |
193 | + | let Z = z | |
194 | + | let aa = 0 | |
195 | + | let ab = 1 | |
196 | + | $Tuple3(Z, aa, ab) | |
219 | 197 | } | |
220 | 198 | else { | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple3( | |
199 | + | let Z = 0 | |
200 | + | let aa = z | |
201 | + | let ab = 0 | |
202 | + | $Tuple3(Z, aa, ab) | |
225 | 203 | } | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | then StringEntry( | |
231 | - | else StringEntry( | |
232 | - | [ | |
204 | + | let ac = Y._1 | |
205 | + | let ad = Y._2 | |
206 | + | let ae = Y._3 | |
207 | + | let X = if ((W[1] == "1")) | |
208 | + | then StringEntry(g(N), r(R[1], R[2], R[3], toString(((value(parseInt(R[4])) - value(parseInt(W[2]))) + ac)), toString((value(parseInt(R[5])) + ad)))) | |
209 | + | else StringEntry(g(N), r(R[1], R[2], R[3], toString((value(parseInt(R[4])) + ac)), toString(((value(parseInt(R[5])) - value(parseInt(W[2]))) + ad)))) | |
210 | + | [X, StringEntry(j(N, toString(G.caller)), x(toString(ae), toString(z)))] | |
233 | 211 | } | |
234 | 212 | else throw("Strict value is not equal to itself.") | |
235 | 213 | } | |
236 | 214 | ||
237 | 215 | ||
238 | 216 | ||
239 | - | @Callable( | |
240 | - | func getResultREADONLY ( | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
217 | + | @Callable(G) | |
218 | + | func getResultREADONLY (N) = { | |
219 | + | let P = "EMPTY" | |
220 | + | let Q = valueOrElse(getString(this, g(N)), P) | |
221 | + | let R = split(Q, a) | |
222 | + | let L = [if ((Q != P)) | |
245 | 223 | then true | |
246 | 224 | else throw("No such vote")] | |
247 | - | if (( | |
225 | + | if ((L == L)) | |
248 | 226 | then { | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | $Tuple2(nil, [ | |
227 | + | let u = R[3] | |
228 | + | let v = R[4] | |
229 | + | let w = R[5] | |
230 | + | $Tuple2(nil, [v, w, u]) | |
253 | 231 | } | |
254 | 232 | else throw("Strict value is not equal to itself.") | |
255 | 233 | } | |
256 | 234 | ||
257 | 235 | ||
258 | - | @Verifier( | |
259 | - | func | |
260 | - | let | |
261 | - | let | |
262 | - | if ($isInstanceOf( | |
236 | + | @Verifier(af) | |
237 | + | func ag () = { | |
238 | + | let ah = { | |
239 | + | let p = D() | |
240 | + | if ($isInstanceOf(p, "ByteVector")) | |
263 | 241 | then { | |
264 | - | let | |
265 | - | | |
242 | + | let H = p | |
243 | + | H | |
266 | 244 | } | |
267 | - | else if ($isInstanceOf( | |
268 | - | then | |
245 | + | else if ($isInstanceOf(p, "Unit")) | |
246 | + | then af.senderPublicKey | |
269 | 247 | else throw("Match error") | |
270 | 248 | } | |
271 | - | sigVerify( | |
249 | + | sigVerify(af.bodyBytes, af.proofs[0], ah) | |
272 | 250 | } | |
273 | 251 |
github/deemru/w8io/169f3d6 89.27 ms ◑