tx · CsvaN7nd1PhE4TZyprVtGKPsbQaM1mcC8tET4Yho4UmT

3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z:  -0.01600000 Waves

2024.09.01 21:54 [3264881] smart account 3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z > SELF 0.00000000 Waves

{ "type": 13, "id": "CsvaN7nd1PhE4TZyprVtGKPsbQaM1mcC8tET4Yho4UmT", "fee": 1600000, "feeAssetId": null, "timestamp": 1725216884141, "version": 2, "chainId": 84, "sender": "3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z", "senderPublicKey": "5CoDbXxoqnvJpx9GrS6M4G5GYJXh9rcoiXJz7RYTPVkL", "proofs": [ "2EjF9b77pRXmZ8FP3GSELPmTyT67hdzahW6ACCjpy1ZrJFqN8tcvnZoFkC7AKy9gST8d9N6X322oEhvbiko9VZCq" ], "script": "base64:BgIcCAISBwoFCAgICAgSAwoBARIDCgEBEgASAwoBCFYAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAOTUlOU0hPUFBBWU1FTlQAoI0GAApEQVlfTUlMTElTAIC4mSkABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACBTNQLi4uAwkAAAIBAVQFByRtYXRjaDACBTNNLi4uCQACAQINVW5rbm93biBjaGFpbgAOYXJiaXRyYWdlRGVsYXkEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAFCkRBWV9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hbCB0byBpdHNlbGYuAWkBEm9uU3Rha2VVbnN0YWtlTGFuZAEEYWRkcgMJAQIhPQIIBQFpBmNhbGxlcgUPc3Rha2luZ0NvbnRyYWN0CQACAQIRUGVybWlzc2lvbiBkZW5pZWQEAXIJAQ1jbGFpbUludGVybmFsAgUEYWRkcgUFTVVMVDYEB2FjdGlvbnMIBQFyAl8xCQCUCgIJAM0IAgkAzQgCBQdhY3Rpb25zCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQRhZGRyCAgFAXICXzICXzEFCndsZ0Fzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMFD3N0YWtpbmdDb250cmFjdAgIBQFyAl8yAl8yBQp3bGdBc3NldElkCAUBcgJfMgDScJYw", "height": 3264881, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5eTMVtCYSrwvhFganzLDzpJPPP6PpvjvD6D7VZEP15GY Next: Das6Z2hX4mhoW5udzZvdyptL8qapbqPTA7yn5JhgiikL Diff:
OldNewDifferences
336336
337337
338338 @Callable(i)
339-func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this))
339+func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr,oldWlgContract) = if ((i.caller != this))
340340 then throw("Permission denied")
341- else if (isDefined(getBinary(wlgAssetIdKey)))
342- then throw("Already initialized")
343- else {
344- let issuedAmount = MILLION6
345- let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
346- let assetId = calculateAssetId(issue)
347-[issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)]
348- }
341+ else {
342+ let oldWlgContAddr = addressFromStringValue(oldWlgContract)
343+[IntegerEntry(wlgIssueTimeKey, valueOrElse(getInteger(oldWlgContAddr, wlgIssueTimeKey), 0)), IntegerEntry(wlgIssuedAmountKey, valueOrElse(getInteger(oldWlgContAddr, wlgIssuedAmountKey), 0)), IntegerEntry(stakersAmountPaidTotalKey, valueOrElse(getInteger(oldWlgContAddr, stakersAmountPaidTotalKey), 0)), IntegerEntry(stakersAmountLeftKey, valueOrElse(getInteger(oldWlgContAddr, stakersAmountLeftKey), 0)), BinaryEntry(wlgAssetIdKey, getBinaryValue(oldWlgContAddr, wlgAssetIdKey)), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)]
344+ }
349345
350346
351347
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT8 = 100000000
99
1010 let MINSHOPPAYMENT = 100000
1111
1212 let DAY_MILLIS = 86400000
1313
1414 let chain = take(drop(this.bytes, 1), 1)
1515
1616 let usdtAssetId = match chain {
1717 case _ =>
1818 if ((base58'2W' == $match0))
1919 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
2020 else if ((base58'2T' == $match0))
2121 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2222 else throw("Unknown chain")
2323 }
2424
2525 let defaultRestAddressStr = match chain {
2626 case _ =>
2727 if ((base58'2W' == $match0))
2828 then "3P..."
2929 else if ((base58'2T' == $match0))
3030 then "3M..."
3131 else throw("Unknown chain")
3232 }
3333
3434 let arbitrageDelay = match chain {
3535 case _ =>
3636 if ((base58'2W' == $match0))
3737 then DAY_MILLIS
3838 else if ((base58'2T' == $match0))
3939 then 60000
4040 else throw("Unknown chain")
4141 }
4242
4343 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
4444
4545
4646 let IdxCfgAcresDapp = 1
4747
4848 let IdxCfgWlgDapp = 2
4949
5050 let IdxCfgPuzzlePoolDapp = 4
5151
5252 let IdxCfgInvestFundDapp = 5
5353
5454 func keyRestCfg () = "%s__restConfig"
5555
5656
5757 func keyRestAddress () = "%s__restAddr"
5858
5959
6060 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
6161
6262
6363 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
6464
6565
6666 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
6767
6868 let restCfg = readRestCfgOrFail(restContract)
6969
7070 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
7171
7272 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
7373
7474 let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp)
7575
7676 let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp)
7777
7878 let wlgAssetIdKey = "wlg_assetId"
7979
8080 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
8181
8282 func asInt (v) = match v {
8383 case n: Int =>
8484 n
8585 case _ =>
8686 throw("fail to cast into Int")
8787 }
8888
8989
9090 let idxWlgAmount = 0
9191
9292 let idxWlgPrice = 1
9393
9494 let idxWlgFunds = 2
9595
9696 let idxWlgIssueTime = 6
9797
9898 let idxWlgMarketingAmLeft = 9
9999
100100 let idxWlgMarketingAmAvailNow = 10
101101
102102 let idxWlgTeamAmLeft = 13
103103
104104 let idxWlgTeamAmAvailNow = 14
105105
106106 let idxWlgActAmLeft = 17
107107
108108 let idxWlgActAmAvailNow = 18
109109
110110 let idxWlgAmLeftTotal = 21
111111
112112 let idxWlgUserAmAvailNow = 24
113113
114114 let idxWlgUserTotalAvail = 26
115115
116116 let idxWlgEffUserTime = 27
117117
118118 let idxWlgBankAvailNow = 28
119119
120120 func fixedPoint (val,decimals) = {
121121 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
122122 let lowPart = toString((val % tenPow))
123123 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
124124 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
125125 }
126126
127127
128128 let M6 = 1000000
129129
130130 let M8 = 100000000
131131
132132 let MILLION6 = 100000000000000
133133
134134 let MARKETINGSHARE = 100000
135135
136136 let TEAMSHARE = 200000
137137
138138 let ACTIVITYSHARE = 100000
139139
140140 let PLAYERSHARE = 400000
141141
142142 let YEARMILLIS = 31557600000
143143
144144 let BANK_FEE = 50000
145145
146146 let ch = take(drop(this.bytes, 1), 1)
147147
148148 let USDT_TVL_CORRECTION = match ch {
149149 case _ =>
150150 if ((base58'2W' == $match0))
151151 then 1208630000
152152 else if ((base58'2T' == $match0))
153153 then 0
154154 else throw("Unknown chain")
155155 }
156156
157157 let marketingAddrKey = "marketingAddr"
158158
159159 let teamAddrKey = "teamAddr"
160160
161161 let lastMarketingTimeKey = "lastClaimedTime_marketing"
162162
163163 let marketingAmountLeftKey = "marketingAmountLeft"
164164
165165 let lastTeamTimeKey = "lastClaimedTime_team"
166166
167167 let teamAmountLeftKey = "teamAmountLeft"
168168
169169 let lastActivitiesTimeKey = "lastClaimedTime_activities"
170170
171171 let actAmountLeftKey = "activitiesAmountLeft"
172172
173173 let stakersAmountLeftKey = "stakersAmountLeft"
174174
175175 func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr)
176176
177177
178178 func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr)
179179
180180
181181 func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6))
182182
183183
184184 let wlgIssueTimeKey = "wlg_issueTime"
185185
186186 let wlgIssuedAmountKey = "wlg_issuedAmount"
187187
188188 let zbIssuedAmountKey = "zbill_issuedAmount"
189189
190190 func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr)
191191
192192
193193 let acresStakedTotalKey = "acresStakedAmountTotal"
194194
195195 let dappRest = 0
196196
197197 let dappStaking = 1
198198
199199 let dappWlg = 2
200200
201201 let dappPuzzle = 3
202202
203203 let dappInvestFund = 4
204204
205205 func getLands (userAddrStrOrEmpty,stakingContract) = {
206206 let totalAcres = valueOrElse(getInteger(stakingContract, acresStakedTotalKey), 0)
207207 let userAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0)
208208 [totalAcres, userAcres]
209209 }
210210
211211
212212 let idxTotalAcres = 0
213213
214214 let idxUserAcres = 1
215215
216216 func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = {
217217 let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet")
218218 let restUsd = assetBalance(contracts[dappRest], usdtId)
219219 let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection)
220220 let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId)
221221 let investFndContract = contracts[dappInvestFund]
222222 let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0))
223223 let totalFundsUsd = (wlgUsd + investFundTotal)
224224 let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet")
225225 let now = lastBlock.timestamp
226226 let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized")
227227 let marketingTotal = fraction(MILLION6, MARKETINGSHARE, M6)
228228 let marketingAmountLeft = valueOrElse(getInteger(contracts[dappWlg], marketingAmountLeftKey), marketingTotal)
229229 let lastMarketingTime = valueOrElse(getInteger(contracts[dappWlg], lastMarketingTimeKey), issueTime)
230230 let marketingAddr = addressFromStringValue(value(getString(contracts[dappWlg], marketingAddrKey)))
231231 let marketingTemp = min([fraction(marketingTotal, (now - lastMarketingTime), YEARMILLIS), marketingAmountLeft])
232232 let bankFromMarketing = fraction(marketingTemp, BANK_FEE, M6)
233233 let marketingAmountAvailableNow = (marketingTemp - bankFromMarketing)
234234 let marketingWlgold = assetBalance(marketingAddr, wlgId)
235235 let bankWlgold = assetBalance(contracts[dappStaking], wlgId)
236236 let teamTotal = fraction(MILLION6, TEAMSHARE, M6)
237237 let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal)
238238 let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime)
239239 let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey)))
240240 let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft])
241241 let teamWlgold = assetBalance(teamAddr, wlgId)
242242 let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6)
243243 let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal)
244244 let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime)
245245 let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft])
246246 let actWlgold = assetBalance(contracts[dappRest], wlgId)
247247 let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime)
248248 let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS)
249249 let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))])
250250 let curPeriod = min([((now - issueTime) / YEARMILLIS), 2])
251251 let eff = getLands(userAddrOpt, contracts[dappStaking])
252252 let curPeriodDistribution = distributionByPeriod(curPeriod)
253253 let $t079119 = if ((lastUserPeriod == curPeriod))
254254 then {
255255 let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
256256 let userPart = fraction(a0, userProportion6, M6)
257257 let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6))
258258 $Tuple3(userPart, a0, effTime)
259259 }
260260 else if ((lastUserPeriod == (curPeriod - 1)))
261261 then {
262262 let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS)
263263 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
264264 let avail = (a1 + a0)
265265 let userPart = fraction(avail, userProportion6, M6)
266266 let effTime = if ((a1 >= userPart))
267267 then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1))))
268268 else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution))
269269 $Tuple3(userPart, avail, effTime)
270270 }
271271 else {
272272 let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS)
273273 let a1 = distributionByPeriod((curPeriod - 1))
274274 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
275275 let avail = ((a2 + a1) + a0)
276276 let userPart = fraction(avail, userProportion6, M6)
277277 let effTime = if ((a2 >= userPart))
278278 then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2))))
279279 else if (((a2 + a1) >= userPart))
280280 then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1))))
281281 else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution))
282282 $Tuple3(userPart, avail, effTime)
283283 }
284284 let userAmount = $t079119._1
285285 let userAvailable = $t079119._2
286286 let effLastTime = $t079119._3
287287 let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0)
288288 let userTemp = fraction(userAmount, eff[idxUserAcres], eff[idxTotalAcres])
289289 let bankFromUser = fraction(userTemp, BANK_FEE, M6)
290290 let robbedUser = (userTemp - bankFromUser)
291291 let unrobbedUser = fraction(userAvailable, eff[idxUserAcres], eff[idxTotalAcres])
292292 [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, investFundTotal, unrobbedUser, effLastTime, (bankFromMarketing + bankFromUser), bankWlgold]
293293 }
294294
295295
296296 let profitAddrKey = "profitAddr"
297297
298298 let stakersAmountPaidTotalKey = "stakersAmountPaidTotal"
299299
300300 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
301301
302302
303303 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
304304
305305
306306 func getSwapLimitWlg (addr) = {
307307 let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0)
308308 let now = lastBlock.timestamp
309309 if ((arbitrageDelay > (now - lastTime)))
310310 then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min"))
311311 else {
312312 let acresAmount = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(addr)), 0)
313313 acresAmount
314314 }
315315 }
316316
317317
318318 func claimInternal (addr,proportion6) = {
319319 let caller = addressFromStringValue(addr)
320320 let curStats = getWlgStats(addr, [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6)
321321 let now = lastBlock.timestamp
322322 let issueTime = curStats[idxWlgIssueTime]
323323 let marketingAmountLeft = curStats[idxWlgMarketingAmLeft]
324324 let marketingAmount = curStats[idxWlgMarketingAmAvailNow]
325325 let teamAmountLeft = curStats[idxWlgTeamAmLeft]
326326 let teamAmount = curStats[idxWlgTeamAmAvailNow]
327327 let actAmountLeft = curStats[idxWlgActAmLeft]
328328 let actAmount = curStats[idxWlgActAmAvailNow]
329329 let userAmount = curStats[idxWlgUserAmAvailNow]
330330 let userKey = keyStakersAmountPaidUser(addr)
331331 let userTotal = curStats[idxWlgUserTotalAvail]
332332 let userEffTime = curStats[idxWlgEffUserTime]
333333 let bankAmount = curStats[idxWlgBankAvailNow]
334334 $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(marketingAmountLeftKey, (marketingAmountLeft - marketingAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], $Tuple2(userAmount, bankAmount))
335335 }
336336
337337
338338 @Callable(i)
339-func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this))
339+func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr,oldWlgContract) = if ((i.caller != this))
340340 then throw("Permission denied")
341- else if (isDefined(getBinary(wlgAssetIdKey)))
342- then throw("Already initialized")
343- else {
344- let issuedAmount = MILLION6
345- let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
346- let assetId = calculateAssetId(issue)
347-[issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)]
348- }
341+ else {
342+ let oldWlgContAddr = addressFromStringValue(oldWlgContract)
343+[IntegerEntry(wlgIssueTimeKey, valueOrElse(getInteger(oldWlgContAddr, wlgIssueTimeKey), 0)), IntegerEntry(wlgIssuedAmountKey, valueOrElse(getInteger(oldWlgContAddr, wlgIssuedAmountKey), 0)), IntegerEntry(stakersAmountPaidTotalKey, valueOrElse(getInteger(oldWlgContAddr, stakersAmountPaidTotalKey), 0)), IntegerEntry(stakersAmountLeftKey, valueOrElse(getInteger(oldWlgContAddr, stakersAmountLeftKey), 0)), BinaryEntry(wlgAssetIdKey, getBinaryValue(oldWlgContAddr, wlgAssetIdKey)), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)]
344+ }
349345
350346
351347
352348 @Callable(i)
353349 func buyWlg (minAmount) = {
354350 let prologResult = prolog()
355351 if ((prologResult == prologResult))
356352 then if ((size(i.payments) != 1))
357353 then throw("exactly 1 payment must be attached")
358354 else {
359355 let pmt = i.payments[0]
360356 let usdtAmt = pmt.amount
361357 if (if (!(isDefined(pmt.assetId)))
362358 then true
363359 else (value(pmt.assetId) != usdtAssetId))
364360 then throw("USDT payments only!")
365361 else {
366362 let caller = i.caller
367363 let addr = toString(caller)
368364 if ((MINSHOPPAYMENT > usdtAmt))
369365 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
370366 else {
371367 let curStats = getWlgStats("", [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6)
372368 let curWlgAmount = curStats[idxWlgAmount]
373369 let fundsUsd = curStats[idxWlgFunds]
374370 let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount)
375371 let buyPrice = fraction(wlgPrice, 6, 5)
376372 let wlgAmount = fraction(usdtAmt, MULT8, buyPrice)
377373 let maxWlg = getSwapLimitWlg(addr)
378374 if ((wlgAmount > maxWlg))
379375 then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
380376 else if ((minAmount > wlgAmount))
381377 then throw("Price changed during operation, please try again")
382378 else {
383379 let profitAmount = (usdtAmt / 6)
384380 let deltaFunds = (usdtAmt - profitAmount)
385381 let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd)
386382 $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult)
387383 }
388384 }
389385 }
390386 }
391387 else throw("Strict value is not equal to itself.")
392388 }
393389
394390
395391
396392 @Callable(i)
397393 func sellWlg (minAmount) = {
398394 let prologResult = prolog()
399395 if ((prologResult == prologResult))
400396 then if ((size(i.payments) != 1))
401397 then throw("exactly 1 payment must be attached")
402398 else {
403399 let pmt = i.payments[0]
404400 let wlgAmt = pmt.amount
405401 let caller = i.caller
406402 let addr = toString(caller)
407403 let maxWlg = getSwapLimitWlg(addr)
408404 if ((wlgAmt > maxWlg))
409405 then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
410406 else if (if (!(isDefined(pmt.assetId)))
411407 then true
412408 else (value(pmt.assetId) != wlgAssetId))
413409 then throw("WLGOLD payments only!")
414410 else {
415411 let curStats = getWlgStats("", [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6)
416412 let curWlgAmount = curStats[idxWlgAmount]
417413 let sellPrice = fraction(curStats[idxWlgPrice], 4, 5)
418414 let usdtAmt = fraction(wlgAmt, sellPrice, MULT8)
419415 if ((MINSHOPPAYMENT > usdtAmt))
420416 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
421417 else if ((minAmount > usdtAmt))
422418 then throw("Price changed during operation, please try again")
423419 else {
424420 let profitAmount = (usdtAmt / 4)
425421 $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - wlgAmt)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult)
426422 }
427423 }
428424 }
429425 else throw("Strict value is not equal to itself.")
430426 }
431427
432428
433429
434430 @Callable(i)
435431 func claim () = {
436432 let prologResult = prolog()
437433 if ((prologResult == prologResult))
438434 then if ((size(i.payments) != 0))
439435 then throw("No payments required")
440436 else {
441437 let r = claimInternal(toString(i.caller), MULT6)
442438 let actions = r._1
443439 $Tuple2(((actions :+ ScriptTransfer(i.caller, r._2._1, wlgAssetId)) :+ ScriptTransfer(stakingContract, r._2._2, wlgAssetId)), prologResult)
444440 }
445441 else throw("Strict value is not equal to itself.")
446442 }
447443
448444
449445
450446 @Callable(i)
451447 func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract))
452448 then throw("Permission denied")
453449 else {
454450 let r = claimInternal(addr, MULT6)
455451 let actions = r._1
456452 $Tuple2(((actions :+ ScriptTransfer(addressFromStringValue(addr), r._2._1, wlgAssetId)) :+ ScriptTransfer(stakingContract, r._2._2, wlgAssetId)), r._2)
457453 }
458454
459455

github/deemru/w8io/169f3d6 
59.48 ms