tx · Cyb8hCxo8i4m7RVwPD9uzviw4WkWkshEPUimvLtD2Fmv

3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy:  -0.01100000 Waves

2023.06.28 20:30 [2642805] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves

{ "type": 13, "id": "Cyb8hCxo8i4m7RVwPD9uzviw4WkWkshEPUimvLtD2Fmv", "fee": 1100000, "feeAssetId": null, "timestamp": 1687973494058, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "64MLcuH2utNwq2af5HLZuv53G5KNqzQkWoeTDVQPrr2vagh7TbKA77D1Xd6Kzf6HgdzhFsJuMAwGk48AYXKwLWwb" ], "script": "base64:BgIZCAISBQoDCAgIEgASABIAEgMKAQgSAwoBCEIBCmtleUJsb2NrZWQAAhBjb250cmFjdHNCbG9ja2VkAAtJZHhFZmZUb3RhbAAAAApJZHhFZmZVc2VyAAEABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgADU0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IhPQIIBQFpBmNhbGxlcgUPc3Rha2luZ0NvbnRyYWN0CQACAQIRUGVybWlzc2lvbiBkZW5pZWQJAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBCQEYa2V5TGFzdENsYWltZWRUaW1lQnlVc2VyAQUEYWRkcgUDbmlsAAAAfXyqMw==", "height": 2642805, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 466abnDDzXoaujQ9XYrdQ9f4BnXDSkkWyCUSpdmVPBGp Next: 3RGwQj4cUoEMVvJbuDmiiqREfYbdCAdSFUape7GHDtVY Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func keyBlocked () = "contractsBlocked"
5+
6+
7+let IdxEffTotal = 0
8+
9+let IdxEffUser = 1
10+
411 let chain = take(drop(this.bytes, 1), 1)
512
613 let usdtAssetId = match chain {
2128 else throw("Unknown chain")
2229 }
2330
24-let InfraUpgradeCostS = match chain {
25- case _ =>
26- if ((base58'2W' == $match0))
27- then 10000000000
28- else if ((base58'2T' == $match0))
29- then 100000000
30- else throw("Unknown chain")
31-}
32-
3331 let SEP = "__"
3432
3533 let MULT6 = 1000000
3634
37-let MULT7 = 10000000
38-
3935 let MULT8 = 100000000
40-
41-let MULT10 = 10000000000
42-
43-let LANDPREFIX = "LAND"
44-
45-let DUCKPREFIX = "DUCK"
46-
47-let ARTPRESALE = "PRESALE"
48-
49-let NUMRES = 6
5036
5137 let SSIZE = 25
5238
5844
5945 let XXLSIZE = 625
6046
61-let DAILYRESBYPIECE = 3456000
62-
63-let DAYMILLIS = 86400000
64-
65-let WHMULTIPLIER = 10000000000
66-
67-let DEFAULTLOCATION = "Africa_F_Africa"
68-
69-let RESOURCEPRICEMIN = 39637
70-
71-let ESMAXPACKAGES = 3
72-
73-let ESBUYCOEF = 4
74-
75-let ESSELLCOEF = 10
76-
77-let MAXHP = 100
78-
79-let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
80-
81-let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
82-
83-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"]
84-
85-let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
86-
87-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"]
88-
89-let contIdxAmericas = 0
90-
91-let contIdxEurope = 1
92-
93-let contIdxAsia = 2
94-
95-let contIdxAfrica = 3
96-
97-let contIdxOceania = 4
98-
99-let recipeIdxFuel = 0
100-
101-let recipeIdxMetal = 1
102-
103-let recipeIdxPlank = 2
104-
105-let recipeIdxGlass = 3
106-
107-let recipeIdxPlastic = 4
108-
109-let recipeIdxProtein = 5
110-
111-let recipeIdxWeight = 6
112-
113-let recipeIdxPacksize = 7
114-
115-let recipeIdxContinent = 8
116-
117-let recLandNum = 0
118-
119-let recLandSize = 1
120-
121-let recTerrains = 2
122-
123-let recContinent = 3
124-
125-let whIdxLevels = 0
126-
127-let whIdxRes = 1
128-
129-let whIdxMat = 2
130-
131-let whIdxProd = 3
132-
133-let whIdxLOFT = 4
134-
135-let volLocked = 0
136-
137-let volOccupied = 1
138-
139-let volFree = 2
140-
141-let volTotal = 3
142-
143-let bpIdxLevel = 0
144-
145-let bpIdxRes = 1
146-
147-let bpIdxMat = 2
148-
149-let bpIdxProd = 3
150-
151-func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize])
152-
153-
15447 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
155-
156-
157-func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
15848
15949
16050 let IdxCfgStakingDapp = 1
16151
16252 let IdxCfgEconomyDapp = 2
16353
164-let IdxCfgGovernanceDapp = 3
54+let IdxCfgWlgDapp = 4
16555
166-let IdxCfgWlgDapp = 4
56+let IdxCfgPuzzlePoolDapp = 5
16757
16858 func keyRestCfg () = "%s__restConfig"
16959
18575
18676 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
18777
188-let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp)
189-
19078 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
19179
192-func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
80+let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp)
19381
82+let recLandSize = 1
19483
195-func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
196-
197-
198-func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId)
199-
200-
201-func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
202-
203-
204-func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId)
205-
206-
207-func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_")
208-
209-
210-func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
211-
212-
213-func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId)
84+func keyResProportions () = "resTypesProportions"
21485
21586
21687 func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr)
21788
21889
219-func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
90+let wlgIssuedAmountKey = "wlg_issuedAmount"
22091
92+let idxWlgAmount = 0
22193
222-func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId)
94+let idxWlgPrice = 1
22395
224-
225-func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
226-
227-
228-func keyAddressRefBy (addr) = ("accRefBy_" + addr)
229-
230-
231-func keyAddressReferrals (addr) = ("accReferrals_" + addr)
232-
233-
234-func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
235-
236-
237-func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
238-
239-
240-func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
241-
242-
243-func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
244-
245-
246-func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
247-
248-
249-func keyResProportions () = "resTypesProportions"
250-
251-
252-func keyBlocked () = "contractsBlocked"
253-
254-
255-func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr)
256-
257-
258-func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
259-
260-
261-func keyEsWarehouse () = "emergencyWarehouseProducts"
262-
263-
264-let locIdxContinent = 0
265-
266-let locIdxType = 1
267-
268-let locIdxId = 2
269-
270-func asString (v) = match v {
271- case s: String =>
272- s
273- case _ =>
274- throw("fail to cast into String")
275-}
276-
96+let idxWlgFunds = 2
27797
27898 func asInt (v) = match v {
27999 case n: Int =>
280100 n
281101 case _ =>
282102 throw("fail to cast into Int")
283-}
284-
285-
286-func asAnyList (v) = match v {
287- case l: List[Any] =>
288- l
289- case _ =>
290- throw("fail to cast into List[Any]")
291-}
292-
293-
294-func asBoolean (v) = match v {
295- case s: Boolean =>
296- s
297- case _ =>
298- throw("fail to cast into Boolean")
299103 }
300104
301105
314118 else throw("Unknown land size")
315119 }
316120
317-
318-let IdxEffTotal = 0
319-
320-let IdxEffUser = 1
321121
322122 func getVotingPower (userAddrStrOrEmpty) = {
323123 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
367167 }
368168
369169
370-func getRecipeMaterials (recipe) = {
371- func addMat (ac,j) = (ac + parseIntValue(recipe[j]))
372-
373- let $l = [0, 1, 2, 3, 4, 5]
374- let $s = size($l)
375- let $acc0 = 0
376- func $f0_1 ($a,$i) = if (($i >= $s))
377- then $a
378- else addMat($a, $l[$i])
379-
380- func $f0_2 ($a,$i) = if (($i >= $s))
381- then $a
382- else throw("List size exceeds 6")
383-
384- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
170+func getWlgStats () = {
171+ let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmountKey), "WLGOLD is not issued yet")
172+ let economyUsd = assetBalance(economyContract, usdtAssetId)
173+ let restUsd = assetBalance(restContract, usdtAssetId)
174+ let wlgUsd = assetBalance(wlgContract, usdtAssetId)
175+ let puzzleUsd = assetBalance(puzzlePoolContract, usdtAssetId)
176+ let totalUsd = (((economyUsd + restUsd) + wlgUsd) + puzzleUsd)
177+[issuedAmount, fraction(totalUsd, MULT8, issuedAmount), totalUsd, economyUsd, restUsd, wlgUsd, puzzleUsd]
385178 }
386179
387180
411204
412205 let wlgIssueTimeKey = "wlg_issueTime"
413206
414-let wlgIssuedAmountKey = "wlg_issuedAmount"
415-
416207 let marketingAddrKey = "marketingAddr"
417208
418209 let teamAddrKey = "teamAddr"
436227 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
437228
438229
439-let idxWlgAmount = 0
440-
441-let idxWlgPrice = 1
442-
443-let idxWlgFunds = 2
444-
445230 let wlgAssetId = valueOrErrorMessage(getBinary(wlgAssetIdKey), "Not initialized yet")
446231
447232 func prolog () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
448233 then throw("Contracts are under maintenance")
449234 else asInt(invoke(stakingContract, "saveLastTx", nil, nil))
450-
451-
452-func getWlgStats () = {
453- let issuedAmount = valueOrErrorMessage(getInteger(wlgIssuedAmountKey), "WLGOLD is not issued yet")
454- let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(wlgContract, usdtAssetId))
455-[issuedAmount, fraction(funds, MULT8, issuedAmount), funds]
456- }
457235
458236
459237 func getSwapLimit (addr) = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func keyBlocked () = "contractsBlocked"
5+
6+
7+let IdxEffTotal = 0
8+
9+let IdxEffUser = 1
10+
411 let chain = take(drop(this.bytes, 1), 1)
512
613 let usdtAssetId = match chain {
714 case _ =>
815 if ((base58'2W' == $match0))
916 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
1017 else if ((base58'2T' == $match0))
1118 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
1219 else throw("Unknown chain")
1320 }
1421
1522 let defaultRestAddressStr = match chain {
1623 case _ =>
1724 if ((base58'2W' == $match0))
1825 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
1926 else if ((base58'2T' == $match0))
2027 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
2128 else throw("Unknown chain")
2229 }
2330
24-let InfraUpgradeCostS = match chain {
25- case _ =>
26- if ((base58'2W' == $match0))
27- then 10000000000
28- else if ((base58'2T' == $match0))
29- then 100000000
30- else throw("Unknown chain")
31-}
32-
3331 let SEP = "__"
3432
3533 let MULT6 = 1000000
3634
37-let MULT7 = 10000000
38-
3935 let MULT8 = 100000000
40-
41-let MULT10 = 10000000000
42-
43-let LANDPREFIX = "LAND"
44-
45-let DUCKPREFIX = "DUCK"
46-
47-let ARTPRESALE = "PRESALE"
48-
49-let NUMRES = 6
5036
5137 let SSIZE = 25
5238
5339 let MSIZE = 100
5440
5541 let LSIZE = 225
5642
5743 let XLSIZE = 400
5844
5945 let XXLSIZE = 625
6046
61-let DAILYRESBYPIECE = 3456000
62-
63-let DAYMILLIS = 86400000
64-
65-let WHMULTIPLIER = 10000000000
66-
67-let DEFAULTLOCATION = "Africa_F_Africa"
68-
69-let RESOURCEPRICEMIN = 39637
70-
71-let ESMAXPACKAGES = 3
72-
73-let ESBUYCOEF = 4
74-
75-let ESSELLCOEF = 10
76-
77-let MAXHP = 100
78-
79-let resTypes = ["Oil", "Ore", "Wood", "Sand", "Clay", "Organic"]
80-
81-let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
82-
83-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"]
84-
85-let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
86-
87-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"]
88-
89-let contIdxAmericas = 0
90-
91-let contIdxEurope = 1
92-
93-let contIdxAsia = 2
94-
95-let contIdxAfrica = 3
96-
97-let contIdxOceania = 4
98-
99-let recipeIdxFuel = 0
100-
101-let recipeIdxMetal = 1
102-
103-let recipeIdxPlank = 2
104-
105-let recipeIdxGlass = 3
106-
107-let recipeIdxPlastic = 4
108-
109-let recipeIdxProtein = 5
110-
111-let recipeIdxWeight = 6
112-
113-let recipeIdxPacksize = 7
114-
115-let recipeIdxContinent = 8
116-
117-let recLandNum = 0
118-
119-let recLandSize = 1
120-
121-let recTerrains = 2
122-
123-let recContinent = 3
124-
125-let whIdxLevels = 0
126-
127-let whIdxRes = 1
128-
129-let whIdxMat = 2
130-
131-let whIdxProd = 3
132-
133-let whIdxLOFT = 4
134-
135-let volLocked = 0
136-
137-let volOccupied = 1
138-
139-let volFree = 2
140-
141-let volTotal = 3
142-
143-let bpIdxLevel = 0
144-
145-let bpIdxRes = 1
146-
147-let bpIdxMat = 2
148-
149-let bpIdxProd = 3
150-
151-func getPkgSize (prodIdx) = parseIntValue(split(productionMatrix[prodIdx], "_")[recipeIdxPacksize])
152-
153-
15447 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
155-
156-
157-func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
15848
15949
16050 let IdxCfgStakingDapp = 1
16151
16252 let IdxCfgEconomyDapp = 2
16353
164-let IdxCfgGovernanceDapp = 3
54+let IdxCfgWlgDapp = 4
16555
166-let IdxCfgWlgDapp = 4
56+let IdxCfgPuzzlePoolDapp = 5
16757
16858 func keyRestCfg () = "%s__restConfig"
16959
17060
17161 func keyRestAddress () = "%s__restAddr"
17262
17363
17464 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
17565
17666
17767 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
17868
17969
18070 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
18171
18272 let restCfg = readRestCfgOrFail(restContract)
18373
18474 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
18575
18676 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
18777
188-let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp)
189-
19078 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
19179
192-func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
80+let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp)
19381
82+let recLandSize = 1
19483
195-func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
196-
197-
198-func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId)
199-
200-
201-func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
202-
203-
204-func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId)
205-
206-
207-func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_")
208-
209-
210-func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
211-
212-
213-func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId)
84+func keyResProportions () = "resTypesProportions"
21485
21586
21687 func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr)
21788
21889
219-func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
90+let wlgIssuedAmountKey = "wlg_issuedAmount"
22091
92+let idxWlgAmount = 0
22193
222-func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId)
94+let idxWlgPrice = 1
22395
224-
225-func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
226-
227-
228-func keyAddressRefBy (addr) = ("accRefBy_" + addr)
229-
230-
231-func keyAddressReferrals (addr) = ("accReferrals_" + addr)
232-
233-
234-func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
235-
236-
237-func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
238-
239-
240-func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
241-
242-
243-func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
244-
245-
246-func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
247-
248-
249-func keyResProportions () = "resTypesProportions"
250-
251-
252-func keyBlocked () = "contractsBlocked"
253-
254-
255-func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr)
256-
257-
258-func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId)
259-
260-
261-func keyEsWarehouse () = "emergencyWarehouseProducts"
262-
263-
264-let locIdxContinent = 0
265-
266-let locIdxType = 1
267-
268-let locIdxId = 2
269-
270-func asString (v) = match v {
271- case s: String =>
272- s
273- case _ =>
274- throw("fail to cast into String")
275-}
276-
96+let idxWlgFunds = 2
27797
27898 func asInt (v) = match v {
27999 case n: Int =>
280100 n
281101 case _ =>
282102 throw("fail to cast into Int")
283-}
284-
285-
286-func asAnyList (v) = match v {
287- case l: List[Any] =>
288- l
289- case _ =>
290- throw("fail to cast into List[Any]")
291-}
292-
293-
294-func asBoolean (v) = match v {
295- case s: Boolean =>
296- s
297- case _ =>
298- throw("fail to cast into Boolean")
299103 }
300104
301105
302106 func numPiecesBySize (landSize) = match landSize {
303107 case _ =>
304108 if (("S" == $match0))
305109 then SSIZE
306110 else if (("M" == $match0))
307111 then MSIZE
308112 else if (("L" == $match0))
309113 then LSIZE
310114 else if (("XL" == $match0))
311115 then XLSIZE
312116 else if (("XXL" == $match0))
313117 then XXLSIZE
314118 else throw("Unknown land size")
315119 }
316120
317-
318-let IdxEffTotal = 0
319-
320-let IdxEffUser = 1
321121
322122 func getVotingPower (userAddrStrOrEmpty) = {
323123 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
324124 func adder (acc,item) = (acc + parseIntValue(item))
325125
326126 let totalPower = {
327127 let $l = props
328128 let $s = size($l)
329129 let $acc0 = 0
330130 func $f0_1 ($a,$i) = if (($i >= $s))
331131 then $a
332132 else adder($a, $l[$i])
333133
334134 func $f0_2 ($a,$i) = if (($i >= $s))
335135 then $a
336136 else throw("List size exceeds 6")
337137
338138 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
339139 }
340140 let usersPower = if ((userAddrStrOrEmpty == ""))
341141 then 0
342142 else {
343143 let landsStr = getString(stakingContract, keyStakedLandsByOwner(userAddrStrOrEmpty))
344144 let lands = if (isDefined(landsStr))
345145 then split_51C(value(landsStr), "_")
346146 else nil
347147 func oneLand (acc,landAssetId) = {
348148 let asset = value(assetInfo(fromBase58String(landAssetId)))
349149 let landSize = split(asset.description, "_")[recLandSize]
350150 (acc + numPiecesBySize(landSize))
351151 }
352152
353153 let $l = lands
354154 let $s = size($l)
355155 let $acc0 = 0
356156 func $f1_1 ($a,$i) = if (($i >= $s))
357157 then $a
358158 else oneLand($a, $l[$i])
359159
360160 func $f1_2 ($a,$i) = if (($i >= $s))
361161 then $a
362162 else throw("List size exceeds 100")
363163
364164 $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)
365165 }
366166 [totalPower, usersPower]
367167 }
368168
369169
370-func getRecipeMaterials (recipe) = {
371- func addMat (ac,j) = (ac + parseIntValue(recipe[j]))
372-
373- let $l = [0, 1, 2, 3, 4, 5]
374- let $s = size($l)
375- let $acc0 = 0
376- func $f0_1 ($a,$i) = if (($i >= $s))
377- then $a
378- else addMat($a, $l[$i])
379-
380- func $f0_2 ($a,$i) = if (($i >= $s))
381- then $a
382- else throw("List size exceeds 6")
383-
384- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
170+func getWlgStats () = {
171+ let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmountKey), "WLGOLD is not issued yet")
172+ let economyUsd = assetBalance(economyContract, usdtAssetId)
173+ let restUsd = assetBalance(restContract, usdtAssetId)
174+ let wlgUsd = assetBalance(wlgContract, usdtAssetId)
175+ let puzzleUsd = assetBalance(puzzlePoolContract, usdtAssetId)
176+ let totalUsd = (((economyUsd + restUsd) + wlgUsd) + puzzleUsd)
177+[issuedAmount, fraction(totalUsd, MULT8, issuedAmount), totalUsd, economyUsd, restUsd, wlgUsd, puzzleUsd]
385178 }
386179
387180
388181 let MULT14 = 100000000000000
389182
390183 let MARKETINGSHARE = 100000
391184
392185 let TEAMSHARE = 200000
393186
394187 let ACTIVITYSHARE = 100000
395188
396189 let PLAYERSHARE = 400000
397190
398191 let YEARMILLIS = 31557600000
399192
400193 let WEEKMILLIS = 604800000
401194
402195 let MAXPERIOD = 156
403196
404197 let TENMINUTESMILLIS = 600000
405198
406199 let A6 = 100000000
407200
408201 let B8 = 50000000
409202
410203 let wlgAssetIdKey = "wlg_assetId"
411204
412205 let wlgIssueTimeKey = "wlg_issueTime"
413206
414-let wlgIssuedAmountKey = "wlg_issuedAmount"
415-
416207 let marketingAddrKey = "marketingAddr"
417208
418209 let teamAddrKey = "teamAddr"
419210
420211 let lastMarketingTimeKey = "lastClaimedTime_marketing"
421212
422213 let lastTeamTimeKey = "lastClaimedTime_team"
423214
424215 let lastActivitiesTimeKey = "lastClaimedTime_activities"
425216
426217 func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr)
427218
428219
429220 func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr)
430221
431222
432223 let stakersAmountLeftKey = "stakersAmountLeft"
433224
434225 let stakersAmountPaidTotalKey = "stakersAmountPaidTotal"
435226
436227 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
437228
438229
439-let idxWlgAmount = 0
440-
441-let idxWlgPrice = 1
442-
443-let idxWlgFunds = 2
444-
445230 let wlgAssetId = valueOrErrorMessage(getBinary(wlgAssetIdKey), "Not initialized yet")
446231
447232 func prolog () = if (valueOrElse(getBoolean(stakingContract, keyBlocked()), false))
448233 then throw("Contracts are under maintenance")
449234 else asInt(invoke(stakingContract, "saveLastTx", nil, nil))
450-
451-
452-func getWlgStats () = {
453- let issuedAmount = valueOrErrorMessage(getInteger(wlgIssuedAmountKey), "WLGOLD is not issued yet")
454- let funds = ((assetBalance(economyContract, usdtAssetId) + assetBalance(restContract, usdtAssetId)) + assetBalance(wlgContract, usdtAssetId))
455-[issuedAmount, fraction(funds, MULT8, issuedAmount), funds]
456- }
457235
458236
459237 func getSwapLimit (addr) = {
460238 let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0)
461239 let now = lastBlock.timestamp
462240 if ((TENMINUTESMILLIS > (now - lastTime)))
463241 then throw("Arbitrages are possible once a 10 minutes")
464242 else {
465243 let pieces = getVotingPower(addr)[IdxEffUser]
466244 let pow8 = pow(pieces, 0, B8, 8, 8, CEILING)
467245 fraction(A6, pow8, MULT8)
468246 }
469247 }
470248
471249
472250 @Callable(i)
473251 func constructorV1 (restAddr,marketingAddr,teamAddr) = if ((i.caller != this))
474252 then throw("Permission denied")
475253 else if (isDefined(getBinary(wlgAssetIdKey)))
476254 then throw("Already initialized")
477255 else {
478256 let issuedAmount = MULT14
479257 let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
480258 let assetId = calculateAssetId(issue)
481259 [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)]
482260 }
483261
484262
485263
486264 @Callable(i)
487265 func buyWlg () = {
488266 let prologResult = prolog()
489267 if ((size(i.payments) != 1))
490268 then throw("exactly 1 payment must be attached")
491269 else {
492270 let pmt = i.payments[0]
493271 let usdtAmt = pmt.amount
494272 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
495273 if ((pmtAssetId != usdtAssetId))
496274 then throw("USDT payments only!")
497275 else {
498276 let caller = i.caller
499277 let addr = toString(caller)
500278 let maxUsdt = getSwapLimit(addr)
501279 if ((usdtAmt > maxUsdt))
502280 then throw((("You can spend max " + toString(maxUsdt)) + " USDT"))
503281 else {
504282 let curStats = getWlgStats()
505283 let curAmount = curStats[idxWlgAmount]
506284 let buyPrice = fraction(curStats[idxWlgPrice], 6, 5)
507285 let wlgAmount = fraction(usdtAmt, MULT8, buyPrice)
508286 let reissued = fraction(usdtAmt, curAmount, (curStats[idxWlgFunds] - usdtAmt))
509287 $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult)
510288 }
511289 }
512290 }
513291 }
514292
515293
516294
517295 @Callable(i)
518296 func sellWlg () = {
519297 let prologResult = prolog()
520298 if ((size(i.payments) != 1))
521299 then throw("exactly 1 payment must be attached")
522300 else {
523301 let pmt = i.payments[0]
524302 let wlgAmt = pmt.amount
525303 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WAVES can't be used as payment")
526304 if ((pmtAssetId != wlgAssetId))
527305 then throw("WLGOLD payments only!")
528306 else {
529307 let caller = i.caller
530308 let addr = toString(caller)
531309 let maxUsdt = getSwapLimit(addr)
532310 let curStats = getWlgStats()
533311 let curAmount = (curStats[idxWlgAmount] - wlgAmt)
534312 let sellPrice = fraction(curStats[idxWlgPrice], 4, 5)
535313 let usdtAmount = fraction(wlgAmt, sellPrice, MULT8)
536314 if ((usdtAmount > maxUsdt))
537315 then throw((("You can get max " + toString(maxUsdt)) + " USDT"))
538316 else {
539317 let burned = fraction(usdtAmount, curAmount, curStats[idxWlgFunds])
540318 $Tuple2([Burn(wlgAssetId, burned), IntegerEntry(wlgIssuedAmountKey, (curAmount - burned)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(caller, usdtAmount, usdtAssetId)], prologResult)
541319 }
542320 }
543321 }
544322 }
545323
546324
547325
548326 @Callable(i)
549327 func claim () = {
550328 let prologResult = prolog()
551329 let caller = i.caller
552330 let callerAddr = toString(caller)
553331 let now = lastBlock.timestamp
554332 let issueTime = valueOrErrorMessage(getInteger(wlgIssueTimeKey), "Not initialized")
555333 let lastMarketingTime = valueOrElse(getInteger(lastMarketingTimeKey), issueTime)
556334 let marketingAddr = addressFromStringValue(value(getString(marketingAddrKey)))
557335 let marketingAmount = fraction(fraction(MULT14, MARKETINGSHARE, MULT6), (now - lastMarketingTime), YEARMILLIS)
558336 let lastTeamTime = valueOrElse(getInteger(lastTeamTimeKey), issueTime)
559337 let teamAddr = addressFromStringValue(value(getString(teamAddrKey)))
560338 let teamAmount = fraction(fraction(MULT14, TEAMSHARE, MULT6), (now - lastTeamTime), (3 * YEARMILLIS))
561339 let lastActivitiesTime = valueOrElse(getInteger(lastActivitiesTimeKey), issueTime)
562340 let actAmount = fraction(fraction(MULT14, ACTIVITYSHARE, MULT6), (now - lastActivitiesTime), (3 * YEARMILLIS))
563341 let curPeriod = ((now - issueTime) / WEEKMILLIS)
564342 if ((curPeriod > (MAXPERIOD / 2)))
565343 then throw("Please modify contract for next 1.5 years, according to stats")
566344 else {
567345 let eff = getVotingPower(callerAddr)
568346 let totalPieces = eff[IdxEffTotal]
569347 let amountLeftTotal = valueOrElse(getInteger(stakersAmountLeftKey), 0)
570348 let curPeriodDistribution = fraction(amountLeftTotal, (2 * totalPieces), (totalPieces + (max([100000, totalPieces]) * (MAXPERIOD - curPeriod))))
571349 let userTimeKey = keyLastClaimedTimeByUser(callerAddr)
572350 let lastUserTime = valueOrElse(getInteger(userTimeKey), issueTime)
573351 let userAmount = fraction(fraction(curPeriodDistribution, eff[IdxEffUser], totalPieces), (now - lastUserTime), (3 * YEARMILLIS))
574352 let userKey = keyStakersAmountPaidUser(callerAddr)
575353 $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)
576354 }
577355 }
578356
579357
580358
581359 @Callable(i)
582360 func onStakeLand (addr) = if ((i.caller != stakingContract))
583361 then throw("Permission denied")
584362 else $Tuple2([IntegerEntry(keyLastClaimedTimeByUser(addr), lastBlock.timestamp)], lastBlock.timestamp)
585363
586364
587365
588366 @Callable(i)
589367 func onUnstakeLand (addr) = if ((i.caller != stakingContract))
590368 then throw("Permission denied")
591369 else $Tuple2([DeleteEntry(keyLastClaimedTimeByUser(addr))], 0)
592370
593371

github/deemru/w8io/169f3d6 
72.63 ms