tx · EhLahnhRAZ4g4PS9GUxs3p4vafZ89q8j6Q1rkR5PjEA 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.01600000 Waves 2023.08.31 11:56 [2734645] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "EhLahnhRAZ4g4PS9GUxs3p4vafZ89q8j6Q1rkR5PjEA", "fee": 1600000, "feeAssetId": null, "timestamp": 1693472237591, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "4tKaMVp6fkJBjJPjgDoRgjt1fJHZjJoWERRc19HVDPTVe5TxZaEMPeMYwdZ61xin71545oPcqdYjpoqEudWWJYEV" ], "script": "base64:BgLZFggCEgQKAgIBEgYKBAEYEQESBAoCCAESABIAEgMKAQgSABIECgIYERIAEgMKAQgSAwoBBCIDU0VQIgVTQ0FMRSIFTVVMVDgiB01VTFQ4QkkiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiBk1VTFQxOCIITVVMVDE4QkkiC3dhdmVzU3RyaW5nIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiA2FicyIDdmFsIglhYnNCaWdJbnQiC2tleU1heERlcHRoIg9tYXhEZXB0aERlZmF1bHQiCG1heERlcHRoIhFrZXlGYWN0b3J5QWRkcmVzcyIRZmFjdG9yeUFkZHJlc3NTdHIiD2ZhY3RvcnlDb250cmFjdCISa2V5RW1pc3Npb25BZGRyZXNzIhlrZXlWb3RpbmdFbWlzc2lvbkNvbnRyYWN0I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XRzZWxmLgECY2wBAmNtAAQCY24EAmFTCQECYVUAAwkAAQIFAmFTAgpCeXRlVmVjdG9yBAJhWQUCYVMFAmFZAwkAAQIFAmFTAgRVbml0CAUCY2wPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmNsCWJvZHlCeXRlcwkAkQMCCAUCY2wGcHJvb2ZzAAAFAmNuZJQbEQ==", "height": 2734645, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G6fZHDhXeatGFoj34kPv9VhdwkiimeX6CM7cG5843yyL Next: 7NvuJ4KAwoJojGajdTuS9iD8jBXST7tKbdzaxaDqENZV Diff:
Old | New | Differences | |
---|---|---|---|
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | - | func aq () = "%s%s__gwxRewardEmissionPart__startHeight" | |
147 | + | let aq = "%s__suspension" | |
148 | + | ||
149 | + | let ar = valueOrElse(getBoolean(this, aq), false) | |
150 | + | ||
151 | + | func as () = if (!(ar)) | |
152 | + | then true | |
153 | + | else m("suspended") | |
148 | 154 | ||
149 | 155 | ||
150 | - | func | |
156 | + | func at () = "%s%s__gwxRewardEmissionPart__startHeight" | |
151 | 157 | ||
152 | 158 | ||
153 | - | func | |
159 | + | func au () = "%s__nextUserNum" | |
154 | 160 | ||
155 | 161 | ||
156 | - | func | |
162 | + | func av (aw) = makeString(["%s%s%s__mapping__user2num", toString(aw)], a) | |
157 | 163 | ||
158 | 164 | ||
159 | - | func | |
165 | + | func ax () = "%s%s__ratePerBlock__current" | |
160 | 166 | ||
161 | 167 | ||
162 | - | func | |
168 | + | func ay () = "%s%s__gwxHoldersReward__current" | |
163 | 169 | ||
164 | 170 | ||
165 | - | func | |
171 | + | func az () = "%s%s__gwxHoldersReward__next" | |
166 | 172 | ||
167 | 173 | ||
168 | - | func | |
174 | + | func aA () = "%s%s__poolWeight__GWXvirtualPOOL" | |
169 | 175 | ||
170 | 176 | ||
171 | - | func | |
177 | + | func aB (aC) = makeString(["%s%d", "userUnclaimed", toString(aC)], a) | |
172 | 178 | ||
173 | 179 | ||
174 | - | let aB = addressFromStringValue(r(aA())) | |
175 | - | ||
176 | - | func aC (aD,aE) = makeString(["%s%s%s%s", "tradingReward", "history", aD, toBase58String(aE.transactionId)], a) | |
180 | + | func aD () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
177 | 181 | ||
178 | 182 | ||
179 | - | func aF (at) = makeString(["%s%s", "tradingReward", at], a) | |
183 | + | let aE = addressFromStringValue(r(aD())) | |
184 | + | ||
185 | + | func aF (aG,aH) = makeString(["%s%s%s%s", "tradingReward", "history", aG, toBase58String(aH.transactionId)], a) | |
180 | 186 | ||
181 | 187 | ||
182 | - | func | |
188 | + | func aI (aw) = makeString(["%s%s", "tradingReward", aw], a) | |
183 | 189 | ||
184 | 190 | ||
185 | - | func aH (aI,aD,aJ,aE) = { | |
186 | - | let aK = makeString(["%s%s%s%s__history", aI, aD, toBase58String(aE.transactionId)], a) | |
187 | - | let aL = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aJ)], a) | |
188 | - | StringEntry(aK, aL) | |
191 | + | func aJ () = makeString(["%s", "maxRecipients"], a) | |
192 | + | ||
193 | + | ||
194 | + | func aK (aL,aG,aM,aH) = { | |
195 | + | let aN = makeString(["%s%s%s%s__history", aL, aG, toBase58String(aH.transactionId)], a) | |
196 | + | let aO = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aM)], a) | |
197 | + | StringEntry(aN, aO) | |
189 | 198 | } | |
190 | 199 | ||
191 | 200 | ||
192 | - | func | |
201 | + | func aP () = "%s__managerPublicKey" | |
193 | 202 | ||
194 | 203 | ||
195 | - | func | |
204 | + | func aQ () = "%s__managerVaultAddress" | |
196 | 205 | ||
197 | 206 | ||
198 | - | func | |
199 | - | let | |
200 | - | if ($isInstanceOf( | |
207 | + | func aR () = { | |
208 | + | let aS = getString(aQ()) | |
209 | + | if ($isInstanceOf(aS, "String")) | |
201 | 210 | then { | |
202 | - | let | |
203 | - | addressFromStringValue( | |
211 | + | let aT = aS | |
212 | + | addressFromStringValue(aT) | |
204 | 213 | } | |
205 | 214 | else this | |
206 | 215 | } | |
207 | 216 | ||
208 | 217 | ||
209 | - | func | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
218 | + | func aU () = { | |
219 | + | let aV = aR() | |
220 | + | let aS = getString(aV, aP()) | |
221 | + | if ($isInstanceOf(aS, "String")) | |
213 | 222 | then { | |
214 | - | let | |
215 | - | fromBase58String( | |
223 | + | let aT = aS | |
224 | + | fromBase58String(aT) | |
216 | 225 | } | |
217 | - | else if ($isInstanceOf( | |
226 | + | else if ($isInstanceOf(aS, "Unit")) | |
218 | 227 | then unit | |
219 | 228 | else throw("Match error") | |
220 | 229 | } | |
221 | 230 | ||
222 | 231 | ||
223 | - | func | |
224 | - | let | |
225 | - | let | |
226 | - | if ($isInstanceOf( | |
232 | + | func aW (aH) = { | |
233 | + | let aX = throw("Permission denied") | |
234 | + | let aS = aU() | |
235 | + | if ($isInstanceOf(aS, "ByteVector")) | |
227 | 236 | then { | |
228 | - | let | |
229 | - | if (( | |
237 | + | let aY = aS | |
238 | + | if ((aH.callerPublicKey == aY)) | |
230 | 239 | then true | |
231 | - | else | |
240 | + | else aX | |
232 | 241 | } | |
233 | - | else if ($isInstanceOf( | |
234 | - | then if (( | |
242 | + | else if ($isInstanceOf(aS, "Unit")) | |
243 | + | then if ((aH.caller == this)) | |
235 | 244 | then true | |
236 | - | else | |
245 | + | else aX | |
237 | 246 | else throw("Match error") | |
238 | 247 | } | |
239 | 248 | ||
240 | 249 | ||
241 | - | func | |
242 | - | let o = makeString(["%s%s%s", "mapping", "user2num", | |
243 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + | |
250 | + | func aZ (an,aw) = { | |
251 | + | let o = makeString(["%s%s%s", "mapping", "user2num", aw], a) | |
252 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + aw) + " is not found in boosting contract data, key=") + o))) | |
244 | 253 | } | |
245 | 254 | ||
246 | 255 | ||
247 | - | func | |
256 | + | func ba (aw) = valueOrElse(getInteger(this, aI(aw)), 0) | |
248 | 257 | ||
249 | 258 | ||
250 | - | func | |
259 | + | func bb () = makeString(["%s", "rewardPerGwxIntegral"], a) | |
251 | 260 | ||
252 | 261 | ||
253 | - | func | |
254 | - | let | |
255 | - | getInteger(ao(), | |
262 | + | func bc () = { | |
263 | + | let bd = "%s%s__gwx__total" | |
264 | + | getInteger(ao(), bd) | |
256 | 265 | } | |
257 | 266 | ||
258 | 267 | ||
259 | - | func | |
260 | - | func | |
268 | + | func be (aw) = { | |
269 | + | func bf (aw) = makeString(["%s%s__gwxAmountTotal", toString(aw)], a) | |
261 | 270 | ||
262 | - | getInteger(ao(), | |
271 | + | getInteger(ao(), bf(aw)) | |
263 | 272 | } | |
264 | 273 | ||
265 | 274 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | if ($isInstanceOf( | |
275 | + | func bg () = { | |
276 | + | let bh = valueOrElse({ | |
277 | + | let aS = getString(this, bb()) | |
278 | + | if ($isInstanceOf(aS, "String")) | |
270 | 279 | then { | |
271 | - | let | |
272 | - | parseBigInt( | |
280 | + | let aT = aS | |
281 | + | parseBigInt(aT) | |
273 | 282 | } | |
274 | - | else if ($isInstanceOf( | |
283 | + | else if ($isInstanceOf(aS, "Unit")) | |
275 | 284 | then unit | |
276 | 285 | else throw("Match error") | |
277 | 286 | }, e) | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
287 | + | let bi = valueOrErrorMessage(getInteger(this, at()), k(("invalid " + at()))) | |
288 | + | let bj = valueOrErrorMessage(getInteger(aa, ax()), k(("invalid " + ax()))) | |
289 | + | let bk = valueOrElse(getInteger(aa, ay()), 0) | |
290 | + | let bl = valueOrElse(bc(), 0) | |
291 | + | let bm = toBigInt((height - bi)) | |
292 | + | let bn = toBigInt(bl) | |
293 | + | let bo = (bh + (if ((bn == e)) | |
285 | 294 | then e | |
286 | - | else fraction( | |
287 | - | $Tuple2([IntegerEntry( | |
295 | + | else fraction(bm, ((toBigInt(bj) * toBigInt(bk)) * i), (bn * d)))) | |
296 | + | $Tuple2([IntegerEntry(at(), height), StringEntry(bb(), toString(bo))], bo) | |
288 | 297 | } | |
289 | 298 | ||
290 | 299 | ||
291 | - | func | |
300 | + | func bp (aw) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aw)], a) | |
292 | 301 | ||
293 | 302 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if ($isInstanceOf( | |
303 | + | func bq (aw,br) = { | |
304 | + | let bs = bg() | |
305 | + | let bt = bs._1 | |
306 | + | let bo = bs._2 | |
307 | + | let bu = { | |
308 | + | let aS = getString(this, bp(aw)) | |
309 | + | if ($isInstanceOf(aS, "String")) | |
301 | 310 | then { | |
302 | - | let | |
303 | - | valueOrErrorMessage(parseBigInt( | |
311 | + | let aT = aS | |
312 | + | valueOrErrorMessage(parseBigInt(aT), k("invalid user last integral")) | |
304 | 313 | } | |
305 | - | else if ($isInstanceOf( | |
306 | - | then | |
314 | + | else if ($isInstanceOf(aS, "Unit")) | |
315 | + | then bo | |
307 | 316 | else throw("Match error") | |
308 | 317 | } | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | $Tuple2(([StringEntry( | |
318 | + | let bv = getString(ao(), av(aw)) | |
319 | + | let bw = valueOrElse(getInteger(aB(br)), 0) | |
320 | + | let bx = valueOrElse(be(aw), 0) | |
321 | + | let by = (toInt(fraction(toBigInt(bx), (bo - bu), i)) + bw) | |
322 | + | $Tuple2(([StringEntry(bp(aw), toString(bo))] ++ bt), by) | |
314 | 323 | } | |
315 | 324 | ||
316 | 325 | ||
317 | - | func | |
318 | - | let | |
326 | + | func bz (bA) = { | |
327 | + | let aw = valueOrErrorMessage(addressFromString(bA), k("invalid user address")) | |
319 | 328 | let ap = ak() | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | $Tuple2( | |
329 | + | let br = aZ(ap[ad], bA) | |
330 | + | let bB = bq(aw, br) | |
331 | + | let bC = bB._1 | |
332 | + | let bD = bB._2 | |
333 | + | $Tuple2(bD, ([IntegerEntry(aB(br), 0)] ++ bC)) | |
325 | 334 | } | |
326 | 335 | ||
327 | 336 | ||
328 | - | @Callable(aE) | |
329 | - | func refreshUserReward (bB,bo) = { | |
330 | - | let bC = if ((aE.caller == ao())) | |
331 | - | then true | |
332 | - | else m("permission denied") | |
333 | - | if ((bC == bC)) | |
337 | + | @Callable(aH) | |
338 | + | func refreshUserReward (bE,br) = { | |
339 | + | let bF = as() | |
340 | + | if ((bF == bF)) | |
334 | 341 | then { | |
335 | - | let bD = bn(Address(bB), bo) | |
336 | - | let bz = bD._1 | |
337 | - | let bA = bD._2 | |
338 | - | $Tuple2(([IntegerEntry(ay(bo), bA)] ++ bz), bA) | |
342 | + | let bG = if ((aH.caller == ao())) | |
343 | + | then true | |
344 | + | else m("permission denied") | |
345 | + | if ((bG == bG)) | |
346 | + | then { | |
347 | + | let bH = bq(Address(bE), br) | |
348 | + | let bC = bH._1 | |
349 | + | let bD = bH._2 | |
350 | + | $Tuple2(([IntegerEntry(aB(br), bD)] ++ bC), bD) | |
351 | + | } | |
352 | + | else throw("Strict value is not equal to itself.") | |
339 | 353 | } | |
340 | 354 | else throw("Strict value is not equal to itself.") | |
341 | 355 | } | |
342 | 356 | ||
343 | 357 | ||
344 | 358 | ||
345 | - | @Callable( | |
346 | - | func tradeRewardInternal ( | |
347 | - | | |
348 | - | | |
349 | - | | |
350 | - | then | |
351 | - | else | |
352 | - | | |
353 | - | | |
354 | - | if ((bI | |
355 | - | then | |
356 | - | | |
357 | - | if (( | |
359 | + | @Callable(aH) | |
360 | + | func tradeRewardInternal (bI,bJ,bK,bL) = { | |
361 | + | let bF = as() | |
362 | + | if ((bF == bF)) | |
363 | + | then if ((bL == size(bJ))) | |
364 | + | then nil | |
365 | + | else { | |
366 | + | let bM = [if ((aH.caller == this)) | |
367 | + | then true | |
368 | + | else m("Permission denied"), if ((bI >= bK[bL])) | |
369 | + | then true | |
370 | + | else m("insufficient payment assetId")] | |
371 | + | if ((bM == bM)) | |
358 | 372 | then { | |
359 | - | let bK = aC(bF[bH], aE) | |
360 | - | let at = addressFromStringValue(bF[bH]) | |
361 | - | $Tuple2([IntegerEntry(bK, bG[bH]), IntegerEntry(aF(bF[bH]), bG[bH])], bJ) | |
373 | + | let bN = invoke(this, "tradeRewardInternal", [(bI - bK[bL]), bJ, bK, (bL + 1)], nil) | |
374 | + | if ((bN == bN)) | |
375 | + | then { | |
376 | + | let bO = aF(bJ[bL], aH) | |
377 | + | let aw = addressFromStringValue(bJ[bL]) | |
378 | + | $Tuple2([IntegerEntry(bO, bK[bL]), IntegerEntry(aI(bJ[bL]), bK[bL])], bN) | |
379 | + | } | |
380 | + | else throw("Strict value is not equal to itself.") | |
362 | 381 | } | |
363 | 382 | else throw("Strict value is not equal to itself.") | |
364 | 383 | } | |
365 | - | else throw("Strict value is not equal to itself.") | |
366 | - | } | |
367 | - | ||
368 | - | ||
369 | - | ||
370 | - | @Callable(aE) | |
371 | - | func updateReferralActivity (at,bL) = { | |
372 | - | let bM = getString(aB, U(at)) | |
373 | - | let bN = if ((bM == unit)) | |
374 | - | then unit | |
375 | - | else invoke(aB, "updateReferralActivity", [K, at, (bL >= N)], nil) | |
376 | - | if ((bN == bN)) | |
377 | - | then $Tuple2(nil, unit) | |
378 | 384 | else throw("Strict value is not equal to itself.") | |
379 | 385 | } | |
380 | 386 | ||
381 | 387 | ||
382 | 388 | ||
383 | - | @Callable(aE) | |
389 | + | @Callable(aH) | |
390 | + | func updateReferralActivity (aw,bP) = { | |
391 | + | let bF = as() | |
392 | + | if ((bF == bF)) | |
393 | + | then { | |
394 | + | let bQ = getString(aE, U(aw)) | |
395 | + | let bR = if ((bQ == unit)) | |
396 | + | then unit | |
397 | + | else invoke(aE, "updateReferralActivity", [K, aw, (bP >= N)], nil) | |
398 | + | if ((bR == bR)) | |
399 | + | then $Tuple2(nil, unit) | |
400 | + | else throw("Strict value is not equal to itself.") | |
401 | + | } | |
402 | + | else throw("Strict value is not equal to itself.") | |
403 | + | } | |
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | @Callable(aH) | |
384 | 408 | func processPendingPeriodsAndUsers () = $Tuple2(nil, m("deprecated")) | |
385 | 409 | ||
386 | 410 | ||
387 | 411 | ||
388 | - | @Callable( | |
412 | + | @Callable(aH) | |
389 | 413 | func claimReward () = { | |
390 | - | let ap = ak() | |
391 | - | let at = aE.caller | |
392 | - | let bx = toString(at) | |
393 | - | let bO = bw(bx) | |
394 | - | let aJ = bO._1 | |
395 | - | let bz = bO._2 | |
396 | - | let bP = if ((aJ > 0)) | |
397 | - | then true | |
398 | - | else throw("nothing to claim") | |
399 | - | if ((bP == bP)) | |
414 | + | let bF = as() | |
415 | + | if ((bF == bF)) | |
400 | 416 | then { | |
401 | - | let bu = { | |
402 | - | let bQ = invoke(ao(), "getUserGwxAmount", [bx], nil) | |
403 | - | if ($isInstanceOf(bQ, "Int")) | |
404 | - | then bQ | |
405 | - | else throw(($getType(bQ) + " couldn't be cast to Int")) | |
406 | - | } | |
407 | - | let bM = getString(aB, U(bx)) | |
408 | - | let bN = if ((bM == unit)) | |
409 | - | then unit | |
410 | - | else invoke(aB, "updateReferralActivity", [K, at, (bu >= N)], nil) | |
411 | - | if ((bN == bN)) | |
417 | + | let ap = ak() | |
418 | + | let aw = aH.caller | |
419 | + | let bA = toString(aw) | |
420 | + | let bS = bz(bA) | |
421 | + | let aM = bS._1 | |
422 | + | let bC = bS._2 | |
423 | + | let bT = if ((aM > 0)) | |
424 | + | then true | |
425 | + | else throw("nothing to claim") | |
426 | + | if ((bT == bT)) | |
412 | 427 | then { | |
413 | - | let bR = if (if ((bM == unit)) | |
414 | - | then true | |
415 | - | else (N > bu)) | |
428 | + | let bx = { | |
429 | + | let bU = invoke(ao(), "getUserGwxAmount", [bA], nil) | |
430 | + | if ($isInstanceOf(bU, "Int")) | |
431 | + | then bU | |
432 | + | else throw(($getType(bU) + " couldn't be cast to Int")) | |
433 | + | } | |
434 | + | let bQ = getString(aE, U(bA)) | |
435 | + | let bR = if ((bQ == unit)) | |
416 | 436 | then unit | |
417 | - | else { | |
418 | - | let bS = fraction(aJ, Q, b) | |
419 | - | let bT = fraction(aJ, T, b) | |
420 | - | invoke(aB, "incUnclaimed", [K, at, bS, bT], nil) | |
421 | - | } | |
437 | + | else invoke(aE, "updateReferralActivity", [K, aw, (bx >= N)], nil) | |
422 | 438 | if ((bR == bR)) | |
423 | 439 | then { | |
424 | - | let bU = invoke(aa, "emit", [aJ], nil) | |
425 | - | if ((bU == bU)) | |
440 | + | let bV = if (if ((bQ == unit)) | |
441 | + | then true | |
442 | + | else (N > bx)) | |
443 | + | then unit | |
444 | + | else { | |
445 | + | let bW = fraction(aM, Q, b) | |
446 | + | let bX = fraction(aM, T, b) | |
447 | + | invoke(aE, "incUnclaimed", [K, aw, bW, bX], nil) | |
448 | + | } | |
449 | + | if ((bV == bV)) | |
426 | 450 | then { | |
427 | - | let bV = { | |
428 | - | let bQ = invoke(aB, "claim", [K], nil) | |
429 | - | if ($isInstanceOf(bQ, "Int")) | |
430 | - | then bQ | |
431 | - | else throw(($getType(bQ) + " couldn't be cast to Int")) | |
432 | - | } | |
433 | - | if ((bV == bV)) | |
451 | + | let bY = invoke(aa, "emit", [aM], nil) | |
452 | + | if ((bY == bY)) | |
434 | 453 | then { | |
435 | - | let bW = (aJ + bV) | |
436 | - | $Tuple2(([ScriptTransfer(aE.caller, aJ, aj), aH("claim", bx, bW, aE)] ++ bz), bW) | |
454 | + | let bZ = { | |
455 | + | let bU = invoke(aE, "claim", [K], nil) | |
456 | + | if ($isInstanceOf(bU, "Int")) | |
457 | + | then bU | |
458 | + | else throw(($getType(bU) + " couldn't be cast to Int")) | |
459 | + | } | |
460 | + | if ((bZ == bZ)) | |
461 | + | then { | |
462 | + | let ca = (aM + bZ) | |
463 | + | $Tuple2(([ScriptTransfer(aH.caller, aM, aj), aK("claim", bA, ca, aH)] ++ bC), ca) | |
464 | + | } | |
465 | + | else throw("Strict value is not equal to itself.") | |
437 | 466 | } | |
438 | 467 | else throw("Strict value is not equal to itself.") | |
439 | 468 | } | |
448 | 477 | ||
449 | 478 | ||
450 | 479 | ||
451 | - | @Callable( | |
452 | - | func claimRewardREADONLY ( | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | $Tuple2(nil, | |
480 | + | @Callable(aH) | |
481 | + | func claimRewardREADONLY (cb) = { | |
482 | + | let cc = bz(cb) | |
483 | + | let aM = cc._1 | |
484 | + | let bC = cc._2 | |
485 | + | let cd = valueOrElse(getInteger(aE, W(K, cb)), 0) | |
486 | + | let ca = (aM + cd) | |
487 | + | $Tuple2(nil, ca) | |
459 | 488 | } | |
460 | 489 | ||
461 | 490 | ||
462 | 491 | ||
463 | - | @Callable(aE) | |
464 | - | func onEmissionForGwxStart () = if ((aE.caller != C)) | |
465 | - | then throw("permissions denied") | |
466 | - | else [IntegerEntry(aq(), height)] | |
492 | + | @Callable(aH) | |
493 | + | func onEmissionForGwxStart () = { | |
494 | + | let bF = as() | |
495 | + | if ((bF == bF)) | |
496 | + | then if ((aH.caller != C)) | |
497 | + | then throw("permissions denied") | |
498 | + | else [IntegerEntry(at(), height)] | |
499 | + | else throw("Strict value is not equal to itself.") | |
500 | + | } | |
467 | 501 | ||
468 | 502 | ||
469 | 503 | ||
470 | - | @Callable(aE) | |
471 | - | func tradeReward (bF,bG) = { | |
472 | - | let ca = (size(bF) == size(bG)) | |
473 | - | let cb = valueOrElse(getInteger(aG()), 0) | |
474 | - | let cc = aE.payments[0] | |
475 | - | let cd = cc.assetId | |
476 | - | let ce = cc.amount | |
477 | - | let bI = [if ((cb >= size(bF))) | |
478 | - | then true | |
479 | - | else m("Too many recipients"), if (ca) | |
480 | - | then true | |
481 | - | else m("Arguments size mismatch"), if ((cd == aj)) | |
482 | - | then true | |
483 | - | else m("Wrong asset payment")] | |
484 | - | if ((bI == bI)) | |
504 | + | @Callable(aH) | |
505 | + | func tradeReward (bJ,bK) = { | |
506 | + | let bF = as() | |
507 | + | if ((bF == bF)) | |
485 | 508 | then { | |
486 | - | let bJ = invoke(this, "tradeRewardInternal", [ce, bF, bG, 0], nil) | |
487 | - | if ((bJ == bJ)) | |
488 | - | then $Tuple2(nil, bJ) | |
509 | + | let ce = (size(bJ) == size(bK)) | |
510 | + | let cf = valueOrElse(getInteger(aJ()), 0) | |
511 | + | let cg = aH.payments[0] | |
512 | + | let ch = cg.assetId | |
513 | + | let ci = cg.amount | |
514 | + | let bM = [if ((cf >= size(bJ))) | |
515 | + | then true | |
516 | + | else m("Too many recipients"), if (ce) | |
517 | + | then true | |
518 | + | else m("Arguments size mismatch"), if ((ch == aj)) | |
519 | + | then true | |
520 | + | else m("Wrong asset payment")] | |
521 | + | if ((bM == bM)) | |
522 | + | then { | |
523 | + | let bN = invoke(this, "tradeRewardInternal", [ci, bJ, bK, 0], nil) | |
524 | + | if ((bN == bN)) | |
525 | + | then $Tuple2(nil, bN) | |
526 | + | else throw("Strict value is not equal to itself.") | |
527 | + | } | |
489 | 528 | else throw("Strict value is not equal to itself.") | |
490 | 529 | } | |
491 | 530 | else throw("Strict value is not equal to itself.") | |
493 | 532 | ||
494 | 533 | ||
495 | 534 | ||
496 | - | @Callable( | |
535 | + | @Callable(aH) | |
497 | 536 | func claimTradingReward () = { | |
498 | - | let at = aE.caller | |
499 | - | let cf = toString(at) | |
500 | - | let bA = aX(cf) | |
501 | - | if ((bA > 0)) | |
502 | - | then $Tuple2([ScriptTransfer(at, bA, aj), IntegerEntry(aF(cf), 0)], bA) | |
503 | - | else m("nothing to claim") | |
537 | + | let bF = as() | |
538 | + | if ((bF == bF)) | |
539 | + | then { | |
540 | + | let aw = aH.caller | |
541 | + | let cj = toString(aw) | |
542 | + | let bD = ba(cj) | |
543 | + | if ((bD > 0)) | |
544 | + | then $Tuple2([ScriptTransfer(aw, bD, aj), IntegerEntry(aI(cj), 0)], bD) | |
545 | + | else m("nothing to claim") | |
546 | + | } | |
547 | + | else throw("Strict value is not equal to itself.") | |
504 | 548 | } | |
505 | 549 | ||
506 | 550 | ||
507 | 551 | ||
508 | - | @Callable( | |
509 | - | func claimTradingRewardREADONLY ( | |
552 | + | @Callable(aH) | |
553 | + | func claimTradingRewardREADONLY (aw) = $Tuple2(nil, ba(aw)) | |
510 | 554 | ||
511 | 555 | ||
512 | - | @Verifier(cg) | |
513 | - | func ch () = { | |
514 | - | let ci = { | |
515 | - | let aP = aR() | |
516 | - | if ($isInstanceOf(aP, "ByteVector")) | |
556 | + | ||
557 | + | @Callable(aH) | |
558 | + | func suspend (ck) = { | |
559 | + | let bG = aW(aH) | |
560 | + | if ((bG == bG)) | |
561 | + | then $Tuple2([BooleanEntry(aq, ck)], ck) | |
562 | + | else throw("Strict value is not equal to itself.") | |
563 | + | } | |
564 | + | ||
565 | + | ||
566 | + | @Verifier(cl) | |
567 | + | func cm () = { | |
568 | + | let cn = { | |
569 | + | let aS = aU() | |
570 | + | if ($isInstanceOf(aS, "ByteVector")) | |
517 | 571 | then { | |
518 | - | let | |
519 | - | | |
572 | + | let aY = aS | |
573 | + | aY | |
520 | 574 | } | |
521 | - | else if ($isInstanceOf( | |
522 | - | then | |
575 | + | else if ($isInstanceOf(aS, "Unit")) | |
576 | + | then cl.senderPublicKey | |
523 | 577 | else throw("Match error") | |
524 | 578 | } | |
525 | - | sigVerify( | |
579 | + | sigVerify(cl.bodyBytes, cl.proofs[0], cn) | |
526 | 580 | } | |
527 | 581 |
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(c) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = 0 | |
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | 18 | let h = 1000000000000000000 | |
19 | 19 | ||
20 | 20 | let i = toBigInt(h) | |
21 | 21 | ||
22 | 22 | let j = "WAVES" | |
23 | 23 | ||
24 | 24 | func k (l) = makeString(["gwx_reward.ride:", l], " ") | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func m (l) = throw(k(l)) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func n (o) = valueOrElse(getInteger(this, o), 0) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func p (o) = valueOrErrorMessage(getInteger(this, o), k((("mandatory this." + o) + " is not defined"))) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func q (o) = valueOrElse(getString(this, o), "") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func r (o) = valueOrErrorMessage(getString(this, o), k((("mandatory this." + o) + " is not defined"))) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func s (t) = if ((t == j)) | |
43 | 43 | then unit | |
44 | 44 | else fromBase58String(t) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func u (v) = if ((0 > v)) | |
48 | 48 | then -(v) | |
49 | 49 | else v | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func w (v) = if ((e > v)) | |
53 | 53 | then -(v) | |
54 | 54 | else v | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | let x = "%s__maxDepth" | |
58 | 58 | ||
59 | 59 | let y = 30 | |
60 | 60 | ||
61 | 61 | let z = valueOrElse(getInteger(this, x), y) | |
62 | 62 | ||
63 | 63 | func A () = "%s%s__config__factoryAddress" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | let B = r(A()) | |
67 | 67 | ||
68 | 68 | let C = addressFromStringValue(B) | |
69 | 69 | ||
70 | 70 | func D () = "%s%s__config__emissionAddress" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func E () = makeString(["%s", "votingEmissionContract"], a) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | let F = addressFromStringValue(getStringValue(C, E())) | |
77 | 77 | ||
78 | 78 | func G (H) = makeString(["%s%s%s", "mapping", "num2user", toString(H)], a) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | let I = makeString(["%s%s", "referral", "programName"], a) | |
82 | 82 | ||
83 | 83 | let J = "wxlock" | |
84 | 84 | ||
85 | 85 | let K = valueOrElse(getString(this, I), J) | |
86 | 86 | ||
87 | 87 | let L = makeString(["%s%s", "referral", "minGWxAmount"], a) | |
88 | 88 | ||
89 | 89 | let M = (500 * c) | |
90 | 90 | ||
91 | 91 | let N = valueOrElse(getInteger(this, L), M) | |
92 | 92 | ||
93 | 93 | let O = makeString(["%s%s", "referral", "referrerRewardPermille"], a) | |
94 | 94 | ||
95 | 95 | let P = 50 | |
96 | 96 | ||
97 | 97 | let Q = valueOrElse(getInteger(this, O), P) | |
98 | 98 | ||
99 | 99 | let R = makeString(["%s%s", "referral", "referralRewardPermille"], a) | |
100 | 100 | ||
101 | 101 | let S = 50 | |
102 | 102 | ||
103 | 103 | let T = valueOrElse(getInteger(this, R), S) | |
104 | 104 | ||
105 | 105 | func U (V) = makeString(["%s%s%s", "referrer", K, V], a) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func W (X,Y) = makeString(["%s%s%s", "unclaimedReferral", X, Y], a) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | let Z = r(D()) | |
112 | 112 | ||
113 | 113 | let aa = addressFromStringValue(Z) | |
114 | 114 | ||
115 | 115 | let ab = 1 | |
116 | 116 | ||
117 | 117 | let ac = 2 | |
118 | 118 | ||
119 | 119 | let ad = 3 | |
120 | 120 | ||
121 | 121 | let ae = 4 | |
122 | 122 | ||
123 | 123 | func af () = "%s__config" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func ag () = addressFromStringValue(valueOrErrorMessage(getString(this, D()), (("mandatory this." + D()) + " is not defined"))) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | let ah = ag() | |
130 | 130 | ||
131 | 131 | let ai = split(value(getString(ah, af())), a)[1] | |
132 | 132 | ||
133 | 133 | let aj = fromBase58String(ai) | |
134 | 134 | ||
135 | 135 | func ak () = split(r(af()), a) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func al (ai,am,an,z) = makeString(["%s%s%s%d", ai, am, an, toString(z)], a) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func ao () = { | |
142 | 142 | let ap = ak() | |
143 | 143 | valueOrErrorMessage(addressFromString(ap[ad]), "boosting contract address is not defined") | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | - | func aq () = "%s%s__gwxRewardEmissionPart__startHeight" | |
147 | + | let aq = "%s__suspension" | |
148 | + | ||
149 | + | let ar = valueOrElse(getBoolean(this, aq), false) | |
150 | + | ||
151 | + | func as () = if (!(ar)) | |
152 | + | then true | |
153 | + | else m("suspended") | |
148 | 154 | ||
149 | 155 | ||
150 | - | func | |
156 | + | func at () = "%s%s__gwxRewardEmissionPart__startHeight" | |
151 | 157 | ||
152 | 158 | ||
153 | - | func | |
159 | + | func au () = "%s__nextUserNum" | |
154 | 160 | ||
155 | 161 | ||
156 | - | func | |
162 | + | func av (aw) = makeString(["%s%s%s__mapping__user2num", toString(aw)], a) | |
157 | 163 | ||
158 | 164 | ||
159 | - | func | |
165 | + | func ax () = "%s%s__ratePerBlock__current" | |
160 | 166 | ||
161 | 167 | ||
162 | - | func | |
168 | + | func ay () = "%s%s__gwxHoldersReward__current" | |
163 | 169 | ||
164 | 170 | ||
165 | - | func | |
171 | + | func az () = "%s%s__gwxHoldersReward__next" | |
166 | 172 | ||
167 | 173 | ||
168 | - | func | |
174 | + | func aA () = "%s%s__poolWeight__GWXvirtualPOOL" | |
169 | 175 | ||
170 | 176 | ||
171 | - | func | |
177 | + | func aB (aC) = makeString(["%s%d", "userUnclaimed", toString(aC)], a) | |
172 | 178 | ||
173 | 179 | ||
174 | - | let aB = addressFromStringValue(r(aA())) | |
175 | - | ||
176 | - | func aC (aD,aE) = makeString(["%s%s%s%s", "tradingReward", "history", aD, toBase58String(aE.transactionId)], a) | |
180 | + | func aD () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
177 | 181 | ||
178 | 182 | ||
179 | - | func aF (at) = makeString(["%s%s", "tradingReward", at], a) | |
183 | + | let aE = addressFromStringValue(r(aD())) | |
184 | + | ||
185 | + | func aF (aG,aH) = makeString(["%s%s%s%s", "tradingReward", "history", aG, toBase58String(aH.transactionId)], a) | |
180 | 186 | ||
181 | 187 | ||
182 | - | func | |
188 | + | func aI (aw) = makeString(["%s%s", "tradingReward", aw], a) | |
183 | 189 | ||
184 | 190 | ||
185 | - | func aH (aI,aD,aJ,aE) = { | |
186 | - | let aK = makeString(["%s%s%s%s__history", aI, aD, toBase58String(aE.transactionId)], a) | |
187 | - | let aL = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aJ)], a) | |
188 | - | StringEntry(aK, aL) | |
191 | + | func aJ () = makeString(["%s", "maxRecipients"], a) | |
192 | + | ||
193 | + | ||
194 | + | func aK (aL,aG,aM,aH) = { | |
195 | + | let aN = makeString(["%s%s%s%s__history", aL, aG, toBase58String(aH.transactionId)], a) | |
196 | + | let aO = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aM)], a) | |
197 | + | StringEntry(aN, aO) | |
189 | 198 | } | |
190 | 199 | ||
191 | 200 | ||
192 | - | func | |
201 | + | func aP () = "%s__managerPublicKey" | |
193 | 202 | ||
194 | 203 | ||
195 | - | func | |
204 | + | func aQ () = "%s__managerVaultAddress" | |
196 | 205 | ||
197 | 206 | ||
198 | - | func | |
199 | - | let | |
200 | - | if ($isInstanceOf( | |
207 | + | func aR () = { | |
208 | + | let aS = getString(aQ()) | |
209 | + | if ($isInstanceOf(aS, "String")) | |
201 | 210 | then { | |
202 | - | let | |
203 | - | addressFromStringValue( | |
211 | + | let aT = aS | |
212 | + | addressFromStringValue(aT) | |
204 | 213 | } | |
205 | 214 | else this | |
206 | 215 | } | |
207 | 216 | ||
208 | 217 | ||
209 | - | func | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
218 | + | func aU () = { | |
219 | + | let aV = aR() | |
220 | + | let aS = getString(aV, aP()) | |
221 | + | if ($isInstanceOf(aS, "String")) | |
213 | 222 | then { | |
214 | - | let | |
215 | - | fromBase58String( | |
223 | + | let aT = aS | |
224 | + | fromBase58String(aT) | |
216 | 225 | } | |
217 | - | else if ($isInstanceOf( | |
226 | + | else if ($isInstanceOf(aS, "Unit")) | |
218 | 227 | then unit | |
219 | 228 | else throw("Match error") | |
220 | 229 | } | |
221 | 230 | ||
222 | 231 | ||
223 | - | func | |
224 | - | let | |
225 | - | let | |
226 | - | if ($isInstanceOf( | |
232 | + | func aW (aH) = { | |
233 | + | let aX = throw("Permission denied") | |
234 | + | let aS = aU() | |
235 | + | if ($isInstanceOf(aS, "ByteVector")) | |
227 | 236 | then { | |
228 | - | let | |
229 | - | if (( | |
237 | + | let aY = aS | |
238 | + | if ((aH.callerPublicKey == aY)) | |
230 | 239 | then true | |
231 | - | else | |
240 | + | else aX | |
232 | 241 | } | |
233 | - | else if ($isInstanceOf( | |
234 | - | then if (( | |
242 | + | else if ($isInstanceOf(aS, "Unit")) | |
243 | + | then if ((aH.caller == this)) | |
235 | 244 | then true | |
236 | - | else | |
245 | + | else aX | |
237 | 246 | else throw("Match error") | |
238 | 247 | } | |
239 | 248 | ||
240 | 249 | ||
241 | - | func | |
242 | - | let o = makeString(["%s%s%s", "mapping", "user2num", | |
243 | - | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + | |
250 | + | func aZ (an,aw) = { | |
251 | + | let o = makeString(["%s%s%s", "mapping", "user2num", aw], a) | |
252 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + aw) + " is not found in boosting contract data, key=") + o))) | |
244 | 253 | } | |
245 | 254 | ||
246 | 255 | ||
247 | - | func | |
256 | + | func ba (aw) = valueOrElse(getInteger(this, aI(aw)), 0) | |
248 | 257 | ||
249 | 258 | ||
250 | - | func | |
259 | + | func bb () = makeString(["%s", "rewardPerGwxIntegral"], a) | |
251 | 260 | ||
252 | 261 | ||
253 | - | func | |
254 | - | let | |
255 | - | getInteger(ao(), | |
262 | + | func bc () = { | |
263 | + | let bd = "%s%s__gwx__total" | |
264 | + | getInteger(ao(), bd) | |
256 | 265 | } | |
257 | 266 | ||
258 | 267 | ||
259 | - | func | |
260 | - | func | |
268 | + | func be (aw) = { | |
269 | + | func bf (aw) = makeString(["%s%s__gwxAmountTotal", toString(aw)], a) | |
261 | 270 | ||
262 | - | getInteger(ao(), | |
271 | + | getInteger(ao(), bf(aw)) | |
263 | 272 | } | |
264 | 273 | ||
265 | 274 | ||
266 | - | func | |
267 | - | let | |
268 | - | let | |
269 | - | if ($isInstanceOf( | |
275 | + | func bg () = { | |
276 | + | let bh = valueOrElse({ | |
277 | + | let aS = getString(this, bb()) | |
278 | + | if ($isInstanceOf(aS, "String")) | |
270 | 279 | then { | |
271 | - | let | |
272 | - | parseBigInt( | |
280 | + | let aT = aS | |
281 | + | parseBigInt(aT) | |
273 | 282 | } | |
274 | - | else if ($isInstanceOf( | |
283 | + | else if ($isInstanceOf(aS, "Unit")) | |
275 | 284 | then unit | |
276 | 285 | else throw("Match error") | |
277 | 286 | }, e) | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
287 | + | let bi = valueOrErrorMessage(getInteger(this, at()), k(("invalid " + at()))) | |
288 | + | let bj = valueOrErrorMessage(getInteger(aa, ax()), k(("invalid " + ax()))) | |
289 | + | let bk = valueOrElse(getInteger(aa, ay()), 0) | |
290 | + | let bl = valueOrElse(bc(), 0) | |
291 | + | let bm = toBigInt((height - bi)) | |
292 | + | let bn = toBigInt(bl) | |
293 | + | let bo = (bh + (if ((bn == e)) | |
285 | 294 | then e | |
286 | - | else fraction( | |
287 | - | $Tuple2([IntegerEntry( | |
295 | + | else fraction(bm, ((toBigInt(bj) * toBigInt(bk)) * i), (bn * d)))) | |
296 | + | $Tuple2([IntegerEntry(at(), height), StringEntry(bb(), toString(bo))], bo) | |
288 | 297 | } | |
289 | 298 | ||
290 | 299 | ||
291 | - | func | |
300 | + | func bp (aw) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aw)], a) | |
292 | 301 | ||
293 | 302 | ||
294 | - | func | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if ($isInstanceOf( | |
303 | + | func bq (aw,br) = { | |
304 | + | let bs = bg() | |
305 | + | let bt = bs._1 | |
306 | + | let bo = bs._2 | |
307 | + | let bu = { | |
308 | + | let aS = getString(this, bp(aw)) | |
309 | + | if ($isInstanceOf(aS, "String")) | |
301 | 310 | then { | |
302 | - | let | |
303 | - | valueOrErrorMessage(parseBigInt( | |
311 | + | let aT = aS | |
312 | + | valueOrErrorMessage(parseBigInt(aT), k("invalid user last integral")) | |
304 | 313 | } | |
305 | - | else if ($isInstanceOf( | |
306 | - | then | |
314 | + | else if ($isInstanceOf(aS, "Unit")) | |
315 | + | then bo | |
307 | 316 | else throw("Match error") | |
308 | 317 | } | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | $Tuple2(([StringEntry( | |
318 | + | let bv = getString(ao(), av(aw)) | |
319 | + | let bw = valueOrElse(getInteger(aB(br)), 0) | |
320 | + | let bx = valueOrElse(be(aw), 0) | |
321 | + | let by = (toInt(fraction(toBigInt(bx), (bo - bu), i)) + bw) | |
322 | + | $Tuple2(([StringEntry(bp(aw), toString(bo))] ++ bt), by) | |
314 | 323 | } | |
315 | 324 | ||
316 | 325 | ||
317 | - | func | |
318 | - | let | |
326 | + | func bz (bA) = { | |
327 | + | let aw = valueOrErrorMessage(addressFromString(bA), k("invalid user address")) | |
319 | 328 | let ap = ak() | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | $Tuple2( | |
329 | + | let br = aZ(ap[ad], bA) | |
330 | + | let bB = bq(aw, br) | |
331 | + | let bC = bB._1 | |
332 | + | let bD = bB._2 | |
333 | + | $Tuple2(bD, ([IntegerEntry(aB(br), 0)] ++ bC)) | |
325 | 334 | } | |
326 | 335 | ||
327 | 336 | ||
328 | - | @Callable(aE) | |
329 | - | func refreshUserReward (bB,bo) = { | |
330 | - | let bC = if ((aE.caller == ao())) | |
331 | - | then true | |
332 | - | else m("permission denied") | |
333 | - | if ((bC == bC)) | |
337 | + | @Callable(aH) | |
338 | + | func refreshUserReward (bE,br) = { | |
339 | + | let bF = as() | |
340 | + | if ((bF == bF)) | |
334 | 341 | then { | |
335 | - | let bD = bn(Address(bB), bo) | |
336 | - | let bz = bD._1 | |
337 | - | let bA = bD._2 | |
338 | - | $Tuple2(([IntegerEntry(ay(bo), bA)] ++ bz), bA) | |
342 | + | let bG = if ((aH.caller == ao())) | |
343 | + | then true | |
344 | + | else m("permission denied") | |
345 | + | if ((bG == bG)) | |
346 | + | then { | |
347 | + | let bH = bq(Address(bE), br) | |
348 | + | let bC = bH._1 | |
349 | + | let bD = bH._2 | |
350 | + | $Tuple2(([IntegerEntry(aB(br), bD)] ++ bC), bD) | |
351 | + | } | |
352 | + | else throw("Strict value is not equal to itself.") | |
339 | 353 | } | |
340 | 354 | else throw("Strict value is not equal to itself.") | |
341 | 355 | } | |
342 | 356 | ||
343 | 357 | ||
344 | 358 | ||
345 | - | @Callable( | |
346 | - | func tradeRewardInternal ( | |
347 | - | | |
348 | - | | |
349 | - | | |
350 | - | then | |
351 | - | else | |
352 | - | | |
353 | - | | |
354 | - | if ((bI | |
355 | - | then | |
356 | - | | |
357 | - | if (( | |
359 | + | @Callable(aH) | |
360 | + | func tradeRewardInternal (bI,bJ,bK,bL) = { | |
361 | + | let bF = as() | |
362 | + | if ((bF == bF)) | |
363 | + | then if ((bL == size(bJ))) | |
364 | + | then nil | |
365 | + | else { | |
366 | + | let bM = [if ((aH.caller == this)) | |
367 | + | then true | |
368 | + | else m("Permission denied"), if ((bI >= bK[bL])) | |
369 | + | then true | |
370 | + | else m("insufficient payment assetId")] | |
371 | + | if ((bM == bM)) | |
358 | 372 | then { | |
359 | - | let bK = aC(bF[bH], aE) | |
360 | - | let at = addressFromStringValue(bF[bH]) | |
361 | - | $Tuple2([IntegerEntry(bK, bG[bH]), IntegerEntry(aF(bF[bH]), bG[bH])], bJ) | |
373 | + | let bN = invoke(this, "tradeRewardInternal", [(bI - bK[bL]), bJ, bK, (bL + 1)], nil) | |
374 | + | if ((bN == bN)) | |
375 | + | then { | |
376 | + | let bO = aF(bJ[bL], aH) | |
377 | + | let aw = addressFromStringValue(bJ[bL]) | |
378 | + | $Tuple2([IntegerEntry(bO, bK[bL]), IntegerEntry(aI(bJ[bL]), bK[bL])], bN) | |
379 | + | } | |
380 | + | else throw("Strict value is not equal to itself.") | |
362 | 381 | } | |
363 | 382 | else throw("Strict value is not equal to itself.") | |
364 | 383 | } | |
365 | - | else throw("Strict value is not equal to itself.") | |
366 | - | } | |
367 | - | ||
368 | - | ||
369 | - | ||
370 | - | @Callable(aE) | |
371 | - | func updateReferralActivity (at,bL) = { | |
372 | - | let bM = getString(aB, U(at)) | |
373 | - | let bN = if ((bM == unit)) | |
374 | - | then unit | |
375 | - | else invoke(aB, "updateReferralActivity", [K, at, (bL >= N)], nil) | |
376 | - | if ((bN == bN)) | |
377 | - | then $Tuple2(nil, unit) | |
378 | 384 | else throw("Strict value is not equal to itself.") | |
379 | 385 | } | |
380 | 386 | ||
381 | 387 | ||
382 | 388 | ||
383 | - | @Callable(aE) | |
389 | + | @Callable(aH) | |
390 | + | func updateReferralActivity (aw,bP) = { | |
391 | + | let bF = as() | |
392 | + | if ((bF == bF)) | |
393 | + | then { | |
394 | + | let bQ = getString(aE, U(aw)) | |
395 | + | let bR = if ((bQ == unit)) | |
396 | + | then unit | |
397 | + | else invoke(aE, "updateReferralActivity", [K, aw, (bP >= N)], nil) | |
398 | + | if ((bR == bR)) | |
399 | + | then $Tuple2(nil, unit) | |
400 | + | else throw("Strict value is not equal to itself.") | |
401 | + | } | |
402 | + | else throw("Strict value is not equal to itself.") | |
403 | + | } | |
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | @Callable(aH) | |
384 | 408 | func processPendingPeriodsAndUsers () = $Tuple2(nil, m("deprecated")) | |
385 | 409 | ||
386 | 410 | ||
387 | 411 | ||
388 | - | @Callable( | |
412 | + | @Callable(aH) | |
389 | 413 | func claimReward () = { | |
390 | - | let ap = ak() | |
391 | - | let at = aE.caller | |
392 | - | let bx = toString(at) | |
393 | - | let bO = bw(bx) | |
394 | - | let aJ = bO._1 | |
395 | - | let bz = bO._2 | |
396 | - | let bP = if ((aJ > 0)) | |
397 | - | then true | |
398 | - | else throw("nothing to claim") | |
399 | - | if ((bP == bP)) | |
414 | + | let bF = as() | |
415 | + | if ((bF == bF)) | |
400 | 416 | then { | |
401 | - | let bu = { | |
402 | - | let bQ = invoke(ao(), "getUserGwxAmount", [bx], nil) | |
403 | - | if ($isInstanceOf(bQ, "Int")) | |
404 | - | then bQ | |
405 | - | else throw(($getType(bQ) + " couldn't be cast to Int")) | |
406 | - | } | |
407 | - | let bM = getString(aB, U(bx)) | |
408 | - | let bN = if ((bM == unit)) | |
409 | - | then unit | |
410 | - | else invoke(aB, "updateReferralActivity", [K, at, (bu >= N)], nil) | |
411 | - | if ((bN == bN)) | |
417 | + | let ap = ak() | |
418 | + | let aw = aH.caller | |
419 | + | let bA = toString(aw) | |
420 | + | let bS = bz(bA) | |
421 | + | let aM = bS._1 | |
422 | + | let bC = bS._2 | |
423 | + | let bT = if ((aM > 0)) | |
424 | + | then true | |
425 | + | else throw("nothing to claim") | |
426 | + | if ((bT == bT)) | |
412 | 427 | then { | |
413 | - | let bR = if (if ((bM == unit)) | |
414 | - | then true | |
415 | - | else (N > bu)) | |
428 | + | let bx = { | |
429 | + | let bU = invoke(ao(), "getUserGwxAmount", [bA], nil) | |
430 | + | if ($isInstanceOf(bU, "Int")) | |
431 | + | then bU | |
432 | + | else throw(($getType(bU) + " couldn't be cast to Int")) | |
433 | + | } | |
434 | + | let bQ = getString(aE, U(bA)) | |
435 | + | let bR = if ((bQ == unit)) | |
416 | 436 | then unit | |
417 | - | else { | |
418 | - | let bS = fraction(aJ, Q, b) | |
419 | - | let bT = fraction(aJ, T, b) | |
420 | - | invoke(aB, "incUnclaimed", [K, at, bS, bT], nil) | |
421 | - | } | |
437 | + | else invoke(aE, "updateReferralActivity", [K, aw, (bx >= N)], nil) | |
422 | 438 | if ((bR == bR)) | |
423 | 439 | then { | |
424 | - | let bU = invoke(aa, "emit", [aJ], nil) | |
425 | - | if ((bU == bU)) | |
440 | + | let bV = if (if ((bQ == unit)) | |
441 | + | then true | |
442 | + | else (N > bx)) | |
443 | + | then unit | |
444 | + | else { | |
445 | + | let bW = fraction(aM, Q, b) | |
446 | + | let bX = fraction(aM, T, b) | |
447 | + | invoke(aE, "incUnclaimed", [K, aw, bW, bX], nil) | |
448 | + | } | |
449 | + | if ((bV == bV)) | |
426 | 450 | then { | |
427 | - | let bV = { | |
428 | - | let bQ = invoke(aB, "claim", [K], nil) | |
429 | - | if ($isInstanceOf(bQ, "Int")) | |
430 | - | then bQ | |
431 | - | else throw(($getType(bQ) + " couldn't be cast to Int")) | |
432 | - | } | |
433 | - | if ((bV == bV)) | |
451 | + | let bY = invoke(aa, "emit", [aM], nil) | |
452 | + | if ((bY == bY)) | |
434 | 453 | then { | |
435 | - | let bW = (aJ + bV) | |
436 | - | $Tuple2(([ScriptTransfer(aE.caller, aJ, aj), aH("claim", bx, bW, aE)] ++ bz), bW) | |
454 | + | let bZ = { | |
455 | + | let bU = invoke(aE, "claim", [K], nil) | |
456 | + | if ($isInstanceOf(bU, "Int")) | |
457 | + | then bU | |
458 | + | else throw(($getType(bU) + " couldn't be cast to Int")) | |
459 | + | } | |
460 | + | if ((bZ == bZ)) | |
461 | + | then { | |
462 | + | let ca = (aM + bZ) | |
463 | + | $Tuple2(([ScriptTransfer(aH.caller, aM, aj), aK("claim", bA, ca, aH)] ++ bC), ca) | |
464 | + | } | |
465 | + | else throw("Strict value is not equal to itself.") | |
437 | 466 | } | |
438 | 467 | else throw("Strict value is not equal to itself.") | |
439 | 468 | } | |
440 | 469 | else throw("Strict value is not equal to itself.") | |
441 | 470 | } | |
442 | 471 | else throw("Strict value is not equal to itself.") | |
443 | 472 | } | |
444 | 473 | else throw("Strict value is not equal to itself.") | |
445 | 474 | } | |
446 | 475 | else throw("Strict value is not equal to itself.") | |
447 | 476 | } | |
448 | 477 | ||
449 | 478 | ||
450 | 479 | ||
451 | - | @Callable( | |
452 | - | func claimRewardREADONLY ( | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | $Tuple2(nil, | |
480 | + | @Callable(aH) | |
481 | + | func claimRewardREADONLY (cb) = { | |
482 | + | let cc = bz(cb) | |
483 | + | let aM = cc._1 | |
484 | + | let bC = cc._2 | |
485 | + | let cd = valueOrElse(getInteger(aE, W(K, cb)), 0) | |
486 | + | let ca = (aM + cd) | |
487 | + | $Tuple2(nil, ca) | |
459 | 488 | } | |
460 | 489 | ||
461 | 490 | ||
462 | 491 | ||
463 | - | @Callable(aE) | |
464 | - | func onEmissionForGwxStart () = if ((aE.caller != C)) | |
465 | - | then throw("permissions denied") | |
466 | - | else [IntegerEntry(aq(), height)] | |
492 | + | @Callable(aH) | |
493 | + | func onEmissionForGwxStart () = { | |
494 | + | let bF = as() | |
495 | + | if ((bF == bF)) | |
496 | + | then if ((aH.caller != C)) | |
497 | + | then throw("permissions denied") | |
498 | + | else [IntegerEntry(at(), height)] | |
499 | + | else throw("Strict value is not equal to itself.") | |
500 | + | } | |
467 | 501 | ||
468 | 502 | ||
469 | 503 | ||
470 | - | @Callable(aE) | |
471 | - | func tradeReward (bF,bG) = { | |
472 | - | let ca = (size(bF) == size(bG)) | |
473 | - | let cb = valueOrElse(getInteger(aG()), 0) | |
474 | - | let cc = aE.payments[0] | |
475 | - | let cd = cc.assetId | |
476 | - | let ce = cc.amount | |
477 | - | let bI = [if ((cb >= size(bF))) | |
478 | - | then true | |
479 | - | else m("Too many recipients"), if (ca) | |
480 | - | then true | |
481 | - | else m("Arguments size mismatch"), if ((cd == aj)) | |
482 | - | then true | |
483 | - | else m("Wrong asset payment")] | |
484 | - | if ((bI == bI)) | |
504 | + | @Callable(aH) | |
505 | + | func tradeReward (bJ,bK) = { | |
506 | + | let bF = as() | |
507 | + | if ((bF == bF)) | |
485 | 508 | then { | |
486 | - | let bJ = invoke(this, "tradeRewardInternal", [ce, bF, bG, 0], nil) | |
487 | - | if ((bJ == bJ)) | |
488 | - | then $Tuple2(nil, bJ) | |
509 | + | let ce = (size(bJ) == size(bK)) | |
510 | + | let cf = valueOrElse(getInteger(aJ()), 0) | |
511 | + | let cg = aH.payments[0] | |
512 | + | let ch = cg.assetId | |
513 | + | let ci = cg.amount | |
514 | + | let bM = [if ((cf >= size(bJ))) | |
515 | + | then true | |
516 | + | else m("Too many recipients"), if (ce) | |
517 | + | then true | |
518 | + | else m("Arguments size mismatch"), if ((ch == aj)) | |
519 | + | then true | |
520 | + | else m("Wrong asset payment")] | |
521 | + | if ((bM == bM)) | |
522 | + | then { | |
523 | + | let bN = invoke(this, "tradeRewardInternal", [ci, bJ, bK, 0], nil) | |
524 | + | if ((bN == bN)) | |
525 | + | then $Tuple2(nil, bN) | |
526 | + | else throw("Strict value is not equal to itself.") | |
527 | + | } | |
489 | 528 | else throw("Strict value is not equal to itself.") | |
490 | 529 | } | |
491 | 530 | else throw("Strict value is not equal to itself.") | |
492 | 531 | } | |
493 | 532 | ||
494 | 533 | ||
495 | 534 | ||
496 | - | @Callable( | |
535 | + | @Callable(aH) | |
497 | 536 | func claimTradingReward () = { | |
498 | - | let at = aE.caller | |
499 | - | let cf = toString(at) | |
500 | - | let bA = aX(cf) | |
501 | - | if ((bA > 0)) | |
502 | - | then $Tuple2([ScriptTransfer(at, bA, aj), IntegerEntry(aF(cf), 0)], bA) | |
503 | - | else m("nothing to claim") | |
537 | + | let bF = as() | |
538 | + | if ((bF == bF)) | |
539 | + | then { | |
540 | + | let aw = aH.caller | |
541 | + | let cj = toString(aw) | |
542 | + | let bD = ba(cj) | |
543 | + | if ((bD > 0)) | |
544 | + | then $Tuple2([ScriptTransfer(aw, bD, aj), IntegerEntry(aI(cj), 0)], bD) | |
545 | + | else m("nothing to claim") | |
546 | + | } | |
547 | + | else throw("Strict value is not equal to itself.") | |
504 | 548 | } | |
505 | 549 | ||
506 | 550 | ||
507 | 551 | ||
508 | - | @Callable( | |
509 | - | func claimTradingRewardREADONLY ( | |
552 | + | @Callable(aH) | |
553 | + | func claimTradingRewardREADONLY (aw) = $Tuple2(nil, ba(aw)) | |
510 | 554 | ||
511 | 555 | ||
512 | - | @Verifier(cg) | |
513 | - | func ch () = { | |
514 | - | let ci = { | |
515 | - | let aP = aR() | |
516 | - | if ($isInstanceOf(aP, "ByteVector")) | |
556 | + | ||
557 | + | @Callable(aH) | |
558 | + | func suspend (ck) = { | |
559 | + | let bG = aW(aH) | |
560 | + | if ((bG == bG)) | |
561 | + | then $Tuple2([BooleanEntry(aq, ck)], ck) | |
562 | + | else throw("Strict value is not equal to itself.") | |
563 | + | } | |
564 | + | ||
565 | + | ||
566 | + | @Verifier(cl) | |
567 | + | func cm () = { | |
568 | + | let cn = { | |
569 | + | let aS = aU() | |
570 | + | if ($isInstanceOf(aS, "ByteVector")) | |
517 | 571 | then { | |
518 | - | let | |
519 | - | | |
572 | + | let aY = aS | |
573 | + | aY | |
520 | 574 | } | |
521 | - | else if ($isInstanceOf( | |
522 | - | then | |
575 | + | else if ($isInstanceOf(aS, "Unit")) | |
576 | + | then cl.senderPublicKey | |
523 | 577 | else throw("Match error") | |
524 | 578 | } | |
525 | - | sigVerify( | |
579 | + | sigVerify(cl.bodyBytes, cl.proofs[0], cn) | |
526 | 580 | } | |
527 | 581 |
github/deemru/w8io/169f3d6 101.79 ms ◑