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