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