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