tx · AMidN9DMzPGBuZnBsfkgFLxPYRQ1mycgQu1FMiAYcdTk 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv: -0.02000000 Waves 2024.12.08 19:05 [3405869] smart account 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv > SELF 0.00000000 Waves
{ "type": 13, "id": "AMidN9DMzPGBuZnBsfkgFLxPYRQ1mycgQu1FMiAYcdTk", "fee": 2000000, "feeAssetId": null, "timestamp": 1733673915330, "version": 2, "chainId": 84, "sender": "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv", "senderPublicKey": "2fNSk5gmWbXBDTkSYSKd66xSgVvAYzrJnP9YSAFNvTwC", "proofs": [ "3mPgje8zEARSdqUqPDVo8pkBc2SWyGNceQ25mxAkSCvneg4FBcCDTVhKFpZRpaFcnxViiwhwLPnHSbEq7nGxjr7i" ], "script": "base64:BgIlCAISAwoBGBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCIIBAANTRVACAl9fAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQAKREFZX0JMT0NLUwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACgCwMJAAACAQFUBQckbWF0Y2gwADwJAAIBAg1Vbmtub3duIGNoYWluAAtXRUVLX0JMT0NLUwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMADgTgMJAAACAQFUBQckbWF0Y2gwALQBCQACAQINVW5rbm93biBjaGFpbgAKVlJGX09GRlNFVAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAAAAwkAAAIBAVQFByRtYXRjaDAAkPlFCQACAQINVW5rbm93biBjaGFpbgALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNb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XJBZGRyT3B0BAduZnRzS2V5CQETa2V5QXNzZXRJZHNCeVNlbGxlcgEFC3VzZXJBZGRyT3B0BAduZnRzU3RyCQELdmFsdWVPckVsc2UCCQCdCAIFDm1hcmtldENvbnRyYWN0BQduZnRzS2V5AgAJAJQKAgUDbmlsCQDMCAIJAKwCAgIUJXMlc19fdXNlclNhbGVOZnRzX18FB25mdHNTdHIFA25pbAFpARFvcmRlckluZm9SRUFET05MWQEKYXNzZXRJZE9wdAQFcHJpY2UJAQt2YWx1ZU9yRWxzZQIJAJoIAgUObWFya2V0Q29udHJhY3QJARFrZXlQcmljZUJ5QXNzZXRJZAEFCmFzc2V0SWRPcHQAAAQGc2VsbGVyCQELdmFsdWVPckVsc2UCCQCdCAIFDm1hcmtldENvbnRyYWN0CQESa2V5U2VsbGVyQnlBc3NldElkAQUKYXNzZXRJZE9wdAIACQCUCgIFA25pbAkAzAgCCQCsAgICFiVzJWRfX21hcmtldE5mdFByaWNlX18JAKQDAQUFcHJpY2UJAMwIAgkArAICAhclcyVzX19tYXJrZXROZnRTZWxsZXJfXwUGc2VsbGVyBQNuaWwAo/VdlQ==", "height": 3405869, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F5d59R2TiRxKNPrNtvWPi9ku8jADqj96cPAzWV3cGE96 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
70 | 70 | ||
71 | 71 | let IdxCfgInvestFundDapp = 5 | |
72 | 72 | ||
73 | + | let IdxCfgMarketDapp = 6 | |
74 | + | ||
73 | 75 | func keyRestCfg () = "%s__restConfig" | |
74 | 76 | ||
75 | 77 | ||
93 | 95 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
94 | 96 | ||
95 | 97 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
98 | + | ||
99 | + | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
96 | 100 | ||
97 | 101 | let oldAcresContractKey = "oldAcresContract" | |
98 | 102 | ||
141 | 145 | else (b + VRF_OFFSET) | |
142 | 146 | (toInt(value(value(blockInfoByHeight(h)).vrf)) % 4) | |
143 | 147 | } | |
148 | + | ||
149 | + | ||
150 | + | func keySellerByAssetId (assetId) = ("seller_" + assetId) | |
151 | + | ||
152 | + | ||
153 | + | func keyPriceByAssetId (assetId) = ("price_" + assetId) | |
144 | 154 | ||
145 | 155 | ||
146 | 156 | func keyAssetIdsBySeller (addr) = ("assetIds_" + addr) | |
549 | 559 | @Callable(i) | |
550 | 560 | func userOrdersREADONLY (userAddrOpt) = { | |
551 | 561 | let nftsKey = keyAssetIdsBySeller(userAddrOpt) | |
552 | - | let nftsStr = valueOrElse(getString(nftsKey), "") | |
562 | + | let nftsStr = valueOrElse(getString(marketContract, nftsKey), "") | |
553 | 563 | $Tuple2(nil, [("%s%s__userSaleNfts__" + nftsStr)]) | |
564 | + | } | |
565 | + | ||
566 | + | ||
567 | + | ||
568 | + | @Callable(i) | |
569 | + | func orderInfoREADONLY (assetIdOpt) = { | |
570 | + | let price = valueOrElse(getInteger(marketContract, keyPriceByAssetId(assetIdOpt)), 0) | |
571 | + | let seller = valueOrElse(getString(marketContract, keySellerByAssetId(assetIdOpt)), "") | |
572 | + | $Tuple2(nil, [("%s%d__marketNftPrice__" + toString(price)), ("%s%s__marketNftSeller__" + seller)]) | |
554 | 573 | } | |
555 | 574 | ||
556 | 575 |
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 chain = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let DAY_BLOCKS = match chain { | |
9 | 9 | case _ => | |
10 | 10 | if ((base58'2W' == $match0)) | |
11 | 11 | then 1440 | |
12 | 12 | else if ((base58'2T' == $match0)) | |
13 | 13 | then 60 | |
14 | 14 | else throw("Unknown chain") | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | let WEEK_BLOCKS = match chain { | |
18 | 18 | case _ => | |
19 | 19 | if ((base58'2W' == $match0)) | |
20 | 20 | then 10080 | |
21 | 21 | else if ((base58'2T' == $match0)) | |
22 | 22 | then 180 | |
23 | 23 | else throw("Unknown chain") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | let VRF_OFFSET = match chain { | |
27 | 27 | case _ => | |
28 | 28 | if ((base58'2W' == $match0)) | |
29 | 29 | then 0 | |
30 | 30 | else if ((base58'2T' == $match0)) | |
31 | 31 | then 1146000 | |
32 | 32 | else throw("Unknown chain") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | let usdtAssetId = match chain { | |
36 | 36 | case _ => | |
37 | 37 | if ((base58'2W' == $match0)) | |
38 | 38 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
39 | 39 | else if ((base58'2T' == $match0)) | |
40 | 40 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
41 | 41 | else throw("Unknown chain") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | let defaultRest2AddressStr = match chain { | |
45 | 45 | case _ => | |
46 | 46 | if ((base58'2W' == $match0)) | |
47 | 47 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
48 | 48 | else if ((base58'2T' == $match0)) | |
49 | 49 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
50 | 50 | else throw("Unknown chain") | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | let oldStakingContractStr = match chain { | |
54 | 54 | case _ => | |
55 | 55 | if ((base58'2W' == $match0)) | |
56 | 56 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
57 | 57 | else if ((base58'2T' == $match0)) | |
58 | 58 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
59 | 59 | else throw("Unknown chain") | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | let IdxCfgAcres2Dapp = 1 | |
66 | 66 | ||
67 | 67 | let IdxCfgWlgDapp = 2 | |
68 | 68 | ||
69 | 69 | let IdxCfgPuzzlePoolDapp = 4 | |
70 | 70 | ||
71 | 71 | let IdxCfgInvestFundDapp = 5 | |
72 | 72 | ||
73 | + | let IdxCfgMarketDapp = 6 | |
74 | + | ||
73 | 75 | func keyRestCfg () = "%s__restConfig" | |
74 | 76 | ||
75 | 77 | ||
76 | 78 | func keyRest2Address () = "%s__rest2Addr" | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
83 | 85 | ||
84 | 86 | ||
85 | 87 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
86 | 88 | ||
87 | 89 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
88 | 90 | ||
89 | 91 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
90 | 92 | ||
91 | 93 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
92 | 94 | ||
93 | 95 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
94 | 96 | ||
95 | 97 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
98 | + | ||
99 | + | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
96 | 100 | ||
97 | 101 | let oldAcresContractKey = "oldAcresContract" | |
98 | 102 | ||
99 | 103 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
100 | 104 | ||
101 | 105 | ||
102 | 106 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
103 | 107 | ||
104 | 108 | ||
105 | 109 | let wlgAssetIdKey = "wlg_assetId" | |
106 | 110 | ||
107 | 111 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
108 | 112 | ||
109 | 113 | let acresAssetIdKey = "acresAssetId" | |
110 | 114 | ||
111 | 115 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
112 | 116 | ||
113 | 117 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
114 | 118 | ||
115 | 119 | ||
116 | 120 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
117 | 121 | ||
118 | 122 | ||
119 | 123 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
120 | 124 | ||
121 | 125 | ||
122 | 126 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
123 | 127 | ||
124 | 128 | ||
125 | 129 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
126 | 130 | ||
127 | 131 | ||
128 | 132 | func keyUserBet (addr) = ("userBet_" + addr) | |
129 | 133 | ||
130 | 134 | ||
131 | 135 | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
132 | 136 | ||
133 | 137 | ||
134 | 138 | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
135 | 139 | ||
136 | 140 | ||
137 | 141 | func winningBet (day) = { | |
138 | 142 | let b = (day * DAY_BLOCKS) | |
139 | 143 | let h = if ((b > VRF_OFFSET)) | |
140 | 144 | then b | |
141 | 145 | else (b + VRF_OFFSET) | |
142 | 146 | (toInt(value(value(blockInfoByHeight(h)).vrf)) % 4) | |
143 | 147 | } | |
148 | + | ||
149 | + | ||
150 | + | func keySellerByAssetId (assetId) = ("seller_" + assetId) | |
151 | + | ||
152 | + | ||
153 | + | func keyPriceByAssetId (assetId) = ("price_" + assetId) | |
144 | 154 | ||
145 | 155 | ||
146 | 156 | func keyAssetIdsBySeller (addr) = ("assetIds_" + addr) | |
147 | 157 | ||
148 | 158 | ||
149 | 159 | let ixWlgAmount = 0 | |
150 | 160 | ||
151 | 161 | let ixWlgWlg = 1 | |
152 | 162 | ||
153 | 163 | let ixWlgPrice = 2 | |
154 | 164 | ||
155 | 165 | let ixWlgFunds = 3 | |
156 | 166 | ||
157 | 167 | let ixWlgActivity = 4 | |
158 | 168 | ||
159 | 169 | let ixWlgAcres2 = 5 | |
160 | 170 | ||
161 | 171 | let ixWlgArbitrage = 6 | |
162 | 172 | ||
163 | 173 | let ixWlgPool = 7 | |
164 | 174 | ||
165 | 175 | let ixWlgIssueTime = 8 | |
166 | 176 | ||
167 | 177 | let ixWlgLastTeamActTime = 9 | |
168 | 178 | ||
169 | 179 | let ixWlgTeamTotal = 10 | |
170 | 180 | ||
171 | 181 | let ixWlgTeamAmLeft = 11 | |
172 | 182 | ||
173 | 183 | let ixWlgTeamAmAvailNow = 12 | |
174 | 184 | ||
175 | 185 | let ixWlgTeamWlgold = 13 | |
176 | 186 | ||
177 | 187 | let ixWlgActTotal = 14 | |
178 | 188 | ||
179 | 189 | let ixWlgActAmLeft = 15 | |
180 | 190 | ||
181 | 191 | let ixWlgActAmAvailNow = 16 | |
182 | 192 | ||
183 | 193 | let ixWlgActWlgold = 17 | |
184 | 194 | ||
185 | 195 | let ixWlgCurPeriod = 18 | |
186 | 196 | ||
187 | 197 | let ixWlgAmLeftTotal = 19 | |
188 | 198 | ||
189 | 199 | let ixWlgCurPeriodDistribution = 20 | |
190 | 200 | ||
191 | 201 | let ixWlgLastUserTime = 21 | |
192 | 202 | ||
193 | 203 | let ixWlgInvestFundAmount = 22 | |
194 | 204 | ||
195 | 205 | let ixWlgUserAmAvailNow = 23 | |
196 | 206 | ||
197 | 207 | let ixWlgEffUserTime = 24 | |
198 | 208 | ||
199 | 209 | let ixWlgIssue10Amount = 25 | |
200 | 210 | ||
201 | 211 | let ixWlgMarketingIssue10Amount = 26 | |
202 | 212 | ||
203 | 213 | let ixWlgTeamIssue10Amount = 27 | |
204 | 214 | ||
205 | 215 | let ixWlgUser10part = 28 | |
206 | 216 | ||
207 | 217 | let ixWlgIssue10Time = 29 | |
208 | 218 | ||
209 | 219 | let ixWlgTotalFarmingPower = 30 | |
210 | 220 | ||
211 | 221 | let ixWlgAcresStakedTotal = 31 | |
212 | 222 | ||
213 | 223 | let ixWlgNftTotalIssued = 32 | |
214 | 224 | ||
215 | 225 | let ixWlgNftTotalBurned = 33 | |
216 | 226 | ||
217 | 227 | let ixWlgWlNftTotalStaked = 34 | |
218 | 228 | ||
219 | 229 | let ixWlgWlNftUserStaked = 35 | |
220 | 230 | ||
221 | 231 | func asTuple4Ints (val) = match val { | |
222 | 232 | case t: (Int, Int, Int, Int) => | |
223 | 233 | t | |
224 | 234 | case _ => | |
225 | 235 | throw("fail to cast into (Int, Int, Int, Int)") | |
226 | 236 | } | |
227 | 237 | ||
228 | 238 | ||
229 | 239 | func asTuple3Ints (val) = match val { | |
230 | 240 | case t: (Int, Int, Int) => | |
231 | 241 | t | |
232 | 242 | case _ => | |
233 | 243 | throw("fail to cast into (Int, Int, Int)") | |
234 | 244 | } | |
235 | 245 | ||
236 | 246 | ||
237 | 247 | func asTuple2Ints (val) = match val { | |
238 | 248 | case t: (Int, Int) => | |
239 | 249 | t | |
240 | 250 | case _ => | |
241 | 251 | throw("fail to cast into (Int, Int)") | |
242 | 252 | } | |
243 | 253 | ||
244 | 254 | ||
245 | 255 | let M6_ = 1000000 | |
246 | 256 | ||
247 | 257 | let M8_ = 100000000 | |
248 | 258 | ||
249 | 259 | let TEAM_SHARE = 200000 | |
250 | 260 | ||
251 | 261 | let ACTIVITY_SHARE = 100000 | |
252 | 262 | ||
253 | 263 | let PLAYER_SHARE = 400000 | |
254 | 264 | ||
255 | 265 | let YEAR_MILLIS = 31557600000 | |
256 | 266 | ||
257 | 267 | let DAY_MS = 86400000 | |
258 | 268 | ||
259 | 269 | let ISSUE10 = 1000000000 | |
260 | 270 | ||
261 | 271 | let PLAYERS10_SHARE = 800000 | |
262 | 272 | ||
263 | 273 | let MARKETING10_SHARE = 100000 | |
264 | 274 | ||
265 | 275 | let TEAM10_SHARE = 100000 | |
266 | 276 | ||
267 | 277 | let NEW_STAKING_START = 1731279600000 | |
268 | 278 | ||
269 | 279 | let teamAdrKey = "teamAddr" | |
270 | 280 | ||
271 | 281 | let lastTeamTimKey = "lastClaimedTime_team" | |
272 | 282 | ||
273 | 283 | let teamAmtLeftKey = "teamAmountLeft" | |
274 | 284 | ||
275 | 285 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
276 | 286 | ||
277 | 287 | let actAmtLeftKey = "activitiesAmountLeft" | |
278 | 288 | ||
279 | 289 | let stakersAmtLeftKey = "stakersAmountLeft" | |
280 | 290 | ||
281 | 291 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
282 | 292 | ||
283 | 293 | ||
284 | 294 | func distrByPeriod (issuedAmount,period) = fraction(issuedAmount, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
285 | 295 | ||
286 | 296 | ||
287 | 297 | let wlgIssue10TimeKey = "wlg_issue10Time" | |
288 | 298 | ||
289 | 299 | let wlgIssueTimKey = "wlg_issueTime" | |
290 | 300 | ||
291 | 301 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
292 | 302 | ||
293 | 303 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
294 | 304 | ||
295 | 305 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
296 | 306 | ||
297 | 307 | ||
298 | 308 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
299 | 309 | ||
300 | 310 | let totalFarmingPowerKey = "totalFarmingPower" | |
301 | 311 | ||
302 | 312 | let dapp2Rest = 0 | |
303 | 313 | ||
304 | 314 | let dapp2Staking = 1 | |
305 | 315 | ||
306 | 316 | let dapp2Wlg = 2 | |
307 | 317 | ||
308 | 318 | let dapp2Puzzle = 3 | |
309 | 319 | ||
310 | 320 | let dapp2InvestFund = 4 | |
311 | 321 | ||
312 | 322 | let keyNftTotalIssued = "nftTotalIssued" | |
313 | 323 | ||
314 | 324 | let keyNftTotalBurned = "nftTotalBurned" | |
315 | 325 | ||
316 | 326 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
317 | 327 | ||
318 | 328 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
319 | 329 | ||
320 | 330 | ||
321 | 331 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
322 | 332 | ||
323 | 333 | ||
324 | 334 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
325 | 335 | ||
326 | 336 | func getLevelByAcres (acres) = { | |
327 | 337 | let acr = ((acres + 99999999) / M8_) | |
328 | 338 | func checker (acc,item) = if ((item >= acr)) | |
329 | 339 | then acc | |
330 | 340 | else (acc + 1) | |
331 | 341 | ||
332 | 342 | let $l = levelAcres | |
333 | 343 | let $s = size($l) | |
334 | 344 | let $acc0 = 0 | |
335 | 345 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
336 | 346 | then $a | |
337 | 347 | else checker($a, $l[$i]) | |
338 | 348 | ||
339 | 349 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
340 | 350 | then $a | |
341 | 351 | else throw("List size exceeds 10") | |
342 | 352 | ||
343 | 353 | $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) | |
344 | 354 | } | |
345 | 355 | ||
346 | 356 | ||
347 | 357 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
348 | 358 | ||
349 | 359 | ||
350 | 360 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
351 | 361 | let notBonused = getFarmingPowerByAcres(acres) | |
352 | 362 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
353 | 363 | } | |
354 | 364 | ||
355 | 365 | ||
356 | 366 | func getFarmingPowers (userAddrStrOrEmpty,acres2Contract) = { | |
357 | 367 | let totalFP = valueOrElse(getInteger(acres2Contract, totalFarmingPowerKey), 0) | |
358 | 368 | let userAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
359 | 369 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(userAddrStrOrEmpty)), 0) | |
360 | 370 | let $t079119 = getFarmingPowerByAcresAndBonus(userAcres, userBonus) | |
361 | 371 | let userFPbonused = $t079119._1 | |
362 | 372 | let userFPnotBonused = $t079119._2 | |
363 | 373 | [totalFP, userFPbonused, userFPnotBonused, userBonus] | |
364 | 374 | } | |
365 | 375 | ||
366 | 376 | ||
367 | 377 | let idxTotalFP = 0 | |
368 | 378 | ||
369 | 379 | let idxUserFPbonused = 1 | |
370 | 380 | ||
371 | 381 | let idxUserFPnotBonused = 2 | |
372 | 382 | ||
373 | 383 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
374 | 384 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
375 | 385 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
376 | 386 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
377 | 387 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
378 | 388 | let acres2Usd = assetBalance(contracts[dapp2Staking], usdtId) | |
379 | 389 | let investFndContract = contracts[dapp2InvestFund] | |
380 | 390 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
381 | 391 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
382 | 392 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
383 | 393 | let now = lastBlock.timestamp | |
384 | 394 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
385 | 395 | let wlgWlg = assetBalance(contracts[dapp2Wlg], wlgId) | |
386 | 396 | let teamTotal = fraction(issuedAmount, TEAM_SHARE, M6_) | |
387 | 397 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
388 | 398 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
389 | 399 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
390 | 400 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
391 | 401 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
392 | 402 | let actTotal = fraction(issuedAmount, ACTIVITY_SHARE, M6_) | |
393 | 403 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
394 | 404 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
395 | 405 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
396 | 406 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
397 | 407 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
398 | 408 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
399 | 409 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
400 | 410 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
401 | 411 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
402 | 412 | let curPeriodDistribution = distrByPeriod(issuedAmount, curPeriod) | |
403 | 413 | let prevPeriodEnd = (issueTime + (YEAR_MILLIS * curPeriod)) | |
404 | 414 | let prevPrevPeriodEnd = (issueTime + (YEAR_MILLIS * (curPeriod - 1))) | |
405 | 415 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
406 | 416 | let userAvailable = if ((lastUserPeriod == curPeriod)) | |
407 | 417 | then a0 | |
408 | 418 | else if ((lastUserPeriod == (curPeriod - 1))) | |
409 | 419 | then { | |
410 | 420 | let a1 = fraction(distrByPeriod(issuedAmount, (curPeriod - 1)), (prevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
411 | 421 | (a1 + a0) | |
412 | 422 | } | |
413 | 423 | else { | |
414 | 424 | let a2 = fraction(distrByPeriod(issuedAmount, (curPeriod - 2)), (prevPrevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
415 | 425 | let a1 = distrByPeriod(issuedAmount, (curPeriod - 1)) | |
416 | 426 | ((a2 + a1) + a0) | |
417 | 427 | } | |
418 | 428 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
419 | 429 | let userAmount = if ((eff[idxTotalFP] != 0)) | |
420 | 430 | then fraction(userAvailable, eff[idxUserFPbonused], eff[idxTotalFP]) | |
421 | 431 | else 0 | |
422 | 432 | let lastIssue10Time = valueOrElse(getInteger(contracts[dapp2Wlg], wlgIssue10TimeKey), NEW_STAKING_START) | |
423 | 433 | let issue10Amount = fraction(ISSUE10, max([(now - lastIssue10Time), 0]), DAY_MS) | |
424 | 434 | let marketingIssue10Amount = fraction(issue10Amount, MARKETING10_SHARE, M6_) | |
425 | 435 | let teamIssue10Amount = fraction(issue10Amount, TEAM10_SHARE, M6_) | |
426 | 436 | let user10Interval = max([(now - max([NEW_STAKING_START, lastUserTime])), 0]) | |
427 | 437 | let user10part = if ((eff[idxTotalFP] != 0)) | |
428 | 438 | then fraction(fraction(fraction(ISSUE10, user10Interval, DAY_MS), eff[idxUserFPbonused], eff[idxTotalFP]), PLAYERS10_SHARE, M6_) | |
429 | 439 | else 0 | |
430 | 440 | let newIssue10Time = max([NEW_STAKING_START, now]) | |
431 | 441 | let acresStakedTotal = valueOrElse(getInteger(contracts[dapp2Staking], acresStakdTotalKey), 0) | |
432 | 442 | let nftTotalIssued = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalIssued), 0) | |
433 | 443 | let nftTotalBurned = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalBurned), 0) | |
434 | 444 | let wlNftTotalStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyWlNftTotalStaked), 0) | |
435 | 445 | let wlNftUserStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyUserWlNftNumber(valueOrElse(userAddrOpt, ""))), 0) | |
436 | 446 | [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] | |
437 | 447 | } | |
438 | 448 | ||
439 | 449 | ||
440 | 450 | func walletInternal (userAddressOpt) = { | |
441 | 451 | let addr = addressFromString(userAddressOpt) | |
442 | 452 | let balance = if (isDefined(addr)) | |
443 | 453 | then wavesBalance(value(addr)) | |
444 | 454 | else BalanceDetails(0, 0, 0, 0) | |
445 | 455 | let usdtBalance = if (isDefined(addr)) | |
446 | 456 | then assetBalance(value(addr), usdtAssetId) | |
447 | 457 | else 0 | |
448 | 458 | let wlgoldBalance = if (isDefined(addr)) | |
449 | 459 | then assetBalance(value(addr), wlgAssetId) | |
450 | 460 | else 0 | |
451 | 461 | let customName = valueOrElse(getString(acres2Contract, keyAddressToCustomName(userAddressOpt)), userAddressOpt) | |
452 | 462 | let refByKey = keyAddressRefBy(userAddressOpt) | |
453 | 463 | let refBy = getString(acres2Contract, refByKey) | |
454 | 464 | let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "") | |
455 | 465 | let lastTxId = valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(userAddressOpt)), "") | |
456 | 466 | let curTxId = valueOrElse(getString(acres2Contract, keyCurWeekTxIdByUser(userAddressOpt)), "") | |
457 | 467 | let acresBalance = if (isDefined(addr)) | |
458 | 468 | then assetBalance(value(addr), acresAssetId) | |
459 | 469 | else 0 | |
460 | 470 | let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddressOpt)), 0) | |
461 | 471 | let lvl = getLevelByAcres(stakedAcres) | |
462 | 472 | let fp = getFarmingPowers(userAddressOpt, acres2Contract) | |
463 | 473 | let acresToNextLvl = if ((lvl >= size(levelAcres))) | |
464 | 474 | then 0 | |
465 | 475 | else (((levelAcres[lvl] * M8_) + 1) - stakedAcres) | |
466 | 476 | let nfts = valueOrElse(getString(acres2Contract, keyStakedNFTsByOwner(userAddressOpt)), "") | |
467 | 477 | let bonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(userAddressOpt)), 0) | |
468 | 478 | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastWeekTxId__" + lastTxId), ("%s%s__curWeekTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__usdtBalance__" + toString(usdtBalance)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl)), ("%s%d__acresToNextLvl__" + toString(acresToNextLvl)), ("%s%s__userNFTs__" + nfts), ("%s%d__userBonus__" + toString(bonus)), ("%s%d__userBaseFarmingPower__" + toString(fp[idxUserFPnotBonused])), ("%s%d__userFarmingPower__" + toString(fp[idxUserFPbonused])), ("%s%d__totalFarmingPower__" + toString(fp[idxTotalFP]))] | |
469 | 479 | } | |
470 | 480 | ||
471 | 481 | ||
472 | 482 | @Callable(i) | |
473 | 483 | func constructorV1 (contracts) = if ((i.caller != this)) | |
474 | 484 | then throw("permissions denied") | |
475 | 485 | else { | |
476 | 486 | func descriptor (acc,ignoredItem) = (acc + "%s") | |
477 | 487 | ||
478 | 488 | let descr = { | |
479 | 489 | let $l = contracts | |
480 | 490 | let $s = size($l) | |
481 | 491 | let $acc0 = "" | |
482 | 492 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
483 | 493 | then $a | |
484 | 494 | else descriptor($a, $l[$i]) | |
485 | 495 | ||
486 | 496 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
487 | 497 | then $a | |
488 | 498 | else throw("List size exceeds 10") | |
489 | 499 | ||
490 | 500 | $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) | |
491 | 501 | } | |
492 | 502 | [StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRest2Address(), toString(this))] | |
493 | 503 | } | |
494 | 504 | ||
495 | 505 | ||
496 | 506 | ||
497 | 507 | @Callable(i) | |
498 | 508 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
499 | 509 | ||
500 | 510 | ||
501 | 511 | ||
502 | 512 | @Callable(i) | |
503 | 513 | func conversionInfoREADONLY (userAddressOpt) = { | |
504 | 514 | let oldAcresAddress = addressFromStringValue(getStringValue(acres2Contract, oldAcresContractKey)) | |
505 | 515 | let $t050515173 = asTuple2Ints(invoke(oldAcresAddress, "unstakeAllAcresREADONLY", [userAddressOpt], nil)) | |
506 | 516 | let unstakedAcres = $t050515173._1 | |
507 | 517 | let claimedAcres = $t050515173._2 | |
508 | 518 | let $t051765325 = asTuple4Ints(invoke(acres2Contract, "unstakeLandsREADONLY", [userAddressOpt], nil)) | |
509 | 519 | let acresFromPieces = $t051765325._1 | |
510 | 520 | let acresFromRes = $t051765325._2 | |
511 | 521 | let acresFromMat = $t051765325._3 | |
512 | 522 | let acresFromProd = $t051765325._4 | |
513 | 523 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
514 | 524 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(userAddressOpt)), "") | |
515 | 525 | let $t055035725 = if ((duckAssetId != "")) | |
516 | 526 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckREADONLY", [duckAssetId, userAddressOpt], nil)) | |
517 | 527 | else $Tuple3(0, 0, 0) | |
518 | 528 | let acresFromDuckRes = $t055035725._1 | |
519 | 529 | let acresFromDuckMat = $t055035725._2 | |
520 | 530 | let acresFromDuckProd = $t055035725._3 | |
521 | 531 | $Tuple2(nil, [("%s%d__unstakedAcres__" + toString(unstakedAcres)), ("%s%d__claimedAcres__" + toString(claimedAcres)), ("%s%d__acresFromPieces__" + toString(acresFromPieces)), ("%s%d__acresFromRes__" + toString(acresFromRes)), ("%s%d__acresFromMat__" + toString(acresFromMat)), ("%s%d__acresFromProd__" + toString(acresFromProd)), ("%s%d__acresFromDuckRes__" + toString(acresFromDuckRes)), ("%s%d__acresFromDuckMat__" + toString(acresFromDuckMat)), ("%s%d__acresFromDuckProd__" + toString(acresFromDuckProd))]) | |
522 | 532 | } | |
523 | 533 | ||
524 | 534 | ||
525 | 535 | ||
526 | 536 | @Callable(i) | |
527 | 537 | func wlgStatsREADONLY (userAddrOpt) = { | |
528 | 538 | let curStats = getWlgStats2(userAddrOpt, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
529 | 539 | $Tuple2(nil, [("%s%d__wlgAmount__" + toString(curStats[ixWlgAmount])), ("%s%d__wlgWlg__" + toString(curStats[ixWlgWlg])), ("%s%d__wlgPrice__" + toString(curStats[ixWlgPrice])), ("%s%d__usdtFunds__" + toString(curStats[ixWlgFunds])), ("%s%d__usdtActivity__" + toString(curStats[ixWlgActivity])), ("%s%d__usdtStaking__" + toString(curStats[ixWlgAcres2])), ("%s%d__usdtArbitrage__" + toString(curStats[ixWlgArbitrage])), ("%s%d__usdtPool__" + toString(curStats[ixWlgPool])), ("%s%d__wlgIssueTime__" + toString(curStats[ixWlgIssueTime])), ("%s%d__wlgLastTeamActTime__" + toString(curStats[ixWlgLastTeamActTime])), ("%s%d__wlgTeamTotal__" + toString(curStats[ixWlgTeamTotal])), ("%s%d__wlgTeamAmLeft__" + toString(curStats[ixWlgTeamAmLeft])), ("%s%d__wlgTeamAmAvailNow__" + toString(curStats[ixWlgTeamAmAvailNow])), ("%s%d__wlgTeamWlgold__" + toString(curStats[ixWlgTeamWlgold])), ("%s%d__wlgActTotal__" + toString(curStats[ixWlgActTotal])), ("%s%d__wlgActAmLeft__" + toString(curStats[ixWlgActAmLeft])), ("%s%d__wlgActAmAvailNow__" + toString(curStats[ixWlgActAmAvailNow])), ("%s%d__wlgActWlgold__" + toString(curStats[ixWlgActWlgold])), ("%s%d__wlgCurPeriod__" + toString(curStats[ixWlgCurPeriod])), ("%s%d__wlgAmLeftTotal__" + toString(curStats[ixWlgAmLeftTotal])), ("%s%d__wlgCurPeriodDistribution__" + toString(curStats[ixWlgCurPeriodDistribution])), ("%s%d__wlgLastUserTime__" + toString(curStats[ixWlgLastUserTime])), ("%s%d__wlgInvestFundTotal__" + toString(curStats[ixWlgInvestFundAmount])), ("%s%d__wlgUserAmAvailNow__" + toString(curStats[ixWlgUserAmAvailNow])), ("%s%d__wlgEffUserTime__" + toString(curStats[ixWlgEffUserTime])), ("%s%d__wlgIssue10AvailNow__" + toString(curStats[ixWlgIssue10Amount])), ("%s%d__wlgMarketingIssue10AvailNow__" + toString(curStats[ixWlgMarketingIssue10Amount])), ("%s%d__wlgTeamIssue10AvailNow__" + toString(curStats[ixWlgTeamIssue10Amount])), ("%s%d__wlgUserIssue10AvailNow__" + toString(curStats[ixWlgUser10part])), ("%s%d__wlgLastIssue10Time__" + toString(curStats[ixWlgIssue10Time])), ("%s%d__wlgTotalFarmingPower__" + toString(curStats[ixWlgTotalFarmingPower])), ("%s%d__wlgAcresStakedTotal__" + toString(curStats[ixWlgAcresStakedTotal])), ("%s%d__nftTotalIssued__" + toString(curStats[ixWlgNftTotalIssued])), ("%s%d__nftTotalBurned__" + toString(curStats[ixWlgNftTotalBurned])), ("%s%d__wlNftTotalStaked__" + toString(curStats[ixWlgWlNftTotalStaked])), ("%s%d__wlNftUserStaked__" + toString(curStats[ixWlgWlNftUserStaked]))]) | |
530 | 540 | } | |
531 | 541 | ||
532 | 542 | ||
533 | 543 | ||
534 | 544 | @Callable(i) | |
535 | 545 | func lotteryStatsREADONLY (userAddrOpt) = { | |
536 | 546 | let today = (height / DAY_BLOCKS) | |
537 | 547 | let week = (height / WEEK_BLOCKS) | |
538 | 548 | let lastWeek = (week - 1) | |
539 | 549 | let curWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, week)), 0) | |
540 | 550 | let lastWeekTickets = valueOrElse(getInteger(wlgContract, keyUserWeekTickets(userAddrOpt, lastWeek)), 0) | |
541 | 551 | let curWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(week)), 0) | |
542 | 552 | let lastWeekTotalTickets = valueOrElse(getInteger(wlgContract, keyTotalWeekTickets(lastWeek)), 0) | |
543 | 553 | let usersBet = valueOrElse(getString(wlgContract, keyUserBet(userAddrOpt)), "") | |
544 | 554 | $Tuple2(nil, [((("%s%d%d__totalTickets__" + toString(lastWeekTotalTickets)) + SEP) + toString(curWeekTotalTickets)), ((("%s%d%d__userTickets__" + toString(lastWeekTickets)) + SEP) + toString(curWeekTickets)), ("%s%d__blockchainWeek__" + toString(week)), ("%s%d__blockchainDay__" + toString(today)), ("%s%d__blockchainMinute__" + toString((height % DAY_BLOCKS))), ("%s%d__winningBetToday__" + toString(winningBet(today))), ("%s%s__usersBet__" + usersBet)]) | |
545 | 555 | } | |
546 | 556 | ||
547 | 557 | ||
548 | 558 | ||
549 | 559 | @Callable(i) | |
550 | 560 | func userOrdersREADONLY (userAddrOpt) = { | |
551 | 561 | let nftsKey = keyAssetIdsBySeller(userAddrOpt) | |
552 | - | let nftsStr = valueOrElse(getString(nftsKey), "") | |
562 | + | let nftsStr = valueOrElse(getString(marketContract, nftsKey), "") | |
553 | 563 | $Tuple2(nil, [("%s%s__userSaleNfts__" + nftsStr)]) | |
564 | + | } | |
565 | + | ||
566 | + | ||
567 | + | ||
568 | + | @Callable(i) | |
569 | + | func orderInfoREADONLY (assetIdOpt) = { | |
570 | + | let price = valueOrElse(getInteger(marketContract, keyPriceByAssetId(assetIdOpt)), 0) | |
571 | + | let seller = valueOrElse(getString(marketContract, keySellerByAssetId(assetIdOpt)), "") | |
572 | + | $Tuple2(nil, [("%s%d__marketNftPrice__" + toString(price)), ("%s%s__marketNftSeller__" + seller)]) | |
554 | 573 | } | |
555 | 574 | ||
556 | 575 |
github/deemru/w8io/026f985 52.25 ms ◑