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