tx · DFGgByrUGKfhXoGKggvZCC1NjhiFkCW6K6ixAS3Cy7Vz 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01800000 Waves 2023.09.21 20:55 [2765466] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "DFGgByrUGKfhXoGKggvZCC1NjhiFkCW6K6ixAS3Cy7Vz", "fee": 1800000, "feeAssetId": null, "timestamp": 1695318922265, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "37aVJbnFNYgGzsfyEfynnVcv9wENsH2qtiRhta6e4VqtRu3JFUbduWRaJYLso6goBWachLYQkAMHNyaMKiLe57K9" ], "script": "base64:BgIiCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgUKAwgIAV8AAk02AMCEPQACTTgAgMLXLwAITUlMTElPTjYAgIDpg7HeFgAOTUFSS0VUSU5HU0hBUkUAoI0GAAlURUFNU0hBUkUAwJoMAA1BQ1RJVklUWVNIQVJFAKCNBgALUExBWUVSU0hBUkUAgLUYAApZRUFSTUlMTElTAICG68d1AAlDSEVDS1RJTUUAgMngq7ABAANEQVkAgLiZKQAQbWFya2V0aW5nQWRkcktleQINbWFya2V0aW5nQWRkcgALdGVhbUFkZHJLZXkCCHRlYW1BZGRyABRsYXN0TWFya2V0aW5nVGltZUtleQIZbGFzdENsYWltZWRUaW1lX21hcmtldGluZwAWbWFya2V0aW5nQW1vdW50TGVmdEtleQITbWFya2V0aW5nQW1vdW50TGVmdAAPbGFzdFRlYW1UaW1lS2V5AhRsYXN0Q2xhaW1lZFRpbWVfdGVhbQARdGVhbUFtb3VudExlZnRLZXkCDnRlYW1BbW91bnRMZWZ0ABVsYXN0QWN0aXZpdGllc1RpbWVLZXkCGmxhc3RDbGFpbWVkVGltZV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zEFCndsZ0Fzc2V0SWQIBQFyAl8yAWkBCGNsYWltUm9iAwVvd25lcgZyb2JiZXIQb3duZXJQcm9wb3J0aW9uNgMJAQIhPQIIBQFpBmNhbGxlcgUPc3Rha2luZ0NvbnRyYWN0CQACAQIRUGVybWlzc2lvbiBkZW5pZWQEAXIJAQ1jbGFpbUludGVybmFsAgUFb3duZXIFEG93bmVyUHJvcG9ydGlvbjYJAJQKAgkAzQgCCAUBcgJfMQkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUGcm9iYmVyCQBlAggIBQFyAl8yAl8yCAgFAXICXzICXzEFCndsZ0Fzc2V0SWQIBQFyAl8yAH1Ry2A=", "height": 2765466, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9VQuDGFLUrBnd7APVrPU87TzweDG9s16mdxpEYBkoRwF Next: BMMddS311xDH9XWxdgzgbDBjA6YghZ4suizwnGtrXEVV Diff:
Old | New | Differences | |
---|---|---|---|
54 | 54 | ||
55 | 55 | let zbIssuedAmountKey = "zbill_issuedAmount" | |
56 | 56 | ||
57 | + | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
58 | + | ||
59 | + | ||
60 | + | let acresStakedTotalKey = "acresStakedAmountTotal" | |
61 | + | ||
57 | 62 | let idxWlgAmount = 0 | |
58 | 63 | ||
59 | 64 | let idxWlgPrice = 1 | |
94 | 99 | ||
95 | 100 | let dappInvestFund = 5 | |
96 | 101 | ||
97 | - | func getPieces (userAddrStrOrEmpty,stakingContract) = { | |
102 | + | let dappAcres = 6 | |
103 | + | ||
104 | + | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
98 | 105 | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
99 | 106 | func adder (acc,item) = (acc + parseIntValue(item)) | |
100 | 107 | ||
101 | - | let | |
108 | + | let totalPieces = { | |
102 | 109 | let $l = props | |
103 | 110 | let $s = size($l) | |
104 | 111 | let $acc0 = 0 | |
112 | 119 | ||
113 | 120 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
114 | 121 | } | |
115 | - | let usersPower = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
116 | - | [totalPower, usersPower] | |
122 | + | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
123 | + | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
124 | + | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
125 | + | [totalPieces, userPieces, totalAcres, userAcres] | |
117 | 126 | } | |
118 | 127 | ||
128 | + | ||
129 | + | let idxTotalPieces = 0 | |
130 | + | ||
131 | + | let idxUserPieces = 1 | |
132 | + | ||
133 | + | let idxTotalAcres = 2 | |
134 | + | ||
135 | + | let idxUserAcres = 3 | |
119 | 136 | ||
120 | 137 | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
121 | 138 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
150 | 167 | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
151 | 168 | let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))]) | |
152 | 169 | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
153 | - | let eff = | |
170 | + | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
154 | 171 | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
155 | 172 | let $t079142 = if ((lastUserPeriod == curPeriod)) | |
156 | 173 | then { | |
186 | 203 | let userAmount = $t079142._1 | |
187 | 204 | let userAvailable = $t079142._2 | |
188 | 205 | let effLastTime = $t079142._3 | |
189 | - | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[ | |
206 | + | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[idxTotalPieces]) | |
190 | 207 | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
191 | - | [issuedAmount, fraction(totalFundsUsd, M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, fraction(userAmount, eff[1], eff[0]), sLandDailyAmount, investFundTotal, fraction(userAvailable, eff[1], eff[0]), effLastTime] | |
208 | + | let robbedUser = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
209 | + | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
210 | + | [issuedAmount, fraction(totalFundsUsd, M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime] | |
192 | 211 | } | |
193 | 212 | ||
194 | 213 | ||
242 | 261 | ||
243 | 262 | let IdxCfgInvestFundDapp = 6 | |
244 | 263 | ||
264 | + | let IdxCfgAcresDapp = 8 | |
265 | + | ||
245 | 266 | func keyRestCfg () = "%s__restConfig" | |
246 | 267 | ||
247 | 268 | ||
268 | 289 | ||
269 | 290 | let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp) | |
270 | 291 | ||
292 | + | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
293 | + | ||
271 | 294 | let wlgAssetIdKey = "wlg_assetId" | |
272 | 295 | ||
273 | - | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), " | |
296 | + | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
274 | 297 | ||
275 | 298 | let IdxEffUser = 1 | |
276 | 299 | ||
336 | 359 | then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min")) | |
337 | 360 | else { | |
338 | 361 | let pieces = getVotingPower(addr)[IdxEffUser] | |
339 | - | (pieces * MULT8) | |
362 | + | let acresAmount = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(addr)), 0) | |
363 | + | ((pieces * MULT8) + acresAmount) | |
340 | 364 | } | |
341 | 365 | } | |
342 | 366 | ||
343 | 367 | ||
344 | 368 | func claimInternal (addr,proportion6) = { | |
345 | 369 | let caller = addressFromStringValue(addr) | |
346 | - | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6) | |
370 | + | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, proportion6) | |
347 | 371 | let now = lastBlock.timestamp | |
348 | 372 | let issueTime = curStats[idxWlgIssueTime] | |
349 | 373 | let marketingAmountLeft = curStats[idxWlgMarketingAmLeft] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let M6 = 1000000 | |
5 | 5 | ||
6 | 6 | let M8 = 100000000 | |
7 | 7 | ||
8 | 8 | let MILLION6 = 100000000000000 | |
9 | 9 | ||
10 | 10 | let MARKETINGSHARE = 100000 | |
11 | 11 | ||
12 | 12 | let TEAMSHARE = 200000 | |
13 | 13 | ||
14 | 14 | let ACTIVITYSHARE = 100000 | |
15 | 15 | ||
16 | 16 | let PLAYERSHARE = 400000 | |
17 | 17 | ||
18 | 18 | let YEARMILLIS = 31557600000 | |
19 | 19 | ||
20 | 20 | let CHECKTIME = 47336400000 | |
21 | 21 | ||
22 | 22 | let DAY = 86400000 | |
23 | 23 | ||
24 | 24 | let marketingAddrKey = "marketingAddr" | |
25 | 25 | ||
26 | 26 | let teamAddrKey = "teamAddr" | |
27 | 27 | ||
28 | 28 | let lastMarketingTimeKey = "lastClaimedTime_marketing" | |
29 | 29 | ||
30 | 30 | let marketingAmountLeftKey = "marketingAmountLeft" | |
31 | 31 | ||
32 | 32 | let lastTeamTimeKey = "lastClaimedTime_team" | |
33 | 33 | ||
34 | 34 | let teamAmountLeftKey = "teamAmountLeft" | |
35 | 35 | ||
36 | 36 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
37 | 37 | ||
38 | 38 | let actAmountLeftKey = "activitiesAmountLeft" | |
39 | 39 | ||
40 | 40 | let stakersAmountLeftKey = "stakersAmountLeft" | |
41 | 41 | ||
42 | 42 | func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | let wlgIssueTimeKey = "wlg_issueTime" | |
52 | 52 | ||
53 | 53 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
54 | 54 | ||
55 | 55 | let zbIssuedAmountKey = "zbill_issuedAmount" | |
56 | 56 | ||
57 | + | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
58 | + | ||
59 | + | ||
60 | + | let acresStakedTotalKey = "acresStakedAmountTotal" | |
61 | + | ||
57 | 62 | let idxWlgAmount = 0 | |
58 | 63 | ||
59 | 64 | let idxWlgPrice = 1 | |
60 | 65 | ||
61 | 66 | let idxWlgFunds = 2 | |
62 | 67 | ||
63 | 68 | let idxWlgIssueTime = 7 | |
64 | 69 | ||
65 | 70 | let idxWlgMarketingAmLeft = 10 | |
66 | 71 | ||
67 | 72 | let idxWlgMarketingAmAvailNow = 11 | |
68 | 73 | ||
69 | 74 | let idxWlgTeamAmLeft = 14 | |
70 | 75 | ||
71 | 76 | let idxWlgTeamAmAvailNow = 15 | |
72 | 77 | ||
73 | 78 | let idxWlgActAmLeft = 18 | |
74 | 79 | ||
75 | 80 | let idxWlgActAmAvailNow = 19 | |
76 | 81 | ||
77 | 82 | let idxWlgAmLeftTotal = 22 | |
78 | 83 | ||
79 | 84 | let idxWlgUserAmAvailNow = 25 | |
80 | 85 | ||
81 | 86 | let idxWlgUserTotalAvail = 28 | |
82 | 87 | ||
83 | 88 | let idxWlgEffUserTime = 29 | |
84 | 89 | ||
85 | 90 | let dappRest = 0 | |
86 | 91 | ||
87 | 92 | let dappStaking = 1 | |
88 | 93 | ||
89 | 94 | let dappEconomy = 2 | |
90 | 95 | ||
91 | 96 | let dappWlg = 3 | |
92 | 97 | ||
93 | 98 | let dappPuzzle = 4 | |
94 | 99 | ||
95 | 100 | let dappInvestFund = 5 | |
96 | 101 | ||
97 | - | func getPieces (userAddrStrOrEmpty,stakingContract) = { | |
102 | + | let dappAcres = 6 | |
103 | + | ||
104 | + | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
98 | 105 | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
99 | 106 | func adder (acc,item) = (acc + parseIntValue(item)) | |
100 | 107 | ||
101 | - | let | |
108 | + | let totalPieces = { | |
102 | 109 | let $l = props | |
103 | 110 | let $s = size($l) | |
104 | 111 | let $acc0 = 0 | |
105 | 112 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
106 | 113 | then $a | |
107 | 114 | else adder($a, $l[$i]) | |
108 | 115 | ||
109 | 116 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
110 | 117 | then $a | |
111 | 118 | else throw("List size exceeds 6") | |
112 | 119 | ||
113 | 120 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
114 | 121 | } | |
115 | - | let usersPower = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
116 | - | [totalPower, usersPower] | |
122 | + | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
123 | + | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
124 | + | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
125 | + | [totalPieces, userPieces, totalAcres, userAcres] | |
117 | 126 | } | |
118 | 127 | ||
128 | + | ||
129 | + | let idxTotalPieces = 0 | |
130 | + | ||
131 | + | let idxUserPieces = 1 | |
132 | + | ||
133 | + | let idxTotalAcres = 2 | |
134 | + | ||
135 | + | let idxUserAcres = 3 | |
119 | 136 | ||
120 | 137 | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
121 | 138 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
122 | 139 | let economyUsd = assetBalance(contracts[dappEconomy], usdtId) | |
123 | 140 | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
124 | 141 | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
125 | 142 | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
126 | 143 | let investFundContract = contracts[dappInvestFund] | |
127 | 144 | let investFundTotal = (assetBalance(investFundContract, usdtId) + valueOrElse(getInteger(investFundContract, zbIssuedAmountKey), 0)) | |
128 | 145 | let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal) | |
129 | 146 | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
130 | 147 | let now = lastBlock.timestamp | |
131 | 148 | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
132 | 149 | let marketingTotal = fraction(MILLION6, MARKETINGSHARE, M6) | |
133 | 150 | let marketingAmountLeft = valueOrElse(getInteger(contracts[dappWlg], marketingAmountLeftKey), marketingTotal) | |
134 | 151 | let lastMarketingTime = valueOrElse(getInteger(contracts[dappWlg], lastMarketingTimeKey), issueTime) | |
135 | 152 | let marketingAddr = addressFromStringValue(value(getString(contracts[dappWlg], marketingAddrKey))) | |
136 | 153 | let marketingAmountAvailableNow = min([fraction(marketingTotal, (now - lastMarketingTime), YEARMILLIS), marketingAmountLeft]) | |
137 | 154 | let marketingWlgold = assetBalance(marketingAddr, wlgId) | |
138 | 155 | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
139 | 156 | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
140 | 157 | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
141 | 158 | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
142 | 159 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
143 | 160 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
144 | 161 | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
145 | 162 | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
146 | 163 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
147 | 164 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
148 | 165 | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
149 | 166 | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime) | |
150 | 167 | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
151 | 168 | let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))]) | |
152 | 169 | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
153 | - | let eff = | |
170 | + | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
154 | 171 | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
155 | 172 | let $t079142 = if ((lastUserPeriod == curPeriod)) | |
156 | 173 | then { | |
157 | 174 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
158 | 175 | let userPart = fraction(a0, userProportion6, M6) | |
159 | 176 | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
160 | 177 | $Tuple3(userPart, a0, effTime) | |
161 | 178 | } | |
162 | 179 | else if ((lastUserPeriod == (curPeriod - 1))) | |
163 | 180 | then { | |
164 | 181 | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
165 | 182 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
166 | 183 | let avail = (a1 + a0) | |
167 | 184 | let userPart = fraction(avail, userProportion6, M6) | |
168 | 185 | let effTime = if ((a1 >= userPart)) | |
169 | 186 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
170 | 187 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
171 | 188 | $Tuple3(userPart, avail, effTime) | |
172 | 189 | } | |
173 | 190 | else { | |
174 | 191 | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
175 | 192 | let a1 = distributionByPeriod((curPeriod - 1)) | |
176 | 193 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
177 | 194 | let avail = ((a2 + a1) + a0) | |
178 | 195 | let userPart = fraction(avail, userProportion6, M6) | |
179 | 196 | let effTime = if ((a2 >= userPart)) | |
180 | 197 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
181 | 198 | else if (((a2 + a1) >= userPart)) | |
182 | 199 | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
183 | 200 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
184 | 201 | $Tuple3(userPart, avail, effTime) | |
185 | 202 | } | |
186 | 203 | let userAmount = $t079142._1 | |
187 | 204 | let userAvailable = $t079142._2 | |
188 | 205 | let effLastTime = $t079142._3 | |
189 | - | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[ | |
206 | + | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[idxTotalPieces]) | |
190 | 207 | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
191 | - | [issuedAmount, fraction(totalFundsUsd, M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, fraction(userAmount, eff[1], eff[0]), sLandDailyAmount, investFundTotal, fraction(userAvailable, eff[1], eff[0]), effLastTime] | |
208 | + | let robbedUser = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
209 | + | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
210 | + | [issuedAmount, fraction(totalFundsUsd, M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime] | |
192 | 211 | } | |
193 | 212 | ||
194 | 213 | ||
195 | 214 | let chain = take(drop(this.bytes, 1), 1) | |
196 | 215 | ||
197 | 216 | let usdtAssetId = match chain { | |
198 | 217 | case _ => | |
199 | 218 | if ((base58'2W' == $match0)) | |
200 | 219 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
201 | 220 | else if ((base58'2T' == $match0)) | |
202 | 221 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
203 | 222 | else throw("Unknown chain") | |
204 | 223 | } | |
205 | 224 | ||
206 | 225 | let defaultRestAddressStr = match chain { | |
207 | 226 | case _ => | |
208 | 227 | if ((base58'2W' == $match0)) | |
209 | 228 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
210 | 229 | else if ((base58'2T' == $match0)) | |
211 | 230 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
212 | 231 | else throw("Unknown chain") | |
213 | 232 | } | |
214 | 233 | ||
215 | 234 | let arbitrageDelay = match chain { | |
216 | 235 | case _ => | |
217 | 236 | if ((base58'2W' == $match0)) | |
218 | 237 | then 86400000 | |
219 | 238 | else if ((base58'2T' == $match0)) | |
220 | 239 | then 60000 | |
221 | 240 | else throw("Unknown chain") | |
222 | 241 | } | |
223 | 242 | ||
224 | 243 | let SEP = "__" | |
225 | 244 | ||
226 | 245 | let MULT6 = 1000000 | |
227 | 246 | ||
228 | 247 | let MULT8 = 100000000 | |
229 | 248 | ||
230 | 249 | let MINSHOPPAYMENT = 100000 | |
231 | 250 | ||
232 | 251 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
233 | 252 | ||
234 | 253 | ||
235 | 254 | let IdxCfgStakingDapp = 1 | |
236 | 255 | ||
237 | 256 | let IdxCfgEconomyDapp = 2 | |
238 | 257 | ||
239 | 258 | let IdxCfgWlgDapp = 4 | |
240 | 259 | ||
241 | 260 | let IdxCfgPuzzlePoolDapp = 5 | |
242 | 261 | ||
243 | 262 | let IdxCfgInvestFundDapp = 6 | |
244 | 263 | ||
264 | + | let IdxCfgAcresDapp = 8 | |
265 | + | ||
245 | 266 | func keyRestCfg () = "%s__restConfig" | |
246 | 267 | ||
247 | 268 | ||
248 | 269 | func keyRestAddress () = "%s__restAddr" | |
249 | 270 | ||
250 | 271 | ||
251 | 272 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
252 | 273 | ||
253 | 274 | ||
254 | 275 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
255 | 276 | ||
256 | 277 | ||
257 | 278 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
258 | 279 | ||
259 | 280 | let restCfg = readRestCfgOrFail(restContract) | |
260 | 281 | ||
261 | 282 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
262 | 283 | ||
263 | 284 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
264 | 285 | ||
265 | 286 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
266 | 287 | ||
267 | 288 | let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp) | |
268 | 289 | ||
269 | 290 | let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp) | |
270 | 291 | ||
292 | + | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
293 | + | ||
271 | 294 | let wlgAssetIdKey = "wlg_assetId" | |
272 | 295 | ||
273 | - | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), " | |
296 | + | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
274 | 297 | ||
275 | 298 | let IdxEffUser = 1 | |
276 | 299 | ||
277 | 300 | func keyResProportions () = "resTypesProportions" | |
278 | 301 | ||
279 | 302 | ||
280 | 303 | func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr) | |
281 | 304 | ||
282 | 305 | ||
283 | 306 | func asInt (v) = match v { | |
284 | 307 | case n: Int => | |
285 | 308 | n | |
286 | 309 | case _ => | |
287 | 310 | throw("fail to cast into Int") | |
288 | 311 | } | |
289 | 312 | ||
290 | 313 | ||
291 | 314 | func getVotingPower (userAddrStrOrEmpty) = { | |
292 | 315 | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
293 | 316 | func adder (acc,item) = (acc + parseIntValue(item)) | |
294 | 317 | ||
295 | 318 | let totalPower = { | |
296 | 319 | let $l = props | |
297 | 320 | let $s = size($l) | |
298 | 321 | let $acc0 = 0 | |
299 | 322 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
300 | 323 | then $a | |
301 | 324 | else adder($a, $l[$i]) | |
302 | 325 | ||
303 | 326 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
304 | 327 | then $a | |
305 | 328 | else throw("List size exceeds 6") | |
306 | 329 | ||
307 | 330 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
308 | 331 | } | |
309 | 332 | let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0) | |
310 | 333 | [totalPower, usersPower] | |
311 | 334 | } | |
312 | 335 | ||
313 | 336 | ||
314 | 337 | func fixedPoint (val,decimals) = { | |
315 | 338 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
316 | 339 | let lowPart = toString((val % tenPow)) | |
317 | 340 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
318 | 341 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
319 | 342 | } | |
320 | 343 | ||
321 | 344 | ||
322 | 345 | let profitAddrKey = "profitAddr" | |
323 | 346 | ||
324 | 347 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
325 | 348 | ||
326 | 349 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
327 | 350 | ||
328 | 351 | ||
329 | 352 | func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil)) | |
330 | 353 | ||
331 | 354 | ||
332 | 355 | func getSwapLimitWlg (addr) = { | |
333 | 356 | let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0) | |
334 | 357 | let now = lastBlock.timestamp | |
335 | 358 | if ((arbitrageDelay > (now - lastTime))) | |
336 | 359 | then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min")) | |
337 | 360 | else { | |
338 | 361 | let pieces = getVotingPower(addr)[IdxEffUser] | |
339 | - | (pieces * MULT8) | |
362 | + | let acresAmount = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(addr)), 0) | |
363 | + | ((pieces * MULT8) + acresAmount) | |
340 | 364 | } | |
341 | 365 | } | |
342 | 366 | ||
343 | 367 | ||
344 | 368 | func claimInternal (addr,proportion6) = { | |
345 | 369 | let caller = addressFromStringValue(addr) | |
346 | - | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6) | |
370 | + | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, proportion6) | |
347 | 371 | let now = lastBlock.timestamp | |
348 | 372 | let issueTime = curStats[idxWlgIssueTime] | |
349 | 373 | let marketingAmountLeft = curStats[idxWlgMarketingAmLeft] | |
350 | 374 | let marketingAmount = curStats[idxWlgMarketingAmAvailNow] | |
351 | 375 | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
352 | 376 | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
353 | 377 | let actAmountLeft = curStats[idxWlgActAmLeft] | |
354 | 378 | let actAmount = curStats[idxWlgActAmAvailNow] | |
355 | 379 | if (((now - issueTime) > CHECKTIME)) | |
356 | 380 | then throw("Please modify contract for next 1.5 years, according to stats") | |
357 | 381 | else { | |
358 | 382 | let userAmount = curStats[idxWlgUserAmAvailNow] | |
359 | 383 | let userKey = keyStakersAmountPaidUser(addr) | |
360 | 384 | let userTotal = curStats[idxWlgUserTotalAvail] | |
361 | 385 | let userEffTime = curStats[idxWlgEffUserTime] | |
362 | 386 | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), 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(marketingAmountLeftKey, (marketingAmountLeft - marketingAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], $Tuple2(userAmount, userTotal)) | |
363 | 387 | } | |
364 | 388 | } | |
365 | 389 | ||
366 | 390 | ||
367 | 391 | @Callable(i) | |
368 | 392 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
369 | 393 | then throw("Permission denied") | |
370 | 394 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
371 | 395 | then throw("Already initialized") | |
372 | 396 | else { | |
373 | 397 | let issuedAmount = MILLION6 | |
374 | 398 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
375 | 399 | let assetId = calculateAssetId(issue) | |
376 | 400 | [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)] | |
377 | 401 | } | |
378 | 402 | ||
379 | 403 | ||
380 | 404 | ||
381 | 405 | @Callable(i) | |
382 | 406 | func buyWlg (minAmount) = { | |
383 | 407 | let prologResult = prolog() | |
384 | 408 | if ((size(i.payments) != 1)) | |
385 | 409 | then throw("exactly 1 payment must be attached") | |
386 | 410 | else { | |
387 | 411 | let pmt = i.payments[0] | |
388 | 412 | let usdtAmt = pmt.amount | |
389 | 413 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "USDT payments only!") | |
390 | 414 | if ((pmtAssetId != usdtAssetId)) | |
391 | 415 | then throw("USDT payments only!") | |
392 | 416 | else { | |
393 | 417 | let caller = i.caller | |
394 | 418 | let addr = toString(caller) | |
395 | 419 | if ((MINSHOPPAYMENT > usdtAmt)) | |
396 | 420 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
397 | 421 | else { | |
398 | 422 | let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6) | |
399 | 423 | let curWlgAmount = curStats[idxWlgAmount] | |
400 | 424 | let fundsUsd = curStats[idxWlgFunds] | |
401 | 425 | let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount) | |
402 | 426 | let buyPrice = fraction(wlgPrice, 6, 5) | |
403 | 427 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
404 | 428 | let maxWlg = getSwapLimitWlg(addr) | |
405 | 429 | if ((wlgAmount > maxWlg)) | |
406 | 430 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
407 | 431 | else if ((minAmount > wlgAmount)) | |
408 | 432 | then throw("Price changed during operation, please try again") | |
409 | 433 | else { | |
410 | 434 | let profitAmount = (usdtAmt / 6) | |
411 | 435 | let deltaFunds = (usdtAmt - profitAmount) | |
412 | 436 | let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd) | |
413 | 437 | $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult) | |
414 | 438 | } | |
415 | 439 | } | |
416 | 440 | } | |
417 | 441 | } | |
418 | 442 | } | |
419 | 443 | ||
420 | 444 | ||
421 | 445 | ||
422 | 446 | @Callable(i) | |
423 | 447 | func sellWlg (minAmount) = { | |
424 | 448 | let prologResult = prolog() | |
425 | 449 | if ((size(i.payments) != 1)) | |
426 | 450 | then throw("exactly 1 payment must be attached") | |
427 | 451 | else { | |
428 | 452 | let pmt = i.payments[0] | |
429 | 453 | let wlgAmt = pmt.amount | |
430 | 454 | let caller = i.caller | |
431 | 455 | let addr = toString(caller) | |
432 | 456 | let maxWlg = getSwapLimitWlg(addr) | |
433 | 457 | if ((wlgAmt > maxWlg)) | |
434 | 458 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
435 | 459 | else { | |
436 | 460 | let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!") | |
437 | 461 | if ((pmtAssetId != wlgAssetId)) | |
438 | 462 | then throw("WLGOLD payments only!") | |
439 | 463 | else { | |
440 | 464 | let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6) | |
441 | 465 | let curWlgAmount = curStats[idxWlgAmount] | |
442 | 466 | let sellPrice = fraction(curStats[idxWlgPrice], 4, 5) | |
443 | 467 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
444 | 468 | if ((MINSHOPPAYMENT > usdtAmt)) | |
445 | 469 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
446 | 470 | else if ((minAmount > usdtAmt)) | |
447 | 471 | then throw("Price changed during operation, please try again") | |
448 | 472 | else { | |
449 | 473 | let profitAmount = (usdtAmt / 4) | |
450 | 474 | let burned = fraction((usdtAmt + profitAmount), curWlgAmount, curStats[idxWlgFunds]) | |
451 | 475 | $Tuple2([Burn(wlgAssetId, burned), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - burned)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult) | |
452 | 476 | } | |
453 | 477 | } | |
454 | 478 | } | |
455 | 479 | } | |
456 | 480 | } | |
457 | 481 | ||
458 | 482 | ||
459 | 483 | ||
460 | 484 | @Callable(i) | |
461 | 485 | func claim () = { | |
462 | 486 | let prologResult = prolog() | |
463 | 487 | if ((size(i.payments) != 0)) | |
464 | 488 | then throw("No payments required") | |
465 | 489 | else { | |
466 | 490 | let r = claimInternal(toString(i.caller), MULT6) | |
467 | 491 | let actions = r._1 | |
468 | 492 | $Tuple2((actions :+ ScriptTransfer(i.caller, r._2._1, wlgAssetId)), prologResult) | |
469 | 493 | } | |
470 | 494 | } | |
471 | 495 | ||
472 | 496 | ||
473 | 497 | ||
474 | 498 | @Callable(i) | |
475 | 499 | func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract)) | |
476 | 500 | then throw("Permission denied") | |
477 | 501 | else { | |
478 | 502 | let r = claimInternal(addr, MULT6) | |
479 | 503 | let actions = r._1 | |
480 | 504 | $Tuple2((actions :+ ScriptTransfer(addressFromStringValue(addr), r._2._1, wlgAssetId)), r._2) | |
481 | 505 | } | |
482 | 506 | ||
483 | 507 | ||
484 | 508 | ||
485 | 509 | @Callable(i) | |
486 | 510 | func claimRob (owner,robber,ownerProportion6) = if ((i.caller != stakingContract)) | |
487 | 511 | then throw("Permission denied") | |
488 | 512 | else { | |
489 | 513 | let r = claimInternal(owner, ownerProportion6) | |
490 | 514 | $Tuple2((r._1 :+ ScriptTransfer(addressFromStringValue(robber), (r._2._2 - r._2._1), wlgAssetId)), r._2) | |
491 | 515 | } | |
492 | 516 | ||
493 | 517 |
github/deemru/w8io/169f3d6 74.12 ms ◑