tx · ButLAkeJDdpehchQ3czV3PWrdeoC1MXvUhvUh1xcaMZX

3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy:  -0.01500000 Waves

2023.06.19 14:45 [2629465] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves

{ "type": 13, "id": "ButLAkeJDdpehchQ3czV3PWrdeoC1MXvUhvUh1xcaMZX", "fee": 1500000, "feeAssetId": null, "timestamp": 1687175251490, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "2Fws7JbT1g8GYFFiD6QRNo82jbFoFA1MjzcEcgQDZCPwo4H7NfDcm7ChX8HjBDF25vAjfDETUFedryujqUxBMnNS" ], "script": "base64:BgIPCAISBQoDCAgIEgASABIAkwEABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgARSW5mcmFVcGdyYWRlQ29zdFMEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAgMivoCUDCQAAAgEBVAUHJG1hdGNoMACA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dlckVudHJ5AgUHdXNlcktleQkAZAIJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUHdXNlcktleQAABQp1c2VyQW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCBRlzdGFrZXJzQW1vdW50UGFpZFRvdGFsS2V5CQBkAgkBC3ZhbHVlT3JFbHNlAgkAnwgBBRlzdGFrZXJzQW1vdW50UGFpZFRvdGFsS2V5AAAFCnVzZXJBbW91bnQJAMwIAgkBDEludGVnZXJFbnRyeQIFFHN0YWtlcnNBbW91bnRMZWZ0S2V5CQBlAgUPYW1vdW50TGVmdFRvdGFsBQp1c2VyQW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCBRRsYXN0TWFya2V0aW5nVGltZUtleQUDbm93CQDMCAIJAQxJbnRlZ2VyRW50cnkCBQ9sYXN0VGVhbVRpbWVLZXkFA25vdwkAzAgCCQEMSW50ZWdlckVudHJ5AgUVbGFzdEFjdGl2aXRpZXNUaW1lS2V5BQNub3cJAMwIAgkBDEludGVnZXJFbnRyeQIFC3VzZXJUaW1lS2V5BQNub3cFA25pbAUMcHJvbG9nUmVzdWx0AMaW6Y0=", "height": 2629465, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6QJENVqWfBiNxmp9p3wSFhtSCNxJ1yiCq2echg6uYU1E Next: EzSzww8dnq91LsQU6U4E6YKet1JSnCsbBML4KAYcgyzA Diff:
OldNewDifferences
451451
452452 func getWlgStats () = {
453453 let issuedAmount = valueOrErrorMessage(getInteger(wlgIssuedAmountKey), "WLGOLD is not issued yet")
454- let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(this, usdtAssetId))
454+ let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(wlgContract, usdtAssetId))
455455 [issuedAmount, fraction(funds, MULT8, issuedAmount), funds]
456456 }
457457
515515
516516
517517 @Callable(i)
518-func sellWlg (amount) = {
518+func sellWlg () = {
519519 let prologResult = prolog()
520520 if ((size(i.payments) != 1))
521521 then throw("exactly 1 payment must be attached")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chain = take(drop(this.bytes, 1), 1)
55
66 let usdtAssetId = match chain {
77 case _ =>
88 if ((base58'2W' == $match0))
99 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
1010 else if ((base58'2T' == $match0))
1111 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
1212 else throw("Unknown chain")
1313 }
1414
1515 let defaultRestAddressStr = match chain {
1616 case _ =>
1717 if ((base58'2W' == $match0))
1818 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
1919 else if ((base58'2T' == $match0))
2020 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
2121 else throw("Unknown chain")
2222 }
2323
2424 let InfraUpgradeCostS = match chain {
2525 case _ =>
2626 if ((base58'2W' == $match0))
2727 then 10000000000
2828 else if ((base58'2T' == $match0))
2929 then 100000000
3030 else throw("Unknown chain")
3131 }
3232
3333 let SEP = "__"
3434
3535 let MULT6 = 1000000
3636
3737 let MULT7 = 10000000
3838
3939 let MULT8 = 100000000
4040
4141 let MULT10 = 10000000000
4242
4343 let LANDPREFIX = "LAND"
4444
4545 let DUCKPREFIX = "DUCK"
4646
4747 let ARTPRESALE = "PRESALE"
4848
4949 let NUMRES = 6
5050
5151 let SSIZE = 25
5252
5353 let MSIZE = 100
5454
5555 let LSIZE = 225
5656
5757 let XLSIZE = 400
5858
5959 let XXLSIZE = 625
6060
6161 let DAILYRESBYPIECE = 3456000
6262
6363 let DAYMILLIS = 86400000
6464
6565 let WHMULTIPLIER = 10000000000
6666
6767 let DEFAULTLOCATION = "Africa_F_Africa"
6868
6969 let RESOURCEPRICEMIN = 39637
7070
7171 let ESMAXPACKAGES = 3
7272
7373 let ESBUYCOEF = 4
7474
7575 let ESSELLCOEF = 10
7676
7777 let MAXHP = 100
7878
7979 let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
8080
8181 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
8282
8383 let prodTypes = ["First Aid Kit L1", "First Aid Kit L2", "First Aid Kit L3", "Backpack L1", "Backpack L2", "Backpack L3", "Food Ration L1", "Food Ration L2", "Food Ration L3", "Jet Pack L1", "Jet Pack L2", "Jet Pack L3", "Shield L1", "Shield L2", "Shield L3"]
8484
8585 let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
8686
8787 let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"]
8888
8989 let contIdxAmericas = 0
9090
9191 let contIdxEurope = 1
9292
9393 let contIdxAsia = 2
9494
9595 let contIdxAfrica = 3
9696
9797 let contIdxOceania = 4
9898
9999 let recipeIdxFuel = 0
100100
101101 let recipeIdxMetal = 1
102102
103103 let recipeIdxPlank = 2
104104
105105 let recipeIdxGlass = 3
106106
107107 let recipeIdxPlastic = 4
108108
109109 let recipeIdxProtein = 5
110110
111111 let recipeIdxWeight = 6
112112
113113 let recipeIdxPacksize = 7
114114
115115 let recipeIdxContinent = 8
116116
117117 let recLandNum = 0
118118
119119 let recLandSize = 1
120120
121121 let recTerrains = 2
122122
123123 let recContinent = 3
124124
125125 let whIdxLevels = 0
126126
127127 let whIdxRes = 1
128128
129129 let whIdxMat = 2
130130
131131 let whIdxProd = 3
132132
133133 let whIdxLOFT = 4
134134
135135 let volLocked = 0
136136
137137 let volOccupied = 1
138138
139139 let volFree = 2
140140
141141 let volTotal = 3
142142
143143 let bpIdxLevel = 0
144144
145145 let bpIdxRes = 1
146146
147147 let bpIdxMat = 2
148148
149149 let bpIdxProd = 3
150150
151151 func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize])
152152
153153
154154 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
155155
156156
157157 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
158158
159159
160160 let IdxCfgStakingDapp = 1
161161
162162 let IdxCfgEconomyDapp = 2
163163
164164 let IdxCfgGovernanceDapp = 3
165165
166166 let IdxCfgWlgDapp = 4
167167
168168 func keyRestCfg () = "%s__restConfig"
169169
170170
171171 func keyRestAddress () = "%s__restAddr"
172172
173173
174174 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
175175
176176
177177 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
178178
179179
180180 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
181181
182182 let restCfg = readRestCfgOrFail(restContract)
183183
184184 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
185185
186186 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
187187
188188 let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp)
189189
190190 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
191191
192192 func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
193193
194194
195195 func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
196196
197197
198198 func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId)
199199
200200
201201 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
202202
203203
204204 func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId)
205205
206206
207207 func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_")
208208
209209
210210 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
211211
212212
213213 func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId)
214214
215215
216216 func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr)
217217
218218
219219 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
220220
221221
222222 func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId)
223223
224224
225225 func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
226226
227227
228228 func keyAddressRefBy (addr) = ("accRefBy_" + addr)
229229
230230
231231 func keyAddressReferrals (addr) = ("accReferrals_" + addr)
232232
233233
234234 func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
235235
236236
237237 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
238238
239239
240240 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
241241
242242
243243 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
244244
245245
246246 func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
247247
248248
249249 func keyResProportions () = "resTypesProportions"
250250
251251
252252 func keyBlocked () = "contractsBlocked"
253253
254254
255255 func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr)
256256
257257
258258 func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
259259
260260
261261 func keyEsWarehouse () = "emergencyWarehouseProducts"
262262
263263
264264 let locIdxContinent = 0
265265
266266 let locIdxType = 1
267267
268268 let locIdxId = 2
269269
270270 func asString (v) = match v {
271271 case s: String =>
272272 s
273273 case _ =>
274274 throw("fail to cast into String")
275275 }
276276
277277
278278 func asInt (v) = match v {
279279 case n: Int =>
280280 n
281281 case _ =>
282282 throw("fail to cast into Int")
283283 }
284284
285285
286286 func asAnyList (v) = match v {
287287 case l: List[Any] =>
288288 l
289289 case _ =>
290290 throw("fail to cast into List[Any]")
291291 }
292292
293293
294294 func asBoolean (v) = match v {
295295 case s: Boolean =>
296296 s
297297 case _ =>
298298 throw("fail to cast into Boolean")
299299 }
300300
301301
302302 func numPiecesBySize (landSize) = match landSize {
303303 case _ =>
304304 if (("S" == $match0))
305305 then SSIZE
306306 else if (("M" == $match0))
307307 then MSIZE
308308 else if (("L" == $match0))
309309 then LSIZE
310310 else if (("XL" == $match0))
311311 then XLSIZE
312312 else if (("XXL" == $match0))
313313 then XXLSIZE
314314 else throw("Unknown land size")
315315 }
316316
317317
318318 let IdxEffTotal = 0
319319
320320 let IdxEffUser = 1
321321
322322 func getVotingPower (userAddrStrOrEmpty) = {
323323 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
324324 func adder (acc,item) = (acc + parseIntValue(item))
325325
326326 let totalPower = {
327327 let $l = props
328328 let $s = size($l)
329329 let $acc0 = 0
330330 func $f0_1 ($a,$i) = if (($i >= $s))
331331 then $a
332332 else adder($a, $l[$i])
333333
334334 func $f0_2 ($a,$i) = if (($i >= $s))
335335 then $a
336336 else throw("List size exceeds 6")
337337
338338 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
339339 }
340340 let usersPower = if ((userAddrStrOrEmpty == ""))
341341 then 0
342342 else {
343343 let landsStr = getString(stakingContract, keyStakedLandsByOwner(userAddrStrOrEmpty))
344344 let lands = if (isDefined(landsStr))
345345 then split_51C(value(landsStr), "_")
346346 else nil
347347 func oneLand (acc,landAssetId) = {
348348 let asset = value(assetInfo(fromBase58String(landAssetId)))
349349 let landSize = split(asset.description, "_")[recLandSize]
350350 (acc + numPiecesBySize(landSize))
351351 }
352352
353353 let $l = lands
354354 let $s = size($l)
355355 let $acc0 = 0
356356 func $f1_1 ($a,$i) = if (($i >= $s))
357357 then $a
358358 else oneLand($a, $l[$i])
359359
360360 func $f1_2 ($a,$i) = if (($i >= $s))
361361 then $a
362362 else throw("List size exceeds 100")
363363
364364 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
365365 }
366366 [totalPower, usersPower]
367367 }
368368
369369
370370 func getRecipeMaterials (recipe) = {
371371 func addMat (ac,j) = (ac + parseIntValue(recipe[j]))
372372
373373 let $l = [0, 1, 2, 3, 4, 5]
374374 let $s = size($l)
375375 let $acc0 = 0
376376 func $f0_1 ($a,$i) = if (($i >= $s))
377377 then $a
378378 else addMat($a, $l[$i])
379379
380380 func $f0_2 ($a,$i) = if (($i >= $s))
381381 then $a
382382 else throw("List size exceeds 6")
383383
384384 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
385385 }
386386
387387
388388 let MULT14 = 100000000000000
389389
390390 let MARKETINGSHARE = 100000
391391
392392 let TEAMSHARE = 200000
393393
394394 let ACTIVITYSHARE = 100000
395395
396396 let PLAYERSHARE = 400000
397397
398398 let YEARMILLIS = 31557600000
399399
400400 let WEEKMILLIS = 604800000
401401
402402 let MAXPERIOD = 156
403403
404404 let TENMINUTESMILLIS = 600000
405405
406406 let A6 = 100000000
407407
408408 let B8 = 50000000
409409
410410 let wlgAssetIdKey = "wlg_assetId"
411411
412412 let wlgIssueTimeKey = "wlg_issueTime"
413413
414414 let wlgIssuedAmountKey = "wlg_issuedAmount"
415415
416416 let marketingAddrKey = "marketingAddr"
417417
418418 let teamAddrKey = "teamAddr"
419419
420420 let lastMarketingTimeKey = "lastClaimedTime_marketing"
421421
422422 let lastTeamTimeKey = "lastClaimedTime_team"
423423
424424 let lastActivitiesTimeKey = "lastClaimedTime_activities"
425425
426426 func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr)
427427
428428
429429 func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr)
430430
431431
432432 let stakersAmountLeftKey = "stakersAmountLeft"
433433
434434 let stakersAmountPaidTotalKey = "stakersAmountPaidTotal"
435435
436436 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
437437
438438
439439 let idxWlgAmount = 0
440440
441441 let idxWlgPrice = 1
442442
443443 let idxWlgFunds = 2
444444
445445 let wlgAssetId = valueOrErrorMessage(getBinary(wlgAssetIdKey), "Not initialized yet")
446446
447447 func prolog () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
448448 then throw("Contracts are under maintenance")
449449 else asInt(invoke(stakingContract, "saveLastTx", nil, nil))
450450
451451
452452 func getWlgStats () = {
453453 let issuedAmount = valueOrErrorMessage(getInteger(wlgIssuedAmountKey), "WLGOLD is not issued yet")
454- let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(this, usdtAssetId))
454+ let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(wlgContract, usdtAssetId))
455455 [issuedAmount, fraction(funds, MULT8, issuedAmount), funds]
456456 }
457457
458458
459459 func getSwapLimit (addr) = {
460460 let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0)
461461 let now = lastBlock.timestamp
462462 if ((TENMINUTESMILLIS > (now - lastTime)))
463463 then throw("Arbitrages are possible once a 10 minutes")
464464 else {
465465 let pieces = getVotingPower(addr)[IdxEffUser]
466466 let pow8 = pow(pieces, 0, B8, 8, 8, CEILING)
467467 fraction(A6, pow8, MULT8)
468468 }
469469 }
470470
471471
472472 @Callable(i)
473473 func constructorV1 (restAddr,marketingAddr,teamAddr) = if ((i.caller != this))
474474 then throw("Permission denied")
475475 else if (isDefined(getBinary(wlgAssetIdKey)))
476476 then throw("Already initialized")
477477 else {
478478 let issuedAmount = MULT14
479479 let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
480480 let assetId = calculateAssetId(issue)
481481 [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MULT14, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr)]
482482 }
483483
484484
485485
486486 @Callable(i)
487487 func buyWlg () = {
488488 let prologResult = prolog()
489489 if ((size(i.payments) != 1))
490490 then throw("exactly 1 payment must be attached")
491491 else {
492492 let pmt = i.payments[0]
493493 let usdtAmt = pmt.amount
494494 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
495495 if ((pmtAssetId != usdtAssetId))
496496 then throw("USDT payments only!")
497497 else {
498498 let caller = i.caller
499499 let addr = toString(caller)
500500 let maxUsdt = getSwapLimit(addr)
501501 if ((usdtAmt > maxUsdt))
502502 then throw((("You can spend max " + toString(maxUsdt)) + " USDT"))
503503 else {
504504 let curStats = getWlgStats()
505505 let curAmount = curStats[idxWlgAmount]
506506 let buyPrice = fraction(curStats[idxWlgPrice], 6, 5)
507507 let wlgAmount = fraction(usdtAmt, MULT8, buyPrice)
508508 let reissued = fraction(usdtAmt, curAmount, (curStats[idxWlgFunds] - usdtAmt))
509509 $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult)
510510 }
511511 }
512512 }
513513 }
514514
515515
516516
517517 @Callable(i)
518-func sellWlg (amount) = {
518+func sellWlg () = {
519519 let prologResult = prolog()
520520 if ((size(i.payments) != 1))
521521 then throw("exactly 1 payment must be attached")
522522 else {
523523 let pmt = i.payments[0]
524524 let wlgAmt = pmt.amount
525525 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
526526 if ((pmtAssetId != wlgAssetId))
527527 then throw("WLGOLD payments only!")
528528 else {
529529 let caller = i.caller
530530 let addr = toString(caller)
531531 let maxUsdt = getSwapLimit(addr)
532532 let curStats = getWlgStats()
533533 let curAmount = (curStats[idxWlgAmount] - wlgAmt)
534534 let curPrice = curStats[idxWlgPrice]
535535 let sellPrice = (curPrice - (curPrice / 5))
536536 let usdtAmount = fraction(wlgAmt, sellPrice, MULT8)
537537 if ((usdtAmount > maxUsdt))
538538 then throw((("You can get max " + toString(maxUsdt)) + " USDT"))
539539 else {
540540 let burned = fraction(usdtAmount, curAmount, curStats[idxWlgFunds])
541541 $Tuple2([Burn(wlgAssetId, burned), IntegerEntry(wlgIssuedAmountKey, (curAmount - burned)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(caller, usdtAmount, usdtAssetId)], prologResult)
542542 }
543543 }
544544 }
545545 }
546546
547547
548548
549549 @Callable(i)
550550 func claim () = {
551551 let prologResult = prolog()
552552 let caller = i.caller
553553 let callerAddr = toString(caller)
554554 let now = lastBlock.timestamp
555555 let issueTime = valueOrErrorMessage(getInteger(wlgIssueTimeKey), "Not initialized")
556556 let lastMarketingTime = valueOrElse(getInteger(lastMarketingTimeKey), issueTime)
557557 let marketingAddr = addressFromStringValue(value(getString(marketingAddrKey)))
558558 let marketingAmount = fraction(fraction(MULT14, MARKETINGSHARE, MULT6), (now - lastMarketingTime), YEARMILLIS)
559559 let lastTeamTime = valueOrElse(getInteger(lastTeamTimeKey), issueTime)
560560 let teamAddr = addressFromStringValue(value(getString(teamAddrKey)))
561561 let teamAmount = fraction(fraction(MULT14, TEAMSHARE, MULT6), (now - lastTeamTime), (3 * YEARMILLIS))
562562 let lastActivitiesTime = valueOrElse(getInteger(lastActivitiesTimeKey), issueTime)
563563 let actAmount = fraction(fraction(MULT14, ACTIVITYSHARE, MULT6), (now - lastActivitiesTime), (3 * YEARMILLIS))
564564 let curPeriod = ((now - issueTime) / WEEKMILLIS)
565565 if ((curPeriod > (MAXPERIOD / 2)))
566566 then throw("Please modify contract for next 1.5 years, according to stats")
567567 else {
568568 let eff = getVotingPower(callerAddr)
569569 let totalPieces = eff[IdxEffTotal]
570570 let amountLeftTotal = valueOrElse(getInteger(stakersAmountLeftKey), 0)
571571 let curPeriodDistribution = fraction(amountLeftTotal, (2 * totalPieces), (totalPieces + (max([100000, totalPieces]) * (MAXPERIOD - curPeriod))))
572572 let userTimeKey = keyLastClaimedTimeByUser(callerAddr)
573573 let lastUserTime = valueOrElse(getInteger(userTimeKey), issueTime)
574574 let userAmount = fraction(fraction(curPeriodDistribution, eff[IdxEffUser], totalPieces), (now - lastUserTime), (3 * YEARMILLIS))
575575 let userKey = keyStakersAmountPaidUser(callerAddr)
576576 $Tuple2([ScriptTransfer(marketingAddr, marketingAmount, wlgAssetId), ScriptTransfer(teamAddr, teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userAmount)), IntegerEntry(stakersAmountLeftKey, (amountLeftTotal - userAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(userTimeKey, now)], prologResult)
577577 }
578578 }
579579
580580

github/deemru/w8io/026f985 
82.67 ms