tx · 7ymi4VA8L6BBGzUEHZWwPCUYSdHywrG4wqYa36sz8Kn6 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL: -0.01800000 Waves 2022.06.01 15:17 [2077272] smart account 3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL > SELF 0.00000000 Waves
{ "type": 13, "id": "7ymi4VA8L6BBGzUEHZWwPCUYSdHywrG4wqYa36sz8Kn6", "fee": 1800000, "feeAssetId": null, "timestamp": 1654085838977, "version": 1, "sender": "3MyVvNfXht9piazyf1e5BVFsqv1R7z5cWJL", "senderPublicKey": "DnPyGWCgpQChvoQrnXQRcC9FtN32mPGrcog2wcKHdkVn", "proofs": [ "4QskA3Gd6Bfzt5HwYhf8PKx1V4qULLPoR5TTn1PRgRYYg1pAFgqXk3ofKD4Ce1VP9b1S2DPEPNBRXHRktVdXhse6" ], "script": "base64:AAIFAAAAAAAAADUIAhIDCgEIEgASBAoCCAESBQoDCAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgASAwoBCAAAABwAAAAACXNlcGFyYXRvcgIAAAACX18AAAAACG1heFNoYXJlAAAAAAAAAABkAAAAAA5rZXlFcG9jaExlbmd0aAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAC2Vwb2NoTGVuZ3RoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAPa2V5Q3VycmVudEVwb2NoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAMY3VycmVudEVwb2NoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5U3RhcnRIZWlnaHQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAtzdGFydEhlaWdodAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAB92b3RpbmdFbWlzc2lv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U3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAWkBAAAACGZpbmFsaXplAAAAAAkABRQAAAACBQAAAANuaWwFAAAABHVuaXQAAAABaQEAAAASb25WZXJpZmljYXRpb25Mb3NzAAAAAQAAAAdhc3NldElkCQAFFAAAAAIFAAAAA25pbAUAAAAEdW5pdAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXnO/8E4", "chainId": 84, "height": 2077272, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6gee9Wyas6LnQ3geZHBsiPxAP8auvDfivvZUZakMeV4i Next: AcP9fHThEBmPtsUuoQ7o4yrnxLXhSXkaAKGnc3jRNGvr Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = makeString(["%s", "epochLength"], a) | |
9 | 9 | ||
10 | - | let d = makeString(["%s", " | |
10 | + | let d = makeString(["%s", "currentEpoch"], a) | |
11 | 11 | ||
12 | - | let e = makeString(["%s", " | |
12 | + | let e = makeString(["%s", "startHeight"], a) | |
13 | 13 | ||
14 | - | let f = makeString(["%s", " | |
14 | + | let f = makeString(["%s", "votingEmissionCandidateContract"], a) | |
15 | 15 | ||
16 | - | func g (h) = { | |
17 | - | let i = h | |
18 | - | let j = i._1 | |
19 | - | let k = i._2 | |
20 | - | makeString(["%s%s%s", "inList", j, k], a) | |
16 | + | let g = makeString(["%s", "boostingContract"], a) | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = i | |
20 | + | let k = j._1 | |
21 | + | let l = j._2 | |
22 | + | makeString(["%s%s%s", "inList", k, l], a) | |
21 | 23 | } | |
22 | 24 | ||
23 | 25 | ||
24 | - | func | |
26 | + | func m (n) = makeString(["%s%s", "shareUsed", toString(n)], a) | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
28 | - | let | |
29 | - | let | |
30 | - | let | |
31 | - | makeString(["%s%s%s%s", "voteShare", | |
29 | + | func o (n,i) = { | |
30 | + | let p = i | |
31 | + | let k = p._1 | |
32 | + | let l = p._2 | |
33 | + | makeString(["%s%s%s%s", "voteShare", k, l, toString(n)], a) | |
32 | 34 | } | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
36 | - | let | |
37 | - | let | |
38 | - | let | |
39 | - | makeString(["%s%s%s | |
37 | + | func q (i) = { | |
38 | + | let r = i | |
39 | + | let k = r._1 | |
40 | + | let l = r._2 | |
41 | + | makeString(["%s%s%s", "votingResult", k, l], a) | |
40 | 42 | } | |
41 | 43 | ||
42 | 44 | ||
43 | - | func r (h) = { | |
44 | - | let s = h | |
45 | - | let j = s._1 | |
46 | - | let k = s._2 | |
47 | - | makeString(["%s%s%s", "votingResult", j, k], a) | |
45 | + | func s (n,t,u) = { | |
46 | + | let v = makeString(["mandatory ", toString(n), ".", t, " is not defined"], "") | |
47 | + | valueOrErrorMessage({ | |
48 | + | let w = u | |
49 | + | if ($isInstanceOf(w, "String")) | |
50 | + | then { | |
51 | + | let x = w | |
52 | + | getString(n, t) | |
53 | + | } | |
54 | + | else if ($isInstanceOf(w, "Int")) | |
55 | + | then { | |
56 | + | let y = w | |
57 | + | getInteger(n, t) | |
58 | + | } | |
59 | + | else throw("invalid entry type") | |
60 | + | }, v) | |
48 | 61 | } | |
49 | 62 | ||
50 | 63 | ||
51 | - | func t (m,u,v) = { | |
52 | - | let w = makeString(["mandatory ", toString(m), ".", u, " is not defined"], "") | |
53 | - | valueOrErrorMessage({ | |
54 | - | let x = v | |
55 | - | if ($isInstanceOf(x, "String")) | |
56 | - | then { | |
57 | - | let y = x | |
58 | - | getString(m, u) | |
59 | - | } | |
60 | - | else if ($isInstanceOf(x, "Int")) | |
61 | - | then { | |
62 | - | let z = x | |
63 | - | getInteger(m, u) | |
64 | - | } | |
65 | - | else throw("invalid entry type") | |
66 | - | }, w) | |
67 | - | } | |
68 | - | ||
69 | - | ||
70 | - | func A (m,u) = { | |
71 | - | let B = t(m, u, 0) | |
72 | - | if ($isInstanceOf(B, "String")) | |
73 | - | then B | |
64 | + | func z (n,t) = { | |
65 | + | let A = s(n, t, "") | |
66 | + | if ($isInstanceOf(A, "String")) | |
67 | + | then A | |
74 | 68 | else throw("Couldn't cast Int|String to String") | |
75 | 69 | } | |
76 | 70 | ||
77 | 71 | ||
78 | - | func C (m,u) = { | |
79 | - | let B = t(m, u, 0) | |
80 | - | if ($isInstanceOf(B, "String")) | |
81 | - | then B | |
82 | - | else unit | |
83 | - | } | |
84 | - | ||
85 | - | ||
86 | - | func D (m,u) = { | |
87 | - | let B = t(m, u, 0) | |
88 | - | if ($isInstanceOf(B, "Int")) | |
89 | - | then B | |
72 | + | func B (n,t) = { | |
73 | + | let A = s(n, t, 0) | |
74 | + | if ($isInstanceOf(A, "Int")) | |
75 | + | then A | |
90 | 76 | else throw("Couldn't cast Int|String to Int") | |
91 | 77 | } | |
92 | 78 | ||
93 | 79 | ||
94 | - | func E (m,u) = { | |
95 | - | let B = t(m, u, 0) | |
96 | - | if ($isInstanceOf(B, "Int")) | |
97 | - | then B | |
98 | - | else unit | |
80 | + | let C = "__pools" | |
81 | + | ||
82 | + | func D (i) = { | |
83 | + | let E = i | |
84 | + | let k = E._1 | |
85 | + | let l = E._2 | |
86 | + | makeString(["%s%s__votes", k, l], a) | |
99 | 87 | } | |
100 | 88 | ||
101 | 89 | ||
102 | - | func F () = "%s | |
90 | + | func F (G) = makeString([("%s%s" + G), "head"], a) | |
103 | 91 | ||
104 | 92 | ||
105 | - | func | |
93 | + | func H (G) = makeString([("%s%s" + G), "size"], a) | |
106 | 94 | ||
107 | 95 | ||
108 | - | func H () = { | |
109 | - | let x = getString(F()) | |
110 | - | if ($isInstanceOf(x, "String")) | |
96 | + | func I (G,J) = makeString([("%s%s%s" + G), J, "prev"], a) | |
97 | + | ||
98 | + | ||
99 | + | func K (G,J) = makeString([("%s%s%s" + G), J, "next"], a) | |
100 | + | ||
101 | + | ||
102 | + | func L (G,J) = { | |
103 | + | let M = getString(this, F(G)) | |
104 | + | let N = getString(this, I(G, J)) | |
105 | + | let O = getString(this, K(G, J)) | |
106 | + | if (if ((J == M)) | |
107 | + | then true | |
108 | + | else (N != unit)) | |
109 | + | then true | |
110 | + | else (O != unit) | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | func P (G,J) = { | |
115 | + | let M = getString(this, F(G)) | |
116 | + | let Q = valueOrElse(getInteger(this, H(G)), 0) | |
117 | + | let R = if (!(L(G, J))) | |
118 | + | then true | |
119 | + | else throw("Node exists") | |
120 | + | if ((R == R)) | |
121 | + | then (([IntegerEntry(H(G), (Q + 1))] ++ (if (isDefined(M)) | |
122 | + | then [StringEntry(K(G, J), value(M)), StringEntry(I(G, value(M)), J)] | |
123 | + | else nil)) ++ [StringEntry(F(G), J)]) | |
124 | + | else throw("Strict value is not equal to itself.") | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func S (G,J) = { | |
129 | + | let M = getString(this, F(G)) | |
130 | + | let Q = valueOrElse(getInteger(this, H(G)), 0) | |
131 | + | let N = getString(this, I(G, J)) | |
132 | + | let O = getString(this, K(G, J)) | |
133 | + | ([IntegerEntry(H(G), (Q - 1))] ++ (if (if (isDefined(N)) | |
134 | + | then isDefined(O) | |
135 | + | else false) | |
136 | + | then [StringEntry(K(G, value(N)), value(O)), StringEntry(I(G, value(O)), value(N)), DeleteEntry(I(G, J)), DeleteEntry(K(G, J))] | |
137 | + | else if (isDefined(O)) | |
138 | + | then [StringEntry(F(G), value(O)), DeleteEntry(K(G, J)), DeleteEntry(I(G, value(O)))] | |
139 | + | else if (isDefined(N)) | |
140 | + | then [DeleteEntry(I(G, J)), DeleteEntry(K(G, value(N)))] | |
141 | + | else if ((J == M)) | |
142 | + | then [DeleteEntry(F(G))] | |
143 | + | else throw("Invalid node"))) | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | func T () = "%s__managerPublicKey" | |
148 | + | ||
149 | + | ||
150 | + | func U () = "%s__pendingManagerPublicKey" | |
151 | + | ||
152 | + | ||
153 | + | func V () = { | |
154 | + | let w = getString(T()) | |
155 | + | if ($isInstanceOf(w, "String")) | |
111 | 156 | then { | |
112 | - | let | |
113 | - | fromBase58String( | |
157 | + | let W = w | |
158 | + | fromBase58String(W) | |
114 | 159 | } | |
115 | - | else if ($isInstanceOf( | |
160 | + | else if ($isInstanceOf(w, "Unit")) | |
116 | 161 | then unit | |
117 | 162 | else throw("Match error") | |
118 | 163 | } | |
119 | 164 | ||
120 | 165 | ||
121 | - | func | |
122 | - | let | |
123 | - | if ($isInstanceOf( | |
166 | + | func X () = { | |
167 | + | let w = getString(U()) | |
168 | + | if ($isInstanceOf(w, "String")) | |
124 | 169 | then { | |
125 | - | let | |
126 | - | fromBase58String( | |
170 | + | let W = w | |
171 | + | fromBase58String(W) | |
127 | 172 | } | |
128 | - | else if ($isInstanceOf( | |
173 | + | else if ($isInstanceOf(w, "Unit")) | |
129 | 174 | then unit | |
130 | 175 | else throw("Match error") | |
131 | 176 | } | |
132 | 177 | ||
133 | 178 | ||
134 | - | func | |
135 | - | let | |
136 | - | let | |
137 | - | if ($isInstanceOf( | |
179 | + | func Y (Z) = { | |
180 | + | let aa = throw("Permission denied") | |
181 | + | let w = V() | |
182 | + | if ($isInstanceOf(w, "ByteVector")) | |
138 | 183 | then { | |
139 | - | let | |
140 | - | if (( | |
184 | + | let ab = w | |
185 | + | if ((Z.callerPublicKey == ab)) | |
141 | 186 | then true | |
142 | - | else | |
187 | + | else aa | |
143 | 188 | } | |
144 | - | else if ($isInstanceOf( | |
145 | - | then if (( | |
189 | + | else if ($isInstanceOf(w, "Unit")) | |
190 | + | then if ((Z.caller == this)) | |
146 | 191 | then true | |
147 | - | else | |
192 | + | else aa | |
148 | 193 | else throw("Match error") | |
149 | 194 | } | |
150 | 195 | ||
151 | 196 | ||
152 | - | @Callable( | |
153 | - | func setManager ( | |
154 | - | let | |
155 | - | if (( | |
197 | + | @Callable(Z) | |
198 | + | func setManager (ac) = { | |
199 | + | let ad = Y(Z) | |
200 | + | if ((ad == ad)) | |
156 | 201 | then { | |
157 | - | let | |
158 | - | if (( | |
159 | - | then [StringEntry( | |
202 | + | let ae = fromBase58String(ac) | |
203 | + | if ((ae == ae)) | |
204 | + | then [StringEntry(U(), ac)] | |
160 | 205 | else throw("Strict value is not equal to itself.") | |
161 | 206 | } | |
162 | 207 | else throw("Strict value is not equal to itself.") | |
164 | 209 | ||
165 | 210 | ||
166 | 211 | ||
167 | - | @Callable( | |
212 | + | @Callable(Z) | |
168 | 213 | func confirmManager () = { | |
169 | - | let | |
170 | - | let | |
214 | + | let af = X() | |
215 | + | let ag = if (isDefined(af)) | |
171 | 216 | then true | |
172 | 217 | else throw("No pending manager") | |
173 | - | if (( | |
218 | + | if ((ag == ag)) | |
174 | 219 | then { | |
175 | - | let | |
220 | + | let ah = if ((Z.callerPublicKey == value(af))) | |
176 | 221 | then true | |
177 | 222 | else throw("You are not pending manager") | |
178 | - | if (( | |
179 | - | then [StringEntry( | |
223 | + | if ((ah == ah)) | |
224 | + | then [StringEntry(T(), toBase58String(value(af))), DeleteEntry(U())] | |
180 | 225 | else throw("Strict value is not equal to itself.") | |
181 | 226 | } | |
182 | 227 | else throw("Strict value is not equal to itself.") | |
184 | 229 | ||
185 | 230 | ||
186 | 231 | ||
187 | - | @Callable( | |
188 | - | func getUserGwxAmountAtHeight ( | |
189 | - | let | |
232 | + | @Callable(Z) | |
233 | + | func getUserGwxAmountAtHeight (ai,aj) = { | |
234 | + | let ak = valueOrErrorMessage(addressFromString(z(this, g)), "invalid boosting contract address") | |
190 | 235 | $Tuple2(nil, { | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
193 | - | then | |
236 | + | let A = invoke(ak, "getUserGwxAmountAtHeightREADONLY", [ai, aj], nil) | |
237 | + | if ($isInstanceOf(A, "Int")) | |
238 | + | then A | |
194 | 239 | else throw("Couldn't cast Any to Int") | |
195 | 240 | }) | |
196 | 241 | } | |
197 | 242 | ||
198 | 243 | ||
199 | 244 | ||
200 | - | @Callable( | |
201 | - | func constructor ( | |
202 | - | let | |
245 | + | @Callable(Z) | |
246 | + | func constructor (al,am,an) = { | |
247 | + | let ao = [Y(Z), if ((addressFromString(al) != unit)) | |
203 | 248 | then true | |
204 | - | else "invalid voting emission candidate contract address", if ((addressFromString( | |
249 | + | else "invalid voting emission candidate contract address", if ((addressFromString(am) != unit)) | |
205 | 250 | then true | |
206 | - | else "invalid boosting contract address", if (( | |
251 | + | else "invalid boosting contract address", if ((an > 0)) | |
207 | 252 | then true | |
208 | 253 | else throw("invalid epoch length")] | |
209 | - | if (( | |
210 | - | then $Tuple2([StringEntry( | |
254 | + | if ((ao == ao)) | |
255 | + | then $Tuple2([StringEntry(f, al), StringEntry(g, am), IntegerEntry(c, an)], unit) | |
211 | 256 | else throw("Strict value is not equal to itself.") | |
212 | 257 | } | |
213 | 258 | ||
214 | 259 | ||
215 | 260 | ||
216 | - | @Callable( | |
217 | - | func create ( | |
218 | - | let | |
261 | + | @Callable(Z) | |
262 | + | func create (k,l) = { | |
263 | + | let ap = [if ((toBase58String(Z.caller.bytes) == valueOrElse(getString(this, f), ""))) | |
219 | 264 | then true | |
220 | - | else | |
221 | - | if (( | |
265 | + | else Y(Z)] | |
266 | + | if ((ap == ap)) | |
222 | 267 | then { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | then [IntegerEntry(d, height)] | |
268 | + | let i = $Tuple2(k, l) | |
269 | + | let aq = [BooleanEntry(h(i), true)] | |
270 | + | let ar = (getString(this, e) == unit) | |
271 | + | let as = if (ar) | |
272 | + | then [IntegerEntry(d, 0), IntegerEntry(e, height)] | |
228 | 273 | else nil | |
229 | - | $Tuple2(( | |
274 | + | $Tuple2((aq ++ as), unit) | |
230 | 275 | } | |
231 | 276 | else throw("Strict value is not equal to itself.") | |
232 | 277 | } | |
233 | 278 | ||
234 | 279 | ||
235 | 280 | ||
236 | - | @Callable( | |
237 | - | func vote ( | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
249 | - | then | |
281 | + | @Callable(Z) | |
282 | + | func vote (k,l,at) = { | |
283 | + | let i = $Tuple2(k, l) | |
284 | + | let au = B(this, e) | |
285 | + | let an = B(this, c) | |
286 | + | let av = (au + an) | |
287 | + | let aw = valueOrElse(getInteger(this, m(Z.caller)), 0) | |
288 | + | let ax = valueOrElse(getInteger(this, o(Z.caller, i)), 0) | |
289 | + | let ay = (b - aw) | |
290 | + | let az = (ax + at) | |
291 | + | let aA = { | |
292 | + | let A = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(Z.caller.bytes), av], nil) | |
293 | + | if ($isInstanceOf(A, "Int")) | |
294 | + | then A | |
250 | 295 | else throw("Couldn't cast Any to Int") | |
251 | 296 | } | |
252 | - | let | |
253 | - | let | |
297 | + | let aB = fraction(aA, az, b) | |
298 | + | let ap = [if ((getBoolean(h(i)) != unit)) | |
254 | 299 | then true | |
255 | - | else throw("invalid assets"), if (( | |
300 | + | else throw("invalid assets"), if ((av > height)) | |
256 | 301 | then true | |
257 | - | else throw("invalid height"), if (( | |
302 | + | else throw("invalid height"), if ((aB > 0)) | |
258 | 303 | then true | |
259 | - | else throw("you do not have gWX"), if (if (( | |
260 | - | then ( | |
304 | + | else throw("you do not have gWX"), if (if ((at > 0)) | |
305 | + | then (ay >= at) | |
261 | 306 | else false) | |
262 | 307 | then true | |
263 | 308 | else throw("invalid share")] | |
264 | - | if (( | |
265 | - | then $Tuple2([IntegerEntry( | |
309 | + | if ((ap == ap)) | |
310 | + | then $Tuple2([IntegerEntry(m(Z.caller), (aw + at)), IntegerEntry(o(Z.caller, i), az)], unit) | |
266 | 311 | else throw("Strict value is not equal to itself.") | |
267 | 312 | } | |
268 | 313 | ||
269 | 314 | ||
270 | 315 | ||
271 | - | @Callable( | |
272 | - | func cancelVote ( | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
316 | + | @Callable(Z) | |
317 | + | func cancelVote (k,l) = { | |
318 | + | let i = $Tuple2(k, l) | |
319 | + | let au = B(this, e) | |
320 | + | let an = B(this, c) | |
321 | + | let av = (au + an) | |
322 | + | let ax = valueOrElse(getInteger(this, o(Z.caller, i)), 0) | |
323 | + | let aw = valueOrElse(getInteger(this, m(Z.caller)), 0) | |
324 | + | let ap = [if ((getBoolean(h(i)) != unit)) | |
280 | 325 | then true | |
281 | - | else throw("invalid assets"), if (( | |
326 | + | else throw("invalid assets"), if ((av > height)) | |
282 | 327 | then true | |
283 | - | else throw("invalid height"), if (( | |
328 | + | else throw("invalid height"), if ((ax > 0)) | |
284 | 329 | then true | |
285 | 330 | else throw("no vote")] | |
286 | - | if (( | |
287 | - | then $Tuple2([IntegerEntry( | |
331 | + | if ((ap == ap)) | |
332 | + | then $Tuple2([IntegerEntry(m(Z.caller), max([(aw - ax), 0])), DeleteEntry(o(Z.caller, i))], unit) | |
288 | 333 | else throw("Strict value is not equal to itself.") | |
289 | 334 | } | |
290 | 335 | ||
291 | 336 | ||
292 | 337 | ||
293 | - | @Callable( | |
294 | - | func setEpochLength ( | |
295 | - | let | |
338 | + | @Callable(Z) | |
339 | + | func setEpochLength (aC) = { | |
340 | + | let ao = [Y(Z), if ((aC > 0)) | |
296 | 341 | then true | |
297 | 342 | else throw("invalid epoch length")] | |
298 | - | if (( | |
299 | - | then $Tuple2([IntegerEntry(c, | |
343 | + | if ((ao == ao)) | |
344 | + | then $Tuple2([IntegerEntry(c, aC)], unit) | |
300 | 345 | else throw("Strict value is not equal to itself.") | |
301 | 346 | } | |
302 | 347 | ||
303 | 348 | ||
304 | 349 | ||
305 | - | @Callable( | |
350 | + | @Callable(Z) | |
306 | 351 | func finalize () = $Tuple2(nil, unit) | |
307 | 352 | ||
308 | 353 | ||
309 | 354 | ||
310 | - | @Callable( | |
311 | - | func onVerificationLoss ( | |
355 | + | @Callable(Z) | |
356 | + | func onVerificationLoss (aD) = $Tuple2(nil, unit) | |
312 | 357 | ||
313 | 358 | ||
314 | - | @Verifier( | |
315 | - | func | |
316 | - | let | |
317 | - | let | |
318 | - | if ($isInstanceOf( | |
359 | + | @Verifier(aE) | |
360 | + | func aF () = { | |
361 | + | let aG = { | |
362 | + | let w = V() | |
363 | + | if ($isInstanceOf(w, "ByteVector")) | |
319 | 364 | then { | |
320 | - | let | |
321 | - | | |
365 | + | let ab = w | |
366 | + | ab | |
322 | 367 | } | |
323 | - | else if ($isInstanceOf( | |
324 | - | then | |
368 | + | else if ($isInstanceOf(w, "Unit")) | |
369 | + | then aE.senderPublicKey | |
325 | 370 | else throw("Match error") | |
326 | 371 | } | |
327 | - | sigVerify( | |
372 | + | sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
328 | 373 | } | |
329 | 374 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 100 | |
7 | 7 | ||
8 | 8 | let c = makeString(["%s", "epochLength"], a) | |
9 | 9 | ||
10 | - | let d = makeString(["%s", " | |
10 | + | let d = makeString(["%s", "currentEpoch"], a) | |
11 | 11 | ||
12 | - | let e = makeString(["%s", " | |
12 | + | let e = makeString(["%s", "startHeight"], a) | |
13 | 13 | ||
14 | - | let f = makeString(["%s", " | |
14 | + | let f = makeString(["%s", "votingEmissionCandidateContract"], a) | |
15 | 15 | ||
16 | - | func g (h) = { | |
17 | - | let i = h | |
18 | - | let j = i._1 | |
19 | - | let k = i._2 | |
20 | - | makeString(["%s%s%s", "inList", j, k], a) | |
16 | + | let g = makeString(["%s", "boostingContract"], a) | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = i | |
20 | + | let k = j._1 | |
21 | + | let l = j._2 | |
22 | + | makeString(["%s%s%s", "inList", k, l], a) | |
21 | 23 | } | |
22 | 24 | ||
23 | 25 | ||
24 | - | func | |
26 | + | func m (n) = makeString(["%s%s", "shareUsed", toString(n)], a) | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
28 | - | let | |
29 | - | let | |
30 | - | let | |
31 | - | makeString(["%s%s%s%s", "voteShare", | |
29 | + | func o (n,i) = { | |
30 | + | let p = i | |
31 | + | let k = p._1 | |
32 | + | let l = p._2 | |
33 | + | makeString(["%s%s%s%s", "voteShare", k, l, toString(n)], a) | |
32 | 34 | } | |
33 | 35 | ||
34 | 36 | ||
35 | - | func | |
36 | - | let | |
37 | - | let | |
38 | - | let | |
39 | - | makeString(["%s%s%s | |
37 | + | func q (i) = { | |
38 | + | let r = i | |
39 | + | let k = r._1 | |
40 | + | let l = r._2 | |
41 | + | makeString(["%s%s%s", "votingResult", k, l], a) | |
40 | 42 | } | |
41 | 43 | ||
42 | 44 | ||
43 | - | func r (h) = { | |
44 | - | let s = h | |
45 | - | let j = s._1 | |
46 | - | let k = s._2 | |
47 | - | makeString(["%s%s%s", "votingResult", j, k], a) | |
45 | + | func s (n,t,u) = { | |
46 | + | let v = makeString(["mandatory ", toString(n), ".", t, " is not defined"], "") | |
47 | + | valueOrErrorMessage({ | |
48 | + | let w = u | |
49 | + | if ($isInstanceOf(w, "String")) | |
50 | + | then { | |
51 | + | let x = w | |
52 | + | getString(n, t) | |
53 | + | } | |
54 | + | else if ($isInstanceOf(w, "Int")) | |
55 | + | then { | |
56 | + | let y = w | |
57 | + | getInteger(n, t) | |
58 | + | } | |
59 | + | else throw("invalid entry type") | |
60 | + | }, v) | |
48 | 61 | } | |
49 | 62 | ||
50 | 63 | ||
51 | - | func t (m,u,v) = { | |
52 | - | let w = makeString(["mandatory ", toString(m), ".", u, " is not defined"], "") | |
53 | - | valueOrErrorMessage({ | |
54 | - | let x = v | |
55 | - | if ($isInstanceOf(x, "String")) | |
56 | - | then { | |
57 | - | let y = x | |
58 | - | getString(m, u) | |
59 | - | } | |
60 | - | else if ($isInstanceOf(x, "Int")) | |
61 | - | then { | |
62 | - | let z = x | |
63 | - | getInteger(m, u) | |
64 | - | } | |
65 | - | else throw("invalid entry type") | |
66 | - | }, w) | |
67 | - | } | |
68 | - | ||
69 | - | ||
70 | - | func A (m,u) = { | |
71 | - | let B = t(m, u, 0) | |
72 | - | if ($isInstanceOf(B, "String")) | |
73 | - | then B | |
64 | + | func z (n,t) = { | |
65 | + | let A = s(n, t, "") | |
66 | + | if ($isInstanceOf(A, "String")) | |
67 | + | then A | |
74 | 68 | else throw("Couldn't cast Int|String to String") | |
75 | 69 | } | |
76 | 70 | ||
77 | 71 | ||
78 | - | func C (m,u) = { | |
79 | - | let B = t(m, u, 0) | |
80 | - | if ($isInstanceOf(B, "String")) | |
81 | - | then B | |
82 | - | else unit | |
83 | - | } | |
84 | - | ||
85 | - | ||
86 | - | func D (m,u) = { | |
87 | - | let B = t(m, u, 0) | |
88 | - | if ($isInstanceOf(B, "Int")) | |
89 | - | then B | |
72 | + | func B (n,t) = { | |
73 | + | let A = s(n, t, 0) | |
74 | + | if ($isInstanceOf(A, "Int")) | |
75 | + | then A | |
90 | 76 | else throw("Couldn't cast Int|String to Int") | |
91 | 77 | } | |
92 | 78 | ||
93 | 79 | ||
94 | - | func E (m,u) = { | |
95 | - | let B = t(m, u, 0) | |
96 | - | if ($isInstanceOf(B, "Int")) | |
97 | - | then B | |
98 | - | else unit | |
80 | + | let C = "__pools" | |
81 | + | ||
82 | + | func D (i) = { | |
83 | + | let E = i | |
84 | + | let k = E._1 | |
85 | + | let l = E._2 | |
86 | + | makeString(["%s%s__votes", k, l], a) | |
99 | 87 | } | |
100 | 88 | ||
101 | 89 | ||
102 | - | func F () = "%s | |
90 | + | func F (G) = makeString([("%s%s" + G), "head"], a) | |
103 | 91 | ||
104 | 92 | ||
105 | - | func | |
93 | + | func H (G) = makeString([("%s%s" + G), "size"], a) | |
106 | 94 | ||
107 | 95 | ||
108 | - | func H () = { | |
109 | - | let x = getString(F()) | |
110 | - | if ($isInstanceOf(x, "String")) | |
96 | + | func I (G,J) = makeString([("%s%s%s" + G), J, "prev"], a) | |
97 | + | ||
98 | + | ||
99 | + | func K (G,J) = makeString([("%s%s%s" + G), J, "next"], a) | |
100 | + | ||
101 | + | ||
102 | + | func L (G,J) = { | |
103 | + | let M = getString(this, F(G)) | |
104 | + | let N = getString(this, I(G, J)) | |
105 | + | let O = getString(this, K(G, J)) | |
106 | + | if (if ((J == M)) | |
107 | + | then true | |
108 | + | else (N != unit)) | |
109 | + | then true | |
110 | + | else (O != unit) | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | func P (G,J) = { | |
115 | + | let M = getString(this, F(G)) | |
116 | + | let Q = valueOrElse(getInteger(this, H(G)), 0) | |
117 | + | let R = if (!(L(G, J))) | |
118 | + | then true | |
119 | + | else throw("Node exists") | |
120 | + | if ((R == R)) | |
121 | + | then (([IntegerEntry(H(G), (Q + 1))] ++ (if (isDefined(M)) | |
122 | + | then [StringEntry(K(G, J), value(M)), StringEntry(I(G, value(M)), J)] | |
123 | + | else nil)) ++ [StringEntry(F(G), J)]) | |
124 | + | else throw("Strict value is not equal to itself.") | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func S (G,J) = { | |
129 | + | let M = getString(this, F(G)) | |
130 | + | let Q = valueOrElse(getInteger(this, H(G)), 0) | |
131 | + | let N = getString(this, I(G, J)) | |
132 | + | let O = getString(this, K(G, J)) | |
133 | + | ([IntegerEntry(H(G), (Q - 1))] ++ (if (if (isDefined(N)) | |
134 | + | then isDefined(O) | |
135 | + | else false) | |
136 | + | then [StringEntry(K(G, value(N)), value(O)), StringEntry(I(G, value(O)), value(N)), DeleteEntry(I(G, J)), DeleteEntry(K(G, J))] | |
137 | + | else if (isDefined(O)) | |
138 | + | then [StringEntry(F(G), value(O)), DeleteEntry(K(G, J)), DeleteEntry(I(G, value(O)))] | |
139 | + | else if (isDefined(N)) | |
140 | + | then [DeleteEntry(I(G, J)), DeleteEntry(K(G, value(N)))] | |
141 | + | else if ((J == M)) | |
142 | + | then [DeleteEntry(F(G))] | |
143 | + | else throw("Invalid node"))) | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | func T () = "%s__managerPublicKey" | |
148 | + | ||
149 | + | ||
150 | + | func U () = "%s__pendingManagerPublicKey" | |
151 | + | ||
152 | + | ||
153 | + | func V () = { | |
154 | + | let w = getString(T()) | |
155 | + | if ($isInstanceOf(w, "String")) | |
111 | 156 | then { | |
112 | - | let | |
113 | - | fromBase58String( | |
157 | + | let W = w | |
158 | + | fromBase58String(W) | |
114 | 159 | } | |
115 | - | else if ($isInstanceOf( | |
160 | + | else if ($isInstanceOf(w, "Unit")) | |
116 | 161 | then unit | |
117 | 162 | else throw("Match error") | |
118 | 163 | } | |
119 | 164 | ||
120 | 165 | ||
121 | - | func | |
122 | - | let | |
123 | - | if ($isInstanceOf( | |
166 | + | func X () = { | |
167 | + | let w = getString(U()) | |
168 | + | if ($isInstanceOf(w, "String")) | |
124 | 169 | then { | |
125 | - | let | |
126 | - | fromBase58String( | |
170 | + | let W = w | |
171 | + | fromBase58String(W) | |
127 | 172 | } | |
128 | - | else if ($isInstanceOf( | |
173 | + | else if ($isInstanceOf(w, "Unit")) | |
129 | 174 | then unit | |
130 | 175 | else throw("Match error") | |
131 | 176 | } | |
132 | 177 | ||
133 | 178 | ||
134 | - | func | |
135 | - | let | |
136 | - | let | |
137 | - | if ($isInstanceOf( | |
179 | + | func Y (Z) = { | |
180 | + | let aa = throw("Permission denied") | |
181 | + | let w = V() | |
182 | + | if ($isInstanceOf(w, "ByteVector")) | |
138 | 183 | then { | |
139 | - | let | |
140 | - | if (( | |
184 | + | let ab = w | |
185 | + | if ((Z.callerPublicKey == ab)) | |
141 | 186 | then true | |
142 | - | else | |
187 | + | else aa | |
143 | 188 | } | |
144 | - | else if ($isInstanceOf( | |
145 | - | then if (( | |
189 | + | else if ($isInstanceOf(w, "Unit")) | |
190 | + | then if ((Z.caller == this)) | |
146 | 191 | then true | |
147 | - | else | |
192 | + | else aa | |
148 | 193 | else throw("Match error") | |
149 | 194 | } | |
150 | 195 | ||
151 | 196 | ||
152 | - | @Callable( | |
153 | - | func setManager ( | |
154 | - | let | |
155 | - | if (( | |
197 | + | @Callable(Z) | |
198 | + | func setManager (ac) = { | |
199 | + | let ad = Y(Z) | |
200 | + | if ((ad == ad)) | |
156 | 201 | then { | |
157 | - | let | |
158 | - | if (( | |
159 | - | then [StringEntry( | |
202 | + | let ae = fromBase58String(ac) | |
203 | + | if ((ae == ae)) | |
204 | + | then [StringEntry(U(), ac)] | |
160 | 205 | else throw("Strict value is not equal to itself.") | |
161 | 206 | } | |
162 | 207 | else throw("Strict value is not equal to itself.") | |
163 | 208 | } | |
164 | 209 | ||
165 | 210 | ||
166 | 211 | ||
167 | - | @Callable( | |
212 | + | @Callable(Z) | |
168 | 213 | func confirmManager () = { | |
169 | - | let | |
170 | - | let | |
214 | + | let af = X() | |
215 | + | let ag = if (isDefined(af)) | |
171 | 216 | then true | |
172 | 217 | else throw("No pending manager") | |
173 | - | if (( | |
218 | + | if ((ag == ag)) | |
174 | 219 | then { | |
175 | - | let | |
220 | + | let ah = if ((Z.callerPublicKey == value(af))) | |
176 | 221 | then true | |
177 | 222 | else throw("You are not pending manager") | |
178 | - | if (( | |
179 | - | then [StringEntry( | |
223 | + | if ((ah == ah)) | |
224 | + | then [StringEntry(T(), toBase58String(value(af))), DeleteEntry(U())] | |
180 | 225 | else throw("Strict value is not equal to itself.") | |
181 | 226 | } | |
182 | 227 | else throw("Strict value is not equal to itself.") | |
183 | 228 | } | |
184 | 229 | ||
185 | 230 | ||
186 | 231 | ||
187 | - | @Callable( | |
188 | - | func getUserGwxAmountAtHeight ( | |
189 | - | let | |
232 | + | @Callable(Z) | |
233 | + | func getUserGwxAmountAtHeight (ai,aj) = { | |
234 | + | let ak = valueOrErrorMessage(addressFromString(z(this, g)), "invalid boosting contract address") | |
190 | 235 | $Tuple2(nil, { | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
193 | - | then | |
236 | + | let A = invoke(ak, "getUserGwxAmountAtHeightREADONLY", [ai, aj], nil) | |
237 | + | if ($isInstanceOf(A, "Int")) | |
238 | + | then A | |
194 | 239 | else throw("Couldn't cast Any to Int") | |
195 | 240 | }) | |
196 | 241 | } | |
197 | 242 | ||
198 | 243 | ||
199 | 244 | ||
200 | - | @Callable( | |
201 | - | func constructor ( | |
202 | - | let | |
245 | + | @Callable(Z) | |
246 | + | func constructor (al,am,an) = { | |
247 | + | let ao = [Y(Z), if ((addressFromString(al) != unit)) | |
203 | 248 | then true | |
204 | - | else "invalid voting emission candidate contract address", if ((addressFromString( | |
249 | + | else "invalid voting emission candidate contract address", if ((addressFromString(am) != unit)) | |
205 | 250 | then true | |
206 | - | else "invalid boosting contract address", if (( | |
251 | + | else "invalid boosting contract address", if ((an > 0)) | |
207 | 252 | then true | |
208 | 253 | else throw("invalid epoch length")] | |
209 | - | if (( | |
210 | - | then $Tuple2([StringEntry( | |
254 | + | if ((ao == ao)) | |
255 | + | then $Tuple2([StringEntry(f, al), StringEntry(g, am), IntegerEntry(c, an)], unit) | |
211 | 256 | else throw("Strict value is not equal to itself.") | |
212 | 257 | } | |
213 | 258 | ||
214 | 259 | ||
215 | 260 | ||
216 | - | @Callable( | |
217 | - | func create ( | |
218 | - | let | |
261 | + | @Callable(Z) | |
262 | + | func create (k,l) = { | |
263 | + | let ap = [if ((toBase58String(Z.caller.bytes) == valueOrElse(getString(this, f), ""))) | |
219 | 264 | then true | |
220 | - | else | |
221 | - | if (( | |
265 | + | else Y(Z)] | |
266 | + | if ((ap == ap)) | |
222 | 267 | then { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | then [IntegerEntry(d, height)] | |
268 | + | let i = $Tuple2(k, l) | |
269 | + | let aq = [BooleanEntry(h(i), true)] | |
270 | + | let ar = (getString(this, e) == unit) | |
271 | + | let as = if (ar) | |
272 | + | then [IntegerEntry(d, 0), IntegerEntry(e, height)] | |
228 | 273 | else nil | |
229 | - | $Tuple2(( | |
274 | + | $Tuple2((aq ++ as), unit) | |
230 | 275 | } | |
231 | 276 | else throw("Strict value is not equal to itself.") | |
232 | 277 | } | |
233 | 278 | ||
234 | 279 | ||
235 | 280 | ||
236 | - | @Callable( | |
237 | - | func vote ( | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | if ($isInstanceOf( | |
249 | - | then | |
281 | + | @Callable(Z) | |
282 | + | func vote (k,l,at) = { | |
283 | + | let i = $Tuple2(k, l) | |
284 | + | let au = B(this, e) | |
285 | + | let an = B(this, c) | |
286 | + | let av = (au + an) | |
287 | + | let aw = valueOrElse(getInteger(this, m(Z.caller)), 0) | |
288 | + | let ax = valueOrElse(getInteger(this, o(Z.caller, i)), 0) | |
289 | + | let ay = (b - aw) | |
290 | + | let az = (ax + at) | |
291 | + | let aA = { | |
292 | + | let A = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(Z.caller.bytes), av], nil) | |
293 | + | if ($isInstanceOf(A, "Int")) | |
294 | + | then A | |
250 | 295 | else throw("Couldn't cast Any to Int") | |
251 | 296 | } | |
252 | - | let | |
253 | - | let | |
297 | + | let aB = fraction(aA, az, b) | |
298 | + | let ap = [if ((getBoolean(h(i)) != unit)) | |
254 | 299 | then true | |
255 | - | else throw("invalid assets"), if (( | |
300 | + | else throw("invalid assets"), if ((av > height)) | |
256 | 301 | then true | |
257 | - | else throw("invalid height"), if (( | |
302 | + | else throw("invalid height"), if ((aB > 0)) | |
258 | 303 | then true | |
259 | - | else throw("you do not have gWX"), if (if (( | |
260 | - | then ( | |
304 | + | else throw("you do not have gWX"), if (if ((at > 0)) | |
305 | + | then (ay >= at) | |
261 | 306 | else false) | |
262 | 307 | then true | |
263 | 308 | else throw("invalid share")] | |
264 | - | if (( | |
265 | - | then $Tuple2([IntegerEntry( | |
309 | + | if ((ap == ap)) | |
310 | + | then $Tuple2([IntegerEntry(m(Z.caller), (aw + at)), IntegerEntry(o(Z.caller, i), az)], unit) | |
266 | 311 | else throw("Strict value is not equal to itself.") | |
267 | 312 | } | |
268 | 313 | ||
269 | 314 | ||
270 | 315 | ||
271 | - | @Callable( | |
272 | - | func cancelVote ( | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
316 | + | @Callable(Z) | |
317 | + | func cancelVote (k,l) = { | |
318 | + | let i = $Tuple2(k, l) | |
319 | + | let au = B(this, e) | |
320 | + | let an = B(this, c) | |
321 | + | let av = (au + an) | |
322 | + | let ax = valueOrElse(getInteger(this, o(Z.caller, i)), 0) | |
323 | + | let aw = valueOrElse(getInteger(this, m(Z.caller)), 0) | |
324 | + | let ap = [if ((getBoolean(h(i)) != unit)) | |
280 | 325 | then true | |
281 | - | else throw("invalid assets"), if (( | |
326 | + | else throw("invalid assets"), if ((av > height)) | |
282 | 327 | then true | |
283 | - | else throw("invalid height"), if (( | |
328 | + | else throw("invalid height"), if ((ax > 0)) | |
284 | 329 | then true | |
285 | 330 | else throw("no vote")] | |
286 | - | if (( | |
287 | - | then $Tuple2([IntegerEntry( | |
331 | + | if ((ap == ap)) | |
332 | + | then $Tuple2([IntegerEntry(m(Z.caller), max([(aw - ax), 0])), DeleteEntry(o(Z.caller, i))], unit) | |
288 | 333 | else throw("Strict value is not equal to itself.") | |
289 | 334 | } | |
290 | 335 | ||
291 | 336 | ||
292 | 337 | ||
293 | - | @Callable( | |
294 | - | func setEpochLength ( | |
295 | - | let | |
338 | + | @Callable(Z) | |
339 | + | func setEpochLength (aC) = { | |
340 | + | let ao = [Y(Z), if ((aC > 0)) | |
296 | 341 | then true | |
297 | 342 | else throw("invalid epoch length")] | |
298 | - | if (( | |
299 | - | then $Tuple2([IntegerEntry(c, | |
343 | + | if ((ao == ao)) | |
344 | + | then $Tuple2([IntegerEntry(c, aC)], unit) | |
300 | 345 | else throw("Strict value is not equal to itself.") | |
301 | 346 | } | |
302 | 347 | ||
303 | 348 | ||
304 | 349 | ||
305 | - | @Callable( | |
350 | + | @Callable(Z) | |
306 | 351 | func finalize () = $Tuple2(nil, unit) | |
307 | 352 | ||
308 | 353 | ||
309 | 354 | ||
310 | - | @Callable( | |
311 | - | func onVerificationLoss ( | |
355 | + | @Callable(Z) | |
356 | + | func onVerificationLoss (aD) = $Tuple2(nil, unit) | |
312 | 357 | ||
313 | 358 | ||
314 | - | @Verifier( | |
315 | - | func | |
316 | - | let | |
317 | - | let | |
318 | - | if ($isInstanceOf( | |
359 | + | @Verifier(aE) | |
360 | + | func aF () = { | |
361 | + | let aG = { | |
362 | + | let w = V() | |
363 | + | if ($isInstanceOf(w, "ByteVector")) | |
319 | 364 | then { | |
320 | - | let | |
321 | - | | |
365 | + | let ab = w | |
366 | + | ab | |
322 | 367 | } | |
323 | - | else if ($isInstanceOf( | |
324 | - | then | |
368 | + | else if ($isInstanceOf(w, "Unit")) | |
369 | + | then aE.senderPublicKey | |
325 | 370 | else throw("Match error") | |
326 | 371 | } | |
327 | - | sigVerify( | |
372 | + | sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
328 | 373 | } | |
329 | 374 |
github/deemru/w8io/169f3d6 82.28 ms ◑