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