tx · BiMHKzEsQvnkPm4rLVzyJtF2MqzNqH4kKpVyhiTEo3bn 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.02000000 Waves 2023.04.26 21:56 [2551902] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "BiMHKzEsQvnkPm4rLVzyJtF2MqzNqH4kKpVyhiTEo3bn", "fee": 2000000, "feeAssetId": null, "timestamp": 1682535471722, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "3jJZaGxjnHQwskZqpVTbRFnKWKy1s7AvTJBmyGVcXxEbTHGf2pMKttBiD651xyXt9okm9CVtVruXiHfXfsUphooL" ], "script": "base64:BgJICAISBQoDCAgIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEYEgMKAQgSAwoBGBIDCgEYPgAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAQFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4AEUluZnJhVXBncmFkZUNvc3RTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAMbrwL8XAwkAAAIBAVQFByRtYXRjaDAA8M2JHgkAAgECDVVua25vd24gY2hhaW4ACkxBTkRQUkVGSVgCBExBTkQACkRVQ0tQUkVGSVgCBERVQ0sAA1NFUAICX18ACkFSVFBSRVNBTEUCB1BSRVNBTEUAD0RBSUxZUkVTQllQSUVDRQCA+NIBAAlEQVlNSUxMSV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25vbXlDb250cmFjdAIRc2V0V2FyZWhvdXNlT3JkZXIJAMwIAgULbGFuZEFzc2V0SWQJAMwIAgIwMEAwXzBAMF8wQDBfMEAwXzBAMF8wQDA6MEAwXzBAMF8wQDBfMEAwXzBAMF8wQDA6BQNuaWwFA25pbAMDBQFhBgUBYwkBASEBAwUBYQUBYwcHBAFyCgACJGwFDGxhbmRBc3NldElkcwoAAiRzCQCQAwEFAiRsCgAFJGFjYzAHCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQdvbmVMYW5kAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAzMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgkAlAoCBQNuaWwFAXIAnHfxgg==", "height": 2551902, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 57f5bFh9LMCWZUjnSKMQn8AeV118aXHDqCmnGCDki8Aj Next: GMztVU1UGs47gWWrzZPHbNWT37VriqxfGne8oFTushLe Diff:
Old | New | Differences | |
---|---|---|---|
554 | 554 | else (value(blocked) == false)) | |
555 | 555 | then throw("Contracts should be blocked before canceling orders") | |
556 | 556 | else { | |
557 | - | func oneLand ( | |
557 | + | func oneLand (a,landAssetId) = if ((landAssetId == "")) | |
558 | 558 | then throw("landAssetId is required") | |
559 | 559 | else { | |
560 | - | let | |
561 | - | if ( | |
560 | + | let c = asBoolean(invoke(economyContract, "setWarehouseOrder", [landAssetId, "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"], nil)) | |
561 | + | if (if (a) | |
562 | 562 | then true | |
563 | - | else cancel | |
563 | + | else c) | |
564 | + | then !(if (a) | |
565 | + | then c | |
566 | + | else false) | |
567 | + | else false | |
564 | 568 | } | |
565 | 569 | ||
566 | 570 | let r = { |
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 | 14 | ||
15 | 15 | let InfraUpgradeCostS = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then 6307198406 | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then 63071984 | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let LANDPREFIX = "LAND" | |
25 | 25 | ||
26 | 26 | let DUCKPREFIX = "DUCK" | |
27 | 27 | ||
28 | 28 | let SEP = "__" | |
29 | 29 | ||
30 | 30 | let ARTPRESALE = "PRESALE" | |
31 | 31 | ||
32 | 32 | let DAILYRESBYPIECE = 3456000 | |
33 | 33 | ||
34 | 34 | let DAYMILLIS = 86400000 | |
35 | 35 | ||
36 | 36 | let NUMRES = 6 | |
37 | 37 | ||
38 | 38 | let SSIZE = 25 | |
39 | 39 | ||
40 | 40 | let MSIZE = 100 | |
41 | 41 | ||
42 | 42 | let LSIZE = 225 | |
43 | 43 | ||
44 | 44 | let XLSIZE = 400 | |
45 | 45 | ||
46 | 46 | let XXLSIZE = 625 | |
47 | 47 | ||
48 | 48 | let recLandNum = 0 | |
49 | 49 | ||
50 | 50 | let recLandSize = 1 | |
51 | 51 | ||
52 | 52 | let recTerrains = 2 | |
53 | 53 | ||
54 | 54 | let recContinent = 3 | |
55 | 55 | ||
56 | 56 | let whIdxVol = 0 | |
57 | 57 | ||
58 | 58 | let whIdxRes = 1 | |
59 | 59 | ||
60 | 60 | let whIdxMat = 2 | |
61 | 61 | ||
62 | 62 | let whIdxProd = 3 | |
63 | 63 | ||
64 | 64 | let whIdxLockedVol = 4 | |
65 | 65 | ||
66 | 66 | func keyRestCfg () = "%s__restConfig" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | let IdxCfgStakingDapp = 1 | |
70 | 70 | ||
71 | 71 | let IdxCfgEconomyDapp = 2 | |
72 | 72 | ||
73 | 73 | let IdxCfgGovernanceDapp = 3 | |
74 | 74 | ||
75 | 75 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func readRestCfgOrFail () = split_4C(getStringOrFail(this, keyRestCfg()), SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | let restCfg = readRestCfgOrFail() | |
85 | 85 | ||
86 | 86 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
87 | 87 | ||
88 | 88 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
89 | 89 | ||
90 | 90 | let governanceContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
91 | 91 | ||
92 | 92 | func keyBlocked () = "contractsBlocked" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func asString (v) = match v { | |
138 | 138 | case s: String => | |
139 | 139 | s | |
140 | 140 | case _ => | |
141 | 141 | throw("fail to cast into String") | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func asBoolean (v) = match v { | |
146 | 146 | case s: Boolean => | |
147 | 147 | s | |
148 | 148 | case _ => | |
149 | 149 | throw("fail to cast into Boolean") | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func asListIntCompacted (val) = match val { | |
154 | 154 | case valAnyList: List[Any] => | |
155 | 155 | if ((size(valAnyList) != NUMRES)) | |
156 | 156 | then throw(("Array size is " + toString(size(valAnyList)))) | |
157 | 157 | else { | |
158 | 158 | func conv (acc,item) = match item { | |
159 | 159 | case it: Int => | |
160 | 160 | (acc :+ toString(it)) | |
161 | 161 | case _ => | |
162 | 162 | throw("List type is not Int") | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | let r = { | |
166 | 166 | let $l = valAnyList | |
167 | 167 | let $s = size($l) | |
168 | 168 | let $acc0 = nil | |
169 | 169 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
170 | 170 | then $a | |
171 | 171 | else conv($a, $l[$i]) | |
172 | 172 | ||
173 | 173 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
174 | 174 | then $a | |
175 | 175 | else throw("List size exceeds 6") | |
176 | 176 | ||
177 | 177 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
178 | 178 | } | |
179 | 179 | makeString(r, "_") | |
180 | 180 | } | |
181 | 181 | case _ => | |
182 | 182 | throw("fail to cast into List") | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func asSplitResult (val) = match val { | |
187 | 187 | case t2: (List[Any], List[Any]) => | |
188 | 188 | $Tuple2(asListIntCompacted(t2._1), asListIntCompacted(t2._2)) | |
189 | 189 | case _ => | |
190 | 190 | throw("fail to cast into (List, List)") | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func walletInternal (userAddressOpt) = { | |
195 | 195 | let addr = addressFromString(userAddressOpt) | |
196 | 196 | let balance = if (isDefined(addr)) | |
197 | 197 | then wavesBalance(value(addr)) | |
198 | 198 | else BalanceDetails(0, 0, 0, 0) | |
199 | 199 | let usdnBalance = if (isDefined(addr)) | |
200 | 200 | then assetBalance(value(addr), usdnAssetId) | |
201 | 201 | else 0 | |
202 | 202 | makeString(["%s%d%d", "wallet", toString(balance.available), toString(usdnBalance)], SEP) | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func applyBonuses (landAssetId,pieces) = { | |
207 | 207 | let infraLevel = valueOrElse(getInteger(stakingContract, keyInfraLevelByAssetId(landAssetId)), 0) | |
208 | 208 | let artPieces = valueOrElse(getInteger(stakingContract, keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(stakingContract, keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
209 | 209 | then pieces | |
210 | 210 | else 0) | |
211 | 211 | $Tuple3(infraLevel, artPieces, ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20)))) | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func numPiecesBySize (landSize) = match landSize { | |
216 | 216 | case _ => | |
217 | 217 | if (("S" == $match0)) | |
218 | 218 | then SSIZE | |
219 | 219 | else if (("M" == $match0)) | |
220 | 220 | then MSIZE | |
221 | 221 | else if (("L" == $match0)) | |
222 | 222 | then LSIZE | |
223 | 223 | else if (("XL" == $match0)) | |
224 | 224 | then XLSIZE | |
225 | 225 | else if (("XXL" == $match0)) | |
226 | 226 | then XXLSIZE | |
227 | 227 | else throw("Unknown land size") | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func getWarehouse (whKey,landIndex,infraLevel) = { | |
232 | 232 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
233 | 233 | let p = split(valueOrElse(getString(stakingContract, whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")), ":") | |
234 | 234 | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
235 | 235 | then p[whIdxRes] | |
236 | 236 | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
237 | 237 | then p[whIdxMat] | |
238 | 238 | else "0_0_0_0_0_0", p[whIdxProd], if ((5 > size(p))) | |
239 | 239 | then "0" | |
240 | 240 | else p[whIdxLockedVol]] | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | 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))) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | 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)] | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func landInfoArray (landAssetId,owner,stakedTime) = if ((landAssetId == "")) | |
251 | 251 | then throw("landAssetId is required") | |
252 | 252 | else { | |
253 | 253 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
254 | 254 | let d = split(a.description, "_") | |
255 | 255 | let landNum = if ((a.quantity > 0)) | |
256 | 256 | then d[recLandNum] | |
257 | 257 | else ("-" + d[recLandNum]) | |
258 | 258 | let pieces = numPiecesBySize(d[recLandSize]) | |
259 | 259 | let productivity = applyBonuses(landAssetId, pieces) | |
260 | 260 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
261 | 261 | let availRes = if ((stakedTime > 0)) | |
262 | 262 | then fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
263 | 263 | else 0 | |
264 | 264 | let needMat = fraction(InfraUpgradeCostS, (pieces * (productivity._1 + 1)), SSIZE) | |
265 | 265 | let globalAndLocal = if ((stakedTime > 0)) | |
266 | 266 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
267 | 267 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
268 | 268 | [("%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), ("%s%s__warehouse__" + makeString(getWarehouse(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func landOrderInfoArray (landAssetId,owner) = if ((landAssetId == "")) | |
273 | 273 | then throw("landAssetId is required") | |
274 | 274 | else { | |
275 | 275 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
276 | 276 | let d = split(a.description, "_") | |
277 | 277 | let pieces = numPiecesBySize(d[recLandSize]) | |
278 | 278 | let productivity = applyBonuses(landAssetId, pieces) | |
279 | 279 | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString(getWarehouse(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | @Callable(i) | |
284 | 284 | func constructorV1 (stakingContract,economyContract,governanceContract) = if ((i.caller != this)) | |
285 | 285 | then throw("permissions denied") | |
286 | 286 | else [StringEntry(keyRestCfg(), makeString(["%s%s%s", stakingContract, economyContract, governanceContract], SEP))] | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(i) | |
291 | 291 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | ||
295 | 295 | @Callable(i) | |
296 | 296 | func duckInfoREADONLY (duckAssetId,userAddressOpt) = { | |
297 | 297 | let addr = addressFromString(userAddressOpt) | |
298 | 298 | let duckAsset = fromBase58String(duckAssetId) | |
299 | 299 | if ((duckAssetId == "")) | |
300 | 300 | then throw("duckAssetId is required") | |
301 | 301 | else { | |
302 | 302 | let duckOwner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
303 | 303 | let owner = if (isDefined(duckOwner)) | |
304 | 304 | then value(duckOwner) | |
305 | 305 | else if (if (isDefined(addr)) | |
306 | 306 | then (assetBalance(value(addr), duckAsset) == 1) | |
307 | 307 | else false) | |
308 | 308 | then userAddressOpt | |
309 | 309 | else "" | |
310 | 310 | $Tuple2(nil, $Tuple2(duckInfoArray(duckAssetId, owner, duckInfoTuple(duckAssetId)), walletInternal(userAddressOpt))) | |
311 | 311 | } | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func landInfoREADONLY (landAssetId,userAddressOpt) = { | |
318 | 318 | let addr = addressFromString(userAddressOpt) | |
319 | 319 | let landAsset = fromBase58String(landAssetId) | |
320 | 320 | if ((landAssetId == "")) | |
321 | 321 | then throw("landAssetId is required") | |
322 | 322 | else { | |
323 | 323 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), 0) | |
324 | 324 | let owner = if ((stakedTime > 0)) | |
325 | 325 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
326 | 326 | else if (if (isDefined(addr)) | |
327 | 327 | then (assetBalance(value(addr), landAsset) == 1) | |
328 | 328 | else false) | |
329 | 329 | then userAddressOpt | |
330 | 330 | else "" | |
331 | 331 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddressOpt)) | |
332 | 332 | let duckInf = if (if (isDefined(addr)) | |
333 | 333 | then isDefined(stakedDuck) | |
334 | 334 | else false) | |
335 | 335 | then { | |
336 | 336 | let duckAssetId = value(stakedDuck) | |
337 | 337 | $Tuple2(duckAssetId, duckInfoTuple(duckAssetId)) | |
338 | 338 | } | |
339 | 339 | else $Tuple2("", $Tuple5(-1, "", "", -1, "")) | |
340 | 340 | $Tuple2(nil, $Tuple3(landInfoArray(landAssetId, owner, stakedTime), duckInfoArray(duckInf._1, userAddressOpt, duckInf._2), walletInternal(userAddressOpt))) | |
341 | 341 | } | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | ||
346 | 346 | @Callable(i) | |
347 | 347 | func stakedLandsInfoREADONLY (myAddress,landOwnerAddress) = if ((landOwnerAddress == "")) | |
348 | 348 | then throw("landOwnerAddress is required") | |
349 | 349 | else { | |
350 | 350 | let myAddr = addressFromString(myAddress) | |
351 | 351 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
352 | 352 | let lands = if (isDefined(landsStr)) | |
353 | 353 | then split_51C(value(landsStr), "_") | |
354 | 354 | else nil | |
355 | 355 | func oneLand (acc,landAssetId) = { | |
356 | 356 | let landAsset = fromBase58String(landAssetId) | |
357 | 357 | if ((landAssetId == "")) | |
358 | 358 | then throw("landAssetId is required") | |
359 | 359 | else { | |
360 | 360 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), 0) | |
361 | 361 | let descr = value(assetInfo(landAsset)).description | |
362 | 362 | let d = split(descr, "_") | |
363 | 363 | let pieces = numPiecesBySize(d[recLandSize]) | |
364 | 364 | let productivity = applyBonuses(landAssetId, pieces) | |
365 | 365 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
366 | 366 | let availRes = fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
367 | 367 | (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))]) | |
368 | 368 | } | |
369 | 369 | } | |
370 | 370 | ||
371 | 371 | let r = { | |
372 | 372 | let $l = lands | |
373 | 373 | let $s = size($l) | |
374 | 374 | let $acc0 = nil | |
375 | 375 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
376 | 376 | then $a | |
377 | 377 | else oneLand($a, $l[$i]) | |
378 | 378 | ||
379 | 379 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
380 | 380 | then $a | |
381 | 381 | else throw("List size exceeds 100") | |
382 | 382 | ||
383 | 383 | $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) | |
384 | 384 | } | |
385 | 385 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(myAddress)) | |
386 | 386 | let duckInf = if (if (isDefined(myAddr)) | |
387 | 387 | then isDefined(stakedDuck) | |
388 | 388 | else false) | |
389 | 389 | then { | |
390 | 390 | let duckAssetId = value(stakedDuck) | |
391 | 391 | $Tuple2(duckAssetId, duckInfoTuple(duckAssetId)) | |
392 | 392 | } | |
393 | 393 | else $Tuple2("", $Tuple5(-1, "", "", -1, "")) | |
394 | 394 | $Tuple2(nil, $Tuple3(r, duckInfoArray(duckInf._1, myAddress, duckInf._2), walletInternal(myAddress))) | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func duckByOwnerInfoREADONLY (userAddress) = { | |
401 | 401 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddress)) | |
402 | 402 | $Tuple2(nil, if (if (isDefined(addressFromString(userAddress))) | |
403 | 403 | then isDefined(stakedDuck) | |
404 | 404 | else false) | |
405 | 405 | then { | |
406 | 406 | let duckAssetId = value(stakedDuck) | |
407 | 407 | duckInfoArray(duckAssetId, userAddress, duckInfoTuple(duckAssetId)) | |
408 | 408 | } | |
409 | 409 | else duckInfoArray("", userAddress, $Tuple5(-1, "", "", -1, ""))) | |
410 | 410 | } | |
411 | 411 | ||
412 | 412 | ||
413 | 413 | ||
414 | 414 | @Callable(i) | |
415 | 415 | func duckByAssetIdInfoREADONLY (duckAssetId) = { | |
416 | 416 | let owner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
417 | 417 | let duckInf = duckInfoTuple(duckAssetId) | |
418 | 418 | $Tuple2(nil, duckInfoArray(duckAssetId, if (isDefined(owner)) | |
419 | 419 | then value(owner) | |
420 | 420 | else "", duckInfoTuple(duckAssetId))) | |
421 | 421 | } | |
422 | 422 | ||
423 | 423 | ||
424 | 424 | ||
425 | 425 | @Callable(i) | |
426 | 426 | func landByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
427 | 427 | then throw("landAssetId is required") | |
428 | 428 | else { | |
429 | 429 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
430 | 430 | let owner = if ((stakedTime > 0)) | |
431 | 431 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
432 | 432 | else "" | |
433 | 433 | $Tuple2(nil, landInfoArray(landAssetId, owner, stakedTime)) | |
434 | 434 | } | |
435 | 435 | ||
436 | 436 | ||
437 | 437 | ||
438 | 438 | @Callable(i) | |
439 | 439 | func stakedLandsByOwnerInfoREADONLY (landOwnerAddress) = if ((landOwnerAddress == "")) | |
440 | 440 | then throw("landOwnerAddress is required") | |
441 | 441 | else { | |
442 | 442 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
443 | 443 | let lands = if (isDefined(landsStr)) | |
444 | 444 | then split_51C(value(landsStr), "_") | |
445 | 445 | else nil | |
446 | 446 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
447 | 447 | then throw("landAssetId is required") | |
448 | 448 | else { | |
449 | 449 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
450 | 450 | (acc :+ landInfoArray(landAssetId, landOwnerAddress, stakedTime)) | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | let r = { | |
454 | 454 | let $l = lands | |
455 | 455 | let $s = size($l) | |
456 | 456 | let $acc0 = nil | |
457 | 457 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
458 | 458 | then $a | |
459 | 459 | else oneLand($a, $l[$i]) | |
460 | 460 | ||
461 | 461 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
462 | 462 | then $a | |
463 | 463 | else throw("List size exceeds 100") | |
464 | 464 | ||
465 | 465 | $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) | |
466 | 466 | } | |
467 | 467 | $Tuple2(nil, r) | |
468 | 468 | } | |
469 | 469 | ||
470 | 470 | ||
471 | 471 | ||
472 | 472 | @Callable(i) | |
473 | 473 | func landsByIdsInfoREADONLY (landAssetIds) = { | |
474 | 474 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
475 | 475 | then throw("landAssetId is required") | |
476 | 476 | else { | |
477 | 477 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
478 | 478 | let owner = if ((stakedTime > 0)) | |
479 | 479 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
480 | 480 | else "" | |
481 | 481 | (acc :+ landInfoArray(landAssetId, owner, stakedTime)) | |
482 | 482 | } | |
483 | 483 | ||
484 | 484 | let r = { | |
485 | 485 | let $l = landAssetIds | |
486 | 486 | let $s = size($l) | |
487 | 487 | let $acc0 = nil | |
488 | 488 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
489 | 489 | then $a | |
490 | 490 | else oneLand($a, $l[$i]) | |
491 | 491 | ||
492 | 492 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
493 | 493 | then $a | |
494 | 494 | else throw("List size exceeds 100") | |
495 | 495 | ||
496 | 496 | $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) | |
497 | 497 | } | |
498 | 498 | $Tuple2(nil, r) | |
499 | 499 | } | |
500 | 500 | ||
501 | 501 | ||
502 | 502 | ||
503 | 503 | @Callable(i) | |
504 | 504 | func warehouseOrderByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
505 | 505 | then throw("landAssetId is required") | |
506 | 506 | else { | |
507 | 507 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
508 | 508 | let owner = if ((stakedTime > 0)) | |
509 | 509 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
510 | 510 | else "" | |
511 | 511 | $Tuple2(nil, landOrderInfoArray(landAssetId, owner)) | |
512 | 512 | } | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | ||
516 | 516 | @Callable(i) | |
517 | 517 | func ordersByLandIdsInfoREADONLY (landAssetIds) = { | |
518 | 518 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
519 | 519 | then throw("landAssetId is required") | |
520 | 520 | else { | |
521 | 521 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
522 | 522 | let owner = if ((stakedTime > 0)) | |
523 | 523 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
524 | 524 | else "" | |
525 | 525 | (acc :+ landOrderInfoArray(landAssetId, owner)) | |
526 | 526 | } | |
527 | 527 | ||
528 | 528 | let r = { | |
529 | 529 | let $l = landAssetIds | |
530 | 530 | let $s = size($l) | |
531 | 531 | let $acc0 = nil | |
532 | 532 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
533 | 533 | then $a | |
534 | 534 | else oneLand($a, $l[$i]) | |
535 | 535 | ||
536 | 536 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
537 | 537 | then $a | |
538 | 538 | else throw("List size exceeds 100") | |
539 | 539 | ||
540 | 540 | $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) | |
541 | 541 | } | |
542 | 542 | $Tuple2(nil, r) | |
543 | 543 | } | |
544 | 544 | ||
545 | 545 | ||
546 | 546 | ||
547 | 547 | @Callable(i) | |
548 | 548 | func cancelWarehouseOrders (landAssetIds) = if ((i.caller != this)) | |
549 | 549 | then throw("permission denied") | |
550 | 550 | else { | |
551 | 551 | let blocked = getBoolean(stakingContract, keyBlocked()) | |
552 | 552 | if (if (!(isDefined(blocked))) | |
553 | 553 | then true | |
554 | 554 | else (value(blocked) == false)) | |
555 | 555 | then throw("Contracts should be blocked before canceling orders") | |
556 | 556 | else { | |
557 | - | func oneLand ( | |
557 | + | func oneLand (a,landAssetId) = if ((landAssetId == "")) | |
558 | 558 | then throw("landAssetId is required") | |
559 | 559 | else { | |
560 | - | let | |
561 | - | if ( | |
560 | + | let c = asBoolean(invoke(economyContract, "setWarehouseOrder", [landAssetId, "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"], nil)) | |
561 | + | if (if (a) | |
562 | 562 | then true | |
563 | - | else cancel | |
563 | + | else c) | |
564 | + | then !(if (a) | |
565 | + | then c | |
566 | + | else false) | |
567 | + | else false | |
564 | 568 | } | |
565 | 569 | ||
566 | 570 | let r = { | |
567 | 571 | let $l = landAssetIds | |
568 | 572 | let $s = size($l) | |
569 | 573 | let $acc0 = false | |
570 | 574 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
571 | 575 | then $a | |
572 | 576 | else oneLand($a, $l[$i]) | |
573 | 577 | ||
574 | 578 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
575 | 579 | then $a | |
576 | 580 | else throw("List size exceeds 30") | |
577 | 581 | ||
578 | 582 | $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($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) | |
579 | 583 | } | |
580 | 584 | $Tuple2(nil, r) | |
581 | 585 | } | |
582 | 586 | } | |
583 | 587 | ||
584 | 588 |
github/deemru/w8io/169f3d6 73.13 ms ◑