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