tx · J4yBN261bq3dkFdNev3X6agcLXU6hredbUo21P4Q1UL1 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.02600000 Waves 2023.08.11 18:05 [2706081] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "J4yBN261bq3dkFdNev3X6agcLXU6hredbUo21P4Q1UL1", "fee": 2600000, "feeAssetId": null, "timestamp": 1691766319364, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "4YxyoBSM6fnZtqt8Atxp1FRfPKZqH5FexfPG6zvP9Ug5d95yvUYhKUwvysTa1iNdCzdcSZV4a4nFRzDP73Lyqp1C" ], "script": "base64:BgKKLggCEggKBggIAQEBCBIFCgMBCAISAwoBARIECgIICBIECgIICBIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgASABIFCgMICAQSAwoBCBIDCgEIEgQKAggIEgQKAggIIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIhBjb250cmFjdEZpbGVuYW1lIgdTQ0FMRTE4IgZNVUxUMTgiCE1VTFQxOEJJIhVkdXJhdGlvbk1vbnRoc0FsbG93ZWQiC2Jsb2Nrc0luRGF5Ig1ibG9ja3NJbk1vbnRoIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIMZ2V0SW50T3JaZXJvIg9nZXRJbnRPckRlZmF1bHQiCmRlZmF1bHRWYWwiDGdldEludE9yRmFpbCIDYWJzIgN2YWwiDmVuc3VyZVBvc2l0aXZlIgF2IgFtIhtrZXlSZWZlcnJhbHNDb250cmFjdEFkZHJlc3MiHnJlZmVycmFsc0NvbnRyYWN0QWRkcmVzc09yRmFpbCIWa2V5UmVmZXJyYWx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ZGRyZXNzBAJiaQkBAmNGAQUCYVoJAJQKAgUDbmlsBQJiaQJhUAETZ2V0R3d4VG90YWxSRUFET05MWQAJAJQKAgUDbmlsCQECY2IAAmFQARVvbkJvb3N0RW1pc3Npb25VcGRhdGUABAJlSAMJAAACCAUCYVAGY2FsbGVyBQJiUgYJAQJhTwEFAmFQAwkAAAIFAmVIBQJlSAkBAmRHAAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJhUAESb25TdGFrZWRWb3RlVXBkYXRlAwJiSAJiUAJkcwQCZUgDCQAAAggFAmFQBmNhbGxlcgUCYlMGCQECYU8BBQJhUAMJAAACBQJlSAUCZUgEAmR2CQECZHIDBQJiSAUCYlAFAmRzCQCUCgIFAmR2BQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmFQAR1nZXRWb3RpbmdSZXN1bHRTdGFrZWRSRUFET05MWQECYkgJAJQKAgUDbmlsCQECY1cBBQJiSAJhUAElZ2V0Vm90aW5nUmVzdWx0U3Rha2VkSW50ZWdyYWxSRUFET05MWQECYkgJAJQKAgUDbmlsCQECZGEBBQJiSAJhUAEcZ2V0VXNlclZvdGVGaW5hbGl6ZWRSRUFET05MWQICYkgCYlAJAJQKAgUDbmlsCQECY1ACBQJiSAUCYlACYVABIWdldFVzZXJWb3RlU3Rha2VkSW50ZWdyYWxSRUFET05MWQICYkgCYlAJAJQKAgUDbmlsCQECZGsCBQJiSAUCYlABAmVaAQJmYQAEAmZiBAJhSwkBAmFNAAMJAAECBQJhSwIKQnl0ZVZlY3RvcgQCYVIFAmFLBQJhUgMJAAECBQJhSwIEVW5pdAgFAmVaD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAABQJmYvMpV50=", "height": 2706081, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5mLpGSjrJ9FY9CnVPpc53f3Rku6vtNeMtpswhY5LcNi6 Next: HNuyo542xzNyJZ8fWbNgw4Y9zsDqt61JkAmxSk7M3QJc Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | ||
18 | 18 | let h = toBigInt(g) | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = [1, 3, 6, 12, 24, 48] | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 1440 | |
23 | 23 | ||
24 | - | func k (l) = makeString([e, ": ", l], "") | |
24 | + | let k = 43800 | |
25 | + | ||
26 | + | func l (m) = makeString([e, ": ", m], "") | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
29 | + | func n (m) = throw(l(m)) | |
28 | 30 | ||
29 | 31 | ||
30 | - | func | |
32 | + | func o (p,q) = valueOrErrorMessage(getString(p, q), l((("mandatory this." + q) + " is not defined"))) | |
31 | 33 | ||
32 | 34 | ||
33 | - | func | |
35 | + | func r (p,q) = valueOrElse(getInteger(p, q), 0) | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
38 | + | func s (p,q,t) = valueOrElse(getInteger(p, q), t) | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func u (p,q) = valueOrErrorMessage(getInteger(p, q), l((("mandatory this." + q) + " is not defined"))) | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
43 | - | then -( | |
44 | - | else | |
44 | + | func v (w) = if ((0 > w)) | |
45 | + | then -(w) | |
46 | + | else w | |
45 | 47 | ||
46 | 48 | ||
47 | - | func | |
48 | - | then | |
49 | - | else | |
49 | + | func x (y,z) = if ((y >= 0)) | |
50 | + | then y | |
51 | + | else n((valueOrElse(z, "value") + " should be positive")) | |
50 | 52 | ||
51 | 53 | ||
52 | - | func | |
54 | + | func A () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
53 | 55 | ||
54 | 56 | ||
55 | - | let | |
57 | + | let B = addressFromStringValue(o(this, A())) | |
56 | 58 | ||
57 | - | let | |
59 | + | let C = makeString(["%s%s", "referral", "programName"], a) | |
58 | 60 | ||
59 | - | let | |
61 | + | let D = "wxlock" | |
60 | 62 | ||
61 | - | let | |
63 | + | let E = valueOrElse(getString(this, C), D) | |
62 | 64 | ||
63 | - | func | |
65 | + | func F () = "%s%s__config__factoryAddress" | |
64 | 66 | ||
65 | 67 | ||
66 | - | let | |
68 | + | let G = 1 | |
67 | 69 | ||
68 | - | let | |
70 | + | let H = 2 | |
69 | 71 | ||
70 | - | let | |
72 | + | let I = 3 | |
71 | 73 | ||
72 | - | let | |
74 | + | let J = 4 | |
73 | 75 | ||
74 | - | let | |
76 | + | let K = 5 | |
75 | 77 | ||
76 | - | let | |
78 | + | let L = 6 | |
77 | 79 | ||
78 | - | let | |
80 | + | let M = 7 | |
79 | 81 | ||
80 | - | let | |
82 | + | let N = 8 | |
81 | 83 | ||
82 | - | let | |
84 | + | let O = 9 | |
83 | 85 | ||
84 | - | let | |
86 | + | let P = 10 | |
85 | 87 | ||
86 | - | let | |
88 | + | let Q = 11 | |
87 | 89 | ||
88 | - | func | |
90 | + | func R () = "%s__factoryConfig" | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
93 | + | func S (T) = makeString(["%s%s%s", T, "mappings__lpAsset2PoolContract"], a) | |
92 | 94 | ||
93 | 95 | ||
94 | - | func | |
96 | + | func U (V) = makeString(["%s%s", "poolWeight", V], a) | |
95 | 97 | ||
96 | 98 | ||
97 | - | func | |
99 | + | func W (X,Y) = ((("%s%s__poolWeight__" + X) + "__") + toString(Y)) | |
98 | 100 | ||
99 | 101 | ||
100 | - | func | |
102 | + | func Z () = addressFromStringValue(o(this, F())) | |
101 | 103 | ||
102 | 104 | ||
103 | - | func | |
105 | + | func aa (ab) = split(o(ab, R()), a) | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
108 | + | func ac (ad) = addressFromStringValue(ad[H]) | |
107 | 109 | ||
108 | 110 | ||
109 | - | func | |
111 | + | func ae (ad) = addressFromStringValue(ad[K]) | |
110 | 112 | ||
111 | 113 | ||
112 | - | func | |
114 | + | func af (ad) = addressFromStringValue(ad[G]) | |
113 | 115 | ||
114 | 116 | ||
115 | - | func | |
117 | + | func ag (ad) = addressFromStringValue(ad[P]) | |
116 | 118 | ||
117 | 119 | ||
118 | - | func | |
120 | + | func ah () = "%s__managerPublicKey" | |
119 | 121 | ||
120 | 122 | ||
121 | - | func | |
123 | + | func ai () = "%s__managerVaultAddress" | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func aj () = "%s%s__ratePerBlock__current" | |
125 | 127 | ||
126 | 128 | ||
127 | - | func | |
129 | + | func ak () = "%s%s__ratePerBlockMax__current" | |
128 | 130 | ||
129 | 131 | ||
130 | - | func | |
132 | + | func al () = "%s%s__emission__startBlock" | |
131 | 133 | ||
132 | 134 | ||
133 | - | func | |
135 | + | func am () = "%s%s__boostingV2__startBlock" | |
134 | 136 | ||
135 | 137 | ||
136 | - | func | |
138 | + | func an () = "%s%s__boostingV2__integral" | |
137 | 139 | ||
138 | 140 | ||
139 | - | func | |
141 | + | func ao () = "%s%s__emission__duration" | |
140 | 142 | ||
141 | 143 | ||
142 | - | func | |
144 | + | func ap () = "%s%s__emission__endBlock" | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func aq () = "%s__nextPeriod" | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
150 | + | func ar () = "%s%s__gwxRewardEmissionPart__startHeight" | |
149 | 151 | ||
150 | 152 | ||
151 | - | let | |
153 | + | let as = 1 | |
152 | 154 | ||
153 | - | let | |
155 | + | let at = 2 | |
154 | 156 | ||
155 | - | let | |
157 | + | let au = 3 | |
156 | 158 | ||
157 | - | let | |
159 | + | let av = 4 | |
158 | 160 | ||
159 | - | let | |
161 | + | let aw = 5 | |
160 | 162 | ||
161 | - | let | |
163 | + | let ax = 6 | |
162 | 164 | ||
163 | - | func | |
165 | + | func ay () = "%s__config" | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func az () = split(o(this, ay()), a) | |
167 | 169 | ||
168 | 170 | ||
169 | - | let | |
171 | + | let aA = az() | |
170 | 172 | ||
171 | - | let | |
173 | + | let aB = fromBase58String(aA[as]) | |
172 | 174 | ||
173 | - | let | |
175 | + | let aC = valueOrErrorMessage(parseInt(aA[at]), l("invalid min lock amount")) | |
174 | 176 | ||
175 | - | let | |
177 | + | let aD = valueOrErrorMessage(parseInt(aA[au]), l("invalid min lock duration")) | |
176 | 178 | ||
177 | - | let | |
179 | + | let aE = valueOrErrorMessage(parseInt(aA[av]), l("invalid max lock duration")) | |
178 | 180 | ||
179 | - | let | |
181 | + | let aF = valueOrErrorMessage(addressFromString(aA[aw]), l("invalid math contract address")) | |
180 | 182 | ||
181 | - | let | |
183 | + | let aG = valueOrErrorMessage(parseInt(aA[ax]), l("invalid blocks in period")) | |
182 | 184 | ||
183 | - | func | |
185 | + | func aH (aB,aC,aD,aE,aF) = makeString(["%s%d%d%d%s", aB, aC, aD, aE, aF], a) | |
184 | 186 | ||
185 | 187 | ||
186 | - | func | |
188 | + | func aI (aB,aC,aD,aE,aF) = aH(aB, toString(aC), toString(aD), toString(aE), aF) | |
187 | 189 | ||
188 | 190 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ($isInstanceOf( | |
191 | + | func aJ () = { | |
192 | + | let aK = getString(ai()) | |
193 | + | if ($isInstanceOf(aK, "String")) | |
192 | 194 | then { | |
193 | - | let | |
194 | - | addressFromStringValue( | |
195 | + | let aL = aK | |
196 | + | addressFromStringValue(aL) | |
195 | 197 | } | |
196 | 198 | else this | |
197 | 199 | } | |
198 | 200 | ||
199 | 201 | ||
200 | - | func | |
201 | - | let | |
202 | - | let | |
203 | - | if ($isInstanceOf( | |
202 | + | func aM () = { | |
203 | + | let aN = aJ() | |
204 | + | let aK = getString(aN, ah()) | |
205 | + | if ($isInstanceOf(aK, "String")) | |
204 | 206 | then { | |
205 | - | let | |
206 | - | fromBase58String( | |
207 | + | let aL = aK | |
208 | + | fromBase58String(aL) | |
207 | 209 | } | |
208 | - | else if ($isInstanceOf( | |
210 | + | else if ($isInstanceOf(aK, "Unit")) | |
209 | 211 | then unit | |
210 | 212 | else throw("Match error") | |
211 | 213 | } | |
212 | 214 | ||
213 | 215 | ||
214 | - | func | |
215 | - | let | |
216 | - | let | |
217 | - | if ($isInstanceOf( | |
216 | + | func aO (aP) = { | |
217 | + | let aQ = n("Permission denied") | |
218 | + | let aK = aM() | |
219 | + | if ($isInstanceOf(aK, "ByteVector")) | |
218 | 220 | then { | |
219 | - | let | |
220 | - | if (( | |
221 | + | let aR = aK | |
222 | + | if ((aP.callerPublicKey == aR)) | |
221 | 223 | then true | |
222 | - | else | |
224 | + | else aQ | |
223 | 225 | } | |
224 | - | else if ($isInstanceOf( | |
225 | - | then if (( | |
226 | + | else if ($isInstanceOf(aK, "Unit")) | |
227 | + | then if ((aP.caller == this)) | |
226 | 228 | then true | |
227 | - | else | |
229 | + | else aQ | |
228 | 230 | else throw("Match error") | |
229 | 231 | } | |
230 | 232 | ||
231 | 233 | ||
232 | - | let | |
234 | + | let aS = 1 | |
233 | 235 | ||
234 | - | let | |
236 | + | let aT = 2 | |
235 | 237 | ||
236 | - | let | |
238 | + | let aU = 3 | |
237 | 239 | ||
238 | - | let | |
240 | + | let aV = 4 | |
239 | 241 | ||
240 | - | let | |
242 | + | let aW = 5 | |
241 | 243 | ||
242 | - | let | |
244 | + | let aX = 6 | |
243 | 245 | ||
244 | - | func | |
245 | - | let | |
246 | - | if ($isInstanceOf( | |
246 | + | func aY (aZ,ba) = makeString(["%s%s%s__lock", toString(aZ), { | |
247 | + | let aK = ba | |
248 | + | if ($isInstanceOf(aK, "ByteVector")) | |
247 | 249 | then { | |
248 | - | let | |
249 | - | toBase58String( | |
250 | + | let bb = aK | |
251 | + | toBase58String(bb) | |
250 | 252 | } | |
251 | - | else if ($isInstanceOf( | |
253 | + | else if ($isInstanceOf(aK, "Unit")) | |
252 | 254 | then "legacy" | |
253 | 255 | else throw("Match error") | |
254 | 256 | }], a) | |
255 | 257 | ||
256 | 258 | ||
257 | - | func | |
259 | + | func bc (aZ,ba) = split(o(this, aY(aZ, ba)), a) | |
258 | 260 | ||
259 | 261 | ||
260 | - | func | |
262 | + | func bd (aZ) = makeString(["%s%s__gwxAmountTotal", toString(aZ)], a) | |
261 | 263 | ||
262 | 264 | ||
263 | - | func | |
265 | + | func be (bf,bg,bh,bi,bj) = makeString(["%d%d%d%d%d%d%d", toString(bf), toString(bg), toString(bh), toString(lastBlock.timestamp), toString(bi), toString(bj)], a) | |
264 | 266 | ||
265 | 267 | ||
266 | - | func | |
268 | + | func bk () = "%s__nextUserNum" | |
267 | 269 | ||
268 | 270 | ||
269 | - | func | |
271 | + | func bl (aZ) = makeString(["%s%s%s__mapping__user2num", aZ], a) | |
270 | 272 | ||
271 | 273 | ||
272 | - | func | |
274 | + | func bm (Y) = makeString(["%s%s%s__mapping__num2user", Y], a) | |
273 | 275 | ||
274 | 276 | ||
275 | - | func | |
277 | + | func bn () = "%s%s__stats__activeTotalLocked" | |
276 | 278 | ||
277 | 279 | ||
278 | - | func | |
280 | + | func bo () = "%s%s__stats__locksDurationSumInBlocks" | |
279 | 281 | ||
280 | 282 | ||
281 | - | func | |
283 | + | func bp () = "%s%s__stats__locksCount" | |
282 | 284 | ||
283 | 285 | ||
284 | - | func | |
286 | + | func bq () = "%s%s__stats__activeUsersCount" | |
285 | 287 | ||
286 | 288 | ||
287 | - | func | |
289 | + | func br (bs) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(bs)], a) | |
288 | 290 | ||
289 | 291 | ||
290 | - | func | |
292 | + | func bt (bs,bu) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(bs), bu], a) | |
291 | 293 | ||
292 | 294 | ||
293 | - | func | |
295 | + | func bv (bs) = makeString(["%s%d__maxBoostInt", toString(bs)], a) | |
294 | 296 | ||
295 | 297 | ||
296 | - | func | |
298 | + | func bw () = "%s%s__maxBoostInt__total" | |
297 | 299 | ||
298 | 300 | ||
299 | - | func | |
301 | + | func bx (bs) = makeString(["%s%d__userBoostAvaliableToClaimTotal", toString(bs)], a) | |
300 | 302 | ||
301 | 303 | ||
302 | - | func | |
304 | + | func by (bs) = makeString(["%s%d__userBoostClaimed", toString(bs)], a) | |
303 | 305 | ||
304 | 306 | ||
305 | - | func | |
307 | + | func bz () = "%s%s__gwx__total" | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
310 | + | func bA (bB,bC,p,bD) = makeString(["%s%s%s%s%d", "vote", bB, bC, toString(p), toString(bD)], a) | |
309 | 311 | ||
310 | 312 | ||
311 | - | func | |
313 | + | func bE (bD) = makeString(["%s%d", "startHeight", toString(bD)], a) | |
312 | 314 | ||
313 | 315 | ||
314 | - | func | |
316 | + | func bF () = makeString(["%s", "currentEpochUi"], a) | |
315 | 317 | ||
316 | 318 | ||
317 | - | func | |
319 | + | func bG (bH,bD) = makeString(["%s%s%d", "votingResultStaked", bH, toString(bD)], a) | |
318 | 320 | ||
319 | 321 | ||
320 | - | func | |
322 | + | func bI (bH,bD) = makeString(["%s%s%d", "votingResultStakedIntegral", bH, toString(bD)], a) | |
321 | 323 | ||
322 | 324 | ||
323 | - | func | |
325 | + | func bJ (bH,bD) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", bH, toString(bD)], a) | |
324 | 326 | ||
325 | 327 | ||
326 | - | func | |
328 | + | func bK (bH,p,bD) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", bH, toString(p), toString(bD)], a) | |
327 | 329 | ||
328 | 330 | ||
329 | - | func | |
331 | + | func bL (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegral", bH, toString(p), toString(bD)], a) | |
330 | 332 | ||
331 | 333 | ||
332 | - | func | |
334 | + | func bM (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", bH, toString(p), toString(bD)], a) | |
333 | 335 | ||
334 | 336 | ||
335 | - | func | |
337 | + | func bN (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegralLast", bH, toString(p), toString(bD)], a) | |
336 | 338 | ||
337 | 339 | ||
338 | - | func | |
340 | + | func bO (bP,bH) = makeString(["%s%s%s", "staked", bP, bH], a) | |
339 | 341 | ||
340 | 342 | ||
341 | - | let | |
343 | + | let bQ = Z() | |
342 | 344 | ||
343 | - | let | |
345 | + | let ad = aa(bQ) | |
344 | 346 | ||
345 | - | let | |
347 | + | let bR = ae(ad) | |
346 | 348 | ||
347 | - | let | |
349 | + | let bS = af(ad) | |
348 | 350 | ||
349 | - | let | |
351 | + | let bT = ag(ad) | |
350 | 352 | ||
351 | - | let | |
353 | + | let bU = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), l("lp_staking_pools contract address is undefined"))), l("invalid lp_staking_pools contract address")) | |
352 | 354 | ||
353 | - | let | |
355 | + | let bV = makeString(["%s", "votingEmissionContract"], a) | |
354 | 356 | ||
355 | - | let | |
357 | + | let bW = addressFromStringValue(getStringValue(bQ, bV)) | |
356 | 358 | ||
357 | - | let | |
359 | + | let bX = makeString(["%s", "votingEmissionRateContract"], a) | |
358 | 360 | ||
359 | - | let | |
360 | - | let | |
361 | - | if ($isInstanceOf( | |
362 | - | then | |
363 | - | else throw(($getType( | |
361 | + | let bY = { | |
362 | + | let bZ = invoke(bR, "getBoostCoeffREADONLY", nil, nil) | |
363 | + | if ($isInstanceOf(bZ, "Int")) | |
364 | + | then bZ | |
365 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
364 | 366 | } | |
365 | 367 | ||
366 | - | func | |
367 | - | let | |
368 | - | if ($isInstanceOf( | |
368 | + | func ca (aZ) = { | |
369 | + | let aK = getString(this, bl(toString(aZ))) | |
370 | + | if ($isInstanceOf(aK, "String")) | |
369 | 371 | then { | |
370 | - | let | |
371 | - | valueOrErrorMessage(parseInt( | |
372 | + | let aL = aK | |
373 | + | valueOrErrorMessage(parseInt(aL), l("invalid user number")) | |
372 | 374 | } | |
373 | - | else if ($isInstanceOf( | |
374 | - | then | |
375 | + | else if ($isInstanceOf(aK, "Unit")) | |
376 | + | then n("invalid user") | |
375 | 377 | else throw("Match error") | |
376 | 378 | } | |
377 | 379 | ||
378 | 380 | ||
379 | - | func | |
381 | + | func cb () = valueOrElse(getInteger(this, bz()), 0) | |
380 | 382 | ||
381 | 383 | ||
382 | - | func | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if ($isInstanceOf( | |
384 | + | func cc (aZ) = { | |
385 | + | let cd = "getLockedGwxAmount" | |
386 | + | let ce = valueOrErrorMessage({ | |
387 | + | let aK = getString(bW, bX) | |
388 | + | if ($isInstanceOf(aK, "Unit")) | |
387 | 389 | then unit | |
388 | - | else if ($isInstanceOf( | |
390 | + | else if ($isInstanceOf(aK, "String")) | |
389 | 391 | then { | |
390 | - | let | |
391 | - | addressFromString( | |
392 | + | let aL = aK | |
393 | + | addressFromString(aL) | |
392 | 394 | } | |
393 | 395 | else throw("Match error") | |
394 | - | }, | |
395 | - | let | |
396 | - | let | |
397 | - | if ($isInstanceOf( | |
398 | - | then | |
399 | - | else throw(($getType( | |
396 | + | }, l("invalid voting emission rate address")) | |
397 | + | let cf = { | |
398 | + | let bZ = invoke(bW, cd, [toString(aZ)], nil) | |
399 | + | if ($isInstanceOf(bZ, "Int")) | |
400 | + | then bZ | |
401 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
400 | 402 | } | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
404 | - | then | |
405 | - | else throw(($getType( | |
403 | + | let cg = { | |
404 | + | let bZ = invoke(ce, cd, [toString(aZ)], nil) | |
405 | + | if ($isInstanceOf(bZ, "Int")) | |
406 | + | then bZ | |
407 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
406 | 408 | } | |
407 | - | let | |
408 | - | | |
409 | + | let ch = max([cf, cg]) | |
410 | + | ch | |
409 | 411 | } | |
410 | 412 | ||
411 | 413 | ||
412 | - | func | |
413 | - | let | |
414 | - | let | |
415 | - | StringEntry( | |
414 | + | func ci (cj,ck,bf,cl,bh,bi,aP) = { | |
415 | + | let cm = makeString(["%s%s%s%s__history", cj, ck, toBase58String(aP.transactionId)], a) | |
416 | + | let cn = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(bf), toString(cl), toString(bh), toString(bi)], a) | |
417 | + | StringEntry(cm, cn) | |
416 | 418 | } | |
417 | 419 | ||
418 | 420 | ||
419 | - | func cn (co,cp,cq,cr) = { | |
420 | - | let cs = bn() | |
421 | + | func co (cp,cq,cr,cs) = { | |
421 | 422 | let ct = bo() | |
422 | 423 | let cu = bp() | |
423 | - | let cv = bm() | |
424 | - | let cw = q(this, cs) | |
425 | - | let cx = q(this, ct) | |
426 | - | let cy = q(this, cu) | |
427 | - | let cz = q(this, cv) | |
428 | - | [IntegerEntry(cs, (cw + cp)), IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cr)), IntegerEntry(cv, (cz + co))] | |
424 | + | let cv = bq() | |
425 | + | let cw = bn() | |
426 | + | let cx = r(this, ct) | |
427 | + | let cy = r(this, cu) | |
428 | + | let cz = r(this, cv) | |
429 | + | let cA = r(this, cw) | |
430 | + | [IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cr)), IntegerEntry(cv, (cz + cs)), IntegerEntry(cw, (cA + cp))] | |
429 | 431 | } | |
430 | 432 | ||
431 | 433 | ||
432 | - | func | |
434 | + | func cB (aZ,ba,bf,bg,bh,bi,bj) = [StringEntry(aY(aZ, ba), be(bf, bg, bh, bi, bj))] | |
433 | 435 | ||
434 | 436 | ||
435 | - | func | |
436 | - | then | |
437 | - | else if ((size( | |
437 | + | func cC (aP,cD) = if ((size(aP.payments) > 1)) | |
438 | + | then n("only one payment is allowed") | |
439 | + | else if ((size(aP.payments) == 0)) | |
438 | 440 | then 0 | |
439 | 441 | else { | |
440 | - | let | |
441 | - | if ((value( | |
442 | - | then | |
443 | - | else | |
442 | + | let cE = aP.payments[0] | |
443 | + | if ((value(cE.assetId) != cD)) | |
444 | + | then n("invalid asset id in payment") | |
445 | + | else cE.amount | |
444 | 446 | } | |
445 | 447 | ||
446 | 448 | ||
447 | - | func | |
449 | + | func cF (aZ) = valueOrElse(getInteger(this, bd(aZ)), 0) | |
448 | 450 | ||
449 | 451 | ||
450 | - | func | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | if ((0 > | |
455 | - | then | |
456 | - | else $Tuple2( | |
452 | + | func cG () = { | |
453 | + | let cH = { | |
454 | + | let cI = value(getInteger(bW, bF())) | |
455 | + | let cJ = (cI - 1) | |
456 | + | if ((0 > cJ)) | |
457 | + | then n("invalid epoch") | |
458 | + | else $Tuple2(cI, cJ) | |
457 | 459 | } | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | $Tuple2( | |
460 | + | let cI = cH._1 | |
461 | + | let cJ = cH._2 | |
462 | + | let cK = value(getInteger(bW, bE(cI))) | |
463 | + | $Tuple2(cJ, cK) | |
462 | 464 | } | |
463 | 465 | ||
464 | 466 | ||
465 | - | func cK (bG) = { | |
466 | - | let cL = 4 | |
467 | - | let cM = 5 | |
468 | - | let cN = { | |
469 | - | let bY = invoke(bP, "getPoolConfigByLpAssetIdREADONLY", [bG], nil) | |
470 | - | if ($isInstanceOf(bY, "List[Any]")) | |
471 | - | then bY | |
472 | - | else throw(($getType(bY) + " couldn't be cast to List[Any]")) | |
473 | - | } | |
474 | - | let bA = { | |
475 | - | let bY = cN[cL] | |
476 | - | if ($isInstanceOf(bY, "String")) | |
477 | - | then bY | |
478 | - | else throw(($getType(bY) + " couldn't be cast to String")) | |
467 | + | func cL (bH) = { | |
468 | + | let cM = 4 | |
469 | + | let cN = 5 | |
470 | + | let cO = { | |
471 | + | let bZ = invoke(bQ, "getPoolConfigByLpAssetIdREADONLY", [bH], nil) | |
472 | + | if ($isInstanceOf(bZ, "List[Any]")) | |
473 | + | then bZ | |
474 | + | else throw(($getType(bZ) + " couldn't be cast to List[Any]")) | |
479 | 475 | } | |
480 | 476 | let bB = { | |
481 | - | let | |
482 | - | if ($isInstanceOf( | |
483 | - | then | |
484 | - | else throw(($getType( | |
477 | + | let bZ = cO[cM] | |
478 | + | if ($isInstanceOf(bZ, "String")) | |
479 | + | then bZ | |
480 | + | else throw(($getType(bZ) + " couldn't be cast to String")) | |
485 | 481 | } | |
486 | - | $Tuple2(bA, bB) | |
482 | + | let bC = { | |
483 | + | let bZ = cO[cN] | |
484 | + | if ($isInstanceOf(bZ, "String")) | |
485 | + | then bZ | |
486 | + | else throw(($getType(bZ) + " couldn't be cast to String")) | |
487 | + | } | |
488 | + | $Tuple2(bB, bC) | |
487 | 489 | } | |
488 | 490 | ||
489 | 491 | ||
490 | - | func | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | | |
492 | + | func cP (bH,bP) = { | |
493 | + | let aZ = addressFromStringValue(bP) | |
494 | + | let cQ = cG() | |
495 | + | let cJ = cQ._1 | |
496 | + | let cK = cQ._2 | |
497 | + | let cR = cL(bH) | |
498 | + | let bB = cR._1 | |
499 | + | let bC = cR._2 | |
500 | + | let cS = bA(bB, bC, aZ, cJ) | |
501 | + | let cT = valueOrElse(getInteger(bW, cS), 0) | |
502 | + | cT | |
501 | 503 | } | |
502 | 504 | ||
503 | 505 | ||
504 | - | func | |
505 | - | let | |
506 | - | let | |
507 | - | if (( | |
506 | + | func cU (bH,bP) = { | |
507 | + | let cV = valueOrElse(getInteger(bS, bO(bP, bH)), 0) | |
508 | + | let cT = cP(bH, bP) | |
509 | + | if ((cV == 0)) | |
508 | 510 | then 0 | |
509 | - | else | |
511 | + | else cT | |
510 | 512 | } | |
511 | 513 | ||
512 | 514 | ||
513 | - | func | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | | |
515 | + | func cW (bH) = { | |
516 | + | let cX = cG() | |
517 | + | let cJ = cX._1 | |
518 | + | let cK = cX._2 | |
519 | + | let cY = valueOrElse(getInteger(bW, bG(bH, cJ)), 0) | |
520 | + | let cZ = valueOrElse(getInteger(this, bG(bH, cJ)), cY) | |
521 | + | cZ | |
520 | 522 | } | |
521 | 523 | ||
522 | 524 | ||
523 | - | func | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | | |
525 | + | func da (bH) = { | |
526 | + | let db = cG() | |
527 | + | let cJ = db._1 | |
528 | + | let cK = db._2 | |
529 | + | let cZ = cW(bH) | |
530 | + | let dc = valueOrElse(getInteger(this, bI(bH, cJ)), 0) | |
531 | + | let dd = valueOrElse(getInteger(this, bJ(bH, cJ)), cK) | |
532 | + | let de = (height - dd) | |
533 | + | let df = ((de * cZ) + dc) | |
534 | + | df | |
533 | 535 | } | |
534 | 536 | ||
535 | 537 | ||
536 | - | func | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | [IntegerEntry( | |
538 | + | func dg (bH,dh) = { | |
539 | + | let di = cG() | |
540 | + | let cJ = di._1 | |
541 | + | let cK = di._2 | |
542 | + | let cZ = cW(bH) | |
543 | + | let dj = (cZ + dh) | |
544 | + | let df = da(bH) | |
545 | + | [IntegerEntry(bG(bH, cJ), dj), IntegerEntry(bJ(bH, cJ), height), IntegerEntry(bI(bH, cJ), df)] | |
544 | 546 | } | |
545 | 547 | ||
546 | 548 | ||
547 | - | func | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | | |
549 | + | func dk (bH,bP) = { | |
550 | + | let dl = cG() | |
551 | + | let cJ = dl._1 | |
552 | + | let cK = dl._2 | |
553 | + | let aZ = addressFromStringValue(bP) | |
554 | + | let dm = cU(bH, bP) | |
555 | + | let dn = valueOrElse(getInteger(this, bL(bH, aZ, cJ)), 0) | |
556 | + | let do = valueOrElse(getInteger(this, bM(bH, aZ, cJ)), cK) | |
557 | + | let dp = (height - do) | |
558 | + | let dq = ((dp * dm) + dn) | |
559 | + | dq | |
558 | 560 | } | |
559 | 561 | ||
560 | 562 | ||
561 | - | func | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
563 | + | func dr (bH,bP,ds) = { | |
564 | + | let dt = cG() | |
565 | + | let cJ = dt._1 | |
566 | + | let cK = dt._2 | |
567 | + | let aZ = addressFromStringValue(bP) | |
568 | + | let du = cP(bH, bP) | |
569 | + | let dv = if ((du == 0)) | |
568 | 570 | then nil | |
569 | 571 | else { | |
570 | - | let | |
571 | - | then | |
572 | - | else -( | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | ( | |
572 | + | let dh = if (ds) | |
573 | + | then du | |
574 | + | else -(du) | |
575 | + | let dw = dg(bH, dh) | |
576 | + | let dq = dk(bH, bP) | |
577 | + | let dx = [IntegerEntry(bM(bH, aZ, cJ), height), IntegerEntry(bL(bH, aZ, cJ), dq)] | |
578 | + | (dw ++ dx) | |
577 | 579 | } | |
578 | - | | |
580 | + | dv | |
579 | 581 | } | |
580 | 582 | ||
581 | 583 | ||
582 | - | func | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | $Tuple3([IntegerEntry( | |
584 | + | func dy (bH,bP) = { | |
585 | + | let dz = cG() | |
586 | + | let cJ = dz._1 | |
587 | + | let cK = dz._2 | |
588 | + | let aZ = addressFromStringValue(bP) | |
589 | + | let dA = bN(bH, aZ, cJ) | |
590 | + | let dB = valueOrElse(getInteger(this, dA), 0) | |
591 | + | let dC = bK(bH, aZ, cJ) | |
592 | + | let dD = valueOrElse(getInteger(this, dC), 0) | |
593 | + | let dq = dk(bH, bP) | |
594 | + | let df = da(bH) | |
595 | + | let dE = (dq - dB) | |
596 | + | let dF = (df - dD) | |
597 | + | $Tuple3([IntegerEntry(dA, dq), IntegerEntry(dC, df)], dE, dF) | |
596 | 598 | } | |
597 | 599 | ||
598 | 600 | ||
599 | - | func dF () = { | |
600 | - | let dG = t(bQ, ai()) | |
601 | - | let dH = getInteger(this, al()) | |
601 | + | func dG () = { | |
602 | + | let dH = u(bR, aj()) | |
602 | 603 | let dI = getInteger(this, am()) | |
603 | - | let dJ = t(bQ, ao()) | |
604 | - | let dK = if ((height > dJ)) | |
605 | - | then dJ | |
604 | + | let dJ = getInteger(this, an()) | |
605 | + | let dK = u(bR, ap()) | |
606 | + | let dL = if ((height > dK)) | |
607 | + | then dK | |
606 | 608 | else height | |
607 | - | let | |
608 | - | let | |
609 | - | if ($isInstanceOf( | |
609 | + | let dM = { | |
610 | + | let aK = dI | |
611 | + | if ($isInstanceOf(aK, "Int")) | |
610 | 612 | then { | |
611 | - | let | |
612 | - | max([( | |
613 | + | let dN = aK | |
614 | + | max([(dL - dN), 0]) | |
613 | 615 | } | |
614 | - | else if ($isInstanceOf( | |
616 | + | else if ($isInstanceOf(aK, "Unit")) | |
615 | 617 | then 0 | |
616 | 618 | else throw("Match error") | |
617 | 619 | } | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | $Tuple2([IntegerEntry( | |
620 | + | let dO = ((dH * (bY - 1)) / bY) | |
621 | + | let dP = valueOrElse(dJ, 0) | |
622 | + | let dQ = ((dO * dM) + dP) | |
623 | + | $Tuple2([IntegerEntry(an(), dQ), IntegerEntry(am(), height)], dQ) | |
622 | 624 | } | |
623 | 625 | ||
624 | 626 | ||
625 | - | func | |
626 | - | let | |
627 | - | let | |
628 | - | if (( | |
627 | + | func dR (bH,bP,dS) = { | |
628 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
629 | + | let bs = ca(aZ) | |
630 | + | if ((bs == bs)) | |
629 | 631 | then { | |
630 | - | let | |
631 | - | let | |
632 | + | let dT = "empty" | |
633 | + | let dU = if ((bH != dT)) | |
632 | 634 | then { | |
633 | - | let | |
634 | - | getIntegerValue( | |
635 | + | let dV = valueOrErrorMessage(getString(bQ, S(bH)), l(("unsupported lp asset " + bH))) | |
636 | + | getIntegerValue(bQ, U(dV)) | |
635 | 637 | } | |
636 | - | else if ( | |
638 | + | else if (dS) | |
637 | 639 | then 0 | |
638 | - | else | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | if ((0 > | |
645 | - | then | |
640 | + | else n(("not readonly mode: unsupported lp asset " + bH)) | |
641 | + | let dW = bt(bs, bH) | |
642 | + | let dX = br(bs) | |
643 | + | let dY = valueOrElse(getInteger(this, dW), r(this, dX)) | |
644 | + | let dQ = dG()._2 | |
645 | + | let dZ = (dQ - dY) | |
646 | + | if ((0 > dZ)) | |
647 | + | then n("wrong calculations") | |
646 | 648 | else { | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
649 | + | let ea = dy(bH, bP) | |
650 | + | let eb = ea._1 | |
651 | + | let ec = ea._2 | |
652 | + | let ed = ea._3 | |
653 | + | let ee = fraction(dZ, dU, d) | |
654 | + | let ef = if ((ed == 0)) | |
653 | 655 | then 0 | |
654 | - | else fraction( | |
655 | - | let | |
656 | - | let | |
657 | - | $Tuple3( | |
656 | + | else fraction(ee, ec, ed) | |
657 | + | let eg = ([IntegerEntry(dW, dQ)] ++ eb) | |
658 | + | let eh = makeString([toString(dY), toString(dZ), toString(dU), toString(ec), toString(ed)], ":") | |
659 | + | $Tuple3(ef, eg, eh) | |
658 | 660 | } | |
659 | 661 | } | |
660 | 662 | else throw("Strict value is not equal to itself.") | |
661 | 663 | } | |
662 | 664 | ||
663 | 665 | ||
664 | - | func eh (aO,ei) = { | |
665 | - | let ej = [1, 3, 6, 12, 24, 48] | |
666 | - | if (!(containsElement(ej, ei))) | |
667 | - | then m("invalid duration") | |
668 | - | else { | |
669 | - | let bg = (ei * j) | |
670 | - | let ek = toBase58String(aA) | |
671 | - | if ((size(aO.payments) != 1)) | |
672 | - | then m("invalid payment - exact one payment must be attached") | |
673 | - | else { | |
674 | - | let cD = aO.payments[0] | |
675 | - | let el = cD.amount | |
676 | - | if ((aA != value(cD.assetId))) | |
677 | - | then m((("invalid asset is in payment - " + ek) + " is expected")) | |
678 | - | else { | |
679 | - | let em = bj() | |
680 | - | let aY = aO.caller | |
681 | - | let bO = toString(aY) | |
682 | - | let en = isDefined(getString(bk(bO))) | |
683 | - | let eo = if (en) | |
684 | - | then value(getString(bk(bO))) | |
685 | - | else toString(t(this, em)) | |
686 | - | let br = parseIntValue(eo) | |
687 | - | let ck = height | |
688 | - | if (if ((aB > el)) | |
689 | - | then (aY != bT) | |
690 | - | else false) | |
691 | - | then m(("amount is less then minLockAmount=" + toString(aB))) | |
692 | - | else if ((aC > bg)) | |
693 | - | then m(("passed duration is less then minLockDuration=" + toString(aC))) | |
694 | - | else if ((bg > aD)) | |
695 | - | then m(("passed duration is greater then maxLockDuration=" + toString(aD))) | |
696 | - | else { | |
697 | - | let ep = fraction(bg, c, aD) | |
698 | - | let eq = fraction(el, ep, c) | |
699 | - | let er = ca() | |
700 | - | let dW = bq(br) | |
701 | - | let dP = dF()._2 | |
702 | - | let es = cE(aY) | |
703 | - | let et = reentrantInvoke(bS, "refreshUserReward", [aY.bytes], nil) | |
704 | - | if ((et == et)) | |
705 | - | then { | |
706 | - | let eu = if (en) | |
707 | - | then nil | |
708 | - | else [IntegerEntry(em, (br + 1)), StringEntry(bk(bO), eo), StringEntry(bl(eo), bO)] | |
709 | - | $Tuple2(((((eu ++ cA(aY, aO.transactionId, el, ck, bg, eq, 0)) ++ cn(el, bg, 1, if (en) | |
710 | - | then 0 | |
711 | - | else 1)) :+ ch("lock", bO, el, ck, bg, eq, aO)) ++ [IntegerEntry(dW, dP), IntegerEntry(by(), (er + eq)), IntegerEntry(bc(aY), (es + eq))]), eq) | |
712 | - | } | |
713 | - | else throw("Strict value is not equal to itself.") | |
714 | - | } | |
715 | - | } | |
716 | - | } | |
717 | - | } | |
666 | + | func ei (aP,ej) = if (!(containsElement(i, ej))) | |
667 | + | then n("invalid duration") | |
668 | + | else { | |
669 | + | let bh = (ej * k) | |
670 | + | let ek = toBase58String(aB) | |
671 | + | if ((size(aP.payments) != 1)) | |
672 | + | then n("invalid payment - exact one payment must be attached") | |
673 | + | else { | |
674 | + | let cE = aP.payments[0] | |
675 | + | let el = cE.amount | |
676 | + | if ((aB != value(cE.assetId))) | |
677 | + | then n((("invalid asset is in payment - " + ek) + " is expected")) | |
678 | + | else { | |
679 | + | let em = bk() | |
680 | + | let aZ = aP.caller | |
681 | + | let bP = toString(aZ) | |
682 | + | let en = isDefined(getString(bl(bP))) | |
683 | + | let eo = if (en) | |
684 | + | then value(getString(bl(bP))) | |
685 | + | else toString(u(this, em)) | |
686 | + | let bs = parseIntValue(eo) | |
687 | + | let cl = height | |
688 | + | if (if ((aC > el)) | |
689 | + | then (aZ != bU) | |
690 | + | else false) | |
691 | + | then n(("amount is less then minLockAmount=" + toString(aC))) | |
692 | + | else if ((aD > bh)) | |
693 | + | then n(("passed duration is less then minLockDuration=" + toString(aD))) | |
694 | + | else if ((bh > aE)) | |
695 | + | then n(("passed duration is greater then maxLockDuration=" + toString(aE))) | |
696 | + | else { | |
697 | + | let ep = fraction(el, bh, aE) | |
698 | + | let eq = cb() | |
699 | + | let dX = br(bs) | |
700 | + | let dQ = dG()._2 | |
701 | + | let er = cF(aZ) | |
702 | + | let es = reentrantInvoke(bT, "refreshUserReward", [aZ.bytes], nil) | |
703 | + | if ((es == es)) | |
704 | + | then { | |
705 | + | let et = if (en) | |
706 | + | then nil | |
707 | + | else [IntegerEntry(em, (bs + 1)), StringEntry(bl(bP), eo), StringEntry(bm(eo), bP)] | |
708 | + | $Tuple2(((((et ++ cB(aZ, aP.transactionId, el, cl, bh, ep, 0)) ++ co(el, bh, 1, if (en) | |
709 | + | then 0 | |
710 | + | else 1)) :+ ci("lock", bP, el, cl, bh, ep, aP)) ++ [IntegerEntry(dX, dQ), IntegerEntry(bz(), (eq + ep)), IntegerEntry(bd(aZ), (er + ep))]), ep) | |
711 | + | } | |
712 | + | else throw("Strict value is not equal to itself.") | |
713 | + | } | |
714 | + | } | |
715 | + | } | |
716 | + | } | |
717 | + | ||
718 | + | ||
719 | + | func eu (aZ,ev) = { | |
720 | + | let ew = bc(aZ, ev) | |
721 | + | let ex = parseIntValue(ew[aS]) | |
722 | + | let cl = parseIntValue(ew[aT]) | |
723 | + | let ey = parseIntValue(ew[aU]) | |
724 | + | let ez = (cl + ey) | |
725 | + | let bj = parseIntValue(ew[aX]) | |
726 | + | let eA = ((height - cl) / aG) | |
727 | + | let eB = fraction(toBigInt(eA), (toBigInt((8 * aG)) * h), toBigInt(ey)) | |
728 | + | let eC = if ((height > ez)) | |
729 | + | then ex | |
730 | + | else (toInt(fraction(toBigInt(ex), (h - pow(toBigInt(5), 1, eB, f, f, DOWN)), h)) - bj) | |
731 | + | eC | |
718 | 732 | } | |
719 | 733 | ||
720 | 734 | ||
721 | - | func ev (aY,ew) = { | |
722 | - | let ex = bb(aY, ew) | |
723 | - | let ey = parseIntValue(ex[aR]) | |
724 | - | let ck = parseIntValue(ex[aS]) | |
725 | - | let ez = parseIntValue(ex[aT]) | |
726 | - | let eA = (ck + ez) | |
727 | - | let bi = parseIntValue(ex[aW]) | |
728 | - | let bh = parseIntValue(ex[aV]) | |
729 | - | let eB = ((height - ck) / aF) | |
730 | - | let eC = fraction(toBigInt(eB), (toBigInt((8 * aF)) * h), toBigInt(ez)) | |
731 | - | let eD = if ((height > eA)) | |
732 | - | then ey | |
733 | - | else (toInt(fraction(toBigInt(ey), (h - pow(toBigInt(5), 1, eC, f, f, DOWN)), h)) - bi) | |
734 | - | eD | |
735 | - | } | |
736 | - | ||
737 | - | ||
738 | - | @Callable(aO) | |
739 | - | func constructor (eE,eF,aB,eG,eH,aE) = { | |
740 | - | let eI = aN(aO) | |
741 | - | if ((eI == eI)) | |
742 | - | then ([IntegerEntry(bj(), 0), StringEntry(ax(), aH(eF, aB, eG, eH, aE)), StringEntry(E(), eE)] ++ cn(0, 0, 0, 0)) | |
735 | + | @Callable(aP) | |
736 | + | func constructor (eD,eE,aC,eF,eG,aF) = { | |
737 | + | let eH = aO(aP) | |
738 | + | if ((eH == eH)) | |
739 | + | then ([IntegerEntry(bk(), 0), StringEntry(ay(), aI(eE, aC, eF, eG, aF)), StringEntry(F(), eD)] ++ co(0, 0, 0, 0)) | |
743 | 740 | else throw("Strict value is not equal to itself.") | |
744 | 741 | } | |
745 | 742 | ||
746 | 743 | ||
747 | 744 | ||
748 | - | @Callable( | |
749 | - | func lockRef ( | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
745 | + | @Callable(aP) | |
746 | + | func lockRef (bh,eI,eJ) = { | |
747 | + | let eK = ei(aP, bh) | |
748 | + | let eL = eK._1 | |
749 | + | let ep = eK._2 | |
750 | + | let eM = toString(aP.caller) | |
751 | + | let eN = if (if ((eI == "")) | |
755 | 752 | then true | |
756 | - | else ( | |
753 | + | else (eJ == base58'')) | |
757 | 754 | then unit | |
758 | - | else invoke( | |
759 | - | if (( | |
755 | + | else invoke(B, "createPair", [E, eI, eM, eJ], nil) | |
756 | + | if ((eN == eN)) | |
760 | 757 | then { | |
761 | - | let | |
762 | - | if (( | |
763 | - | then $Tuple2( | |
758 | + | let eO = invoke(aF, "updateReferralActivity", [toString(aP.caller), ep], nil) | |
759 | + | if ((eO == eO)) | |
760 | + | then $Tuple2(eL, unit) | |
764 | 761 | else throw("Strict value is not equal to itself.") | |
765 | 762 | } | |
766 | 763 | else throw("Strict value is not equal to itself.") | |
768 | 765 | ||
769 | 766 | ||
770 | 767 | ||
771 | - | @Callable( | |
772 | - | func lock ( | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | if (( | |
778 | - | then $Tuple2( | |
768 | + | @Callable(aP) | |
769 | + | func lock (bh) = { | |
770 | + | let eP = ei(aP, bh) | |
771 | + | let eL = eP._1 | |
772 | + | let ep = eP._2 | |
773 | + | let eO = invoke(aF, "updateReferralActivity", [toString(aP.caller), ep], nil) | |
774 | + | if ((eO == eO)) | |
775 | + | then $Tuple2(eL, unit) | |
779 | 776 | else throw("Strict value is not equal to itself.") | |
780 | 777 | } | |
781 | 778 | ||
782 | 779 | ||
783 | 780 | ||
784 | - | @Callable( | |
785 | - | func claimWxBoost ( | |
786 | - | then | |
781 | + | @Callable(aP) | |
782 | + | func claimWxBoost (bH,bP) = if ((bS != aP.caller)) | |
783 | + | then n("permissions denied") | |
787 | 784 | else { | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | $Tuple2( | |
785 | + | let eQ = dR(bH, bP, false) | |
786 | + | let eR = eQ._1 | |
787 | + | let eg = eQ._2 | |
788 | + | let eh = eQ._3 | |
789 | + | $Tuple2(eg, [eR]) | |
793 | 790 | } | |
794 | 791 | ||
795 | 792 | ||
796 | 793 | ||
797 | - | @Callable( | |
798 | - | func claimWxBoostREADONLY ( | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | $Tuple2(nil, [ | |
794 | + | @Callable(aP) | |
795 | + | func claimWxBoostREADONLY (bH,bP) = { | |
796 | + | let eS = dR(bH, bP, true) | |
797 | + | let eR = eS._1 | |
798 | + | let eg = eS._2 | |
799 | + | let eh = eS._3 | |
800 | + | $Tuple2(nil, [eR, eh]) | |
804 | 801 | } | |
805 | 802 | ||
806 | 803 | ||
807 | 804 | ||
808 | - | @Callable( | |
809 | - | func unlock ( | |
810 | - | let | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
805 | + | @Callable(aP) | |
806 | + | func unlock (eT) = { | |
807 | + | let aZ = aP.caller | |
808 | + | let bP = toString(aZ) | |
809 | + | let ba = fromBase58String(eT) | |
810 | + | let ew = bc(aZ, if ((eT == "")) | |
814 | 811 | then unit | |
815 | - | else aZ) | |
816 | - | let ey = parseIntValue(ex[aR]) | |
817 | - | let ck = parseIntValue(ex[aS]) | |
818 | - | let ez = parseIntValue(ex[aT]) | |
819 | - | let eA = (ck + ez) | |
820 | - | let bi = parseIntValue(ex[aW]) | |
821 | - | let bh = parseIntValue(ex[aV]) | |
822 | - | let eB = ((height - ck) / aF) | |
823 | - | let eD = ev(aY, if ((eU == "")) | |
812 | + | else ba) | |
813 | + | let ex = parseIntValue(ew[aS]) | |
814 | + | let cl = parseIntValue(ew[aT]) | |
815 | + | let ey = parseIntValue(ew[aU]) | |
816 | + | let bj = parseIntValue(ew[aX]) | |
817 | + | let bi = parseIntValue(ew[aW]) | |
818 | + | let eA = ((height - cl) / aG) | |
819 | + | let eC = eu(aZ, if ((eT == "")) | |
824 | 820 | then unit | |
825 | - | else aZ) | |
826 | - | let ep = fraction(ez, c, aD) | |
827 | - | let eq = fraction(ey, ep, c) | |
828 | - | let eV = min([fraction((eB * aF), eq, aD), bh]) | |
829 | - | let eW = w((bh - eV), "gwxRemaining") | |
830 | - | let eX = cb(aY) | |
831 | - | if ((0 >= ey)) | |
832 | - | then m("nothing to unlock") | |
821 | + | else ba) | |
822 | + | let ep = fraction(ex, ey, aE) | |
823 | + | let eU = min([fraction((eA * aG), ep, aE), bi]) | |
824 | + | let eV = x((bi - eU), "gwxRemaining") | |
825 | + | let eW = cc(aZ) | |
826 | + | if ((0 >= ex)) | |
827 | + | then n("nothing to unlock") | |
833 | 828 | else { | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | if (( | |
838 | - | then | |
829 | + | let eq = cb() | |
830 | + | let er = cF(aZ) | |
831 | + | let eX = x((er - eU), "userGwxAmountTotalNew") | |
832 | + | if ((eW > eX)) | |
833 | + | then n(("locked gwx amount: " + toString(eW))) | |
839 | 834 | else { | |
840 | - | let | |
841 | - | if (( | |
842 | - | then (((( | |
835 | + | let es = reentrantInvoke(bT, "refreshUserReward", [aZ.bytes], nil) | |
836 | + | if ((es == es)) | |
837 | + | then ((((cB(aZ, ba, ex, cl, ey, eV, (bj + eC)) ++ co(-(eC), 0, 0, 0)) :+ ci("unlock", bP, eC, cl, ey, eU, aP)) :+ ScriptTransfer(aZ, eC, aB)) ++ [IntegerEntry(bz(), x((eq - eU), "gwxTotal")), IntegerEntry(bd(aZ), eX)]) | |
843 | 838 | else throw("Strict value is not equal to itself.") | |
844 | 839 | } | |
845 | 840 | } | |
847 | 842 | ||
848 | 843 | ||
849 | 844 | ||
850 | - | @Callable( | |
851 | - | func gwxUserInfoREADONLY ( | |
852 | - | let | |
853 | - | let | |
854 | - | $Tuple2(nil, [ | |
845 | + | @Callable(aP) | |
846 | + | func gwxUserInfoREADONLY (bP) = { | |
847 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
848 | + | let bi = cF(aZ) | |
849 | + | $Tuple2(nil, [bi]) | |
855 | 850 | } | |
856 | 851 | ||
857 | 852 | ||
858 | 853 | ||
859 | - | @Callable( | |
860 | - | func userMaxDurationREADONLY ( | |
854 | + | @Callable(aP) | |
855 | + | func userMaxDurationREADONLY (bP) = $Tuple2(nil, $Tuple2("increaseLock", aE)) | |
861 | 856 | ||
862 | 857 | ||
863 | 858 | ||
864 | - | @Callable( | |
865 | - | func getUserGwxAmountAtHeightREADONLY ( | |
866 | - | let | |
867 | - | let | |
868 | - | $Tuple2(nil, | |
859 | + | @Callable(aP) | |
860 | + | func getUserGwxAmountAtHeightREADONLY (bP,eY) = { | |
861 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
862 | + | let bi = cF(aZ) | |
863 | + | $Tuple2(nil, bi) | |
869 | 864 | } | |
870 | 865 | ||
871 | 866 | ||
872 | 867 | ||
873 | - | @Callable( | |
874 | - | func getUserGwxAmount ( | |
875 | - | let | |
876 | - | let | |
877 | - | $Tuple2(nil, | |
868 | + | @Callable(aP) | |
869 | + | func getUserGwxAmount (bP) = { | |
870 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
871 | + | let bi = cF(aZ) | |
872 | + | $Tuple2(nil, bi) | |
878 | 873 | } | |
879 | 874 | ||
880 | 875 | ||
881 | 876 | ||
882 | - | @Callable( | |
883 | - | func getGwxTotalREADONLY () = $Tuple2(nil, | |
877 | + | @Callable(aP) | |
878 | + | func getGwxTotalREADONLY () = $Tuple2(nil, cb()) | |
884 | 879 | ||
885 | 880 | ||
886 | 881 | ||
887 | - | @Callable( | |
882 | + | @Callable(aP) | |
888 | 883 | func onBoostEmissionUpdate () = { | |
889 | - | let | |
884 | + | let eH = if ((aP.caller == bR)) | |
890 | 885 | then true | |
891 | - | else | |
892 | - | if (( | |
893 | - | then | |
886 | + | else aO(aP) | |
887 | + | if ((eH == eH)) | |
888 | + | then dG() | |
894 | 889 | else throw("Strict value is not equal to itself.") | |
895 | 890 | } | |
896 | 891 | ||
897 | 892 | ||
898 | 893 | ||
899 | - | @Callable( | |
900 | - | func onStakedVoteUpdate ( | |
901 | - | let | |
894 | + | @Callable(aP) | |
895 | + | func onStakedVoteUpdate (bH,bP,ds) = { | |
896 | + | let eH = if ((aP.caller == bS)) | |
902 | 897 | then true | |
903 | - | else | |
904 | - | if (( | |
898 | + | else aO(aP) | |
899 | + | if ((eH == eH)) | |
905 | 900 | then { | |
906 | - | let | |
907 | - | $Tuple2( | |
901 | + | let dv = dr(bH, bP, ds) | |
902 | + | $Tuple2(dv, unit) | |
908 | 903 | } | |
909 | 904 | else throw("Strict value is not equal to itself.") | |
910 | 905 | } | |
911 | 906 | ||
912 | 907 | ||
913 | 908 | ||
914 | - | @Callable( | |
915 | - | func getVotingResultStakedREADONLY ( | |
909 | + | @Callable(aP) | |
910 | + | func getVotingResultStakedREADONLY (bH) = $Tuple2(nil, cW(bH)) | |
916 | 911 | ||
917 | 912 | ||
918 | 913 | ||
919 | - | @Callable( | |
920 | - | func getVotingResultStakedIntegralREADONLY ( | |
914 | + | @Callable(aP) | |
915 | + | func getVotingResultStakedIntegralREADONLY (bH) = $Tuple2(nil, da(bH)) | |
921 | 916 | ||
922 | 917 | ||
923 | 918 | ||
924 | - | @Callable( | |
925 | - | func getUserVoteFinalizedREADONLY ( | |
919 | + | @Callable(aP) | |
920 | + | func getUserVoteFinalizedREADONLY (bH,bP) = $Tuple2(nil, cP(bH, bP)) | |
926 | 921 | ||
927 | 922 | ||
928 | 923 | ||
929 | - | @Callable( | |
930 | - | func getUserVoteStakedIntegralREADONLY ( | |
924 | + | @Callable(aP) | |
925 | + | func getUserVoteStakedIntegralREADONLY (bH,bP) = $Tuple2(nil, dk(bH, bP)) | |
931 | 926 | ||
932 | 927 | ||
933 | - | @Verifier( | |
934 | - | func | |
935 | - | let | |
936 | - | let | |
937 | - | if ($isInstanceOf( | |
928 | + | @Verifier(eZ) | |
929 | + | func fa () = { | |
930 | + | let fb = { | |
931 | + | let aK = aM() | |
932 | + | if ($isInstanceOf(aK, "ByteVector")) | |
938 | 933 | then { | |
939 | - | let | |
940 | - | | |
934 | + | let aR = aK | |
935 | + | aR | |
941 | 936 | } | |
942 | - | else if ($isInstanceOf( | |
943 | - | then | |
937 | + | else if ($isInstanceOf(aK, "Unit")) | |
938 | + | then eZ.senderPublicKey | |
944 | 939 | else throw("Match error") | |
945 | 940 | } | |
946 | - | sigVerify( | |
941 | + | sigVerify(eZ.bodyBytes, eZ.proofs[0], fb) | |
947 | 942 | } | |
948 | 943 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 8 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = c | |
11 | 11 | ||
12 | 12 | let e = "boosting.ride" | |
13 | 13 | ||
14 | 14 | let f = 18 | |
15 | 15 | ||
16 | 16 | let g = 1000000000000000000 | |
17 | 17 | ||
18 | 18 | let h = toBigInt(g) | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = [1, 3, 6, 12, 24, 48] | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = 1440 | |
23 | 23 | ||
24 | - | func k (l) = makeString([e, ": ", l], "") | |
24 | + | let k = 43800 | |
25 | + | ||
26 | + | func l (m) = makeString([e, ": ", m], "") | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
29 | + | func n (m) = throw(l(m)) | |
28 | 30 | ||
29 | 31 | ||
30 | - | func | |
32 | + | func o (p,q) = valueOrErrorMessage(getString(p, q), l((("mandatory this." + q) + " is not defined"))) | |
31 | 33 | ||
32 | 34 | ||
33 | - | func | |
35 | + | func r (p,q) = valueOrElse(getInteger(p, q), 0) | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
38 | + | func s (p,q,t) = valueOrElse(getInteger(p, q), t) | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func u (p,q) = valueOrErrorMessage(getInteger(p, q), l((("mandatory this." + q) + " is not defined"))) | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
43 | - | then -( | |
44 | - | else | |
44 | + | func v (w) = if ((0 > w)) | |
45 | + | then -(w) | |
46 | + | else w | |
45 | 47 | ||
46 | 48 | ||
47 | - | func | |
48 | - | then | |
49 | - | else | |
49 | + | func x (y,z) = if ((y >= 0)) | |
50 | + | then y | |
51 | + | else n((valueOrElse(z, "value") + " should be positive")) | |
50 | 52 | ||
51 | 53 | ||
52 | - | func | |
54 | + | func A () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
53 | 55 | ||
54 | 56 | ||
55 | - | let | |
57 | + | let B = addressFromStringValue(o(this, A())) | |
56 | 58 | ||
57 | - | let | |
59 | + | let C = makeString(["%s%s", "referral", "programName"], a) | |
58 | 60 | ||
59 | - | let | |
61 | + | let D = "wxlock" | |
60 | 62 | ||
61 | - | let | |
63 | + | let E = valueOrElse(getString(this, C), D) | |
62 | 64 | ||
63 | - | func | |
65 | + | func F () = "%s%s__config__factoryAddress" | |
64 | 66 | ||
65 | 67 | ||
66 | - | let | |
68 | + | let G = 1 | |
67 | 69 | ||
68 | - | let | |
70 | + | let H = 2 | |
69 | 71 | ||
70 | - | let | |
72 | + | let I = 3 | |
71 | 73 | ||
72 | - | let | |
74 | + | let J = 4 | |
73 | 75 | ||
74 | - | let | |
76 | + | let K = 5 | |
75 | 77 | ||
76 | - | let | |
78 | + | let L = 6 | |
77 | 79 | ||
78 | - | let | |
80 | + | let M = 7 | |
79 | 81 | ||
80 | - | let | |
82 | + | let N = 8 | |
81 | 83 | ||
82 | - | let | |
84 | + | let O = 9 | |
83 | 85 | ||
84 | - | let | |
86 | + | let P = 10 | |
85 | 87 | ||
86 | - | let | |
88 | + | let Q = 11 | |
87 | 89 | ||
88 | - | func | |
90 | + | func R () = "%s__factoryConfig" | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
93 | + | func S (T) = makeString(["%s%s%s", T, "mappings__lpAsset2PoolContract"], a) | |
92 | 94 | ||
93 | 95 | ||
94 | - | func | |
96 | + | func U (V) = makeString(["%s%s", "poolWeight", V], a) | |
95 | 97 | ||
96 | 98 | ||
97 | - | func | |
99 | + | func W (X,Y) = ((("%s%s__poolWeight__" + X) + "__") + toString(Y)) | |
98 | 100 | ||
99 | 101 | ||
100 | - | func | |
102 | + | func Z () = addressFromStringValue(o(this, F())) | |
101 | 103 | ||
102 | 104 | ||
103 | - | func | |
105 | + | func aa (ab) = split(o(ab, R()), a) | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
108 | + | func ac (ad) = addressFromStringValue(ad[H]) | |
107 | 109 | ||
108 | 110 | ||
109 | - | func | |
111 | + | func ae (ad) = addressFromStringValue(ad[K]) | |
110 | 112 | ||
111 | 113 | ||
112 | - | func | |
114 | + | func af (ad) = addressFromStringValue(ad[G]) | |
113 | 115 | ||
114 | 116 | ||
115 | - | func | |
117 | + | func ag (ad) = addressFromStringValue(ad[P]) | |
116 | 118 | ||
117 | 119 | ||
118 | - | func | |
120 | + | func ah () = "%s__managerPublicKey" | |
119 | 121 | ||
120 | 122 | ||
121 | - | func | |
123 | + | func ai () = "%s__managerVaultAddress" | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func aj () = "%s%s__ratePerBlock__current" | |
125 | 127 | ||
126 | 128 | ||
127 | - | func | |
129 | + | func ak () = "%s%s__ratePerBlockMax__current" | |
128 | 130 | ||
129 | 131 | ||
130 | - | func | |
132 | + | func al () = "%s%s__emission__startBlock" | |
131 | 133 | ||
132 | 134 | ||
133 | - | func | |
135 | + | func am () = "%s%s__boostingV2__startBlock" | |
134 | 136 | ||
135 | 137 | ||
136 | - | func | |
138 | + | func an () = "%s%s__boostingV2__integral" | |
137 | 139 | ||
138 | 140 | ||
139 | - | func | |
141 | + | func ao () = "%s%s__emission__duration" | |
140 | 142 | ||
141 | 143 | ||
142 | - | func | |
144 | + | func ap () = "%s%s__emission__endBlock" | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func aq () = "%s__nextPeriod" | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
150 | + | func ar () = "%s%s__gwxRewardEmissionPart__startHeight" | |
149 | 151 | ||
150 | 152 | ||
151 | - | let | |
153 | + | let as = 1 | |
152 | 154 | ||
153 | - | let | |
155 | + | let at = 2 | |
154 | 156 | ||
155 | - | let | |
157 | + | let au = 3 | |
156 | 158 | ||
157 | - | let | |
159 | + | let av = 4 | |
158 | 160 | ||
159 | - | let | |
161 | + | let aw = 5 | |
160 | 162 | ||
161 | - | let | |
163 | + | let ax = 6 | |
162 | 164 | ||
163 | - | func | |
165 | + | func ay () = "%s__config" | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func az () = split(o(this, ay()), a) | |
167 | 169 | ||
168 | 170 | ||
169 | - | let | |
171 | + | let aA = az() | |
170 | 172 | ||
171 | - | let | |
173 | + | let aB = fromBase58String(aA[as]) | |
172 | 174 | ||
173 | - | let | |
175 | + | let aC = valueOrErrorMessage(parseInt(aA[at]), l("invalid min lock amount")) | |
174 | 176 | ||
175 | - | let | |
177 | + | let aD = valueOrErrorMessage(parseInt(aA[au]), l("invalid min lock duration")) | |
176 | 178 | ||
177 | - | let | |
179 | + | let aE = valueOrErrorMessage(parseInt(aA[av]), l("invalid max lock duration")) | |
178 | 180 | ||
179 | - | let | |
181 | + | let aF = valueOrErrorMessage(addressFromString(aA[aw]), l("invalid math contract address")) | |
180 | 182 | ||
181 | - | let | |
183 | + | let aG = valueOrErrorMessage(parseInt(aA[ax]), l("invalid blocks in period")) | |
182 | 184 | ||
183 | - | func | |
185 | + | func aH (aB,aC,aD,aE,aF) = makeString(["%s%d%d%d%s", aB, aC, aD, aE, aF], a) | |
184 | 186 | ||
185 | 187 | ||
186 | - | func | |
188 | + | func aI (aB,aC,aD,aE,aF) = aH(aB, toString(aC), toString(aD), toString(aE), aF) | |
187 | 189 | ||
188 | 190 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ($isInstanceOf( | |
191 | + | func aJ () = { | |
192 | + | let aK = getString(ai()) | |
193 | + | if ($isInstanceOf(aK, "String")) | |
192 | 194 | then { | |
193 | - | let | |
194 | - | addressFromStringValue( | |
195 | + | let aL = aK | |
196 | + | addressFromStringValue(aL) | |
195 | 197 | } | |
196 | 198 | else this | |
197 | 199 | } | |
198 | 200 | ||
199 | 201 | ||
200 | - | func | |
201 | - | let | |
202 | - | let | |
203 | - | if ($isInstanceOf( | |
202 | + | func aM () = { | |
203 | + | let aN = aJ() | |
204 | + | let aK = getString(aN, ah()) | |
205 | + | if ($isInstanceOf(aK, "String")) | |
204 | 206 | then { | |
205 | - | let | |
206 | - | fromBase58String( | |
207 | + | let aL = aK | |
208 | + | fromBase58String(aL) | |
207 | 209 | } | |
208 | - | else if ($isInstanceOf( | |
210 | + | else if ($isInstanceOf(aK, "Unit")) | |
209 | 211 | then unit | |
210 | 212 | else throw("Match error") | |
211 | 213 | } | |
212 | 214 | ||
213 | 215 | ||
214 | - | func | |
215 | - | let | |
216 | - | let | |
217 | - | if ($isInstanceOf( | |
216 | + | func aO (aP) = { | |
217 | + | let aQ = n("Permission denied") | |
218 | + | let aK = aM() | |
219 | + | if ($isInstanceOf(aK, "ByteVector")) | |
218 | 220 | then { | |
219 | - | let | |
220 | - | if (( | |
221 | + | let aR = aK | |
222 | + | if ((aP.callerPublicKey == aR)) | |
221 | 223 | then true | |
222 | - | else | |
224 | + | else aQ | |
223 | 225 | } | |
224 | - | else if ($isInstanceOf( | |
225 | - | then if (( | |
226 | + | else if ($isInstanceOf(aK, "Unit")) | |
227 | + | then if ((aP.caller == this)) | |
226 | 228 | then true | |
227 | - | else | |
229 | + | else aQ | |
228 | 230 | else throw("Match error") | |
229 | 231 | } | |
230 | 232 | ||
231 | 233 | ||
232 | - | let | |
234 | + | let aS = 1 | |
233 | 235 | ||
234 | - | let | |
236 | + | let aT = 2 | |
235 | 237 | ||
236 | - | let | |
238 | + | let aU = 3 | |
237 | 239 | ||
238 | - | let | |
240 | + | let aV = 4 | |
239 | 241 | ||
240 | - | let | |
242 | + | let aW = 5 | |
241 | 243 | ||
242 | - | let | |
244 | + | let aX = 6 | |
243 | 245 | ||
244 | - | func | |
245 | - | let | |
246 | - | if ($isInstanceOf( | |
246 | + | func aY (aZ,ba) = makeString(["%s%s%s__lock", toString(aZ), { | |
247 | + | let aK = ba | |
248 | + | if ($isInstanceOf(aK, "ByteVector")) | |
247 | 249 | then { | |
248 | - | let | |
249 | - | toBase58String( | |
250 | + | let bb = aK | |
251 | + | toBase58String(bb) | |
250 | 252 | } | |
251 | - | else if ($isInstanceOf( | |
253 | + | else if ($isInstanceOf(aK, "Unit")) | |
252 | 254 | then "legacy" | |
253 | 255 | else throw("Match error") | |
254 | 256 | }], a) | |
255 | 257 | ||
256 | 258 | ||
257 | - | func | |
259 | + | func bc (aZ,ba) = split(o(this, aY(aZ, ba)), a) | |
258 | 260 | ||
259 | 261 | ||
260 | - | func | |
262 | + | func bd (aZ) = makeString(["%s%s__gwxAmountTotal", toString(aZ)], a) | |
261 | 263 | ||
262 | 264 | ||
263 | - | func | |
265 | + | func be (bf,bg,bh,bi,bj) = makeString(["%d%d%d%d%d%d%d", toString(bf), toString(bg), toString(bh), toString(lastBlock.timestamp), toString(bi), toString(bj)], a) | |
264 | 266 | ||
265 | 267 | ||
266 | - | func | |
268 | + | func bk () = "%s__nextUserNum" | |
267 | 269 | ||
268 | 270 | ||
269 | - | func | |
271 | + | func bl (aZ) = makeString(["%s%s%s__mapping__user2num", aZ], a) | |
270 | 272 | ||
271 | 273 | ||
272 | - | func | |
274 | + | func bm (Y) = makeString(["%s%s%s__mapping__num2user", Y], a) | |
273 | 275 | ||
274 | 276 | ||
275 | - | func | |
277 | + | func bn () = "%s%s__stats__activeTotalLocked" | |
276 | 278 | ||
277 | 279 | ||
278 | - | func | |
280 | + | func bo () = "%s%s__stats__locksDurationSumInBlocks" | |
279 | 281 | ||
280 | 282 | ||
281 | - | func | |
283 | + | func bp () = "%s%s__stats__locksCount" | |
282 | 284 | ||
283 | 285 | ||
284 | - | func | |
286 | + | func bq () = "%s%s__stats__activeUsersCount" | |
285 | 287 | ||
286 | 288 | ||
287 | - | func | |
289 | + | func br (bs) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(bs)], a) | |
288 | 290 | ||
289 | 291 | ||
290 | - | func | |
292 | + | func bt (bs,bu) = makeString(["%s%d__userBoostEmissionLastIntV2", toString(bs), bu], a) | |
291 | 293 | ||
292 | 294 | ||
293 | - | func | |
295 | + | func bv (bs) = makeString(["%s%d__maxBoostInt", toString(bs)], a) | |
294 | 296 | ||
295 | 297 | ||
296 | - | func | |
298 | + | func bw () = "%s%s__maxBoostInt__total" | |
297 | 299 | ||
298 | 300 | ||
299 | - | func | |
301 | + | func bx (bs) = makeString(["%s%d__userBoostAvaliableToClaimTotal", toString(bs)], a) | |
300 | 302 | ||
301 | 303 | ||
302 | - | func | |
304 | + | func by (bs) = makeString(["%s%d__userBoostClaimed", toString(bs)], a) | |
303 | 305 | ||
304 | 306 | ||
305 | - | func | |
307 | + | func bz () = "%s%s__gwx__total" | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
310 | + | func bA (bB,bC,p,bD) = makeString(["%s%s%s%s%d", "vote", bB, bC, toString(p), toString(bD)], a) | |
309 | 311 | ||
310 | 312 | ||
311 | - | func | |
313 | + | func bE (bD) = makeString(["%s%d", "startHeight", toString(bD)], a) | |
312 | 314 | ||
313 | 315 | ||
314 | - | func | |
316 | + | func bF () = makeString(["%s", "currentEpochUi"], a) | |
315 | 317 | ||
316 | 318 | ||
317 | - | func | |
319 | + | func bG (bH,bD) = makeString(["%s%s%d", "votingResultStaked", bH, toString(bD)], a) | |
318 | 320 | ||
319 | 321 | ||
320 | - | func | |
322 | + | func bI (bH,bD) = makeString(["%s%s%d", "votingResultStakedIntegral", bH, toString(bD)], a) | |
321 | 323 | ||
322 | 324 | ||
323 | - | func | |
325 | + | func bJ (bH,bD) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", bH, toString(bD)], a) | |
324 | 326 | ||
325 | 327 | ||
326 | - | func | |
328 | + | func bK (bH,p,bD) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", bH, toString(p), toString(bD)], a) | |
327 | 329 | ||
328 | 330 | ||
329 | - | func | |
331 | + | func bL (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegral", bH, toString(p), toString(bD)], a) | |
330 | 332 | ||
331 | 333 | ||
332 | - | func | |
334 | + | func bM (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", bH, toString(p), toString(bD)], a) | |
333 | 335 | ||
334 | 336 | ||
335 | - | func | |
337 | + | func bN (bH,p,bD) = makeString(["%s%s%s%d", "voteStakedIntegralLast", bH, toString(p), toString(bD)], a) | |
336 | 338 | ||
337 | 339 | ||
338 | - | func | |
340 | + | func bO (bP,bH) = makeString(["%s%s%s", "staked", bP, bH], a) | |
339 | 341 | ||
340 | 342 | ||
341 | - | let | |
343 | + | let bQ = Z() | |
342 | 344 | ||
343 | - | let | |
345 | + | let ad = aa(bQ) | |
344 | 346 | ||
345 | - | let | |
347 | + | let bR = ae(ad) | |
346 | 348 | ||
347 | - | let | |
349 | + | let bS = af(ad) | |
348 | 350 | ||
349 | - | let | |
351 | + | let bT = ag(ad) | |
350 | 352 | ||
351 | - | let | |
353 | + | let bU = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), l("lp_staking_pools contract address is undefined"))), l("invalid lp_staking_pools contract address")) | |
352 | 354 | ||
353 | - | let | |
355 | + | let bV = makeString(["%s", "votingEmissionContract"], a) | |
354 | 356 | ||
355 | - | let | |
357 | + | let bW = addressFromStringValue(getStringValue(bQ, bV)) | |
356 | 358 | ||
357 | - | let | |
359 | + | let bX = makeString(["%s", "votingEmissionRateContract"], a) | |
358 | 360 | ||
359 | - | let | |
360 | - | let | |
361 | - | if ($isInstanceOf( | |
362 | - | then | |
363 | - | else throw(($getType( | |
361 | + | let bY = { | |
362 | + | let bZ = invoke(bR, "getBoostCoeffREADONLY", nil, nil) | |
363 | + | if ($isInstanceOf(bZ, "Int")) | |
364 | + | then bZ | |
365 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
364 | 366 | } | |
365 | 367 | ||
366 | - | func | |
367 | - | let | |
368 | - | if ($isInstanceOf( | |
368 | + | func ca (aZ) = { | |
369 | + | let aK = getString(this, bl(toString(aZ))) | |
370 | + | if ($isInstanceOf(aK, "String")) | |
369 | 371 | then { | |
370 | - | let | |
371 | - | valueOrErrorMessage(parseInt( | |
372 | + | let aL = aK | |
373 | + | valueOrErrorMessage(parseInt(aL), l("invalid user number")) | |
372 | 374 | } | |
373 | - | else if ($isInstanceOf( | |
374 | - | then | |
375 | + | else if ($isInstanceOf(aK, "Unit")) | |
376 | + | then n("invalid user") | |
375 | 377 | else throw("Match error") | |
376 | 378 | } | |
377 | 379 | ||
378 | 380 | ||
379 | - | func | |
381 | + | func cb () = valueOrElse(getInteger(this, bz()), 0) | |
380 | 382 | ||
381 | 383 | ||
382 | - | func | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if ($isInstanceOf( | |
384 | + | func cc (aZ) = { | |
385 | + | let cd = "getLockedGwxAmount" | |
386 | + | let ce = valueOrErrorMessage({ | |
387 | + | let aK = getString(bW, bX) | |
388 | + | if ($isInstanceOf(aK, "Unit")) | |
387 | 389 | then unit | |
388 | - | else if ($isInstanceOf( | |
390 | + | else if ($isInstanceOf(aK, "String")) | |
389 | 391 | then { | |
390 | - | let | |
391 | - | addressFromString( | |
392 | + | let aL = aK | |
393 | + | addressFromString(aL) | |
392 | 394 | } | |
393 | 395 | else throw("Match error") | |
394 | - | }, | |
395 | - | let | |
396 | - | let | |
397 | - | if ($isInstanceOf( | |
398 | - | then | |
399 | - | else throw(($getType( | |
396 | + | }, l("invalid voting emission rate address")) | |
397 | + | let cf = { | |
398 | + | let bZ = invoke(bW, cd, [toString(aZ)], nil) | |
399 | + | if ($isInstanceOf(bZ, "Int")) | |
400 | + | then bZ | |
401 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
400 | 402 | } | |
401 | - | let | |
402 | - | let | |
403 | - | if ($isInstanceOf( | |
404 | - | then | |
405 | - | else throw(($getType( | |
403 | + | let cg = { | |
404 | + | let bZ = invoke(ce, cd, [toString(aZ)], nil) | |
405 | + | if ($isInstanceOf(bZ, "Int")) | |
406 | + | then bZ | |
407 | + | else throw(($getType(bZ) + " couldn't be cast to Int")) | |
406 | 408 | } | |
407 | - | let | |
408 | - | | |
409 | + | let ch = max([cf, cg]) | |
410 | + | ch | |
409 | 411 | } | |
410 | 412 | ||
411 | 413 | ||
412 | - | func | |
413 | - | let | |
414 | - | let | |
415 | - | StringEntry( | |
414 | + | func ci (cj,ck,bf,cl,bh,bi,aP) = { | |
415 | + | let cm = makeString(["%s%s%s%s__history", cj, ck, toBase58String(aP.transactionId)], a) | |
416 | + | let cn = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(bf), toString(cl), toString(bh), toString(bi)], a) | |
417 | + | StringEntry(cm, cn) | |
416 | 418 | } | |
417 | 419 | ||
418 | 420 | ||
419 | - | func cn (co,cp,cq,cr) = { | |
420 | - | let cs = bn() | |
421 | + | func co (cp,cq,cr,cs) = { | |
421 | 422 | let ct = bo() | |
422 | 423 | let cu = bp() | |
423 | - | let cv = bm() | |
424 | - | let cw = q(this, cs) | |
425 | - | let cx = q(this, ct) | |
426 | - | let cy = q(this, cu) | |
427 | - | let cz = q(this, cv) | |
428 | - | [IntegerEntry(cs, (cw + cp)), IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cr)), IntegerEntry(cv, (cz + co))] | |
424 | + | let cv = bq() | |
425 | + | let cw = bn() | |
426 | + | let cx = r(this, ct) | |
427 | + | let cy = r(this, cu) | |
428 | + | let cz = r(this, cv) | |
429 | + | let cA = r(this, cw) | |
430 | + | [IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cr)), IntegerEntry(cv, (cz + cs)), IntegerEntry(cw, (cA + cp))] | |
429 | 431 | } | |
430 | 432 | ||
431 | 433 | ||
432 | - | func | |
434 | + | func cB (aZ,ba,bf,bg,bh,bi,bj) = [StringEntry(aY(aZ, ba), be(bf, bg, bh, bi, bj))] | |
433 | 435 | ||
434 | 436 | ||
435 | - | func | |
436 | - | then | |
437 | - | else if ((size( | |
437 | + | func cC (aP,cD) = if ((size(aP.payments) > 1)) | |
438 | + | then n("only one payment is allowed") | |
439 | + | else if ((size(aP.payments) == 0)) | |
438 | 440 | then 0 | |
439 | 441 | else { | |
440 | - | let | |
441 | - | if ((value( | |
442 | - | then | |
443 | - | else | |
442 | + | let cE = aP.payments[0] | |
443 | + | if ((value(cE.assetId) != cD)) | |
444 | + | then n("invalid asset id in payment") | |
445 | + | else cE.amount | |
444 | 446 | } | |
445 | 447 | ||
446 | 448 | ||
447 | - | func | |
449 | + | func cF (aZ) = valueOrElse(getInteger(this, bd(aZ)), 0) | |
448 | 450 | ||
449 | 451 | ||
450 | - | func | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | if ((0 > | |
455 | - | then | |
456 | - | else $Tuple2( | |
452 | + | func cG () = { | |
453 | + | let cH = { | |
454 | + | let cI = value(getInteger(bW, bF())) | |
455 | + | let cJ = (cI - 1) | |
456 | + | if ((0 > cJ)) | |
457 | + | then n("invalid epoch") | |
458 | + | else $Tuple2(cI, cJ) | |
457 | 459 | } | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | $Tuple2( | |
460 | + | let cI = cH._1 | |
461 | + | let cJ = cH._2 | |
462 | + | let cK = value(getInteger(bW, bE(cI))) | |
463 | + | $Tuple2(cJ, cK) | |
462 | 464 | } | |
463 | 465 | ||
464 | 466 | ||
465 | - | func cK (bG) = { | |
466 | - | let cL = 4 | |
467 | - | let cM = 5 | |
468 | - | let cN = { | |
469 | - | let bY = invoke(bP, "getPoolConfigByLpAssetIdREADONLY", [bG], nil) | |
470 | - | if ($isInstanceOf(bY, "List[Any]")) | |
471 | - | then bY | |
472 | - | else throw(($getType(bY) + " couldn't be cast to List[Any]")) | |
473 | - | } | |
474 | - | let bA = { | |
475 | - | let bY = cN[cL] | |
476 | - | if ($isInstanceOf(bY, "String")) | |
477 | - | then bY | |
478 | - | else throw(($getType(bY) + " couldn't be cast to String")) | |
467 | + | func cL (bH) = { | |
468 | + | let cM = 4 | |
469 | + | let cN = 5 | |
470 | + | let cO = { | |
471 | + | let bZ = invoke(bQ, "getPoolConfigByLpAssetIdREADONLY", [bH], nil) | |
472 | + | if ($isInstanceOf(bZ, "List[Any]")) | |
473 | + | then bZ | |
474 | + | else throw(($getType(bZ) + " couldn't be cast to List[Any]")) | |
479 | 475 | } | |
480 | 476 | let bB = { | |
481 | - | let | |
482 | - | if ($isInstanceOf( | |
483 | - | then | |
484 | - | else throw(($getType( | |
477 | + | let bZ = cO[cM] | |
478 | + | if ($isInstanceOf(bZ, "String")) | |
479 | + | then bZ | |
480 | + | else throw(($getType(bZ) + " couldn't be cast to String")) | |
485 | 481 | } | |
486 | - | $Tuple2(bA, bB) | |
482 | + | let bC = { | |
483 | + | let bZ = cO[cN] | |
484 | + | if ($isInstanceOf(bZ, "String")) | |
485 | + | then bZ | |
486 | + | else throw(($getType(bZ) + " couldn't be cast to String")) | |
487 | + | } | |
488 | + | $Tuple2(bB, bC) | |
487 | 489 | } | |
488 | 490 | ||
489 | 491 | ||
490 | - | func | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | | |
492 | + | func cP (bH,bP) = { | |
493 | + | let aZ = addressFromStringValue(bP) | |
494 | + | let cQ = cG() | |
495 | + | let cJ = cQ._1 | |
496 | + | let cK = cQ._2 | |
497 | + | let cR = cL(bH) | |
498 | + | let bB = cR._1 | |
499 | + | let bC = cR._2 | |
500 | + | let cS = bA(bB, bC, aZ, cJ) | |
501 | + | let cT = valueOrElse(getInteger(bW, cS), 0) | |
502 | + | cT | |
501 | 503 | } | |
502 | 504 | ||
503 | 505 | ||
504 | - | func | |
505 | - | let | |
506 | - | let | |
507 | - | if (( | |
506 | + | func cU (bH,bP) = { | |
507 | + | let cV = valueOrElse(getInteger(bS, bO(bP, bH)), 0) | |
508 | + | let cT = cP(bH, bP) | |
509 | + | if ((cV == 0)) | |
508 | 510 | then 0 | |
509 | - | else | |
511 | + | else cT | |
510 | 512 | } | |
511 | 513 | ||
512 | 514 | ||
513 | - | func | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | | |
515 | + | func cW (bH) = { | |
516 | + | let cX = cG() | |
517 | + | let cJ = cX._1 | |
518 | + | let cK = cX._2 | |
519 | + | let cY = valueOrElse(getInteger(bW, bG(bH, cJ)), 0) | |
520 | + | let cZ = valueOrElse(getInteger(this, bG(bH, cJ)), cY) | |
521 | + | cZ | |
520 | 522 | } | |
521 | 523 | ||
522 | 524 | ||
523 | - | func | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | | |
525 | + | func da (bH) = { | |
526 | + | let db = cG() | |
527 | + | let cJ = db._1 | |
528 | + | let cK = db._2 | |
529 | + | let cZ = cW(bH) | |
530 | + | let dc = valueOrElse(getInteger(this, bI(bH, cJ)), 0) | |
531 | + | let dd = valueOrElse(getInteger(this, bJ(bH, cJ)), cK) | |
532 | + | let de = (height - dd) | |
533 | + | let df = ((de * cZ) + dc) | |
534 | + | df | |
533 | 535 | } | |
534 | 536 | ||
535 | 537 | ||
536 | - | func | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | [IntegerEntry( | |
538 | + | func dg (bH,dh) = { | |
539 | + | let di = cG() | |
540 | + | let cJ = di._1 | |
541 | + | let cK = di._2 | |
542 | + | let cZ = cW(bH) | |
543 | + | let dj = (cZ + dh) | |
544 | + | let df = da(bH) | |
545 | + | [IntegerEntry(bG(bH, cJ), dj), IntegerEntry(bJ(bH, cJ), height), IntegerEntry(bI(bH, cJ), df)] | |
544 | 546 | } | |
545 | 547 | ||
546 | 548 | ||
547 | - | func | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | | |
549 | + | func dk (bH,bP) = { | |
550 | + | let dl = cG() | |
551 | + | let cJ = dl._1 | |
552 | + | let cK = dl._2 | |
553 | + | let aZ = addressFromStringValue(bP) | |
554 | + | let dm = cU(bH, bP) | |
555 | + | let dn = valueOrElse(getInteger(this, bL(bH, aZ, cJ)), 0) | |
556 | + | let do = valueOrElse(getInteger(this, bM(bH, aZ, cJ)), cK) | |
557 | + | let dp = (height - do) | |
558 | + | let dq = ((dp * dm) + dn) | |
559 | + | dq | |
558 | 560 | } | |
559 | 561 | ||
560 | 562 | ||
561 | - | func | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
563 | + | func dr (bH,bP,ds) = { | |
564 | + | let dt = cG() | |
565 | + | let cJ = dt._1 | |
566 | + | let cK = dt._2 | |
567 | + | let aZ = addressFromStringValue(bP) | |
568 | + | let du = cP(bH, bP) | |
569 | + | let dv = if ((du == 0)) | |
568 | 570 | then nil | |
569 | 571 | else { | |
570 | - | let | |
571 | - | then | |
572 | - | else -( | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | ( | |
572 | + | let dh = if (ds) | |
573 | + | then du | |
574 | + | else -(du) | |
575 | + | let dw = dg(bH, dh) | |
576 | + | let dq = dk(bH, bP) | |
577 | + | let dx = [IntegerEntry(bM(bH, aZ, cJ), height), IntegerEntry(bL(bH, aZ, cJ), dq)] | |
578 | + | (dw ++ dx) | |
577 | 579 | } | |
578 | - | | |
580 | + | dv | |
579 | 581 | } | |
580 | 582 | ||
581 | 583 | ||
582 | - | func | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | $Tuple3([IntegerEntry( | |
584 | + | func dy (bH,bP) = { | |
585 | + | let dz = cG() | |
586 | + | let cJ = dz._1 | |
587 | + | let cK = dz._2 | |
588 | + | let aZ = addressFromStringValue(bP) | |
589 | + | let dA = bN(bH, aZ, cJ) | |
590 | + | let dB = valueOrElse(getInteger(this, dA), 0) | |
591 | + | let dC = bK(bH, aZ, cJ) | |
592 | + | let dD = valueOrElse(getInteger(this, dC), 0) | |
593 | + | let dq = dk(bH, bP) | |
594 | + | let df = da(bH) | |
595 | + | let dE = (dq - dB) | |
596 | + | let dF = (df - dD) | |
597 | + | $Tuple3([IntegerEntry(dA, dq), IntegerEntry(dC, df)], dE, dF) | |
596 | 598 | } | |
597 | 599 | ||
598 | 600 | ||
599 | - | func dF () = { | |
600 | - | let dG = t(bQ, ai()) | |
601 | - | let dH = getInteger(this, al()) | |
601 | + | func dG () = { | |
602 | + | let dH = u(bR, aj()) | |
602 | 603 | let dI = getInteger(this, am()) | |
603 | - | let dJ = t(bQ, ao()) | |
604 | - | let dK = if ((height > dJ)) | |
605 | - | then dJ | |
604 | + | let dJ = getInteger(this, an()) | |
605 | + | let dK = u(bR, ap()) | |
606 | + | let dL = if ((height > dK)) | |
607 | + | then dK | |
606 | 608 | else height | |
607 | - | let | |
608 | - | let | |
609 | - | if ($isInstanceOf( | |
609 | + | let dM = { | |
610 | + | let aK = dI | |
611 | + | if ($isInstanceOf(aK, "Int")) | |
610 | 612 | then { | |
611 | - | let | |
612 | - | max([( | |
613 | + | let dN = aK | |
614 | + | max([(dL - dN), 0]) | |
613 | 615 | } | |
614 | - | else if ($isInstanceOf( | |
616 | + | else if ($isInstanceOf(aK, "Unit")) | |
615 | 617 | then 0 | |
616 | 618 | else throw("Match error") | |
617 | 619 | } | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | $Tuple2([IntegerEntry( | |
620 | + | let dO = ((dH * (bY - 1)) / bY) | |
621 | + | let dP = valueOrElse(dJ, 0) | |
622 | + | let dQ = ((dO * dM) + dP) | |
623 | + | $Tuple2([IntegerEntry(an(), dQ), IntegerEntry(am(), height)], dQ) | |
622 | 624 | } | |
623 | 625 | ||
624 | 626 | ||
625 | - | func | |
626 | - | let | |
627 | - | let | |
628 | - | if (( | |
627 | + | func dR (bH,bP,dS) = { | |
628 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
629 | + | let bs = ca(aZ) | |
630 | + | if ((bs == bs)) | |
629 | 631 | then { | |
630 | - | let | |
631 | - | let | |
632 | + | let dT = "empty" | |
633 | + | let dU = if ((bH != dT)) | |
632 | 634 | then { | |
633 | - | let | |
634 | - | getIntegerValue( | |
635 | + | let dV = valueOrErrorMessage(getString(bQ, S(bH)), l(("unsupported lp asset " + bH))) | |
636 | + | getIntegerValue(bQ, U(dV)) | |
635 | 637 | } | |
636 | - | else if ( | |
638 | + | else if (dS) | |
637 | 639 | then 0 | |
638 | - | else | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | if ((0 > | |
645 | - | then | |
640 | + | else n(("not readonly mode: unsupported lp asset " + bH)) | |
641 | + | let dW = bt(bs, bH) | |
642 | + | let dX = br(bs) | |
643 | + | let dY = valueOrElse(getInteger(this, dW), r(this, dX)) | |
644 | + | let dQ = dG()._2 | |
645 | + | let dZ = (dQ - dY) | |
646 | + | if ((0 > dZ)) | |
647 | + | then n("wrong calculations") | |
646 | 648 | else { | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
649 | + | let ea = dy(bH, bP) | |
650 | + | let eb = ea._1 | |
651 | + | let ec = ea._2 | |
652 | + | let ed = ea._3 | |
653 | + | let ee = fraction(dZ, dU, d) | |
654 | + | let ef = if ((ed == 0)) | |
653 | 655 | then 0 | |
654 | - | else fraction( | |
655 | - | let | |
656 | - | let | |
657 | - | $Tuple3( | |
656 | + | else fraction(ee, ec, ed) | |
657 | + | let eg = ([IntegerEntry(dW, dQ)] ++ eb) | |
658 | + | let eh = makeString([toString(dY), toString(dZ), toString(dU), toString(ec), toString(ed)], ":") | |
659 | + | $Tuple3(ef, eg, eh) | |
658 | 660 | } | |
659 | 661 | } | |
660 | 662 | else throw("Strict value is not equal to itself.") | |
661 | 663 | } | |
662 | 664 | ||
663 | 665 | ||
664 | - | func eh (aO,ei) = { | |
665 | - | let ej = [1, 3, 6, 12, 24, 48] | |
666 | - | if (!(containsElement(ej, ei))) | |
667 | - | then m("invalid duration") | |
668 | - | else { | |
669 | - | let bg = (ei * j) | |
670 | - | let ek = toBase58String(aA) | |
671 | - | if ((size(aO.payments) != 1)) | |
672 | - | then m("invalid payment - exact one payment must be attached") | |
673 | - | else { | |
674 | - | let cD = aO.payments[0] | |
675 | - | let el = cD.amount | |
676 | - | if ((aA != value(cD.assetId))) | |
677 | - | then m((("invalid asset is in payment - " + ek) + " is expected")) | |
678 | - | else { | |
679 | - | let em = bj() | |
680 | - | let aY = aO.caller | |
681 | - | let bO = toString(aY) | |
682 | - | let en = isDefined(getString(bk(bO))) | |
683 | - | let eo = if (en) | |
684 | - | then value(getString(bk(bO))) | |
685 | - | else toString(t(this, em)) | |
686 | - | let br = parseIntValue(eo) | |
687 | - | let ck = height | |
688 | - | if (if ((aB > el)) | |
689 | - | then (aY != bT) | |
690 | - | else false) | |
691 | - | then m(("amount is less then minLockAmount=" + toString(aB))) | |
692 | - | else if ((aC > bg)) | |
693 | - | then m(("passed duration is less then minLockDuration=" + toString(aC))) | |
694 | - | else if ((bg > aD)) | |
695 | - | then m(("passed duration is greater then maxLockDuration=" + toString(aD))) | |
696 | - | else { | |
697 | - | let ep = fraction(bg, c, aD) | |
698 | - | let eq = fraction(el, ep, c) | |
699 | - | let er = ca() | |
700 | - | let dW = bq(br) | |
701 | - | let dP = dF()._2 | |
702 | - | let es = cE(aY) | |
703 | - | let et = reentrantInvoke(bS, "refreshUserReward", [aY.bytes], nil) | |
704 | - | if ((et == et)) | |
705 | - | then { | |
706 | - | let eu = if (en) | |
707 | - | then nil | |
708 | - | else [IntegerEntry(em, (br + 1)), StringEntry(bk(bO), eo), StringEntry(bl(eo), bO)] | |
709 | - | $Tuple2(((((eu ++ cA(aY, aO.transactionId, el, ck, bg, eq, 0)) ++ cn(el, bg, 1, if (en) | |
710 | - | then 0 | |
711 | - | else 1)) :+ ch("lock", bO, el, ck, bg, eq, aO)) ++ [IntegerEntry(dW, dP), IntegerEntry(by(), (er + eq)), IntegerEntry(bc(aY), (es + eq))]), eq) | |
712 | - | } | |
713 | - | else throw("Strict value is not equal to itself.") | |
714 | - | } | |
715 | - | } | |
716 | - | } | |
717 | - | } | |
666 | + | func ei (aP,ej) = if (!(containsElement(i, ej))) | |
667 | + | then n("invalid duration") | |
668 | + | else { | |
669 | + | let bh = (ej * k) | |
670 | + | let ek = toBase58String(aB) | |
671 | + | if ((size(aP.payments) != 1)) | |
672 | + | then n("invalid payment - exact one payment must be attached") | |
673 | + | else { | |
674 | + | let cE = aP.payments[0] | |
675 | + | let el = cE.amount | |
676 | + | if ((aB != value(cE.assetId))) | |
677 | + | then n((("invalid asset is in payment - " + ek) + " is expected")) | |
678 | + | else { | |
679 | + | let em = bk() | |
680 | + | let aZ = aP.caller | |
681 | + | let bP = toString(aZ) | |
682 | + | let en = isDefined(getString(bl(bP))) | |
683 | + | let eo = if (en) | |
684 | + | then value(getString(bl(bP))) | |
685 | + | else toString(u(this, em)) | |
686 | + | let bs = parseIntValue(eo) | |
687 | + | let cl = height | |
688 | + | if (if ((aC > el)) | |
689 | + | then (aZ != bU) | |
690 | + | else false) | |
691 | + | then n(("amount is less then minLockAmount=" + toString(aC))) | |
692 | + | else if ((aD > bh)) | |
693 | + | then n(("passed duration is less then minLockDuration=" + toString(aD))) | |
694 | + | else if ((bh > aE)) | |
695 | + | then n(("passed duration is greater then maxLockDuration=" + toString(aE))) | |
696 | + | else { | |
697 | + | let ep = fraction(el, bh, aE) | |
698 | + | let eq = cb() | |
699 | + | let dX = br(bs) | |
700 | + | let dQ = dG()._2 | |
701 | + | let er = cF(aZ) | |
702 | + | let es = reentrantInvoke(bT, "refreshUserReward", [aZ.bytes], nil) | |
703 | + | if ((es == es)) | |
704 | + | then { | |
705 | + | let et = if (en) | |
706 | + | then nil | |
707 | + | else [IntegerEntry(em, (bs + 1)), StringEntry(bl(bP), eo), StringEntry(bm(eo), bP)] | |
708 | + | $Tuple2(((((et ++ cB(aZ, aP.transactionId, el, cl, bh, ep, 0)) ++ co(el, bh, 1, if (en) | |
709 | + | then 0 | |
710 | + | else 1)) :+ ci("lock", bP, el, cl, bh, ep, aP)) ++ [IntegerEntry(dX, dQ), IntegerEntry(bz(), (eq + ep)), IntegerEntry(bd(aZ), (er + ep))]), ep) | |
711 | + | } | |
712 | + | else throw("Strict value is not equal to itself.") | |
713 | + | } | |
714 | + | } | |
715 | + | } | |
716 | + | } | |
717 | + | ||
718 | + | ||
719 | + | func eu (aZ,ev) = { | |
720 | + | let ew = bc(aZ, ev) | |
721 | + | let ex = parseIntValue(ew[aS]) | |
722 | + | let cl = parseIntValue(ew[aT]) | |
723 | + | let ey = parseIntValue(ew[aU]) | |
724 | + | let ez = (cl + ey) | |
725 | + | let bj = parseIntValue(ew[aX]) | |
726 | + | let eA = ((height - cl) / aG) | |
727 | + | let eB = fraction(toBigInt(eA), (toBigInt((8 * aG)) * h), toBigInt(ey)) | |
728 | + | let eC = if ((height > ez)) | |
729 | + | then ex | |
730 | + | else (toInt(fraction(toBigInt(ex), (h - pow(toBigInt(5), 1, eB, f, f, DOWN)), h)) - bj) | |
731 | + | eC | |
718 | 732 | } | |
719 | 733 | ||
720 | 734 | ||
721 | - | func ev (aY,ew) = { | |
722 | - | let ex = bb(aY, ew) | |
723 | - | let ey = parseIntValue(ex[aR]) | |
724 | - | let ck = parseIntValue(ex[aS]) | |
725 | - | let ez = parseIntValue(ex[aT]) | |
726 | - | let eA = (ck + ez) | |
727 | - | let bi = parseIntValue(ex[aW]) | |
728 | - | let bh = parseIntValue(ex[aV]) | |
729 | - | let eB = ((height - ck) / aF) | |
730 | - | let eC = fraction(toBigInt(eB), (toBigInt((8 * aF)) * h), toBigInt(ez)) | |
731 | - | let eD = if ((height > eA)) | |
732 | - | then ey | |
733 | - | else (toInt(fraction(toBigInt(ey), (h - pow(toBigInt(5), 1, eC, f, f, DOWN)), h)) - bi) | |
734 | - | eD | |
735 | - | } | |
736 | - | ||
737 | - | ||
738 | - | @Callable(aO) | |
739 | - | func constructor (eE,eF,aB,eG,eH,aE) = { | |
740 | - | let eI = aN(aO) | |
741 | - | if ((eI == eI)) | |
742 | - | then ([IntegerEntry(bj(), 0), StringEntry(ax(), aH(eF, aB, eG, eH, aE)), StringEntry(E(), eE)] ++ cn(0, 0, 0, 0)) | |
735 | + | @Callable(aP) | |
736 | + | func constructor (eD,eE,aC,eF,eG,aF) = { | |
737 | + | let eH = aO(aP) | |
738 | + | if ((eH == eH)) | |
739 | + | then ([IntegerEntry(bk(), 0), StringEntry(ay(), aI(eE, aC, eF, eG, aF)), StringEntry(F(), eD)] ++ co(0, 0, 0, 0)) | |
743 | 740 | else throw("Strict value is not equal to itself.") | |
744 | 741 | } | |
745 | 742 | ||
746 | 743 | ||
747 | 744 | ||
748 | - | @Callable( | |
749 | - | func lockRef ( | |
750 | - | let | |
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | let | |
745 | + | @Callable(aP) | |
746 | + | func lockRef (bh,eI,eJ) = { | |
747 | + | let eK = ei(aP, bh) | |
748 | + | let eL = eK._1 | |
749 | + | let ep = eK._2 | |
750 | + | let eM = toString(aP.caller) | |
751 | + | let eN = if (if ((eI == "")) | |
755 | 752 | then true | |
756 | - | else ( | |
753 | + | else (eJ == base58'')) | |
757 | 754 | then unit | |
758 | - | else invoke( | |
759 | - | if (( | |
755 | + | else invoke(B, "createPair", [E, eI, eM, eJ], nil) | |
756 | + | if ((eN == eN)) | |
760 | 757 | then { | |
761 | - | let | |
762 | - | if (( | |
763 | - | then $Tuple2( | |
758 | + | let eO = invoke(aF, "updateReferralActivity", [toString(aP.caller), ep], nil) | |
759 | + | if ((eO == eO)) | |
760 | + | then $Tuple2(eL, unit) | |
764 | 761 | else throw("Strict value is not equal to itself.") | |
765 | 762 | } | |
766 | 763 | else throw("Strict value is not equal to itself.") | |
767 | 764 | } | |
768 | 765 | ||
769 | 766 | ||
770 | 767 | ||
771 | - | @Callable( | |
772 | - | func lock ( | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | if (( | |
778 | - | then $Tuple2( | |
768 | + | @Callable(aP) | |
769 | + | func lock (bh) = { | |
770 | + | let eP = ei(aP, bh) | |
771 | + | let eL = eP._1 | |
772 | + | let ep = eP._2 | |
773 | + | let eO = invoke(aF, "updateReferralActivity", [toString(aP.caller), ep], nil) | |
774 | + | if ((eO == eO)) | |
775 | + | then $Tuple2(eL, unit) | |
779 | 776 | else throw("Strict value is not equal to itself.") | |
780 | 777 | } | |
781 | 778 | ||
782 | 779 | ||
783 | 780 | ||
784 | - | @Callable( | |
785 | - | func claimWxBoost ( | |
786 | - | then | |
781 | + | @Callable(aP) | |
782 | + | func claimWxBoost (bH,bP) = if ((bS != aP.caller)) | |
783 | + | then n("permissions denied") | |
787 | 784 | else { | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | $Tuple2( | |
785 | + | let eQ = dR(bH, bP, false) | |
786 | + | let eR = eQ._1 | |
787 | + | let eg = eQ._2 | |
788 | + | let eh = eQ._3 | |
789 | + | $Tuple2(eg, [eR]) | |
793 | 790 | } | |
794 | 791 | ||
795 | 792 | ||
796 | 793 | ||
797 | - | @Callable( | |
798 | - | func claimWxBoostREADONLY ( | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | $Tuple2(nil, [ | |
794 | + | @Callable(aP) | |
795 | + | func claimWxBoostREADONLY (bH,bP) = { | |
796 | + | let eS = dR(bH, bP, true) | |
797 | + | let eR = eS._1 | |
798 | + | let eg = eS._2 | |
799 | + | let eh = eS._3 | |
800 | + | $Tuple2(nil, [eR, eh]) | |
804 | 801 | } | |
805 | 802 | ||
806 | 803 | ||
807 | 804 | ||
808 | - | @Callable( | |
809 | - | func unlock ( | |
810 | - | let | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
805 | + | @Callable(aP) | |
806 | + | func unlock (eT) = { | |
807 | + | let aZ = aP.caller | |
808 | + | let bP = toString(aZ) | |
809 | + | let ba = fromBase58String(eT) | |
810 | + | let ew = bc(aZ, if ((eT == "")) | |
814 | 811 | then unit | |
815 | - | else aZ) | |
816 | - | let ey = parseIntValue(ex[aR]) | |
817 | - | let ck = parseIntValue(ex[aS]) | |
818 | - | let ez = parseIntValue(ex[aT]) | |
819 | - | let eA = (ck + ez) | |
820 | - | let bi = parseIntValue(ex[aW]) | |
821 | - | let bh = parseIntValue(ex[aV]) | |
822 | - | let eB = ((height - ck) / aF) | |
823 | - | let eD = ev(aY, if ((eU == "")) | |
812 | + | else ba) | |
813 | + | let ex = parseIntValue(ew[aS]) | |
814 | + | let cl = parseIntValue(ew[aT]) | |
815 | + | let ey = parseIntValue(ew[aU]) | |
816 | + | let bj = parseIntValue(ew[aX]) | |
817 | + | let bi = parseIntValue(ew[aW]) | |
818 | + | let eA = ((height - cl) / aG) | |
819 | + | let eC = eu(aZ, if ((eT == "")) | |
824 | 820 | then unit | |
825 | - | else aZ) | |
826 | - | let ep = fraction(ez, c, aD) | |
827 | - | let eq = fraction(ey, ep, c) | |
828 | - | let eV = min([fraction((eB * aF), eq, aD), bh]) | |
829 | - | let eW = w((bh - eV), "gwxRemaining") | |
830 | - | let eX = cb(aY) | |
831 | - | if ((0 >= ey)) | |
832 | - | then m("nothing to unlock") | |
821 | + | else ba) | |
822 | + | let ep = fraction(ex, ey, aE) | |
823 | + | let eU = min([fraction((eA * aG), ep, aE), bi]) | |
824 | + | let eV = x((bi - eU), "gwxRemaining") | |
825 | + | let eW = cc(aZ) | |
826 | + | if ((0 >= ex)) | |
827 | + | then n("nothing to unlock") | |
833 | 828 | else { | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | if (( | |
838 | - | then | |
829 | + | let eq = cb() | |
830 | + | let er = cF(aZ) | |
831 | + | let eX = x((er - eU), "userGwxAmountTotalNew") | |
832 | + | if ((eW > eX)) | |
833 | + | then n(("locked gwx amount: " + toString(eW))) | |
839 | 834 | else { | |
840 | - | let | |
841 | - | if (( | |
842 | - | then (((( | |
835 | + | let es = reentrantInvoke(bT, "refreshUserReward", [aZ.bytes], nil) | |
836 | + | if ((es == es)) | |
837 | + | then ((((cB(aZ, ba, ex, cl, ey, eV, (bj + eC)) ++ co(-(eC), 0, 0, 0)) :+ ci("unlock", bP, eC, cl, ey, eU, aP)) :+ ScriptTransfer(aZ, eC, aB)) ++ [IntegerEntry(bz(), x((eq - eU), "gwxTotal")), IntegerEntry(bd(aZ), eX)]) | |
843 | 838 | else throw("Strict value is not equal to itself.") | |
844 | 839 | } | |
845 | 840 | } | |
846 | 841 | } | |
847 | 842 | ||
848 | 843 | ||
849 | 844 | ||
850 | - | @Callable( | |
851 | - | func gwxUserInfoREADONLY ( | |
852 | - | let | |
853 | - | let | |
854 | - | $Tuple2(nil, [ | |
845 | + | @Callable(aP) | |
846 | + | func gwxUserInfoREADONLY (bP) = { | |
847 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
848 | + | let bi = cF(aZ) | |
849 | + | $Tuple2(nil, [bi]) | |
855 | 850 | } | |
856 | 851 | ||
857 | 852 | ||
858 | 853 | ||
859 | - | @Callable( | |
860 | - | func userMaxDurationREADONLY ( | |
854 | + | @Callable(aP) | |
855 | + | func userMaxDurationREADONLY (bP) = $Tuple2(nil, $Tuple2("increaseLock", aE)) | |
861 | 856 | ||
862 | 857 | ||
863 | 858 | ||
864 | - | @Callable( | |
865 | - | func getUserGwxAmountAtHeightREADONLY ( | |
866 | - | let | |
867 | - | let | |
868 | - | $Tuple2(nil, | |
859 | + | @Callable(aP) | |
860 | + | func getUserGwxAmountAtHeightREADONLY (bP,eY) = { | |
861 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
862 | + | let bi = cF(aZ) | |
863 | + | $Tuple2(nil, bi) | |
869 | 864 | } | |
870 | 865 | ||
871 | 866 | ||
872 | 867 | ||
873 | - | @Callable( | |
874 | - | func getUserGwxAmount ( | |
875 | - | let | |
876 | - | let | |
877 | - | $Tuple2(nil, | |
868 | + | @Callable(aP) | |
869 | + | func getUserGwxAmount (bP) = { | |
870 | + | let aZ = valueOrErrorMessage(addressFromString(bP), l("invalid user address")) | |
871 | + | let bi = cF(aZ) | |
872 | + | $Tuple2(nil, bi) | |
878 | 873 | } | |
879 | 874 | ||
880 | 875 | ||
881 | 876 | ||
882 | - | @Callable( | |
883 | - | func getGwxTotalREADONLY () = $Tuple2(nil, | |
877 | + | @Callable(aP) | |
878 | + | func getGwxTotalREADONLY () = $Tuple2(nil, cb()) | |
884 | 879 | ||
885 | 880 | ||
886 | 881 | ||
887 | - | @Callable( | |
882 | + | @Callable(aP) | |
888 | 883 | func onBoostEmissionUpdate () = { | |
889 | - | let | |
884 | + | let eH = if ((aP.caller == bR)) | |
890 | 885 | then true | |
891 | - | else | |
892 | - | if (( | |
893 | - | then | |
886 | + | else aO(aP) | |
887 | + | if ((eH == eH)) | |
888 | + | then dG() | |
894 | 889 | else throw("Strict value is not equal to itself.") | |
895 | 890 | } | |
896 | 891 | ||
897 | 892 | ||
898 | 893 | ||
899 | - | @Callable( | |
900 | - | func onStakedVoteUpdate ( | |
901 | - | let | |
894 | + | @Callable(aP) | |
895 | + | func onStakedVoteUpdate (bH,bP,ds) = { | |
896 | + | let eH = if ((aP.caller == bS)) | |
902 | 897 | then true | |
903 | - | else | |
904 | - | if (( | |
898 | + | else aO(aP) | |
899 | + | if ((eH == eH)) | |
905 | 900 | then { | |
906 | - | let | |
907 | - | $Tuple2( | |
901 | + | let dv = dr(bH, bP, ds) | |
902 | + | $Tuple2(dv, unit) | |
908 | 903 | } | |
909 | 904 | else throw("Strict value is not equal to itself.") | |
910 | 905 | } | |
911 | 906 | ||
912 | 907 | ||
913 | 908 | ||
914 | - | @Callable( | |
915 | - | func getVotingResultStakedREADONLY ( | |
909 | + | @Callable(aP) | |
910 | + | func getVotingResultStakedREADONLY (bH) = $Tuple2(nil, cW(bH)) | |
916 | 911 | ||
917 | 912 | ||
918 | 913 | ||
919 | - | @Callable( | |
920 | - | func getVotingResultStakedIntegralREADONLY ( | |
914 | + | @Callable(aP) | |
915 | + | func getVotingResultStakedIntegralREADONLY (bH) = $Tuple2(nil, da(bH)) | |
921 | 916 | ||
922 | 917 | ||
923 | 918 | ||
924 | - | @Callable( | |
925 | - | func getUserVoteFinalizedREADONLY ( | |
919 | + | @Callable(aP) | |
920 | + | func getUserVoteFinalizedREADONLY (bH,bP) = $Tuple2(nil, cP(bH, bP)) | |
926 | 921 | ||
927 | 922 | ||
928 | 923 | ||
929 | - | @Callable( | |
930 | - | func getUserVoteStakedIntegralREADONLY ( | |
924 | + | @Callable(aP) | |
925 | + | func getUserVoteStakedIntegralREADONLY (bH,bP) = $Tuple2(nil, dk(bH, bP)) | |
931 | 926 | ||
932 | 927 | ||
933 | - | @Verifier( | |
934 | - | func | |
935 | - | let | |
936 | - | let | |
937 | - | if ($isInstanceOf( | |
928 | + | @Verifier(eZ) | |
929 | + | func fa () = { | |
930 | + | let fb = { | |
931 | + | let aK = aM() | |
932 | + | if ($isInstanceOf(aK, "ByteVector")) | |
938 | 933 | then { | |
939 | - | let | |
940 | - | | |
934 | + | let aR = aK | |
935 | + | aR | |
941 | 936 | } | |
942 | - | else if ($isInstanceOf( | |
943 | - | then | |
937 | + | else if ($isInstanceOf(aK, "Unit")) | |
938 | + | then eZ.senderPublicKey | |
944 | 939 | else throw("Match error") | |
945 | 940 | } | |
946 | - | sigVerify( | |
941 | + | sigVerify(eZ.bodyBytes, eZ.proofs[0], fb) | |
947 | 942 | } | |
948 | 943 |
github/deemru/w8io/026f985 338.36 ms ◑