tx · HAGsL4fpNExrNrUFy56Uzdu7CoXiuTm41bsu4FxS18dw 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.03500000 Waves 2024.12.03 23:12 [3398925] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "HAGsL4fpNExrNrUFy56Uzdu7CoXiuTm41bsu4FxS18dw", "fee": 3500000, "feeAssetId": null, "timestamp": 1733256773451, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "4Dt3ys1pJJ94BgkGW22L88Wyikkxi7Sy73hJSdeqgquGKGieJ86YeP4xba7dFZCaFeCY98qsTVjt9TuKEYfAwwim" ], "script": "base64:BgJOCAISBgoECAgICBIDCgEIEgMKAQESBAoCCAESAwoBARIECgIIARIAEgQKAggEEgMKAQESAwoBARIDCgEIEgMKAQgSAwoBARIAEgQKAggBtwEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAOTUlOU0hPUFBBWU1FTlQAoI0GAApEQVlfTUlMTElTAIC4mSkABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAApEQVlfQkxPQ0tTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAKALAwkAAAIBAVQFByRtYXRjaDAAPAkAAgECDVVua25vd24gY2hhaW4AC1dFRUtfQkxPQ0tTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAOBOAwkAAAIBAVQFByRtYXRjaDAAtAEJAAIBAg1Vbmtub3duIGNoYWluAApWUkZfT0ZGU0VUBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAAADCQAAAgEBVAUHJG1hdGNoMACQ+UUJAAIBAg1Vbmtub3duIGNoYWluAA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cJAMwIAgkBDEludGVnZXJFbnRyeQIJARhrZXlUb3RhbFdlZWtQYXJ0aWNpcGFudHMBBQR3ZWVrCQBkAgUPb2xkUGFydGljaXBhbnRzAAEFA25pbAUDbmlsCQCUCgIJAM0IAgkAzQgCBRJ1cGRhdGVQYXJ0aWNpcGFudHMJAQxJbnRlZ2VyRW50cnkCBQp0aWNrZXRzS2V5CQBkAgUKb2xkVGlja2V0cwUMZGVsdGFUaWNrZXRzCQEMSW50ZWdlckVudHJ5AgkBE2tleVRvdGFsV2Vla1RpY2tldHMBBQR3ZWVrCQBkAgUPb2xkVG90YWxUaWNrZXRzBQxkZWx0YVRpY2tldHMFDGRlbHRhVGlja2V0cwCnVvsI", "height": 3398925, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H5jV4BXSNdN5bSydrLtnQfRExvrpMaVoKtWNiYmYbqd7 Next: DjvJTxECEqNT2eT1T1BYXAFRmrwEgFHFQoaR7up1QfP6 Diff:
Old | New | Differences | |
---|---|---|---|
64 | 64 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
65 | 65 | else if ((base58'2T' == $match0)) | |
66 | 66 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
67 | + | else throw("Unknown chain") | |
68 | + | } | |
69 | + | ||
70 | + | let economyContractStr = match chain { | |
71 | + | case _ => | |
72 | + | if ((base58'2W' == $match0)) | |
73 | + | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
74 | + | else if ((base58'2T' == $match0)) | |
75 | + | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
67 | 76 | else throw("Unknown chain") | |
68 | 77 | } | |
69 | 78 | ||
237 | 246 | } | |
238 | 247 | ||
239 | 248 | ||
249 | + | let M6 = 1000000 | |
250 | + | ||
251 | + | let M8 = 100000000 | |
252 | + | ||
240 | 253 | let MILLION6 = 100000000000000 | |
254 | + | ||
255 | + | let TEAMSHARE = 200000 | |
256 | + | ||
257 | + | let ACTIVITYSHARE = 100000 | |
241 | 258 | ||
242 | 259 | let PLAYERSHARE = 400000 | |
243 | 260 | ||
261 | + | let YEARMILLIS = 31557600000 | |
262 | + | ||
244 | 263 | let DAYMILLIS = 86400000 | |
264 | + | ||
265 | + | let BANK_FEE = 50000 | |
266 | + | ||
267 | + | let ch = take(drop(this.bytes, 1), 1) | |
268 | + | ||
269 | + | let USDT_TVL_CORRECTION = match ch { | |
270 | + | case _ => | |
271 | + | if ((base58'2W' == $match0)) | |
272 | + | then 1208630000 | |
273 | + | else if ((base58'2T' == $match0)) | |
274 | + | then 0 | |
275 | + | else throw("Unknown chain") | |
276 | + | } | |
245 | 277 | ||
246 | 278 | let teamAddrKey = "teamAddr" | |
247 | 279 | ||
255 | 287 | ||
256 | 288 | let stakersAmountLeftKey = "stakersAmountLeft" | |
257 | 289 | ||
290 | + | func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
291 | + | ||
292 | + | ||
258 | 293 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
259 | 294 | ||
260 | 295 | ||
261 | 296 | func keyLastWlgTradeLimitByUser (addr) = ("lastWlgLimitUser_" + addr) | |
262 | 297 | ||
263 | 298 | ||
299 | + | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
300 | + | ||
301 | + | ||
264 | 302 | let wlgIssueTimeKey = "wlg_issueTime" | |
265 | 303 | ||
266 | 304 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
267 | 305 | ||
306 | + | let zbIssuedAmountKey = "zbill_issuedAmount" | |
307 | + | ||
268 | 308 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
269 | 309 | ||
310 | + | ||
311 | + | let acresStakedTotalKey = "acresStakedAmountTotal" | |
270 | 312 | ||
271 | 313 | func keyWlgStakedAmountByUser (addr) = ("wlgStakedAmountByUser_" + addr) | |
272 | 314 | ||
274 | 316 | let wlgStakedTotalKey = "wlgStakedAmountTotal" | |
275 | 317 | ||
276 | 318 | func keyWlgStakedTimeByUser (addr) = ("wlgStakedTimeByUser_" + addr) | |
319 | + | ||
320 | + | ||
321 | + | let dappRest = 0 | |
322 | + | ||
323 | + | let dappStaking = 1 | |
324 | + | ||
325 | + | let dappEconomy = 2 | |
326 | + | ||
327 | + | let dappWlg = 3 | |
328 | + | ||
329 | + | let dappPuzzle = 4 | |
330 | + | ||
331 | + | let dappInvestFund = 5 | |
332 | + | ||
333 | + | let dappAcres = 6 | |
334 | + | ||
335 | + | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
336 | + | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
337 | + | func adder (acc,item) = (acc + parseIntValue(item)) | |
338 | + | ||
339 | + | let totalPieces = { | |
340 | + | let $l = props | |
341 | + | let $s = size($l) | |
342 | + | let $acc0 = 0 | |
343 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
344 | + | then $a | |
345 | + | else adder($a, $l[$i]) | |
346 | + | ||
347 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
348 | + | then $a | |
349 | + | else throw("List size exceeds 6") | |
350 | + | ||
351 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
352 | + | } | |
353 | + | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
354 | + | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
355 | + | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
356 | + | [totalPieces, userPieces, totalAcres, userAcres] | |
357 | + | } | |
358 | + | ||
359 | + | ||
360 | + | let idxTotalPieces = 0 | |
361 | + | ||
362 | + | let idxUserPieces = 1 | |
363 | + | ||
364 | + | let idxTotalAcres = 2 | |
365 | + | ||
366 | + | let idxUserAcres = 3 | |
367 | + | ||
368 | + | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
369 | + | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
370 | + | let economyUsd = assetBalance(contracts[dappEconomy], usdtId) | |
371 | + | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
372 | + | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
373 | + | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
374 | + | let investFndContract = contracts[dappInvestFund] | |
375 | + | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0)) | |
376 | + | let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal) | |
377 | + | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
378 | + | let now = lastBlock.timestamp | |
379 | + | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
380 | + | let bankWlgold = assetBalance(contracts[dappStaking], wlgId) | |
381 | + | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
382 | + | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
383 | + | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
384 | + | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
385 | + | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
386 | + | let teamWlgold = assetBalance(teamAddr, wlgId) | |
387 | + | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
388 | + | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
389 | + | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
390 | + | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
391 | + | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
392 | + | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime) | |
393 | + | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
394 | + | let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))]) | |
395 | + | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
396 | + | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
397 | + | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
398 | + | let $t079143 = if ((lastUserPeriod == curPeriod)) | |
399 | + | then { | |
400 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
401 | + | let userPart = fraction(a0, userProportion6, M6) | |
402 | + | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
403 | + | $Tuple3(userPart, a0, effTime) | |
404 | + | } | |
405 | + | else if ((lastUserPeriod == (curPeriod - 1))) | |
406 | + | then { | |
407 | + | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
408 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
409 | + | let avail = (a1 + a0) | |
410 | + | let userPart = fraction(avail, userProportion6, M6) | |
411 | + | let effTime = if ((a1 >= userPart)) | |
412 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
413 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
414 | + | $Tuple3(userPart, avail, effTime) | |
415 | + | } | |
416 | + | else { | |
417 | + | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
418 | + | let a1 = distributionByPeriod((curPeriod - 1)) | |
419 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
420 | + | let avail = ((a2 + a1) + a0) | |
421 | + | let userPart = fraction(avail, userProportion6, M6) | |
422 | + | let effTime = if ((a2 >= userPart)) | |
423 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
424 | + | else if (((a2 + a1) >= userPart)) | |
425 | + | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
426 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
427 | + | $Tuple3(userPart, avail, effTime) | |
428 | + | } | |
429 | + | let userAmount = $t079143._1 | |
430 | + | let userAvailable = $t079143._2 | |
431 | + | let effLastTime = $t079143._3 | |
432 | + | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAYMILLIS, YEARMILLIS), 25, eff[idxTotalPieces]) | |
433 | + | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
434 | + | let userTemp = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
435 | + | let bankFromUser = fraction(userTemp, BANK_FEE, M6) | |
436 | + | let robbedUser = (userTemp - bankFromUser) | |
437 | + | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
438 | + | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime, bankWlgold] | |
439 | + | } | |
277 | 440 | ||
278 | 441 | ||
279 | 442 | let M6_ = 1000000 | |
491 | 654 | let lastLimitLeft = valueOrElse(getInteger(keyLastWlgTradeLimitByUser(addr)), defaultLimit) | |
492 | 655 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (lastBlock.timestamp - lastTime), DAY_MILLIS)) | |
493 | 656 | min([currentLimit, defaultLimit]) | |
657 | + | } | |
658 | + | ||
659 | + | ||
660 | + | let idxWlgTeamAmLeft = 10 | |
661 | + | ||
662 | + | let idxWlgTeamAmAvailNow = 11 | |
663 | + | ||
664 | + | let idxWlgActAmLeft = 14 | |
665 | + | ||
666 | + | let idxWlgActAmAvailNow = 15 | |
667 | + | ||
668 | + | let idxWlgAmLeftTotal = 18 | |
669 | + | ||
670 | + | let idxWlgUserAmAvailNow = 21 | |
671 | + | ||
672 | + | let idxWlgUserTotalAvail = 24 | |
673 | + | ||
674 | + | let idxWlgEffUserTime = 25 | |
675 | + | ||
676 | + | func claimInternal (addr) = { | |
677 | + | let caller = addressFromStringValue(addr) | |
678 | + | let economyContract = addressFromStringValue(economyContractStr) | |
679 | + | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, MULT6) | |
680 | + | let now = lastBlock.timestamp | |
681 | + | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
682 | + | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
683 | + | let actAmountLeft = curStats[idxWlgActAmLeft] | |
684 | + | let actAmount = curStats[idxWlgActAmAvailNow] | |
685 | + | let userAmount = curStats[idxWlgUserAmAvailNow] | |
686 | + | let userKey = keyStakersAmountPaidUser(addr) | |
687 | + | let userTotal = curStats[idxWlgUserTotalAvail] | |
688 | + | let userEffTime = curStats[idxWlgEffUserTime] | |
689 | + | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], userAmount) | |
494 | 690 | } | |
495 | 691 | ||
496 | 692 | ||
738 | 934 | then if ((size(i.payments) != 0)) | |
739 | 935 | then throw("No payments required") | |
740 | 936 | else { | |
741 | - | let $ | |
742 | - | let actions = $ | |
743 | - | let wlgClaimedAmount = $ | |
937 | + | let $t01639716466 = claimInternal2(toString(i.caller)) | |
938 | + | let actions = $t01639716466._1 | |
939 | + | let wlgClaimedAmount = $t01639716466._2 | |
744 | 940 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
745 | 941 | } | |
746 | 942 | else throw("Strict value is not equal to itself.") | |
749 | 945 | ||
750 | 946 | ||
751 | 947 | @Callable(i) | |
752 | - | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
948 | + | func onStakeUnstakeLand (addr,isNew) = if (if (if ((i.caller != stakingContract)) | |
753 | 949 | then (i.caller != acresContract) | |
754 | 950 | else false) | |
755 | 951 | then (i.caller != acres2Contract) | |
756 | 952 | else false) | |
757 | 953 | then throw("Permission denied") | |
758 | 954 | else { | |
759 | - | let $t01460214656 = claimInternal2(addr) | |
760 | - | let actions = $t01460214656._1 | |
761 | - | let wlgClaimedAmount = $t01460214656._2 | |
955 | + | let $t01680216897 = if (isNew) | |
956 | + | then claimInternal2(addr) | |
957 | + | else claimInternal(addr) | |
958 | + | let actions = $t01680216897._1 | |
959 | + | let wlgClaimedAmount = $t01680216897._2 | |
762 | 960 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
763 | 961 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
764 | 962 | else actions, wlgClaimedAmount) | |
835 | 1033 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
836 | 1034 | then throw("Permission denied") | |
837 | 1035 | else { | |
838 | - | let $ | |
839 | - | let actions = $ | |
840 | - | let xp = $ | |
1036 | + | let $t01950719550 = takeXpInternal(addr, 0) | |
1037 | + | let actions = $t01950719550._1 | |
1038 | + | let xp = $t01950719550._2 | |
841 | 1039 | $Tuple2(actions, xp) | |
842 | 1040 | } | |
843 | 1041 | ||
845 | 1043 | ||
846 | 1044 | @Callable(i) | |
847 | 1045 | func checkWlgXpREADONLY (addr) = { | |
848 | - | let $ | |
849 | - | let ignored = $ | |
850 | - | let deltaXP = $ | |
1046 | + | let $t01962719675 = takeXpInternal(addr, 0) | |
1047 | + | let ignored = $t01962719675._1 | |
1048 | + | let deltaXP = $t01962719675._2 | |
851 | 1049 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
852 | 1050 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
853 | 1051 | $Tuple2(nil, (lvlPoints :+ newXP)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let MINSHOPPAYMENT = 100000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let chain = take(drop(this.bytes, 1), 1) | |
15 | 15 | ||
16 | 16 | let DAY_BLOCKS = match chain { | |
17 | 17 | case _ => | |
18 | 18 | if ((base58'2W' == $match0)) | |
19 | 19 | then 1440 | |
20 | 20 | else if ((base58'2T' == $match0)) | |
21 | 21 | then 60 | |
22 | 22 | else throw("Unknown chain") | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | let WEEK_BLOCKS = match chain { | |
26 | 26 | case _ => | |
27 | 27 | if ((base58'2W' == $match0)) | |
28 | 28 | then 10080 | |
29 | 29 | else if ((base58'2T' == $match0)) | |
30 | 30 | then 180 | |
31 | 31 | else throw("Unknown chain") | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | let VRF_OFFSET = match chain { | |
35 | 35 | case _ => | |
36 | 36 | if ((base58'2W' == $match0)) | |
37 | 37 | then 0 | |
38 | 38 | else if ((base58'2T' == $match0)) | |
39 | 39 | then 1146000 | |
40 | 40 | else throw("Unknown chain") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | let usdtAssetId = match chain { | |
44 | 44 | case _ => | |
45 | 45 | if ((base58'2W' == $match0)) | |
46 | 46 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
47 | 47 | else if ((base58'2T' == $match0)) | |
48 | 48 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
49 | 49 | else throw("Unknown chain") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | let defaultRest2AddressStr = match chain { | |
53 | 53 | case _ => | |
54 | 54 | if ((base58'2W' == $match0)) | |
55 | 55 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
56 | 56 | else if ((base58'2T' == $match0)) | |
57 | 57 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
58 | 58 | else throw("Unknown chain") | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | let defaultRestAddressStr = match chain { | |
62 | 62 | case _ => | |
63 | 63 | if ((base58'2W' == $match0)) | |
64 | 64 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
65 | 65 | else if ((base58'2T' == $match0)) | |
66 | 66 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
67 | + | else throw("Unknown chain") | |
68 | + | } | |
69 | + | ||
70 | + | let economyContractStr = match chain { | |
71 | + | case _ => | |
72 | + | if ((base58'2W' == $match0)) | |
73 | + | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
74 | + | else if ((base58'2T' == $match0)) | |
75 | + | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
67 | 76 | else throw("Unknown chain") | |
68 | 77 | } | |
69 | 78 | ||
70 | 79 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
71 | 80 | ||
72 | 81 | ||
73 | 82 | let IdxCfgAcres2Dapp = 1 | |
74 | 83 | ||
75 | 84 | let IdxCfgWlgDapp = 2 | |
76 | 85 | ||
77 | 86 | let IdxCfgPuzzlePoolDapp = 4 | |
78 | 87 | ||
79 | 88 | let IdxCfgInvestFundDapp = 5 | |
80 | 89 | ||
81 | 90 | func keyRestCfg () = "%s__restConfig" | |
82 | 91 | ||
83 | 92 | ||
84 | 93 | func keyRest2Address () = "%s__rest2Addr" | |
85 | 94 | ||
86 | 95 | ||
87 | 96 | func keyRestAddress () = "%s__restAddr" | |
88 | 97 | ||
89 | 98 | ||
90 | 99 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
91 | 100 | ||
92 | 101 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
93 | 102 | ||
94 | 103 | ||
95 | 104 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
96 | 105 | ||
97 | 106 | ||
98 | 107 | let IdxCfgStakingDapp = 1 | |
99 | 108 | ||
100 | 109 | let IdxCfgAcresDapp = 8 | |
101 | 110 | ||
102 | 111 | let restCfg = readRestCfgOrFail(restContract) | |
103 | 112 | ||
104 | 113 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
105 | 114 | ||
106 | 115 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
107 | 116 | ||
108 | 117 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
109 | 118 | ||
110 | 119 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
111 | 120 | ||
112 | 121 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
113 | 122 | ||
114 | 123 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
115 | 124 | ||
116 | 125 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
117 | 126 | ||
118 | 127 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
119 | 128 | ||
120 | 129 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
121 | 130 | ||
122 | 131 | ||
123 | 132 | let wlgAssetIdKey = "wlg_assetId" | |
124 | 133 | ||
125 | 134 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
126 | 135 | ||
127 | 136 | func keyUserBet (addr) = ("userBet_" + addr) | |
128 | 137 | ||
129 | 138 | ||
130 | 139 | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
131 | 140 | ||
132 | 141 | ||
133 | 142 | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
134 | 143 | ||
135 | 144 | ||
136 | 145 | func keyTotalWeekParticipants (week) = ("totalWeekParticipants_" + toString(week)) | |
137 | 146 | ||
138 | 147 | ||
139 | 148 | func keyNumNFT2Draw (week) = ("numNFT2Draw_" + toString(week)) | |
140 | 149 | ||
141 | 150 | ||
142 | 151 | func keyNumNFTDrawn (week) = ("numNFTDrawn_" + toString(week)) | |
143 | 152 | ||
144 | 153 | ||
145 | 154 | func keyWeekWinners (week) = ("weekWinners_" + toString(week)) | |
146 | 155 | ||
147 | 156 | ||
148 | 157 | func winningBet (day) = { | |
149 | 158 | let b = (day * DAY_BLOCKS) | |
150 | 159 | let h = if ((b > VRF_OFFSET)) | |
151 | 160 | then b | |
152 | 161 | else (b + VRF_OFFSET) | |
153 | 162 | (toInt(value(value(blockInfoByHeight(h)).vrf)) % 4) | |
154 | 163 | } | |
155 | 164 | ||
156 | 165 | ||
157 | 166 | let ixWlgAmount = 0 | |
158 | 167 | ||
159 | 168 | let ixWlgWlg = 1 | |
160 | 169 | ||
161 | 170 | let ixWlgPrice = 2 | |
162 | 171 | ||
163 | 172 | let ixWlgIssueTime = 8 | |
164 | 173 | ||
165 | 174 | let ixWlgTeamAmLeft = 11 | |
166 | 175 | ||
167 | 176 | let ixWlgTeamAmAvailNow = 12 | |
168 | 177 | ||
169 | 178 | let ixWlgActAmLeft = 15 | |
170 | 179 | ||
171 | 180 | let ixWlgActAmAvailNow = 16 | |
172 | 181 | ||
173 | 182 | let ixWlgAmLeftTotal = 19 | |
174 | 183 | ||
175 | 184 | let ixWlgUserAmAvailNow = 23 | |
176 | 185 | ||
177 | 186 | let ixWlgEffUserTime = 24 | |
178 | 187 | ||
179 | 188 | let ixWlgIssue10Amount = 25 | |
180 | 189 | ||
181 | 190 | let ixWlgMarketingIssue10Amount = 26 | |
182 | 191 | ||
183 | 192 | let ixWlgTeamIssue10Amount = 27 | |
184 | 193 | ||
185 | 194 | let ixWlgUser10part = 28 | |
186 | 195 | ||
187 | 196 | let ixWlgIssue10Time = 29 | |
188 | 197 | ||
189 | 198 | func asInt (v) = match v { | |
190 | 199 | case n: Int => | |
191 | 200 | n | |
192 | 201 | case _ => | |
193 | 202 | throw("fail to cast into Int") | |
194 | 203 | } | |
195 | 204 | ||
196 | 205 | ||
197 | 206 | func fixedPoint (val,decimals) = { | |
198 | 207 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
199 | 208 | let lowPart = toString((val % tenPow)) | |
200 | 209 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
201 | 210 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
202 | 211 | } | |
203 | 212 | ||
204 | 213 | ||
205 | 214 | func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue)) | |
206 | 215 | then throw("maxValue should be > 0") | |
207 | 216 | else { | |
208 | 217 | let randomHash = sha256_16Kb((salt + entropy)) | |
209 | 218 | (toInt(randomHash) % maxValue) | |
210 | 219 | } | |
211 | 220 | ||
212 | 221 | ||
213 | 222 | let SCALE8 = 100000000 | |
214 | 223 | ||
215 | 224 | let xpLevelScale = 3200 | |
216 | 225 | ||
217 | 226 | let xpLevelRecipPow = 4000 | |
218 | 227 | ||
219 | 228 | let numPointsOnLevelUp = 3 | |
220 | 229 | ||
221 | 230 | let wlgBaseAmountXp = 100000000000 | |
222 | 231 | ||
223 | 232 | func keyUserXP (addr) = ("userXP_" + addr) | |
224 | 233 | ||
225 | 234 | ||
226 | 235 | func keyUserLevel (addr) = ("userLevel_" + addr) | |
227 | 236 | ||
228 | 237 | ||
229 | 238 | let xpWlg = 10000 | |
230 | 239 | ||
231 | 240 | func levelByXP (xp) = fraction(xpLevelScale, pow(xp, 4, xpLevelRecipPow, 4, 4, DOWN), SCALE8) | |
232 | 241 | ||
233 | 242 | ||
234 | 243 | func levelUp (currLevel,newXP) = { | |
235 | 244 | let newLevel = levelByXP(newXP) | |
236 | 245 | [newLevel, (numPointsOnLevelUp * (newLevel - currLevel))] | |
237 | 246 | } | |
238 | 247 | ||
239 | 248 | ||
249 | + | let M6 = 1000000 | |
250 | + | ||
251 | + | let M8 = 100000000 | |
252 | + | ||
240 | 253 | let MILLION6 = 100000000000000 | |
254 | + | ||
255 | + | let TEAMSHARE = 200000 | |
256 | + | ||
257 | + | let ACTIVITYSHARE = 100000 | |
241 | 258 | ||
242 | 259 | let PLAYERSHARE = 400000 | |
243 | 260 | ||
261 | + | let YEARMILLIS = 31557600000 | |
262 | + | ||
244 | 263 | let DAYMILLIS = 86400000 | |
264 | + | ||
265 | + | let BANK_FEE = 50000 | |
266 | + | ||
267 | + | let ch = take(drop(this.bytes, 1), 1) | |
268 | + | ||
269 | + | let USDT_TVL_CORRECTION = match ch { | |
270 | + | case _ => | |
271 | + | if ((base58'2W' == $match0)) | |
272 | + | then 1208630000 | |
273 | + | else if ((base58'2T' == $match0)) | |
274 | + | then 0 | |
275 | + | else throw("Unknown chain") | |
276 | + | } | |
245 | 277 | ||
246 | 278 | let teamAddrKey = "teamAddr" | |
247 | 279 | ||
248 | 280 | let lastTeamTimeKey = "lastClaimedTime_team" | |
249 | 281 | ||
250 | 282 | let teamAmountLeftKey = "teamAmountLeft" | |
251 | 283 | ||
252 | 284 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
253 | 285 | ||
254 | 286 | let actAmountLeftKey = "activitiesAmountLeft" | |
255 | 287 | ||
256 | 288 | let stakersAmountLeftKey = "stakersAmountLeft" | |
257 | 289 | ||
290 | + | func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
291 | + | ||
292 | + | ||
258 | 293 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
259 | 294 | ||
260 | 295 | ||
261 | 296 | func keyLastWlgTradeLimitByUser (addr) = ("lastWlgLimitUser_" + addr) | |
262 | 297 | ||
263 | 298 | ||
299 | + | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
300 | + | ||
301 | + | ||
264 | 302 | let wlgIssueTimeKey = "wlg_issueTime" | |
265 | 303 | ||
266 | 304 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
267 | 305 | ||
306 | + | let zbIssuedAmountKey = "zbill_issuedAmount" | |
307 | + | ||
268 | 308 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
269 | 309 | ||
310 | + | ||
311 | + | let acresStakedTotalKey = "acresStakedAmountTotal" | |
270 | 312 | ||
271 | 313 | func keyWlgStakedAmountByUser (addr) = ("wlgStakedAmountByUser_" + addr) | |
272 | 314 | ||
273 | 315 | ||
274 | 316 | let wlgStakedTotalKey = "wlgStakedAmountTotal" | |
275 | 317 | ||
276 | 318 | func keyWlgStakedTimeByUser (addr) = ("wlgStakedTimeByUser_" + addr) | |
319 | + | ||
320 | + | ||
321 | + | let dappRest = 0 | |
322 | + | ||
323 | + | let dappStaking = 1 | |
324 | + | ||
325 | + | let dappEconomy = 2 | |
326 | + | ||
327 | + | let dappWlg = 3 | |
328 | + | ||
329 | + | let dappPuzzle = 4 | |
330 | + | ||
331 | + | let dappInvestFund = 5 | |
332 | + | ||
333 | + | let dappAcres = 6 | |
334 | + | ||
335 | + | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
336 | + | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
337 | + | func adder (acc,item) = (acc + parseIntValue(item)) | |
338 | + | ||
339 | + | let totalPieces = { | |
340 | + | let $l = props | |
341 | + | let $s = size($l) | |
342 | + | let $acc0 = 0 | |
343 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
344 | + | then $a | |
345 | + | else adder($a, $l[$i]) | |
346 | + | ||
347 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
348 | + | then $a | |
349 | + | else throw("List size exceeds 6") | |
350 | + | ||
351 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
352 | + | } | |
353 | + | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
354 | + | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
355 | + | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
356 | + | [totalPieces, userPieces, totalAcres, userAcres] | |
357 | + | } | |
358 | + | ||
359 | + | ||
360 | + | let idxTotalPieces = 0 | |
361 | + | ||
362 | + | let idxUserPieces = 1 | |
363 | + | ||
364 | + | let idxTotalAcres = 2 | |
365 | + | ||
366 | + | let idxUserAcres = 3 | |
367 | + | ||
368 | + | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
369 | + | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
370 | + | let economyUsd = assetBalance(contracts[dappEconomy], usdtId) | |
371 | + | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
372 | + | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
373 | + | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
374 | + | let investFndContract = contracts[dappInvestFund] | |
375 | + | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0)) | |
376 | + | let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal) | |
377 | + | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
378 | + | let now = lastBlock.timestamp | |
379 | + | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
380 | + | let bankWlgold = assetBalance(contracts[dappStaking], wlgId) | |
381 | + | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
382 | + | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
383 | + | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
384 | + | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
385 | + | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
386 | + | let teamWlgold = assetBalance(teamAddr, wlgId) | |
387 | + | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
388 | + | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
389 | + | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
390 | + | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
391 | + | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
392 | + | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime) | |
393 | + | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
394 | + | let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))]) | |
395 | + | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
396 | + | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
397 | + | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
398 | + | let $t079143 = if ((lastUserPeriod == curPeriod)) | |
399 | + | then { | |
400 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
401 | + | let userPart = fraction(a0, userProportion6, M6) | |
402 | + | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
403 | + | $Tuple3(userPart, a0, effTime) | |
404 | + | } | |
405 | + | else if ((lastUserPeriod == (curPeriod - 1))) | |
406 | + | then { | |
407 | + | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
408 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
409 | + | let avail = (a1 + a0) | |
410 | + | let userPart = fraction(avail, userProportion6, M6) | |
411 | + | let effTime = if ((a1 >= userPart)) | |
412 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
413 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
414 | + | $Tuple3(userPart, avail, effTime) | |
415 | + | } | |
416 | + | else { | |
417 | + | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
418 | + | let a1 = distributionByPeriod((curPeriod - 1)) | |
419 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
420 | + | let avail = ((a2 + a1) + a0) | |
421 | + | let userPart = fraction(avail, userProportion6, M6) | |
422 | + | let effTime = if ((a2 >= userPart)) | |
423 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
424 | + | else if (((a2 + a1) >= userPart)) | |
425 | + | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
426 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
427 | + | $Tuple3(userPart, avail, effTime) | |
428 | + | } | |
429 | + | let userAmount = $t079143._1 | |
430 | + | let userAvailable = $t079143._2 | |
431 | + | let effLastTime = $t079143._3 | |
432 | + | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAYMILLIS, YEARMILLIS), 25, eff[idxTotalPieces]) | |
433 | + | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
434 | + | let userTemp = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
435 | + | let bankFromUser = fraction(userTemp, BANK_FEE, M6) | |
436 | + | let robbedUser = (userTemp - bankFromUser) | |
437 | + | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
438 | + | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime, bankWlgold] | |
439 | + | } | |
277 | 440 | ||
278 | 441 | ||
279 | 442 | let M6_ = 1000000 | |
280 | 443 | ||
281 | 444 | let M8_ = 100000000 | |
282 | 445 | ||
283 | 446 | let TEAM_SHARE = 200000 | |
284 | 447 | ||
285 | 448 | let ACTIVITY_SHARE = 100000 | |
286 | 449 | ||
287 | 450 | let PLAYER_SHARE = 400000 | |
288 | 451 | ||
289 | 452 | let YEAR_MILLIS = 31557600000 | |
290 | 453 | ||
291 | 454 | let DAY_MS = 86400000 | |
292 | 455 | ||
293 | 456 | let ISSUE10 = 1000000000 | |
294 | 457 | ||
295 | 458 | let PLAYERS10_SHARE = 800000 | |
296 | 459 | ||
297 | 460 | let MARKETING10_SHARE = 100000 | |
298 | 461 | ||
299 | 462 | let TEAM10_SHARE = 100000 | |
300 | 463 | ||
301 | 464 | let NEW_STAKING_START = 1731279600000 | |
302 | 465 | ||
303 | 466 | let marketingAddrKey = "marketingAddr" | |
304 | 467 | ||
305 | 468 | let teamAdrKey = "teamAddr" | |
306 | 469 | ||
307 | 470 | let lastTeamTimKey = "lastClaimedTime_team" | |
308 | 471 | ||
309 | 472 | let teamAmtLeftKey = "teamAmountLeft" | |
310 | 473 | ||
311 | 474 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
312 | 475 | ||
313 | 476 | let actAmtLeftKey = "activitiesAmountLeft" | |
314 | 477 | ||
315 | 478 | let stakersAmtLeftKey = "stakersAmountLeft" | |
316 | 479 | ||
317 | 480 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
318 | 481 | ||
319 | 482 | ||
320 | 483 | func distrByPeriod (issuedAmount,period) = fraction(issuedAmount, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
321 | 484 | ||
322 | 485 | ||
323 | 486 | let wlgIssue10TimeKey = "wlg_issue10Time" | |
324 | 487 | ||
325 | 488 | let wlgIssueTimKey = "wlg_issueTime" | |
326 | 489 | ||
327 | 490 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
328 | 491 | ||
329 | 492 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
330 | 493 | ||
331 | 494 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
332 | 495 | ||
333 | 496 | ||
334 | 497 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
335 | 498 | ||
336 | 499 | let totalFarmingPowerKey = "totalFarmingPower" | |
337 | 500 | ||
338 | 501 | let dapp2Rest = 0 | |
339 | 502 | ||
340 | 503 | let dapp2Staking = 1 | |
341 | 504 | ||
342 | 505 | let dapp2Wlg = 2 | |
343 | 506 | ||
344 | 507 | let dapp2Puzzle = 3 | |
345 | 508 | ||
346 | 509 | let dapp2InvestFund = 4 | |
347 | 510 | ||
348 | 511 | let DEFAULT_WEEKLY_PRIZES = 5 | |
349 | 512 | ||
350 | 513 | let ACRES_FOR_BET = 100000000 | |
351 | 514 | ||
352 | 515 | let keyNftTotalIssued = "nftTotalIssued" | |
353 | 516 | ||
354 | 517 | let keyNftTotalBurned = "nftTotalBurned" | |
355 | 518 | ||
356 | 519 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
357 | 520 | ||
358 | 521 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
359 | 522 | ||
360 | 523 | ||
361 | 524 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
362 | 525 | ||
363 | 526 | ||
364 | 527 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
365 | 528 | ||
366 | 529 | func getLevelByAcres (acres) = { | |
367 | 530 | let acr = ((acres + 99999999) / M8_) | |
368 | 531 | func checker (acc,item) = if ((item >= acr)) | |
369 | 532 | then acc | |
370 | 533 | else (acc + 1) | |
371 | 534 | ||
372 | 535 | let $l = levelAcres | |
373 | 536 | let $s = size($l) | |
374 | 537 | let $acc0 = 0 | |
375 | 538 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
376 | 539 | then $a | |
377 | 540 | else checker($a, $l[$i]) | |
378 | 541 | ||
379 | 542 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
380 | 543 | then $a | |
381 | 544 | else throw("List size exceeds 10") | |
382 | 545 | ||
383 | 546 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
384 | 547 | } | |
385 | 548 | ||
386 | 549 | ||
387 | 550 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
388 | 551 | ||
389 | 552 | ||
390 | 553 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
391 | 554 | let notBonused = getFarmingPowerByAcres(acres) | |
392 | 555 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
393 | 556 | } | |
394 | 557 | ||
395 | 558 | ||
396 | 559 | func getFarmingPowers (userAddrStrOrEmpty,acres2Contract) = { | |
397 | 560 | let totalFP = valueOrElse(getInteger(acres2Contract, totalFarmingPowerKey), 0) | |
398 | 561 | let userAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
399 | 562 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(userAddrStrOrEmpty)), 0) | |
400 | 563 | let $t079143 = getFarmingPowerByAcresAndBonus(userAcres, userBonus) | |
401 | 564 | let userFPbonused = $t079143._1 | |
402 | 565 | let userFPnotBonused = $t079143._2 | |
403 | 566 | [totalFP, userFPbonused, userFPnotBonused, userBonus] | |
404 | 567 | } | |
405 | 568 | ||
406 | 569 | ||
407 | 570 | let idxTotalFP = 0 | |
408 | 571 | ||
409 | 572 | let idxUserFPbonused = 1 | |
410 | 573 | ||
411 | 574 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
412 | 575 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
413 | 576 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
414 | 577 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
415 | 578 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
416 | 579 | let acres2Usd = assetBalance(contracts[dapp2Staking], usdtId) | |
417 | 580 | let investFndContract = contracts[dapp2InvestFund] | |
418 | 581 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
419 | 582 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
420 | 583 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
421 | 584 | let now = lastBlock.timestamp | |
422 | 585 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
423 | 586 | let wlgWlg = assetBalance(contracts[dapp2Wlg], wlgId) | |
424 | 587 | let teamTotal = fraction(issuedAmount, TEAM_SHARE, M6_) | |
425 | 588 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
426 | 589 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
427 | 590 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
428 | 591 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
429 | 592 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
430 | 593 | let actTotal = fraction(issuedAmount, ACTIVITY_SHARE, M6_) | |
431 | 594 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
432 | 595 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
433 | 596 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
434 | 597 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
435 | 598 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
436 | 599 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
437 | 600 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
438 | 601 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
439 | 602 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
440 | 603 | let curPeriodDistribution = distrByPeriod(issuedAmount, curPeriod) | |
441 | 604 | let prevPeriodEnd = (issueTime + (YEAR_MILLIS * curPeriod)) | |
442 | 605 | let prevPrevPeriodEnd = (issueTime + (YEAR_MILLIS * (curPeriod - 1))) | |
443 | 606 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
444 | 607 | let userAvailable = if ((lastUserPeriod == curPeriod)) | |
445 | 608 | then a0 | |
446 | 609 | else if ((lastUserPeriod == (curPeriod - 1))) | |
447 | 610 | then { | |
448 | 611 | let a1 = fraction(distrByPeriod(issuedAmount, (curPeriod - 1)), (prevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
449 | 612 | (a1 + a0) | |
450 | 613 | } | |
451 | 614 | else { | |
452 | 615 | let a2 = fraction(distrByPeriod(issuedAmount, (curPeriod - 2)), (prevPrevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
453 | 616 | let a1 = distrByPeriod(issuedAmount, (curPeriod - 1)) | |
454 | 617 | ((a2 + a1) + a0) | |
455 | 618 | } | |
456 | 619 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
457 | 620 | let userAmount = if ((eff[idxTotalFP] != 0)) | |
458 | 621 | then fraction(userAvailable, eff[idxUserFPbonused], eff[idxTotalFP]) | |
459 | 622 | else 0 | |
460 | 623 | let lastIssue10Time = valueOrElse(getInteger(contracts[dapp2Wlg], wlgIssue10TimeKey), NEW_STAKING_START) | |
461 | 624 | let issue10Amount = fraction(ISSUE10, max([(now - lastIssue10Time), 0]), DAY_MS) | |
462 | 625 | let marketingIssue10Amount = fraction(issue10Amount, MARKETING10_SHARE, M6_) | |
463 | 626 | let teamIssue10Amount = fraction(issue10Amount, TEAM10_SHARE, M6_) | |
464 | 627 | let user10Interval = max([(now - max([NEW_STAKING_START, lastUserTime])), 0]) | |
465 | 628 | let user10part = if ((eff[idxTotalFP] != 0)) | |
466 | 629 | then fraction(fraction(fraction(ISSUE10, user10Interval, DAY_MS), eff[idxUserFPbonused], eff[idxTotalFP]), PLAYERS10_SHARE, M6_) | |
467 | 630 | else 0 | |
468 | 631 | let newIssue10Time = max([NEW_STAKING_START, now]) | |
469 | 632 | let acresStakedTotal = valueOrElse(getInteger(contracts[dapp2Staking], acresStakdTotalKey), 0) | |
470 | 633 | let nftTotalIssued = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalIssued), 0) | |
471 | 634 | let nftTotalBurned = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalBurned), 0) | |
472 | 635 | let wlNftTotalStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyWlNftTotalStaked), 0) | |
473 | 636 | let wlNftUserStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyUserWlNftNumber(valueOrElse(userAddrOpt, ""))), 0) | |
474 | 637 | [issuedAmount, wlgWlg, fraction(totalFundsUsd, M8_, issuedAmount), totalFundsUsd, restUsd, acres2Usd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, userAmount, nowLimited, issue10Amount, marketingIssue10Amount, teamIssue10Amount, user10part, newIssue10Time, eff[idxTotalFP], acresStakedTotal, nftTotalIssued, nftTotalBurned, wlNftTotalStaked, wlNftUserStaked] | |
475 | 638 | } | |
476 | 639 | ||
477 | 640 | ||
478 | 641 | let profitAddrKey = "profitAddr" | |
479 | 642 | ||
480 | 643 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
481 | 644 | ||
482 | 645 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
483 | 646 | ||
484 | 647 | ||
485 | 648 | func prolog2 () = asInt(reentrantInvoke(acres2Contract, "saveLastTx", nil, nil)) | |
486 | 649 | ||
487 | 650 | ||
488 | 651 | func getSwapLimitWlgold (addr) = { | |
489 | 652 | let lastTime = valueOrElse(getInteger(keyLastWlgTradeTimeByUser(addr)), 0) | |
490 | 653 | let defaultLimit = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmountByUser(addr)), 0) | |
491 | 654 | let lastLimitLeft = valueOrElse(getInteger(keyLastWlgTradeLimitByUser(addr)), defaultLimit) | |
492 | 655 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (lastBlock.timestamp - lastTime), DAY_MILLIS)) | |
493 | 656 | min([currentLimit, defaultLimit]) | |
657 | + | } | |
658 | + | ||
659 | + | ||
660 | + | let idxWlgTeamAmLeft = 10 | |
661 | + | ||
662 | + | let idxWlgTeamAmAvailNow = 11 | |
663 | + | ||
664 | + | let idxWlgActAmLeft = 14 | |
665 | + | ||
666 | + | let idxWlgActAmAvailNow = 15 | |
667 | + | ||
668 | + | let idxWlgAmLeftTotal = 18 | |
669 | + | ||
670 | + | let idxWlgUserAmAvailNow = 21 | |
671 | + | ||
672 | + | let idxWlgUserTotalAvail = 24 | |
673 | + | ||
674 | + | let idxWlgEffUserTime = 25 | |
675 | + | ||
676 | + | func claimInternal (addr) = { | |
677 | + | let caller = addressFromStringValue(addr) | |
678 | + | let economyContract = addressFromStringValue(economyContractStr) | |
679 | + | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, MULT6) | |
680 | + | let now = lastBlock.timestamp | |
681 | + | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
682 | + | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
683 | + | let actAmountLeft = curStats[idxWlgActAmLeft] | |
684 | + | let actAmount = curStats[idxWlgActAmAvailNow] | |
685 | + | let userAmount = curStats[idxWlgUserAmAvailNow] | |
686 | + | let userKey = keyStakersAmountPaidUser(addr) | |
687 | + | let userTotal = curStats[idxWlgUserTotalAvail] | |
688 | + | let userEffTime = curStats[idxWlgEffUserTime] | |
689 | + | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], userAmount) | |
494 | 690 | } | |
495 | 691 | ||
496 | 692 | ||
497 | 693 | func claimInternal2 (addr) = { | |
498 | 694 | let curStats = getWlgStats2(addr, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
499 | 695 | let userTimeKey = keyLastClaimTimeByUser(addr) | |
500 | 696 | let lastUserTime = valueOrElse(getInteger(userTimeKey), 0) | |
501 | 697 | let userEffTime = curStats[ixWlgEffUserTime] | |
502 | 698 | if ((lastUserTime == userEffTime)) | |
503 | 699 | then $Tuple2(nil, 0) | |
504 | 700 | else { | |
505 | 701 | let now = lastBlock.timestamp | |
506 | 702 | let issueTime = curStats[ixWlgIssueTime] | |
507 | 703 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
508 | 704 | let teamAmount = (curStats[ixWlgTeamAmAvailNow] + curStats[ixWlgTeamIssue10Amount]) | |
509 | 705 | let teamTransfer = if ((teamAmount > 0)) | |
510 | 706 | then [ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId)] | |
511 | 707 | else nil | |
512 | 708 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
513 | 709 | let actAmount = curStats[ixWlgActAmAvailNow] | |
514 | 710 | let actTransfer = if ((actAmount > 0)) | |
515 | 711 | then [ScriptTransfer(restContract, actAmount, wlgAssetId)] | |
516 | 712 | else nil | |
517 | 713 | let marketingAmount = curStats[ixWlgMarketingIssue10Amount] | |
518 | 714 | let marketingTransfer = if ((marketingAmount > 0)) | |
519 | 715 | then [ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId)] | |
520 | 716 | else nil | |
521 | 717 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
522 | 718 | let userKey = keyStakersAmountPaidUser(addr) | |
523 | 719 | let userTotal = (userAmount + curStats[ixWlgUser10part]) | |
524 | 720 | let issued10Amount = curStats[ixWlgIssue10Amount] | |
525 | 721 | $Tuple2(((([Reissue(wlgAssetId, issued10Amount, true), IntegerEntry(wlgIssuedAmountKey, (curStats[ixWlgAmount] + issued10Amount)), IntegerEntry(wlgIssue10TimeKey, curStats[ixWlgIssue10Time]), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userAmount)), IntegerEntry(stakersAmountLeftKey, (curStats[ixWlgAmLeftTotal] - userAmount)), IntegerEntry(teamAmountLeftKey, ((teamAmountLeft - teamAmount) + curStats[ixWlgTeamIssue10Amount])), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(userTimeKey, userEffTime)] ++ teamTransfer) ++ actTransfer) ++ marketingTransfer), userTotal) | |
526 | 722 | } | |
527 | 723 | } | |
528 | 724 | ||
529 | 725 | ||
530 | 726 | func takeXpInternal (addr,delta) = { | |
531 | 727 | let now = lastBlock.timestamp | |
532 | 728 | let timeKey = keyWlgStakedTimeByUser(addr) | |
533 | 729 | let amountKey = keyWlgStakedAmountByUser(addr) | |
534 | 730 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
535 | 731 | let oldUser = valueOrElse(getInteger(amountKey), 0) | |
536 | 732 | let oldTotal = valueOrElse(getInteger(wlgStakedTotalKey), 0) | |
537 | 733 | let xp = fraction(fraction(xpWlg, oldUser, wlgBaseAmountXp), (lastTime - now), DAYMILLIS) | |
538 | 734 | $Tuple3([IntegerEntry(timeKey, now), IntegerEntry(amountKey, (oldUser + delta)), IntegerEntry(wlgStakedTotalKey, (oldTotal + delta))], xp, oldUser) | |
539 | 735 | } | |
540 | 736 | ||
541 | 737 | ||
542 | 738 | func openChestInternal (addr) = { | |
543 | 739 | let week = (height / WEEK_BLOCKS) | |
544 | 740 | let drawWeek = (week - 1) | |
545 | 741 | let numPrizes = valueOrElse(getInteger(keyNumNFT2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
546 | 742 | let prizesDrawn = valueOrElse(getInteger(keyNumNFTDrawn(drawWeek)), 0) | |
547 | 743 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
548 | 744 | if ((0 >= userTickets)) | |
549 | 745 | then $Tuple2(nil, unit) | |
550 | 746 | else { | |
551 | 747 | let weekTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
552 | 748 | if ((0 >= weekTickets)) | |
553 | 749 | then $Tuple2([DeleteEntry(keyUserWeekTickets(addr, drawWeek))], unit) | |
554 | 750 | else { | |
555 | 751 | let entropy = value(value(blockInfoByHeight((week * WEEK_BLOCKS))).vrf) | |
556 | 752 | let salt = fromBase58String(split(valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
557 | 753 | let random = getRandomNumber(weekTickets, salt, entropy) | |
558 | 754 | if (((userTickets * numPrizes) > random)) | |
559 | 755 | then { | |
560 | 756 | let issueResult = invoke(acres2Contract, "issuePickC1", [addr], nil) | |
561 | 757 | let winners = getString(keyWeekWinners(drawWeek)) | |
562 | 758 | let newWinners = if (isDefined(winners)) | |
563 | 759 | then ((value(winners) + "_") + addr) | |
564 | 760 | else addr | |
565 | 761 | $Tuple2([IntegerEntry(keyNumNFTDrawn(drawWeek), (prizesDrawn + 1)), DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], issueResult) | |
566 | 762 | } | |
567 | 763 | else { | |
568 | 764 | let random1 = (getRandomNumber(9, (base58'29' + salt), entropy) + 1) | |
569 | 765 | let consTickets = fraction(userTickets, random1, 10) | |
570 | 766 | let ticketsKey = keyUserWeekTickets(addr, week) | |
571 | 767 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
572 | 768 | $Tuple2(((if ((consTickets == 0)) | |
573 | 769 | then nil | |
574 | 770 | else { | |
575 | 771 | let commonActions = [IntegerEntry(keyTotalWeekTickets(week), (valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) + consTickets)), IntegerEntry(ticketsKey, (oldTickets + consTickets))] | |
576 | 772 | if ((oldTickets > 0)) | |
577 | 773 | then commonActions | |
578 | 774 | else (commonActions :+ IntegerEntry(keyTotalWeekParticipants(week), (valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) + 1))) | |
579 | 775 | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), consTickets) | |
580 | 776 | } | |
581 | 777 | } | |
582 | 778 | } | |
583 | 779 | } | |
584 | 780 | ||
585 | 781 | ||
586 | 782 | func claimTicketsInternal (addr,userBetStr) = { | |
587 | 783 | let week = (height / WEEK_BLOCKS) | |
588 | 784 | let ticketsKey = keyUserWeekTickets(addr, week) | |
589 | 785 | let dayBet = split(userBetStr, "_") | |
590 | 786 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
591 | 787 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
592 | 788 | let deltaTickets = if ((winningBet(parseIntValue(dayBet[0])) == parseIntValue(dayBet[1]))) | |
593 | 789 | then 1 | |
594 | 790 | else 0 | |
595 | 791 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
596 | 792 | let updateParticipants = if (if ((oldTickets == 0)) | |
597 | 793 | then (deltaTickets == 1) | |
598 | 794 | else false) | |
599 | 795 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
600 | 796 | else nil | |
601 | 797 | $Tuple2(if ((deltaTickets == 0)) | |
602 | 798 | then nil | |
603 | 799 | else ((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
604 | 800 | } | |
605 | 801 | ||
606 | 802 | ||
607 | 803 | @Callable(i) | |
608 | 804 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
609 | 805 | then throw("Permission denied") | |
610 | 806 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
611 | 807 | then throw("Already initialized") | |
612 | 808 | else { | |
613 | 809 | let issuedAmount = MILLION6 | |
614 | 810 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
615 | 811 | let assetId = calculateAssetId(issue) | |
616 | 812 | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)] | |
617 | 813 | } | |
618 | 814 | ||
619 | 815 | ||
620 | 816 | ||
621 | 817 | @Callable(i) | |
622 | 818 | func constructorV2 (rest2Addr) = if ((i.caller != this)) | |
623 | 819 | then throw("Permission denied") | |
624 | 820 | else [StringEntry(keyRest2Address(), rest2Addr)] | |
625 | 821 | ||
626 | 822 | ||
627 | 823 | ||
628 | 824 | @Callable(i) | |
629 | 825 | func buyWlg (minToReceive) = { | |
630 | 826 | let prologResult = prolog2() | |
631 | 827 | if ((prologResult == prologResult)) | |
632 | 828 | then if ((size(i.payments) != 1)) | |
633 | 829 | then throw("exactly 1 payment must be attached") | |
634 | 830 | else { | |
635 | 831 | let pmt = i.payments[0] | |
636 | 832 | let usdtAmt = pmt.amount | |
637 | 833 | if (if (!(isDefined(pmt.assetId))) | |
638 | 834 | then true | |
639 | 835 | else (value(pmt.assetId) != usdtAssetId)) | |
640 | 836 | then throw("USDT payments only!") | |
641 | 837 | else { | |
642 | 838 | let caller = i.caller | |
643 | 839 | let addr = toString(caller) | |
644 | 840 | if ((MINSHOPPAYMENT > usdtAmt)) | |
645 | 841 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
646 | 842 | else { | |
647 | 843 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
648 | 844 | let curWlgAmount = curStats[ixWlgAmount] | |
649 | 845 | let wlgPrice = curStats[ixWlgPrice] | |
650 | 846 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
651 | 847 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
652 | 848 | let maxWlg = getSwapLimitWlgold(addr) | |
653 | 849 | if ((wlgAmount > maxWlg)) | |
654 | 850 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
655 | 851 | else if ((minToReceive > wlgAmount)) | |
656 | 852 | then throw("Price changed during operation, please try again") | |
657 | 853 | else { | |
658 | 854 | let profitAmount = (usdtAmt / 6) | |
659 | 855 | $Tuple2([Reissue(wlgAssetId, wlgAmount, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + wlgAmount)), IntegerEntry(keyLastWlgTradeTimeByUser(addr), lastBlock.timestamp), IntegerEntry(keyLastWlgTradeLimitByUser(addr), (maxWlg - wlgAmount)), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult) | |
660 | 856 | } | |
661 | 857 | } | |
662 | 858 | } | |
663 | 859 | } | |
664 | 860 | else throw("Strict value is not equal to itself.") | |
665 | 861 | } | |
666 | 862 | ||
667 | 863 | ||
668 | 864 | ||
669 | 865 | @Callable(i) | |
670 | 866 | func buyWlgREADONLY (address,usdtAmt) = { | |
671 | 867 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
672 | 868 | let wlgPrice = curStats[ixWlgPrice] | |
673 | 869 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
674 | 870 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
675 | 871 | let maxWlg = getSwapLimitWlgold(address) | |
676 | 872 | let maxUsdt = fraction(maxWlg, buyPrice, MULT8) | |
677 | 873 | let profitAmount = (usdtAmt / 6) | |
678 | 874 | $Tuple2(nil, [wlgAmount, MINSHOPPAYMENT, maxUsdt, profitAmount]) | |
679 | 875 | } | |
680 | 876 | ||
681 | 877 | ||
682 | 878 | ||
683 | 879 | @Callable(i) | |
684 | 880 | func sellWlg (minAmount) = { | |
685 | 881 | let prologResult = prolog2() | |
686 | 882 | if ((prologResult == prologResult)) | |
687 | 883 | then if ((size(i.payments) != 1)) | |
688 | 884 | then throw("exactly 1 payment must be attached") | |
689 | 885 | else { | |
690 | 886 | let pmt = i.payments[0] | |
691 | 887 | let wlgAmt = pmt.amount | |
692 | 888 | let caller = i.caller | |
693 | 889 | let addr = toString(caller) | |
694 | 890 | let maxWlg = getSwapLimitWlgold(addr) | |
695 | 891 | if ((wlgAmt > maxWlg)) | |
696 | 892 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
697 | 893 | else if (if (!(isDefined(pmt.assetId))) | |
698 | 894 | then true | |
699 | 895 | else (value(pmt.assetId) != wlgAssetId)) | |
700 | 896 | then throw("WLGOLD payments only!") | |
701 | 897 | else { | |
702 | 898 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
703 | 899 | let curWlgAmount = curStats[ixWlgAmount] | |
704 | 900 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
705 | 901 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
706 | 902 | if ((MINSHOPPAYMENT > usdtAmt)) | |
707 | 903 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
708 | 904 | else if ((minAmount > usdtAmt)) | |
709 | 905 | then throw("Price changed during operation, please try again") | |
710 | 906 | else { | |
711 | 907 | let profitAmount = (usdtAmt / 5) | |
712 | 908 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - wlgAmt)), IntegerEntry(keyLastWlgTradeTimeByUser(addr), lastBlock.timestamp), IntegerEntry(keyLastWlgTradeLimitByUser(addr), (maxWlg - wlgAmt)), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult) | |
713 | 909 | } | |
714 | 910 | } | |
715 | 911 | } | |
716 | 912 | else throw("Strict value is not equal to itself.") | |
717 | 913 | } | |
718 | 914 | ||
719 | 915 | ||
720 | 916 | ||
721 | 917 | @Callable(i) | |
722 | 918 | func sellWlgREADONLY (address,wlgAmt) = { | |
723 | 919 | let maxWlg = getSwapLimitWlgold(address) | |
724 | 920 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
725 | 921 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
726 | 922 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
727 | 923 | let minWlg = fraction(MINSHOPPAYMENT, MULT8, sellPrice) | |
728 | 924 | let profitAmount = (usdtAmt / 5) | |
729 | 925 | $Tuple2(nil, [usdtAmt, minWlg, maxWlg, profitAmount]) | |
730 | 926 | } | |
731 | 927 | ||
732 | 928 | ||
733 | 929 | ||
734 | 930 | @Callable(i) | |
735 | 931 | func claim () = { | |
736 | 932 | let prologResult = prolog2() | |
737 | 933 | if ((prologResult == prologResult)) | |
738 | 934 | then if ((size(i.payments) != 0)) | |
739 | 935 | then throw("No payments required") | |
740 | 936 | else { | |
741 | - | let $ | |
742 | - | let actions = $ | |
743 | - | let wlgClaimedAmount = $ | |
937 | + | let $t01639716466 = claimInternal2(toString(i.caller)) | |
938 | + | let actions = $t01639716466._1 | |
939 | + | let wlgClaimedAmount = $t01639716466._2 | |
744 | 940 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
745 | 941 | } | |
746 | 942 | else throw("Strict value is not equal to itself.") | |
747 | 943 | } | |
748 | 944 | ||
749 | 945 | ||
750 | 946 | ||
751 | 947 | @Callable(i) | |
752 | - | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
948 | + | func onStakeUnstakeLand (addr,isNew) = if (if (if ((i.caller != stakingContract)) | |
753 | 949 | then (i.caller != acresContract) | |
754 | 950 | else false) | |
755 | 951 | then (i.caller != acres2Contract) | |
756 | 952 | else false) | |
757 | 953 | then throw("Permission denied") | |
758 | 954 | else { | |
759 | - | let $t01460214656 = claimInternal2(addr) | |
760 | - | let actions = $t01460214656._1 | |
761 | - | let wlgClaimedAmount = $t01460214656._2 | |
955 | + | let $t01680216897 = if (isNew) | |
956 | + | then claimInternal2(addr) | |
957 | + | else claimInternal(addr) | |
958 | + | let actions = $t01680216897._1 | |
959 | + | let wlgClaimedAmount = $t01680216897._2 | |
762 | 960 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
763 | 961 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
764 | 962 | else actions, wlgClaimedAmount) | |
765 | 963 | } | |
766 | 964 | ||
767 | 965 | ||
768 | 966 | ||
769 | 967 | @Callable(i) | |
770 | 968 | func burnWlgold (wlgAmt) = if ((i.caller != acres2Contract)) | |
771 | 969 | then throw("Permission denied") | |
772 | 970 | else { | |
773 | 971 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
774 | 972 | if ((wlgAmt > curStats[ixWlgWlg])) | |
775 | 973 | then throw(((("Only " + fixedPoint(curStats[ixWlgWlg], 8)) + " WLGOLD left on contract, can't burn ") + fixedPoint(wlgAmt, 8))) | |
776 | 974 | else { | |
777 | 975 | let wlgAmountLeft = (curStats[ixWlgAmount] - wlgAmt) | |
778 | 976 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, wlgAmountLeft)], wlgAmountLeft) | |
779 | 977 | } | |
780 | 978 | } | |
781 | 979 | ||
782 | 980 | ||
783 | 981 | ||
784 | 982 | @Callable(i) | |
785 | 983 | func betForTicket (bet) = { | |
786 | 984 | let prologResult = prolog2() | |
787 | 985 | if ((prologResult == prologResult)) | |
788 | 986 | then if ((size(i.payments) != 0)) | |
789 | 987 | then throw("No payments required") | |
790 | 988 | else { | |
791 | 989 | let addr = toString(i.caller) | |
792 | 990 | let drawWeek = ((height / WEEK_BLOCKS) - 1) | |
793 | 991 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
794 | 992 | let weekTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
795 | 993 | if (if ((userTickets > 0)) | |
796 | 994 | then (weekTickets > 0) | |
797 | 995 | else false) | |
798 | 996 | then throw("Please open the chest first") | |
799 | 997 | else if (((bet / 4) != 0)) | |
800 | 998 | then throw("Invalid bet: should be 0..3") | |
801 | 999 | else { | |
802 | 1000 | let moment = (height % DAY_BLOCKS) | |
803 | 1001 | if ((moment > (DAY_BLOCKS - 3))) | |
804 | 1002 | then throw((("Cannot bet: the day is almost ended, please wait " + toString((DAY_BLOCKS - moment))) + " blocks")) | |
805 | 1003 | else { | |
806 | 1004 | let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(addr)), 0) | |
807 | 1005 | if ((ACRES_FOR_BET > stakedAcres)) | |
808 | 1006 | then throw((("You need to stake at least " + fixedPoint(ACRES_FOR_BET, 8)) + " ACRES to bet")) | |
809 | 1007 | else { | |
810 | 1008 | let tomorrow = ((height / DAY_BLOCKS) + 1) | |
811 | 1009 | let betKey = keyUserBet(addr) | |
812 | 1010 | let oldUserBetStr = getString(betKey) | |
813 | 1011 | let newBetEntry = StringEntry(betKey, ((toString(tomorrow) + "_") + toString(bet))) | |
814 | 1012 | if (isDefined(oldUserBetStr)) | |
815 | 1013 | then { | |
816 | 1014 | let userBet = value(oldUserBetStr) | |
817 | 1015 | if ((split(userBet, "_")[0] == toString(tomorrow))) | |
818 | 1016 | then throw("You already bet for tomorrow") | |
819 | 1017 | else { | |
820 | 1018 | let r = claimTicketsInternal(addr, userBet) | |
821 | 1019 | $Tuple2((r._1 :+ newBetEntry), r._2) | |
822 | 1020 | } | |
823 | 1021 | } | |
824 | 1022 | else $Tuple2([newBetEntry], 0) | |
825 | 1023 | } | |
826 | 1024 | } | |
827 | 1025 | } | |
828 | 1026 | } | |
829 | 1027 | else throw("Strict value is not equal to itself.") | |
830 | 1028 | } | |
831 | 1029 | ||
832 | 1030 | ||
833 | 1031 | ||
834 | 1032 | @Callable(i) | |
835 | 1033 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
836 | 1034 | then throw("Permission denied") | |
837 | 1035 | else { | |
838 | - | let $ | |
839 | - | let actions = $ | |
840 | - | let xp = $ | |
1036 | + | let $t01950719550 = takeXpInternal(addr, 0) | |
1037 | + | let actions = $t01950719550._1 | |
1038 | + | let xp = $t01950719550._2 | |
841 | 1039 | $Tuple2(actions, xp) | |
842 | 1040 | } | |
843 | 1041 | ||
844 | 1042 | ||
845 | 1043 | ||
846 | 1044 | @Callable(i) | |
847 | 1045 | func checkWlgXpREADONLY (addr) = { | |
848 | - | let $ | |
849 | - | let ignored = $ | |
850 | - | let deltaXP = $ | |
1046 | + | let $t01962719675 = takeXpInternal(addr, 0) | |
1047 | + | let ignored = $t01962719675._1 | |
1048 | + | let deltaXP = $t01962719675._2 | |
851 | 1049 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
852 | 1050 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
853 | 1051 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
854 | 1052 | } | |
855 | 1053 | ||
856 | 1054 | ||
857 | 1055 | ||
858 | 1056 | @Callable(i) | |
859 | 1057 | func setNumPrizes (numPrizes) = if ((i.caller != this)) | |
860 | 1058 | then throw("Permission denied") | |
861 | 1059 | else { | |
862 | 1060 | let week = (height / WEEK_BLOCKS) | |
863 | 1061 | $Tuple2([IntegerEntry(keyNumNFT2Draw(week), numPrizes)], numPrizes) | |
864 | 1062 | } | |
865 | 1063 | ||
866 | 1064 | ||
867 | 1065 | ||
868 | 1066 | @Callable(i) | |
869 | 1067 | func openChest () = { | |
870 | 1068 | let prologResult = prolog2() | |
871 | 1069 | if ((prologResult == prologResult)) | |
872 | 1070 | then if ((size(i.payments) != 0)) | |
873 | 1071 | then throw("No payments required") | |
874 | 1072 | else { | |
875 | 1073 | let drawWeek = ((height / WEEK_BLOCKS) - 1) | |
876 | 1074 | let addr = toString(i.caller) | |
877 | 1075 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
878 | 1076 | if ((0 >= userTickets)) | |
879 | 1077 | then throw("No gems to open the chest") | |
880 | 1078 | else openChestInternal(addr) | |
881 | 1079 | } | |
882 | 1080 | else throw("Strict value is not equal to itself.") | |
883 | 1081 | } | |
884 | 1082 | ||
885 | 1083 | ||
886 | 1084 | ||
887 | 1085 | @Callable(i) | |
888 | 1086 | func addGemsFor (addr,deltaTickets) = if ((i.caller != this)) | |
889 | 1087 | then throw("Permission denied") | |
890 | 1088 | else { | |
891 | 1089 | let week = (height / WEEK_BLOCKS) | |
892 | 1090 | let ticketsKey = keyUserWeekTickets(addr, week) | |
893 | 1091 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
894 | 1092 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
895 | 1093 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
896 | 1094 | let updateParticipants = if (if ((oldTickets == 0)) | |
897 | 1095 | then (deltaTickets == 1) | |
898 | 1096 | else false) | |
899 | 1097 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
900 | 1098 | else nil | |
901 | 1099 | $Tuple2(((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
902 | 1100 | } | |
903 | 1101 | ||
904 | 1102 |
github/deemru/w8io/026f985 106.95 ms ◑