tx · 7rAHTwAPXdSpS2PdZ2sEpTsW15RdJ4e9YnVeFkvVboF6 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.02200000 Waves 2022.09.14 17:41 [2228905] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "7rAHTwAPXdSpS2PdZ2sEpTsW15RdJ4e9YnVeFkvVboF6", "fee": 2200000, "feeAssetId": null, "timestamp": 1663166506672, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "5Jy8kuDtfgogYgpjjg5CAvasTW4ieTb4VcmaGk2i6GGRKeWbz4J84qbp5hfC1iWg34cWNbyBSsXWzawXp89U1DSz" ], "script": "base64:BgJhCAISBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgoKCAgICAgICAgIEgoKCAgICAgICAgIEgMKAQgSAE8AA1NFUAICX18ABVNDQUxFAOgHAAVNVUxUOACAwtcvAAp6ZXJvQmlnSW50CQC2AgEAAAAUcHJvY2Vzc2luZ1N0YWdlVG90YWwAAAAVcHJvY2Vzc2luZ1N0YWdlU2hhcmVzAAEBDmdldE51bWJlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAABD2dldE51bWJlck9yRmFpbAEDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUEdGhpcwUDa2V5CQCsAgIJAKwCAgIPbWFuZGF0b3J5IHRoaXMuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx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BFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5SzTBzg==", "height": 2228905, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BZSFryMfz8AkGdNhA9wYR5HVjyNpQd1B2GzMwqqLDxEA Next: 8bgwTfUnRA5atSxnUQXvb9V72WixCXyAE9Uybn2qr6xc Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | func k (h) = valueOrErrorMessage(getString(this, h), (("mandatory this." + h) + " is not defined")) | |
26 | 26 | ||
27 | 27 | ||
28 | - | func l (m) = if (( | |
28 | + | func l (m) = if ((0 > m)) | |
29 | 29 | then -(m) | |
30 | 30 | else m | |
31 | 31 | ||
32 | 32 | ||
33 | - | let n = "%s__maxDepth" | |
34 | - | ||
35 | - | let o = 30 | |
36 | - | ||
37 | - | let p = valueOrElse(getInteger(this, n), o) | |
38 | - | ||
39 | - | func q () = "%s%s__config__factoryAddress" | |
33 | + | func n (m) = if ((d > m)) | |
34 | + | then -(m) | |
35 | + | else m | |
40 | 36 | ||
41 | 37 | ||
42 | - | let | |
38 | + | let o = "%s__maxDepth" | |
43 | 39 | ||
44 | - | let | |
40 | + | let p = 30 | |
45 | 41 | ||
46 | - | func t () = "%s%s__config__emissionAddress" | |
42 | + | let q = valueOrElse(getInteger(this, o), p) | |
43 | + | ||
44 | + | func r () = "%s%s__config__factoryAddress" | |
47 | 45 | ||
48 | 46 | ||
49 | - | func u (v) = makeString(["%s%s%s", "mapping", "num2user", toString(v)], a) | |
47 | + | let s = k(r()) | |
48 | + | ||
49 | + | let t = addressFromStringValue(s) | |
50 | + | ||
51 | + | func u () = "%s%s__config__emissionAddress" | |
50 | 52 | ||
51 | 53 | ||
52 | - | let w = makeString(["%s%s", "referral", "programName"], a) | |
53 | - | ||
54 | - | let x = "wxlock" | |
55 | - | ||
56 | - | let y = valueOrElse(getString(this, w), x) | |
57 | - | ||
58 | - | let z = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
59 | - | ||
60 | - | let A = (500 * c) | |
61 | - | ||
62 | - | let B = valueOrElse(getInteger(this, z), A) | |
63 | - | ||
64 | - | let C = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
65 | - | ||
66 | - | let D = 50 | |
67 | - | ||
68 | - | let E = valueOrElse(getInteger(this, C), D) | |
69 | - | ||
70 | - | let F = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
71 | - | ||
72 | - | let G = 50 | |
73 | - | ||
74 | - | let H = valueOrElse(getInteger(this, F), G) | |
75 | - | ||
76 | - | func I (J) = makeString(["%s%s%s", "referrer", y, J], a) | |
54 | + | func v (w) = makeString(["%s%s%s", "mapping", "num2user", toString(w)], a) | |
77 | 55 | ||
78 | 56 | ||
79 | - | func K (L,M) = makeString(["%s%s%s%s", "unclaimedReferral", L, M], a) | |
57 | + | let x = makeString(["%s%s", "referral", "programName"], a) | |
58 | + | ||
59 | + | let y = "wxlock" | |
60 | + | ||
61 | + | let z = valueOrElse(getString(this, x), y) | |
62 | + | ||
63 | + | let A = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
64 | + | ||
65 | + | let B = (500 * c) | |
66 | + | ||
67 | + | let C = valueOrElse(getInteger(this, A), B) | |
68 | + | ||
69 | + | let D = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
70 | + | ||
71 | + | let E = 50 | |
72 | + | ||
73 | + | let F = valueOrElse(getInteger(this, D), E) | |
74 | + | ||
75 | + | let G = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
76 | + | ||
77 | + | let H = 50 | |
78 | + | ||
79 | + | let I = valueOrElse(getInteger(this, G), H) | |
80 | + | ||
81 | + | func J (K) = makeString(["%s%s%s", "referrer", z, K], a) | |
80 | 82 | ||
81 | 83 | ||
82 | - | let N = k(t()) | |
83 | - | ||
84 | - | let O = addressFromStringValue(N) | |
85 | - | ||
86 | - | let P = 1 | |
87 | - | ||
88 | - | let Q = 2 | |
89 | - | ||
90 | - | let R = 3 | |
91 | - | ||
92 | - | let S = 4 | |
93 | - | ||
94 | - | func T () = "%s__config" | |
84 | + | func L (M,N) = makeString(["%s%s%s%s", "unclaimedReferral", M, N], a) | |
95 | 85 | ||
96 | 86 | ||
97 | - | func U () = split(k(T()), a) | |
87 | + | let O = k(u()) | |
88 | + | ||
89 | + | let P = addressFromStringValue(O) | |
90 | + | ||
91 | + | let Q = 1 | |
92 | + | ||
93 | + | let R = 2 | |
94 | + | ||
95 | + | let S = 3 | |
96 | + | ||
97 | + | let T = 4 | |
98 | + | ||
99 | + | func U () = "%s__config" | |
98 | 100 | ||
99 | 101 | ||
100 | - | func V ( | |
102 | + | func V () = split(k(U()), a) | |
101 | 103 | ||
102 | 104 | ||
103 | - | func Z () = { | |
104 | - | let aa = U() | |
105 | - | valueOrErrorMessage(addressFromString(aa[R]), "boosting contract address is not defined") | |
105 | + | func W (X,Y,Z,q) = makeString(["%s%s%s%d", X, Y, Z, toString(q)], a) | |
106 | + | ||
107 | + | ||
108 | + | func aa () = { | |
109 | + | let ab = V() | |
110 | + | valueOrErrorMessage(addressFromString(ab[S]), "boosting contract address is not defined") | |
106 | 111 | } | |
107 | 112 | ||
108 | 113 | ||
109 | - | func | |
114 | + | func ac () = "%s%s__gwxRewardEmissionPart__startHeight" | |
110 | 115 | ||
111 | 116 | ||
112 | - | func | |
117 | + | func ad () = "%s__nextUserNum" | |
113 | 118 | ||
114 | 119 | ||
115 | - | func | |
120 | + | func ae () = "%s%s__ratePerBlock__current" | |
116 | 121 | ||
117 | 122 | ||
118 | - | func | |
123 | + | func af () = "%s%s__poolWeight__GWXvirtualPOOL" | |
119 | 124 | ||
120 | 125 | ||
121 | - | func | |
126 | + | func ag () = "%s__nextProcessedUser" | |
122 | 127 | ||
123 | 128 | ||
124 | - | func | |
129 | + | func ah () = "%s__latestPeriod" | |
125 | 130 | ||
126 | 131 | ||
127 | - | func | |
132 | + | func ai () = "%s__nextPeriod" | |
128 | 133 | ||
129 | 134 | ||
130 | - | func | |
135 | + | func aj () = "%s__processingStage" | |
131 | 136 | ||
132 | 137 | ||
133 | - | func | |
138 | + | func ak () = "%s__nextProcessedPeriod" | |
134 | 139 | ||
135 | 140 | ||
136 | - | func | |
141 | + | func al (am) = makeString(["%s%d", "userUnclaimed", toString(am)], a) | |
137 | 142 | ||
138 | 143 | ||
139 | - | func | |
144 | + | func an (am) = makeString(["%s%d__nextClaimedPeriod", toString(am)], a) | |
140 | 145 | ||
141 | 146 | ||
142 | - | func | |
147 | + | func ao (am) = makeString(["%s%d__lastProcessedPeriod", toString(am)], a) | |
143 | 148 | ||
144 | 149 | ||
145 | - | func | |
150 | + | func ap (aq) = makeString(["%s%d__startHeightForPeriod", toString(aq)], a) | |
146 | 151 | ||
147 | 152 | ||
148 | - | func | |
153 | + | func ar (aq) = makeString(["%s%d__auxEmissionReward", toString(aq)], a) | |
149 | 154 | ||
150 | 155 | ||
151 | - | func | |
156 | + | func as (aq) = makeString(["%s%d__totalAmountForPeriod", toString(aq)], a) | |
152 | 157 | ||
153 | 158 | ||
154 | - | func | |
159 | + | func at () = "%s__lastPayoutInfo" | |
155 | 160 | ||
156 | 161 | ||
157 | - | func | |
162 | + | func au (aq,av,aw) = makeString(["%d%d%d", toString(aq), toString(av), toString(aw)], a) | |
158 | 163 | ||
159 | 164 | ||
160 | - | func | |
165 | + | func ax (aq) = makeString(["%s%s%d__payouts__history", toString(aq)], a) | |
161 | 166 | ||
162 | 167 | ||
163 | - | func | |
168 | + | func ay (aq) = makeString(["%s%d__totalWeightForPeriod", toString(aq)], a) | |
164 | 169 | ||
165 | 170 | ||
166 | - | func | |
171 | + | func az (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "k", toString(aq)], a) | |
167 | 172 | ||
168 | 173 | ||
169 | - | func | |
174 | + | func aA (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "b", toString(aq)], a) | |
170 | 175 | ||
171 | 176 | ||
172 | - | func | |
177 | + | func aB (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "weight", toString(aq)], a) | |
173 | 178 | ||
174 | 179 | ||
175 | - | func | |
180 | + | func aC () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
176 | 181 | ||
177 | 182 | ||
178 | - | let | |
183 | + | let aD = addressFromStringValue(k(aC())) | |
179 | 184 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | StringEntry( | |
185 | + | func aE (aF,aG,aH,aI) = { | |
186 | + | let aJ = makeString(["%s%s%s%s__history", aF, aG, toBase58String(aI.transactionId)], a) | |
187 | + | let aK = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aH)], a) | |
188 | + | StringEntry(aJ, aK) | |
184 | 189 | } | |
185 | 190 | ||
186 | 191 | ||
187 | - | func | |
192 | + | func aL () = "%s__managerPublicKey" | |
188 | 193 | ||
189 | 194 | ||
190 | - | func | |
195 | + | func aM () = "%s__pendingManagerPublicKey" | |
191 | 196 | ||
192 | 197 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
198 | + | func aN () = { | |
199 | + | let aO = getString(aL()) | |
200 | + | if ($isInstanceOf(aO, "String")) | |
196 | 201 | then { | |
197 | - | let | |
198 | - | fromBase58String( | |
202 | + | let aP = aO | |
203 | + | fromBase58String(aP) | |
199 | 204 | } | |
200 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(aO, "Unit")) | |
201 | 206 | then unit | |
202 | 207 | else throw("Match error") | |
203 | 208 | } | |
204 | 209 | ||
205 | 210 | ||
206 | - | func | |
207 | - | let | |
208 | - | if ($isInstanceOf( | |
211 | + | func aQ () = { | |
212 | + | let aO = getString(aM()) | |
213 | + | if ($isInstanceOf(aO, "String")) | |
209 | 214 | then { | |
210 | - | let | |
211 | - | fromBase58String( | |
215 | + | let aP = aO | |
216 | + | fromBase58String(aP) | |
212 | 217 | } | |
213 | - | else if ($isInstanceOf( | |
218 | + | else if ($isInstanceOf(aO, "Unit")) | |
214 | 219 | then unit | |
215 | 220 | else throw("Match error") | |
216 | 221 | } | |
217 | 222 | ||
218 | 223 | ||
219 | - | func | |
220 | - | let | |
221 | - | let | |
222 | - | if ($isInstanceOf( | |
224 | + | func aR (aI) = { | |
225 | + | let aS = throw("Permission denied") | |
226 | + | let aO = aN() | |
227 | + | if ($isInstanceOf(aO, "ByteVector")) | |
223 | 228 | then { | |
224 | - | let | |
225 | - | if (( | |
229 | + | let aT = aO | |
230 | + | if ((aI.callerPublicKey == aT)) | |
226 | 231 | then true | |
227 | - | else | |
232 | + | else aS | |
228 | 233 | } | |
229 | - | else if ($isInstanceOf( | |
230 | - | then if (( | |
234 | + | else if ($isInstanceOf(aO, "Unit")) | |
235 | + | then if ((aI.caller == this)) | |
231 | 236 | then true | |
232 | - | else | |
237 | + | else aS | |
233 | 238 | else throw("Match error") | |
234 | 239 | } | |
235 | 240 | ||
236 | 241 | ||
237 | - | func | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | if (isDefined( | |
242 | + | func aU (aV,aW,aq,am) = { | |
243 | + | let aX = ao(am) | |
244 | + | let aY = az(aq, am) | |
245 | + | let aZ = getInteger(aV, aY) | |
246 | + | let ba = aB(aq, am) | |
247 | + | if (isDefined(aZ)) | |
243 | 248 | then { | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | if (( | |
248 | - | then $Tuple2(( | |
249 | + | let bb = value(aZ) | |
250 | + | let bc = value(getInteger(aV, aA(aq, am))) | |
251 | + | let bd = ((bb * aW) + bc) | |
252 | + | if ((bd > 0)) | |
253 | + | then $Tuple2((bd / b), [IntegerEntry(aX, aq), IntegerEntry(ba, bd)]) | |
249 | 254 | else $Tuple2(0, nil) | |
250 | 255 | } | |
251 | 256 | else { | |
252 | - | let | |
253 | - | if (if (isDefined( | |
254 | - | then ( | |
257 | + | let be = getInteger(this, aX) | |
258 | + | if (if (isDefined(be)) | |
259 | + | then (aq >= value(be)) | |
255 | 260 | else false) | |
256 | 261 | then { | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | if (( | |
262 | - | then $Tuple2(( | |
262 | + | let bf = value(be) | |
263 | + | let bb = value(getInteger(aV, az(bf, am))) | |
264 | + | let bc = value(getInteger(aV, aA(bf, am))) | |
265 | + | let bd = ((bb * aW) + bc) | |
266 | + | if ((bd > 0)) | |
267 | + | then $Tuple2((bd / b), [IntegerEntry(ba, bd)]) | |
263 | 268 | else $Tuple2(0, nil) | |
264 | 269 | } | |
265 | 270 | else $Tuple2(0, nil) | |
267 | 272 | } | |
268 | 273 | ||
269 | 274 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | if ($isInstanceOf( | |
275 | + | func bg (aV,aW,aq,am) = { | |
276 | + | let ba = aB(aq, am) | |
277 | + | let bh = getInteger(ba) | |
278 | + | let aO = bh | |
279 | + | if ($isInstanceOf(aO, "Unit")) | |
275 | 280 | then 0 | |
276 | - | else if ($isInstanceOf( | |
281 | + | else if ($isInstanceOf(aO, "Int")) | |
277 | 282 | then { | |
278 | - | let | |
279 | - | ( | |
283 | + | let bd = aO | |
284 | + | (bd / b) | |
280 | 285 | } | |
281 | 286 | else throw("Match error") | |
282 | 287 | } | |
283 | 288 | ||
284 | 289 | ||
285 | - | func | |
286 | - | let h = makeString(["%s%s%s", "mapping", "user2num", | |
287 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String( | |
290 | + | func bi (Z,bj) = { | |
291 | + | let h = makeString(["%s%s%s", "mapping", "user2num", bj], a) | |
292 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(Z)), h), ((("User address " + bj) + " is not found in boosting contract data, key=") + h))) | |
288 | 293 | } | |
289 | 294 | ||
290 | 295 | ||
291 | - | func | |
296 | + | func bk () = g(ai()) | |
292 | 297 | ||
293 | 298 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | if ($isInstanceOf( | |
299 | + | func bl (bj) = { | |
300 | + | let ab = V() | |
301 | + | let bm = bi(ab[S], bj) | |
302 | + | let bn = getInteger(al(bm)) | |
303 | + | let aO = bn | |
304 | + | if ($isInstanceOf(aO, "Unit")) | |
300 | 305 | then $Tuple2(0, nil) | |
301 | - | else if ($isInstanceOf( | |
306 | + | else if ($isInstanceOf(aO, "Int")) | |
302 | 307 | then { | |
303 | - | let | |
304 | - | $Tuple2( | |
308 | + | let bo = aO | |
309 | + | $Tuple2(bo, [IntegerEntry(al(bm), 0)]) | |
305 | 310 | } | |
306 | 311 | else throw("Match error") | |
307 | 312 | } | |
308 | 313 | ||
309 | 314 | ||
310 | - | @Callable( | |
311 | - | func updateReferralActivity ( | |
312 | - | let | |
313 | - | let | |
315 | + | @Callable(aI) | |
316 | + | func updateReferralActivity (bj,bp) = { | |
317 | + | let bq = getString(aD, J(bj)) | |
318 | + | let br = if ((bq == unit)) | |
314 | 319 | then unit | |
315 | - | else invoke( | |
316 | - | if (( | |
320 | + | else invoke(aD, "updateReferralActivity", [z, bj, (bp >= C)], nil) | |
321 | + | if ((br == br)) | |
317 | 322 | then $Tuple2(nil, unit) | |
318 | 323 | else throw("Strict value is not equal to itself.") | |
319 | 324 | } | |
320 | 325 | ||
321 | 326 | ||
322 | 327 | ||
323 | - | @Callable( | |
328 | + | @Callable(aI) | |
324 | 329 | func finalizeHelper () = { | |
325 | - | let br = valueOrElse(getInteger(ai()), e) | |
326 | - | let bs = g(aj()) | |
327 | - | let bt = g(af()) | |
330 | + | let bs = valueOrElse(getInteger(aj()), e) | |
331 | + | let bt = g(ak()) | |
328 | 332 | let bu = g(ag()) | |
329 | - | let bv = valueOrElse(getInteger(Z(), ac()), 0) | |
330 | - | let bw = ax(bs) | |
331 | - | let bx = g(ax(bs)) | |
332 | - | let aV = g(ao(bs)) | |
333 | - | if ((bs > bu)) | |
333 | + | let bv = g(ah()) | |
334 | + | let bw = valueOrElse(getInteger(aa(), ad()), 0) | |
335 | + | let bx = ay(bt) | |
336 | + | let by = g(ay(bt)) | |
337 | + | let aW = g(ap(bt)) | |
338 | + | if ((bt > bv)) | |
334 | 339 | then $Tuple2(nil, false) | |
335 | - | else if (( | |
340 | + | else if ((bs == e)) | |
336 | 341 | then { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | then [IntegerEntry( | |
343 | - | else [IntegerEntry( | |
344 | - | $Tuple2((([IntegerEntry( | |
342 | + | let bz = aU(aa(), aW, bt, bu) | |
343 | + | let bA = bz._1 | |
344 | + | let bB = bz._2 | |
345 | + | let bC = (by + bA) | |
346 | + | let bD = if (((bw - 1) > bu)) | |
347 | + | then [IntegerEntry(ag(), (bu + 1))] | |
348 | + | else [IntegerEntry(aj(), f), IntegerEntry(ag(), 0)] | |
349 | + | $Tuple2((([IntegerEntry(bx, bC)] ++ bD) ++ bB), true) | |
345 | 350 | } | |
346 | - | else if (( | |
351 | + | else if ((bs == f)) | |
347 | 352 | then { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
353 | + | let bA = bg(aa(), aW, bt, bu) | |
354 | + | let bE = fraction(g(as(bt)), bA, by) | |
355 | + | let bF = fraction(g(ar(bt)), bA, by) | |
356 | + | let bG = (bF + bE) | |
357 | + | let bn = getInteger(al(bu)) | |
358 | + | let bj = getStringValue(aa(), v(bu)) | |
359 | + | let bq = getString(aD, J(bj)) | |
360 | + | let br = if ((bq == unit)) | |
356 | 361 | then unit | |
357 | - | else invoke( | |
358 | - | if (( | |
362 | + | else invoke(aD, "updateReferralActivity", [z, bj, (bA >= C)], nil) | |
363 | + | if ((br == br)) | |
359 | 364 | then { | |
360 | - | let | |
365 | + | let bH = if (if ((bq == unit)) | |
361 | 366 | then true | |
362 | - | else ( | |
367 | + | else (C > bA)) | |
363 | 368 | then unit | |
364 | 369 | else { | |
365 | - | let | |
366 | - | let | |
367 | - | invoke( | |
370 | + | let bI = fraction(bG, F, b) | |
371 | + | let bJ = fraction(bG, I, b) | |
372 | + | invoke(aD, "incUnclaimed", [z, bj, bI, bJ], nil) | |
368 | 373 | } | |
369 | - | if (( | |
374 | + | if ((bH == bH)) | |
370 | 375 | then { | |
371 | - | let | |
372 | - | let | |
373 | - | then [IntegerEntry( | |
374 | - | else [IntegerEntry( | |
375 | - | $Tuple2(( | |
376 | + | let bK = [IntegerEntry(al(bu), (valueOrElse(bn, 0) + bG))] | |
377 | + | let bD = if (((bw - 1) > bu)) | |
378 | + | then [IntegerEntry(ag(), (bu + 1))] | |
379 | + | else [IntegerEntry(ak(), (bt + 1)), IntegerEntry(ag(), 0), DeleteEntry(aj())] | |
380 | + | $Tuple2((bK ++ bD), true) | |
376 | 381 | } | |
377 | 382 | else throw("Strict value is not equal to itself.") | |
378 | 383 | } | |
383 | 388 | ||
384 | 389 | ||
385 | 390 | ||
386 | - | @Callable( | |
387 | - | func finalizeWrapper ( | |
388 | - | let | |
389 | - | let | |
390 | - | if ($isInstanceOf( | |
391 | - | then | |
391 | + | @Callable(aI) | |
392 | + | func finalizeWrapper (bL) = { | |
393 | + | let bM = { | |
394 | + | let bN = invoke(this, "finalizeHelper", nil, nil) | |
395 | + | if ($isInstanceOf(bN, "Boolean")) | |
396 | + | then bN | |
392 | 397 | else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean")) | |
393 | 398 | } | |
394 | - | if (( | |
395 | - | then if (!( | |
396 | - | then if (( | |
399 | + | if ((bM == bM)) | |
400 | + | then if (!(bM)) | |
401 | + | then if ((bL == q)) | |
397 | 402 | then throw("Nothing to process") | |
398 | 403 | else $Tuple2(nil, unit) | |
399 | - | else if (( | |
400 | - | then $Tuple2(nil, invoke(this, "finalizeWrapper", [( | |
404 | + | else if ((bL > 0)) | |
405 | + | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(bL - 1)], nil)) | |
401 | 406 | else $Tuple2(nil, unit) | |
402 | 407 | else throw("Strict value is not equal to itself.") | |
403 | 408 | } | |
404 | 409 | ||
405 | 410 | ||
406 | 411 | ||
407 | - | @Callable( | |
408 | - | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [ | |
412 | + | @Callable(aI) | |
413 | + | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [q], nil)) | |
409 | 414 | ||
410 | 415 | ||
411 | 416 | ||
412 | - | @Callable( | |
417 | + | @Callable(aI) | |
413 | 418 | func deposit () = { | |
414 | - | let | |
415 | - | if (( | |
419 | + | let ab = V() | |
420 | + | if ((aI.caller != Address(fromBase58String(ab[R])))) | |
416 | 421 | then throw("Wrong caller address") | |
417 | 422 | else { | |
418 | - | let | |
419 | - | if (( | |
423 | + | let bO = value(value(aI.payments[0]).assetId) | |
424 | + | if ((bO != fromBase58String(ab[Q]))) | |
420 | 425 | then throw("Wrong payment asset") | |
421 | 426 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | if (( | |
427 | + | let aq = bk() | |
428 | + | let bP = (height - i(ac())) | |
429 | + | let bQ = valueOrErrorMessage(getInteger(P, ae()), (("mandatory emission_contract." + ae()) + " is not defined")) | |
430 | + | let bR = valueOrErrorMessage(getInteger(t, af()), (("mandatory factory_contract." + af()) + " is not defined")) | |
431 | + | let bS = fraction((bP * bR), bQ, c) | |
432 | + | let bT = invoke(P, "emit", [bS], nil) | |
433 | + | if ((bT == bT)) | |
429 | 434 | then { | |
430 | - | let | |
431 | - | let | |
432 | - | [IntegerEntry( | |
435 | + | let bU = value(aI.payments[0]).amount | |
436 | + | let bV = au(aq, bU, bS) | |
437 | + | [IntegerEntry(ah(), aq), IntegerEntry(ap(aq), height), IntegerEntry(ar(aq), bS), IntegerEntry(ac(), height), IntegerEntry(as(aq), bU), IntegerEntry(ai(), (aq + 1)), StringEntry(at(), bV), StringEntry(ax(aq), bV)] | |
433 | 438 | } | |
434 | 439 | else throw("Strict value is not equal to itself.") | |
435 | 440 | } | |
438 | 443 | ||
439 | 444 | ||
440 | 445 | ||
441 | - | @Callable( | |
446 | + | @Callable(aI) | |
442 | 447 | func claimReward () = { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
448 | + | let ab = V() | |
449 | + | let bW = toString(aI.caller) | |
450 | + | let bX = bl(bW) | |
451 | + | let aH = bX._1 | |
452 | + | let bY = bX._2 | |
453 | + | let bZ = if ((aH > 0)) | |
449 | 454 | then true | |
450 | 455 | else throw("Nothing to claim") | |
451 | - | if (( | |
456 | + | if ((bZ == bZ)) | |
452 | 457 | then { | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | if ($isInstanceOf( | |
457 | - | then | |
458 | - | else throw(($getType(invoke( | |
458 | + | let ca = 0 | |
459 | + | let cb = { | |
460 | + | let bN = invoke(aD, "claim", [z], nil) | |
461 | + | if ($isInstanceOf(bN, "Int")) | |
462 | + | then bN | |
463 | + | else throw(($getType(invoke(aD, "claim", [z], nil)) + " couldn't be cast to Int")) | |
459 | 464 | } | |
460 | - | let | |
461 | - | $Tuple2(([ScriptTransfer( | |
465 | + | let cc = (aH + cb) | |
466 | + | $Tuple2(([ScriptTransfer(aI.caller, cc, fromBase58String(ab[Q])), aE("claim", bW, aH, aI)] ++ bY), [cc, ca]) | |
462 | 467 | } | |
463 | 468 | else throw("Strict value is not equal to itself.") | |
464 | 469 | } | |
465 | 470 | ||
466 | 471 | ||
467 | 472 | ||
468 | - | @Callable( | |
469 | - | func claimRewardREADONLY ( | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | $Tuple2(nil, | |
473 | + | @Callable(aI) | |
474 | + | func claimRewardREADONLY (bW) = { | |
475 | + | let cd = bl(bW) | |
476 | + | let aH = cd._1 | |
477 | + | let bY = cd._2 | |
478 | + | let ce = valueOrElse(getInteger(aD, L(z, bW)), 0) | |
479 | + | let cc = (aH + ce) | |
480 | + | $Tuple2(nil, cc) | |
476 | 481 | } | |
477 | 482 | ||
478 | 483 | ||
479 | 484 | ||
480 | - | @Callable( | |
481 | - | func latestFinalizedPeriodREADONLY ( | |
485 | + | @Callable(aI) | |
486 | + | func latestFinalizedPeriodREADONLY (bW) = $Tuple2(nil, valueOrElse(getInteger(this, ah()), -1)) | |
482 | 487 | ||
483 | 488 | ||
484 | 489 | ||
485 | - | @Callable( | |
486 | - | func latestFinalizedPeriodInfoREADONLY ( | |
490 | + | @Callable(aI) | |
491 | + | func latestFinalizedPeriodInfoREADONLY (bW) = $Tuple2(nil, j(at())) | |
487 | 492 | ||
488 | 493 | ||
489 | 494 | ||
490 | - | @Callable( | |
491 | - | func calcGwxParamsREADONLY ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | $Tuple2(nil, [ | |
495 | + | @Callable(aI) | |
496 | + | func calcGwxParamsREADONLY (cf,cg,ch) = { | |
497 | + | let ci = (cg + ch) | |
498 | + | let cj = -(fraction(cf, b, ch)) | |
499 | + | let ck = (fraction(cf, b, ch) * ci) | |
500 | + | $Tuple2(nil, [cj, ck, bk()]) | |
496 | 501 | } | |
497 | 502 | ||
498 | 503 | ||
499 | 504 | ||
500 | - | @Callable( | |
501 | - | func calcGwxAmountStartREADONLY ( | |
502 | - | let | |
503 | - | let | |
504 | - | $Tuple2(nil, [ | |
505 | + | @Callable(aI) | |
506 | + | func calcGwxAmountStartREADONLY (cl,cm,cn) = { | |
507 | + | let co = fraction(cm, c, cn) | |
508 | + | let bp = fraction(cl, co, c) | |
509 | + | $Tuple2(nil, [bp]) | |
505 | 510 | } | |
506 | 511 | ||
507 | 512 | ||
508 | 513 | ||
509 | - | @Callable( | |
510 | - | func onEmissionForGwxStart () = if (( | |
514 | + | @Callable(aI) | |
515 | + | func onEmissionForGwxStart () = if ((aI.caller != t)) | |
511 | 516 | then throw("permissions denied") | |
512 | - | else [IntegerEntry( | |
517 | + | else [IntegerEntry(ac(), height)] | |
513 | 518 | ||
514 | 519 | ||
515 | 520 | ||
516 | - | @Callable( | |
517 | - | func latestPeriodEmissionRewardsREADONLY ( | |
518 | - | let | |
519 | - | $Tuple2(nil, [g(aq | |
521 | + | @Callable(aI) | |
522 | + | func latestPeriodEmissionRewardsREADONLY (bW) = { | |
523 | + | let aq = bk() | |
524 | + | $Tuple2(nil, [g(ar(aq))]) | |
520 | 525 | } | |
521 | 526 | ||
522 | 527 | ||
523 | 528 | ||
524 | - | @Callable(aH) | |
525 | - | func calcD (co,cp,cq,cr,cs) = { | |
526 | - | let ct = toBigInt(2) | |
527 | - | let cu = parseBigIntValue(cr) | |
529 | + | @Callable(aI) | |
530 | + | func calcD (cp,cq,cr,cs,ct) = { | |
531 | + | let cu = toBigInt(2) | |
528 | 532 | let cv = parseBigIntValue(cs) | |
529 | - | let cw = parseBigIntValue( | |
533 | + | let cw = parseBigIntValue(ct) | |
530 | 534 | let cx = parseBigIntValue(cp) | |
531 | - | let cy = (parseBigIntValue(cq) * cu) | |
532 | - | let aO = (cw + cx) | |
533 | - | if ((aO == d)) | |
535 | + | let cy = parseBigIntValue(cq) | |
536 | + | let cz = (parseBigIntValue(cr) * cv) | |
537 | + | let aP = (cx + cy) | |
538 | + | if ((aP == d)) | |
534 | 539 | then $Tuple2(nil, toString(d)) | |
535 | 540 | else { | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | $Tuple2( | |
541 | + | let cA = (cz * cu) | |
542 | + | let cB = [1, 2, 3, 4, 5, 6, 7] | |
543 | + | func cC (cD,cE) = { | |
544 | + | let cF = cD | |
545 | + | let cG = cF._1 | |
546 | + | let cH = cF._2 | |
547 | + | let cI = (((cG * cG) * cG) / (((cx * cy) * cu) * cu)) | |
548 | + | let cJ = (((((cA * aP) / cv) + (cI * cu)) * cG) / ((((cA - cv) * cG) / cv) + ((cu + toBigInt(1)) * cI))) | |
549 | + | $Tuple2(cJ, cG) | |
545 | 550 | } | |
546 | 551 | ||
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | func | |
552 | - | then | |
553 | - | else | |
552 | + | let cK = { | |
553 | + | let cL = cB | |
554 | + | let cM = size(cL) | |
555 | + | let cN = $Tuple2(aP, unit) | |
556 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
557 | + | then cP | |
558 | + | else cC(cP, cL[cQ]) | |
554 | 559 | ||
555 | - | func | |
556 | - | then | |
560 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
561 | + | then cP | |
557 | 562 | else throw("List size exceeds 7") | |
558 | 563 | ||
559 | - | | |
564 | + | cR(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7) | |
560 | 565 | } | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | if (( | |
565 | - | then $Tuple2(nil, toString( | |
566 | - | else throw(("D calculation error, dDiff = " + toString( | |
566 | + | let cJ = cK._1 | |
567 | + | let cH = cK._2 | |
568 | + | let cS = n((cJ - value(cH))) | |
569 | + | if ((cw >= cS)) | |
570 | + | then $Tuple2(nil, toString(cJ)) | |
571 | + | else throw(("D calculation error, dDiff = " + toString(cS))) | |
567 | 572 | } | |
568 | 573 | } | |
569 | 574 | ||
570 | 575 | ||
571 | 576 | ||
572 | - | @Callable(aH) | |
573 | - | func setManager (cS) = { | |
574 | - | let cT = aQ(aH) | |
575 | - | if ((cT == cT)) | |
577 | + | @Callable(aI) | |
578 | + | func calcPutXOnly (cT,cU,cV,cW,cX,cY,cZ,da) = { | |
579 | + | let cu = toBigInt(2) | |
580 | + | let cv = parseBigIntValue(cY) | |
581 | + | let cw = parseBigIntValue(cZ) | |
582 | + | let db = parseBigIntValue(cU) | |
583 | + | let dc = parseBigIntValue(cV) | |
584 | + | let cG = if ((cW == "")) | |
585 | + | then parseBigIntValue({ | |
586 | + | let bN = invoke(this, "calcD", [cU, cV, cX, cY, da], nil) | |
587 | + | if ($isInstanceOf(bN, "String")) | |
588 | + | then bN | |
589 | + | else throw(($getType(invoke(this, "calcD", [cU, cV, cX, cY, da], nil)) + " couldn't be cast to String")) | |
590 | + | }) | |
591 | + | else parseBigIntValue(cW) | |
592 | + | let cz = (parseBigIntValue(cX) * cv) | |
593 | + | let dd = parseBigIntValue(cT) | |
594 | + | let cA = (cz * cu) | |
595 | + | let cB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
596 | + | func cC (cD,cE) = { | |
597 | + | let de = cD | |
598 | + | let df = de._1 | |
599 | + | let dg = de._2 | |
600 | + | let dh = ((db + dd) - df) | |
601 | + | let di = (dc - ((df * dc) / db)) | |
602 | + | let cI = (((cG * cG) * cG) / (((dh * di) * cu) * cu)) | |
603 | + | let dj = (df + ((((((-(cG) * cA) / cv) + cG) + ((cA * (dh + di)) / cv)) - cI) / ((((-(cA) * (toBigInt(-1) - (dc / db))) / cv) + (cI / dh)) + ((dc * cI) / (db * di))))) | |
604 | + | $Tuple2(dj, df) | |
605 | + | } | |
606 | + | ||
607 | + | let dk = { | |
608 | + | let cL = cB | |
609 | + | let cM = size(cL) | |
610 | + | let cN = $Tuple2(d, unit) | |
611 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
612 | + | then cP | |
613 | + | else cC(cP, cL[cQ]) | |
614 | + | ||
615 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
616 | + | then cP | |
617 | + | else throw("List size exceeds 10") | |
618 | + | ||
619 | + | cR(cO(cO(cO(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
620 | + | } | |
621 | + | let dj = dk._1 | |
622 | + | let dg = dk._2 | |
623 | + | let dl = n((dj - value(dg))) | |
624 | + | if ((cw >= dl)) | |
625 | + | then $Tuple2(nil, $Tuple2(toInt(dj), toInt(fraction(dj, dc, db)))) | |
626 | + | else throw(((((("X calculation error, xDiff = " + toString(dl)) + ", xNext = ") + toString(dj)) + ", xPrev = ") + toString(value(dg)))) | |
627 | + | } | |
628 | + | ||
629 | + | ||
630 | + | ||
631 | + | @Callable(aI) | |
632 | + | func calcSwapXToY (cT,cU,cV,cW,cX,cY,cZ,da) = { | |
633 | + | let cu = toBigInt(2) | |
634 | + | let cv = parseBigIntValue(cY) | |
635 | + | let cw = parseBigIntValue(cZ) | |
636 | + | let db = parseBigIntValue(cU) | |
637 | + | let dc = parseBigIntValue(cV) | |
638 | + | let df = parseBigIntValue(cT) | |
639 | + | let cG = if ((cW == "")) | |
640 | + | then parseBigIntValue({ | |
641 | + | let bN = invoke(this, "calcD", [cU, cV, cX, cY, da], nil) | |
642 | + | if ($isInstanceOf(bN, "String")) | |
643 | + | then bN | |
644 | + | else throw(($getType(invoke(this, "calcD", [cU, cV, cX, cY, da], nil)) + " couldn't be cast to String")) | |
645 | + | }) | |
646 | + | else parseBigIntValue(cW) | |
647 | + | let cz = (parseBigIntValue(cX) * cv) | |
648 | + | let dd = parseBigIntValue(cT) | |
649 | + | let cA = (cz * cu) | |
650 | + | let cB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
651 | + | func cC (cD,cE) = { | |
652 | + | let dm = cD | |
653 | + | let dn = dm._1 | |
654 | + | let do = dm._2 | |
655 | + | let dh = (db + df) | |
656 | + | let di = (dc - dn) | |
657 | + | let cI = (((cG * cG) * cG) / (((dh * di) * cu) * cu)) | |
658 | + | let dp = (dn + ((((((-(cG) * cA) / cv) + cG) + ((cA * (dh + di)) / cv)) - cI) / ((cA / cv) + (cI / di)))) | |
659 | + | $Tuple2(dp, dn) | |
660 | + | } | |
661 | + | ||
662 | + | let dq = { | |
663 | + | let cL = cB | |
664 | + | let cM = size(cL) | |
665 | + | let cN = $Tuple2(d, unit) | |
666 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
667 | + | then cP | |
668 | + | else cC(cP, cL[cQ]) | |
669 | + | ||
670 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
671 | + | then cP | |
672 | + | else throw("List size exceeds 10") | |
673 | + | ||
674 | + | cR(cO(cO(cO(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
675 | + | } | |
676 | + | let dp = dq._1 | |
677 | + | let do = dq._2 | |
678 | + | let dl = n((dp - value(do))) | |
679 | + | if ((cw >= dl)) | |
680 | + | then $Tuple2(nil, toInt(dp)) | |
681 | + | else throw(((((("Y calculation error, yDiff = " + toString(dl)) + ", yNext = ") + toString(dp)) + ", yPrev = ") + toString(value(do)))) | |
682 | + | } | |
683 | + | ||
684 | + | ||
685 | + | ||
686 | + | @Callable(aI) | |
687 | + | func setManager (dr) = { | |
688 | + | let ds = aR(aI) | |
689 | + | if ((ds == ds)) | |
576 | 690 | then { | |
577 | - | let | |
578 | - | if (( | |
579 | - | then [StringEntry( | |
691 | + | let dt = fromBase58String(dr) | |
692 | + | if ((dt == dt)) | |
693 | + | then [StringEntry(aM(), dr)] | |
580 | 694 | else throw("Strict value is not equal to itself.") | |
581 | 695 | } | |
582 | 696 | else throw("Strict value is not equal to itself.") | |
584 | 698 | ||
585 | 699 | ||
586 | 700 | ||
587 | - | @Callable( | |
701 | + | @Callable(aI) | |
588 | 702 | func confirmManager () = { | |
589 | - | let | |
590 | - | let | |
703 | + | let du = aQ() | |
704 | + | let dv = if (isDefined(du)) | |
591 | 705 | then true | |
592 | 706 | else throw("No pending manager") | |
593 | - | if (( | |
707 | + | if ((dv == dv)) | |
594 | 708 | then { | |
595 | - | let | |
709 | + | let dw = if ((aI.callerPublicKey == value(du))) | |
596 | 710 | then true | |
597 | 711 | else throw("You are not pending manager") | |
598 | - | if (( | |
599 | - | then [StringEntry( | |
712 | + | if ((dw == dw)) | |
713 | + | then [StringEntry(aL(), toBase58String(value(du))), DeleteEntry(aM())] | |
600 | 714 | else throw("Strict value is not equal to itself.") | |
601 | 715 | } | |
602 | 716 | else throw("Strict value is not equal to itself.") | |
603 | 717 | } | |
604 | 718 | ||
605 | 719 | ||
606 | - | @Verifier( | |
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | if ($isInstanceOf( | |
720 | + | @Verifier(dx) | |
721 | + | func dy () = { | |
722 | + | let dz = { | |
723 | + | let aO = aN() | |
724 | + | if ($isInstanceOf(aO, "ByteVector")) | |
611 | 725 | then { | |
612 | - | let | |
613 | - | | |
726 | + | let aT = aO | |
727 | + | aT | |
614 | 728 | } | |
615 | - | else if ($isInstanceOf( | |
616 | - | then | |
729 | + | else if ($isInstanceOf(aO, "Unit")) | |
730 | + | then dx.senderPublicKey | |
617 | 731 | else throw("Match error") | |
618 | 732 | } | |
619 | - | sigVerify( | |
733 | + | sigVerify(dx.bodyBytes, dx.proofs[0], dz) | |
620 | 734 | } | |
621 | 735 |
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 = 1000 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = 0 | |
13 | 13 | ||
14 | 14 | let f = 1 | |
15 | 15 | ||
16 | 16 | func g (h) = valueOrElse(getInteger(this, h), 0) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func i (h) = valueOrErrorMessage(getInteger(this, h), (("mandatory this." + h) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func j (h) = valueOrElse(getString(this, h), "") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func k (h) = valueOrErrorMessage(getString(this, h), (("mandatory this." + h) + " is not defined")) | |
26 | 26 | ||
27 | 27 | ||
28 | - | func l (m) = if (( | |
28 | + | func l (m) = if ((0 > m)) | |
29 | 29 | then -(m) | |
30 | 30 | else m | |
31 | 31 | ||
32 | 32 | ||
33 | - | let n = "%s__maxDepth" | |
34 | - | ||
35 | - | let o = 30 | |
36 | - | ||
37 | - | let p = valueOrElse(getInteger(this, n), o) | |
38 | - | ||
39 | - | func q () = "%s%s__config__factoryAddress" | |
33 | + | func n (m) = if ((d > m)) | |
34 | + | then -(m) | |
35 | + | else m | |
40 | 36 | ||
41 | 37 | ||
42 | - | let | |
38 | + | let o = "%s__maxDepth" | |
43 | 39 | ||
44 | - | let | |
40 | + | let p = 30 | |
45 | 41 | ||
46 | - | func t () = "%s%s__config__emissionAddress" | |
42 | + | let q = valueOrElse(getInteger(this, o), p) | |
43 | + | ||
44 | + | func r () = "%s%s__config__factoryAddress" | |
47 | 45 | ||
48 | 46 | ||
49 | - | func u (v) = makeString(["%s%s%s", "mapping", "num2user", toString(v)], a) | |
47 | + | let s = k(r()) | |
48 | + | ||
49 | + | let t = addressFromStringValue(s) | |
50 | + | ||
51 | + | func u () = "%s%s__config__emissionAddress" | |
50 | 52 | ||
51 | 53 | ||
52 | - | let w = makeString(["%s%s", "referral", "programName"], a) | |
53 | - | ||
54 | - | let x = "wxlock" | |
55 | - | ||
56 | - | let y = valueOrElse(getString(this, w), x) | |
57 | - | ||
58 | - | let z = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
59 | - | ||
60 | - | let A = (500 * c) | |
61 | - | ||
62 | - | let B = valueOrElse(getInteger(this, z), A) | |
63 | - | ||
64 | - | let C = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
65 | - | ||
66 | - | let D = 50 | |
67 | - | ||
68 | - | let E = valueOrElse(getInteger(this, C), D) | |
69 | - | ||
70 | - | let F = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
71 | - | ||
72 | - | let G = 50 | |
73 | - | ||
74 | - | let H = valueOrElse(getInteger(this, F), G) | |
75 | - | ||
76 | - | func I (J) = makeString(["%s%s%s", "referrer", y, J], a) | |
54 | + | func v (w) = makeString(["%s%s%s", "mapping", "num2user", toString(w)], a) | |
77 | 55 | ||
78 | 56 | ||
79 | - | func K (L,M) = makeString(["%s%s%s%s", "unclaimedReferral", L, M], a) | |
57 | + | let x = makeString(["%s%s", "referral", "programName"], a) | |
58 | + | ||
59 | + | let y = "wxlock" | |
60 | + | ||
61 | + | let z = valueOrElse(getString(this, x), y) | |
62 | + | ||
63 | + | let A = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
64 | + | ||
65 | + | let B = (500 * c) | |
66 | + | ||
67 | + | let C = valueOrElse(getInteger(this, A), B) | |
68 | + | ||
69 | + | let D = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
70 | + | ||
71 | + | let E = 50 | |
72 | + | ||
73 | + | let F = valueOrElse(getInteger(this, D), E) | |
74 | + | ||
75 | + | let G = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
76 | + | ||
77 | + | let H = 50 | |
78 | + | ||
79 | + | let I = valueOrElse(getInteger(this, G), H) | |
80 | + | ||
81 | + | func J (K) = makeString(["%s%s%s", "referrer", z, K], a) | |
80 | 82 | ||
81 | 83 | ||
82 | - | let N = k(t()) | |
83 | - | ||
84 | - | let O = addressFromStringValue(N) | |
85 | - | ||
86 | - | let P = 1 | |
87 | - | ||
88 | - | let Q = 2 | |
89 | - | ||
90 | - | let R = 3 | |
91 | - | ||
92 | - | let S = 4 | |
93 | - | ||
94 | - | func T () = "%s__config" | |
84 | + | func L (M,N) = makeString(["%s%s%s%s", "unclaimedReferral", M, N], a) | |
95 | 85 | ||
96 | 86 | ||
97 | - | func U () = split(k(T()), a) | |
87 | + | let O = k(u()) | |
88 | + | ||
89 | + | let P = addressFromStringValue(O) | |
90 | + | ||
91 | + | let Q = 1 | |
92 | + | ||
93 | + | let R = 2 | |
94 | + | ||
95 | + | let S = 3 | |
96 | + | ||
97 | + | let T = 4 | |
98 | + | ||
99 | + | func U () = "%s__config" | |
98 | 100 | ||
99 | 101 | ||
100 | - | func V ( | |
102 | + | func V () = split(k(U()), a) | |
101 | 103 | ||
102 | 104 | ||
103 | - | func Z () = { | |
104 | - | let aa = U() | |
105 | - | valueOrErrorMessage(addressFromString(aa[R]), "boosting contract address is not defined") | |
105 | + | func W (X,Y,Z,q) = makeString(["%s%s%s%d", X, Y, Z, toString(q)], a) | |
106 | + | ||
107 | + | ||
108 | + | func aa () = { | |
109 | + | let ab = V() | |
110 | + | valueOrErrorMessage(addressFromString(ab[S]), "boosting contract address is not defined") | |
106 | 111 | } | |
107 | 112 | ||
108 | 113 | ||
109 | - | func | |
114 | + | func ac () = "%s%s__gwxRewardEmissionPart__startHeight" | |
110 | 115 | ||
111 | 116 | ||
112 | - | func | |
117 | + | func ad () = "%s__nextUserNum" | |
113 | 118 | ||
114 | 119 | ||
115 | - | func | |
120 | + | func ae () = "%s%s__ratePerBlock__current" | |
116 | 121 | ||
117 | 122 | ||
118 | - | func | |
123 | + | func af () = "%s%s__poolWeight__GWXvirtualPOOL" | |
119 | 124 | ||
120 | 125 | ||
121 | - | func | |
126 | + | func ag () = "%s__nextProcessedUser" | |
122 | 127 | ||
123 | 128 | ||
124 | - | func | |
129 | + | func ah () = "%s__latestPeriod" | |
125 | 130 | ||
126 | 131 | ||
127 | - | func | |
132 | + | func ai () = "%s__nextPeriod" | |
128 | 133 | ||
129 | 134 | ||
130 | - | func | |
135 | + | func aj () = "%s__processingStage" | |
131 | 136 | ||
132 | 137 | ||
133 | - | func | |
138 | + | func ak () = "%s__nextProcessedPeriod" | |
134 | 139 | ||
135 | 140 | ||
136 | - | func | |
141 | + | func al (am) = makeString(["%s%d", "userUnclaimed", toString(am)], a) | |
137 | 142 | ||
138 | 143 | ||
139 | - | func | |
144 | + | func an (am) = makeString(["%s%d__nextClaimedPeriod", toString(am)], a) | |
140 | 145 | ||
141 | 146 | ||
142 | - | func | |
147 | + | func ao (am) = makeString(["%s%d__lastProcessedPeriod", toString(am)], a) | |
143 | 148 | ||
144 | 149 | ||
145 | - | func | |
150 | + | func ap (aq) = makeString(["%s%d__startHeightForPeriod", toString(aq)], a) | |
146 | 151 | ||
147 | 152 | ||
148 | - | func | |
153 | + | func ar (aq) = makeString(["%s%d__auxEmissionReward", toString(aq)], a) | |
149 | 154 | ||
150 | 155 | ||
151 | - | func | |
156 | + | func as (aq) = makeString(["%s%d__totalAmountForPeriod", toString(aq)], a) | |
152 | 157 | ||
153 | 158 | ||
154 | - | func | |
159 | + | func at () = "%s__lastPayoutInfo" | |
155 | 160 | ||
156 | 161 | ||
157 | - | func | |
162 | + | func au (aq,av,aw) = makeString(["%d%d%d", toString(aq), toString(av), toString(aw)], a) | |
158 | 163 | ||
159 | 164 | ||
160 | - | func | |
165 | + | func ax (aq) = makeString(["%s%s%d__payouts__history", toString(aq)], a) | |
161 | 166 | ||
162 | 167 | ||
163 | - | func | |
168 | + | func ay (aq) = makeString(["%s%d__totalWeightForPeriod", toString(aq)], a) | |
164 | 169 | ||
165 | 170 | ||
166 | - | func | |
171 | + | func az (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "k", toString(aq)], a) | |
167 | 172 | ||
168 | 173 | ||
169 | - | func | |
174 | + | func aA (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "b", toString(aq)], a) | |
170 | 175 | ||
171 | 176 | ||
172 | - | func | |
177 | + | func aB (aq,am) = makeString(["%s%d%s%d__paramByPeriod", toString(am), "weight", toString(aq)], a) | |
173 | 178 | ||
174 | 179 | ||
175 | - | func | |
180 | + | func aC () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
176 | 181 | ||
177 | 182 | ||
178 | - | let | |
183 | + | let aD = addressFromStringValue(k(aC())) | |
179 | 184 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | StringEntry( | |
185 | + | func aE (aF,aG,aH,aI) = { | |
186 | + | let aJ = makeString(["%s%s%s%s__history", aF, aG, toBase58String(aI.transactionId)], a) | |
187 | + | let aK = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aH)], a) | |
188 | + | StringEntry(aJ, aK) | |
184 | 189 | } | |
185 | 190 | ||
186 | 191 | ||
187 | - | func | |
192 | + | func aL () = "%s__managerPublicKey" | |
188 | 193 | ||
189 | 194 | ||
190 | - | func | |
195 | + | func aM () = "%s__pendingManagerPublicKey" | |
191 | 196 | ||
192 | 197 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
198 | + | func aN () = { | |
199 | + | let aO = getString(aL()) | |
200 | + | if ($isInstanceOf(aO, "String")) | |
196 | 201 | then { | |
197 | - | let | |
198 | - | fromBase58String( | |
202 | + | let aP = aO | |
203 | + | fromBase58String(aP) | |
199 | 204 | } | |
200 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(aO, "Unit")) | |
201 | 206 | then unit | |
202 | 207 | else throw("Match error") | |
203 | 208 | } | |
204 | 209 | ||
205 | 210 | ||
206 | - | func | |
207 | - | let | |
208 | - | if ($isInstanceOf( | |
211 | + | func aQ () = { | |
212 | + | let aO = getString(aM()) | |
213 | + | if ($isInstanceOf(aO, "String")) | |
209 | 214 | then { | |
210 | - | let | |
211 | - | fromBase58String( | |
215 | + | let aP = aO | |
216 | + | fromBase58String(aP) | |
212 | 217 | } | |
213 | - | else if ($isInstanceOf( | |
218 | + | else if ($isInstanceOf(aO, "Unit")) | |
214 | 219 | then unit | |
215 | 220 | else throw("Match error") | |
216 | 221 | } | |
217 | 222 | ||
218 | 223 | ||
219 | - | func | |
220 | - | let | |
221 | - | let | |
222 | - | if ($isInstanceOf( | |
224 | + | func aR (aI) = { | |
225 | + | let aS = throw("Permission denied") | |
226 | + | let aO = aN() | |
227 | + | if ($isInstanceOf(aO, "ByteVector")) | |
223 | 228 | then { | |
224 | - | let | |
225 | - | if (( | |
229 | + | let aT = aO | |
230 | + | if ((aI.callerPublicKey == aT)) | |
226 | 231 | then true | |
227 | - | else | |
232 | + | else aS | |
228 | 233 | } | |
229 | - | else if ($isInstanceOf( | |
230 | - | then if (( | |
234 | + | else if ($isInstanceOf(aO, "Unit")) | |
235 | + | then if ((aI.caller == this)) | |
231 | 236 | then true | |
232 | - | else | |
237 | + | else aS | |
233 | 238 | else throw("Match error") | |
234 | 239 | } | |
235 | 240 | ||
236 | 241 | ||
237 | - | func | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | if (isDefined( | |
242 | + | func aU (aV,aW,aq,am) = { | |
243 | + | let aX = ao(am) | |
244 | + | let aY = az(aq, am) | |
245 | + | let aZ = getInteger(aV, aY) | |
246 | + | let ba = aB(aq, am) | |
247 | + | if (isDefined(aZ)) | |
243 | 248 | then { | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | if (( | |
248 | - | then $Tuple2(( | |
249 | + | let bb = value(aZ) | |
250 | + | let bc = value(getInteger(aV, aA(aq, am))) | |
251 | + | let bd = ((bb * aW) + bc) | |
252 | + | if ((bd > 0)) | |
253 | + | then $Tuple2((bd / b), [IntegerEntry(aX, aq), IntegerEntry(ba, bd)]) | |
249 | 254 | else $Tuple2(0, nil) | |
250 | 255 | } | |
251 | 256 | else { | |
252 | - | let | |
253 | - | if (if (isDefined( | |
254 | - | then ( | |
257 | + | let be = getInteger(this, aX) | |
258 | + | if (if (isDefined(be)) | |
259 | + | then (aq >= value(be)) | |
255 | 260 | else false) | |
256 | 261 | then { | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | if (( | |
262 | - | then $Tuple2(( | |
262 | + | let bf = value(be) | |
263 | + | let bb = value(getInteger(aV, az(bf, am))) | |
264 | + | let bc = value(getInteger(aV, aA(bf, am))) | |
265 | + | let bd = ((bb * aW) + bc) | |
266 | + | if ((bd > 0)) | |
267 | + | then $Tuple2((bd / b), [IntegerEntry(ba, bd)]) | |
263 | 268 | else $Tuple2(0, nil) | |
264 | 269 | } | |
265 | 270 | else $Tuple2(0, nil) | |
266 | 271 | } | |
267 | 272 | } | |
268 | 273 | ||
269 | 274 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | if ($isInstanceOf( | |
275 | + | func bg (aV,aW,aq,am) = { | |
276 | + | let ba = aB(aq, am) | |
277 | + | let bh = getInteger(ba) | |
278 | + | let aO = bh | |
279 | + | if ($isInstanceOf(aO, "Unit")) | |
275 | 280 | then 0 | |
276 | - | else if ($isInstanceOf( | |
281 | + | else if ($isInstanceOf(aO, "Int")) | |
277 | 282 | then { | |
278 | - | let | |
279 | - | ( | |
283 | + | let bd = aO | |
284 | + | (bd / b) | |
280 | 285 | } | |
281 | 286 | else throw("Match error") | |
282 | 287 | } | |
283 | 288 | ||
284 | 289 | ||
285 | - | func | |
286 | - | let h = makeString(["%s%s%s", "mapping", "user2num", | |
287 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String( | |
290 | + | func bi (Z,bj) = { | |
291 | + | let h = makeString(["%s%s%s", "mapping", "user2num", bj], a) | |
292 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(Z)), h), ((("User address " + bj) + " is not found in boosting contract data, key=") + h))) | |
288 | 293 | } | |
289 | 294 | ||
290 | 295 | ||
291 | - | func | |
296 | + | func bk () = g(ai()) | |
292 | 297 | ||
293 | 298 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | if ($isInstanceOf( | |
299 | + | func bl (bj) = { | |
300 | + | let ab = V() | |
301 | + | let bm = bi(ab[S], bj) | |
302 | + | let bn = getInteger(al(bm)) | |
303 | + | let aO = bn | |
304 | + | if ($isInstanceOf(aO, "Unit")) | |
300 | 305 | then $Tuple2(0, nil) | |
301 | - | else if ($isInstanceOf( | |
306 | + | else if ($isInstanceOf(aO, "Int")) | |
302 | 307 | then { | |
303 | - | let | |
304 | - | $Tuple2( | |
308 | + | let bo = aO | |
309 | + | $Tuple2(bo, [IntegerEntry(al(bm), 0)]) | |
305 | 310 | } | |
306 | 311 | else throw("Match error") | |
307 | 312 | } | |
308 | 313 | ||
309 | 314 | ||
310 | - | @Callable( | |
311 | - | func updateReferralActivity ( | |
312 | - | let | |
313 | - | let | |
315 | + | @Callable(aI) | |
316 | + | func updateReferralActivity (bj,bp) = { | |
317 | + | let bq = getString(aD, J(bj)) | |
318 | + | let br = if ((bq == unit)) | |
314 | 319 | then unit | |
315 | - | else invoke( | |
316 | - | if (( | |
320 | + | else invoke(aD, "updateReferralActivity", [z, bj, (bp >= C)], nil) | |
321 | + | if ((br == br)) | |
317 | 322 | then $Tuple2(nil, unit) | |
318 | 323 | else throw("Strict value is not equal to itself.") | |
319 | 324 | } | |
320 | 325 | ||
321 | 326 | ||
322 | 327 | ||
323 | - | @Callable( | |
328 | + | @Callable(aI) | |
324 | 329 | func finalizeHelper () = { | |
325 | - | let br = valueOrElse(getInteger(ai()), e) | |
326 | - | let bs = g(aj()) | |
327 | - | let bt = g(af()) | |
330 | + | let bs = valueOrElse(getInteger(aj()), e) | |
331 | + | let bt = g(ak()) | |
328 | 332 | let bu = g(ag()) | |
329 | - | let bv = valueOrElse(getInteger(Z(), ac()), 0) | |
330 | - | let bw = ax(bs) | |
331 | - | let bx = g(ax(bs)) | |
332 | - | let aV = g(ao(bs)) | |
333 | - | if ((bs > bu)) | |
333 | + | let bv = g(ah()) | |
334 | + | let bw = valueOrElse(getInteger(aa(), ad()), 0) | |
335 | + | let bx = ay(bt) | |
336 | + | let by = g(ay(bt)) | |
337 | + | let aW = g(ap(bt)) | |
338 | + | if ((bt > bv)) | |
334 | 339 | then $Tuple2(nil, false) | |
335 | - | else if (( | |
340 | + | else if ((bs == e)) | |
336 | 341 | then { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | then [IntegerEntry( | |
343 | - | else [IntegerEntry( | |
344 | - | $Tuple2((([IntegerEntry( | |
342 | + | let bz = aU(aa(), aW, bt, bu) | |
343 | + | let bA = bz._1 | |
344 | + | let bB = bz._2 | |
345 | + | let bC = (by + bA) | |
346 | + | let bD = if (((bw - 1) > bu)) | |
347 | + | then [IntegerEntry(ag(), (bu + 1))] | |
348 | + | else [IntegerEntry(aj(), f), IntegerEntry(ag(), 0)] | |
349 | + | $Tuple2((([IntegerEntry(bx, bC)] ++ bD) ++ bB), true) | |
345 | 350 | } | |
346 | - | else if (( | |
351 | + | else if ((bs == f)) | |
347 | 352 | then { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
353 | + | let bA = bg(aa(), aW, bt, bu) | |
354 | + | let bE = fraction(g(as(bt)), bA, by) | |
355 | + | let bF = fraction(g(ar(bt)), bA, by) | |
356 | + | let bG = (bF + bE) | |
357 | + | let bn = getInteger(al(bu)) | |
358 | + | let bj = getStringValue(aa(), v(bu)) | |
359 | + | let bq = getString(aD, J(bj)) | |
360 | + | let br = if ((bq == unit)) | |
356 | 361 | then unit | |
357 | - | else invoke( | |
358 | - | if (( | |
362 | + | else invoke(aD, "updateReferralActivity", [z, bj, (bA >= C)], nil) | |
363 | + | if ((br == br)) | |
359 | 364 | then { | |
360 | - | let | |
365 | + | let bH = if (if ((bq == unit)) | |
361 | 366 | then true | |
362 | - | else ( | |
367 | + | else (C > bA)) | |
363 | 368 | then unit | |
364 | 369 | else { | |
365 | - | let | |
366 | - | let | |
367 | - | invoke( | |
370 | + | let bI = fraction(bG, F, b) | |
371 | + | let bJ = fraction(bG, I, b) | |
372 | + | invoke(aD, "incUnclaimed", [z, bj, bI, bJ], nil) | |
368 | 373 | } | |
369 | - | if (( | |
374 | + | if ((bH == bH)) | |
370 | 375 | then { | |
371 | - | let | |
372 | - | let | |
373 | - | then [IntegerEntry( | |
374 | - | else [IntegerEntry( | |
375 | - | $Tuple2(( | |
376 | + | let bK = [IntegerEntry(al(bu), (valueOrElse(bn, 0) + bG))] | |
377 | + | let bD = if (((bw - 1) > bu)) | |
378 | + | then [IntegerEntry(ag(), (bu + 1))] | |
379 | + | else [IntegerEntry(ak(), (bt + 1)), IntegerEntry(ag(), 0), DeleteEntry(aj())] | |
380 | + | $Tuple2((bK ++ bD), true) | |
376 | 381 | } | |
377 | 382 | else throw("Strict value is not equal to itself.") | |
378 | 383 | } | |
379 | 384 | else throw("Strict value is not equal to itself.") | |
380 | 385 | } | |
381 | 386 | else throw("invalid processing stage") | |
382 | 387 | } | |
383 | 388 | ||
384 | 389 | ||
385 | 390 | ||
386 | - | @Callable( | |
387 | - | func finalizeWrapper ( | |
388 | - | let | |
389 | - | let | |
390 | - | if ($isInstanceOf( | |
391 | - | then | |
391 | + | @Callable(aI) | |
392 | + | func finalizeWrapper (bL) = { | |
393 | + | let bM = { | |
394 | + | let bN = invoke(this, "finalizeHelper", nil, nil) | |
395 | + | if ($isInstanceOf(bN, "Boolean")) | |
396 | + | then bN | |
392 | 397 | else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean")) | |
393 | 398 | } | |
394 | - | if (( | |
395 | - | then if (!( | |
396 | - | then if (( | |
399 | + | if ((bM == bM)) | |
400 | + | then if (!(bM)) | |
401 | + | then if ((bL == q)) | |
397 | 402 | then throw("Nothing to process") | |
398 | 403 | else $Tuple2(nil, unit) | |
399 | - | else if (( | |
400 | - | then $Tuple2(nil, invoke(this, "finalizeWrapper", [( | |
404 | + | else if ((bL > 0)) | |
405 | + | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(bL - 1)], nil)) | |
401 | 406 | else $Tuple2(nil, unit) | |
402 | 407 | else throw("Strict value is not equal to itself.") | |
403 | 408 | } | |
404 | 409 | ||
405 | 410 | ||
406 | 411 | ||
407 | - | @Callable( | |
408 | - | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [ | |
412 | + | @Callable(aI) | |
413 | + | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [q], nil)) | |
409 | 414 | ||
410 | 415 | ||
411 | 416 | ||
412 | - | @Callable( | |
417 | + | @Callable(aI) | |
413 | 418 | func deposit () = { | |
414 | - | let | |
415 | - | if (( | |
419 | + | let ab = V() | |
420 | + | if ((aI.caller != Address(fromBase58String(ab[R])))) | |
416 | 421 | then throw("Wrong caller address") | |
417 | 422 | else { | |
418 | - | let | |
419 | - | if (( | |
423 | + | let bO = value(value(aI.payments[0]).assetId) | |
424 | + | if ((bO != fromBase58String(ab[Q]))) | |
420 | 425 | then throw("Wrong payment asset") | |
421 | 426 | else { | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | if (( | |
427 | + | let aq = bk() | |
428 | + | let bP = (height - i(ac())) | |
429 | + | let bQ = valueOrErrorMessage(getInteger(P, ae()), (("mandatory emission_contract." + ae()) + " is not defined")) | |
430 | + | let bR = valueOrErrorMessage(getInteger(t, af()), (("mandatory factory_contract." + af()) + " is not defined")) | |
431 | + | let bS = fraction((bP * bR), bQ, c) | |
432 | + | let bT = invoke(P, "emit", [bS], nil) | |
433 | + | if ((bT == bT)) | |
429 | 434 | then { | |
430 | - | let | |
431 | - | let | |
432 | - | [IntegerEntry( | |
435 | + | let bU = value(aI.payments[0]).amount | |
436 | + | let bV = au(aq, bU, bS) | |
437 | + | [IntegerEntry(ah(), aq), IntegerEntry(ap(aq), height), IntegerEntry(ar(aq), bS), IntegerEntry(ac(), height), IntegerEntry(as(aq), bU), IntegerEntry(ai(), (aq + 1)), StringEntry(at(), bV), StringEntry(ax(aq), bV)] | |
433 | 438 | } | |
434 | 439 | else throw("Strict value is not equal to itself.") | |
435 | 440 | } | |
436 | 441 | } | |
437 | 442 | } | |
438 | 443 | ||
439 | 444 | ||
440 | 445 | ||
441 | - | @Callable( | |
446 | + | @Callable(aI) | |
442 | 447 | func claimReward () = { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
448 | + | let ab = V() | |
449 | + | let bW = toString(aI.caller) | |
450 | + | let bX = bl(bW) | |
451 | + | let aH = bX._1 | |
452 | + | let bY = bX._2 | |
453 | + | let bZ = if ((aH > 0)) | |
449 | 454 | then true | |
450 | 455 | else throw("Nothing to claim") | |
451 | - | if (( | |
456 | + | if ((bZ == bZ)) | |
452 | 457 | then { | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | if ($isInstanceOf( | |
457 | - | then | |
458 | - | else throw(($getType(invoke( | |
458 | + | let ca = 0 | |
459 | + | let cb = { | |
460 | + | let bN = invoke(aD, "claim", [z], nil) | |
461 | + | if ($isInstanceOf(bN, "Int")) | |
462 | + | then bN | |
463 | + | else throw(($getType(invoke(aD, "claim", [z], nil)) + " couldn't be cast to Int")) | |
459 | 464 | } | |
460 | - | let | |
461 | - | $Tuple2(([ScriptTransfer( | |
465 | + | let cc = (aH + cb) | |
466 | + | $Tuple2(([ScriptTransfer(aI.caller, cc, fromBase58String(ab[Q])), aE("claim", bW, aH, aI)] ++ bY), [cc, ca]) | |
462 | 467 | } | |
463 | 468 | else throw("Strict value is not equal to itself.") | |
464 | 469 | } | |
465 | 470 | ||
466 | 471 | ||
467 | 472 | ||
468 | - | @Callable( | |
469 | - | func claimRewardREADONLY ( | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | $Tuple2(nil, | |
473 | + | @Callable(aI) | |
474 | + | func claimRewardREADONLY (bW) = { | |
475 | + | let cd = bl(bW) | |
476 | + | let aH = cd._1 | |
477 | + | let bY = cd._2 | |
478 | + | let ce = valueOrElse(getInteger(aD, L(z, bW)), 0) | |
479 | + | let cc = (aH + ce) | |
480 | + | $Tuple2(nil, cc) | |
476 | 481 | } | |
477 | 482 | ||
478 | 483 | ||
479 | 484 | ||
480 | - | @Callable( | |
481 | - | func latestFinalizedPeriodREADONLY ( | |
485 | + | @Callable(aI) | |
486 | + | func latestFinalizedPeriodREADONLY (bW) = $Tuple2(nil, valueOrElse(getInteger(this, ah()), -1)) | |
482 | 487 | ||
483 | 488 | ||
484 | 489 | ||
485 | - | @Callable( | |
486 | - | func latestFinalizedPeriodInfoREADONLY ( | |
490 | + | @Callable(aI) | |
491 | + | func latestFinalizedPeriodInfoREADONLY (bW) = $Tuple2(nil, j(at())) | |
487 | 492 | ||
488 | 493 | ||
489 | 494 | ||
490 | - | @Callable( | |
491 | - | func calcGwxParamsREADONLY ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | $Tuple2(nil, [ | |
495 | + | @Callable(aI) | |
496 | + | func calcGwxParamsREADONLY (cf,cg,ch) = { | |
497 | + | let ci = (cg + ch) | |
498 | + | let cj = -(fraction(cf, b, ch)) | |
499 | + | let ck = (fraction(cf, b, ch) * ci) | |
500 | + | $Tuple2(nil, [cj, ck, bk()]) | |
496 | 501 | } | |
497 | 502 | ||
498 | 503 | ||
499 | 504 | ||
500 | - | @Callable( | |
501 | - | func calcGwxAmountStartREADONLY ( | |
502 | - | let | |
503 | - | let | |
504 | - | $Tuple2(nil, [ | |
505 | + | @Callable(aI) | |
506 | + | func calcGwxAmountStartREADONLY (cl,cm,cn) = { | |
507 | + | let co = fraction(cm, c, cn) | |
508 | + | let bp = fraction(cl, co, c) | |
509 | + | $Tuple2(nil, [bp]) | |
505 | 510 | } | |
506 | 511 | ||
507 | 512 | ||
508 | 513 | ||
509 | - | @Callable( | |
510 | - | func onEmissionForGwxStart () = if (( | |
514 | + | @Callable(aI) | |
515 | + | func onEmissionForGwxStart () = if ((aI.caller != t)) | |
511 | 516 | then throw("permissions denied") | |
512 | - | else [IntegerEntry( | |
517 | + | else [IntegerEntry(ac(), height)] | |
513 | 518 | ||
514 | 519 | ||
515 | 520 | ||
516 | - | @Callable( | |
517 | - | func latestPeriodEmissionRewardsREADONLY ( | |
518 | - | let | |
519 | - | $Tuple2(nil, [g(aq | |
521 | + | @Callable(aI) | |
522 | + | func latestPeriodEmissionRewardsREADONLY (bW) = { | |
523 | + | let aq = bk() | |
524 | + | $Tuple2(nil, [g(ar(aq))]) | |
520 | 525 | } | |
521 | 526 | ||
522 | 527 | ||
523 | 528 | ||
524 | - | @Callable(aH) | |
525 | - | func calcD (co,cp,cq,cr,cs) = { | |
526 | - | let ct = toBigInt(2) | |
527 | - | let cu = parseBigIntValue(cr) | |
529 | + | @Callable(aI) | |
530 | + | func calcD (cp,cq,cr,cs,ct) = { | |
531 | + | let cu = toBigInt(2) | |
528 | 532 | let cv = parseBigIntValue(cs) | |
529 | - | let cw = parseBigIntValue( | |
533 | + | let cw = parseBigIntValue(ct) | |
530 | 534 | let cx = parseBigIntValue(cp) | |
531 | - | let cy = (parseBigIntValue(cq) * cu) | |
532 | - | let aO = (cw + cx) | |
533 | - | if ((aO == d)) | |
535 | + | let cy = parseBigIntValue(cq) | |
536 | + | let cz = (parseBigIntValue(cr) * cv) | |
537 | + | let aP = (cx + cy) | |
538 | + | if ((aP == d)) | |
534 | 539 | then $Tuple2(nil, toString(d)) | |
535 | 540 | else { | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | $Tuple2( | |
541 | + | let cA = (cz * cu) | |
542 | + | let cB = [1, 2, 3, 4, 5, 6, 7] | |
543 | + | func cC (cD,cE) = { | |
544 | + | let cF = cD | |
545 | + | let cG = cF._1 | |
546 | + | let cH = cF._2 | |
547 | + | let cI = (((cG * cG) * cG) / (((cx * cy) * cu) * cu)) | |
548 | + | let cJ = (((((cA * aP) / cv) + (cI * cu)) * cG) / ((((cA - cv) * cG) / cv) + ((cu + toBigInt(1)) * cI))) | |
549 | + | $Tuple2(cJ, cG) | |
545 | 550 | } | |
546 | 551 | ||
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | func | |
552 | - | then | |
553 | - | else | |
552 | + | let cK = { | |
553 | + | let cL = cB | |
554 | + | let cM = size(cL) | |
555 | + | let cN = $Tuple2(aP, unit) | |
556 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
557 | + | then cP | |
558 | + | else cC(cP, cL[cQ]) | |
554 | 559 | ||
555 | - | func | |
556 | - | then | |
560 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
561 | + | then cP | |
557 | 562 | else throw("List size exceeds 7") | |
558 | 563 | ||
559 | - | | |
564 | + | cR(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7) | |
560 | 565 | } | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | if (( | |
565 | - | then $Tuple2(nil, toString( | |
566 | - | else throw(("D calculation error, dDiff = " + toString( | |
566 | + | let cJ = cK._1 | |
567 | + | let cH = cK._2 | |
568 | + | let cS = n((cJ - value(cH))) | |
569 | + | if ((cw >= cS)) | |
570 | + | then $Tuple2(nil, toString(cJ)) | |
571 | + | else throw(("D calculation error, dDiff = " + toString(cS))) | |
567 | 572 | } | |
568 | 573 | } | |
569 | 574 | ||
570 | 575 | ||
571 | 576 | ||
572 | - | @Callable(aH) | |
573 | - | func setManager (cS) = { | |
574 | - | let cT = aQ(aH) | |
575 | - | if ((cT == cT)) | |
577 | + | @Callable(aI) | |
578 | + | func calcPutXOnly (cT,cU,cV,cW,cX,cY,cZ,da) = { | |
579 | + | let cu = toBigInt(2) | |
580 | + | let cv = parseBigIntValue(cY) | |
581 | + | let cw = parseBigIntValue(cZ) | |
582 | + | let db = parseBigIntValue(cU) | |
583 | + | let dc = parseBigIntValue(cV) | |
584 | + | let cG = if ((cW == "")) | |
585 | + | then parseBigIntValue({ | |
586 | + | let bN = invoke(this, "calcD", [cU, cV, cX, cY, da], nil) | |
587 | + | if ($isInstanceOf(bN, "String")) | |
588 | + | then bN | |
589 | + | else throw(($getType(invoke(this, "calcD", [cU, cV, cX, cY, da], nil)) + " couldn't be cast to String")) | |
590 | + | }) | |
591 | + | else parseBigIntValue(cW) | |
592 | + | let cz = (parseBigIntValue(cX) * cv) | |
593 | + | let dd = parseBigIntValue(cT) | |
594 | + | let cA = (cz * cu) | |
595 | + | let cB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
596 | + | func cC (cD,cE) = { | |
597 | + | let de = cD | |
598 | + | let df = de._1 | |
599 | + | let dg = de._2 | |
600 | + | let dh = ((db + dd) - df) | |
601 | + | let di = (dc - ((df * dc) / db)) | |
602 | + | let cI = (((cG * cG) * cG) / (((dh * di) * cu) * cu)) | |
603 | + | let dj = (df + ((((((-(cG) * cA) / cv) + cG) + ((cA * (dh + di)) / cv)) - cI) / ((((-(cA) * (toBigInt(-1) - (dc / db))) / cv) + (cI / dh)) + ((dc * cI) / (db * di))))) | |
604 | + | $Tuple2(dj, df) | |
605 | + | } | |
606 | + | ||
607 | + | let dk = { | |
608 | + | let cL = cB | |
609 | + | let cM = size(cL) | |
610 | + | let cN = $Tuple2(d, unit) | |
611 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
612 | + | then cP | |
613 | + | else cC(cP, cL[cQ]) | |
614 | + | ||
615 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
616 | + | then cP | |
617 | + | else throw("List size exceeds 10") | |
618 | + | ||
619 | + | cR(cO(cO(cO(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
620 | + | } | |
621 | + | let dj = dk._1 | |
622 | + | let dg = dk._2 | |
623 | + | let dl = n((dj - value(dg))) | |
624 | + | if ((cw >= dl)) | |
625 | + | then $Tuple2(nil, $Tuple2(toInt(dj), toInt(fraction(dj, dc, db)))) | |
626 | + | else throw(((((("X calculation error, xDiff = " + toString(dl)) + ", xNext = ") + toString(dj)) + ", xPrev = ") + toString(value(dg)))) | |
627 | + | } | |
628 | + | ||
629 | + | ||
630 | + | ||
631 | + | @Callable(aI) | |
632 | + | func calcSwapXToY (cT,cU,cV,cW,cX,cY,cZ,da) = { | |
633 | + | let cu = toBigInt(2) | |
634 | + | let cv = parseBigIntValue(cY) | |
635 | + | let cw = parseBigIntValue(cZ) | |
636 | + | let db = parseBigIntValue(cU) | |
637 | + | let dc = parseBigIntValue(cV) | |
638 | + | let df = parseBigIntValue(cT) | |
639 | + | let cG = if ((cW == "")) | |
640 | + | then parseBigIntValue({ | |
641 | + | let bN = invoke(this, "calcD", [cU, cV, cX, cY, da], nil) | |
642 | + | if ($isInstanceOf(bN, "String")) | |
643 | + | then bN | |
644 | + | else throw(($getType(invoke(this, "calcD", [cU, cV, cX, cY, da], nil)) + " couldn't be cast to String")) | |
645 | + | }) | |
646 | + | else parseBigIntValue(cW) | |
647 | + | let cz = (parseBigIntValue(cX) * cv) | |
648 | + | let dd = parseBigIntValue(cT) | |
649 | + | let cA = (cz * cu) | |
650 | + | let cB = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
651 | + | func cC (cD,cE) = { | |
652 | + | let dm = cD | |
653 | + | let dn = dm._1 | |
654 | + | let do = dm._2 | |
655 | + | let dh = (db + df) | |
656 | + | let di = (dc - dn) | |
657 | + | let cI = (((cG * cG) * cG) / (((dh * di) * cu) * cu)) | |
658 | + | let dp = (dn + ((((((-(cG) * cA) / cv) + cG) + ((cA * (dh + di)) / cv)) - cI) / ((cA / cv) + (cI / di)))) | |
659 | + | $Tuple2(dp, dn) | |
660 | + | } | |
661 | + | ||
662 | + | let dq = { | |
663 | + | let cL = cB | |
664 | + | let cM = size(cL) | |
665 | + | let cN = $Tuple2(d, unit) | |
666 | + | func cO (cP,cQ) = if ((cQ >= cM)) | |
667 | + | then cP | |
668 | + | else cC(cP, cL[cQ]) | |
669 | + | ||
670 | + | func cR (cP,cQ) = if ((cQ >= cM)) | |
671 | + | then cP | |
672 | + | else throw("List size exceeds 10") | |
673 | + | ||
674 | + | cR(cO(cO(cO(cO(cO(cO(cO(cO(cO(cO(cN, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
675 | + | } | |
676 | + | let dp = dq._1 | |
677 | + | let do = dq._2 | |
678 | + | let dl = n((dp - value(do))) | |
679 | + | if ((cw >= dl)) | |
680 | + | then $Tuple2(nil, toInt(dp)) | |
681 | + | else throw(((((("Y calculation error, yDiff = " + toString(dl)) + ", yNext = ") + toString(dp)) + ", yPrev = ") + toString(value(do)))) | |
682 | + | } | |
683 | + | ||
684 | + | ||
685 | + | ||
686 | + | @Callable(aI) | |
687 | + | func setManager (dr) = { | |
688 | + | let ds = aR(aI) | |
689 | + | if ((ds == ds)) | |
576 | 690 | then { | |
577 | - | let | |
578 | - | if (( | |
579 | - | then [StringEntry( | |
691 | + | let dt = fromBase58String(dr) | |
692 | + | if ((dt == dt)) | |
693 | + | then [StringEntry(aM(), dr)] | |
580 | 694 | else throw("Strict value is not equal to itself.") | |
581 | 695 | } | |
582 | 696 | else throw("Strict value is not equal to itself.") | |
583 | 697 | } | |
584 | 698 | ||
585 | 699 | ||
586 | 700 | ||
587 | - | @Callable( | |
701 | + | @Callable(aI) | |
588 | 702 | func confirmManager () = { | |
589 | - | let | |
590 | - | let | |
703 | + | let du = aQ() | |
704 | + | let dv = if (isDefined(du)) | |
591 | 705 | then true | |
592 | 706 | else throw("No pending manager") | |
593 | - | if (( | |
707 | + | if ((dv == dv)) | |
594 | 708 | then { | |
595 | - | let | |
709 | + | let dw = if ((aI.callerPublicKey == value(du))) | |
596 | 710 | then true | |
597 | 711 | else throw("You are not pending manager") | |
598 | - | if (( | |
599 | - | then [StringEntry( | |
712 | + | if ((dw == dw)) | |
713 | + | then [StringEntry(aL(), toBase58String(value(du))), DeleteEntry(aM())] | |
600 | 714 | else throw("Strict value is not equal to itself.") | |
601 | 715 | } | |
602 | 716 | else throw("Strict value is not equal to itself.") | |
603 | 717 | } | |
604 | 718 | ||
605 | 719 | ||
606 | - | @Verifier( | |
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | if ($isInstanceOf( | |
720 | + | @Verifier(dx) | |
721 | + | func dy () = { | |
722 | + | let dz = { | |
723 | + | let aO = aN() | |
724 | + | if ($isInstanceOf(aO, "ByteVector")) | |
611 | 725 | then { | |
612 | - | let | |
613 | - | | |
726 | + | let aT = aO | |
727 | + | aT | |
614 | 728 | } | |
615 | - | else if ($isInstanceOf( | |
616 | - | then | |
729 | + | else if ($isInstanceOf(aO, "Unit")) | |
730 | + | then dx.senderPublicKey | |
617 | 731 | else throw("Match error") | |
618 | 732 | } | |
619 | - | sigVerify( | |
733 | + | sigVerify(dx.bodyBytes, dx.proofs[0], dz) | |
620 | 734 | } | |
621 | 735 |
github/deemru/w8io/026f985 197.28 ms ◑