tx · e8eP4mbhtjPhYtC9DJqEuHahczoCURWkQAkFvpxvftv 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv: -0.01700000 Waves 2024.11.22 16:54 [3382760] smart account 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv > SELF 0.00000000 Waves
{ "type": 13, "id": "e8eP4mbhtjPhYtC9DJqEuHahczoCURWkQAkFvpxvftv", "fee": 1700000, "feeAssetId": null, "timestamp": 1732283685382, "version": 2, "chainId": 84, "sender": "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv", "senderPublicKey": "2fNSk5gmWbXBDTkSYSKd66xSgVvAYzrJnP9YSAFNvTwC", "proofs": [ "2ahybNdDdSfiSTEkffbucuESCtqPj25q4mabScfGbpeCEyyjjLJ7ahvoDDfXCCnSmToueWDAL6SjiGP7ceR3dxk8" ], "script": "base64:BgIbCAISAwoBGBIDCgEIEgMKAQgSAwoBCBIDCgEIcAADU0VQAgJfXwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFmRlZmF1bHRSZXN0MkFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQRndZdGE4YmlFejMxenBlRmU1REpLOHdFNXRyU3BRVkY4AwkAAAIBAVQFByRtYXRjaDACIzNON1V1WWFyNjI2NFA1OEZCaFZXS1BRQWg0WXVhMmhnbmd2CQACAQINVW5rbm93biBjaGFpbgAVb2xkU3Rha2luZ0NvbnRyYWN0U3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUExuY1h0UzFVODNENmNRYkZEM0g4ck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kZHJPcHQFCGxhc3RXZWVrAAAEE2N1cldlZWtUb3RhbFRpY2tldHMJAQt2YWx1ZU9yRWxzZQIJAJoIAgULd2xnQ29udHJhY3QJARNrZXlUb3RhbFdlZWtUaWNrZXRzAQUEd2VlawAABBRsYXN0V2Vla1RvdGFsVGlja2V0cwkBC3ZhbHVlT3JFbHNlAgkAmggCBQt3bGdDb250cmFjdAkBE2tleVRvdGFsV2Vla1RpY2tldHMBBQhsYXN0V2VlawAABAh1c2Vyc0JldAkBC3ZhbHVlT3JFbHNlAgkAnQgCBQt3bGdDb250cmFjdAkBCmtleVVzZXJCZXQBBQt1c2VyQWRkck9wdAIACQCUCgIFA25pbAkAzAgCCQCsAgIJAKwCAgkArAICAhYlcyVkJWRfX3RvdGFsVGlja2V0c19fCQCkAwEFFGxhc3RXZWVrVG90YWxUaWNrZXRzBQNTRVAJAKQDAQUTY3VyV2Vla1RvdGFsVGlja2V0cwkAzAgCCQCsAgIJAKwCAgkArAICAhUlcyVkJWRfX3VzZXJUaWNrZXRzX18JAKQDAQUPbGFzdFdlZWtUaWNrZXRzBQNTRVAJAKQDAQUOY3VyV2Vla1RpY2tldHMJAMwIAgkArAICAhUlcyVkX19ibG9ja2NoYWluRGF5X18JAKQDAQUFdG9kYXkJAMwIAgkArAICAhglcyVkX19ibG9ja2NoYWluTWludXRlX18JAKQDAQkAagIFBmhlaWdodAUKREFZX0JMT0NLUwkAzAgCCQCsAgICFyVzJWRfX3dpbm5pbmdCZXRUb2RheV9fCQCkAwEJAQp3aW5uaW5nQmV0AQUFdG9kYXkJAMwIAgkArAICAhAlcyVzX191c2Vyc0JldF9fBQh1c2Vyc0JldAUDbmlsAELjFRg=", "height": 3382760, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4Xuev4osTbDLAUXdFMuN5RQfS23r7dn2e9A13ooB2HW3 Next: AvCjaHJGtztMiGkai6bR623nehv9xKK7F26ns1zJCoWa Diff:
Old | New | Differences | |
---|---|---|---|
69 | 69 | ||
70 | 70 | let oldAcresContractKey = "oldAcresContract" | |
71 | 71 | ||
72 | - | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
72 | + | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
73 | + | ||
74 | + | ||
75 | + | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
73 | 76 | ||
74 | 77 | ||
75 | 78 | let wlgAssetIdKey = "wlg_assetId" | |
131 | 134 | let DAY_MS = 86400000 | |
132 | 135 | ||
133 | 136 | let DAY_BLOCKS = 1440 | |
137 | + | ||
138 | + | let WEEK_BLOCKS = 10080 | |
134 | 139 | ||
135 | 140 | let ISSUE10 = 1000000000 | |
136 | 141 | ||
222 | 227 | func keyUserBet (addr) = ("userBet_" + addr) | |
223 | 228 | ||
224 | 229 | ||
225 | - | func | |
230 | + | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
226 | 231 | ||
227 | 232 | ||
228 | - | let keyTotalTickets = "totalTickets" | |
233 | + | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
234 | + | ||
229 | 235 | ||
230 | 236 | func winningBet (day) = (toInt(value(value(blockInfoByHeight((day * DAY_BLOCKS))).vrf)) % 4) | |
231 | 237 | ||
376 | 382 | let refByKey = keyAddressRefBy(userAddressOpt) | |
377 | 383 | let refBy = getString(acres2Contract, refByKey) | |
378 | 384 | let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "") | |
379 | - | let lastTxId = valueOrElse(getString(acres2Contract, keyLastTxIdByUser(userAddressOpt)), "") | |
385 | + | let lastTxId = valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(userAddressOpt)), "") | |
386 | + | let curTxId = valueOrElse(getString(acres2Contract, keyCurWeekTxIdByUser(userAddressOpt)), "") | |
380 | 387 | let acresBalance = if (isDefined(addr)) | |
381 | 388 | then assetBalance(value(addr), acresAssetId) | |
382 | 389 | else 0 | |
386 | 393 | let acresToNextLvl = if ((lvl >= size(levelAcres))) | |
387 | 394 | then 0 | |
388 | 395 | else (((levelAcres[lvl] * M8_) + 1) - stakedAcres) | |
389 | - | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__usdtBalance__" + toString(usdtBalance)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl)), ("%s%d__acresToNextLvl__" + toString(acresToNextLvl)), ("%s%d__userFarmingPower__" + toString(fp[idxUserFP])), ("%s%d__totalFarmingPower__" + toString(fp[idxTotalFP]))] | |
396 | + | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastWeekTxId__" + lastTxId), ("%s%s__curWeekTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__usdtBalance__" + toString(usdtBalance)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl)), ("%s%d__acresToNextLvl__" + toString(acresToNextLvl)), ("%s%d__userFarmingPower__" + toString(fp[idxUserFP])), ("%s%d__totalFarmingPower__" + toString(fp[idxTotalFP]))] | |
390 | 397 | } | |
391 | 398 | ||
392 | 399 | ||
423 | 430 | @Callable(i) | |
424 | 431 | func conversionInfoREADONLY (userAddressOpt) = { | |
425 | 432 | let oldAcresAddress = addressFromStringValue(getStringValue(acres2Contract, oldAcresContractKey)) | |
426 | - | let $ | |
427 | - | let unstakedAcres = $ | |
428 | - | let claimedAcres = $ | |
429 | - | let $ | |
430 | - | let acresFromPieces = $ | |
431 | - | let acresFromRes = $ | |
432 | - | let acresFromMat = $ | |
433 | - | let acresFromProd = $ | |
433 | + | let $t046894811 = asTuple2Ints(invoke(oldAcresAddress, "unstakeAllAcresREADONLY", [userAddressOpt], nil)) | |
434 | + | let unstakedAcres = $t046894811._1 | |
435 | + | let claimedAcres = $t046894811._2 | |
436 | + | let $t048144963 = asTuple4Ints(invoke(acres2Contract, "unstakeLandsREADONLY", [userAddressOpt], nil)) | |
437 | + | let acresFromPieces = $t048144963._1 | |
438 | + | let acresFromRes = $t048144963._2 | |
439 | + | let acresFromMat = $t048144963._3 | |
440 | + | let acresFromProd = $t048144963._4 | |
434 | 441 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
435 | 442 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(userAddressOpt)), "") | |
436 | - | let $ | |
443 | + | let $t051415363 = if ((duckAssetId != "")) | |
437 | 444 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckREADONLY", [duckAssetId, userAddressOpt], nil)) | |
438 | 445 | else $Tuple3(0, 0, 0) | |
439 | - | let acresFromDuckRes = $ | |
440 | - | let acresFromDuckMat = $ | |
441 | - | let acresFromDuckProd = $ | |
446 | + | let acresFromDuckRes = $t051415363._1 | |
447 | + | let acresFromDuckMat = $t051415363._2 | |
448 | + | let acresFromDuckProd = $t051415363._3 | |
442 | 449 | $Tuple2(nil, [("%s%d__unstakedAcres__" + toString(unstakedAcres)), ("%s%d__claimedAcres__" + toString(claimedAcres)), ("%s%d__acresFromPieces__" + toString(acresFromPieces)), ("%s%d__acresFromRes__" + toString(acresFromRes)), ("%s%d__acresFromMat__" + toString(acresFromMat)), ("%s%d__acresFromProd__" + toString(acresFromProd)), ("%s%d__acresFromDuckRes__" + toString(acresFromDuckRes)), ("%s%d__acresFromDuckMat__" + toString(acresFromDuckMat)), ("%s%d__acresFromDuckProd__" + toString(acresFromDuckProd))]) | |
443 | 450 | } | |
444 | 451 | ||
455 | 462 | @Callable(i) | |
456 | 463 | func lotteryStatsREADONLY (userAddrOpt) = { | |
457 | 464 | let today = (height / DAY_BLOCKS) | |
465 | + | let week = (height / WEEK_BLOCKS) | |
466 | + | let lastWeek = (week - 1) | |
467 | + | let curWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, week)), 0) | |
468 | + | let lastWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, lastWeek)), 0) | |
469 | + | let curWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(week)), 0) | |
470 | + | let lastWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(lastWeek)), 0) | |
458 | 471 | let usersBet = valueOrElse(getString(wlgContract, keyUserBet(userAddrOpt)), "") | |
459 | - | $Tuple2(nil, [("%s%d__totalTickets__" + toString( | |
472 | + | $Tuple2(nil, [((("%s%d%d__totalTickets__" + toString(lastWeekTotalTickets)) + SEP) + toString(curWeekTotalTickets)), ((("%s%d%d__userTickets__" + toString(lastWeekTickets)) + SEP) + toString(curWeekTickets)), ("%s%d__blockchainDay__" + toString(today)), ("%s%d__blockchainMinute__" + toString((height % DAY_BLOCKS))), ("%s%d__winningBetToday__" + toString(winningBet(today))), ("%s%s__usersBet__" + usersBet)]) | |
460 | 473 | } | |
461 | 474 | ||
462 | 475 |
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 chain = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let usdtAssetId = match chain { | |
9 | 9 | case _ => | |
10 | 10 | if ((base58'2W' == $match0)) | |
11 | 11 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
12 | 12 | else if ((base58'2T' == $match0)) | |
13 | 13 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
14 | 14 | else throw("Unknown chain") | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | let defaultRest2AddressStr = match chain { | |
18 | 18 | case _ => | |
19 | 19 | if ((base58'2W' == $match0)) | |
20 | 20 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
21 | 21 | else if ((base58'2T' == $match0)) | |
22 | 22 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
23 | 23 | else throw("Unknown chain") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | let oldStakingContractStr = match chain { | |
27 | 27 | case _ => | |
28 | 28 | if ((base58'2W' == $match0)) | |
29 | 29 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
30 | 30 | else if ((base58'2T' == $match0)) | |
31 | 31 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
32 | 32 | else throw("Unknown chain") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | let IdxCfgAcres2Dapp = 1 | |
39 | 39 | ||
40 | 40 | let IdxCfgWlgDapp = 2 | |
41 | 41 | ||
42 | 42 | let IdxCfgPuzzlePoolDapp = 4 | |
43 | 43 | ||
44 | 44 | let IdxCfgInvestFundDapp = 5 | |
45 | 45 | ||
46 | 46 | func keyRestCfg () = "%s__restConfig" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyRest2Address () = "%s__rest2Addr" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
59 | 59 | ||
60 | 60 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
61 | 61 | ||
62 | 62 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
63 | 63 | ||
64 | 64 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
65 | 65 | ||
66 | 66 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
67 | 67 | ||
68 | 68 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
69 | 69 | ||
70 | 70 | let oldAcresContractKey = "oldAcresContract" | |
71 | 71 | ||
72 | - | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
72 | + | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
73 | + | ||
74 | + | ||
75 | + | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
73 | 76 | ||
74 | 77 | ||
75 | 78 | let wlgAssetIdKey = "wlg_assetId" | |
76 | 79 | ||
77 | 80 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
78 | 81 | ||
79 | 82 | let acresAssetIdKey = "acresAssetId" | |
80 | 83 | ||
81 | 84 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
82 | 85 | ||
83 | 86 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
84 | 87 | ||
85 | 88 | ||
86 | 89 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
87 | 90 | ||
88 | 91 | ||
89 | 92 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
90 | 93 | ||
91 | 94 | ||
92 | 95 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
93 | 96 | ||
94 | 97 | ||
95 | 98 | func asTuple4Ints (val) = match val { | |
96 | 99 | case t: (Int, Int, Int, Int) => | |
97 | 100 | t | |
98 | 101 | case _ => | |
99 | 102 | throw("fail to cast into (Int, Int, Int, Int)") | |
100 | 103 | } | |
101 | 104 | ||
102 | 105 | ||
103 | 106 | func asTuple3Ints (val) = match val { | |
104 | 107 | case t: (Int, Int, Int) => | |
105 | 108 | t | |
106 | 109 | case _ => | |
107 | 110 | throw("fail to cast into (Int, Int, Int)") | |
108 | 111 | } | |
109 | 112 | ||
110 | 113 | ||
111 | 114 | func asTuple2Ints (val) = match val { | |
112 | 115 | case t: (Int, Int) => | |
113 | 116 | t | |
114 | 117 | case _ => | |
115 | 118 | throw("fail to cast into (Int, Int)") | |
116 | 119 | } | |
117 | 120 | ||
118 | 121 | ||
119 | 122 | let M6_ = 1000000 | |
120 | 123 | ||
121 | 124 | let M8_ = 100000000 | |
122 | 125 | ||
123 | 126 | let TEAM_SHARE = 200000 | |
124 | 127 | ||
125 | 128 | let ACTIVITY_SHARE = 100000 | |
126 | 129 | ||
127 | 130 | let PLAYER_SHARE = 400000 | |
128 | 131 | ||
129 | 132 | let YEAR_MILLIS = 31557600000 | |
130 | 133 | ||
131 | 134 | let DAY_MS = 86400000 | |
132 | 135 | ||
133 | 136 | let DAY_BLOCKS = 1440 | |
137 | + | ||
138 | + | let WEEK_BLOCKS = 10080 | |
134 | 139 | ||
135 | 140 | let ISSUE10 = 1000000000 | |
136 | 141 | ||
137 | 142 | let PLAYERS10_SHARE = 800000 | |
138 | 143 | ||
139 | 144 | let MARKETING10_SHARE = 100000 | |
140 | 145 | ||
141 | 146 | let TEAM10_SHARE = 100000 | |
142 | 147 | ||
143 | 148 | let NEW_STAKING_START = 1731279600000 | |
144 | 149 | ||
145 | 150 | let teamAdrKey = "teamAddr" | |
146 | 151 | ||
147 | 152 | let lastTeamTimKey = "lastClaimedTime_team" | |
148 | 153 | ||
149 | 154 | let teamAmtLeftKey = "teamAmountLeft" | |
150 | 155 | ||
151 | 156 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
152 | 157 | ||
153 | 158 | let actAmtLeftKey = "activitiesAmountLeft" | |
154 | 159 | ||
155 | 160 | let stakersAmtLeftKey = "stakersAmountLeft" | |
156 | 161 | ||
157 | 162 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
158 | 163 | ||
159 | 164 | ||
160 | 165 | func distrByPeriod (issuedAmount,period) = fraction(issuedAmount, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
161 | 166 | ||
162 | 167 | ||
163 | 168 | let wlgIssue10TimeKey = "wlg_issue10Time" | |
164 | 169 | ||
165 | 170 | let wlgIssueTimKey = "wlg_issueTime" | |
166 | 171 | ||
167 | 172 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
168 | 173 | ||
169 | 174 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
170 | 175 | ||
171 | 176 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
172 | 177 | ||
173 | 178 | ||
174 | 179 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
175 | 180 | ||
176 | 181 | let totalFarmingPowerKey = "totalFarmingPower" | |
177 | 182 | ||
178 | 183 | let dapp2Rest = 0 | |
179 | 184 | ||
180 | 185 | let dapp2Staking = 1 | |
181 | 186 | ||
182 | 187 | let dapp2Wlg = 2 | |
183 | 188 | ||
184 | 189 | let dapp2Puzzle = 3 | |
185 | 190 | ||
186 | 191 | let dapp2InvestFund = 4 | |
187 | 192 | ||
188 | 193 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
189 | 194 | ||
190 | 195 | func getLevelByAcres (acres) = { | |
191 | 196 | let acr = ((acres + 99999999) / M8_) | |
192 | 197 | func checker (acc,item) = if ((item >= acr)) | |
193 | 198 | then acc | |
194 | 199 | else (acc + 1) | |
195 | 200 | ||
196 | 201 | let $l = levelAcres | |
197 | 202 | let $s = size($l) | |
198 | 203 | let $acc0 = 0 | |
199 | 204 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
200 | 205 | then $a | |
201 | 206 | else checker($a, $l[$i]) | |
202 | 207 | ||
203 | 208 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
204 | 209 | then $a | |
205 | 210 | else throw("List size exceeds 10") | |
206 | 211 | ||
207 | 212 | $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) | |
208 | 213 | } | |
209 | 214 | ||
210 | 215 | ||
211 | 216 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
212 | 217 | ||
213 | 218 | ||
214 | 219 | func getFarmingPowers (userAddrStrOrEmpty,acres2Contract) = { | |
215 | 220 | let totalFP = valueOrElse(getInteger(acres2Contract, totalFarmingPowerKey), 0) | |
216 | 221 | let userAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
217 | 222 | let userFP = getFarmingPowerByAcres(userAcres) | |
218 | 223 | [totalFP, userFP] | |
219 | 224 | } | |
220 | 225 | ||
221 | 226 | ||
222 | 227 | func keyUserBet (addr) = ("userBet_" + addr) | |
223 | 228 | ||
224 | 229 | ||
225 | - | func | |
230 | + | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
226 | 231 | ||
227 | 232 | ||
228 | - | let keyTotalTickets = "totalTickets" | |
233 | + | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
234 | + | ||
229 | 235 | ||
230 | 236 | func winningBet (day) = (toInt(value(value(blockInfoByHeight((day * DAY_BLOCKS))).vrf)) % 4) | |
231 | 237 | ||
232 | 238 | ||
233 | 239 | let idxTotalFP = 0 | |
234 | 240 | ||
235 | 241 | let idxUserFP = 1 | |
236 | 242 | ||
237 | 243 | let ixWlgAmount = 0 | |
238 | 244 | ||
239 | 245 | let ixWlgWlg = 1 | |
240 | 246 | ||
241 | 247 | let ixWlgPrice = 2 | |
242 | 248 | ||
243 | 249 | let ixWlgFunds = 3 | |
244 | 250 | ||
245 | 251 | let ixWlgActivity = 4 | |
246 | 252 | ||
247 | 253 | let ixWlgAcres2 = 5 | |
248 | 254 | ||
249 | 255 | let ixWlgArbitrage = 6 | |
250 | 256 | ||
251 | 257 | let ixWlgPool = 7 | |
252 | 258 | ||
253 | 259 | let ixWlgIssueTime = 8 | |
254 | 260 | ||
255 | 261 | let ixWlgLastTeamActTime = 9 | |
256 | 262 | ||
257 | 263 | let ixWlgTeamTotal = 10 | |
258 | 264 | ||
259 | 265 | let ixWlgTeamAmLeft = 11 | |
260 | 266 | ||
261 | 267 | let ixWlgTeamAmAvailNow = 12 | |
262 | 268 | ||
263 | 269 | let ixWlgTeamWlgold = 13 | |
264 | 270 | ||
265 | 271 | let ixWlgActTotal = 14 | |
266 | 272 | ||
267 | 273 | let ixWlgActAmLeft = 15 | |
268 | 274 | ||
269 | 275 | let ixWlgActAmAvailNow = 16 | |
270 | 276 | ||
271 | 277 | let ixWlgActWlgold = 17 | |
272 | 278 | ||
273 | 279 | let ixWlgCurPeriod = 18 | |
274 | 280 | ||
275 | 281 | let ixWlgAmLeftTotal = 19 | |
276 | 282 | ||
277 | 283 | let ixWlgCurPeriodDistribution = 20 | |
278 | 284 | ||
279 | 285 | let ixWlgLastUserTime = 21 | |
280 | 286 | ||
281 | 287 | let ixWlgInvestFundAmount = 22 | |
282 | 288 | ||
283 | 289 | let ixWlgUserAmAvailNow = 23 | |
284 | 290 | ||
285 | 291 | let ixWlgEffUserTime = 24 | |
286 | 292 | ||
287 | 293 | let ixWlgIssue10Amount = 25 | |
288 | 294 | ||
289 | 295 | let ixWlgMarketingIssue10Amount = 26 | |
290 | 296 | ||
291 | 297 | let ixWlgTeamIssue10Amount = 27 | |
292 | 298 | ||
293 | 299 | let ixWlgUser10part = 28 | |
294 | 300 | ||
295 | 301 | let ixWlgIssue10Time = 29 | |
296 | 302 | ||
297 | 303 | let ixWlgTotalFarmingPower = 30 | |
298 | 304 | ||
299 | 305 | let ixWlgAcresStakedTotal = 31 | |
300 | 306 | ||
301 | 307 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
302 | 308 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
303 | 309 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
304 | 310 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
305 | 311 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
306 | 312 | let acres2Usd = assetBalance(contracts[dapp2Staking], usdtId) | |
307 | 313 | let investFndContract = contracts[dapp2InvestFund] | |
308 | 314 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
309 | 315 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
310 | 316 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
311 | 317 | let now = lastBlock.timestamp | |
312 | 318 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
313 | 319 | let wlgWlg = assetBalance(contracts[dapp2Wlg], wlgId) | |
314 | 320 | let teamTotal = fraction(issuedAmount, TEAM_SHARE, M6_) | |
315 | 321 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
316 | 322 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
317 | 323 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
318 | 324 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
319 | 325 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
320 | 326 | let actTotal = fraction(issuedAmount, ACTIVITY_SHARE, M6_) | |
321 | 327 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
322 | 328 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
323 | 329 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
324 | 330 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
325 | 331 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
326 | 332 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
327 | 333 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
328 | 334 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
329 | 335 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
330 | 336 | let curPeriodDistribution = distrByPeriod(issuedAmount, curPeriod) | |
331 | 337 | let prevPeriodEnd = (issueTime + (YEAR_MILLIS * curPeriod)) | |
332 | 338 | let prevPrevPeriodEnd = (issueTime + (YEAR_MILLIS * (curPeriod - 1))) | |
333 | 339 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
334 | 340 | let userAvailable = if ((lastUserPeriod == curPeriod)) | |
335 | 341 | then a0 | |
336 | 342 | else if ((lastUserPeriod == (curPeriod - 1))) | |
337 | 343 | then { | |
338 | 344 | let a1 = fraction(distrByPeriod(issuedAmount, (curPeriod - 1)), (prevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
339 | 345 | (a1 + a0) | |
340 | 346 | } | |
341 | 347 | else { | |
342 | 348 | let a2 = fraction(distrByPeriod(issuedAmount, (curPeriod - 2)), (prevPrevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
343 | 349 | let a1 = distrByPeriod(issuedAmount, (curPeriod - 1)) | |
344 | 350 | ((a2 + a1) + a0) | |
345 | 351 | } | |
346 | 352 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
347 | 353 | let userAmount = if ((eff[idxTotalFP] != 0)) | |
348 | 354 | then fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
349 | 355 | else 0 | |
350 | 356 | let lastIssue10Time = valueOrElse(getInteger(contracts[dapp2Wlg], wlgIssue10TimeKey), NEW_STAKING_START) | |
351 | 357 | let issue10Amount = fraction(ISSUE10, max([(now - lastIssue10Time), 0]), DAY_MS) | |
352 | 358 | let marketingIssue10Amount = fraction(issue10Amount, MARKETING10_SHARE, M6_) | |
353 | 359 | let teamIssue10Amount = fraction(issue10Amount, TEAM10_SHARE, M6_) | |
354 | 360 | let user10Interval = max([(now - max([NEW_STAKING_START, lastUserTime])), 0]) | |
355 | 361 | let user10part = if ((eff[idxTotalFP] != 0)) | |
356 | 362 | then fraction(fraction(fraction(ISSUE10, user10Interval, DAY_MS), eff[idxUserFP], eff[idxTotalFP]), PLAYERS10_SHARE, M6_) | |
357 | 363 | else 0 | |
358 | 364 | let newIssue10Time = max([NEW_STAKING_START, now]) | |
359 | 365 | let acresStakedTotal = valueOrElse(getInteger(contracts[dapp2Staking], acresStakdTotalKey), 0) | |
360 | 366 | [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] | |
361 | 367 | } | |
362 | 368 | ||
363 | 369 | ||
364 | 370 | func walletInternal (userAddressOpt) = { | |
365 | 371 | let addr = addressFromString(userAddressOpt) | |
366 | 372 | let balance = if (isDefined(addr)) | |
367 | 373 | then wavesBalance(value(addr)) | |
368 | 374 | else BalanceDetails(0, 0, 0, 0) | |
369 | 375 | let usdtBalance = if (isDefined(addr)) | |
370 | 376 | then assetBalance(value(addr), usdtAssetId) | |
371 | 377 | else 0 | |
372 | 378 | let wlgoldBalance = if (isDefined(addr)) | |
373 | 379 | then assetBalance(value(addr), wlgAssetId) | |
374 | 380 | else 0 | |
375 | 381 | let customName = valueOrElse(getString(acres2Contract, keyAddressToCustomName(userAddressOpt)), userAddressOpt) | |
376 | 382 | let refByKey = keyAddressRefBy(userAddressOpt) | |
377 | 383 | let refBy = getString(acres2Contract, refByKey) | |
378 | 384 | let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "") | |
379 | - | let lastTxId = valueOrElse(getString(acres2Contract, keyLastTxIdByUser(userAddressOpt)), "") | |
385 | + | let lastTxId = valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(userAddressOpt)), "") | |
386 | + | let curTxId = valueOrElse(getString(acres2Contract, keyCurWeekTxIdByUser(userAddressOpt)), "") | |
380 | 387 | let acresBalance = if (isDefined(addr)) | |
381 | 388 | then assetBalance(value(addr), acresAssetId) | |
382 | 389 | else 0 | |
383 | 390 | let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddressOpt)), 0) | |
384 | 391 | let lvl = getLevelByAcres(stakedAcres) | |
385 | 392 | let fp = getFarmingPowers(userAddressOpt, acres2Contract) | |
386 | 393 | let acresToNextLvl = if ((lvl >= size(levelAcres))) | |
387 | 394 | then 0 | |
388 | 395 | else (((levelAcres[lvl] * M8_) + 1) - stakedAcres) | |
389 | - | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__usdtBalance__" + toString(usdtBalance)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl)), ("%s%d__acresToNextLvl__" + toString(acresToNextLvl)), ("%s%d__userFarmingPower__" + toString(fp[idxUserFP])), ("%s%d__totalFarmingPower__" + toString(fp[idxTotalFP]))] | |
396 | + | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastWeekTxId__" + lastTxId), ("%s%s__curWeekTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__usdtBalance__" + toString(usdtBalance)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl)), ("%s%d__acresToNextLvl__" + toString(acresToNextLvl)), ("%s%d__userFarmingPower__" + toString(fp[idxUserFP])), ("%s%d__totalFarmingPower__" + toString(fp[idxTotalFP]))] | |
390 | 397 | } | |
391 | 398 | ||
392 | 399 | ||
393 | 400 | @Callable(i) | |
394 | 401 | func constructorV1 (contracts) = if ((i.caller != this)) | |
395 | 402 | then throw("permissions denied") | |
396 | 403 | else { | |
397 | 404 | func descriptor (acc,ignoredItem) = (acc + "%s") | |
398 | 405 | ||
399 | 406 | let descr = { | |
400 | 407 | let $l = contracts | |
401 | 408 | let $s = size($l) | |
402 | 409 | let $acc0 = "" | |
403 | 410 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
404 | 411 | then $a | |
405 | 412 | else descriptor($a, $l[$i]) | |
406 | 413 | ||
407 | 414 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
408 | 415 | then $a | |
409 | 416 | else throw("List size exceeds 10") | |
410 | 417 | ||
411 | 418 | $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) | |
412 | 419 | } | |
413 | 420 | [StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRest2Address(), toString(this))] | |
414 | 421 | } | |
415 | 422 | ||
416 | 423 | ||
417 | 424 | ||
418 | 425 | @Callable(i) | |
419 | 426 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
420 | 427 | ||
421 | 428 | ||
422 | 429 | ||
423 | 430 | @Callable(i) | |
424 | 431 | func conversionInfoREADONLY (userAddressOpt) = { | |
425 | 432 | let oldAcresAddress = addressFromStringValue(getStringValue(acres2Contract, oldAcresContractKey)) | |
426 | - | let $ | |
427 | - | let unstakedAcres = $ | |
428 | - | let claimedAcres = $ | |
429 | - | let $ | |
430 | - | let acresFromPieces = $ | |
431 | - | let acresFromRes = $ | |
432 | - | let acresFromMat = $ | |
433 | - | let acresFromProd = $ | |
433 | + | let $t046894811 = asTuple2Ints(invoke(oldAcresAddress, "unstakeAllAcresREADONLY", [userAddressOpt], nil)) | |
434 | + | let unstakedAcres = $t046894811._1 | |
435 | + | let claimedAcres = $t046894811._2 | |
436 | + | let $t048144963 = asTuple4Ints(invoke(acres2Contract, "unstakeLandsREADONLY", [userAddressOpt], nil)) | |
437 | + | let acresFromPieces = $t048144963._1 | |
438 | + | let acresFromRes = $t048144963._2 | |
439 | + | let acresFromMat = $t048144963._3 | |
440 | + | let acresFromProd = $t048144963._4 | |
434 | 441 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
435 | 442 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(userAddressOpt)), "") | |
436 | - | let $ | |
443 | + | let $t051415363 = if ((duckAssetId != "")) | |
437 | 444 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckREADONLY", [duckAssetId, userAddressOpt], nil)) | |
438 | 445 | else $Tuple3(0, 0, 0) | |
439 | - | let acresFromDuckRes = $ | |
440 | - | let acresFromDuckMat = $ | |
441 | - | let acresFromDuckProd = $ | |
446 | + | let acresFromDuckRes = $t051415363._1 | |
447 | + | let acresFromDuckMat = $t051415363._2 | |
448 | + | let acresFromDuckProd = $t051415363._3 | |
442 | 449 | $Tuple2(nil, [("%s%d__unstakedAcres__" + toString(unstakedAcres)), ("%s%d__claimedAcres__" + toString(claimedAcres)), ("%s%d__acresFromPieces__" + toString(acresFromPieces)), ("%s%d__acresFromRes__" + toString(acresFromRes)), ("%s%d__acresFromMat__" + toString(acresFromMat)), ("%s%d__acresFromProd__" + toString(acresFromProd)), ("%s%d__acresFromDuckRes__" + toString(acresFromDuckRes)), ("%s%d__acresFromDuckMat__" + toString(acresFromDuckMat)), ("%s%d__acresFromDuckProd__" + toString(acresFromDuckProd))]) | |
443 | 450 | } | |
444 | 451 | ||
445 | 452 | ||
446 | 453 | ||
447 | 454 | @Callable(i) | |
448 | 455 | func wlgStatsREADONLY (userAddrOpt) = { | |
449 | 456 | let curStats = getWlgStats2(userAddrOpt, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
450 | 457 | $Tuple2(nil, [("%s%d__wlgAmount__" + toString(curStats[ixWlgAmount])), ("%s%d__wlgWlg__" + toString(curStats[ixWlgWlg])), ("%s%d__wlgPrice__" + toString(curStats[ixWlgPrice])), ("%s%d__usdtFunds__" + toString(curStats[ixWlgFunds])), ("%s%d__usdtActivity__" + toString(curStats[ixWlgActivity])), ("%s%d__usdtStaking__" + toString(curStats[ixWlgAcres2])), ("%s%d__usdtArbitrage__" + toString(curStats[ixWlgArbitrage])), ("%s%d__usdtPool__" + toString(curStats[ixWlgPool])), ("%s%d__wlgIssueTime__" + toString(curStats[ixWlgIssueTime])), ("%s%d__wlgLastTeamActTime__" + toString(curStats[ixWlgLastTeamActTime])), ("%s%d__wlgTeamTotal__" + toString(curStats[ixWlgTeamTotal])), ("%s%d__wlgTeamAmLeft__" + toString(curStats[ixWlgTeamAmLeft])), ("%s%d__wlgTeamAmAvailNow__" + toString(curStats[ixWlgTeamAmAvailNow])), ("%s%d__wlgTeamWlgold__" + toString(curStats[ixWlgTeamWlgold])), ("%s%d__wlgActTotal__" + toString(curStats[ixWlgActTotal])), ("%s%d__wlgActAmLeft__" + toString(curStats[ixWlgActAmLeft])), ("%s%d__wlgActAmAvailNow__" + toString(curStats[ixWlgActAmAvailNow])), ("%s%d__wlgActWlgold__" + toString(curStats[ixWlgActWlgold])), ("%s%d__wlgCurPeriod__" + toString(curStats[ixWlgCurPeriod])), ("%s%d__wlgAmLeftTotal__" + toString(curStats[ixWlgAmLeftTotal])), ("%s%d__wlgCurPeriodDistribution__" + toString(curStats[ixWlgCurPeriodDistribution])), ("%s%d__wlgLastUserTime__" + toString(curStats[ixWlgLastUserTime])), ("%s%d__wlgInvestFundTotal__" + toString(curStats[ixWlgInvestFundAmount])), ("%s%d__wlgUserAmAvailNow__" + toString(curStats[ixWlgUserAmAvailNow])), ("%s%d__wlgEffUserTime__" + toString(curStats[ixWlgEffUserTime])), ("%s%d__wlgIssue10AvailNow__" + toString(curStats[ixWlgIssue10Amount])), ("%s%d__wlgMarketingIssue10AvailNow__" + toString(curStats[ixWlgMarketingIssue10Amount])), ("%s%d__wlgTeamIssue10AvailNow__" + toString(curStats[ixWlgTeamIssue10Amount])), ("%s%d__wlgUserIssue10AvailNow__" + toString(curStats[ixWlgUser10part])), ("%s%d__wlgLastIssue10Time__" + toString(curStats[ixWlgIssue10Time])), ("%s%d__wlgTotalFarmingPower__" + toString(curStats[ixWlgTotalFarmingPower])), ("%s%d__wlgAcresStakedTotal__" + toString(curStats[ixWlgAcresStakedTotal]))]) | |
451 | 458 | } | |
452 | 459 | ||
453 | 460 | ||
454 | 461 | ||
455 | 462 | @Callable(i) | |
456 | 463 | func lotteryStatsREADONLY (userAddrOpt) = { | |
457 | 464 | let today = (height / DAY_BLOCKS) | |
465 | + | let week = (height / WEEK_BLOCKS) | |
466 | + | let lastWeek = (week - 1) | |
467 | + | let curWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, week)), 0) | |
468 | + | let lastWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, lastWeek)), 0) | |
469 | + | let curWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(week)), 0) | |
470 | + | let lastWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(lastWeek)), 0) | |
458 | 471 | let usersBet = valueOrElse(getString(wlgContract, keyUserBet(userAddrOpt)), "") | |
459 | - | $Tuple2(nil, [("%s%d__totalTickets__" + toString( | |
472 | + | $Tuple2(nil, [((("%s%d%d__totalTickets__" + toString(lastWeekTotalTickets)) + SEP) + toString(curWeekTotalTickets)), ((("%s%d%d__userTickets__" + toString(lastWeekTickets)) + SEP) + toString(curWeekTickets)), ("%s%d__blockchainDay__" + toString(today)), ("%s%d__blockchainMinute__" + toString((height % DAY_BLOCKS))), ("%s%d__winningBetToday__" + toString(winningBet(today))), ("%s%s__usersBet__" + usersBet)]) | |
460 | 473 | } | |
461 | 474 | ||
462 | 475 |
github/deemru/w8io/026f985 57.53 ms ◑