tx · EcpFFXkB2yoGakG9XNWj4uE4diAymJKvvDjFD9v2vm6Y 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01500000 Waves 2023.03.04 13:32 [2475195] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "EcpFFXkB2yoGakG9XNWj4uE4diAymJKvvDjFD9v2vm6Y", "fee": 1500000, "feeAssetId": null, "timestamp": 1677925970335, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "2YnS8oBFBxZtGKSDonehpjmPF9s2C3USQiUzVAwNErUGePKZSALSsDAGbQ8C37jVr2gghVntZ2Lqr5mBcAe6TMBv" ], "script": "base64:BgI5CAISBQoDCAgIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEYMwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAQFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4AEUluZnJhVXBncmFkZUNvc3RTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAMbrwL8XAwkAAAIBAVQFByRtYXRjaDAA8M2JHgkAAgECDVVua25vd24gY2hhaW4ACkxBTkRQUkVGSVgCBExBTkQACkRVQ0tQUkVGSVgCBERVQ0sAA1NFUAICX18ACkFSVFBSRVNBTEUCB1BSRVNBTEUAD0RBSUxZUkVTQllQSUVDRQCA+NIBAAlEQVlNSUxMSVMAgLiZKQAGTlVNUkVTAAY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f7UJ Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | - | ||
15 | - | let economyContract = addressFromStringValue(match chain { | |
16 | - | case _ => | |
17 | - | if ((base58'2W' == $match0)) | |
18 | - | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
19 | - | else if ((base58'2T' == $match0)) | |
20 | - | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
21 | - | else throw("Unknown chain") | |
22 | - | }) | |
23 | - | ||
24 | - | let stakingContract = addressFromStringValue(match chain { | |
25 | - | case _ => | |
26 | - | if ((base58'2W' == $match0)) | |
27 | - | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
28 | - | else if ((base58'2T' == $match0)) | |
29 | - | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
30 | - | else throw("Unknown chain") | |
31 | - | }) | |
32 | 14 | ||
33 | 15 | let InfraUpgradeCostS = match chain { | |
34 | 16 | case _ => | |
70 | 52 | let recTerrains = 2 | |
71 | 53 | ||
72 | 54 | let recContinent = 3 | |
55 | + | ||
56 | + | func keyRestCfg () = "%s__restConfig" | |
57 | + | ||
58 | + | ||
59 | + | let IdxCfgStakingDapp = 1 | |
60 | + | ||
61 | + | let IdxCfgEconomyDapp = 2 | |
62 | + | ||
63 | + | let IdxCfgGovernanceDapp = 3 | |
64 | + | ||
65 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | func readRestCfgOrFail () = split_4C(getStringOrFail(this, keyRestCfg()), SEP) | |
69 | + | ||
70 | + | ||
71 | + | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
72 | + | ||
73 | + | ||
74 | + | let restCfg = readRestCfgOrFail() | |
75 | + | ||
76 | + | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
77 | + | ||
78 | + | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
79 | + | ||
80 | + | let governanceContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
73 | 81 | ||
74 | 82 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
75 | 83 | ||
219 | 227 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
220 | 228 | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP)] | |
221 | 229 | } | |
230 | + | ||
231 | + | ||
232 | + | @Callable(i) | |
233 | + | func constructorV1 (stakingContract,economyContract,governanceContract) = if ((i.caller != this)) | |
234 | + | then throw("permissions denied") | |
235 | + | else [StringEntry(keyRestCfg(), makeString(["%s%s%s", stakingContract, economyContract, governanceContract], SEP))] | |
236 | + | ||
222 | 237 | ||
223 | 238 | ||
224 | 239 | @Callable(i) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdnAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | - | ||
15 | - | let economyContract = addressFromStringValue(match chain { | |
16 | - | case _ => | |
17 | - | if ((base58'2W' == $match0)) | |
18 | - | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
19 | - | else if ((base58'2T' == $match0)) | |
20 | - | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
21 | - | else throw("Unknown chain") | |
22 | - | }) | |
23 | - | ||
24 | - | let stakingContract = addressFromStringValue(match chain { | |
25 | - | case _ => | |
26 | - | if ((base58'2W' == $match0)) | |
27 | - | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
28 | - | else if ((base58'2T' == $match0)) | |
29 | - | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
30 | - | else throw("Unknown chain") | |
31 | - | }) | |
32 | 14 | ||
33 | 15 | let InfraUpgradeCostS = match chain { | |
34 | 16 | case _ => | |
35 | 17 | if ((base58'2W' == $match0)) | |
36 | 18 | then 6307198406 | |
37 | 19 | else if ((base58'2T' == $match0)) | |
38 | 20 | then 63071984 | |
39 | 21 | else throw("Unknown chain") | |
40 | 22 | } | |
41 | 23 | ||
42 | 24 | let LANDPREFIX = "LAND" | |
43 | 25 | ||
44 | 26 | let DUCKPREFIX = "DUCK" | |
45 | 27 | ||
46 | 28 | let SEP = "__" | |
47 | 29 | ||
48 | 30 | let ARTPRESALE = "PRESALE" | |
49 | 31 | ||
50 | 32 | let DAILYRESBYPIECE = 3456000 | |
51 | 33 | ||
52 | 34 | let DAYMILLIS = 86400000 | |
53 | 35 | ||
54 | 36 | let NUMRES = 6 | |
55 | 37 | ||
56 | 38 | let SSIZE = 25 | |
57 | 39 | ||
58 | 40 | let MSIZE = 100 | |
59 | 41 | ||
60 | 42 | let LSIZE = 225 | |
61 | 43 | ||
62 | 44 | let XLSIZE = 400 | |
63 | 45 | ||
64 | 46 | let XXLSIZE = 625 | |
65 | 47 | ||
66 | 48 | let recLandNum = 0 | |
67 | 49 | ||
68 | 50 | let recLandSize = 1 | |
69 | 51 | ||
70 | 52 | let recTerrains = 2 | |
71 | 53 | ||
72 | 54 | let recContinent = 3 | |
55 | + | ||
56 | + | func keyRestCfg () = "%s__restConfig" | |
57 | + | ||
58 | + | ||
59 | + | let IdxCfgStakingDapp = 1 | |
60 | + | ||
61 | + | let IdxCfgEconomyDapp = 2 | |
62 | + | ||
63 | + | let IdxCfgGovernanceDapp = 3 | |
64 | + | ||
65 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | func readRestCfgOrFail () = split_4C(getStringOrFail(this, keyRestCfg()), SEP) | |
69 | + | ||
70 | + | ||
71 | + | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
72 | + | ||
73 | + | ||
74 | + | let restCfg = readRestCfgOrFail() | |
75 | + | ||
76 | + | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
77 | + | ||
78 | + | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
79 | + | ||
80 | + | let governanceContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
73 | 81 | ||
74 | 82 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
75 | 83 | ||
76 | 84 | ||
77 | 85 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
78 | 86 | ||
79 | 87 | ||
80 | 88 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
81 | 89 | ||
82 | 90 | ||
83 | 91 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
84 | 92 | ||
85 | 93 | ||
86 | 94 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
87 | 95 | ||
88 | 96 | ||
89 | 97 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
90 | 98 | ||
91 | 99 | ||
92 | 100 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
93 | 101 | ||
94 | 102 | ||
95 | 103 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
96 | 104 | ||
97 | 105 | ||
98 | 106 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
99 | 107 | ||
100 | 108 | ||
101 | 109 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
102 | 110 | ||
103 | 111 | ||
104 | 112 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
105 | 113 | ||
106 | 114 | ||
107 | 115 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
108 | 116 | ||
109 | 117 | ||
110 | 118 | func asString (v) = match v { | |
111 | 119 | case s: String => | |
112 | 120 | s | |
113 | 121 | case _ => | |
114 | 122 | throw("fail to cast into String") | |
115 | 123 | } | |
116 | 124 | ||
117 | 125 | ||
118 | 126 | func asListIntCompacted (val) = match val { | |
119 | 127 | case valAnyList: List[Any] => | |
120 | 128 | if ((size(valAnyList) != NUMRES)) | |
121 | 129 | then throw(("Array size is " + toString(size(valAnyList)))) | |
122 | 130 | else { | |
123 | 131 | func conv (acc,item) = match item { | |
124 | 132 | case it: Int => | |
125 | 133 | (acc :+ toString(it)) | |
126 | 134 | case _ => | |
127 | 135 | throw("List type is not Int") | |
128 | 136 | } | |
129 | 137 | ||
130 | 138 | let r = { | |
131 | 139 | let $l = valAnyList | |
132 | 140 | let $s = size($l) | |
133 | 141 | let $acc0 = nil | |
134 | 142 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
135 | 143 | then $a | |
136 | 144 | else conv($a, $l[$i]) | |
137 | 145 | ||
138 | 146 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
139 | 147 | then $a | |
140 | 148 | else throw("List size exceeds 6") | |
141 | 149 | ||
142 | 150 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
143 | 151 | } | |
144 | 152 | makeString(r, "_") | |
145 | 153 | } | |
146 | 154 | case _ => | |
147 | 155 | throw("fail to cast into List") | |
148 | 156 | } | |
149 | 157 | ||
150 | 158 | ||
151 | 159 | func asSplitResult (val) = match val { | |
152 | 160 | case t2: (List[Any], List[Any]) => | |
153 | 161 | $Tuple2(asListIntCompacted(t2._1), asListIntCompacted(t2._2)) | |
154 | 162 | case _ => | |
155 | 163 | throw("fail to cast into (List, List)") | |
156 | 164 | } | |
157 | 165 | ||
158 | 166 | ||
159 | 167 | func walletInternal (userAddressOpt) = { | |
160 | 168 | let addr = addressFromString(userAddressOpt) | |
161 | 169 | let balance = if (isDefined(addr)) | |
162 | 170 | then wavesBalance(value(addr)) | |
163 | 171 | else BalanceDetails(0, 0, 0, 0) | |
164 | 172 | let usdnBalance = if (isDefined(addr)) | |
165 | 173 | then assetBalance(value(addr), usdnAssetId) | |
166 | 174 | else 0 | |
167 | 175 | makeString(["%s%d%d", "wallet", toString(balance.available), toString(usdnBalance)], SEP) | |
168 | 176 | } | |
169 | 177 | ||
170 | 178 | ||
171 | 179 | func applyBonuses (landAssetId,pieces) = { | |
172 | 180 | let infraLevel = valueOrElse(getInteger(stakingContract, keyInfraLevelByAssetId(landAssetId)), 0) | |
173 | 181 | let artPieces = valueOrElse(getInteger(stakingContract, keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(stakingContract, keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
174 | 182 | then pieces | |
175 | 183 | else 0) | |
176 | 184 | $Tuple3(infraLevel, artPieces, ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20)))) | |
177 | 185 | } | |
178 | 186 | ||
179 | 187 | ||
180 | 188 | func numPiecesBySize (landSize) = match landSize { | |
181 | 189 | case _ => | |
182 | 190 | if (("S" == $match0)) | |
183 | 191 | then SSIZE | |
184 | 192 | else if (("M" == $match0)) | |
185 | 193 | then MSIZE | |
186 | 194 | else if (("L" == $match0)) | |
187 | 195 | then LSIZE | |
188 | 196 | else if (("XL" == $match0)) | |
189 | 197 | then XLSIZE | |
190 | 198 | else if (("XXL" == $match0)) | |
191 | 199 | then XXLSIZE | |
192 | 200 | else throw("Unknown land size") | |
193 | 201 | } | |
194 | 202 | ||
195 | 203 | ||
196 | 204 | func duckInfoTuple (duckAssetId) = $Tuple5(valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(duckAssetId)), -1), value(assetInfo(fromBase58String(duckAssetId))).name, valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), ""), valueOrElse(getInteger(stakingContract, keyDuckHealth(duckAssetId)), -1), asString(invoke(stakingContract, "getBackpackREADONLY", [duckAssetId], nil))) | |
197 | 205 | ||
198 | 206 | ||
199 | 207 | func duckInfoArray (duckAssetId,owner,duckInf) = [("%s%s__assetId__" + duckAssetId), ("%s%s__owner__" + owner), ("%s%d__stakedTime__" + toString(duckInf._1)), ("%s%s__name__" + duckInf._2), ("%s%s__location__" + duckInf._3), ("%s%d__health__" + toString(duckInf._4)), ("%s%s__backPack__" + duckInf._5)] | |
200 | 208 | ||
201 | 209 | ||
202 | 210 | func landInfoArray (landAssetId,owner,stakedTime) = if ((landAssetId == "")) | |
203 | 211 | then throw("landAssetId is required") | |
204 | 212 | else { | |
205 | 213 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
206 | 214 | let d = split(a.description, "_") | |
207 | 215 | let landNum = if ((a.quantity > 0)) | |
208 | 216 | then d[recLandNum] | |
209 | 217 | else ("-" + d[recLandNum]) | |
210 | 218 | let pieces = numPiecesBySize(d[recLandSize]) | |
211 | 219 | let productivity = applyBonuses(landAssetId, pieces) | |
212 | 220 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
213 | 221 | let availRes = if ((stakedTime > 0)) | |
214 | 222 | then fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
215 | 223 | else 0 | |
216 | 224 | let needMat = fraction(InfraUpgradeCostS, (pieces * (productivity._1 + 1)), SSIZE) | |
217 | 225 | let globalAndLocal = if ((stakedTime > 0)) | |
218 | 226 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
219 | 227 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
220 | 228 | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP)] | |
221 | 229 | } | |
230 | + | ||
231 | + | ||
232 | + | @Callable(i) | |
233 | + | func constructorV1 (stakingContract,economyContract,governanceContract) = if ((i.caller != this)) | |
234 | + | then throw("permissions denied") | |
235 | + | else [StringEntry(keyRestCfg(), makeString(["%s%s%s", stakingContract, economyContract, governanceContract], SEP))] | |
236 | + | ||
222 | 237 | ||
223 | 238 | ||
224 | 239 | @Callable(i) | |
225 | 240 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
226 | 241 | ||
227 | 242 | ||
228 | 243 | ||
229 | 244 | @Callable(i) | |
230 | 245 | func duckInfoREADONLY (duckAssetId,userAddressOpt) = { | |
231 | 246 | let addr = addressFromString(userAddressOpt) | |
232 | 247 | let duckAsset = fromBase58String(duckAssetId) | |
233 | 248 | if ((duckAssetId == "")) | |
234 | 249 | then throw("duckAssetId is required") | |
235 | 250 | else { | |
236 | 251 | let duckOwner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
237 | 252 | let owner = if (isDefined(duckOwner)) | |
238 | 253 | then value(duckOwner) | |
239 | 254 | else if (if (isDefined(addr)) | |
240 | 255 | then (assetBalance(value(addr), duckAsset) == 1) | |
241 | 256 | else false) | |
242 | 257 | then userAddressOpt | |
243 | 258 | else "" | |
244 | 259 | $Tuple2(nil, $Tuple2(duckInfoArray(duckAssetId, owner, duckInfoTuple(duckAssetId)), walletInternal(userAddressOpt))) | |
245 | 260 | } | |
246 | 261 | } | |
247 | 262 | ||
248 | 263 | ||
249 | 264 | ||
250 | 265 | @Callable(i) | |
251 | 266 | func landInfoREADONLY (landAssetId,userAddressOpt) = { | |
252 | 267 | let addr = addressFromString(userAddressOpt) | |
253 | 268 | let landAsset = fromBase58String(landAssetId) | |
254 | 269 | if ((landAssetId == "")) | |
255 | 270 | then throw("landAssetId is required") | |
256 | 271 | else { | |
257 | 272 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), 0) | |
258 | 273 | let owner = if ((stakedTime > 0)) | |
259 | 274 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
260 | 275 | else if (if (isDefined(addr)) | |
261 | 276 | then (assetBalance(value(addr), landAsset) == 1) | |
262 | 277 | else false) | |
263 | 278 | then userAddressOpt | |
264 | 279 | else "" | |
265 | 280 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddressOpt)) | |
266 | 281 | let duckInf = if (if (isDefined(addr)) | |
267 | 282 | then isDefined(stakedDuck) | |
268 | 283 | else false) | |
269 | 284 | then { | |
270 | 285 | let duckAssetId = value(stakedDuck) | |
271 | 286 | $Tuple2(duckAssetId, duckInfoTuple(duckAssetId)) | |
272 | 287 | } | |
273 | 288 | else $Tuple2("", $Tuple5(-1, "", "", -1, "")) | |
274 | 289 | $Tuple2(nil, $Tuple3(landInfoArray(landAssetId, owner, stakedTime), duckInfoArray(duckInf._1, userAddressOpt, duckInf._2), walletInternal(userAddressOpt))) | |
275 | 290 | } | |
276 | 291 | } | |
277 | 292 | ||
278 | 293 | ||
279 | 294 | ||
280 | 295 | @Callable(i) | |
281 | 296 | func stakedLandsInfoREADONLY (myAddress,landOwnerAddress) = if ((landOwnerAddress == "")) | |
282 | 297 | then throw("landOwnerAddress is required") | |
283 | 298 | else { | |
284 | 299 | let myAddr = addressFromString(myAddress) | |
285 | 300 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
286 | 301 | let lands = if (isDefined(landsStr)) | |
287 | 302 | then split_51C(value(landsStr), "_") | |
288 | 303 | else nil | |
289 | 304 | func oneLand (acc,landAssetId) = { | |
290 | 305 | let landAsset = fromBase58String(landAssetId) | |
291 | 306 | if ((landAssetId == "")) | |
292 | 307 | then throw("landAssetId is required") | |
293 | 308 | else { | |
294 | 309 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), 0) | |
295 | 310 | let descr = value(assetInfo(landAsset)).description | |
296 | 311 | let d = split(descr, "_") | |
297 | 312 | let pieces = numPiecesBySize(d[recLandSize]) | |
298 | 313 | let productivity = applyBonuses(landAssetId, pieces) | |
299 | 314 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
300 | 315 | let availRes = fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
301 | 316 | (acc :+ [("%s%s__landAssetId__" + landAssetId), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + descr), ("%s%d__infraLevel__" + toString(productivity._1)), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__availRes__" + toString(availRes))]) | |
302 | 317 | } | |
303 | 318 | } | |
304 | 319 | ||
305 | 320 | let r = { | |
306 | 321 | let $l = lands | |
307 | 322 | let $s = size($l) | |
308 | 323 | let $acc0 = nil | |
309 | 324 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
310 | 325 | then $a | |
311 | 326 | else oneLand($a, $l[$i]) | |
312 | 327 | ||
313 | 328 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
314 | 329 | then $a | |
315 | 330 | else throw("List size exceeds 100") | |
316 | 331 | ||
317 | 332 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 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) | |
318 | 333 | } | |
319 | 334 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(myAddress)) | |
320 | 335 | let duckInf = if (if (isDefined(myAddr)) | |
321 | 336 | then isDefined(stakedDuck) | |
322 | 337 | else false) | |
323 | 338 | then { | |
324 | 339 | let duckAssetId = value(stakedDuck) | |
325 | 340 | $Tuple2(duckAssetId, duckInfoTuple(duckAssetId)) | |
326 | 341 | } | |
327 | 342 | else $Tuple2("", $Tuple5(-1, "", "", -1, "")) | |
328 | 343 | $Tuple2(nil, $Tuple3(r, duckInfoArray(duckInf._1, myAddress, duckInf._2), walletInternal(myAddress))) | |
329 | 344 | } | |
330 | 345 | ||
331 | 346 | ||
332 | 347 | ||
333 | 348 | @Callable(i) | |
334 | 349 | func duckByOwnerInfoREADONLY (userAddress) = { | |
335 | 350 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddress)) | |
336 | 351 | $Tuple2(nil, if (if (isDefined(addressFromString(userAddress))) | |
337 | 352 | then isDefined(stakedDuck) | |
338 | 353 | else false) | |
339 | 354 | then { | |
340 | 355 | let duckAssetId = value(stakedDuck) | |
341 | 356 | duckInfoArray(duckAssetId, userAddress, duckInfoTuple(duckAssetId)) | |
342 | 357 | } | |
343 | 358 | else duckInfoArray("", userAddress, $Tuple5(-1, "", "", -1, ""))) | |
344 | 359 | } | |
345 | 360 | ||
346 | 361 | ||
347 | 362 | ||
348 | 363 | @Callable(i) | |
349 | 364 | func duckByAssetIdInfoREADONLY (duckAssetId) = { | |
350 | 365 | let owner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
351 | 366 | let duckInf = duckInfoTuple(duckAssetId) | |
352 | 367 | $Tuple2(nil, duckInfoArray(duckAssetId, if (isDefined(owner)) | |
353 | 368 | then value(owner) | |
354 | 369 | else "", duckInfoTuple(duckAssetId))) | |
355 | 370 | } | |
356 | 371 | ||
357 | 372 | ||
358 | 373 | ||
359 | 374 | @Callable(i) | |
360 | 375 | func landByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
361 | 376 | then throw("landAssetId is required") | |
362 | 377 | else { | |
363 | 378 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
364 | 379 | let owner = if ((stakedTime > 0)) | |
365 | 380 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
366 | 381 | else "" | |
367 | 382 | $Tuple2(nil, landInfoArray(landAssetId, owner, stakedTime)) | |
368 | 383 | } | |
369 | 384 | ||
370 | 385 | ||
371 | 386 | ||
372 | 387 | @Callable(i) | |
373 | 388 | func stakedLandsByOwnerInfoREADONLY (landOwnerAddress) = if ((landOwnerAddress == "")) | |
374 | 389 | then throw("landOwnerAddress is required") | |
375 | 390 | else { | |
376 | 391 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
377 | 392 | let lands = if (isDefined(landsStr)) | |
378 | 393 | then split_51C(value(landsStr), "_") | |
379 | 394 | else nil | |
380 | 395 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
381 | 396 | then throw("landAssetId is required") | |
382 | 397 | else { | |
383 | 398 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
384 | 399 | (acc :+ landInfoArray(landAssetId, landOwnerAddress, stakedTime)) | |
385 | 400 | } | |
386 | 401 | ||
387 | 402 | let r = { | |
388 | 403 | let $l = lands | |
389 | 404 | let $s = size($l) | |
390 | 405 | let $acc0 = nil | |
391 | 406 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
392 | 407 | then $a | |
393 | 408 | else oneLand($a, $l[$i]) | |
394 | 409 | ||
395 | 410 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
396 | 411 | then $a | |
397 | 412 | else throw("List size exceeds 100") | |
398 | 413 | ||
399 | 414 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 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) | |
400 | 415 | } | |
401 | 416 | $Tuple2(nil, r) | |
402 | 417 | } | |
403 | 418 | ||
404 | 419 | ||
405 | 420 | ||
406 | 421 | @Callable(i) | |
407 | 422 | func landsByIdsInfoREADONLY (landAssetIds) = { | |
408 | 423 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
409 | 424 | then throw("landAssetId is required") | |
410 | 425 | else { | |
411 | 426 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
412 | 427 | let owner = if ((stakedTime > 0)) | |
413 | 428 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
414 | 429 | else "" | |
415 | 430 | (acc :+ landInfoArray(landAssetId, owner, stakedTime)) | |
416 | 431 | } | |
417 | 432 | ||
418 | 433 | let r = { | |
419 | 434 | let $l = landAssetIds | |
420 | 435 | let $s = size($l) | |
421 | 436 | let $acc0 = nil | |
422 | 437 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
423 | 438 | then $a | |
424 | 439 | else oneLand($a, $l[$i]) | |
425 | 440 | ||
426 | 441 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
427 | 442 | then $a | |
428 | 443 | else throw("List size exceeds 100") | |
429 | 444 | ||
430 | 445 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 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) | |
431 | 446 | } | |
432 | 447 | $Tuple2(nil, r) | |
433 | 448 | } | |
434 | 449 | ||
435 | 450 |
github/deemru/w8io/026f985 88.70 ms ◑