tx · 9sW4poLPS2SUg3hUuqhsvvUkWTCuEyL86tfGieGt26xR 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01800000 Waves 2024.09.13 17:17 [3281975] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "9sW4poLPS2SUg3hUuqhsvvUkWTCuEyL86tfGieGt26xR", "fee": 1800000, "feeAssetId": null, "timestamp": 1726237122663, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "3CCdqnDntK3JnVeY5XBC7XmbFQstXcut2N9p2E2SLPovQWT1Qu6HcEA3q9BuoBvKTqbwGGyo2aApgirpwe3ddeRA" ], "script": "base64:BgIsCAISBgoECAgICBIDCgEIEgMKAQESAwoBARIAEgMKAQgSABIDCgEIEgMKAQhyAApEQVlfTUlMTElTAIC4mSkABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgAQYWNyZXMyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hh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HJhY3QFA25pbAULdXNkdEFzc2V0SWQAAAQNd2xnQW1vdW50TGVmdAkAZQIJAJEDAgUIY3VyU3RhdHMFC2l4V2xnQW1vdW50BQZ3bGdBbXQJAJQKAgkAzAgCCQEEQnVybgIFCndsZ0Fzc2V0SWQFBndsZ0FtdAkAzAgCCQEMSW50ZWdlckVudHJ5AgUSd2xnSXNzdWVkQW1vdW50S2V5BQ13bGdBbW91bnRMZWZ0BQNuaWwFDXdsZ0Ftb3VudExlZnQBaQEJdGFrZVdsZ1hwAQRhZGRyAwkBAiE9AggFAWkGY2FsbGVyBQ9zdGFraW5nQ29udHJhY3QJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQNJHQwMTM0OTMxMzUzNgkBDnRha2VYcEludGVybmFsAgUEYWRkcgAABAdhY3Rpb25zCAUNJHQwMTM0OTMxMzUzNgJfMQQCeHAIBQ0kdDAxMzQ5MzEzNTM2Al8yCQCUCgIFB2FjdGlvbnMFAnhwAWkBEmNoZWNrV2xnWHBSRUFET05MWQEEYWRkcgQNJHQwMTM2MTMxMzY2MQkBDnRha2VYcEludGVybmFsAgUEYWRkcgAABAdpZ25vcmVkCAUNJHQwMTM2MTMxMzY2MQJfMQQHZGVsdGFYUAgFDSR0MDEzNjEzMTM2NjECXzIEBW5ld1hQCQBkAgkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QJAQlrZXlVc2VyWFABBQRhZGRyAAAFB2RlbHRhWFAECWx2bFBvaW50cwkBB2xldmVsVXACCQELdmFsdWVPckVsc2UCCQCaCAIFD3N0YWtpbmdDb250cmFjdAkBDGtleVVzZXJMZXZlbAEFBGFkZHIAAAUFbmV3WFAJAJQKAgUDbmlsCQDNCAIFCWx2bFBvaW50cwUFbmV3WFAAoWpJFw==", "height": 3281975, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CGFVXtKMtfaVtUDrytrDBEfPjcvyTazp1nAyZ4YodnRG Next: 2iY66FT7uJhpCGPFWL6UCNkYqzXNLYqVNg3x32zBUakJ Diff:
Old | New | Differences | |
---|---|---|---|
415 | 415 | let issueTime = curStats[ixWlgIssueTime] | |
416 | 416 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
417 | 417 | let teamAmount = curStats[ixWlgTeamAmAvailNow] | |
418 | + | let teamTransfer = if ((teamAmount > 0)) | |
419 | + | then [ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId)] | |
420 | + | else nil | |
418 | 421 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
419 | 422 | let actAmount = curStats[ixWlgActAmAvailNow] | |
423 | + | let actTransfer = if ((actAmount > 0)) | |
424 | + | then [ScriptTransfer(restContract, actAmount, wlgAssetId)] | |
425 | + | else nil | |
420 | 426 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
421 | 427 | let userKey = keyStakersAmountPaidUser(addr) | |
422 | 428 | let userTotal = curStats[ixWlgUserAmAvailNow] | |
423 | - | $Tuple2([ | |
429 | + | $Tuple2(((teamTransfer ++ actTransfer) ++ [IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[ixWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(userTimeKey, userEffTime)]), userAmount) | |
424 | 430 | } | |
425 | 431 | } | |
426 | 432 | ||
564 | 570 | else false) | |
565 | 571 | then throw("Permission denied") | |
566 | 572 | else { | |
567 | - | let $t01098111035 = claimInternal2(addr) | |
568 | - | let actions = $t01098111035._1 | |
569 | - | let wlgClaimedAmount = $t01098111035._2 | |
570 | - | $Tuple2((actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)), wlgClaimedAmount) | |
573 | + | let $t01111211166 = claimInternal2(addr) | |
574 | + | let actions = $t01111211166._1 | |
575 | + | let wlgClaimedAmount = $t01111211166._2 | |
576 | + | $Tuple2(if ((wlgClaimedAmount > 0)) | |
577 | + | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
578 | + | else actions, wlgClaimedAmount) | |
571 | 579 | } | |
572 | 580 | ||
573 | 581 | ||
588 | 596 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
589 | 597 | then throw("Permission denied") | |
590 | 598 | else { | |
591 | - | let $ | |
592 | - | let actions = $ | |
593 | - | let xp = $ | |
599 | + | let $t01349313536 = takeXpInternal(addr, 0) | |
600 | + | let actions = $t01349313536._1 | |
601 | + | let xp = $t01349313536._2 | |
594 | 602 | $Tuple2(actions, xp) | |
595 | 603 | } | |
596 | 604 | ||
598 | 606 | ||
599 | 607 | @Callable(i) | |
600 | 608 | func checkWlgXpREADONLY (addr) = { | |
601 | - | let $ | |
602 | - | let ignored = $ | |
603 | - | let deltaXP = $ | |
609 | + | let $t01361313661 = takeXpInternal(addr, 0) | |
610 | + | let ignored = $t01361313661._1 | |
611 | + | let deltaXP = $t01361313661._2 | |
604 | 612 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
605 | 613 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
606 | 614 | $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 MILL6 = 100000000000000 | |
182 | 182 | ||
183 | 183 | let TEAM_SHARE = 200000 | |
184 | 184 | ||
185 | 185 | let ACTIVITY_SHARE = 100000 | |
186 | 186 | ||
187 | 187 | let PLAYER_SHARE = 400000 | |
188 | 188 | ||
189 | 189 | let YEAR_MILLIS = 31557600000 | |
190 | 190 | ||
191 | 191 | let chn = take(drop(this.bytes, 1), 1) | |
192 | 192 | ||
193 | 193 | let USDT_TVL_CORR = match chn { | |
194 | 194 | case _ => | |
195 | 195 | if ((base58'2W' == $match0)) | |
196 | 196 | then 1208630000 | |
197 | 197 | else if ((base58'2T' == $match0)) | |
198 | 198 | then 0 | |
199 | 199 | else throw("Unknown chain") | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | let teamAdrKey = "teamAddr" | |
203 | 203 | ||
204 | 204 | let lastTeamTimKey = "lastClaimedTime_team" | |
205 | 205 | ||
206 | 206 | let teamAmtLeftKey = "teamAmountLeft" | |
207 | 207 | ||
208 | 208 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
209 | 209 | ||
210 | 210 | let actAmtLeftKey = "activitiesAmountLeft" | |
211 | 211 | ||
212 | 212 | let stakersAmtLeftKey = "stakersAmountLeft" | |
213 | 213 | ||
214 | 214 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func distrByPeriod (period) = fraction(MILL6, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | let wlgIssueTimKey = "wlg_issueTime" | |
221 | 221 | ||
222 | 222 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
223 | 223 | ||
224 | 224 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
225 | 225 | ||
226 | 226 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
230 | 230 | ||
231 | 231 | let dapp2Rest = 0 | |
232 | 232 | ||
233 | 233 | let dapp2Staking = 1 | |
234 | 234 | ||
235 | 235 | let dapp2Wlg = 2 | |
236 | 236 | ||
237 | 237 | let dapp2Puzzle = 3 | |
238 | 238 | ||
239 | 239 | let dapp2InvestFund = 4 | |
240 | 240 | ||
241 | 241 | let levels = [10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
242 | 242 | ||
243 | 243 | func getLevelByAcres (acres) = { | |
244 | 244 | let acr = (acres / M8_) | |
245 | 245 | func checker (acc,item) = if ((item > acr)) | |
246 | 246 | then acc | |
247 | 247 | else (acc + 1) | |
248 | 248 | ||
249 | 249 | let idx = { | |
250 | 250 | let $l = levels | |
251 | 251 | let $s = size($l) | |
252 | 252 | let $acc0 = 0 | |
253 | 253 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
254 | 254 | then $a | |
255 | 255 | else checker($a, $l[$i]) | |
256 | 256 | ||
257 | 257 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
258 | 258 | then $a | |
259 | 259 | else throw("List size exceeds 10") | |
260 | 260 | ||
261 | 261 | $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) | |
262 | 262 | } | |
263 | 263 | (idx + 1) | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func getFarmingPowers (userAddrStrOrEmpty,stakingContract) = { | |
271 | 271 | let totalAcres = valueOrElse(getInteger(stakingContract, acresStakdTotalKey), 0) | |
272 | 272 | let totalFP = getFarmingPowerByAcres(totalAcres) | |
273 | 273 | let userAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
274 | 274 | let userFP = getFarmingPowerByAcres(userAcres) | |
275 | 275 | [totalFP, userFP] | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | let idxTotalFP = 0 | |
280 | 280 | ||
281 | 281 | let idxUserFP = 1 | |
282 | 282 | ||
283 | 283 | let ixWlgAmount = 0 | |
284 | 284 | ||
285 | 285 | let ixWlgPrice = 1 | |
286 | 286 | ||
287 | 287 | let ixWlgFunds = 2 | |
288 | 288 | ||
289 | 289 | let ixWlgIssueTime = 6 | |
290 | 290 | ||
291 | 291 | let ixWlgTeamAmLeft = 9 | |
292 | 292 | ||
293 | 293 | let ixWlgTeamAmAvailNow = 10 | |
294 | 294 | ||
295 | 295 | let ixWlgActAmLeft = 13 | |
296 | 296 | ||
297 | 297 | let ixWlgActAmAvailNow = 14 | |
298 | 298 | ||
299 | 299 | let ixWlgAmLeftTotal = 17 | |
300 | 300 | ||
301 | 301 | let ixWlgUserAmAvailNow = 21 | |
302 | 302 | ||
303 | 303 | let ixWlgEffUserTime = 22 | |
304 | 304 | ||
305 | 305 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
306 | 306 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
307 | 307 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
308 | 308 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
309 | 309 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
310 | 310 | let investFndContract = contracts[dapp2InvestFund] | |
311 | 311 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
312 | 312 | let totalFundsUsd = (wlgUsd + investFundTotal) | |
313 | 313 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
314 | 314 | let now = lastBlock.timestamp | |
315 | 315 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
316 | 316 | let teamTotal = fraction(MILL6, TEAM_SHARE, M6_) | |
317 | 317 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
318 | 318 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
319 | 319 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
320 | 320 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
321 | 321 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
322 | 322 | let actTotal = fraction(MILL6, ACTIVITY_SHARE, M6_) | |
323 | 323 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
324 | 324 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
325 | 325 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
326 | 326 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
327 | 327 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
328 | 328 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
329 | 329 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
330 | 330 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
331 | 331 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
332 | 332 | let curPeriodDistribution = distrByPeriod(curPeriod) | |
333 | 333 | let $t079142 = if ((lastUserPeriod == curPeriod)) | |
334 | 334 | then { | |
335 | 335 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
336 | 336 | let effTime = nowLimited | |
337 | 337 | $Tuple2(a0, effTime) | |
338 | 338 | } | |
339 | 339 | else if ((lastUserPeriod == (curPeriod - 1))) | |
340 | 340 | then { | |
341 | 341 | let a1 = fraction(distrByPeriod((curPeriod - 1)), ((issueTime + (YEAR_MILLIS * curPeriod)) - lastUserTime), YEAR_MILLIS) | |
342 | 342 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS) | |
343 | 343 | let avail = (a1 + a0) | |
344 | 344 | let effTime = if ((a1 >= avail)) | |
345 | 345 | then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 1)))) | |
346 | 346 | else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, (avail - a1), curPeriodDistribution)) | |
347 | 347 | $Tuple2(avail, effTime) | |
348 | 348 | } | |
349 | 349 | else { | |
350 | 350 | let a2 = fraction(distrByPeriod((curPeriod - 2)), ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) - lastUserTime), YEAR_MILLIS) | |
351 | 351 | let a1 = distrByPeriod((curPeriod - 1)) | |
352 | 352 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS) | |
353 | 353 | let avail = ((a2 + a1) + a0) | |
354 | 354 | let effTime = if ((a2 >= avail)) | |
355 | 355 | then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 2)))) | |
356 | 356 | else if (((a2 + a1) >= avail)) | |
357 | 357 | then ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) + fraction(YEAR_MILLIS, (avail - a2), distrByPeriod((curPeriod - 1)))) | |
358 | 358 | else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, ((avail - a2) - a1), curPeriodDistribution)) | |
359 | 359 | $Tuple2(avail, effTime) | |
360 | 360 | } | |
361 | 361 | let userAvailable = $t079142._1 | |
362 | 362 | let effLastTime = $t079142._2 | |
363 | 363 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
364 | 364 | let unrobbedUser = if ((eff[idxTotalFP] != 0)) | |
365 | 365 | then fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
366 | 366 | else 0 | |
367 | 367 | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORR), M8_, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, unrobbedUser, effLastTime] | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | let net = take(drop(this.bytes, 1), 1) | |
372 | 372 | ||
373 | 373 | let defaultRest2AddressStr = match net { | |
374 | 374 | case _ => | |
375 | 375 | if ((base58'2W' == $match0)) | |
376 | 376 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
377 | 377 | else if ((base58'2T' == $match0)) | |
378 | 378 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
379 | 379 | else throw("Unknown chain") | |
380 | 380 | } | |
381 | 381 | ||
382 | 382 | let profitAddrKey = "profitAddr" | |
383 | 383 | ||
384 | 384 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
385 | 385 | ||
386 | 386 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
390 | 390 | ||
391 | 391 | let acres2Contract = addressFromStringValue(acres2AddressStr) | |
392 | 392 | ||
393 | 393 | func prolog2 () = asInt(reentrantInvoke(acres2Contract, "saveLastTx", nil, nil)) | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func getSwapLimitWlg (addr) = { | |
397 | 397 | let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0) | |
398 | 398 | let now = lastBlock.timestamp | |
399 | 399 | if ((arbitrageDelay > (now - lastTime))) | |
400 | 400 | then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min")) | |
401 | 401 | else valueOrElse(getInteger(acres2Contract, keyAcresStakedAmountByUser(addr)), 0) | |
402 | 402 | } | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | func claimInternal2 (addr) = { | |
406 | 406 | let caller = addressFromStringValue(addr) | |
407 | 407 | let curStats = getWlgStats2(addr, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
408 | 408 | let userTimeKey = keyLastClaimTimeByUser(addr) | |
409 | 409 | let lastUserTime = valueOrElse(getInteger(userTimeKey), 0) | |
410 | 410 | let userEffTime = curStats[ixWlgEffUserTime] | |
411 | 411 | if ((lastUserTime == userEffTime)) | |
412 | 412 | then $Tuple2(nil, 0) | |
413 | 413 | else { | |
414 | 414 | let now = lastBlock.timestamp | |
415 | 415 | let issueTime = curStats[ixWlgIssueTime] | |
416 | 416 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
417 | 417 | let teamAmount = curStats[ixWlgTeamAmAvailNow] | |
418 | + | let teamTransfer = if ((teamAmount > 0)) | |
419 | + | then [ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId)] | |
420 | + | else nil | |
418 | 421 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
419 | 422 | let actAmount = curStats[ixWlgActAmAvailNow] | |
423 | + | let actTransfer = if ((actAmount > 0)) | |
424 | + | then [ScriptTransfer(restContract, actAmount, wlgAssetId)] | |
425 | + | else nil | |
420 | 426 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
421 | 427 | let userKey = keyStakersAmountPaidUser(addr) | |
422 | 428 | let userTotal = curStats[ixWlgUserAmAvailNow] | |
423 | - | $Tuple2([ | |
429 | + | $Tuple2(((teamTransfer ++ actTransfer) ++ [IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[ixWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(userTimeKey, userEffTime)]), userAmount) | |
424 | 430 | } | |
425 | 431 | } | |
426 | 432 | ||
427 | 433 | ||
428 | 434 | func takeXpInternal (addr,delta) = { | |
429 | 435 | let now = lastBlock.timestamp | |
430 | 436 | let timeKey = keyWlgStakedTimeByUser(addr) | |
431 | 437 | let amountKey = keyWlgStakedAmountByUser(addr) | |
432 | 438 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
433 | 439 | let oldUser = valueOrElse(getInteger(amountKey), 0) | |
434 | 440 | let oldTotal = valueOrElse(getInteger(wlgStakedTotalKey), 0) | |
435 | 441 | let xp = fraction(fraction(xpWlg, oldUser, wlgBaseAmountXp), (lastTime - now), DAYMILLIS) | |
436 | 442 | $Tuple3([IntegerEntry(timeKey, now), IntegerEntry(amountKey, (oldUser + delta)), IntegerEntry(wlgStakedTotalKey, (oldTotal + delta))], xp, oldUser) | |
437 | 443 | } | |
438 | 444 | ||
439 | 445 | ||
440 | 446 | @Callable(i) | |
441 | 447 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
442 | 448 | then throw("Permission denied") | |
443 | 449 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
444 | 450 | then throw("Already initialized") | |
445 | 451 | else { | |
446 | 452 | let issuedAmount = MILLION6 | |
447 | 453 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
448 | 454 | let assetId = calculateAssetId(issue) | |
449 | 455 | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)] | |
450 | 456 | } | |
451 | 457 | ||
452 | 458 | ||
453 | 459 | ||
454 | 460 | @Callable(i) | |
455 | 461 | func constructorV2 (rest2Addr) = if ((i.caller != this)) | |
456 | 462 | then throw("Permission denied") | |
457 | 463 | else [StringEntry(keyRest2Address(), rest2Addr)] | |
458 | 464 | ||
459 | 465 | ||
460 | 466 | ||
461 | 467 | @Callable(i) | |
462 | 468 | func buyWlg (minAmount) = { | |
463 | 469 | let prologResult = prolog2() | |
464 | 470 | if ((prologResult == prologResult)) | |
465 | 471 | then if ((size(i.payments) != 1)) | |
466 | 472 | then throw("exactly 1 payment must be attached") | |
467 | 473 | else { | |
468 | 474 | let pmt = i.payments[0] | |
469 | 475 | let usdtAmt = pmt.amount | |
470 | 476 | if (if (!(isDefined(pmt.assetId))) | |
471 | 477 | then true | |
472 | 478 | else (value(pmt.assetId) != usdtAssetId)) | |
473 | 479 | then throw("USDT payments only!") | |
474 | 480 | else { | |
475 | 481 | let caller = i.caller | |
476 | 482 | let addr = toString(caller) | |
477 | 483 | if ((MINSHOPPAYMENT > usdtAmt)) | |
478 | 484 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
479 | 485 | else { | |
480 | 486 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
481 | 487 | let curWlgAmount = curStats[ixWlgAmount] | |
482 | 488 | let fundsUsd = curStats[ixWlgFunds] | |
483 | 489 | let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount) | |
484 | 490 | let buyPrice = fraction(wlgPrice, 6, 5) | |
485 | 491 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
486 | 492 | let maxWlg = getSwapLimitWlg(addr) | |
487 | 493 | if ((wlgAmount > maxWlg)) | |
488 | 494 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
489 | 495 | else if ((minAmount > wlgAmount)) | |
490 | 496 | then throw("Price changed during operation, please try again") | |
491 | 497 | else { | |
492 | 498 | let profitAmount = (usdtAmt / 6) | |
493 | 499 | let deltaFunds = (usdtAmt - profitAmount) | |
494 | 500 | let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd) | |
495 | 501 | $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult) | |
496 | 502 | } | |
497 | 503 | } | |
498 | 504 | } | |
499 | 505 | } | |
500 | 506 | else throw("Strict value is not equal to itself.") | |
501 | 507 | } | |
502 | 508 | ||
503 | 509 | ||
504 | 510 | ||
505 | 511 | @Callable(i) | |
506 | 512 | func sellWlg (minAmount) = { | |
507 | 513 | let prologResult = prolog2() | |
508 | 514 | if ((prologResult == prologResult)) | |
509 | 515 | then if ((size(i.payments) != 1)) | |
510 | 516 | then throw("exactly 1 payment must be attached") | |
511 | 517 | else { | |
512 | 518 | let pmt = i.payments[0] | |
513 | 519 | let wlgAmt = pmt.amount | |
514 | 520 | let caller = i.caller | |
515 | 521 | let addr = toString(caller) | |
516 | 522 | let maxWlg = getSwapLimitWlg(addr) | |
517 | 523 | if ((wlgAmt > maxWlg)) | |
518 | 524 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
519 | 525 | else if (if (!(isDefined(pmt.assetId))) | |
520 | 526 | then true | |
521 | 527 | else (value(pmt.assetId) != wlgAssetId)) | |
522 | 528 | then throw("WLGOLD payments only!") | |
523 | 529 | else { | |
524 | 530 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
525 | 531 | let curWlgAmount = curStats[ixWlgAmount] | |
526 | 532 | let sellPrice = fraction(curStats[ixWlgPrice], 4, 5) | |
527 | 533 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
528 | 534 | if ((MINSHOPPAYMENT > usdtAmt)) | |
529 | 535 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
530 | 536 | else if ((minAmount > usdtAmt)) | |
531 | 537 | then throw("Price changed during operation, please try again") | |
532 | 538 | else { | |
533 | 539 | let profitAmount = (usdtAmt / 4) | |
534 | 540 | $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) | |
535 | 541 | } | |
536 | 542 | } | |
537 | 543 | } | |
538 | 544 | else throw("Strict value is not equal to itself.") | |
539 | 545 | } | |
540 | 546 | ||
541 | 547 | ||
542 | 548 | ||
543 | 549 | @Callable(i) | |
544 | 550 | func claim () = { | |
545 | 551 | let prologResult = prolog2() | |
546 | 552 | if ((prologResult == prologResult)) | |
547 | 553 | then if ((size(i.payments) != 0)) | |
548 | 554 | then throw("No payments required") | |
549 | 555 | else { | |
550 | 556 | let r = claimInternal2(toString(i.caller)) | |
551 | 557 | let actions = r._1 | |
552 | 558 | $Tuple2((actions :+ ScriptTransfer(i.caller, r._2, wlgAssetId)), prologResult) | |
553 | 559 | } | |
554 | 560 | else throw("Strict value is not equal to itself.") | |
555 | 561 | } | |
556 | 562 | ||
557 | 563 | ||
558 | 564 | ||
559 | 565 | @Callable(i) | |
560 | 566 | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
561 | 567 | then (i.caller != acresContract) | |
562 | 568 | else false) | |
563 | 569 | then (i.caller != acres2Contract) | |
564 | 570 | else false) | |
565 | 571 | then throw("Permission denied") | |
566 | 572 | else { | |
567 | - | let $t01098111035 = claimInternal2(addr) | |
568 | - | let actions = $t01098111035._1 | |
569 | - | let wlgClaimedAmount = $t01098111035._2 | |
570 | - | $Tuple2((actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)), wlgClaimedAmount) | |
573 | + | let $t01111211166 = claimInternal2(addr) | |
574 | + | let actions = $t01111211166._1 | |
575 | + | let wlgClaimedAmount = $t01111211166._2 | |
576 | + | $Tuple2(if ((wlgClaimedAmount > 0)) | |
577 | + | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
578 | + | else actions, wlgClaimedAmount) | |
571 | 579 | } | |
572 | 580 | ||
573 | 581 | ||
574 | 582 | ||
575 | 583 | @Callable(i) | |
576 | 584 | func burnWlgold () = if ((i.caller != acres2Contract)) | |
577 | 585 | then throw("Permission denied") | |
578 | 586 | else { | |
579 | 587 | let wlgAmt = i.payments[0].amount | |
580 | 588 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
581 | 589 | let wlgAmountLeft = (curStats[ixWlgAmount] - wlgAmt) | |
582 | 590 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, wlgAmountLeft)], wlgAmountLeft) | |
583 | 591 | } | |
584 | 592 | ||
585 | 593 | ||
586 | 594 | ||
587 | 595 | @Callable(i) | |
588 | 596 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
589 | 597 | then throw("Permission denied") | |
590 | 598 | else { | |
591 | - | let $ | |
592 | - | let actions = $ | |
593 | - | let xp = $ | |
599 | + | let $t01349313536 = takeXpInternal(addr, 0) | |
600 | + | let actions = $t01349313536._1 | |
601 | + | let xp = $t01349313536._2 | |
594 | 602 | $Tuple2(actions, xp) | |
595 | 603 | } | |
596 | 604 | ||
597 | 605 | ||
598 | 606 | ||
599 | 607 | @Callable(i) | |
600 | 608 | func checkWlgXpREADONLY (addr) = { | |
601 | - | let $ | |
602 | - | let ignored = $ | |
603 | - | let deltaXP = $ | |
609 | + | let $t01361313661 = takeXpInternal(addr, 0) | |
610 | + | let ignored = $t01361313661._1 | |
611 | + | let deltaXP = $t01361313661._2 | |
604 | 612 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
605 | 613 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
606 | 614 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
607 | 615 | } | |
608 | 616 | ||
609 | 617 |
github/deemru/w8io/026f985 60.92 ms ◑