tx · 5yfJPe1SVAMULjBiDZ6KKRPD7y9mPtBwiS3ek75EYT5M

3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv:  -0.01400000 Waves

2024.09.13 05:39 [3281265] smart account 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv > SELF 0.00000000 Waves

{ "type": 13, "id": "5yfJPe1SVAMULjBiDZ6KKRPD7y9mPtBwiS3ek75EYT5M", "fee": 1400000, "feeAssetId": null, "timestamp": 1726195169996, "version": 2, "chainId": 84, "sender": "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv", "senderPublicKey": "2fNSk5gmWbXBDTkSYSKd66xSgVvAYzrJnP9YSAFNvTwC", "proofs": [ "3BiGh9MujKYxG7sfmxbuHZQ9576bk1HiXxV3Nnt3r2AwAk4MWoQfiFFythT2KpRWZDAWfes5w3mrgeo4i8FEVdfd" ], "script": "base64:BgIWCAISAwoBGBIDCgEIEgMKAQgSAwoBCFsAA1NFUAICX18ABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABZkZWZhdWx0UmVzdDJBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUEZ3WXRhOGJpRXozMXpwZUZlNURKSzh3RTV0clNwUVZGOAMJAAACAQFUBQckbWF0Y2gwAiMzTjdVdVlhcjYyNjRQNThGQmhWV0tQUUFoNFl1YTJoZ25ndgkAAgECDVVua25vd24gY2hhaW4AFW9sZFN0YWtpbmdDb250cmFjdFN0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BM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281265, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G2mdREjNEm7rvRZHwiL82oYnhVh3Eu1rkoBAopBkocoS Next: 6JuEiPzZyootpYM9dga1vmVKR1RJH9rJi1NMdBW4E5Qv Diff:
OldNewDifferences
299299 let $t079119 = if ((lastUserPeriod == curPeriod))
300300 then {
301301 let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS)
302- let effTime = ((lastUserTime + nowLimited) - lastUserTime)
302+ let effTime = nowLimited
303303 $Tuple2(a0, effTime)
304304 }
305305 else if ((lastUserPeriod == (curPeriod - 1)))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let chain = take(drop(this.bytes, 1), 1)
77
88 let usdtAssetId = match chain {
99 case _ =>
1010 if ((base58'2W' == $match0))
1111 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
1212 else if ((base58'2T' == $match0))
1313 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
1414 else throw("Unknown chain")
1515 }
1616
1717 let defaultRest2AddressStr = match chain {
1818 case _ =>
1919 if ((base58'2W' == $match0))
2020 then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
2121 else if ((base58'2T' == $match0))
2222 then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
2323 else throw("Unknown chain")
2424 }
2525
2626 let oldStakingContractStr = match chain {
2727 case _ =>
2828 if ((base58'2W' == $match0))
2929 then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1"
3030 else if ((base58'2T' == $match0))
3131 then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm"
3232 else throw("Unknown chain")
3333 }
3434
3535 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
3636
3737
3838 let IdxCfgAcres2Dapp = 1
3939
4040 let IdxCfgWlgDapp = 2
4141
4242 let IdxCfgPuzzlePoolDapp = 4
4343
4444 let IdxCfgInvestFundDapp = 5
4545
4646 func keyRestCfg () = "%s__restConfig"
4747
4848
4949 func keyRest2Address () = "%s__rest2Addr"
5050
5151
5252 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
5353
5454
5555 func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
5656
5757
5858 let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
5959
6060 let rest2Cfg = readRestCfgOrFail(rest2Contract)
6161
6262 let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp)
6363
6464 let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp)
6565
6666 let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp)
6767
6868 let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp)
6969
7070 let oldAcresContractKey = "oldAcresContract"
7171
7272 func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
7373
7474
7575 let wlgAssetIdKey = "wlg_assetId"
7676
7777 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
7878
7979 let acresAssetIdKey = "acresAssetId"
8080
8181 let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet")
8282
8383 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
8484
8585
8686 func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
8787
8888
8989 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
9090
9191
9292 func keyAddressReferrals (addr) = ("accReferrals_" + addr)
9393
9494
9595 func asTuple4Ints (val) = match val {
9696 case t: (Int, Int, Int, Int) =>
9797 t
9898 case _ =>
9999 throw("fail to cast into (Int, Int, Int, Int)")
100100 }
101101
102102
103103 func asTuple3Ints (val) = match val {
104104 case t: (Int, Int, Int) =>
105105 t
106106 case _ =>
107107 throw("fail to cast into (Int, Int, Int)")
108108 }
109109
110110
111111 func asTuple2Ints (val) = match val {
112112 case t: (Int, Int) =>
113113 t
114114 case _ =>
115115 throw("fail to cast into (Int, Int)")
116116 }
117117
118118
119119 let M6_ = 1000000
120120
121121 let M8_ = 100000000
122122
123123 let MILL6 = 100000000000000
124124
125125 let TEAM_SHARE = 200000
126126
127127 let ACTIVITY_SHARE = 100000
128128
129129 let PLAYER_SHARE = 400000
130130
131131 let YEAR_MILLIS = 31557600000
132132
133133 let chn = take(drop(this.bytes, 1), 1)
134134
135135 let USDT_TVL_CORR = match chn {
136136 case _ =>
137137 if ((base58'2W' == $match0))
138138 then 1208630000
139139 else if ((base58'2T' == $match0))
140140 then 0
141141 else throw("Unknown chain")
142142 }
143143
144144 let teamAdrKey = "teamAddr"
145145
146146 let lastTeamTimKey = "lastClaimedTime_team"
147147
148148 let teamAmtLeftKey = "teamAmountLeft"
149149
150150 let lastActivitiesTimKey = "lastClaimedTime_activities"
151151
152152 let actAmtLeftKey = "activitiesAmountLeft"
153153
154154 let stakersAmtLeftKey = "stakersAmountLeft"
155155
156156 func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr)
157157
158158
159159 func distrByPeriod (period) = fraction(MILL6, (PLAYER_SHARE * (period + 1)), (6 * M6_))
160160
161161
162162 let wlgIssueTimKey = "wlg_issueTime"
163163
164164 let wlgIssuedAmtKey = "wlg_issuedAmount"
165165
166166 let zbIssuedAmtKey = "zbill_issuedAmount"
167167
168168 func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr)
169169
170170
171171 let acresStakdTotalKey = "acresStakedAmountTotal"
172172
173173 let dapp2Rest = 0
174174
175175 let dapp2Staking = 1
176176
177177 let dapp2Wlg = 2
178178
179179 let dapp2Puzzle = 3
180180
181181 let dapp2InvestFund = 4
182182
183183 let levels = [10, 20, 40, 80, 150, 250, 400, 700, 1000]
184184
185185 func getLevelByAcres (acres) = {
186186 let acr = (acres / M8_)
187187 func checker (acc,item) = if ((item > acr))
188188 then acc
189189 else (acc + 1)
190190
191191 let idx = {
192192 let $l = levels
193193 let $s = size($l)
194194 let $acc0 = 0
195195 func $f0_1 ($a,$i) = if (($i >= $s))
196196 then $a
197197 else checker($a, $l[$i])
198198
199199 func $f0_2 ($a,$i) = if (($i >= $s))
200200 then $a
201201 else throw("List size exceeds 10")
202202
203203 $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)
204204 }
205205 (idx + 1)
206206 }
207207
208208
209209 func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4))
210210
211211
212212 func getFarmingPowers (userAddrStrOrEmpty,stakingContract) = {
213213 let totalAcres = valueOrElse(getInteger(stakingContract, acresStakdTotalKey), 0)
214214 let totalFP = getFarmingPowerByAcres(totalAcres)
215215 let userAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0)
216216 let userFP = getFarmingPowerByAcres(userAcres)
217217 [totalFP, userFP]
218218 }
219219
220220
221221 let idxTotalFP = 0
222222
223223 let idxUserFP = 1
224224
225225 let ixWlgAmount = 0
226226
227227 let ixWlgPrice = 1
228228
229229 let ixWlgFunds = 2
230230
231231 let ixWlgActivity = 3
232232
233233 let ixWlgArbitrage = 4
234234
235235 let ixWlgPool = 5
236236
237237 let ixWlgIssueTime = 6
238238
239239 let ixWlgLastTeamActTime = 7
240240
241241 let ixWlgTeamTotal = 8
242242
243243 let ixWlgTeamAmLeft = 9
244244
245245 let ixWlgTeamAmAvailNow = 10
246246
247247 let ixWlgTeamWlgold = 11
248248
249249 let ixWlgActTotal = 12
250250
251251 let ixWlgActAmLeft = 13
252252
253253 let ixWlgActAmAvailNow = 14
254254
255255 let ixWlgActWlgold = 15
256256
257257 let ixWlgCurPeriod = 16
258258
259259 let ixWlgAmLeftTotal = 17
260260
261261 let ixWlgCurPeriodDistribution = 18
262262
263263 let ixWlgLastUserTime = 19
264264
265265 let ixWlgInvestFundAmount = 20
266266
267267 let ixWlgUserAmAvailNow = 21
268268
269269 let ixWlgEffUserTime = 22
270270
271271 func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = {
272272 let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet")
273273 let restUsd = assetBalance(contracts[dapp2Rest], usdtId)
274274 let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection)
275275 let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId)
276276 let investFndContract = contracts[dapp2InvestFund]
277277 let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0))
278278 let totalFundsUsd = (wlgUsd + investFundTotal)
279279 let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet")
280280 let now = lastBlock.timestamp
281281 let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized")
282282 let teamTotal = fraction(MILL6, TEAM_SHARE, M6_)
283283 let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal)
284284 let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime)
285285 let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey)))
286286 let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft])
287287 let teamWlgold = assetBalance(teamAddr, wlgId)
288288 let actTotal = fraction(MILL6, ACTIVITY_SHARE, M6_)
289289 let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal)
290290 let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime)
291291 let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft])
292292 let actWlgold = assetBalance(contracts[dapp2Rest], wlgId)
293293 let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime)
294294 let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS)
295295 let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))])
296296 let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2])
297297 let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking])
298298 let curPeriodDistribution = distrByPeriod(curPeriod)
299299 let $t079119 = if ((lastUserPeriod == curPeriod))
300300 then {
301301 let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS)
302- let effTime = ((lastUserTime + nowLimited) - lastUserTime)
302+ let effTime = nowLimited
303303 $Tuple2(a0, effTime)
304304 }
305305 else if ((lastUserPeriod == (curPeriod - 1)))
306306 then {
307307 let a1 = fraction(distrByPeriod((curPeriod - 1)), ((issueTime + (YEAR_MILLIS * curPeriod)) - lastUserTime), YEAR_MILLIS)
308308 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS)
309309 let avail = (a1 + a0)
310310 let effTime = if ((a1 >= avail))
311311 then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 1))))
312312 else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, (avail - a1), curPeriodDistribution))
313313 $Tuple2(avail, effTime)
314314 }
315315 else {
316316 let a2 = fraction(distrByPeriod((curPeriod - 2)), ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) - lastUserTime), YEAR_MILLIS)
317317 let a1 = distrByPeriod((curPeriod - 1))
318318 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS)
319319 let avail = ((a2 + a1) + a0)
320320 let effTime = if ((a2 >= avail))
321321 then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 2))))
322322 else if (((a2 + a1) >= avail))
323323 then ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) + fraction(YEAR_MILLIS, (avail - a2), distrByPeriod((curPeriod - 1))))
324324 else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, ((avail - a2) - a1), curPeriodDistribution))
325325 $Tuple2(avail, effTime)
326326 }
327327 let userAvailable = $t079119._1
328328 let effLastTime = $t079119._2
329329 let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0)
330330 let unrobbedUser = if ((eff[idxTotalFP] != 0))
331331 then fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP])
332332 else 0
333333 [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORR), M8_, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, unrobbedUser, effLastTime]
334334 }
335335
336336
337337 func walletInternal (userAddressOpt) = {
338338 let addr = addressFromString(userAddressOpt)
339339 let balance = if (isDefined(addr))
340340 then wavesBalance(value(addr))
341341 else BalanceDetails(0, 0, 0, 0)
342342 let wlgoldBalance = if (isDefined(addr))
343343 then assetBalance(value(addr), wlgAssetId)
344344 else 0
345345 let customName = valueOrElse(getString(acres2Contract, keyAddressToCustomName(userAddressOpt)), userAddressOpt)
346346 let refByKey = keyAddressRefBy(userAddressOpt)
347347 let refBy = getString(acres2Contract, refByKey)
348348 let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "")
349349 let lastTxId = valueOrElse(getString(acres2Contract, keyLastTxIdByUser(userAddressOpt)), "")
350350 let acresBalance = if (isDefined(addr))
351351 then assetBalance(value(addr), acresAssetId)
352352 else 0
353353 let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddressOpt)), 0)
354354 let lvl = getLevelByAcres(acresBalance)
355355 [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl))]
356356 }
357357
358358
359359 @Callable(i)
360360 func constructorV1 (contracts) = if ((i.caller != this))
361361 then throw("permissions denied")
362362 else {
363363 func descriptor (acc,ignoredItem) = (acc + "%s")
364364
365365 let descr = {
366366 let $l = contracts
367367 let $s = size($l)
368368 let $acc0 = ""
369369 func $f0_1 ($a,$i) = if (($i >= $s))
370370 then $a
371371 else descriptor($a, $l[$i])
372372
373373 func $f0_2 ($a,$i) = if (($i >= $s))
374374 then $a
375375 else throw("List size exceeds 10")
376376
377377 $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)
378378 }
379379 [StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRest2Address(), toString(this))]
380380 }
381381
382382
383383
384384 @Callable(i)
385385 func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt))
386386
387387
388388
389389 @Callable(i)
390390 func conversionInfoREADONLY (userAddressOpt) = {
391391 let oldAcresAddress = addressFromStringValue(getStringValue(acres2Contract, oldAcresContractKey))
392392 let $t040504172 = asTuple2Ints(invoke(oldAcresAddress, "unstakeAllAcresREADONLY", [userAddressOpt], nil))
393393 let unstakedAcres = $t040504172._1
394394 let claimedAcres = $t040504172._2
395395 let $t041754324 = asTuple4Ints(invoke(acres2Contract, "unstakeLandsREADONLY", [userAddressOpt], nil))
396396 let acresFromPieces = $t041754324._1
397397 let acresFromRes = $t041754324._2
398398 let acresFromMat = $t041754324._3
399399 let acresFromProd = $t041754324._4
400400 let oldStakingAddress = addressFromStringValue(oldStakingContractStr)
401401 let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(userAddressOpt)), "")
402402 let $t045024724 = if ((duckAssetId != ""))
403403 then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckREADONLY", [duckAssetId, userAddressOpt], nil))
404404 else $Tuple3(0, 0, 0)
405405 let acresFromDuckRes = $t045024724._1
406406 let acresFromDuckMat = $t045024724._2
407407 let acresFromDuckProd = $t045024724._3
408408 $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))])
409409 }
410410
411411
412412
413413 @Callable(i)
414414 func wlgStatsREADONLY (userAddrOpt) = {
415415 let curStats = getWlgStats2(userAddrOpt, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0)
416416 $Tuple2(nil, [("%s%d__wlgAmount__" + toString(curStats[ixWlgAmount])), ("%s%d__wlgPrice__" + toString(curStats[ixWlgPrice])), ("%s%d__usdtFunds__" + toString(curStats[ixWlgFunds])), ("%s%d__usdtActivity__" + toString(curStats[ixWlgActivity])), ("%s%d__usdtArbitrage__" + toString(curStats[ixWlgArbitrage])), ("%s%d__usdtPool__" + toString(curStats[ixWlgPool])), ("%s%d__wlgIssueTime__" + toString(curStats[ixWlgIssueTime])), ("%s%d__wlgLastMarketingTeamActTime__" + 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]))])
417417 }
418418
419419

github/deemru/w8io/169f3d6 
49.46 ms