tx · 2jiAroyWAiEXKxqefXNa1Qxw6LwgiX8HRUaP9822eTq9 3MsUmiMnER3P7xLsS1KRhCxm6VXtXmNF5Rh: -0.02300000 Waves 2023.02.15 08:58 [2450334] smart account 3MsUmiMnER3P7xLsS1KRhCxm6VXtXmNF5Rh > SELF 0.00000000 Waves
{ "type": 13, "id": "2jiAroyWAiEXKxqefXNa1Qxw6LwgiX8HRUaP9822eTq9", "fee": 2300000, "feeAssetId": null, "timestamp": 1676440784020, "version": 1, "sender": "3MsUmiMnER3P7xLsS1KRhCxm6VXtXmNF5Rh", "senderPublicKey": "3xwy9PjLzgFh1BA1oVKpQukW64fwocA93NM8R9DAbRo9", "proofs": [ "2e1xk1L9L1oUBP82bYfQvYhtVkcBY61fTgzCqi8eq6DEqXtvQZUAswy6ME24AbCLcZ1EeAwtbETqhngAqyV2NVKj" ], "script": "base64:AAIFAAAAAAAAAEAIAhINCgsICAgICAgBCAEIARIDCgEBEgQKAggIEgUKAwgIBBIECgIICBIDCgEBEgMKAQESBAoCCAgSAwoBCBIAAAAAJAAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAADmtleUVwb2NoTGVuZ3RoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAMa2V5V3hBc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ZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAdjaGVja1BNBQAAAAdjaGVja1BNCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJwbQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXlV7N8C", "chainId": 84, "height": 2450334, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4uwaBne7gBeXF6e9c5H1cSfdmGnScgk6yD1vTw3fQVve Next: none Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = makeString(["%s", "fee"], a) | |
7 | 7 | ||
8 | - | func c (d) = { | |
9 | - | let e = d | |
10 | - | if ($isInstanceOf(e, "Int")) | |
11 | - | then { | |
12 | - | let f = e | |
13 | - | f | |
14 | - | } | |
15 | - | else throw("Failed to cast into Integer") | |
8 | + | let c = makeString(["%s", "usdnAssetId"], a) | |
9 | + | ||
10 | + | let d = makeString(["%s", "epochLength"], a) | |
11 | + | ||
12 | + | let e = makeString(["%s", "finalizeReward"], a) | |
13 | + | ||
14 | + | let f = makeString(["%s", "wxAssetId"], a) | |
15 | + | ||
16 | + | let g = makeString(["%s", "assetsStoreContract"], a) | |
17 | + | ||
18 | + | let h = makeString(["%s", "userPoolContract"], a) | |
19 | + | ||
20 | + | let i = makeString(["%s", "emissionContract"], a) | |
21 | + | ||
22 | + | let j = makeString(["%s", "boostingContract"], a) | |
23 | + | ||
24 | + | let k = makeString(["%s", "factoryContract"], a) | |
25 | + | ||
26 | + | let l = makeString(["%s", "votingEmissionContract"], a) | |
27 | + | ||
28 | + | let m = makeString(["%s", "votingThreshold"], a) | |
29 | + | ||
30 | + | func n (o) = valueOrErrorMessage(getString(this, o), (o + " is not defined")) | |
31 | + | ||
32 | + | ||
33 | + | func p (o) = valueOrErrorMessage(getInteger(this, o), (o + " is not defined")) | |
34 | + | ||
35 | + | ||
36 | + | func q (r,s) = makeString(["%s%s%s", "inList", r, s], a) | |
37 | + | ||
38 | + | ||
39 | + | func t (r,s) = makeString(["%s%s%s", "suggestIndex", r, s], a) | |
40 | + | ||
41 | + | ||
42 | + | func u (r,s,v) = makeString(["%s%s%s%d", "startHeight", r, s, toString(v)], a) | |
43 | + | ||
44 | + | ||
45 | + | func w (r,s,v) = makeString(["%s%s%s%d", "votingResult", r, s, toString(v)], a) | |
46 | + | ||
47 | + | ||
48 | + | func x (y,z) = makeString(["%d%d", y, z], a) | |
49 | + | ||
50 | + | ||
51 | + | func A (r,s,v,B) = makeString(["%s%s%s%d%s", "vote", r, s, toString(v), B], a) | |
52 | + | ||
53 | + | ||
54 | + | func C (D,E) = { | |
55 | + | let o = if (E) | |
56 | + | then makeString(["%d%s", D, "yes"], a) | |
57 | + | else makeString(["%d%s", D, "no"], a) | |
58 | + | o | |
16 | 59 | } | |
17 | 60 | ||
18 | 61 | ||
19 | - | func g (d) = { | |
20 | - | let e = d | |
21 | - | if ($isInstanceOf(e, "Boolean")) | |
22 | - | then { | |
23 | - | let h = e | |
24 | - | h | |
25 | - | } | |
26 | - | else throw("Failed to cast into Boolean") | |
62 | + | func F (G) = { | |
63 | + | let H = G | |
64 | + | let r = H._1 | |
65 | + | let s = H._2 | |
66 | + | makeString(["%s%s%s", "inList", r, s], a) | |
27 | 67 | } | |
28 | 68 | ||
29 | 69 | ||
30 | - | let i = makeString(["%s", "fee"], a) | |
31 | - | ||
32 | - | let j = makeString(["%s", "wxAssetId"], a) | |
33 | - | ||
34 | - | let k = makeString(["%s", "votingThreshold"], a) | |
35 | - | ||
36 | - | let l = makeString(["%s", "epochLength"], a) | |
37 | - | ||
38 | - | let m = makeString(["%s", "voteBeforeElimination"], a) | |
39 | - | ||
40 | - | let n = makeString(["%s", "currentVotingHeightStart"], a) | |
41 | - | ||
42 | - | let o = makeString(["%s", "currentEpoch"], a) | |
43 | - | ||
44 | - | let p = makeString(["%s", "boostingContract"], a) | |
45 | - | ||
46 | - | let q = makeString(["%s", "emissionContract"], a) | |
47 | - | ||
48 | - | let r = makeString(["%s", "assetsStoreContract"], a) | |
49 | - | ||
50 | - | let s = makeString(["%s", "latestProcessedAsset"], a) | |
51 | - | ||
52 | - | let t = makeString(["%s", "latestProcessedUser"], a) | |
53 | - | ||
54 | - | let u = makeString(["%s", "latestProcessedUserRemove"], a) | |
55 | - | ||
56 | - | let v = makeString(["%s", "latestProcessedAssetTransfer"], a) | |
57 | - | ||
58 | - | let w = makeString(["%s", "latestProcessedUserTransfer"], a) | |
59 | - | ||
60 | - | let x = makeString(["%s", "latestProcessedUserRemoveTransfer"], a) | |
61 | - | ||
62 | - | let y = makeString(["%s", "maxDepth"], a) | |
63 | - | ||
64 | - | func z (A) = makeString(["%s", "votesTransferFinished", toString(A)], a) | |
70 | + | func I () = "%s__managerPublicKey" | |
65 | 71 | ||
66 | 72 | ||
67 | - | let B = "__assets" | |
68 | - | ||
69 | - | func C (D) = ("%s__votes__" + D) | |
73 | + | func J () = "%s__pendingManagerPublicKey" | |
70 | 74 | ||
71 | 75 | ||
72 | - | ||
76 | + | let K = addressFromStringValue(n(g)) | |
73 | 77 | ||
78 | + | let L = addressFromStringValue(n(j)) | |
74 | 79 | ||
75 | - | ||
80 | + | let M = addressFromStringValue(n(i)) | |
76 | 81 | ||
82 | + | let N = addressFromStringValue(n(k)) | |
77 | 83 | ||
78 | - | ||
84 | + | let O = addressFromStringValue(n(h)) | |
79 | 85 | ||
86 | + | let P = addressFromStringValue(n(l)) | |
80 | 87 | ||
81 | - | func J (F,I) = makeString([("%s%s%s" + F), I, "next"], a) | |
82 | - | ||
83 | - | ||
84 | - | func K (D,A) = makeString(["%s%d%s", "verifiedAt", toString(A), D], a) | |
85 | - | ||
86 | - | ||
87 | - | func L (D) = makeString(["%s%s", "verified", D], a) | |
88 | - | ||
89 | - | ||
90 | - | func M (D,A) = makeString(["%s%s%d", "eliminated", D, toString(A)], a) | |
91 | - | ||
92 | - | ||
93 | - | func N (D,A) = makeString(["%s%d%s", "votingResultAtAsset", toString(A), D], a) | |
94 | - | ||
95 | - | ||
96 | - | func O (P,Q,R) = makeString(["%d%d%s", toString(P), toString(Q), toString(R)], a) | |
97 | - | ||
98 | - | ||
99 | - | func S (T) = { | |
100 | - | let U = split(T, a) | |
101 | - | let V = 1 | |
102 | - | let W = 2 | |
103 | - | let X = 3 | |
104 | - | let P = parseIntValue(U[V]) | |
105 | - | let Q = parseIntValue(U[W]) | |
106 | - | let R = if ((size(U) == 4)) | |
107 | - | then (U[X] == "true") | |
108 | - | else false | |
109 | - | $Tuple3(P, Q, R) | |
88 | + | func Q () = { | |
89 | + | let R = getString(I()) | |
90 | + | if ($isInstanceOf(R, "String")) | |
91 | + | then { | |
92 | + | let S = R | |
93 | + | fromBase58String(S) | |
94 | + | } | |
95 | + | else if ($isInstanceOf(R, "Unit")) | |
96 | + | then unit | |
97 | + | else throw("Match error") | |
110 | 98 | } | |
111 | 99 | ||
112 | 100 | ||
113 | - | func Y (Z,D,A) = makeString(["%s%d%s%s", "vru", toString(A), D, Z], a) | |
114 | - | ||
115 | - | ||
116 | - | func aa (ab,ac) = { | |
117 | - | let P = if (ac) | |
118 | - | then ab | |
119 | - | else 0 | |
120 | - | let Q = if (ac) | |
121 | - | then 0 | |
122 | - | else ab | |
123 | - | makeString(["%d%d", toString(P), toString(Q)], a) | |
101 | + | func T () = { | |
102 | + | let R = getString(J()) | |
103 | + | if ($isInstanceOf(R, "String")) | |
104 | + | then { | |
105 | + | let S = R | |
106 | + | fromBase58String(S) | |
107 | + | } | |
108 | + | else if ($isInstanceOf(R, "Unit")) | |
109 | + | then unit | |
110 | + | else throw("Match error") | |
124 | 111 | } | |
125 | 112 | ||
126 | 113 | ||
127 | - | func ad (T) = { | |
128 | - | let U = split(T, a) | |
129 | - | let V = 1 | |
130 | - | let W = 2 | |
131 | - | let P = parseIntValue(U[V]) | |
132 | - | let Q = parseIntValue(U[W]) | |
133 | - | let ac = if ((P > 0)) | |
134 | - | then (Q == 0) | |
135 | - | else false | |
136 | - | let ae = if ((P == 0)) | |
137 | - | then (Q > 0) | |
138 | - | else false | |
139 | - | let af = if (if (ac) | |
140 | - | then true | |
141 | - | else ae) | |
142 | - | then true | |
143 | - | else throw("Invalid user vote value") | |
144 | - | if ((af == af)) | |
114 | + | func U (V) = { | |
115 | + | let R = Q() | |
116 | + | if ($isInstanceOf(R, "ByteVector")) | |
145 | 117 | then { | |
146 | - | let ab = if (ac) | |
147 | - | then P | |
148 | - | else Q | |
149 | - | $Tuple2(ab, ac) | |
118 | + | let W = R | |
119 | + | (V.callerPublicKey == W) | |
150 | 120 | } | |
151 | - | else throw("Strict value is not equal to itself.") | |
121 | + | else if ($isInstanceOf(R, "Unit")) | |
122 | + | then (V.caller == this) | |
123 | + | else throw("Match error") | |
152 | 124 | } | |
153 | 125 | ||
154 | 126 | ||
155 | - | func ag (ah,Z,D,ai,A) = makeString(["%s%s%s%s%s%d", "history", ah, D, Z, ai, toString(A)], a) | |
127 | + | func X (V) = if (U(V)) | |
128 | + | then true | |
129 | + | else throw("permission denied") | |
156 | 130 | ||
157 | 131 | ||
158 | - | func aj (ak) = if ((ak.caller == this)) | |
159 | - | then true | |
160 | - | else throw("Permission denied") | |
161 | - | ||
162 | - | ||
163 | - | func al (am) = valueOrElse(getInteger(this, am), 0) | |
164 | - | ||
165 | - | ||
166 | - | func an (am) = valueOrErrorMessage(getInteger(this, am), (am + " is not defined")) | |
167 | - | ||
168 | - | ||
169 | - | func ao (am) = valueOrElse(getString(this, am), "") | |
170 | - | ||
171 | - | ||
172 | - | func ap (am) = valueOrErrorMessage(getString(this, am), (am + " is not defined")) | |
173 | - | ||
174 | - | ||
175 | - | let aq = an(i) | |
176 | - | ||
177 | - | let ar = fromBase58String(ap(j)) | |
178 | - | ||
179 | - | let as = an(k) | |
180 | - | ||
181 | - | let at = an(l) | |
182 | - | ||
183 | - | let au = an(m) | |
184 | - | ||
185 | - | let av = an(n) | |
186 | - | ||
187 | - | let aw = an(o) | |
188 | - | ||
189 | - | let ax = addressFromStringValue(ap(p)) | |
190 | - | ||
191 | - | let ay = addressFromStringValue(ap(q)) | |
192 | - | ||
193 | - | let az = addressFromStringValue(ap(r)) | |
194 | - | ||
195 | - | let aA = valueOrElse(getInteger(y), b) | |
196 | - | ||
197 | - | let aB = (av + at) | |
198 | - | ||
199 | - | func aC (Z,aD) = { | |
200 | - | let aE = invoke(ax, "getUserGwxAmountAtHeightREADONLY", [Z, aD], nil) | |
201 | - | c(aE) | |
132 | + | func Y (Z) = { | |
133 | + | let R = Z | |
134 | + | if ($isInstanceOf(R, "Int")) | |
135 | + | then { | |
136 | + | let aa = R | |
137 | + | aa | |
138 | + | } | |
139 | + | else throw("failed to cast into Integer") | |
202 | 140 | } | |
203 | 141 | ||
204 | 142 | ||
205 | - | func aF (D,ab,ac,A,R) = { | |
206 | - | let aG = N(D, A) | |
207 | - | let aH = { | |
208 | - | let e = getString(aG) | |
209 | - | if ($isInstanceOf(e, "String")) | |
210 | - | then { | |
211 | - | let aI = e | |
212 | - | S(aI) | |
213 | - | } | |
214 | - | else if ($isInstanceOf(e, "Unit")) | |
215 | - | then { | |
216 | - | let aJ = getString(N(D, (A - 1))) | |
217 | - | if ($isInstanceOf(aJ, "String")) | |
218 | - | then { | |
219 | - | let aI = aJ | |
220 | - | $Tuple3(0, 0, S(aI)._3) | |
221 | - | } | |
222 | - | else if ($isInstanceOf(aJ, "Unit")) | |
223 | - | then $Tuple3(0, 0, false) | |
224 | - | else throw("Match error") | |
225 | - | } | |
226 | - | else throw("Match error") | |
227 | - | } | |
228 | - | let aK = aH._1 | |
229 | - | let aL = aH._2 | |
230 | - | let aM = aH._3 | |
231 | - | StringEntry(aG, O((aK + (if (ac) | |
232 | - | then ab | |
233 | - | else 0)), (aL + (if (ac) | |
234 | - | then 0 | |
235 | - | else ab)), if ((R == unit)) | |
236 | - | then aM | |
237 | - | else value(R))) | |
238 | - | } | |
239 | - | ||
240 | - | ||
241 | - | func aN (F,I) = { | |
242 | - | let aO = getString(this, E(F)) | |
243 | - | let aP = getString(this, H(F, I)) | |
244 | - | let aQ = getString(this, J(F, I)) | |
245 | - | if (if ((I == aO)) | |
143 | + | @Callable(V) | |
144 | + | func constructor (ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al) = { | |
145 | + | let am = [X(V), if (isDefined(addressFromString(ab))) | |
246 | 146 | then true | |
247 | - | else ( | |
147 | + | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(ac))) | |
248 | 148 | then true | |
249 | - | else (aQ != unit) | |
250 | - | } | |
251 | - | ||
252 | - | ||
253 | - | func aR (F,I) = { | |
254 | - | let aO = getString(this, E(F)) | |
255 | - | let aS = valueOrElse(getInteger(this, G(F)), 0) | |
256 | - | let aT = if (!(aN(F, I))) | |
149 | + | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(af))) | |
257 | 150 | then true | |
258 | - | else throw("Node exists") | |
259 | - | if ((aT == aT)) | |
260 | - | then (([IntegerEntry(G(F), (aS + 1))] ++ (if (isDefined(aO)) | |
261 | - | then [StringEntry(J(F, I), value(aO)), StringEntry(H(F, value(aO)), I)] | |
262 | - | else nil)) ++ [StringEntry(E(F), I)]) | |
263 | - | else throw("Strict value is not equal to itself.") | |
264 | - | } | |
265 | - | ||
266 | - | ||
267 | - | func aU (F,I) = { | |
268 | - | let aO = getString(this, E(F)) | |
269 | - | let aS = valueOrElse(getInteger(this, G(F)), 0) | |
270 | - | let aP = getString(this, H(F, I)) | |
271 | - | let aQ = getString(this, J(F, I)) | |
272 | - | ([IntegerEntry(G(F), (aS - 1))] ++ (if (if (isDefined(aP)) | |
273 | - | then isDefined(aQ) | |
274 | - | else false) | |
275 | - | then [StringEntry(J(F, value(aP)), value(aQ)), StringEntry(H(F, value(aQ)), value(aP)), DeleteEntry(H(F, I)), DeleteEntry(J(F, I))] | |
276 | - | else if (isDefined(aQ)) | |
277 | - | then [StringEntry(E(F), value(aQ)), DeleteEntry(J(F, I)), DeleteEntry(H(F, value(aQ)))] | |
278 | - | else if (isDefined(aP)) | |
279 | - | then [DeleteEntry(H(F, I)), DeleteEntry(J(F, value(aP)))] | |
280 | - | else if ((I == aO)) | |
281 | - | then [DeleteEntry(E(F))] | |
282 | - | else throw("Invalid node"))) | |
283 | - | } | |
284 | - | ||
285 | - | ||
286 | - | func aV (D,aW,aX,aY,aZ) = { | |
287 | - | let ba = StringEntry(aX, D) | |
288 | - | let bb = DeleteEntry(aY) | |
289 | - | if ((aW == unit)) | |
290 | - | then [ba, bb] | |
291 | - | else { | |
292 | - | let Z = value(aW) | |
293 | - | let bc = StringEntry(aY, Z) | |
294 | - | let bd = Y(Z, D, aw) | |
295 | - | let be = getString(bd) | |
296 | - | let bf = if ((be == unit)) | |
297 | - | then { | |
298 | - | let bg = aC(Z, aB) | |
299 | - | if ((bg == 0)) | |
300 | - | then [BooleanEntry(aZ, true)] | |
301 | - | else { | |
302 | - | let bh = (aw - 1) | |
303 | - | let bi = valueOrElse(getBoolean(M(D, bh)), false) | |
304 | - | let bj = if (bi) | |
305 | - | then unit | |
306 | - | else getString(Y(Z, D, bh)) | |
307 | - | if ((bj == unit)) | |
308 | - | then nil | |
309 | - | else { | |
310 | - | let bk = ad(value(bj)) | |
311 | - | let bl = bk._1 | |
312 | - | let ac = bk._2 | |
313 | - | let ab = min([bl, bg]) | |
314 | - | [StringEntry(bd, aa(ab, ac)), aF(D, ab, ac, aw, unit)] | |
315 | - | } | |
316 | - | } | |
317 | - | } | |
318 | - | else nil | |
319 | - | ((bf :+ ba) :+ bc) | |
320 | - | } | |
321 | - | } | |
322 | - | ||
323 | - | ||
324 | - | func bm (D,A) = !(valueOrElse(getBoolean(K(D, A)), true)) | |
325 | - | ||
326 | - | ||
327 | - | func bn (D) = if (if (bm(D, (aw - 1))) | |
328 | - | then bm(D, (aw - 2)) | |
329 | - | else false) | |
330 | - | then bm(D, (aw - 3)) | |
331 | - | else false | |
332 | - | ||
333 | - | ||
334 | - | @Callable(ak) | |
335 | - | func constructor (bo,bp,bq,br,bs,bt,bu,bv,bw,bx) = { | |
336 | - | let by = [aj(ak), if (isDefined(addressFromString(bo))) | |
151 | + | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(ad))) | |
337 | 152 | then true | |
338 | - | else throw("Invalid | |
153 | + | else throw("Invalid emission contract address"), if (isDefined(addressFromString(ae))) | |
339 | 154 | then true | |
340 | - | else throw("Invalid | |
155 | + | else throw("Invalid factory contract address"), if ((ah >= 0)) | |
341 | 156 | then true | |
342 | - | else throw("Invalid | |
157 | + | else throw("Invalid fee amount"), if ((aj > 0)) | |
343 | 158 | then true | |
344 | - | else throw("Invalid | |
159 | + | else throw("Invalid voting duration"), if ((al >= 0)) | |
345 | 160 | then true | |
346 | - | else throw("Invalid | |
161 | + | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(ai)))) | |
347 | 162 | then true | |
348 | - | else throw("Invalid | |
163 | + | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(ak)))) | |
349 | 164 | then true | |
350 | - | else throw("Invalid voting duration"), if (((bw + bu) > height)) | |
351 | - | then true | |
352 | - | else throw("Invalid start height")] | |
353 | - | if ((by == by)) | |
354 | - | then $Tuple2([StringEntry(p, bo), StringEntry(q, bp), StringEntry(r, bq), IntegerEntry(i, br), StringEntry(j, bs), IntegerEntry(k, bt), IntegerEntry(l, bu), IntegerEntry(m, bv), IntegerEntry(n, bw), IntegerEntry(o, 0), IntegerEntry(y, bx)], unit) | |
165 | + | else throw("Invalid USDN asset ID")] | |
166 | + | if ((am == am)) | |
167 | + | then $Tuple2([StringEntry(g, ab), StringEntry(j, ac), StringEntry(i, ad), StringEntry(k, ae), StringEntry(h, af), StringEntry(l, ag), IntegerEntry(b, ah), IntegerEntry(d, aj), IntegerEntry(e, al), StringEntry(f, ai), StringEntry(c, ak)], unit) | |
355 | 168 | else throw("Strict value is not equal to itself.") | |
356 | 169 | } | |
357 | 170 | ||
358 | 171 | ||
359 | 172 | ||
360 | - | @Callable(ak) | |
361 | - | func suggest (D,bz) = { | |
362 | - | let bA = valueOrErrorMessage(assetInfo(fromBase58String(D)), "Invalid asset ID") | |
363 | - | let bB = value(ak.payments[0]) | |
364 | - | let by = [if ((bA.issuer == ak.caller)) | |
173 | + | @Callable(V) | |
174 | + | func constructorV2 (an) = { | |
175 | + | let am = [X(V), if ((an > 0)) | |
365 | 176 | then true | |
366 | - | else throw("Asset can only be suggested by its issuer"), if ((value(bB.assetId) == ar)) | |
367 | - | then true | |
368 | - | else throw("Invalid fee asset"), if ((bB.amount == aq)) | |
369 | - | then true | |
370 | - | else throw("Invalid fee amount")] | |
371 | - | if ((by == by)) | |
372 | - | then { | |
373 | - | let bC = invoke(az, "createOrUpdate", [D, bz, false], nil) | |
374 | - | if ((bC == bC)) | |
375 | - | then { | |
376 | - | let bD = invoke(ay, "burn", nil, [AttachedPayment(bB.assetId, bB.amount)]) | |
377 | - | if ((bD == bD)) | |
378 | - | then { | |
379 | - | let bE = aR(B, D) | |
380 | - | let bF = (aw + 1) | |
381 | - | let bG = if ((aB > height)) | |
382 | - | then aw | |
383 | - | else bF | |
384 | - | $Tuple2((bE :+ aF(D, 0, true, bG, false)), unit) | |
385 | - | } | |
386 | - | else throw("Strict value is not equal to itself.") | |
387 | - | } | |
388 | - | else throw("Strict value is not equal to itself.") | |
389 | - | } | |
177 | + | else throw("invalid threshold")] | |
178 | + | if ((am == am)) | |
179 | + | then $Tuple2([IntegerEntry(m, an)], unit) | |
390 | 180 | else throw("Strict value is not equal to itself.") | |
391 | 181 | } | |
392 | 182 | ||
393 | 183 | ||
394 | 184 | ||
395 | - | @Callable(ak) | |
396 | - | func vote (D,ac) = { | |
397 | - | let bH = if (aN(B, D)) | |
398 | - | then true | |
399 | - | else throw("Invalid asset") | |
400 | - | if ((bH == bH)) | |
185 | + | @Callable(V) | |
186 | + | func suggest (r,s) = { | |
187 | + | let G = $Tuple2(r, s) | |
188 | + | let ao = value(V.payments[0]) | |
189 | + | let ap = if ((r == "WAVES")) | |
190 | + | then unit | |
191 | + | else { | |
192 | + | let aq = valueOrErrorMessage(assetInfo(fromBase58String(r)), "invalid amountAssetId ID") | |
193 | + | if ((aq.scripted == false)) | |
194 | + | then true | |
195 | + | else throw("asset is smart") | |
196 | + | } | |
197 | + | if ((ap == ap)) | |
401 | 198 | then { | |
402 | - | let | |
199 | + | let am = [if ((toBase58String(value(ao.assetId)) == value(getString(f)))) | |
403 | 200 | then true | |
404 | - | else throw("Current voting is over but results are not finalized") | |
405 | - | if ((bI == bI)) | |
201 | + | else throw("invalid fee asset"), if ((ao.amount == value(getInteger(b)))) | |
202 | + | then true | |
203 | + | else throw("invalid fee amount"), if ((getInteger(q(r, s)) == unit)) | |
204 | + | then true | |
205 | + | else throw("already in voting list"), if (!(valueOrElse(getBoolean(P, F(G)), false))) | |
206 | + | then true | |
207 | + | else throw("pool is in emission voting list")] | |
208 | + | if ((am == am)) | |
406 | 209 | then { | |
407 | - | let Z = toString(ak.caller) | |
408 | - | let bJ = aC(Z, aB) | |
409 | - | let bK = if ((bJ > 0)) | |
410 | - | then true | |
411 | - | else throw("You'll not have gWX at the end of voting") | |
412 | - | if ((bK == bK)) | |
210 | + | let ar = { | |
211 | + | let R = invoke(O, "statusREADONLY", [r, s], nil) | |
212 | + | if ($isInstanceOf(R, "String")) | |
213 | + | then { | |
214 | + | let S = R | |
215 | + | if ((S == "active")) | |
216 | + | then true | |
217 | + | else throw("user pool is not active") | |
218 | + | } | |
219 | + | else throw("user pool is not active") | |
220 | + | } | |
221 | + | if ((ar == ar)) | |
413 | 222 | then { | |
414 | - | let bL = C(D) | |
415 | - | let bd = Y(Z, D, aw) | |
416 | - | let be = getString(bd) | |
417 | - | let bM = if ((be == unit)) | |
223 | + | let as = if (U(V)) | |
418 | 224 | then unit | |
419 | - | else invoke(this, "cancelVote", [D], nil) | |
420 | - | if ((bM == bM)) | |
225 | + | else { | |
226 | + | let at = { | |
227 | + | let R = invoke(K, "isVerifiedREADONLY", [r], nil) | |
228 | + | if ($isInstanceOf(R, "Boolean")) | |
229 | + | then { | |
230 | + | let au = R | |
231 | + | if (au) | |
232 | + | then true | |
233 | + | else throw("asset is not verified") | |
234 | + | } | |
235 | + | else throw("asset is not verified") | |
236 | + | } | |
237 | + | if ((at == at)) | |
238 | + | then unit | |
239 | + | else throw("Strict value is not equal to itself.") | |
240 | + | } | |
241 | + | if ((as == as)) | |
421 | 242 | then { | |
422 | - | let bN = [StringEntry(bd, aa(bJ, ac)), StringEntry(ag("vote", Z, D, toBase58String(ak.transactionId), aw), aa(bJ, ac)), aF(D, bJ, ac, aw, unit)] | |
423 | - | let bO = if (aN(bL, Z)) | |
424 | - | then nil | |
425 | - | else aR(bL, Z) | |
426 | - | $Tuple2((bO ++ bN), unit) | |
243 | + | let av = invoke(M, "burn", nil, [AttachedPayment(ao.assetId, ao.amount)]) | |
244 | + | if ((av == av)) | |
245 | + | then { | |
246 | + | let aw = { | |
247 | + | let R = getInteger(t(r, s)) | |
248 | + | if ($isInstanceOf(R, "Int")) | |
249 | + | then { | |
250 | + | let ax = R | |
251 | + | (ax + 1) | |
252 | + | } | |
253 | + | else 0 | |
254 | + | } | |
255 | + | $Tuple2([IntegerEntry(q(r, s), aw), IntegerEntry(u(r, s, aw), height), StringEntry(w(r, s, aw), x("0", "0")), IntegerEntry(t(r, s), aw)], unit) | |
256 | + | } | |
257 | + | else throw("Strict value is not equal to itself.") | |
427 | 258 | } | |
428 | 259 | else throw("Strict value is not equal to itself.") | |
429 | 260 | } | |
436 | 267 | ||
437 | 268 | ||
438 | 269 | ||
439 | - | @Callable(ak) | |
440 | - | func cancelVote (D) = { | |
441 | - | let Z = if ((ak.caller == this)) | |
442 | - | then toString(ak.originCaller) | |
443 | - | else toString(ak.caller) | |
444 | - | let bL = C(D) | |
445 | - | let bd = Y(Z, D, aw) | |
446 | - | let be = getString(bd) | |
447 | - | let bP = ad(valueOrErrorMessage(be, "Nothing to cancel")) | |
448 | - | let ab = bP._1 | |
449 | - | let ac = bP._2 | |
450 | - | let bO = aU(bL, Z) | |
451 | - | let bN = [DeleteEntry(bd), StringEntry(ag("cancelVote", Z, D, toBase58String(ak.transactionId), aw), aa(0, true)), aF(D, -(ab), ac, aw, unit)] | |
452 | - | $Tuple2((bO ++ bN), unit) | |
453 | - | } | |
454 | - | ||
455 | - | ||
456 | - | ||
457 | - | @Callable(ak) | |
458 | - | func finalizeAssetINTERNAL (D,A) = { | |
459 | - | let bQ = aj(ak) | |
460 | - | if ((bQ == bQ)) | |
270 | + | @Callable(V) | |
271 | + | func vote (r,s,ay) = { | |
272 | + | let v = value(getInteger(q(r, s))) | |
273 | + | let az = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
274 | + | let am = [if (isDefined(getInteger(q(r, s)))) | |
275 | + | then true | |
276 | + | else throw("the token isn't on the voting list"), if ((az > height)) | |
277 | + | then true | |
278 | + | else throw("too late to vote")] | |
279 | + | if ((am == am)) | |
461 | 280 | then { | |
462 | - | let aG = N(D, A) | |
463 | - | let bR = { | |
464 | - | let e = getString(aG) | |
465 | - | if ($isInstanceOf(e, "String")) | |
466 | - | then { | |
467 | - | let aI = e | |
468 | - | let bS = S(aI) | |
469 | - | $Tuple2(bS._1, bS._2) | |
281 | + | let D = invoke(L, "getUserGwxAmountAtHeightREADONLY", [toString(V.caller), az], nil) | |
282 | + | let aA = if ((Y(D) > 0)) | |
283 | + | then true | |
284 | + | else throw("you don't have gwx") | |
285 | + | if ((aA == aA)) | |
286 | + | then { | |
287 | + | let E = { | |
288 | + | let R = getString(A(r, s, v, toString(V.caller))) | |
289 | + | if ($isInstanceOf(R, "String")) | |
290 | + | then { | |
291 | + | let S = R | |
292 | + | let E = split(S, a) | |
293 | + | let aB = E[1] | |
294 | + | let aC = E[2] | |
295 | + | let aD = if (if ((aC == "yes")) | |
296 | + | then (ay == true) | |
297 | + | else false) | |
298 | + | then true | |
299 | + | else if ((aC == "no")) | |
300 | + | then (ay == false) | |
301 | + | else false | |
302 | + | let aE = if (aD) | |
303 | + | then (Y(D) == parseIntValue(aB)) | |
304 | + | else false | |
305 | + | let aF = if (if (aD) | |
306 | + | then aE | |
307 | + | else false) | |
308 | + | then throw("you already voted") | |
309 | + | else invoke(this, "cancelVote", [r, s], nil) | |
310 | + | aF | |
311 | + | } | |
312 | + | else if ($isInstanceOf(R, "Unit")) | |
313 | + | then { | |
314 | + | let aG = R | |
315 | + | aG | |
316 | + | } | |
317 | + | else throw("Match error") | |
470 | 318 | } | |
471 | - | else if ($isInstanceOf(e, "Unit")) | |
472 | - | then $Tuple2(0, 0) | |
473 | - | else throw("Match error") | |
474 | - | } | |
475 | - | let P = bR._1 | |
476 | - | let Q = bR._2 | |
477 | - | let ab = (P + Q) | |
478 | - | let R = if ((ab >= as)) | |
479 | - | then (P > Q) | |
480 | - | else false | |
481 | - | let bT = [BooleanEntry(K(D, A), R), if (R) | |
482 | - | then BooleanEntry(L(D), true) | |
483 | - | else DeleteEntry(L(D))] | |
484 | - | let bU = invoke(az, "setVerified", [D, R], nil) | |
485 | - | if ((bU == bU)) | |
486 | - | then { | |
487 | - | let bV = if (R) | |
488 | - | then false | |
489 | - | else bn(D) | |
490 | - | let bW = if (bV) | |
491 | - | then [BooleanEntry(M(D, aw), true)] | |
492 | - | else nil | |
493 | - | let bX = if (bV) | |
494 | - | then nil | |
495 | - | else [aF(D, 0, true, (aw + 1), R)] | |
496 | - | let bO = if (bV) | |
497 | - | then aU(B, D) | |
498 | - | else nil | |
499 | - | let bY = if (bV) | |
500 | - | then invoke(az, "onEliminate", [D], nil) | |
501 | - | else unit | |
502 | - | if ((bY == bY)) | |
503 | - | then $Tuple2(((bO ++ bX) ++ bT), unit) | |
319 | + | if ((E == E)) | |
320 | + | then { | |
321 | + | let aH = split(value(getString(w(r, s, v))), a) | |
322 | + | let aI = aH[1] | |
323 | + | let aJ = aH[2] | |
324 | + | let aK = if (ay) | |
325 | + | then { | |
326 | + | let aL = (parseIntValue(aI) + Y(D)) | |
327 | + | [toString(aL), aJ] | |
328 | + | } | |
329 | + | else { | |
330 | + | let aM = (parseIntValue(aJ) + Y(D)) | |
331 | + | [aI, toString(aM)] | |
332 | + | } | |
333 | + | let aN = A(r, s, v, toString(V.caller)) | |
334 | + | let aB = C(toString(Y(D)), ay) | |
335 | + | $Tuple2([StringEntry(w(r, s, v), x(aK[0], aK[1])), StringEntry(aN, aB)], unit) | |
336 | + | } | |
504 | 337 | else throw("Strict value is not equal to itself.") | |
505 | 338 | } | |
506 | 339 | else throw("Strict value is not equal to itself.") | |
510 | 343 | ||
511 | 344 | ||
512 | 345 | ||
513 | - | @Callable(ak) | |
514 | - | func deleteUserNodeINTERNAL (D,Z,aZ) = { | |
515 | - | let bQ = aj(ak) | |
516 | - | if ((bQ == bQ)) | |
517 | - | then $Tuple2((aU(C(D), Z) :+ DeleteEntry(aZ)), unit) | |
346 | + | @Callable(V) | |
347 | + | func cancelVote (r,s) = { | |
348 | + | let aO = if ((V.caller == this)) | |
349 | + | then toString(V.originCaller) | |
350 | + | else toString(V.caller) | |
351 | + | let v = value(getInteger(q(r, s))) | |
352 | + | let am = [if (isDefined(getString(w(r, s, v)))) | |
353 | + | then true | |
354 | + | else throw("no vote for assets pair")] | |
355 | + | if ((am == am)) | |
356 | + | then { | |
357 | + | let E = split(value(getString(A(r, s, v, aO))), a) | |
358 | + | let aB = E[1] | |
359 | + | let aC = E[2] | |
360 | + | let aH = split(value(getString(w(r, s, v))), a) | |
361 | + | let aI = aH[1] | |
362 | + | let aJ = aH[2] | |
363 | + | let aP = if ((aC == "yes")) | |
364 | + | then { | |
365 | + | let aL = (parseIntValue(aI) - parseIntValue(aB)) | |
366 | + | $Tuple2([StringEntry(w(r, s, v), x(toString(aL), aJ)), DeleteEntry(A(r, s, v, aO))], unit) | |
367 | + | } | |
368 | + | else { | |
369 | + | let aM = (parseIntValue(aJ) - parseIntValue(aB)) | |
370 | + | $Tuple2([StringEntry(w(r, s, v), x(aI, toString(aM))), DeleteEntry(A(r, s, v, aO))], unit) | |
371 | + | } | |
372 | + | aP | |
373 | + | } | |
518 | 374 | else throw("Strict value is not equal to itself.") | |
519 | 375 | } | |
520 | 376 | ||
521 | 377 | ||
522 | 378 | ||
523 | - | @Callable(ak) | |
524 | - | func finalizeVotingHelper () = if ((aB > height)) | |
525 | - | then $Tuple2(nil, false) | |
526 | - | else { | |
527 | - | let bZ = getString(s) | |
528 | - | let ca = getString(t) | |
529 | - | let cb = 0 | |
530 | - | let cc = $Tuple2([IntegerEntry(n, (height + cb)), IntegerEntry(o, (aw + 1)), DeleteEntry(s), DeleteEntry(t), DeleteEntry(v), DeleteEntry(w)], true) | |
531 | - | if ((bZ == unit)) | |
532 | - | then { | |
533 | - | let cd = getString(E(B)) | |
534 | - | if ((cd == unit)) | |
535 | - | then cc | |
536 | - | else { | |
537 | - | let ce = value(cd) | |
538 | - | let aW = getString(E(C(ce))) | |
539 | - | let cf = aV(ce, aW, s, t, u) | |
540 | - | $Tuple2(cf, true) | |
541 | - | } | |
542 | - | } | |
543 | - | else { | |
544 | - | let cg = value(bZ) | |
545 | - | if ((ca == unit)) | |
546 | - | then { | |
547 | - | let ch = getString(J(B, cg)) | |
548 | - | if ((ch == ch)) | |
549 | - | then { | |
550 | - | let ci = invoke(this, "finalizeAssetINTERNAL", [cg, aw], nil) | |
551 | - | if ((ci == ci)) | |
552 | - | then if ((ch == unit)) | |
553 | - | then cc | |
554 | - | else { | |
555 | - | let ce = value(ch) | |
556 | - | let aW = getString(E(C(ce))) | |
557 | - | let cf = aV(ce, aW, s, t, u) | |
558 | - | $Tuple2(cf, true) | |
559 | - | } | |
560 | - | else throw("Strict value is not equal to itself.") | |
561 | - | } | |
562 | - | else throw("Strict value is not equal to itself.") | |
563 | - | } | |
564 | - | else { | |
565 | - | let cj = value(ca) | |
566 | - | let aW = getString(J(C(cg), cj)) | |
567 | - | if ((aW == aW)) | |
568 | - | then { | |
569 | - | let ck = valueOrElse(getBoolean(u), false) | |
570 | - | let cl = if (ck) | |
571 | - | then invoke(this, "deleteUserNodeINTERNAL", [cg, cj, u], nil) | |
572 | - | else unit | |
573 | - | if ((cl == cl)) | |
574 | - | then { | |
575 | - | let cf = aV(cg, aW, s, t, u) | |
576 | - | $Tuple2(cf, true) | |
577 | - | } | |
578 | - | else throw("Strict value is not equal to itself.") | |
579 | - | } | |
580 | - | else throw("Strict value is not equal to itself.") | |
581 | - | } | |
582 | - | } | |
583 | - | } | |
584 | - | ||
585 | - | ||
586 | - | ||
587 | - | @Callable(ak) | |
588 | - | func finalizeVotingWrapper (cm) = { | |
589 | - | let cn = g(invoke(this, "finalizeVotingHelper", nil, nil)) | |
590 | - | if ((cn == cn)) | |
591 | - | then if (!(cn)) | |
592 | - | then if ((cm == 0)) | |
593 | - | then throw("Current voting is not over yet") | |
594 | - | else $Tuple2(nil, unit) | |
595 | - | else if ((aA > cm)) | |
596 | - | then { | |
597 | - | let co = invoke(this, "finalizeVotingWrapper", [(cm + 1)], nil) | |
598 | - | if ((co == co)) | |
599 | - | then $Tuple2(nil, unit) | |
600 | - | else throw("Strict value is not equal to itself.") | |
601 | - | } | |
602 | - | else $Tuple2(nil, unit) | |
379 | + | @Callable(V) | |
380 | + | func setFee (aQ) = { | |
381 | + | let am = [X(V)] | |
382 | + | if ((am == am)) | |
383 | + | then [IntegerEntry(b, aQ)] | |
603 | 384 | else throw("Strict value is not equal to itself.") | |
604 | 385 | } | |
605 | 386 | ||
606 | 387 | ||
607 | 388 | ||
608 | - | @Callable(ak) | |
609 | - | func finalizeVoting () = { | |
610 | - | let co = invoke(this, "finalizeVotingWrapper", [0], nil) | |
611 | - | if ((co == co)) | |
612 | - | then $Tuple2(nil, unit) | |
389 | + | @Callable(V) | |
390 | + | func setThreshold (aR) = { | |
391 | + | let am = [X(V), if ((aR > 0)) | |
392 | + | then true | |
393 | + | else throw("invalid threshold")] | |
394 | + | if ((am == am)) | |
395 | + | then $Tuple2([IntegerEntry(m, aR)], unit) | |
613 | 396 | else throw("Strict value is not equal to itself.") | |
614 | 397 | } | |
615 | 398 | ||
616 | 399 | ||
617 | 400 | ||
618 | - | @Callable( | |
619 | - | func | |
620 | - | let | |
621 | - | let | |
622 | - | if ( | |
401 | + | @Callable(V) | |
402 | + | func finalize (r,s) = { | |
403 | + | let v = value(getInteger(q(r, s))) | |
404 | + | let az = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
405 | + | let am = [if (isDefined(getInteger(q(r, s)))) | |
623 | 406 | then true | |
624 | - | else (height >= | |
407 | + | else throw("no assets pair"), if ((height >= az)) | |
625 | 408 | then true | |
626 | - | else cq) | |
627 | - | then $Tuple2(nil, false) | |
628 | - | else { | |
629 | - | let bZ = getString(v) | |
630 | - | let ca = getString(w) | |
631 | - | let cc = $Tuple2([BooleanEntry(cp, true), DeleteEntry(v), DeleteEntry(w)], true) | |
632 | - | if ((bZ == unit)) | |
409 | + | else throw("insufficient height for completion")] | |
410 | + | if ((am == am)) | |
411 | + | then { | |
412 | + | let aH = split(value(getString(w(r, s, v))), a) | |
413 | + | let aI = parseIntValue(aH[1]) | |
414 | + | let aJ = parseIntValue(aH[2]) | |
415 | + | let aS = (aI + aJ) | |
416 | + | let an = p(m) | |
417 | + | let aP = if (if ((aS >= an)) | |
418 | + | then (aI > aJ) | |
419 | + | else false) | |
633 | 420 | then { | |
634 | - | let cd = getString(E(B)) | |
635 | - | if ((cd == unit)) | |
636 | - | then cc | |
637 | - | else { | |
638 | - | let ce = value(cd) | |
639 | - | let aW = getString(E(C(ce))) | |
640 | - | let cf = aV(ce, aW, v, w, x) | |
641 | - | $Tuple2(cf, true) | |
642 | - | } | |
643 | - | } | |
644 | - | else { | |
645 | - | let cg = value(bZ) | |
646 | - | if ((ca == unit)) | |
421 | + | let aT = invoke(N, "setWxEmissionPoolLabel", [r, s], nil) | |
422 | + | if ((aT == aT)) | |
647 | 423 | then { | |
648 | - | let ch = getString(J(B, cg)) | |
649 | - | if ((ch == unit)) | |
650 | - | then cc | |
651 | - | else { | |
652 | - | let ce = value(ch) | |
653 | - | let aW = getString(E(C(ce))) | |
654 | - | let cf = aV(ce, aW, v, w, x) | |
655 | - | $Tuple2(cf, true) | |
656 | - | } | |
657 | - | } | |
658 | - | else { | |
659 | - | let cj = value(ca) | |
660 | - | let aW = getString(J(C(cg), cj)) | |
661 | - | if ((aW == aW)) | |
662 | - | then { | |
663 | - | let ck = valueOrElse(getBoolean(x), false) | |
664 | - | let cl = if (ck) | |
665 | - | then invoke(this, "deleteUserNodeINTERNAL", [cg, cj, x], nil) | |
666 | - | else unit | |
667 | - | if ((cl == cl)) | |
668 | - | then { | |
669 | - | let cf = aV(cg, aW, v, w, x) | |
670 | - | $Tuple2(cf, true) | |
671 | - | } | |
672 | - | else throw("Strict value is not equal to itself.") | |
673 | - | } | |
424 | + | let aU = invoke(P, "create", [r, s], nil) | |
425 | + | if ((aU == aU)) | |
426 | + | then $Tuple2([DeleteEntry(q(r, s))], unit) | |
674 | 427 | else throw("Strict value is not equal to itself.") | |
675 | 428 | } | |
676 | - | } | |
677 | - | } | |
678 | - | } | |
679 | - | ||
680 | - | ||
681 | - | ||
682 | - | @Callable(ak) | |
683 | - | func transferVotesWrapper (cm) = { | |
684 | - | let cn = g(invoke(this, "transferVotesHelper", nil, nil)) | |
685 | - | if ((cn == cn)) | |
686 | - | then if (!(cn)) | |
687 | - | then if ((cm == 0)) | |
688 | - | then throw("Voting is not started yet") | |
689 | - | else $Tuple2(nil, unit) | |
690 | - | else if ((aA > cm)) | |
691 | - | then { | |
692 | - | let co = invoke(this, "transferVotesWrapper", [(cm + 1)], nil) | |
693 | - | if ((co == co)) | |
694 | - | then $Tuple2(nil, unit) | |
695 | 429 | else throw("Strict value is not equal to itself.") | |
696 | 430 | } | |
697 | - | else $Tuple2(nil, unit) | |
431 | + | else $Tuple2([DeleteEntry(q(r, s))], unit) | |
432 | + | aP | |
433 | + | } | |
698 | 434 | else throw("Strict value is not equal to itself.") | |
699 | 435 | } | |
700 | 436 | ||
701 | 437 | ||
702 | 438 | ||
703 | - | @Callable(ak) | |
704 | - | func transferVotes () = { | |
705 | - | let co = invoke(this, "transferVotesWrapper", [0], nil) | |
706 | - | if ((co == co)) | |
707 | - | then $Tuple2(nil, unit) | |
439 | + | @Callable(V) | |
440 | + | func setManager (aV) = { | |
441 | + | let aW = X(V) | |
442 | + | if ((aW == aW)) | |
443 | + | then { | |
444 | + | let aX = fromBase58String(aV) | |
445 | + | if ((aX == aX)) | |
446 | + | then [StringEntry(J(), aV)] | |
447 | + | else throw("Strict value is not equal to itself.") | |
448 | + | } | |
708 | 449 | else throw("Strict value is not equal to itself.") | |
709 | 450 | } | |
710 | 451 | ||
711 | 452 | ||
712 | 453 | ||
713 | - | @Callable(ak) | |
714 | - | func setVotingThreshold (cr) = { | |
715 | - | let bQ = aj(ak) | |
716 | - | if ((bQ == bQ)) | |
717 | - | then $Tuple2([IntegerEntry(k, cr)], unit) | |
454 | + | @Callable(V) | |
455 | + | func confirmManager () = { | |
456 | + | let aY = T() | |
457 | + | let aZ = if (isDefined(aY)) | |
458 | + | then true | |
459 | + | else throw("no pending manager") | |
460 | + | if ((aZ == aZ)) | |
461 | + | then { | |
462 | + | let ba = if ((V.callerPublicKey == value(aY))) | |
463 | + | then true | |
464 | + | else throw("you are not pending manager") | |
465 | + | if ((ba == ba)) | |
466 | + | then [StringEntry(I(), toBase58String(value(aY))), DeleteEntry(J())] | |
467 | + | else throw("Strict value is not equal to itself.") | |
468 | + | } | |
718 | 469 | else throw("Strict value is not equal to itself.") | |
719 | 470 | } | |
720 | 471 | ||
721 | 472 | ||
722 | - | ||
723 | - | @Callable(ak) | |
724 | - | func setFee (cs) = { | |
725 | - | let bQ = aj(ak) | |
726 | - | if ((bQ == bQ)) | |
727 | - | then $Tuple2([IntegerEntry(i, cs)], unit) | |
728 | - | else throw("Strict value is not equal to itself.") | |
473 | + | @Verifier(bb) | |
474 | + | func bc () = { | |
475 | + | let bd = { | |
476 | + | let R = Q() | |
477 | + | if ($isInstanceOf(R, "ByteVector")) | |
478 | + | then { | |
479 | + | let W = R | |
480 | + | W | |
481 | + | } | |
482 | + | else if ($isInstanceOf(R, "Unit")) | |
483 | + | then bb.senderPublicKey | |
484 | + | else throw("Match error") | |
485 | + | } | |
486 | + | sigVerify(bb.bodyBytes, bb.proofs[0], bd) | |
729 | 487 | } | |
730 | - | ||
731 | - | ||
732 | - | ||
733 | - | @Callable(ak) | |
734 | - | func gwxAvailableForVoteREADONLY (Z) = { | |
735 | - | let bJ = aC(Z, aB) | |
736 | - | $Tuple2(nil, bJ) | |
737 | - | } | |
738 | - | ||
739 | 488 |
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 | - | let b = | |
6 | + | let b = makeString(["%s", "fee"], a) | |
7 | 7 | ||
8 | - | func c (d) = { | |
9 | - | let e = d | |
10 | - | if ($isInstanceOf(e, "Int")) | |
11 | - | then { | |
12 | - | let f = e | |
13 | - | f | |
14 | - | } | |
15 | - | else throw("Failed to cast into Integer") | |
8 | + | let c = makeString(["%s", "usdnAssetId"], a) | |
9 | + | ||
10 | + | let d = makeString(["%s", "epochLength"], a) | |
11 | + | ||
12 | + | let e = makeString(["%s", "finalizeReward"], a) | |
13 | + | ||
14 | + | let f = makeString(["%s", "wxAssetId"], a) | |
15 | + | ||
16 | + | let g = makeString(["%s", "assetsStoreContract"], a) | |
17 | + | ||
18 | + | let h = makeString(["%s", "userPoolContract"], a) | |
19 | + | ||
20 | + | let i = makeString(["%s", "emissionContract"], a) | |
21 | + | ||
22 | + | let j = makeString(["%s", "boostingContract"], a) | |
23 | + | ||
24 | + | let k = makeString(["%s", "factoryContract"], a) | |
25 | + | ||
26 | + | let l = makeString(["%s", "votingEmissionContract"], a) | |
27 | + | ||
28 | + | let m = makeString(["%s", "votingThreshold"], a) | |
29 | + | ||
30 | + | func n (o) = valueOrErrorMessage(getString(this, o), (o + " is not defined")) | |
31 | + | ||
32 | + | ||
33 | + | func p (o) = valueOrErrorMessage(getInteger(this, o), (o + " is not defined")) | |
34 | + | ||
35 | + | ||
36 | + | func q (r,s) = makeString(["%s%s%s", "inList", r, s], a) | |
37 | + | ||
38 | + | ||
39 | + | func t (r,s) = makeString(["%s%s%s", "suggestIndex", r, s], a) | |
40 | + | ||
41 | + | ||
42 | + | func u (r,s,v) = makeString(["%s%s%s%d", "startHeight", r, s, toString(v)], a) | |
43 | + | ||
44 | + | ||
45 | + | func w (r,s,v) = makeString(["%s%s%s%d", "votingResult", r, s, toString(v)], a) | |
46 | + | ||
47 | + | ||
48 | + | func x (y,z) = makeString(["%d%d", y, z], a) | |
49 | + | ||
50 | + | ||
51 | + | func A (r,s,v,B) = makeString(["%s%s%s%d%s", "vote", r, s, toString(v), B], a) | |
52 | + | ||
53 | + | ||
54 | + | func C (D,E) = { | |
55 | + | let o = if (E) | |
56 | + | then makeString(["%d%s", D, "yes"], a) | |
57 | + | else makeString(["%d%s", D, "no"], a) | |
58 | + | o | |
16 | 59 | } | |
17 | 60 | ||
18 | 61 | ||
19 | - | func g (d) = { | |
20 | - | let e = d | |
21 | - | if ($isInstanceOf(e, "Boolean")) | |
22 | - | then { | |
23 | - | let h = e | |
24 | - | h | |
25 | - | } | |
26 | - | else throw("Failed to cast into Boolean") | |
62 | + | func F (G) = { | |
63 | + | let H = G | |
64 | + | let r = H._1 | |
65 | + | let s = H._2 | |
66 | + | makeString(["%s%s%s", "inList", r, s], a) | |
27 | 67 | } | |
28 | 68 | ||
29 | 69 | ||
30 | - | let i = makeString(["%s", "fee"], a) | |
31 | - | ||
32 | - | let j = makeString(["%s", "wxAssetId"], a) | |
33 | - | ||
34 | - | let k = makeString(["%s", "votingThreshold"], a) | |
35 | - | ||
36 | - | let l = makeString(["%s", "epochLength"], a) | |
37 | - | ||
38 | - | let m = makeString(["%s", "voteBeforeElimination"], a) | |
39 | - | ||
40 | - | let n = makeString(["%s", "currentVotingHeightStart"], a) | |
41 | - | ||
42 | - | let o = makeString(["%s", "currentEpoch"], a) | |
43 | - | ||
44 | - | let p = makeString(["%s", "boostingContract"], a) | |
45 | - | ||
46 | - | let q = makeString(["%s", "emissionContract"], a) | |
47 | - | ||
48 | - | let r = makeString(["%s", "assetsStoreContract"], a) | |
49 | - | ||
50 | - | let s = makeString(["%s", "latestProcessedAsset"], a) | |
51 | - | ||
52 | - | let t = makeString(["%s", "latestProcessedUser"], a) | |
53 | - | ||
54 | - | let u = makeString(["%s", "latestProcessedUserRemove"], a) | |
55 | - | ||
56 | - | let v = makeString(["%s", "latestProcessedAssetTransfer"], a) | |
57 | - | ||
58 | - | let w = makeString(["%s", "latestProcessedUserTransfer"], a) | |
59 | - | ||
60 | - | let x = makeString(["%s", "latestProcessedUserRemoveTransfer"], a) | |
61 | - | ||
62 | - | let y = makeString(["%s", "maxDepth"], a) | |
63 | - | ||
64 | - | func z (A) = makeString(["%s", "votesTransferFinished", toString(A)], a) | |
70 | + | func I () = "%s__managerPublicKey" | |
65 | 71 | ||
66 | 72 | ||
67 | - | let B = "__assets" | |
68 | - | ||
69 | - | func C (D) = ("%s__votes__" + D) | |
73 | + | func J () = "%s__pendingManagerPublicKey" | |
70 | 74 | ||
71 | 75 | ||
72 | - | ||
76 | + | let K = addressFromStringValue(n(g)) | |
73 | 77 | ||
78 | + | let L = addressFromStringValue(n(j)) | |
74 | 79 | ||
75 | - | ||
80 | + | let M = addressFromStringValue(n(i)) | |
76 | 81 | ||
82 | + | let N = addressFromStringValue(n(k)) | |
77 | 83 | ||
78 | - | ||
84 | + | let O = addressFromStringValue(n(h)) | |
79 | 85 | ||
86 | + | let P = addressFromStringValue(n(l)) | |
80 | 87 | ||
81 | - | func J (F,I) = makeString([("%s%s%s" + F), I, "next"], a) | |
82 | - | ||
83 | - | ||
84 | - | func K (D,A) = makeString(["%s%d%s", "verifiedAt", toString(A), D], a) | |
85 | - | ||
86 | - | ||
87 | - | func L (D) = makeString(["%s%s", "verified", D], a) | |
88 | - | ||
89 | - | ||
90 | - | func M (D,A) = makeString(["%s%s%d", "eliminated", D, toString(A)], a) | |
91 | - | ||
92 | - | ||
93 | - | func N (D,A) = makeString(["%s%d%s", "votingResultAtAsset", toString(A), D], a) | |
94 | - | ||
95 | - | ||
96 | - | func O (P,Q,R) = makeString(["%d%d%s", toString(P), toString(Q), toString(R)], a) | |
97 | - | ||
98 | - | ||
99 | - | func S (T) = { | |
100 | - | let U = split(T, a) | |
101 | - | let V = 1 | |
102 | - | let W = 2 | |
103 | - | let X = 3 | |
104 | - | let P = parseIntValue(U[V]) | |
105 | - | let Q = parseIntValue(U[W]) | |
106 | - | let R = if ((size(U) == 4)) | |
107 | - | then (U[X] == "true") | |
108 | - | else false | |
109 | - | $Tuple3(P, Q, R) | |
88 | + | func Q () = { | |
89 | + | let R = getString(I()) | |
90 | + | if ($isInstanceOf(R, "String")) | |
91 | + | then { | |
92 | + | let S = R | |
93 | + | fromBase58String(S) | |
94 | + | } | |
95 | + | else if ($isInstanceOf(R, "Unit")) | |
96 | + | then unit | |
97 | + | else throw("Match error") | |
110 | 98 | } | |
111 | 99 | ||
112 | 100 | ||
113 | - | func Y (Z,D,A) = makeString(["%s%d%s%s", "vru", toString(A), D, Z], a) | |
114 | - | ||
115 | - | ||
116 | - | func aa (ab,ac) = { | |
117 | - | let P = if (ac) | |
118 | - | then ab | |
119 | - | else 0 | |
120 | - | let Q = if (ac) | |
121 | - | then 0 | |
122 | - | else ab | |
123 | - | makeString(["%d%d", toString(P), toString(Q)], a) | |
101 | + | func T () = { | |
102 | + | let R = getString(J()) | |
103 | + | if ($isInstanceOf(R, "String")) | |
104 | + | then { | |
105 | + | let S = R | |
106 | + | fromBase58String(S) | |
107 | + | } | |
108 | + | else if ($isInstanceOf(R, "Unit")) | |
109 | + | then unit | |
110 | + | else throw("Match error") | |
124 | 111 | } | |
125 | 112 | ||
126 | 113 | ||
127 | - | func ad (T) = { | |
128 | - | let U = split(T, a) | |
129 | - | let V = 1 | |
130 | - | let W = 2 | |
131 | - | let P = parseIntValue(U[V]) | |
132 | - | let Q = parseIntValue(U[W]) | |
133 | - | let ac = if ((P > 0)) | |
134 | - | then (Q == 0) | |
135 | - | else false | |
136 | - | let ae = if ((P == 0)) | |
137 | - | then (Q > 0) | |
138 | - | else false | |
139 | - | let af = if (if (ac) | |
140 | - | then true | |
141 | - | else ae) | |
142 | - | then true | |
143 | - | else throw("Invalid user vote value") | |
144 | - | if ((af == af)) | |
114 | + | func U (V) = { | |
115 | + | let R = Q() | |
116 | + | if ($isInstanceOf(R, "ByteVector")) | |
145 | 117 | then { | |
146 | - | let ab = if (ac) | |
147 | - | then P | |
148 | - | else Q | |
149 | - | $Tuple2(ab, ac) | |
118 | + | let W = R | |
119 | + | (V.callerPublicKey == W) | |
150 | 120 | } | |
151 | - | else throw("Strict value is not equal to itself.") | |
121 | + | else if ($isInstanceOf(R, "Unit")) | |
122 | + | then (V.caller == this) | |
123 | + | else throw("Match error") | |
152 | 124 | } | |
153 | 125 | ||
154 | 126 | ||
155 | - | func ag (ah,Z,D,ai,A) = makeString(["%s%s%s%s%s%d", "history", ah, D, Z, ai, toString(A)], a) | |
127 | + | func X (V) = if (U(V)) | |
128 | + | then true | |
129 | + | else throw("permission denied") | |
156 | 130 | ||
157 | 131 | ||
158 | - | func aj (ak) = if ((ak.caller == this)) | |
159 | - | then true | |
160 | - | else throw("Permission denied") | |
161 | - | ||
162 | - | ||
163 | - | func al (am) = valueOrElse(getInteger(this, am), 0) | |
164 | - | ||
165 | - | ||
166 | - | func an (am) = valueOrErrorMessage(getInteger(this, am), (am + " is not defined")) | |
167 | - | ||
168 | - | ||
169 | - | func ao (am) = valueOrElse(getString(this, am), "") | |
170 | - | ||
171 | - | ||
172 | - | func ap (am) = valueOrErrorMessage(getString(this, am), (am + " is not defined")) | |
173 | - | ||
174 | - | ||
175 | - | let aq = an(i) | |
176 | - | ||
177 | - | let ar = fromBase58String(ap(j)) | |
178 | - | ||
179 | - | let as = an(k) | |
180 | - | ||
181 | - | let at = an(l) | |
182 | - | ||
183 | - | let au = an(m) | |
184 | - | ||
185 | - | let av = an(n) | |
186 | - | ||
187 | - | let aw = an(o) | |
188 | - | ||
189 | - | let ax = addressFromStringValue(ap(p)) | |
190 | - | ||
191 | - | let ay = addressFromStringValue(ap(q)) | |
192 | - | ||
193 | - | let az = addressFromStringValue(ap(r)) | |
194 | - | ||
195 | - | let aA = valueOrElse(getInteger(y), b) | |
196 | - | ||
197 | - | let aB = (av + at) | |
198 | - | ||
199 | - | func aC (Z,aD) = { | |
200 | - | let aE = invoke(ax, "getUserGwxAmountAtHeightREADONLY", [Z, aD], nil) | |
201 | - | c(aE) | |
132 | + | func Y (Z) = { | |
133 | + | let R = Z | |
134 | + | if ($isInstanceOf(R, "Int")) | |
135 | + | then { | |
136 | + | let aa = R | |
137 | + | aa | |
138 | + | } | |
139 | + | else throw("failed to cast into Integer") | |
202 | 140 | } | |
203 | 141 | ||
204 | 142 | ||
205 | - | func aF (D,ab,ac,A,R) = { | |
206 | - | let aG = N(D, A) | |
207 | - | let aH = { | |
208 | - | let e = getString(aG) | |
209 | - | if ($isInstanceOf(e, "String")) | |
210 | - | then { | |
211 | - | let aI = e | |
212 | - | S(aI) | |
213 | - | } | |
214 | - | else if ($isInstanceOf(e, "Unit")) | |
215 | - | then { | |
216 | - | let aJ = getString(N(D, (A - 1))) | |
217 | - | if ($isInstanceOf(aJ, "String")) | |
218 | - | then { | |
219 | - | let aI = aJ | |
220 | - | $Tuple3(0, 0, S(aI)._3) | |
221 | - | } | |
222 | - | else if ($isInstanceOf(aJ, "Unit")) | |
223 | - | then $Tuple3(0, 0, false) | |
224 | - | else throw("Match error") | |
225 | - | } | |
226 | - | else throw("Match error") | |
227 | - | } | |
228 | - | let aK = aH._1 | |
229 | - | let aL = aH._2 | |
230 | - | let aM = aH._3 | |
231 | - | StringEntry(aG, O((aK + (if (ac) | |
232 | - | then ab | |
233 | - | else 0)), (aL + (if (ac) | |
234 | - | then 0 | |
235 | - | else ab)), if ((R == unit)) | |
236 | - | then aM | |
237 | - | else value(R))) | |
238 | - | } | |
239 | - | ||
240 | - | ||
241 | - | func aN (F,I) = { | |
242 | - | let aO = getString(this, E(F)) | |
243 | - | let aP = getString(this, H(F, I)) | |
244 | - | let aQ = getString(this, J(F, I)) | |
245 | - | if (if ((I == aO)) | |
143 | + | @Callable(V) | |
144 | + | func constructor (ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al) = { | |
145 | + | let am = [X(V), if (isDefined(addressFromString(ab))) | |
246 | 146 | then true | |
247 | - | else ( | |
147 | + | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(ac))) | |
248 | 148 | then true | |
249 | - | else (aQ != unit) | |
250 | - | } | |
251 | - | ||
252 | - | ||
253 | - | func aR (F,I) = { | |
254 | - | let aO = getString(this, E(F)) | |
255 | - | let aS = valueOrElse(getInteger(this, G(F)), 0) | |
256 | - | let aT = if (!(aN(F, I))) | |
149 | + | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(af))) | |
257 | 150 | then true | |
258 | - | else throw("Node exists") | |
259 | - | if ((aT == aT)) | |
260 | - | then (([IntegerEntry(G(F), (aS + 1))] ++ (if (isDefined(aO)) | |
261 | - | then [StringEntry(J(F, I), value(aO)), StringEntry(H(F, value(aO)), I)] | |
262 | - | else nil)) ++ [StringEntry(E(F), I)]) | |
263 | - | else throw("Strict value is not equal to itself.") | |
264 | - | } | |
265 | - | ||
266 | - | ||
267 | - | func aU (F,I) = { | |
268 | - | let aO = getString(this, E(F)) | |
269 | - | let aS = valueOrElse(getInteger(this, G(F)), 0) | |
270 | - | let aP = getString(this, H(F, I)) | |
271 | - | let aQ = getString(this, J(F, I)) | |
272 | - | ([IntegerEntry(G(F), (aS - 1))] ++ (if (if (isDefined(aP)) | |
273 | - | then isDefined(aQ) | |
274 | - | else false) | |
275 | - | then [StringEntry(J(F, value(aP)), value(aQ)), StringEntry(H(F, value(aQ)), value(aP)), DeleteEntry(H(F, I)), DeleteEntry(J(F, I))] | |
276 | - | else if (isDefined(aQ)) | |
277 | - | then [StringEntry(E(F), value(aQ)), DeleteEntry(J(F, I)), DeleteEntry(H(F, value(aQ)))] | |
278 | - | else if (isDefined(aP)) | |
279 | - | then [DeleteEntry(H(F, I)), DeleteEntry(J(F, value(aP)))] | |
280 | - | else if ((I == aO)) | |
281 | - | then [DeleteEntry(E(F))] | |
282 | - | else throw("Invalid node"))) | |
283 | - | } | |
284 | - | ||
285 | - | ||
286 | - | func aV (D,aW,aX,aY,aZ) = { | |
287 | - | let ba = StringEntry(aX, D) | |
288 | - | let bb = DeleteEntry(aY) | |
289 | - | if ((aW == unit)) | |
290 | - | then [ba, bb] | |
291 | - | else { | |
292 | - | let Z = value(aW) | |
293 | - | let bc = StringEntry(aY, Z) | |
294 | - | let bd = Y(Z, D, aw) | |
295 | - | let be = getString(bd) | |
296 | - | let bf = if ((be == unit)) | |
297 | - | then { | |
298 | - | let bg = aC(Z, aB) | |
299 | - | if ((bg == 0)) | |
300 | - | then [BooleanEntry(aZ, true)] | |
301 | - | else { | |
302 | - | let bh = (aw - 1) | |
303 | - | let bi = valueOrElse(getBoolean(M(D, bh)), false) | |
304 | - | let bj = if (bi) | |
305 | - | then unit | |
306 | - | else getString(Y(Z, D, bh)) | |
307 | - | if ((bj == unit)) | |
308 | - | then nil | |
309 | - | else { | |
310 | - | let bk = ad(value(bj)) | |
311 | - | let bl = bk._1 | |
312 | - | let ac = bk._2 | |
313 | - | let ab = min([bl, bg]) | |
314 | - | [StringEntry(bd, aa(ab, ac)), aF(D, ab, ac, aw, unit)] | |
315 | - | } | |
316 | - | } | |
317 | - | } | |
318 | - | else nil | |
319 | - | ((bf :+ ba) :+ bc) | |
320 | - | } | |
321 | - | } | |
322 | - | ||
323 | - | ||
324 | - | func bm (D,A) = !(valueOrElse(getBoolean(K(D, A)), true)) | |
325 | - | ||
326 | - | ||
327 | - | func bn (D) = if (if (bm(D, (aw - 1))) | |
328 | - | then bm(D, (aw - 2)) | |
329 | - | else false) | |
330 | - | then bm(D, (aw - 3)) | |
331 | - | else false | |
332 | - | ||
333 | - | ||
334 | - | @Callable(ak) | |
335 | - | func constructor (bo,bp,bq,br,bs,bt,bu,bv,bw,bx) = { | |
336 | - | let by = [aj(ak), if (isDefined(addressFromString(bo))) | |
151 | + | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(ad))) | |
337 | 152 | then true | |
338 | - | else throw("Invalid | |
153 | + | else throw("Invalid emission contract address"), if (isDefined(addressFromString(ae))) | |
339 | 154 | then true | |
340 | - | else throw("Invalid | |
155 | + | else throw("Invalid factory contract address"), if ((ah >= 0)) | |
341 | 156 | then true | |
342 | - | else throw("Invalid | |
157 | + | else throw("Invalid fee amount"), if ((aj > 0)) | |
343 | 158 | then true | |
344 | - | else throw("Invalid | |
159 | + | else throw("Invalid voting duration"), if ((al >= 0)) | |
345 | 160 | then true | |
346 | - | else throw("Invalid | |
161 | + | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(ai)))) | |
347 | 162 | then true | |
348 | - | else throw("Invalid | |
163 | + | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(ak)))) | |
349 | 164 | then true | |
350 | - | else throw("Invalid voting duration"), if (((bw + bu) > height)) | |
351 | - | then true | |
352 | - | else throw("Invalid start height")] | |
353 | - | if ((by == by)) | |
354 | - | then $Tuple2([StringEntry(p, bo), StringEntry(q, bp), StringEntry(r, bq), IntegerEntry(i, br), StringEntry(j, bs), IntegerEntry(k, bt), IntegerEntry(l, bu), IntegerEntry(m, bv), IntegerEntry(n, bw), IntegerEntry(o, 0), IntegerEntry(y, bx)], unit) | |
165 | + | else throw("Invalid USDN asset ID")] | |
166 | + | if ((am == am)) | |
167 | + | then $Tuple2([StringEntry(g, ab), StringEntry(j, ac), StringEntry(i, ad), StringEntry(k, ae), StringEntry(h, af), StringEntry(l, ag), IntegerEntry(b, ah), IntegerEntry(d, aj), IntegerEntry(e, al), StringEntry(f, ai), StringEntry(c, ak)], unit) | |
355 | 168 | else throw("Strict value is not equal to itself.") | |
356 | 169 | } | |
357 | 170 | ||
358 | 171 | ||
359 | 172 | ||
360 | - | @Callable(ak) | |
361 | - | func suggest (D,bz) = { | |
362 | - | let bA = valueOrErrorMessage(assetInfo(fromBase58String(D)), "Invalid asset ID") | |
363 | - | let bB = value(ak.payments[0]) | |
364 | - | let by = [if ((bA.issuer == ak.caller)) | |
173 | + | @Callable(V) | |
174 | + | func constructorV2 (an) = { | |
175 | + | let am = [X(V), if ((an > 0)) | |
365 | 176 | then true | |
366 | - | else throw("Asset can only be suggested by its issuer"), if ((value(bB.assetId) == ar)) | |
367 | - | then true | |
368 | - | else throw("Invalid fee asset"), if ((bB.amount == aq)) | |
369 | - | then true | |
370 | - | else throw("Invalid fee amount")] | |
371 | - | if ((by == by)) | |
372 | - | then { | |
373 | - | let bC = invoke(az, "createOrUpdate", [D, bz, false], nil) | |
374 | - | if ((bC == bC)) | |
375 | - | then { | |
376 | - | let bD = invoke(ay, "burn", nil, [AttachedPayment(bB.assetId, bB.amount)]) | |
377 | - | if ((bD == bD)) | |
378 | - | then { | |
379 | - | let bE = aR(B, D) | |
380 | - | let bF = (aw + 1) | |
381 | - | let bG = if ((aB > height)) | |
382 | - | then aw | |
383 | - | else bF | |
384 | - | $Tuple2((bE :+ aF(D, 0, true, bG, false)), unit) | |
385 | - | } | |
386 | - | else throw("Strict value is not equal to itself.") | |
387 | - | } | |
388 | - | else throw("Strict value is not equal to itself.") | |
389 | - | } | |
177 | + | else throw("invalid threshold")] | |
178 | + | if ((am == am)) | |
179 | + | then $Tuple2([IntegerEntry(m, an)], unit) | |
390 | 180 | else throw("Strict value is not equal to itself.") | |
391 | 181 | } | |
392 | 182 | ||
393 | 183 | ||
394 | 184 | ||
395 | - | @Callable(ak) | |
396 | - | func vote (D,ac) = { | |
397 | - | let bH = if (aN(B, D)) | |
398 | - | then true | |
399 | - | else throw("Invalid asset") | |
400 | - | if ((bH == bH)) | |
185 | + | @Callable(V) | |
186 | + | func suggest (r,s) = { | |
187 | + | let G = $Tuple2(r, s) | |
188 | + | let ao = value(V.payments[0]) | |
189 | + | let ap = if ((r == "WAVES")) | |
190 | + | then unit | |
191 | + | else { | |
192 | + | let aq = valueOrErrorMessage(assetInfo(fromBase58String(r)), "invalid amountAssetId ID") | |
193 | + | if ((aq.scripted == false)) | |
194 | + | then true | |
195 | + | else throw("asset is smart") | |
196 | + | } | |
197 | + | if ((ap == ap)) | |
401 | 198 | then { | |
402 | - | let | |
199 | + | let am = [if ((toBase58String(value(ao.assetId)) == value(getString(f)))) | |
403 | 200 | then true | |
404 | - | else throw("Current voting is over but results are not finalized") | |
405 | - | if ((bI == bI)) | |
201 | + | else throw("invalid fee asset"), if ((ao.amount == value(getInteger(b)))) | |
202 | + | then true | |
203 | + | else throw("invalid fee amount"), if ((getInteger(q(r, s)) == unit)) | |
204 | + | then true | |
205 | + | else throw("already in voting list"), if (!(valueOrElse(getBoolean(P, F(G)), false))) | |
206 | + | then true | |
207 | + | else throw("pool is in emission voting list")] | |
208 | + | if ((am == am)) | |
406 | 209 | then { | |
407 | - | let Z = toString(ak.caller) | |
408 | - | let bJ = aC(Z, aB) | |
409 | - | let bK = if ((bJ > 0)) | |
410 | - | then true | |
411 | - | else throw("You'll not have gWX at the end of voting") | |
412 | - | if ((bK == bK)) | |
210 | + | let ar = { | |
211 | + | let R = invoke(O, "statusREADONLY", [r, s], nil) | |
212 | + | if ($isInstanceOf(R, "String")) | |
213 | + | then { | |
214 | + | let S = R | |
215 | + | if ((S == "active")) | |
216 | + | then true | |
217 | + | else throw("user pool is not active") | |
218 | + | } | |
219 | + | else throw("user pool is not active") | |
220 | + | } | |
221 | + | if ((ar == ar)) | |
413 | 222 | then { | |
414 | - | let bL = C(D) | |
415 | - | let bd = Y(Z, D, aw) | |
416 | - | let be = getString(bd) | |
417 | - | let bM = if ((be == unit)) | |
223 | + | let as = if (U(V)) | |
418 | 224 | then unit | |
419 | - | else invoke(this, "cancelVote", [D], nil) | |
420 | - | if ((bM == bM)) | |
225 | + | else { | |
226 | + | let at = { | |
227 | + | let R = invoke(K, "isVerifiedREADONLY", [r], nil) | |
228 | + | if ($isInstanceOf(R, "Boolean")) | |
229 | + | then { | |
230 | + | let au = R | |
231 | + | if (au) | |
232 | + | then true | |
233 | + | else throw("asset is not verified") | |
234 | + | } | |
235 | + | else throw("asset is not verified") | |
236 | + | } | |
237 | + | if ((at == at)) | |
238 | + | then unit | |
239 | + | else throw("Strict value is not equal to itself.") | |
240 | + | } | |
241 | + | if ((as == as)) | |
421 | 242 | then { | |
422 | - | let bN = [StringEntry(bd, aa(bJ, ac)), StringEntry(ag("vote", Z, D, toBase58String(ak.transactionId), aw), aa(bJ, ac)), aF(D, bJ, ac, aw, unit)] | |
423 | - | let bO = if (aN(bL, Z)) | |
424 | - | then nil | |
425 | - | else aR(bL, Z) | |
426 | - | $Tuple2((bO ++ bN), unit) | |
243 | + | let av = invoke(M, "burn", nil, [AttachedPayment(ao.assetId, ao.amount)]) | |
244 | + | if ((av == av)) | |
245 | + | then { | |
246 | + | let aw = { | |
247 | + | let R = getInteger(t(r, s)) | |
248 | + | if ($isInstanceOf(R, "Int")) | |
249 | + | then { | |
250 | + | let ax = R | |
251 | + | (ax + 1) | |
252 | + | } | |
253 | + | else 0 | |
254 | + | } | |
255 | + | $Tuple2([IntegerEntry(q(r, s), aw), IntegerEntry(u(r, s, aw), height), StringEntry(w(r, s, aw), x("0", "0")), IntegerEntry(t(r, s), aw)], unit) | |
256 | + | } | |
257 | + | else throw("Strict value is not equal to itself.") | |
427 | 258 | } | |
428 | 259 | else throw("Strict value is not equal to itself.") | |
429 | 260 | } | |
430 | 261 | else throw("Strict value is not equal to itself.") | |
431 | 262 | } | |
432 | 263 | else throw("Strict value is not equal to itself.") | |
433 | 264 | } | |
434 | 265 | else throw("Strict value is not equal to itself.") | |
435 | 266 | } | |
436 | 267 | ||
437 | 268 | ||
438 | 269 | ||
439 | - | @Callable(ak) | |
440 | - | func cancelVote (D) = { | |
441 | - | let Z = if ((ak.caller == this)) | |
442 | - | then toString(ak.originCaller) | |
443 | - | else toString(ak.caller) | |
444 | - | let bL = C(D) | |
445 | - | let bd = Y(Z, D, aw) | |
446 | - | let be = getString(bd) | |
447 | - | let bP = ad(valueOrErrorMessage(be, "Nothing to cancel")) | |
448 | - | let ab = bP._1 | |
449 | - | let ac = bP._2 | |
450 | - | let bO = aU(bL, Z) | |
451 | - | let bN = [DeleteEntry(bd), StringEntry(ag("cancelVote", Z, D, toBase58String(ak.transactionId), aw), aa(0, true)), aF(D, -(ab), ac, aw, unit)] | |
452 | - | $Tuple2((bO ++ bN), unit) | |
453 | - | } | |
454 | - | ||
455 | - | ||
456 | - | ||
457 | - | @Callable(ak) | |
458 | - | func finalizeAssetINTERNAL (D,A) = { | |
459 | - | let bQ = aj(ak) | |
460 | - | if ((bQ == bQ)) | |
270 | + | @Callable(V) | |
271 | + | func vote (r,s,ay) = { | |
272 | + | let v = value(getInteger(q(r, s))) | |
273 | + | let az = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
274 | + | let am = [if (isDefined(getInteger(q(r, s)))) | |
275 | + | then true | |
276 | + | else throw("the token isn't on the voting list"), if ((az > height)) | |
277 | + | then true | |
278 | + | else throw("too late to vote")] | |
279 | + | if ((am == am)) | |
461 | 280 | then { | |
462 | - | let aG = N(D, A) | |
463 | - | let bR = { | |
464 | - | let e = getString(aG) | |
465 | - | if ($isInstanceOf(e, "String")) | |
466 | - | then { | |
467 | - | let aI = e | |
468 | - | let bS = S(aI) | |
469 | - | $Tuple2(bS._1, bS._2) | |
281 | + | let D = invoke(L, "getUserGwxAmountAtHeightREADONLY", [toString(V.caller), az], nil) | |
282 | + | let aA = if ((Y(D) > 0)) | |
283 | + | then true | |
284 | + | else throw("you don't have gwx") | |
285 | + | if ((aA == aA)) | |
286 | + | then { | |
287 | + | let E = { | |
288 | + | let R = getString(A(r, s, v, toString(V.caller))) | |
289 | + | if ($isInstanceOf(R, "String")) | |
290 | + | then { | |
291 | + | let S = R | |
292 | + | let E = split(S, a) | |
293 | + | let aB = E[1] | |
294 | + | let aC = E[2] | |
295 | + | let aD = if (if ((aC == "yes")) | |
296 | + | then (ay == true) | |
297 | + | else false) | |
298 | + | then true | |
299 | + | else if ((aC == "no")) | |
300 | + | then (ay == false) | |
301 | + | else false | |
302 | + | let aE = if (aD) | |
303 | + | then (Y(D) == parseIntValue(aB)) | |
304 | + | else false | |
305 | + | let aF = if (if (aD) | |
306 | + | then aE | |
307 | + | else false) | |
308 | + | then throw("you already voted") | |
309 | + | else invoke(this, "cancelVote", [r, s], nil) | |
310 | + | aF | |
311 | + | } | |
312 | + | else if ($isInstanceOf(R, "Unit")) | |
313 | + | then { | |
314 | + | let aG = R | |
315 | + | aG | |
316 | + | } | |
317 | + | else throw("Match error") | |
470 | 318 | } | |
471 | - | else if ($isInstanceOf(e, "Unit")) | |
472 | - | then $Tuple2(0, 0) | |
473 | - | else throw("Match error") | |
474 | - | } | |
475 | - | let P = bR._1 | |
476 | - | let Q = bR._2 | |
477 | - | let ab = (P + Q) | |
478 | - | let R = if ((ab >= as)) | |
479 | - | then (P > Q) | |
480 | - | else false | |
481 | - | let bT = [BooleanEntry(K(D, A), R), if (R) | |
482 | - | then BooleanEntry(L(D), true) | |
483 | - | else DeleteEntry(L(D))] | |
484 | - | let bU = invoke(az, "setVerified", [D, R], nil) | |
485 | - | if ((bU == bU)) | |
486 | - | then { | |
487 | - | let bV = if (R) | |
488 | - | then false | |
489 | - | else bn(D) | |
490 | - | let bW = if (bV) | |
491 | - | then [BooleanEntry(M(D, aw), true)] | |
492 | - | else nil | |
493 | - | let bX = if (bV) | |
494 | - | then nil | |
495 | - | else [aF(D, 0, true, (aw + 1), R)] | |
496 | - | let bO = if (bV) | |
497 | - | then aU(B, D) | |
498 | - | else nil | |
499 | - | let bY = if (bV) | |
500 | - | then invoke(az, "onEliminate", [D], nil) | |
501 | - | else unit | |
502 | - | if ((bY == bY)) | |
503 | - | then $Tuple2(((bO ++ bX) ++ bT), unit) | |
319 | + | if ((E == E)) | |
320 | + | then { | |
321 | + | let aH = split(value(getString(w(r, s, v))), a) | |
322 | + | let aI = aH[1] | |
323 | + | let aJ = aH[2] | |
324 | + | let aK = if (ay) | |
325 | + | then { | |
326 | + | let aL = (parseIntValue(aI) + Y(D)) | |
327 | + | [toString(aL), aJ] | |
328 | + | } | |
329 | + | else { | |
330 | + | let aM = (parseIntValue(aJ) + Y(D)) | |
331 | + | [aI, toString(aM)] | |
332 | + | } | |
333 | + | let aN = A(r, s, v, toString(V.caller)) | |
334 | + | let aB = C(toString(Y(D)), ay) | |
335 | + | $Tuple2([StringEntry(w(r, s, v), x(aK[0], aK[1])), StringEntry(aN, aB)], unit) | |
336 | + | } | |
504 | 337 | else throw("Strict value is not equal to itself.") | |
505 | 338 | } | |
506 | 339 | else throw("Strict value is not equal to itself.") | |
507 | 340 | } | |
508 | 341 | else throw("Strict value is not equal to itself.") | |
509 | 342 | } | |
510 | 343 | ||
511 | 344 | ||
512 | 345 | ||
513 | - | @Callable(ak) | |
514 | - | func deleteUserNodeINTERNAL (D,Z,aZ) = { | |
515 | - | let bQ = aj(ak) | |
516 | - | if ((bQ == bQ)) | |
517 | - | then $Tuple2((aU(C(D), Z) :+ DeleteEntry(aZ)), unit) | |
346 | + | @Callable(V) | |
347 | + | func cancelVote (r,s) = { | |
348 | + | let aO = if ((V.caller == this)) | |
349 | + | then toString(V.originCaller) | |
350 | + | else toString(V.caller) | |
351 | + | let v = value(getInteger(q(r, s))) | |
352 | + | let am = [if (isDefined(getString(w(r, s, v)))) | |
353 | + | then true | |
354 | + | else throw("no vote for assets pair")] | |
355 | + | if ((am == am)) | |
356 | + | then { | |
357 | + | let E = split(value(getString(A(r, s, v, aO))), a) | |
358 | + | let aB = E[1] | |
359 | + | let aC = E[2] | |
360 | + | let aH = split(value(getString(w(r, s, v))), a) | |
361 | + | let aI = aH[1] | |
362 | + | let aJ = aH[2] | |
363 | + | let aP = if ((aC == "yes")) | |
364 | + | then { | |
365 | + | let aL = (parseIntValue(aI) - parseIntValue(aB)) | |
366 | + | $Tuple2([StringEntry(w(r, s, v), x(toString(aL), aJ)), DeleteEntry(A(r, s, v, aO))], unit) | |
367 | + | } | |
368 | + | else { | |
369 | + | let aM = (parseIntValue(aJ) - parseIntValue(aB)) | |
370 | + | $Tuple2([StringEntry(w(r, s, v), x(aI, toString(aM))), DeleteEntry(A(r, s, v, aO))], unit) | |
371 | + | } | |
372 | + | aP | |
373 | + | } | |
518 | 374 | else throw("Strict value is not equal to itself.") | |
519 | 375 | } | |
520 | 376 | ||
521 | 377 | ||
522 | 378 | ||
523 | - | @Callable(ak) | |
524 | - | func finalizeVotingHelper () = if ((aB > height)) | |
525 | - | then $Tuple2(nil, false) | |
526 | - | else { | |
527 | - | let bZ = getString(s) | |
528 | - | let ca = getString(t) | |
529 | - | let cb = 0 | |
530 | - | let cc = $Tuple2([IntegerEntry(n, (height + cb)), IntegerEntry(o, (aw + 1)), DeleteEntry(s), DeleteEntry(t), DeleteEntry(v), DeleteEntry(w)], true) | |
531 | - | if ((bZ == unit)) | |
532 | - | then { | |
533 | - | let cd = getString(E(B)) | |
534 | - | if ((cd == unit)) | |
535 | - | then cc | |
536 | - | else { | |
537 | - | let ce = value(cd) | |
538 | - | let aW = getString(E(C(ce))) | |
539 | - | let cf = aV(ce, aW, s, t, u) | |
540 | - | $Tuple2(cf, true) | |
541 | - | } | |
542 | - | } | |
543 | - | else { | |
544 | - | let cg = value(bZ) | |
545 | - | if ((ca == unit)) | |
546 | - | then { | |
547 | - | let ch = getString(J(B, cg)) | |
548 | - | if ((ch == ch)) | |
549 | - | then { | |
550 | - | let ci = invoke(this, "finalizeAssetINTERNAL", [cg, aw], nil) | |
551 | - | if ((ci == ci)) | |
552 | - | then if ((ch == unit)) | |
553 | - | then cc | |
554 | - | else { | |
555 | - | let ce = value(ch) | |
556 | - | let aW = getString(E(C(ce))) | |
557 | - | let cf = aV(ce, aW, s, t, u) | |
558 | - | $Tuple2(cf, true) | |
559 | - | } | |
560 | - | else throw("Strict value is not equal to itself.") | |
561 | - | } | |
562 | - | else throw("Strict value is not equal to itself.") | |
563 | - | } | |
564 | - | else { | |
565 | - | let cj = value(ca) | |
566 | - | let aW = getString(J(C(cg), cj)) | |
567 | - | if ((aW == aW)) | |
568 | - | then { | |
569 | - | let ck = valueOrElse(getBoolean(u), false) | |
570 | - | let cl = if (ck) | |
571 | - | then invoke(this, "deleteUserNodeINTERNAL", [cg, cj, u], nil) | |
572 | - | else unit | |
573 | - | if ((cl == cl)) | |
574 | - | then { | |
575 | - | let cf = aV(cg, aW, s, t, u) | |
576 | - | $Tuple2(cf, true) | |
577 | - | } | |
578 | - | else throw("Strict value is not equal to itself.") | |
579 | - | } | |
580 | - | else throw("Strict value is not equal to itself.") | |
581 | - | } | |
582 | - | } | |
583 | - | } | |
584 | - | ||
585 | - | ||
586 | - | ||
587 | - | @Callable(ak) | |
588 | - | func finalizeVotingWrapper (cm) = { | |
589 | - | let cn = g(invoke(this, "finalizeVotingHelper", nil, nil)) | |
590 | - | if ((cn == cn)) | |
591 | - | then if (!(cn)) | |
592 | - | then if ((cm == 0)) | |
593 | - | then throw("Current voting is not over yet") | |
594 | - | else $Tuple2(nil, unit) | |
595 | - | else if ((aA > cm)) | |
596 | - | then { | |
597 | - | let co = invoke(this, "finalizeVotingWrapper", [(cm + 1)], nil) | |
598 | - | if ((co == co)) | |
599 | - | then $Tuple2(nil, unit) | |
600 | - | else throw("Strict value is not equal to itself.") | |
601 | - | } | |
602 | - | else $Tuple2(nil, unit) | |
379 | + | @Callable(V) | |
380 | + | func setFee (aQ) = { | |
381 | + | let am = [X(V)] | |
382 | + | if ((am == am)) | |
383 | + | then [IntegerEntry(b, aQ)] | |
603 | 384 | else throw("Strict value is not equal to itself.") | |
604 | 385 | } | |
605 | 386 | ||
606 | 387 | ||
607 | 388 | ||
608 | - | @Callable(ak) | |
609 | - | func finalizeVoting () = { | |
610 | - | let co = invoke(this, "finalizeVotingWrapper", [0], nil) | |
611 | - | if ((co == co)) | |
612 | - | then $Tuple2(nil, unit) | |
389 | + | @Callable(V) | |
390 | + | func setThreshold (aR) = { | |
391 | + | let am = [X(V), if ((aR > 0)) | |
392 | + | then true | |
393 | + | else throw("invalid threshold")] | |
394 | + | if ((am == am)) | |
395 | + | then $Tuple2([IntegerEntry(m, aR)], unit) | |
613 | 396 | else throw("Strict value is not equal to itself.") | |
614 | 397 | } | |
615 | 398 | ||
616 | 399 | ||
617 | 400 | ||
618 | - | @Callable( | |
619 | - | func | |
620 | - | let | |
621 | - | let | |
622 | - | if ( | |
401 | + | @Callable(V) | |
402 | + | func finalize (r,s) = { | |
403 | + | let v = value(getInteger(q(r, s))) | |
404 | + | let az = (value(getInteger(u(r, s, v))) + value(getInteger(d))) | |
405 | + | let am = [if (isDefined(getInteger(q(r, s)))) | |
623 | 406 | then true | |
624 | - | else (height >= | |
407 | + | else throw("no assets pair"), if ((height >= az)) | |
625 | 408 | then true | |
626 | - | else cq) | |
627 | - | then $Tuple2(nil, false) | |
628 | - | else { | |
629 | - | let bZ = getString(v) | |
630 | - | let ca = getString(w) | |
631 | - | let cc = $Tuple2([BooleanEntry(cp, true), DeleteEntry(v), DeleteEntry(w)], true) | |
632 | - | if ((bZ == unit)) | |
409 | + | else throw("insufficient height for completion")] | |
410 | + | if ((am == am)) | |
411 | + | then { | |
412 | + | let aH = split(value(getString(w(r, s, v))), a) | |
413 | + | let aI = parseIntValue(aH[1]) | |
414 | + | let aJ = parseIntValue(aH[2]) | |
415 | + | let aS = (aI + aJ) | |
416 | + | let an = p(m) | |
417 | + | let aP = if (if ((aS >= an)) | |
418 | + | then (aI > aJ) | |
419 | + | else false) | |
633 | 420 | then { | |
634 | - | let cd = getString(E(B)) | |
635 | - | if ((cd == unit)) | |
636 | - | then cc | |
637 | - | else { | |
638 | - | let ce = value(cd) | |
639 | - | let aW = getString(E(C(ce))) | |
640 | - | let cf = aV(ce, aW, v, w, x) | |
641 | - | $Tuple2(cf, true) | |
642 | - | } | |
643 | - | } | |
644 | - | else { | |
645 | - | let cg = value(bZ) | |
646 | - | if ((ca == unit)) | |
421 | + | let aT = invoke(N, "setWxEmissionPoolLabel", [r, s], nil) | |
422 | + | if ((aT == aT)) | |
647 | 423 | then { | |
648 | - | let ch = getString(J(B, cg)) | |
649 | - | if ((ch == unit)) | |
650 | - | then cc | |
651 | - | else { | |
652 | - | let ce = value(ch) | |
653 | - | let aW = getString(E(C(ce))) | |
654 | - | let cf = aV(ce, aW, v, w, x) | |
655 | - | $Tuple2(cf, true) | |
656 | - | } | |
657 | - | } | |
658 | - | else { | |
659 | - | let cj = value(ca) | |
660 | - | let aW = getString(J(C(cg), cj)) | |
661 | - | if ((aW == aW)) | |
662 | - | then { | |
663 | - | let ck = valueOrElse(getBoolean(x), false) | |
664 | - | let cl = if (ck) | |
665 | - | then invoke(this, "deleteUserNodeINTERNAL", [cg, cj, x], nil) | |
666 | - | else unit | |
667 | - | if ((cl == cl)) | |
668 | - | then { | |
669 | - | let cf = aV(cg, aW, v, w, x) | |
670 | - | $Tuple2(cf, true) | |
671 | - | } | |
672 | - | else throw("Strict value is not equal to itself.") | |
673 | - | } | |
424 | + | let aU = invoke(P, "create", [r, s], nil) | |
425 | + | if ((aU == aU)) | |
426 | + | then $Tuple2([DeleteEntry(q(r, s))], unit) | |
674 | 427 | else throw("Strict value is not equal to itself.") | |
675 | 428 | } | |
676 | - | } | |
677 | - | } | |
678 | - | } | |
679 | - | ||
680 | - | ||
681 | - | ||
682 | - | @Callable(ak) | |
683 | - | func transferVotesWrapper (cm) = { | |
684 | - | let cn = g(invoke(this, "transferVotesHelper", nil, nil)) | |
685 | - | if ((cn == cn)) | |
686 | - | then if (!(cn)) | |
687 | - | then if ((cm == 0)) | |
688 | - | then throw("Voting is not started yet") | |
689 | - | else $Tuple2(nil, unit) | |
690 | - | else if ((aA > cm)) | |
691 | - | then { | |
692 | - | let co = invoke(this, "transferVotesWrapper", [(cm + 1)], nil) | |
693 | - | if ((co == co)) | |
694 | - | then $Tuple2(nil, unit) | |
695 | 429 | else throw("Strict value is not equal to itself.") | |
696 | 430 | } | |
697 | - | else $Tuple2(nil, unit) | |
431 | + | else $Tuple2([DeleteEntry(q(r, s))], unit) | |
432 | + | aP | |
433 | + | } | |
698 | 434 | else throw("Strict value is not equal to itself.") | |
699 | 435 | } | |
700 | 436 | ||
701 | 437 | ||
702 | 438 | ||
703 | - | @Callable(ak) | |
704 | - | func transferVotes () = { | |
705 | - | let co = invoke(this, "transferVotesWrapper", [0], nil) | |
706 | - | if ((co == co)) | |
707 | - | then $Tuple2(nil, unit) | |
439 | + | @Callable(V) | |
440 | + | func setManager (aV) = { | |
441 | + | let aW = X(V) | |
442 | + | if ((aW == aW)) | |
443 | + | then { | |
444 | + | let aX = fromBase58String(aV) | |
445 | + | if ((aX == aX)) | |
446 | + | then [StringEntry(J(), aV)] | |
447 | + | else throw("Strict value is not equal to itself.") | |
448 | + | } | |
708 | 449 | else throw("Strict value is not equal to itself.") | |
709 | 450 | } | |
710 | 451 | ||
711 | 452 | ||
712 | 453 | ||
713 | - | @Callable(ak) | |
714 | - | func setVotingThreshold (cr) = { | |
715 | - | let bQ = aj(ak) | |
716 | - | if ((bQ == bQ)) | |
717 | - | then $Tuple2([IntegerEntry(k, cr)], unit) | |
454 | + | @Callable(V) | |
455 | + | func confirmManager () = { | |
456 | + | let aY = T() | |
457 | + | let aZ = if (isDefined(aY)) | |
458 | + | then true | |
459 | + | else throw("no pending manager") | |
460 | + | if ((aZ == aZ)) | |
461 | + | then { | |
462 | + | let ba = if ((V.callerPublicKey == value(aY))) | |
463 | + | then true | |
464 | + | else throw("you are not pending manager") | |
465 | + | if ((ba == ba)) | |
466 | + | then [StringEntry(I(), toBase58String(value(aY))), DeleteEntry(J())] | |
467 | + | else throw("Strict value is not equal to itself.") | |
468 | + | } | |
718 | 469 | else throw("Strict value is not equal to itself.") | |
719 | 470 | } | |
720 | 471 | ||
721 | 472 | ||
722 | - | ||
723 | - | @Callable(ak) | |
724 | - | func setFee (cs) = { | |
725 | - | let bQ = aj(ak) | |
726 | - | if ((bQ == bQ)) | |
727 | - | then $Tuple2([IntegerEntry(i, cs)], unit) | |
728 | - | else throw("Strict value is not equal to itself.") | |
473 | + | @Verifier(bb) | |
474 | + | func bc () = { | |
475 | + | let bd = { | |
476 | + | let R = Q() | |
477 | + | if ($isInstanceOf(R, "ByteVector")) | |
478 | + | then { | |
479 | + | let W = R | |
480 | + | W | |
481 | + | } | |
482 | + | else if ($isInstanceOf(R, "Unit")) | |
483 | + | then bb.senderPublicKey | |
484 | + | else throw("Match error") | |
485 | + | } | |
486 | + | sigVerify(bb.bodyBytes, bb.proofs[0], bd) | |
729 | 487 | } | |
730 | - | ||
731 | - | ||
732 | - | ||
733 | - | @Callable(ak) | |
734 | - | func gwxAvailableForVoteREADONLY (Z) = { | |
735 | - | let bJ = aC(Z, aB) | |
736 | - | $Tuple2(nil, bJ) | |
737 | - | } | |
738 | - | ||
739 | 488 |
github/deemru/w8io/169f3d6 90.88 ms ◑