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