tx · Y7Un6nmDmfu8TJaaujeK7tFSLAMxjebWQ5EUY8Ls2q4 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.03700000 Waves 2024.12.28 21:04 [3434715] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "Y7Un6nmDmfu8TJaaujeK7tFSLAMxjebWQ5EUY8Ls2q4", "fee": 3700000, "feeAssetId": null, "timestamp": 1735409054224, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "3tpDeqR1JQQqGctnyLsQt7uQFhBFW4gLvUjJu9rFcuSjjM7m6H2RBtN2scB3WmpdAv2pRyWqv3RFdgr813Q8QG5M" ], "script": "base64:BgJSCAISBgoECAgICBIDCgEIEgMKAQESBAoCCAESAwoBARIECgIIARIAEgMKAQgSAwoBCBIDCgEBEgMKAQESAwoBCBIDCgEIEgMKAQESABIECgIIAb0BAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ADk1JTlNIT1BQQVlNRU5UAKCNBgAKREFZX01JTExJUwCAuJkpABJBQ1JFU19XRUVLTFlfUFJJWkUAwPD1CwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACkRBWV9CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAoAsDCQAAAgEBVAUHJG1hdGNoMAA8CQACAQINVW5rbm93biBjaGFpbgALV0VFS19CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAA4E4DCQAAAgEBVAUHJG1hdGNoMAC0AQkAAgECDVVua25vd24gY2hhaW4AClZSRl9PRkZTRVQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAAAMJAAACAQFUBQckbWF0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C Next: none Diff:
Old | New | Differences | |
---|---|---|---|
777 | 777 | let newWinners = if (isDefined(winners)) | |
778 | 778 | then ((value(winners) + "_") + addr) | |
779 | 779 | else addr | |
780 | - | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], $ | |
780 | + | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], $Tuple3(prizeResult, random4, rnd)) | |
781 | 781 | } | |
782 | 782 | else { | |
783 | 783 | let random1 = (getRandomNumber(9, (base58'29' + salt), entropy) + 1) | |
791 | 791 | if ((oldTickets > 0)) | |
792 | 792 | then commonActions | |
793 | 793 | else (commonActions :+ IntegerEntry(keyTotalWeekParticipants(week), (valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) + 1))) | |
794 | - | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), consTickets) | |
794 | + | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), $Tuple3(consTickets, random4, random1)) | |
795 | 795 | } | |
796 | 796 | } | |
797 | 797 | ||
951 | 951 | then if ((size(i.payments) != 0)) | |
952 | 952 | then throw("No payments required") | |
953 | 953 | else { | |
954 | - | let $ | |
955 | - | let actions = $ | |
956 | - | let wlgClaimedAmount = $ | |
954 | + | let $t01652516594 = claimInternal2(toString(i.caller)) | |
955 | + | let actions = $t01652516594._1 | |
956 | + | let wlgClaimedAmount = $t01652516594._2 | |
957 | 957 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
958 | 958 | } | |
959 | 959 | else throw("Strict value is not equal to itself.") | |
969 | 969 | else false) | |
970 | 970 | then throw("Permission denied") | |
971 | 971 | else { | |
972 | - | let $ | |
973 | - | if (($ | |
972 | + | let $t01691416971 = claimInternal2(addr) | |
973 | + | if (($t01691416971 == $t01691416971)) | |
974 | 974 | then { | |
975 | - | let wlgClaimedAmount = $ | |
976 | - | let actions = $ | |
975 | + | let wlgClaimedAmount = $t01691416971._2 | |
976 | + | let actions = $t01691416971._1 | |
977 | 977 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
978 | 978 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
979 | 979 | else actions, wlgClaimedAmount) | |
991 | 991 | else false) | |
992 | 992 | then throw("Permission denied") | |
993 | 993 | else { | |
994 | - | let $ | |
995 | - | if (($ | |
994 | + | let $t01735417410 = claimInternal(addr) | |
995 | + | if (($t01735417410 == $t01735417410)) | |
996 | 996 | then { | |
997 | - | let wlgClaimedAmount = $ | |
998 | - | let actions = $ | |
997 | + | let wlgClaimedAmount = $t01735417410._2 | |
998 | + | let actions = $t01735417410._1 | |
999 | 999 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
1000 | 1000 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
1001 | 1001 | else nil, wlgClaimedAmount) | |
1076 | 1076 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
1077 | 1077 | then throw("Permission denied") | |
1078 | 1078 | else { | |
1079 | - | let $ | |
1080 | - | let actions = $ | |
1081 | - | let xp = $ | |
1079 | + | let $t02004220085 = takeXpInternal(addr, 0) | |
1080 | + | let actions = $t02004220085._1 | |
1081 | + | let xp = $t02004220085._2 | |
1082 | 1082 | $Tuple2(actions, xp) | |
1083 | 1083 | } | |
1084 | 1084 | ||
1086 | 1086 | ||
1087 | 1087 | @Callable(i) | |
1088 | 1088 | func checkWlgXpREADONLY (addr) = { | |
1089 | - | let $ | |
1090 | - | let ignored = $ | |
1091 | - | let deltaXP = $ | |
1089 | + | let $t02016220210 = takeXpInternal(addr, 0) | |
1090 | + | let ignored = $t02016220210._1 | |
1091 | + | let deltaXP = $t02016220210._2 | |
1092 | 1092 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
1093 | 1093 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
1094 | 1094 | $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 ACRES_WEEKLY_PRIZE = 25000000 | |
15 | 15 | ||
16 | 16 | let chain = take(drop(this.bytes, 1), 1) | |
17 | 17 | ||
18 | 18 | let DAY_BLOCKS = match chain { | |
19 | 19 | case _ => | |
20 | 20 | if ((base58'2W' == $match0)) | |
21 | 21 | then 1440 | |
22 | 22 | else if ((base58'2T' == $match0)) | |
23 | 23 | then 60 | |
24 | 24 | else throw("Unknown chain") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | let WEEK_BLOCKS = match chain { | |
28 | 28 | case _ => | |
29 | 29 | if ((base58'2W' == $match0)) | |
30 | 30 | then 10080 | |
31 | 31 | else if ((base58'2T' == $match0)) | |
32 | 32 | then 180 | |
33 | 33 | else throw("Unknown chain") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | let VRF_OFFSET = match chain { | |
37 | 37 | case _ => | |
38 | 38 | if ((base58'2W' == $match0)) | |
39 | 39 | then 0 | |
40 | 40 | else if ((base58'2T' == $match0)) | |
41 | 41 | then 1146000 | |
42 | 42 | else throw("Unknown chain") | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | let usdtAssetId = match chain { | |
46 | 46 | case _ => | |
47 | 47 | if ((base58'2W' == $match0)) | |
48 | 48 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
49 | 49 | else if ((base58'2T' == $match0)) | |
50 | 50 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
51 | 51 | else throw("Unknown chain") | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | let defaultRest2AddressStr = match chain { | |
55 | 55 | case _ => | |
56 | 56 | if ((base58'2W' == $match0)) | |
57 | 57 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
58 | 58 | else if ((base58'2T' == $match0)) | |
59 | 59 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
60 | 60 | else throw("Unknown chain") | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | let defaultRestAddressStr = match chain { | |
64 | 64 | case _ => | |
65 | 65 | if ((base58'2W' == $match0)) | |
66 | 66 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
67 | 67 | else if ((base58'2T' == $match0)) | |
68 | 68 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
69 | 69 | else throw("Unknown chain") | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | let economyContractStr = match chain { | |
73 | 73 | case _ => | |
74 | 74 | if ((base58'2W' == $match0)) | |
75 | 75 | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
76 | 76 | else if ((base58'2T' == $match0)) | |
77 | 77 | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
78 | 78 | else throw("Unknown chain") | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | let IdxCfgAcres2Dapp = 1 | |
85 | 85 | ||
86 | 86 | let IdxCfgWlgDapp = 2 | |
87 | 87 | ||
88 | 88 | let IdxCfgPuzzlePoolDapp = 4 | |
89 | 89 | ||
90 | 90 | let IdxCfgInvestFundDapp = 5 | |
91 | 91 | ||
92 | 92 | let IdxCfgMarketDapp = 6 | |
93 | 93 | ||
94 | 94 | func keyRestCfg () = "%s__restConfig" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyRest2Address () = "%s__rest2Addr" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyRestAddress () = "%s__restAddr" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
104 | 104 | ||
105 | 105 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | let IdxCfgStakingDapp = 1 | |
112 | 112 | ||
113 | 113 | let IdxCfgAcresDapp = 8 | |
114 | 114 | ||
115 | 115 | let restCfg = readRestCfgOrFail(restContract) | |
116 | 116 | ||
117 | 117 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
118 | 118 | ||
119 | 119 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
120 | 120 | ||
121 | 121 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
122 | 122 | ||
123 | 123 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
124 | 124 | ||
125 | 125 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
126 | 126 | ||
127 | 127 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
128 | 128 | ||
129 | 129 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
130 | 130 | ||
131 | 131 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
132 | 132 | ||
133 | 133 | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
134 | 134 | ||
135 | 135 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | let wlgAssetIdKey = "wlg_assetId" | |
139 | 139 | ||
140 | 140 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
141 | 141 | ||
142 | 142 | func keyUserBet (addr) = ("userBet_" + addr) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func keyTotalWeekParticipants (week) = ("totalWeekParticipants_" + toString(week)) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyNumPrizes2Draw (week) = ("numPrizes2Draw_" + toString(week)) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyNumNFTDrawn (week) = ("numNFTDrawn_" + toString(week)) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyAcresDrawn (week) = ("acresDrawn_" + toString(week)) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyWeekWinners (week) = ("weekWinners_" + toString(week)) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func winningBet (day) = { | |
167 | 167 | let b = (day * DAY_BLOCKS) | |
168 | 168 | let h = if ((b > VRF_OFFSET)) | |
169 | 169 | then b | |
170 | 170 | else (b + VRF_OFFSET) | |
171 | 171 | (toInt(value(value(blockInfoByHeight(h)).vrf)) % 4) | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | let ixWlgAmount = 0 | |
176 | 176 | ||
177 | 177 | let ixWlgWlg = 1 | |
178 | 178 | ||
179 | 179 | let ixWlgPrice = 2 | |
180 | 180 | ||
181 | 181 | let ixWlgIssueTime = 8 | |
182 | 182 | ||
183 | 183 | let ixWlgTeamAmLeft = 11 | |
184 | 184 | ||
185 | 185 | let ixWlgTeamAmAvailNow = 12 | |
186 | 186 | ||
187 | 187 | let ixWlgActAmLeft = 15 | |
188 | 188 | ||
189 | 189 | let ixWlgActAmAvailNow = 16 | |
190 | 190 | ||
191 | 191 | let ixWlgAmLeftTotal = 19 | |
192 | 192 | ||
193 | 193 | let ixWlgUserAmAvailNow = 23 | |
194 | 194 | ||
195 | 195 | let ixWlgEffUserTime = 24 | |
196 | 196 | ||
197 | 197 | let ixWlgIssue10Amount = 25 | |
198 | 198 | ||
199 | 199 | let ixWlgMarketingIssue10Amount = 26 | |
200 | 200 | ||
201 | 201 | let ixWlgTeamIssue10Amount = 27 | |
202 | 202 | ||
203 | 203 | let ixWlgUser10part = 28 | |
204 | 204 | ||
205 | 205 | let ixWlgIssue10Time = 29 | |
206 | 206 | ||
207 | 207 | func asInt (v) = match v { | |
208 | 208 | case n: Int => | |
209 | 209 | n | |
210 | 210 | case _ => | |
211 | 211 | throw("fail to cast into Int") | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func fixedPoint (val,decimals) = { | |
216 | 216 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
217 | 217 | let lowPart = toString((val % tenPow)) | |
218 | 218 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
219 | 219 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
220 | 220 | } | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue)) | |
224 | 224 | then throw("maxValue should be > 0") | |
225 | 225 | else { | |
226 | 226 | let randomHash = sha256_16Kb((salt + entropy)) | |
227 | 227 | (toInt(randomHash) % maxValue) | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | let M4 = 10000 | |
232 | 232 | ||
233 | 233 | let SCALE8 = 100000000 | |
234 | 234 | ||
235 | 235 | let xpLevelScale = 3200 | |
236 | 236 | ||
237 | 237 | let xpLevelRecipPow = 4000 | |
238 | 238 | ||
239 | 239 | let numPointsOnLevelUp = 3 | |
240 | 240 | ||
241 | 241 | let wlgBaseAmountXp = 100000000000 | |
242 | 242 | ||
243 | 243 | func keyUserXP (addr) = ("userXP_" + addr) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func keyUserLevel (addr) = ("userLevel_" + addr) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | let xpWlg = 10000 | |
250 | 250 | ||
251 | 251 | func levelByXP (xp) = fraction(xpLevelScale, pow(xp, 4, xpLevelRecipPow, 4, 4, DOWN), SCALE8) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func levelUp (currLevel,newXP) = { | |
255 | 255 | let newLevel = levelByXP(newXP) | |
256 | 256 | [newLevel, (numPointsOnLevelUp * (newLevel - currLevel))] | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func isWin (userTickets,totalTickets,numPrizes,random4) = { | |
261 | 261 | let a4 = fraction(M4, (totalTickets - userTickets), totalTickets) | |
262 | 262 | let p4 = pow(a4, 4, numPrizes, 0, 4, DOWN) | |
263 | 263 | ((M4 - random4) > p4) | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | let M6 = 1000000 | |
268 | 268 | ||
269 | 269 | let M8 = 100000000 | |
270 | 270 | ||
271 | 271 | let MILLION6 = 100000000000000 | |
272 | 272 | ||
273 | 273 | let TEAMSHARE = 200000 | |
274 | 274 | ||
275 | 275 | let ACTIVITYSHARE = 100000 | |
276 | 276 | ||
277 | 277 | let PLAYERSHARE = 400000 | |
278 | 278 | ||
279 | 279 | let YEARMILLIS = 31557600000 | |
280 | 280 | ||
281 | 281 | let DAYMILLIS = 86400000 | |
282 | 282 | ||
283 | 283 | let BANK_FEE = 50000 | |
284 | 284 | ||
285 | 285 | let ch = take(drop(this.bytes, 1), 1) | |
286 | 286 | ||
287 | 287 | let USDT_TVL_CORRECTION = match ch { | |
288 | 288 | case _ => | |
289 | 289 | if ((base58'2W' == $match0)) | |
290 | 290 | then 1208630000 | |
291 | 291 | else if ((base58'2T' == $match0)) | |
292 | 292 | then 0 | |
293 | 293 | else throw("Unknown chain") | |
294 | 294 | } | |
295 | 295 | ||
296 | 296 | let teamAddrKey = "teamAddr" | |
297 | 297 | ||
298 | 298 | let lastTeamTimeKey = "lastClaimedTime_team" | |
299 | 299 | ||
300 | 300 | let teamAmountLeftKey = "teamAmountLeft" | |
301 | 301 | ||
302 | 302 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
303 | 303 | ||
304 | 304 | let actAmountLeftKey = "activitiesAmountLeft" | |
305 | 305 | ||
306 | 306 | let stakersAmountLeftKey = "stakersAmountLeft" | |
307 | 307 | ||
308 | 308 | func keyLastClaimedTimeByUserOld (addr) = ("lastClaimedTimeUserOld_" + addr) | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func keyLastWlgTradeLimitByUser (addr) = ("lastWlgLimitUser_" + addr) | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | let wlgIssueTimeKey = "wlg_issueTime" | |
321 | 321 | ||
322 | 322 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
323 | 323 | ||
324 | 324 | let zbIssuedAmountKey = "zbill_issuedAmount" | |
325 | 325 | ||
326 | 326 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | let acresStakedTotalKey = "acresStakedAmountTotal" | |
330 | 330 | ||
331 | 331 | func keyWlgStakedAmountByUser (addr) = ("wlgStakedAmountByUser_" + addr) | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | let wlgStakedTotalKey = "wlgStakedAmountTotal" | |
335 | 335 | ||
336 | 336 | func keyWlgStakedTimeByUser (addr) = ("wlgStakedTimeByUser_" + addr) | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | let dappRest = 0 | |
340 | 340 | ||
341 | 341 | let dappStaking = 1 | |
342 | 342 | ||
343 | 343 | let dappEconomy = 2 | |
344 | 344 | ||
345 | 345 | let dappWlg = 3 | |
346 | 346 | ||
347 | 347 | let dappPuzzle = 4 | |
348 | 348 | ||
349 | 349 | let dappInvestFund = 5 | |
350 | 350 | ||
351 | 351 | let dappAcres = 6 | |
352 | 352 | ||
353 | 353 | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
354 | 354 | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
355 | 355 | func adder (acc,item) = (acc + parseIntValue(item)) | |
356 | 356 | ||
357 | 357 | let totalPieces = { | |
358 | 358 | let $l = props | |
359 | 359 | let $s = size($l) | |
360 | 360 | let $acc0 = 0 | |
361 | 361 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
362 | 362 | then $a | |
363 | 363 | else adder($a, $l[$i]) | |
364 | 364 | ||
365 | 365 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
366 | 366 | then $a | |
367 | 367 | else throw("List size exceeds 6") | |
368 | 368 | ||
369 | 369 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
370 | 370 | } | |
371 | 371 | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
372 | 372 | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
373 | 373 | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
374 | 374 | [totalPieces, userPieces, totalAcres, userAcres] | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | let idxTotalPieces = 0 | |
379 | 379 | ||
380 | 380 | let idxUserPieces = 1 | |
381 | 381 | ||
382 | 382 | let idxTotalAcres = 2 | |
383 | 383 | ||
384 | 384 | let idxUserAcres = 3 | |
385 | 385 | ||
386 | 386 | let OLD_STAKING_DEADL = 1733346000000 | |
387 | 387 | ||
388 | 388 | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
389 | 389 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
390 | 390 | let economyUsd = assetBalance(contracts[dappEconomy], usdtId) | |
391 | 391 | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
392 | 392 | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
393 | 393 | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
394 | 394 | let investFndContract = contracts[dappInvestFund] | |
395 | 395 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0)) | |
396 | 396 | let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal) | |
397 | 397 | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
398 | 398 | let now = lastBlock.timestamp | |
399 | 399 | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
400 | 400 | let bankWlgold = assetBalance(contracts[dappStaking], wlgId) | |
401 | 401 | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
402 | 402 | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
403 | 403 | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
404 | 404 | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
405 | 405 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
406 | 406 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
407 | 407 | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
408 | 408 | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
409 | 409 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
410 | 410 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
411 | 411 | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
412 | 412 | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUserOld(userAddrOpt)), issueTime) | |
413 | 413 | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
414 | 414 | let nowLimited = min([min([now, (issueTime + (3 * YEARMILLIS))]), OLD_STAKING_DEADL]) | |
415 | 415 | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
416 | 416 | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
417 | 417 | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
418 | 418 | let $t079143 = if ((lastUserPeriod == curPeriod)) | |
419 | 419 | then { | |
420 | 420 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
421 | 421 | let userPart = fraction(a0, userProportion6, M6) | |
422 | 422 | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
423 | 423 | $Tuple3(userPart, a0, effTime) | |
424 | 424 | } | |
425 | 425 | else if ((lastUserPeriod == (curPeriod - 1))) | |
426 | 426 | then { | |
427 | 427 | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
428 | 428 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
429 | 429 | let avail = (a1 + a0) | |
430 | 430 | let userPart = fraction(avail, userProportion6, M6) | |
431 | 431 | let effTime = if ((a1 >= userPart)) | |
432 | 432 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
433 | 433 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
434 | 434 | $Tuple3(userPart, avail, effTime) | |
435 | 435 | } | |
436 | 436 | else { | |
437 | 437 | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
438 | 438 | let a1 = distributionByPeriod((curPeriod - 1)) | |
439 | 439 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
440 | 440 | let avail = ((a2 + a1) + a0) | |
441 | 441 | let userPart = fraction(avail, userProportion6, M6) | |
442 | 442 | let effTime = if ((a2 >= userPart)) | |
443 | 443 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
444 | 444 | else if (((a2 + a1) >= userPart)) | |
445 | 445 | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
446 | 446 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
447 | 447 | $Tuple3(userPart, avail, effTime) | |
448 | 448 | } | |
449 | 449 | let userAmount = $t079143._1 | |
450 | 450 | let userAvailable = $t079143._2 | |
451 | 451 | let effLastTime = $t079143._3 | |
452 | 452 | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAYMILLIS, YEARMILLIS), 25, eff[idxTotalPieces]) | |
453 | 453 | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
454 | 454 | let userTemp = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
455 | 455 | let bankFromUser = fraction(userTemp, BANK_FEE, M6) | |
456 | 456 | let robbedUser = (userTemp - bankFromUser) | |
457 | 457 | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
458 | 458 | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime, bankWlgold] | |
459 | 459 | } | |
460 | 460 | ||
461 | 461 | ||
462 | 462 | let M6_ = 1000000 | |
463 | 463 | ||
464 | 464 | let M8_ = 100000000 | |
465 | 465 | ||
466 | 466 | let TEAM_SHARE = 200000 | |
467 | 467 | ||
468 | 468 | let ACTIVITY_SHARE = 100000 | |
469 | 469 | ||
470 | 470 | let PLAYER_SHARE = 400000 | |
471 | 471 | ||
472 | 472 | let YEAR_MILLIS = 31557600000 | |
473 | 473 | ||
474 | 474 | let DAY_MS = 86400000 | |
475 | 475 | ||
476 | 476 | let ISSUE10 = 1000000000 | |
477 | 477 | ||
478 | 478 | let PLAYERS10_SHARE = 800000 | |
479 | 479 | ||
480 | 480 | let MARKETING10_SHARE = 100000 | |
481 | 481 | ||
482 | 482 | let TEAM10_SHARE = 100000 | |
483 | 483 | ||
484 | 484 | let NEW_STAKING_START = 1731279600000 | |
485 | 485 | ||
486 | 486 | let marketingAddrKey = "marketingAddr" | |
487 | 487 | ||
488 | 488 | let teamAdrKey = "teamAddr" | |
489 | 489 | ||
490 | 490 | let lastTeamTimKey = "lastClaimedTime_team" | |
491 | 491 | ||
492 | 492 | let teamAmtLeftKey = "teamAmountLeft" | |
493 | 493 | ||
494 | 494 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
495 | 495 | ||
496 | 496 | let actAmtLeftKey = "activitiesAmountLeft" | |
497 | 497 | ||
498 | 498 | let stakersAmtLeftKey = "stakersAmountLeft" | |
499 | 499 | ||
500 | 500 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | func distrByPeriod (issuedAmount,period) = fraction(issuedAmount, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | let wlgIssue10TimeKey = "wlg_issue10Time" | |
507 | 507 | ||
508 | 508 | let wlgIssueTimKey = "wlg_issueTime" | |
509 | 509 | ||
510 | 510 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
511 | 511 | ||
512 | 512 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
513 | 513 | ||
514 | 514 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
515 | 515 | ||
516 | 516 | ||
517 | 517 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
518 | 518 | ||
519 | 519 | let totalFarmingPowerKey = "totalFarmingPower" | |
520 | 520 | ||
521 | 521 | let dapp2Rest = 0 | |
522 | 522 | ||
523 | 523 | let dapp2Staking = 1 | |
524 | 524 | ||
525 | 525 | let dapp2Wlg = 2 | |
526 | 526 | ||
527 | 527 | let dapp2Puzzle = 3 | |
528 | 528 | ||
529 | 529 | let dapp2InvestFund = 4 | |
530 | 530 | ||
531 | 531 | let DEFAULT_WEEKLY_PRIZES = 5 | |
532 | 532 | ||
533 | 533 | let ACRES_FOR_BET = 100000000 | |
534 | 534 | ||
535 | 535 | let keyNftTotalIssued = "nftTotalIssued" | |
536 | 536 | ||
537 | 537 | let keyNftTotalBurned = "nftTotalBurned" | |
538 | 538 | ||
539 | 539 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
540 | 540 | ||
541 | 541 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
542 | 542 | ||
543 | 543 | ||
544 | 544 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
545 | 545 | ||
546 | 546 | ||
547 | 547 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
548 | 548 | ||
549 | 549 | func getLevelByAcres (acres) = { | |
550 | 550 | let acr = ((acres + 99999999) / M8_) | |
551 | 551 | func checker (acc,item) = if ((item >= acr)) | |
552 | 552 | then acc | |
553 | 553 | else (acc + 1) | |
554 | 554 | ||
555 | 555 | let $l = levelAcres | |
556 | 556 | let $s = size($l) | |
557 | 557 | let $acc0 = 0 | |
558 | 558 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
559 | 559 | then $a | |
560 | 560 | else checker($a, $l[$i]) | |
561 | 561 | ||
562 | 562 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
563 | 563 | then $a | |
564 | 564 | else throw("List size exceeds 10") | |
565 | 565 | ||
566 | 566 | $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) | |
567 | 567 | } | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
571 | 571 | ||
572 | 572 | ||
573 | 573 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
574 | 574 | let notBonused = getFarmingPowerByAcres(acres) | |
575 | 575 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
576 | 576 | } | |
577 | 577 | ||
578 | 578 | ||
579 | 579 | func getFarmingPowers (userAddrStrOrEmpty,acres2Contract) = { | |
580 | 580 | let totalFP = valueOrElse(getInteger(acres2Contract, totalFarmingPowerKey), 0) | |
581 | 581 | let userAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
582 | 582 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(userAddrStrOrEmpty)), 0) | |
583 | 583 | let $t079143 = getFarmingPowerByAcresAndBonus(userAcres, userBonus) | |
584 | 584 | let userFPbonused = $t079143._1 | |
585 | 585 | let userFPnotBonused = $t079143._2 | |
586 | 586 | [totalFP, userFPbonused, userFPnotBonused, userBonus] | |
587 | 587 | } | |
588 | 588 | ||
589 | 589 | ||
590 | 590 | let idxTotalFP = 0 | |
591 | 591 | ||
592 | 592 | let idxUserFPbonused = 1 | |
593 | 593 | ||
594 | 594 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
595 | 595 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
596 | 596 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
597 | 597 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
598 | 598 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
599 | 599 | let acres2Usd = assetBalance(contracts[dapp2Staking], usdtId) | |
600 | 600 | let investFndContract = contracts[dapp2InvestFund] | |
601 | 601 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
602 | 602 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
603 | 603 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
604 | 604 | let now = lastBlock.timestamp | |
605 | 605 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
606 | 606 | let wlgWlg = assetBalance(contracts[dapp2Wlg], wlgId) | |
607 | 607 | let teamTotal = fraction(issuedAmount, TEAM_SHARE, M6_) | |
608 | 608 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
609 | 609 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
610 | 610 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
611 | 611 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
612 | 612 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
613 | 613 | let actTotal = fraction(issuedAmount, ACTIVITY_SHARE, M6_) | |
614 | 614 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
615 | 615 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
616 | 616 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
617 | 617 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
618 | 618 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
619 | 619 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
620 | 620 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
621 | 621 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
622 | 622 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
623 | 623 | let curPeriodDistribution = distrByPeriod(issuedAmount, curPeriod) | |
624 | 624 | let prevPeriodEnd = (issueTime + (YEAR_MILLIS * curPeriod)) | |
625 | 625 | let prevPrevPeriodEnd = (issueTime + (YEAR_MILLIS * (curPeriod - 1))) | |
626 | 626 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
627 | 627 | let userAvailable = if ((lastUserPeriod == curPeriod)) | |
628 | 628 | then a0 | |
629 | 629 | else if ((lastUserPeriod == (curPeriod - 1))) | |
630 | 630 | then { | |
631 | 631 | let a1 = fraction(distrByPeriod(issuedAmount, (curPeriod - 1)), (prevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
632 | 632 | (a1 + a0) | |
633 | 633 | } | |
634 | 634 | else { | |
635 | 635 | let a2 = fraction(distrByPeriod(issuedAmount, (curPeriod - 2)), (prevPrevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
636 | 636 | let a1 = distrByPeriod(issuedAmount, (curPeriod - 1)) | |
637 | 637 | ((a2 + a1) + a0) | |
638 | 638 | } | |
639 | 639 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
640 | 640 | let userAmount = if ((eff[idxTotalFP] != 0)) | |
641 | 641 | then fraction(userAvailable, eff[idxUserFPbonused], eff[idxTotalFP]) | |
642 | 642 | else 0 | |
643 | 643 | let lastIssue10Time = valueOrElse(getInteger(contracts[dapp2Wlg], wlgIssue10TimeKey), NEW_STAKING_START) | |
644 | 644 | let issue10Amount = fraction(ISSUE10, max([(now - lastIssue10Time), 0]), DAY_MS) | |
645 | 645 | let marketingIssue10Amount = fraction(issue10Amount, MARKETING10_SHARE, M6_) | |
646 | 646 | let teamIssue10Amount = fraction(issue10Amount, TEAM10_SHARE, M6_) | |
647 | 647 | let user10Interval = max([(now - max([NEW_STAKING_START, lastUserTime])), 0]) | |
648 | 648 | let user10part = if ((eff[idxTotalFP] != 0)) | |
649 | 649 | then fraction(fraction(fraction(ISSUE10, user10Interval, DAY_MS), eff[idxUserFPbonused], eff[idxTotalFP]), PLAYERS10_SHARE, M6_) | |
650 | 650 | else 0 | |
651 | 651 | let newIssue10Time = max([NEW_STAKING_START, now]) | |
652 | 652 | let acresStakedTotal = valueOrElse(getInteger(contracts[dapp2Staking], acresStakdTotalKey), 0) | |
653 | 653 | let nftTotalIssued = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalIssued), 0) | |
654 | 654 | let nftTotalBurned = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalBurned), 0) | |
655 | 655 | let wlNftTotalStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyWlNftTotalStaked), 0) | |
656 | 656 | let wlNftUserStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyUserWlNftNumber(valueOrElse(userAddrOpt, ""))), 0) | |
657 | 657 | [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] | |
658 | 658 | } | |
659 | 659 | ||
660 | 660 | ||
661 | 661 | let profitAddrKey = "profitAddr" | |
662 | 662 | ||
663 | 663 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
664 | 664 | ||
665 | 665 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
666 | 666 | ||
667 | 667 | ||
668 | 668 | func prolog2 () = asInt(reentrantInvoke(acres2Contract, "saveLastTx", nil, nil)) | |
669 | 669 | ||
670 | 670 | ||
671 | 671 | func getSwapLimitWlgold (addr) = { | |
672 | 672 | let lastTime = valueOrElse(getInteger(keyLastWlgTradeTimeByUser(addr)), 0) | |
673 | 673 | let defaultLimit = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmountByUser(addr)), 0) | |
674 | 674 | let lastLimitLeft = valueOrElse(getInteger(keyLastWlgTradeLimitByUser(addr)), defaultLimit) | |
675 | 675 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (lastBlock.timestamp - lastTime), DAY_MILLIS)) | |
676 | 676 | min([currentLimit, defaultLimit]) | |
677 | 677 | } | |
678 | 678 | ||
679 | 679 | ||
680 | 680 | let idxWlgTeamAmLeft = 10 | |
681 | 681 | ||
682 | 682 | let idxWlgTeamAmAvailNow = 11 | |
683 | 683 | ||
684 | 684 | let idxWlgActAmLeft = 14 | |
685 | 685 | ||
686 | 686 | let idxWlgActAmAvailNow = 15 | |
687 | 687 | ||
688 | 688 | let idxWlgAmLeftTotal = 18 | |
689 | 689 | ||
690 | 690 | let idxWlgUserTotalAvail = 24 | |
691 | 691 | ||
692 | 692 | let idxWlgEffUserTime = 25 | |
693 | 693 | ||
694 | 694 | func claimInternal (addr) = { | |
695 | 695 | let caller = addressFromStringValue(addr) | |
696 | 696 | let economyContract = addressFromStringValue(economyContractStr) | |
697 | 697 | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, MULT6) | |
698 | 698 | let now = lastBlock.timestamp | |
699 | 699 | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
700 | 700 | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
701 | 701 | let actAmountLeft = curStats[idxWlgActAmLeft] | |
702 | 702 | let actAmount = curStats[idxWlgActAmAvailNow] | |
703 | 703 | let userAmount = curStats[idxWlgUserTotalAvail] | |
704 | 704 | let userKey = keyStakersAmountPaidUser(addr) | |
705 | 705 | let userTotal = curStats[idxWlgUserTotalAvail] | |
706 | 706 | let userEffTime = curStats[idxWlgEffUserTime] | |
707 | 707 | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUserOld(addr), userEffTime)], userAmount) | |
708 | 708 | } | |
709 | 709 | ||
710 | 710 | ||
711 | 711 | func claimInternal2 (addr) = { | |
712 | 712 | let curStats = getWlgStats2(addr, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
713 | 713 | let userTimeKey = keyLastClaimTimeByUser(addr) | |
714 | 714 | let lastUserTime = valueOrElse(getInteger(userTimeKey), 0) | |
715 | 715 | let userEffTime = curStats[ixWlgEffUserTime] | |
716 | 716 | if ((lastUserTime == userEffTime)) | |
717 | 717 | then $Tuple2(nil, 0) | |
718 | 718 | else { | |
719 | 719 | let now = lastBlock.timestamp | |
720 | 720 | let issueTime = curStats[ixWlgIssueTime] | |
721 | 721 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
722 | 722 | let teamAmount = (curStats[ixWlgTeamAmAvailNow] + curStats[ixWlgTeamIssue10Amount]) | |
723 | 723 | let teamActions = if ((teamAmount > 0)) | |
724 | 724 | then [IntegerEntry(teamAmountLeftKey, ((teamAmountLeft - teamAmount) + curStats[ixWlgTeamIssue10Amount])), IntegerEntry(lastTeamTimeKey, now), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId)] | |
725 | 725 | else nil | |
726 | 726 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
727 | 727 | let actAmount = curStats[ixWlgActAmAvailNow] | |
728 | 728 | let actActions = if ((actAmount > 0)) | |
729 | 729 | then [IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), ScriptTransfer(restContract, actAmount, wlgAssetId)] | |
730 | 730 | else nil | |
731 | 731 | let marketingAmount = curStats[ixWlgMarketingIssue10Amount] | |
732 | 732 | let marketingTransfer = if ((marketingAmount > 0)) | |
733 | 733 | then [ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId)] | |
734 | 734 | else nil | |
735 | 735 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
736 | 736 | let userKey = keyStakersAmountPaidUser(addr) | |
737 | 737 | let userTotal = (userAmount + curStats[ixWlgUser10part]) | |
738 | 738 | let issued10Amount = curStats[ixWlgIssue10Amount] | |
739 | 739 | $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(userTimeKey, userEffTime)] ++ teamActions) ++ actActions) ++ marketingTransfer), userTotal) | |
740 | 740 | } | |
741 | 741 | } | |
742 | 742 | ||
743 | 743 | ||
744 | 744 | func takeXpInternal (addr,delta) = { | |
745 | 745 | let now = lastBlock.timestamp | |
746 | 746 | let timeKey = keyWlgStakedTimeByUser(addr) | |
747 | 747 | let amountKey = keyWlgStakedAmountByUser(addr) | |
748 | 748 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
749 | 749 | let oldUser = valueOrElse(getInteger(amountKey), 0) | |
750 | 750 | let oldTotal = valueOrElse(getInteger(wlgStakedTotalKey), 0) | |
751 | 751 | let xp = fraction(fraction(xpWlg, oldUser, wlgBaseAmountXp), (lastTime - now), DAYMILLIS) | |
752 | 752 | $Tuple3([IntegerEntry(timeKey, now), IntegerEntry(amountKey, (oldUser + delta)), IntegerEntry(wlgStakedTotalKey, (oldTotal + delta))], xp, oldUser) | |
753 | 753 | } | |
754 | 754 | ||
755 | 755 | ||
756 | 756 | func openChestInternal (addr,week,userTickets,totalTickets,lastWeekNumTx) = { | |
757 | 757 | let drawWeek = (week - 1) | |
758 | 758 | let numPrizes = valueOrElse(getInteger(keyNumPrizes2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
759 | 759 | let entropy = value(value(blockInfoByHeight((week * WEEK_BLOCKS))).vrf) | |
760 | 760 | let salt = fromBase58String(split(lastWeekNumTx, "_")[1]) | |
761 | 761 | let random4 = getRandomNumber(M4, salt, entropy) | |
762 | 762 | if (isWin(userTickets, totalTickets, numPrizes, random4)) | |
763 | 763 | then { | |
764 | 764 | let rnd = getRandomNumber(100, (base58'29' + salt), entropy) | |
765 | 765 | let $t083418798 = if ((rnd >= 90)) | |
766 | 766 | then { | |
767 | 767 | let nftKey = keyNumNFTDrawn(drawWeek) | |
768 | 768 | $Tuple2(invoke(acres2Contract, "issuePickC1", [addr], nil), IntegerEntry(nftKey, (valueOrElse(getInteger(nftKey), 0) + 1))) | |
769 | 769 | } | |
770 | 770 | else { | |
771 | 771 | let acresKey = keyAcresDrawn(drawWeek) | |
772 | 772 | $Tuple2(invoke(acresContract, "sendAcresFor", [addr, ACRES_WEEKLY_PRIZE], nil), IntegerEntry(acresKey, (valueOrElse(getInteger(acresKey), 0) + ACRES_WEEKLY_PRIZE))) | |
773 | 773 | } | |
774 | 774 | let prizeResult = $t083418798._1 | |
775 | 775 | let prizeAction = $t083418798._2 | |
776 | 776 | let winners = getString(keyWeekWinners(drawWeek)) | |
777 | 777 | let newWinners = if (isDefined(winners)) | |
778 | 778 | then ((value(winners) + "_") + addr) | |
779 | 779 | else addr | |
780 | - | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], $ | |
780 | + | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], $Tuple3(prizeResult, random4, rnd)) | |
781 | 781 | } | |
782 | 782 | else { | |
783 | 783 | let random1 = (getRandomNumber(9, (base58'29' + salt), entropy) + 1) | |
784 | 784 | let consTickets = fraction(userTickets, random1, 10) | |
785 | 785 | let ticketsKey = keyUserWeekTickets(addr, week) | |
786 | 786 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
787 | 787 | $Tuple2(((if ((consTickets == 0)) | |
788 | 788 | then nil | |
789 | 789 | else { | |
790 | 790 | let commonActions = [IntegerEntry(keyTotalWeekTickets(week), (valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) + consTickets)), IntegerEntry(ticketsKey, (oldTickets + consTickets))] | |
791 | 791 | if ((oldTickets > 0)) | |
792 | 792 | then commonActions | |
793 | 793 | else (commonActions :+ IntegerEntry(keyTotalWeekParticipants(week), (valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) + 1))) | |
794 | - | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), consTickets) | |
794 | + | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), $Tuple3(consTickets, random4, random1)) | |
795 | 795 | } | |
796 | 796 | } | |
797 | 797 | ||
798 | 798 | ||
799 | 799 | func claimTicketsInternal (addr,userBetStr) = { | |
800 | 800 | let week = (height / WEEK_BLOCKS) | |
801 | 801 | let ticketsKey = keyUserWeekTickets(addr, week) | |
802 | 802 | let dayBet = split(userBetStr, "_") | |
803 | 803 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
804 | 804 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
805 | 805 | let deltaTickets = if ((winningBet(parseIntValue(dayBet[0])) == parseIntValue(dayBet[1]))) | |
806 | 806 | then 1 | |
807 | 807 | else 0 | |
808 | 808 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
809 | 809 | let updateParticipants = if (if ((oldTickets == 0)) | |
810 | 810 | then (deltaTickets == 1) | |
811 | 811 | else false) | |
812 | 812 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
813 | 813 | else nil | |
814 | 814 | $Tuple2(if ((deltaTickets == 0)) | |
815 | 815 | then nil | |
816 | 816 | else ((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
817 | 817 | } | |
818 | 818 | ||
819 | 819 | ||
820 | 820 | @Callable(i) | |
821 | 821 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
822 | 822 | then throw("Permission denied") | |
823 | 823 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
824 | 824 | then throw("Already initialized") | |
825 | 825 | else { | |
826 | 826 | let issuedAmount = MILLION6 | |
827 | 827 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
828 | 828 | let assetId = calculateAssetId(issue) | |
829 | 829 | [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)] | |
830 | 830 | } | |
831 | 831 | ||
832 | 832 | ||
833 | 833 | ||
834 | 834 | @Callable(i) | |
835 | 835 | func constructorV2 (rest2Addr) = if ((i.caller != this)) | |
836 | 836 | then throw("Permission denied") | |
837 | 837 | else [StringEntry(keyRest2Address(), rest2Addr)] | |
838 | 838 | ||
839 | 839 | ||
840 | 840 | ||
841 | 841 | @Callable(i) | |
842 | 842 | func buyWlg (minToReceive) = { | |
843 | 843 | let prologResult = prolog2() | |
844 | 844 | if ((prologResult == prologResult)) | |
845 | 845 | then if ((size(i.payments) != 1)) | |
846 | 846 | then throw("exactly 1 payment must be attached") | |
847 | 847 | else { | |
848 | 848 | let pmt = i.payments[0] | |
849 | 849 | let usdtAmt = pmt.amount | |
850 | 850 | if (if (!(isDefined(pmt.assetId))) | |
851 | 851 | then true | |
852 | 852 | else (value(pmt.assetId) != usdtAssetId)) | |
853 | 853 | then throw("USDT payments only!") | |
854 | 854 | else { | |
855 | 855 | let caller = i.caller | |
856 | 856 | let addr = toString(caller) | |
857 | 857 | if ((MINSHOPPAYMENT > usdtAmt)) | |
858 | 858 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
859 | 859 | else { | |
860 | 860 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
861 | 861 | let curWlgAmount = curStats[ixWlgAmount] | |
862 | 862 | let wlgPrice = curStats[ixWlgPrice] | |
863 | 863 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
864 | 864 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
865 | 865 | let maxWlg = getSwapLimitWlgold(addr) | |
866 | 866 | if ((wlgAmount > maxWlg)) | |
867 | 867 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
868 | 868 | else if ((minToReceive > wlgAmount)) | |
869 | 869 | then throw("Price changed during operation, please try again") | |
870 | 870 | else { | |
871 | 871 | let profitAmount = (usdtAmt / 6) | |
872 | 872 | $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) | |
873 | 873 | } | |
874 | 874 | } | |
875 | 875 | } | |
876 | 876 | } | |
877 | 877 | else throw("Strict value is not equal to itself.") | |
878 | 878 | } | |
879 | 879 | ||
880 | 880 | ||
881 | 881 | ||
882 | 882 | @Callable(i) | |
883 | 883 | func buyWlgREADONLY (address,usdtAmt) = { | |
884 | 884 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
885 | 885 | let wlgPrice = curStats[ixWlgPrice] | |
886 | 886 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
887 | 887 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
888 | 888 | let maxWlg = getSwapLimitWlgold(address) | |
889 | 889 | let maxUsdt = fraction(maxWlg, buyPrice, MULT8) | |
890 | 890 | let profitAmount = (usdtAmt / 6) | |
891 | 891 | $Tuple2(nil, [wlgAmount, MINSHOPPAYMENT, maxUsdt, profitAmount]) | |
892 | 892 | } | |
893 | 893 | ||
894 | 894 | ||
895 | 895 | ||
896 | 896 | @Callable(i) | |
897 | 897 | func sellWlg (minAmount) = { | |
898 | 898 | let prologResult = prolog2() | |
899 | 899 | if ((prologResult == prologResult)) | |
900 | 900 | then if ((size(i.payments) != 1)) | |
901 | 901 | then throw("exactly 1 payment must be attached") | |
902 | 902 | else { | |
903 | 903 | let pmt = i.payments[0] | |
904 | 904 | let wlgAmt = pmt.amount | |
905 | 905 | let caller = i.caller | |
906 | 906 | let addr = toString(caller) | |
907 | 907 | let maxWlg = getSwapLimitWlgold(addr) | |
908 | 908 | if ((wlgAmt > maxWlg)) | |
909 | 909 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
910 | 910 | else if (if (!(isDefined(pmt.assetId))) | |
911 | 911 | then true | |
912 | 912 | else (value(pmt.assetId) != wlgAssetId)) | |
913 | 913 | then throw("WLGOLD payments only!") | |
914 | 914 | else { | |
915 | 915 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
916 | 916 | let curWlgAmount = curStats[ixWlgAmount] | |
917 | 917 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
918 | 918 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
919 | 919 | if ((MINSHOPPAYMENT > usdtAmt)) | |
920 | 920 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
921 | 921 | else if ((minAmount > usdtAmt)) | |
922 | 922 | then throw("Price changed during operation, please try again") | |
923 | 923 | else { | |
924 | 924 | let profitAmount = (usdtAmt / 5) | |
925 | 925 | $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) | |
926 | 926 | } | |
927 | 927 | } | |
928 | 928 | } | |
929 | 929 | else throw("Strict value is not equal to itself.") | |
930 | 930 | } | |
931 | 931 | ||
932 | 932 | ||
933 | 933 | ||
934 | 934 | @Callable(i) | |
935 | 935 | func sellWlgREADONLY (address,wlgAmt) = { | |
936 | 936 | let maxWlg = getSwapLimitWlgold(address) | |
937 | 937 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
938 | 938 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
939 | 939 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
940 | 940 | let minWlg = fraction(MINSHOPPAYMENT, MULT8, sellPrice) | |
941 | 941 | let profitAmount = (usdtAmt / 5) | |
942 | 942 | $Tuple2(nil, [usdtAmt, minWlg, maxWlg, profitAmount]) | |
943 | 943 | } | |
944 | 944 | ||
945 | 945 | ||
946 | 946 | ||
947 | 947 | @Callable(i) | |
948 | 948 | func claim () = { | |
949 | 949 | let prologResult = prolog2() | |
950 | 950 | if ((prologResult == prologResult)) | |
951 | 951 | then if ((size(i.payments) != 0)) | |
952 | 952 | then throw("No payments required") | |
953 | 953 | else { | |
954 | - | let $ | |
955 | - | let actions = $ | |
956 | - | let wlgClaimedAmount = $ | |
954 | + | let $t01652516594 = claimInternal2(toString(i.caller)) | |
955 | + | let actions = $t01652516594._1 | |
956 | + | let wlgClaimedAmount = $t01652516594._2 | |
957 | 957 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
958 | 958 | } | |
959 | 959 | else throw("Strict value is not equal to itself.") | |
960 | 960 | } | |
961 | 961 | ||
962 | 962 | ||
963 | 963 | ||
964 | 964 | @Callable(i) | |
965 | 965 | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
966 | 966 | then (i.caller != acresContract) | |
967 | 967 | else false) | |
968 | 968 | then (i.caller != acres2Contract) | |
969 | 969 | else false) | |
970 | 970 | then throw("Permission denied") | |
971 | 971 | else { | |
972 | - | let $ | |
973 | - | if (($ | |
972 | + | let $t01691416971 = claimInternal2(addr) | |
973 | + | if (($t01691416971 == $t01691416971)) | |
974 | 974 | then { | |
975 | - | let wlgClaimedAmount = $ | |
976 | - | let actions = $ | |
975 | + | let wlgClaimedAmount = $t01691416971._2 | |
976 | + | let actions = $t01691416971._1 | |
977 | 977 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
978 | 978 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
979 | 979 | else actions, wlgClaimedAmount) | |
980 | 980 | } | |
981 | 981 | else throw("Strict value is not equal to itself.") | |
982 | 982 | } | |
983 | 983 | ||
984 | 984 | ||
985 | 985 | ||
986 | 986 | @Callable(i) | |
987 | 987 | func onStakeUnstakeLandOld (addr) = if (if (if ((i.caller != stakingContract)) | |
988 | 988 | then (i.caller != acresContract) | |
989 | 989 | else false) | |
990 | 990 | then (i.caller != acres2Contract) | |
991 | 991 | else false) | |
992 | 992 | then throw("Permission denied") | |
993 | 993 | else { | |
994 | - | let $ | |
995 | - | if (($ | |
994 | + | let $t01735417410 = claimInternal(addr) | |
995 | + | if (($t01735417410 == $t01735417410)) | |
996 | 996 | then { | |
997 | - | let wlgClaimedAmount = $ | |
998 | - | let actions = $ | |
997 | + | let wlgClaimedAmount = $t01735417410._2 | |
998 | + | let actions = $t01735417410._1 | |
999 | 999 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
1000 | 1000 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
1001 | 1001 | else nil, wlgClaimedAmount) | |
1002 | 1002 | } | |
1003 | 1003 | else throw("Strict value is not equal to itself.") | |
1004 | 1004 | } | |
1005 | 1005 | ||
1006 | 1006 | ||
1007 | 1007 | ||
1008 | 1008 | @Callable(i) | |
1009 | 1009 | func burnWlgold (wlgAmt) = if (if ((i.caller != acres2Contract)) | |
1010 | 1010 | then (i.caller != marketContract) | |
1011 | 1011 | else false) | |
1012 | 1012 | then throw("Permission denied") | |
1013 | 1013 | else { | |
1014 | 1014 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
1015 | 1015 | if ((wlgAmt > curStats[ixWlgWlg])) | |
1016 | 1016 | then throw(((("Only " + fixedPoint(curStats[ixWlgWlg], 8)) + " WLGOLD left on contract, can't burn ") + fixedPoint(wlgAmt, 8))) | |
1017 | 1017 | else { | |
1018 | 1018 | let wlgAmountLeft = (curStats[ixWlgAmount] - wlgAmt) | |
1019 | 1019 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, wlgAmountLeft)], wlgAmountLeft) | |
1020 | 1020 | } | |
1021 | 1021 | } | |
1022 | 1022 | ||
1023 | 1023 | ||
1024 | 1024 | ||
1025 | 1025 | @Callable(i) | |
1026 | 1026 | func betForTicket (bet) = { | |
1027 | 1027 | let prologResult = prolog2() | |
1028 | 1028 | if ((prologResult == prologResult)) | |
1029 | 1029 | then if ((size(i.payments) != 0)) | |
1030 | 1030 | then throw("No payments required") | |
1031 | 1031 | else { | |
1032 | 1032 | let addr = toString(i.caller) | |
1033 | 1033 | let drawWeek = ((height / WEEK_BLOCKS) - 1) | |
1034 | 1034 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
1035 | 1035 | let weekTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
1036 | 1036 | if (if ((userTickets > 0)) | |
1037 | 1037 | then (weekTickets > 0) | |
1038 | 1038 | else false) | |
1039 | 1039 | then throw("Please open the chest first") | |
1040 | 1040 | else if (((bet / 4) != 0)) | |
1041 | 1041 | then throw("Invalid bet: should be 0..3") | |
1042 | 1042 | else { | |
1043 | 1043 | let moment = (height % DAY_BLOCKS) | |
1044 | 1044 | if ((moment > (DAY_BLOCKS - 3))) | |
1045 | 1045 | then throw((("Cannot bet: the day is almost ended, please wait " + toString((DAY_BLOCKS - moment))) + " blocks")) | |
1046 | 1046 | else { | |
1047 | 1047 | let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(addr)), 0) | |
1048 | 1048 | if ((ACRES_FOR_BET > stakedAcres)) | |
1049 | 1049 | then throw((("You need to stake at least " + fixedPoint(ACRES_FOR_BET, 8)) + " ACRES to bet")) | |
1050 | 1050 | else { | |
1051 | 1051 | let tomorrow = ((height / DAY_BLOCKS) + 1) | |
1052 | 1052 | let betKey = keyUserBet(addr) | |
1053 | 1053 | let oldUserBetStr = getString(betKey) | |
1054 | 1054 | let newBetEntry = StringEntry(betKey, ((toString(tomorrow) + "_") + toString(bet))) | |
1055 | 1055 | if (isDefined(oldUserBetStr)) | |
1056 | 1056 | then { | |
1057 | 1057 | let userBet = value(oldUserBetStr) | |
1058 | 1058 | if ((split(userBet, "_")[0] == toString(tomorrow))) | |
1059 | 1059 | then throw("You already bet for tomorrow") | |
1060 | 1060 | else { | |
1061 | 1061 | let r = claimTicketsInternal(addr, userBet) | |
1062 | 1062 | $Tuple2((r._1 :+ newBetEntry), r._2) | |
1063 | 1063 | } | |
1064 | 1064 | } | |
1065 | 1065 | else $Tuple2([newBetEntry], 0) | |
1066 | 1066 | } | |
1067 | 1067 | } | |
1068 | 1068 | } | |
1069 | 1069 | } | |
1070 | 1070 | else throw("Strict value is not equal to itself.") | |
1071 | 1071 | } | |
1072 | 1072 | ||
1073 | 1073 | ||
1074 | 1074 | ||
1075 | 1075 | @Callable(i) | |
1076 | 1076 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
1077 | 1077 | then throw("Permission denied") | |
1078 | 1078 | else { | |
1079 | - | let $ | |
1080 | - | let actions = $ | |
1081 | - | let xp = $ | |
1079 | + | let $t02004220085 = takeXpInternal(addr, 0) | |
1080 | + | let actions = $t02004220085._1 | |
1081 | + | let xp = $t02004220085._2 | |
1082 | 1082 | $Tuple2(actions, xp) | |
1083 | 1083 | } | |
1084 | 1084 | ||
1085 | 1085 | ||
1086 | 1086 | ||
1087 | 1087 | @Callable(i) | |
1088 | 1088 | func checkWlgXpREADONLY (addr) = { | |
1089 | - | let $ | |
1090 | - | let ignored = $ | |
1091 | - | let deltaXP = $ | |
1089 | + | let $t02016220210 = takeXpInternal(addr, 0) | |
1090 | + | let ignored = $t02016220210._1 | |
1091 | + | let deltaXP = $t02016220210._2 | |
1092 | 1092 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
1093 | 1093 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
1094 | 1094 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
1095 | 1095 | } | |
1096 | 1096 | ||
1097 | 1097 | ||
1098 | 1098 | ||
1099 | 1099 | @Callable(i) | |
1100 | 1100 | func setNumPrizes (numPrizes) = if ((i.caller != this)) | |
1101 | 1101 | then throw("Permission denied") | |
1102 | 1102 | else { | |
1103 | 1103 | let week = (height / WEEK_BLOCKS) | |
1104 | 1104 | $Tuple2([IntegerEntry(keyNumPrizes2Draw(week), numPrizes)], numPrizes) | |
1105 | 1105 | } | |
1106 | 1106 | ||
1107 | 1107 | ||
1108 | 1108 | ||
1109 | 1109 | @Callable(i) | |
1110 | 1110 | func openChest () = { | |
1111 | 1111 | let prologResult = prolog2() | |
1112 | 1112 | if ((prologResult == prologResult)) | |
1113 | 1113 | then if ((size(i.payments) != 0)) | |
1114 | 1114 | then throw("No payments required") | |
1115 | 1115 | else { | |
1116 | 1116 | let week = (height / WEEK_BLOCKS) | |
1117 | 1117 | let drawWeek = (week - 1) | |
1118 | 1118 | let addr = toString(i.caller) | |
1119 | 1119 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
1120 | 1120 | if ((0 >= userTickets)) | |
1121 | 1121 | then throw("No gems to open the chest") | |
1122 | 1122 | else { | |
1123 | 1123 | let totalTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
1124 | 1124 | if ((0 >= totalTickets)) | |
1125 | 1125 | then throw("No participants") | |
1126 | 1126 | else { | |
1127 | 1127 | let lastWeekNumTx = valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(addr)), "42_DEFAULT") | |
1128 | 1128 | openChestInternal(addr, week, userTickets, totalTickets, lastWeekNumTx) | |
1129 | 1129 | } | |
1130 | 1130 | } | |
1131 | 1131 | } | |
1132 | 1132 | else throw("Strict value is not equal to itself.") | |
1133 | 1133 | } | |
1134 | 1134 | ||
1135 | 1135 | ||
1136 | 1136 | ||
1137 | 1137 | @Callable(i) | |
1138 | 1138 | func addGemsFor (addr,deltaTickets) = if ((i.caller != this)) | |
1139 | 1139 | then throw("Permission denied") | |
1140 | 1140 | else { | |
1141 | 1141 | let week = (height / WEEK_BLOCKS) | |
1142 | 1142 | let ticketsKey = keyUserWeekTickets(addr, week) | |
1143 | 1143 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
1144 | 1144 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
1145 | 1145 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
1146 | 1146 | let updateParticipants = if (if ((oldTickets == 0)) | |
1147 | 1147 | then (deltaTickets == 1) | |
1148 | 1148 | else false) | |
1149 | 1149 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
1150 | 1150 | else nil | |
1151 | 1151 | $Tuple2(((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
1152 | 1152 | } | |
1153 | 1153 | ||
1154 | 1154 |
github/deemru/w8io/169f3d6 121.61 ms ◑