tx · GFznp4ESpxVrmuim7JgBwzsZ3eu918z7dbBgBnYjTaeq 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.04100000 Waves 2023.03.13 13:13 [2488117] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "GFznp4ESpxVrmuim7JgBwzsZ3eu918z7dbBgBnYjTaeq", "fee": 4100000, "feeAssetId": null, "timestamp": 1678702384817, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "3XaQFaNLoP1SeP4e5BrGHjhCHvx1MCgJr9sCkAbv7qob6fhjvFrKs7XBKpfVdnpDxKoU3Q8roaj6SZjVXR5PhEvD" ], "script": "base64:BgJ8CAISAwoBCBIDCgEEEgASAwoBCBIAEgMKAQgSBAoCAQgSBAoCAQgSBAoCAgISBAoCAQgSBAoCAQESBAoCCAgSABIECgICAhIECgICAhIDCgEIEgMKAQgSBAoCCAgSAwoBGBIDCgEYEgMKAQESBQoDAQEIEgMKAQgSAwoBCH4ABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgEBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAQFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBj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UKaW5mcmFMZXZlbAIBOgDFRhIL", "height": 2488117, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DyMigqn594zvd9DcHT6d9N3twnMJ86PCkB7b1m9LCQba Next: 9k6s6NHQRgQse7qFAG9FBkJ1Re9MQPbURKFBtLLWToYm Diff:
Old | New | Differences | |
---|---|---|---|
576 | 576 | func getWarehouse (whKey,landIndex,infraLevel) = { | |
577 | 577 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
578 | 578 | let p = split(valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0:")), ":") | |
579 | - | [ | |
579 | + | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
580 | 580 | then p[whIdxRes] | |
581 | 581 | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
582 | 582 | then p[whIdxMat] | |
671 | 671 | ||
672 | 672 | ||
673 | 673 | func checkClaimConditions (addr,claimMode,landAssetIdIn) = { | |
674 | - | let $ | |
674 | + | let $t01829218831 = if ((claimMode == claimModeWh)) | |
675 | 675 | then $Tuple2(landAssetIdIn, valueOrElse(getString(keyStakedDuckByOwner(addr)), "")) | |
676 | 676 | else { | |
677 | 677 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
681 | 681 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
682 | 682 | else $Tuple2(loc[locIdxId], duckAssetId) | |
683 | 683 | } | |
684 | - | let landAssetId = $ | |
685 | - | let duckId = $ | |
684 | + | let landAssetId = $t01829218831._1 | |
685 | + | let duckId = $t01829218831._2 | |
686 | 686 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
687 | 687 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
688 | 688 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Land " + asset.name) + " is not staked")) | |
730 | 730 | let currentPack = getBackpack(bpKey) | |
731 | 731 | let currentPackRes = split(currentPack[bpIdxRes], "_") | |
732 | 732 | let currentWhRes = split(currentWh[whIdxRes], "_") | |
733 | - | let $ | |
733 | + | let $t02124321746 = if ((claimMode == claimModeWh)) | |
734 | 734 | then $Tuple2(addRes(currentWhRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), currentPack[bpIdxRes]) | |
735 | 735 | else if ((claimMode == claimModeDuck)) | |
736 | 736 | then $Tuple2(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece)) | |
737 | 737 | else distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
738 | - | let whRes = $ | |
739 | - | let bpRes = $ | |
738 | + | let whRes = $t02124321746._1 | |
739 | + | let bpRes = $t02124321746._2 | |
740 | 740 | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxVol], whRes, currentWh[whIdxMat], currentWh[whIdxProd]]) | |
741 | 741 | } | |
742 | 742 | } | |
773 | 773 | let mList = split(currentPack[bpIdxMat], "_") | |
774 | 774 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
775 | 775 | let claimResult = claimAll(addr, c._2, pieces, claimModeWhThenDuck) | |
776 | - | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString(claimResult._5, ":"))] ++ claimResult._1), newLevel) | |
776 | + | let whData = claimResult._5 | |
777 | + | let newVolData = makeString([split(whData[whIdxVol], "_")[0], toString(newLevel)], "_") | |
778 | + | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd]], ":"))] ++ claimResult._1), newLevel) | |
777 | 779 | } | |
778 | 780 | } | |
779 | 781 | } | |
850 | 852 | let idx = indexOf(lands, landAssetId) | |
851 | 853 | if (!(isDefined(idx))) | |
852 | 854 | then throw(("Your staked lands don't contain " + landAssetId)) | |
853 | - | else $Tuple7(sizesOut, arts, continent, bpRes, (((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ Burn(fromBase58String(landAssetId), 1)), props, removeByIndex(lands, value(idx))) | |
855 | + | else $Tuple7(sizesOut, arts, continent, bpRes, ((((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ DeleteEntry(keyWarehouseByLand(landAssetId))) :+ Burn(fromBase58String(landAssetId), 1)), props, removeByIndex(lands, value(idx))) | |
854 | 856 | } | |
855 | 857 | } | |
856 | 858 | } |
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 incubatorAddr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let breederAddr = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if ((base58'2W' == $match0)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if ((base58'2T' == $match0)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let defaultRestAddressStr = match chain { | |
34 | 34 | case _ => | |
35 | 35 | if ((base58'2W' == $match0)) | |
36 | 36 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
37 | 37 | else if ((base58'2T' == $match0)) | |
38 | 38 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let HEALCOST = 10000 | |
45 | 45 | ||
46 | 46 | let LANDPREFIX = "LAND" | |
47 | 47 | ||
48 | 48 | let DUCKPREFIX = "DUCK" | |
49 | 49 | ||
50 | 50 | let DEFAULTLOCATION = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let NUMRES = 6 | |
53 | 53 | ||
54 | 54 | let SSIZE = 25 | |
55 | 55 | ||
56 | 56 | let MSIZE = 100 | |
57 | 57 | ||
58 | 58 | let LSIZE = 225 | |
59 | 59 | ||
60 | 60 | let XLSIZE = 400 | |
61 | 61 | ||
62 | 62 | let XXLSIZE = 625 | |
63 | 63 | ||
64 | 64 | let DAILYRESBYPIECE = 3456000 | |
65 | 65 | ||
66 | 66 | let DAYMILLIS = 86400000 | |
67 | 67 | ||
68 | 68 | let FIVEMINUTESMILLIS = 300000 | |
69 | 69 | ||
70 | 70 | let RESOURCEPRICEMIN = 158549 | |
71 | 71 | ||
72 | 72 | let InfraUpgradeCostS = match chain { | |
73 | 73 | case _ => | |
74 | 74 | if ((base58'2W' == $match0)) | |
75 | 75 | then 6307198406 | |
76 | 76 | else if ((base58'2T' == $match0)) | |
77 | 77 | then 63071984 | |
78 | 78 | else throw("Unknown chain") | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | let InfraUpgradeCostSUsdn = match chain { | |
82 | 82 | case _ => | |
83 | 83 | if ((base58'2W' == $match0)) | |
84 | 84 | then 40000000 | |
85 | 85 | else if ((base58'2T' == $match0)) | |
86 | 86 | then 400000 | |
87 | 87 | else throw("Unknown chain") | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | let EXPMATERIALS = match chain { | |
91 | 91 | case _ => | |
92 | 92 | if ((base58'2W' == $match0)) | |
93 | 93 | then 157679960139 | |
94 | 94 | else if ((base58'2T' == $match0)) | |
95 | 95 | then 1576799601 | |
96 | 96 | else throw("Unknown chain") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | let EXPUSDN = match chain { | |
100 | 100 | case _ => | |
101 | 101 | if ((base58'2W' == $match0)) | |
102 | 102 | then 1000000000 | |
103 | 103 | else if ((base58'2T' == $match0)) | |
104 | 104 | then 10000000 | |
105 | 105 | else throw("Unknown chain") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | let SEP = "__" | |
109 | 109 | ||
110 | 110 | let MULT6 = 1000000 | |
111 | 111 | ||
112 | 112 | let FIVEX = toBigInt(5) | |
113 | 113 | ||
114 | 114 | let TWENTYX = toBigInt(20) | |
115 | 115 | ||
116 | 116 | let TWENTY2X = toBigInt((20 * 20)) | |
117 | 117 | ||
118 | 118 | let TWENTY3X = toBigInt(((20 * 20) * 20)) | |
119 | 119 | ||
120 | 120 | let TWENTY4X = toBigInt((((20 * 20) * 20) * 20)) | |
121 | 121 | ||
122 | 122 | let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
123 | 123 | ||
124 | 124 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
125 | 125 | ||
126 | 126 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
127 | 127 | ||
128 | 128 | let ARTPRESALE = "PRESALE" | |
129 | 129 | ||
130 | 130 | let PRESALENUMLANDS = 500 | |
131 | 131 | ||
132 | 132 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | let IdxCfgStakingDapp = 1 | |
139 | 139 | ||
140 | 140 | let IdxCfgEconomyDapp = 2 | |
141 | 141 | ||
142 | 142 | let IdxCfgGovernanceDapp = 3 | |
143 | 143 | ||
144 | 144 | func keyRestCfg () = "%s__restConfig" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyRestAddress () = "%s__restAddr" | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
157 | 157 | ||
158 | 158 | let restCfg = readRestCfgOrFail(restContract) | |
159 | 159 | ||
160 | 160 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
161 | 161 | ||
162 | 162 | let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp) | |
163 | 163 | ||
164 | 164 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyNextFreeLandNum () = "nextLandNum" | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func keyLandToAssetId (landNum) = ("landToAsset_" + landNum) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func keyPresaleArtActivatedByAssetIdAndOwner (assetId,ownerAddr) = ((("presaleArtActivatedByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func keyLandArtStatusByTypeAssetIdAndOwner (type,assetId,ownerAddr) = makeString(["landArtStatusByTypeAssetIdAndOwner", type, assetId, ownerAddr], "_") | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func keyResProportions () = "resTypesProportions" | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func keyBlocked () = "contractsBlocked" | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | let recLandNum = 0 | |
237 | 237 | ||
238 | 238 | let recLandSize = 1 | |
239 | 239 | ||
240 | 240 | let recTerrains = 2 | |
241 | 241 | ||
242 | 242 | let recContinent = 3 | |
243 | 243 | ||
244 | 244 | let locIdxContinent = 0 | |
245 | 245 | ||
246 | 246 | let locIdxType = 1 | |
247 | 247 | ||
248 | 248 | let locIdxId = 2 | |
249 | 249 | ||
250 | 250 | let bpIdxLevel = 0 | |
251 | 251 | ||
252 | 252 | let bpIdxRes = 1 | |
253 | 253 | ||
254 | 254 | let bpIdxMat = 2 | |
255 | 255 | ||
256 | 256 | let bpIdxProd = 3 | |
257 | 257 | ||
258 | 258 | let whIdxVol = 0 | |
259 | 259 | ||
260 | 260 | let whIdxRes = 1 | |
261 | 261 | ||
262 | 262 | let whIdxMat = 2 | |
263 | 263 | ||
264 | 264 | let whIdxProd = 3 | |
265 | 265 | ||
266 | 266 | let claimModeWh = 0 | |
267 | 267 | ||
268 | 268 | let claimModeDuck = 1 | |
269 | 269 | ||
270 | 270 | let claimModeWhThenDuck = 2 | |
271 | 271 | ||
272 | 272 | func asString (v) = match v { | |
273 | 273 | case s: String => | |
274 | 274 | s | |
275 | 275 | case _ => | |
276 | 276 | throw("fail to cast into String") | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func distributeByWeights (total,weights) = { | |
281 | 281 | let sum = (((((weights[0] + weights[1]) + weights[2]) + weights[3]) + weights[4]) + weights[5]) | |
282 | 282 | if ((0 >= sum)) | |
283 | 283 | then throw("Zero weights sum") | |
284 | 284 | else { | |
285 | 285 | let norm6 = fraction(total, MULT6, sum) | |
286 | 286 | func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6)) | |
287 | 287 | ||
288 | 288 | let $l = weights | |
289 | 289 | let $s = size($l) | |
290 | 290 | let $acc0 = nil | |
291 | 291 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
292 | 292 | then $a | |
293 | 293 | else normalizer($a, $l[$i]) | |
294 | 294 | ||
295 | 295 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
296 | 296 | then $a | |
297 | 297 | else throw("List size exceeds 6") | |
298 | 298 | ||
299 | 299 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
300 | 300 | } | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func getNeededMaterials (total) = { | |
305 | 305 | let props = split(value(getString(keyResProportions())), "_") | |
306 | 306 | if ((size(props) != NUMRES)) | |
307 | 307 | then throw("Wrong proportions data") | |
308 | 308 | else { | |
309 | 309 | let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])] | |
310 | 310 | distributeByWeights(total, r) | |
311 | 311 | } | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | func subtractMaterials (shouldUseMat,has,totalNeed) = { | |
316 | 316 | let need = getNeededMaterials(totalNeed) | |
317 | 317 | func subtractor (acc,idx) = { | |
318 | 318 | let result = (parseIntValue(has[idx]) - need[idx]) | |
319 | 319 | if ((0 > result)) | |
320 | 320 | then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx]))) | |
321 | 321 | else (acc :+ toString(result)) | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | if (shouldUseMat) | |
325 | 325 | then { | |
326 | 326 | let $l = [0, 1, 2, 3, 4, 5] | |
327 | 327 | let $s = size($l) | |
328 | 328 | let $acc0 = nil | |
329 | 329 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
330 | 330 | then $a | |
331 | 331 | else subtractor($a, $l[$i]) | |
332 | 332 | ||
333 | 333 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
334 | 334 | then $a | |
335 | 335 | else throw("List size exceeds 6") | |
336 | 336 | ||
337 | 337 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
338 | 338 | } | |
339 | 339 | else has | |
340 | 340 | } | |
341 | 341 | ||
342 | 342 | ||
343 | 343 | func updateProportionsInternal (propList,terrainCounts,landSizeIndex,sign) = if ((size(propList) != NUMRES)) | |
344 | 344 | then throw("Wrong proportions data") | |
345 | 345 | else { | |
346 | 346 | func updater (acc,i) = { | |
347 | 347 | let result = (parseIntValue(propList[i]) + ((sign * terrainCounts[i]) * landSizeIndex)) | |
348 | 348 | if ((0 > result)) | |
349 | 349 | then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex))) | |
350 | 350 | else (acc :+ toString(result)) | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | let r = { | |
354 | 354 | let $l = [0, 1, 2, 3, 4, 5] | |
355 | 355 | let $s = size($l) | |
356 | 356 | let $acc0 = nil | |
357 | 357 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
358 | 358 | then $a | |
359 | 359 | else updater($a, $l[$i]) | |
360 | 360 | ||
361 | 361 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
362 | 362 | then $a | |
363 | 363 | else throw("List size exceeds 6") | |
364 | 364 | ||
365 | 365 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
366 | 366 | } | |
367 | 367 | makeString(r, "_") | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | func updateProportions (terrainCounts,landSizeIndex,sign) = { | |
372 | 372 | let propList = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_") | |
373 | 373 | updateProportionsInternal(propList, terrainCounts, landSizeIndex, sign) | |
374 | 374 | } | |
375 | 375 | ||
376 | 376 | ||
377 | 377 | func countTerrains (terrains) = [(size(split(terrains, "A")) - 1), (size(split(terrains, "B")) - 1), (size(split(terrains, "C")) - 1), (size(split(terrains, "D")) - 1), (size(split(terrains, "E")) - 1), (size(split(terrains, "F")) - 1)] | |
378 | 378 | ||
379 | 379 | ||
380 | 380 | func numPiecesBySize (landSize) = match landSize { | |
381 | 381 | case _ => | |
382 | 382 | if (("S" == $match0)) | |
383 | 383 | then SSIZE | |
384 | 384 | else if (("M" == $match0)) | |
385 | 385 | then MSIZE | |
386 | 386 | else if (("L" == $match0)) | |
387 | 387 | then LSIZE | |
388 | 388 | else if (("XL" == $match0)) | |
389 | 389 | then XLSIZE | |
390 | 390 | else if (("XXL" == $match0)) | |
391 | 391 | then XXLSIZE | |
392 | 392 | else throw("Unknown land size") | |
393 | 393 | } | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func subOneInList (aList,idx,amount) = { | |
397 | 397 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
398 | 398 | then toString((parseIntValue(aList[i]) - amount)) | |
399 | 399 | else aList[i])) | |
400 | 400 | ||
401 | 401 | let r = { | |
402 | 402 | let $l = [0, 1, 2, 3, 4, 5] | |
403 | 403 | let $s = size($l) | |
404 | 404 | let $acc0 = nil | |
405 | 405 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
406 | 406 | then $a | |
407 | 407 | else subber($a, $l[$i]) | |
408 | 408 | ||
409 | 409 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
410 | 410 | then $a | |
411 | 411 | else throw("List size exceeds 6") | |
412 | 412 | ||
413 | 413 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
414 | 414 | } | |
415 | 415 | makeString(r, "_") | |
416 | 416 | } | |
417 | 417 | ||
418 | 418 | ||
419 | 419 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
420 | 420 | func adder (acc,i) = { | |
421 | 421 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
422 | 422 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | let r = { | |
426 | 426 | let $l = [0, 1, 2, 3, 4, 5] | |
427 | 427 | let $s = size($l) | |
428 | 428 | let $acc0 = nil | |
429 | 429 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
430 | 430 | then $a | |
431 | 431 | else adder($a, $l[$i]) | |
432 | 432 | ||
433 | 433 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
434 | 434 | then $a | |
435 | 435 | else throw("List size exceeds 6") | |
436 | 436 | ||
437 | 437 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
438 | 438 | } | |
439 | 439 | makeString(r, "_") | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | func virtClaim (terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
444 | 444 | func adder (acc,i) = { | |
445 | 445 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
446 | 446 | $Tuple2((acc._1 :+ resOfType), (acc._2 + resOfType)) | |
447 | 447 | } | |
448 | 448 | ||
449 | 449 | let $l = [0, 1, 2, 3, 4, 5] | |
450 | 450 | let $s = size($l) | |
451 | 451 | let $acc0 = $Tuple2(nil, 0) | |
452 | 452 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
453 | 453 | then $a | |
454 | 454 | else adder($a, $l[$i]) | |
455 | 455 | ||
456 | 456 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
457 | 457 | then $a | |
458 | 458 | else throw("List size exceeds 6") | |
459 | 459 | ||
460 | 460 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | func distributeRes (currentWhRes,currentPackRes,resToClaim,whSpaceLeft) = { | |
465 | 465 | let resListToClaim = resToClaim._1 | |
466 | 466 | let resAmToClaim = resToClaim._2 | |
467 | 467 | if ((resAmToClaim == 0)) | |
468 | 468 | then $Tuple2(makeString(currentWhRes, "_"), makeString(currentPackRes, "_")) | |
469 | 469 | else if ((whSpaceLeft >= resAmToClaim)) | |
470 | 470 | then { | |
471 | 471 | func addLists (acc,i) = (acc :+ toString((parseIntValue(currentWhRes[i]) + resListToClaim[i]))) | |
472 | 472 | ||
473 | 473 | let r = { | |
474 | 474 | let $l = [0, 1, 2, 3, 4, 5] | |
475 | 475 | let $s = size($l) | |
476 | 476 | let $acc0 = nil | |
477 | 477 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
478 | 478 | then $a | |
479 | 479 | else addLists($a, $l[$i]) | |
480 | 480 | ||
481 | 481 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
482 | 482 | then $a | |
483 | 483 | else throw("List size exceeds 6") | |
484 | 484 | ||
485 | 485 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
486 | 486 | } | |
487 | 487 | $Tuple2(makeString(r, "_"), makeString(currentPackRes, "_")) | |
488 | 488 | } | |
489 | 489 | else { | |
490 | 490 | func addPartLists (acc,i) = { | |
491 | 491 | let whPart = fraction(resListToClaim[i], whSpaceLeft, resAmToClaim) | |
492 | 492 | $Tuple2((acc._1 :+ toString((parseIntValue(currentWhRes[i]) + whPart))), (acc._2 :+ toString(((parseIntValue(currentPackRes[i]) + resListToClaim[i]) - whPart)))) | |
493 | 493 | } | |
494 | 494 | ||
495 | 495 | let r = { | |
496 | 496 | let $l = [0, 1, 2, 3, 4, 5] | |
497 | 497 | let $s = size($l) | |
498 | 498 | let $acc0 = $Tuple2(nil, nil) | |
499 | 499 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
500 | 500 | then $a | |
501 | 501 | else addPartLists($a, $l[$i]) | |
502 | 502 | ||
503 | 503 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
504 | 504 | then $a | |
505 | 505 | else throw("List size exceeds 6") | |
506 | 506 | ||
507 | 507 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
508 | 508 | } | |
509 | 509 | $Tuple2(makeString(r._1, "_"), makeString(r._2, "_")) | |
510 | 510 | } | |
511 | 511 | } | |
512 | 512 | ||
513 | 513 | ||
514 | 514 | func abs (x) = if ((x >= toBigInt(0))) | |
515 | 515 | then x | |
516 | 516 | else -(x) | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | let freq = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
520 | 520 | ||
521 | 521 | func genChar (n,freqs) = { | |
522 | 522 | let rem = toInt((n % TWENTYX)) | |
523 | 523 | let letter = if ((freqs[0] > rem)) | |
524 | 524 | then "A" | |
525 | 525 | else if ((freqs[1] > rem)) | |
526 | 526 | then "B" | |
527 | 527 | else if ((freqs[2] > rem)) | |
528 | 528 | then "C" | |
529 | 529 | else if ((freqs[3] > rem)) | |
530 | 530 | then "D" | |
531 | 531 | else if ((freqs[4] > rem)) | |
532 | 532 | then "E" | |
533 | 533 | else "F" | |
534 | 534 | letter | |
535 | 535 | } | |
536 | 536 | ||
537 | 537 | ||
538 | 538 | func genTerrains (seed,continentIdx) = { | |
539 | 539 | let f = freq[continentIdx] | |
540 | 540 | func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, f)) + genChar((acc._2 / TWENTYX), f)) + genChar((acc._2 / TWENTY2X), f)) + genChar((acc._2 / TWENTY3X), f)) + genChar((acc._2 / TWENTY4X), f)), (acc._2 / TWENTY5X)) | |
541 | 541 | ||
542 | 542 | let t = { | |
543 | 543 | let $l = [1, 2, 3, 4, 5] | |
544 | 544 | let $s = size($l) | |
545 | 545 | let $acc0 = $Tuple2("", (seed / FIVEX)) | |
546 | 546 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
547 | 547 | then $a | |
548 | 548 | else terrainGenerator($a, $l[$i]) | |
549 | 549 | ||
550 | 550 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
551 | 551 | then $a | |
552 | 552 | else throw("List size exceeds 5") | |
553 | 553 | ||
554 | 554 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
555 | 555 | } | |
556 | 556 | t._1 | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | func getBackpack (bpKey) = { | |
561 | 561 | let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
562 | 562 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
563 | 563 | then p[bpIdxRes] | |
564 | 564 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
565 | 565 | then p[bpIdxMat] | |
566 | 566 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
567 | 567 | } | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func getWarehouseVolume (volPrefix) = { | |
571 | 571 | let parts = split(volPrefix, "_") | |
572 | 572 | ((300000000 * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
573 | 573 | } | |
574 | 574 | ||
575 | 575 | ||
576 | 576 | func getWarehouse (whKey,landIndex,infraLevel) = { | |
577 | 577 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
578 | 578 | let p = split(valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0:")), ":") | |
579 | - | [ | |
579 | + | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
580 | 580 | then p[whIdxRes] | |
581 | 581 | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
582 | 582 | then p[whIdxMat] | |
583 | 583 | else "0_0_0_0_0_0", p[whIdxProd]] | |
584 | 584 | } | |
585 | 585 | ||
586 | 586 | ||
587 | 587 | func getWarehouseCurrResVolume (currentWh) = { | |
588 | 588 | func sum (acc,item) = (acc + parseIntValue(item)) | |
589 | 589 | ||
590 | 590 | let $l = split(currentWh[whIdxRes], "_") | |
591 | 591 | let $s = size($l) | |
592 | 592 | let $acc0 = 0 | |
593 | 593 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
594 | 594 | then $a | |
595 | 595 | else sum($a, $l[$i]) | |
596 | 596 | ||
597 | 597 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
598 | 598 | then $a | |
599 | 599 | else throw("List size exceeds 6") | |
600 | 600 | ||
601 | 601 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
602 | 602 | } | |
603 | 603 | ||
604 | 604 | ||
605 | 605 | func expeditionInternal (caller,txId) = { | |
606 | 606 | let userAddr = toString(caller) | |
607 | 607 | let bigNum = abs(toBigInt(txId)) | |
608 | 608 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
609 | 609 | let landNum = toString(freeNum) | |
610 | 610 | let continentIdx = toInt((bigNum % FIVEX)) | |
611 | 611 | let terrains = genTerrains(bigNum, continentIdx) | |
612 | 612 | let continent = continents[continentIdx] | |
613 | 613 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", terrains, continent], "_"), 1, 0, false) | |
614 | 614 | let assetId = calculateAssetId(issue) | |
615 | 615 | let id = toBase58String(assetId) | |
616 | 616 | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), IntegerEntry(keyInfraLevelByAssetIdAndOwner(id, userAddr), 0), ScriptTransfer(caller, 1, assetId)], $Tuple2(id, continent)) | |
617 | 617 | } | |
618 | 618 | ||
619 | 619 | ||
620 | 620 | func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
621 | 621 | then throw("signature does not match") | |
622 | 622 | else { | |
623 | 623 | let parts = split(toUtf8String(message), ";") | |
624 | 624 | let hp = split(split(parts[0], "|")[0], "_") | |
625 | 625 | let curHP = parseIntValue(hp[0]) | |
626 | 626 | let newHP = parseIntValue(hp[1]) | |
627 | 627 | let locAndTime = split(parts[1], ":") | |
628 | 628 | let targetLocation = split(locAndTime[0], "_") | |
629 | 629 | if ((targetLocation[1] != "E")) | |
630 | 630 | then throw("expedition target location type should be E") | |
631 | 631 | else { | |
632 | 632 | let time = parseIntValue(locAndTime[1]) | |
633 | 633 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
634 | 634 | then true | |
635 | 635 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
636 | 636 | then throw("signature outdated") | |
637 | 637 | else { | |
638 | 638 | let userAddr = toString(caller) | |
639 | 639 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
640 | 640 | let keyHealth = keyDuckHealth(duckAssetId) | |
641 | 641 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
642 | 642 | if ((oldFromState != curHP)) | |
643 | 643 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
644 | 644 | else if ((0 >= curHP)) | |
645 | 645 | then throw("You can't fly with zero health") | |
646 | 646 | else if ((0 >= newHP)) | |
647 | 647 | then $Tuple2(((if (!(shouldUseMat)) | |
648 | 648 | then [ScriptTransfer(caller, EXPUSDN, usdnAssetId)] | |
649 | 649 | else nil) :+ IntegerEntry(keyHealth, 0)), "") | |
650 | 650 | else { | |
651 | 651 | let bpKey = keyBackpackByDuck(duckAssetId) | |
652 | 652 | let currentPack = getBackpack(bpKey) | |
653 | 653 | let mList = split(currentPack[bpIdxMat], "_") | |
654 | 654 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
655 | 655 | let e = expeditionInternal(caller, txId) | |
656 | 656 | let id = e._2._1 | |
657 | 657 | $Tuple2((((e._1 :+ StringEntry(keyDuckLocation(duckAssetId), makeString([e._2._2, "L", id], "_"))) :+ IntegerEntry(keyHealth, newHP)) :+ StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))), id) | |
658 | 658 | } | |
659 | 659 | } | |
660 | 660 | } | |
661 | 661 | } | |
662 | 662 | ||
663 | 663 | ||
664 | 664 | func applyBonuses (landAssetId,pieces) = { | |
665 | 665 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
666 | 666 | let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
667 | 667 | then pieces | |
668 | 668 | else 0) | |
669 | 669 | ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) + fraction(DAILYRESBYPIECE, (artPieces * 3), (pieces * 20))) | |
670 | 670 | } | |
671 | 671 | ||
672 | 672 | ||
673 | 673 | func checkClaimConditions (addr,claimMode,landAssetIdIn) = { | |
674 | - | let $ | |
674 | + | let $t01829218831 = if ((claimMode == claimModeWh)) | |
675 | 675 | then $Tuple2(landAssetIdIn, valueOrElse(getString(keyStakedDuckByOwner(addr)), "")) | |
676 | 676 | else { | |
677 | 677 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
678 | 678 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
679 | 679 | let loc = split(value(curLocation), "_") | |
680 | 680 | if ((loc[locIdxType] != "L")) | |
681 | 681 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
682 | 682 | else $Tuple2(loc[locIdxId], duckAssetId) | |
683 | 683 | } | |
684 | - | let landAssetId = $ | |
685 | - | let duckId = $ | |
684 | + | let landAssetId = $t01829218831._1 | |
685 | + | let duckId = $t01829218831._2 | |
686 | 686 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
687 | 687 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
688 | 688 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Land " + asset.name) + " is not staked")) | |
689 | 689 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
690 | 690 | if ((owner != addr)) | |
691 | 691 | then throw((LANDPREFIX + " is not yours")) | |
692 | 692 | else { | |
693 | 693 | let d = split(asset.description, "_") | |
694 | 694 | $Tuple4(duckId, landAssetId, d, savedTime) | |
695 | 695 | } | |
696 | 696 | } | |
697 | 697 | ||
698 | 698 | ||
699 | 699 | func claimResInternal (addr,amount,claimMode,landAssetIdIn) = if ((0 > amount)) | |
700 | 700 | then throw("Negative amount") | |
701 | 701 | else { | |
702 | 702 | let c = checkClaimConditions(addr, claimMode, landAssetIdIn) | |
703 | 703 | let landSize = c._3[recLandSize] | |
704 | 704 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
705 | 705 | let deltaTime = (lastBlock.timestamp - c._4) | |
706 | 706 | if ((0 > deltaTime)) | |
707 | 707 | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
708 | 708 | else { | |
709 | 709 | let pieces = numPiecesBySize(landSize) | |
710 | 710 | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
711 | 711 | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
712 | 712 | if ((amount > availRes)) | |
713 | 713 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
714 | 714 | else { | |
715 | 715 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
716 | 716 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
717 | 717 | let landIndex = (pieces / SSIZE) | |
718 | 718 | let resToClaim = virtClaim(terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece) | |
719 | 719 | let whKey = keyWarehouseByLand(c._2) | |
720 | 720 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(c._2)), 0) | |
721 | 721 | let currentWh = getWarehouse(whKey, landIndex, infraLevel) | |
722 | 722 | let currWhResVol = getWarehouseCurrResVolume(currentWh) | |
723 | 723 | let whSpaceLeft = (getWarehouseVolume(currentWh[whIdxVol]) - currWhResVol) | |
724 | 724 | if (if ((claimMode == claimModeWh)) | |
725 | 725 | then (amount > whSpaceLeft) | |
726 | 726 | else false) | |
727 | 727 | then throw((("Only " + toString(whSpaceLeft)) + " space left in warehouse")) | |
728 | 728 | else { | |
729 | 729 | let bpKey = keyBackpackByDuck(c._1) | |
730 | 730 | let currentPack = getBackpack(bpKey) | |
731 | 731 | let currentPackRes = split(currentPack[bpIdxRes], "_") | |
732 | 732 | let currentWhRes = split(currentWh[whIdxRes], "_") | |
733 | - | let $ | |
733 | + | let $t02124321746 = if ((claimMode == claimModeWh)) | |
734 | 734 | then $Tuple2(addRes(currentWhRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), currentPack[bpIdxRes]) | |
735 | 735 | else if ((claimMode == claimModeDuck)) | |
736 | 736 | then $Tuple2(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece)) | |
737 | 737 | else distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
738 | - | let whRes = $ | |
739 | - | let bpRes = $ | |
738 | + | let whRes = $t02124321746._1 | |
739 | + | let bpRes = $t02124321746._2 | |
740 | 740 | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxVol], whRes, currentWh[whIdxMat], currentWh[whIdxProd]]) | |
741 | 741 | } | |
742 | 742 | } | |
743 | 743 | } | |
744 | 744 | } | |
745 | 745 | ||
746 | 746 | ||
747 | 747 | func claimAll (addr,landAssetId,pieces,claimMode) = { | |
748 | 748 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
749 | 749 | let savedTime = value(getInteger(timeKey)) | |
750 | 750 | let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId, pieces), DAYMILLIS) * pieces) | |
751 | 751 | claimResInternal(addr, availRes, claimMode, landAssetId) | |
752 | 752 | } | |
753 | 753 | ||
754 | 754 | ||
755 | 755 | func upInfraCommon (shouldUseMat,caller,paymentAmount,landAssetId) = { | |
756 | 756 | let addr = toString(caller) | |
757 | 757 | let c = checkClaimConditions(addr, claimModeWhThenDuck, landAssetId) | |
758 | 758 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
759 | 759 | let infraKey = keyInfraLevelByAssetId(c._2) | |
760 | 760 | let curLevel = valueOrElse(getInteger(infraKey), 0) | |
761 | 761 | if ((curLevel >= 3)) | |
762 | 762 | then throw("Currently max infrastructure level = 3") | |
763 | 763 | else { | |
764 | 764 | let newLevel = (curLevel + 1) | |
765 | 765 | let cost = fraction(InfraUpgradeCostSUsdn, (pieces * newLevel), SSIZE) | |
766 | 766 | if (if (!(shouldUseMat)) | |
767 | 767 | then (paymentAmount != cost) | |
768 | 768 | else false) | |
769 | 769 | then throw(("Payment attached should be " + toString(cost))) | |
770 | 770 | else { | |
771 | 771 | let bpKey = keyBackpackByDuck(c._1) | |
772 | 772 | let currentPack = getBackpack(bpKey) | |
773 | 773 | let mList = split(currentPack[bpIdxMat], "_") | |
774 | 774 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
775 | 775 | let claimResult = claimAll(addr, c._2, pieces, claimModeWhThenDuck) | |
776 | - | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString(claimResult._5, ":"))] ++ claimResult._1), newLevel) | |
776 | + | let whData = claimResult._5 | |
777 | + | let newVolData = makeString([split(whData[whIdxVol], "_")[0], toString(newLevel)], "_") | |
778 | + | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd]], ":"))] ++ claimResult._1), newLevel) | |
777 | 779 | } | |
778 | 780 | } | |
779 | 781 | } | |
780 | 782 | ||
781 | 783 | ||
782 | 784 | func activatePresaleArt (addr,landAssetIdIn) = { | |
783 | 785 | let c = checkClaimConditions(addr, claimModeWhThenDuck, landAssetIdIn) | |
784 | 786 | let landAssetId = c._2 | |
785 | 787 | let activationKey = keyPresaleArtActivatedByAssetId(landAssetId) | |
786 | 788 | if (valueOrElse(getBoolean(activationKey), false)) | |
787 | 789 | then throw("Presale artifact is already activated") | |
788 | 790 | else if ((parseIntValue(c._3[recLandNum]) > PRESALENUMLANDS)) | |
789 | 791 | then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact")) | |
790 | 792 | else { | |
791 | 793 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
792 | 794 | let claimResult = claimAll(addr, landAssetId, pieces, claimModeWhThenDuck) | |
793 | 795 | ((((((claimResult._1 :+ BooleanEntry(activationKey, true)) :+ BooleanEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr), true)) :+ IntegerEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId), pieces)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr), pieces)) :+ StringEntry(claimResult._2, makeString(claimResult._3, ":"))) :+ StringEntry(claimResult._4, makeString(claimResult._5, ":"))) | |
794 | 796 | } | |
795 | 797 | } | |
796 | 798 | ||
797 | 799 | ||
798 | 800 | func mergeInternal (newLandSize,newLevel,formula,addr,landAssetIds,txId,needMat) = { | |
799 | 801 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
800 | 802 | func checkMerge (acc,landAssetId) = { | |
801 | 803 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
802 | 804 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
803 | 805 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked")) | |
804 | 806 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
805 | 807 | if ((owner != addr)) | |
806 | 808 | then throw((LANDPREFIX + " is not yours")) | |
807 | 809 | else { | |
808 | 810 | let d = split(asset.description, "_") | |
809 | 811 | let continent = d[recContinent] | |
810 | 812 | if (if ((acc._3 != "")) | |
811 | 813 | then (acc._3 != continent) | |
812 | 814 | else false) | |
813 | 815 | then throw("Lands should be on the same continent to merge") | |
814 | 816 | else { | |
815 | 817 | let landSize = d[recLandSize] | |
816 | 818 | let sizesIn = acc._1 | |
817 | 819 | let i = valueOrErrorMessage(indexOf(sizesIn, landSize), "You haven't passed all the lands needed") | |
818 | 820 | let sizesOut = (take(sizesIn, i) + drop(sizesIn, (i + 1))) | |
819 | 821 | let pieces = numPiecesBySize(landSize) | |
820 | 822 | let arts = (acc._2 + valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
821 | 823 | then pieces | |
822 | 824 | else 0)) | |
823 | 825 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
824 | 826 | let reqLevel = match landSize { | |
825 | 827 | case _ => | |
826 | 828 | if (("S" == $match0)) | |
827 | 829 | then 3 | |
828 | 830 | else if (("M" == $match0)) | |
829 | 831 | then 4 | |
830 | 832 | else if (("L" == $match0)) | |
831 | 833 | then 5 | |
832 | 834 | else if (("XL" == $match0)) | |
833 | 835 | then 6 | |
834 | 836 | else throw("Only S, M, L, XL can merge") | |
835 | 837 | } | |
836 | 838 | if ((infraLevel != reqLevel)) | |
837 | 839 | then throw("All lands should be maxed to merge") | |
838 | 840 | else { | |
839 | 841 | let landNum = d[recLandNum] | |
840 | 842 | let terrainCounts = countTerrains(d[recTerrains]) | |
841 | 843 | let deltaTime = (lastBlock.timestamp - savedTime) | |
842 | 844 | if ((0 > deltaTime)) | |
843 | 845 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
844 | 846 | else { | |
845 | 847 | let dailyProductionByPiece = applyBonuses(landAssetId, pieces) | |
846 | 848 | let landIndex = (pieces / SSIZE) | |
847 | 849 | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, landIndex, dailyProductionByPiece) | |
848 | 850 | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, landIndex, -1) | |
849 | 851 | let lands = acc._7 | |
850 | 852 | let idx = indexOf(lands, landAssetId) | |
851 | 853 | if (!(isDefined(idx))) | |
852 | 854 | then throw(("Your staked lands don't contain " + landAssetId)) | |
853 | - | else $Tuple7(sizesOut, arts, continent, bpRes, (((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ Burn(fromBase58String(landAssetId), 1)), props, removeByIndex(lands, value(idx))) | |
855 | + | else $Tuple7(sizesOut, arts, continent, bpRes, ((((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyPresaleArtActivatedByAssetId(landAssetId))) :+ DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ DeleteEntry(keyWarehouseByLand(landAssetId))) :+ Burn(fromBase58String(landAssetId), 1)), props, removeByIndex(lands, value(idx))) | |
854 | 856 | } | |
855 | 857 | } | |
856 | 858 | } | |
857 | 859 | } | |
858 | 860 | } | |
859 | 861 | ||
860 | 862 | let bpKey = keyBackpackByDuck(duckAssetId) | |
861 | 863 | let currentPack = getBackpack(bpKey) | |
862 | 864 | let propStr = valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0") | |
863 | 865 | let landsKey = keyStakedLandsByOwner(addr) | |
864 | 866 | let landsStr = getString(landsKey) | |
865 | 867 | let landsIn = if (isDefined(landsStr)) | |
866 | 868 | then split_51C(value(landsStr), "_") | |
867 | 869 | else nil | |
868 | 870 | let r = { | |
869 | 871 | let $l = landAssetIds | |
870 | 872 | let $s = size($l) | |
871 | 873 | let $acc0 = $Tuple7(formula, 0, "", currentPack[bpIdxRes], nil, propStr, landsIn) | |
872 | 874 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
873 | 875 | then $a | |
874 | 876 | else checkMerge($a, $l[$i]) | |
875 | 877 | ||
876 | 878 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
877 | 879 | then $a | |
878 | 880 | else throw("List size exceeds 5") | |
879 | 881 | ||
880 | 882 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
881 | 883 | } | |
882 | 884 | let continent = r._3 | |
883 | 885 | let continentIdx = valueOrErrorMessage(indexOf(continents, continent), ("Unknown continent: " + continent)) | |
884 | 886 | let terrains = genTerrains(abs(toBigInt(txId)), continentIdx) | |
885 | 887 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
886 | 888 | let newLandNum = toString(freeNum) | |
887 | 889 | let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, continent], "_"), 1, 0, false) | |
888 | 890 | let assetId = calculateAssetId(issue) | |
889 | 891 | let newLandAssetId = toBase58String(assetId) | |
890 | 892 | let newMat = makeString(subtractMaterials((needMat > 0), split(currentPack[bpIdxMat], "_"), needMat), "_") | |
891 | 893 | $Tuple2(((((((((((((((r._5 :+ (if ((size(r._7) > 0)) | |
892 | 894 | then StringEntry(landsKey, makeString_11C(r._7, "_")) | |
893 | 895 | else DeleteEntry(landsKey))) :+ IntegerEntry(keyNextFreeLandNum(), (freeNum + 1))) :+ issue) :+ StringEntry(keyLandToAssetId(newLandNum), newLandAssetId)) :+ StringEntry(keyLandAssetIdToOwner(newLandAssetId), addr)) :+ StringEntry(keyLandNumToOwner(newLandNum), addr)) :+ IntegerEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, newLandAssetId), r._2)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, newLandAssetId, addr), r._2)) :+ IntegerEntry(keyInfraLevelByAssetId(newLandAssetId), newLevel)) :+ IntegerEntry(keyInfraLevelByAssetIdAndOwner(newLandAssetId, addr), newLevel)) :+ StringEntry(bpKey, makeString([currentPack[bpIdxLevel], r._4, newMat, currentPack[bpIdxProd]], ":"))) :+ StringEntry(keyResProportions(), r._6)) :+ StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", newLandAssetId], "_"))) :+ ScriptTransfer(addressFromStringValue(addr), 1, assetId)), newLandAssetId) | |
894 | 896 | } | |
895 | 897 | ||
896 | 898 | ||
897 | 899 | func s2m (addr,landAssetIds,txId) = mergeInternal("M", 3, "SSSS", addr, landAssetIds, txId, 0) | |
898 | 900 | ||
899 | 901 | ||
900 | 902 | func m2l (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
901 | 903 | let cost = (InfraUpgradeCostSUsdn * 4) | |
902 | 904 | if (if (!(shouldUseMat)) | |
903 | 905 | then (paymentAmount != cost) | |
904 | 906 | else false) | |
905 | 907 | then throw(("Payment attached should be " + toString(cost))) | |
906 | 908 | else mergeInternal("L", 4, "SMM", addr, landAssetIds, txId, (InfraUpgradeCostS * 4)) | |
907 | 909 | } | |
908 | 910 | ||
909 | 911 | ||
910 | 912 | func l2xl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
911 | 913 | let cost = (InfraUpgradeCostSUsdn * 47) | |
912 | 914 | if (if (!(shouldUseMat)) | |
913 | 915 | then (paymentAmount != cost) | |
914 | 916 | else false) | |
915 | 917 | then throw(("Payment attached should be " + toString(cost))) | |
916 | 918 | else mergeInternal("XL", 5, "SSSML", addr, landAssetIds, txId, (InfraUpgradeCostS * 47)) | |
917 | 919 | } | |
918 | 920 | ||
919 | 921 | ||
920 | 922 | func xl2xxl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
921 | 923 | let cost = (InfraUpgradeCostSUsdn * 54) | |
922 | 924 | if (if (!(shouldUseMat)) | |
923 | 925 | then (paymentAmount != cost) | |
924 | 926 | else false) | |
925 | 927 | then throw(("Payment attached should be " + toString(cost))) | |
926 | 928 | else mergeInternal("XXL", 6, "LXL", addr, landAssetIds, txId, (InfraUpgradeCostS * 54)) | |
927 | 929 | } | |
928 | 930 | ||
929 | 931 | ||
930 | 932 | func mergeCommon (shouldUseMat,addr,paymentAmount,landAssetIds,txId) = { | |
931 | 933 | let mergeResult = match size(landAssetIds) { | |
932 | 934 | case _ => | |
933 | 935 | if ((4 == $match0)) | |
934 | 936 | then s2m(addr, landAssetIds, txId) | |
935 | 937 | else if ((3 == $match0)) | |
936 | 938 | then m2l(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
937 | 939 | else if ((5 == $match0)) | |
938 | 940 | then l2xl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
939 | 941 | else if ((2 == $match0)) | |
940 | 942 | then xl2xxl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
941 | 943 | else throw("Unknown merge") | |
942 | 944 | } | |
943 | 945 | mergeResult | |
944 | 946 | } | |
945 | 947 | ||
946 | 948 | ||
947 | 949 | func prolog (i) = if (valueOrElse(getBoolean(keyBlocked()), false)) | |
948 | 950 | then throw("Contracts are under maintenance") | |
949 | 951 | else StringEntry(keyLastTxIdByUser(toString(i.originCaller)), toBase58String(i.transactionId)) | |
950 | 952 | ||
951 | 953 | ||
952 | 954 | @Callable(i) | |
953 | 955 | func constructorV1 (restAddr) = if ((i.caller != this)) | |
954 | 956 | then throw("Permission denied") | |
955 | 957 | else [StringEntry(keyRestAddress(), restAddr)] | |
956 | 958 | ||
957 | 959 | ||
958 | 960 | ||
959 | 961 | @Callable(i) | |
960 | 962 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
961 | 963 | then throw("permission denied") | |
962 | 964 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
963 | 965 | ||
964 | 966 | ||
965 | 967 | ||
966 | 968 | @Callable(i) | |
967 | 969 | func stakeLand () = { | |
968 | 970 | let prologAction = prolog(i) | |
969 | 971 | if ((size(i.payments) != 1)) | |
970 | 972 | then throw("Exactly one payment required") | |
971 | 973 | else { | |
972 | 974 | let pmt = value(i.payments[0]) | |
973 | 975 | let assetId = value(pmt.assetId) | |
974 | 976 | let address = toString(i.caller) | |
975 | 977 | if ((pmt.amount != 1)) | |
976 | 978 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
977 | 979 | else { | |
978 | 980 | let asset = value(assetInfo(assetId)) | |
979 | 981 | if ((asset.issuer != this)) | |
980 | 982 | then throw("Unknown issuer of token") | |
981 | 983 | else if (!(contains(asset.name, LANDPREFIX))) | |
982 | 984 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
983 | 985 | else { | |
984 | 986 | let landNumSize = drop(asset.name, 4) | |
985 | 987 | let landNum = if (contains(landNumSize, "XXL")) | |
986 | 988 | then dropRight(landNumSize, 3) | |
987 | 989 | else if (contains(landNumSize, "XL")) | |
988 | 990 | then dropRight(landNumSize, 2) | |
989 | 991 | else dropRight(landNumSize, 1) | |
990 | 992 | if (!(isDefined(parseInt(landNum)))) | |
991 | 993 | then throw(("Cannot parse land number from " + asset.name)) | |
992 | 994 | else { | |
993 | 995 | let landAssetId = toBase58String(assetId) | |
994 | 996 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
995 | 997 | if (isDefined(getInteger(timeKey))) | |
996 | 998 | then throw((("NFT " + asset.name) + " is already staked")) | |
997 | 999 | else { | |
998 | 1000 | let d = split(asset.description, "_") | |
999 | 1001 | let terrainCounts = countTerrains(d[recTerrains]) | |
1000 | 1002 | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / SSIZE), 1) | |
1001 | 1003 | let landsStr = getString(keyStakedLandsByOwner(address)) | |
1002 | 1004 | let lands = if (isDefined(landsStr)) | |
1003 | 1005 | then split_51C(value(landsStr), "_") | |
1004 | 1006 | else nil | |
1005 | 1007 | if (containsElement(lands, landAssetId)) | |
1006 | 1008 | then throw(("Your staked lands already contain " + landAssetId)) | |
1007 | 1009 | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyStakedLandsByOwner(address), makeString_11C((lands :+ landAssetId), "_")), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props), prologAction] | |
1008 | 1010 | } | |
1009 | 1011 | } | |
1010 | 1012 | } | |
1011 | 1013 | } | |
1012 | 1014 | } | |
1013 | 1015 | } | |
1014 | 1016 | ||
1015 | 1017 | ||
1016 | 1018 | ||
1017 | 1019 | @Callable(i) | |
1018 | 1020 | func unstakeLand (landAssetIdIn) = { | |
1019 | 1021 | let prologAction = prolog(i) | |
1020 | 1022 | if ((size(i.payments) != 0)) | |
1021 | 1023 | then throw("unstake doesn't require any payments") | |
1022 | 1024 | else { | |
1023 | 1025 | let addr = toString(i.caller) | |
1024 | 1026 | let c = checkClaimConditions(addr, claimModeDuck, landAssetIdIn) | |
1025 | 1027 | let landAssetId = c._2 | |
1026 | 1028 | let landsKey = keyStakedLandsByOwner(addr) | |
1027 | 1029 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
1028 | 1030 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
1029 | 1031 | let props = updateProportions(terrainCounts, (pieces / SSIZE), -1) | |
1030 | 1032 | let claimResult = claimAll(addr, landAssetId, pieces, claimModeDuck) | |
1031 | 1033 | let lands = split_51C(valueOrElse(getString(landsKey), ""), "_") | |
1032 | 1034 | let idx = indexOf(lands, landAssetId) | |
1033 | 1035 | if (!(isDefined(idx))) | |
1034 | 1036 | then throw(("Your staked lands don't contain " + landAssetId)) | |
1035 | 1037 | else { | |
1036 | 1038 | let t = value(blockInfoByHeight(height)).timestamp | |
1037 | 1039 | let releaseTime = valueOrElse(getInteger(govContract, keyUserGwlReleaseTime(addr)), 0) | |
1038 | 1040 | if ((releaseTime >= t)) | |
1039 | 1041 | then throw(("Your gWL are taking part in voting, cannot unstake until " + toString(releaseTime))) | |
1040 | 1042 | else [ScriptTransfer(i.caller, 1, fromBase58String(landAssetId)), DeleteEntry(keyStakedTimeByAssetId(landAssetId)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr)), StringEntry(keyResProportions(), props), StringEntry(claimResult._2, makeString(claimResult._3, ":")), if ((size(lands) > 1)) | |
1041 | 1043 | then StringEntry(landsKey, makeString_11C(removeByIndex(lands, value(idx)), "_")) | |
1042 | 1044 | else DeleteEntry(landsKey), prologAction] | |
1043 | 1045 | } | |
1044 | 1046 | } | |
1045 | 1047 | } | |
1046 | 1048 | ||
1047 | 1049 | ||
1048 | 1050 | ||
1049 | 1051 | @Callable(i) | |
1050 | 1052 | func stakeDuck () = { | |
1051 | 1053 | let prologAction = prolog(i) | |
1052 | 1054 | if ((size(i.payments) != 1)) | |
1053 | 1055 | then throw("Exactly one payment required") | |
1054 | 1056 | else { | |
1055 | 1057 | let pmt = value(i.payments[0]) | |
1056 | 1058 | let assetId = value(pmt.assetId) | |
1057 | 1059 | let address = toString(i.caller) | |
1058 | 1060 | if ((pmt.amount != 1)) | |
1059 | 1061 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
1060 | 1062 | else { | |
1061 | 1063 | let asset = value(assetInfo(assetId)) | |
1062 | 1064 | if (if ((asset.issuer != incubatorAddr)) | |
1063 | 1065 | then (asset.issuer != breederAddr) | |
1064 | 1066 | else false) | |
1065 | 1067 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
1066 | 1068 | else if (!(contains(asset.name, DUCKPREFIX))) | |
1067 | 1069 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
1068 | 1070 | else { | |
1069 | 1071 | let assetIdStr = toBase58String(assetId) | |
1070 | 1072 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
1071 | 1073 | if (isDefined(getInteger(timeKey))) | |
1072 | 1074 | then throw((("NFT " + asset.name) + " is already staked")) | |
1073 | 1075 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
1074 | 1076 | then throw(("You already staked one duck: " + asset.name)) | |
1075 | 1077 | else { | |
1076 | 1078 | let locKey = keyDuckLocation(assetIdStr) | |
1077 | 1079 | let location = getString(locKey) | |
1078 | 1080 | let bpKey = keyBackpackByDuck(assetIdStr) | |
1079 | 1081 | let backpack = getString(bpKey) | |
1080 | 1082 | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
1081 | 1083 | then nil | |
1082 | 1084 | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(backpack)) | |
1083 | 1085 | then nil | |
1084 | 1086 | else (([StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")] :+ IntegerEntry(keyDuckHealth(assetIdStr), 100)) :+ prologAction))))) | |
1085 | 1087 | } | |
1086 | 1088 | } | |
1087 | 1089 | } | |
1088 | 1090 | } | |
1089 | 1091 | } | |
1090 | 1092 | ||
1091 | 1093 | ||
1092 | 1094 | ||
1093 | 1095 | @Callable(i) | |
1094 | 1096 | func unstakeDuck (assetIdStr) = { | |
1095 | 1097 | let prologAction = prolog(i) | |
1096 | 1098 | if ((size(i.payments) != 0)) | |
1097 | 1099 | then throw("unstake doesn't require any payments") | |
1098 | 1100 | else { | |
1099 | 1101 | let assetId = fromBase58String(assetIdStr) | |
1100 | 1102 | let address = toString(i.caller) | |
1101 | 1103 | let asset = value(assetInfo(assetId)) | |
1102 | 1104 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
1103 | 1105 | if (!(isDefined(timeKey))) | |
1104 | 1106 | then throw((("NFT " + asset.name) + " is not staked")) | |
1105 | 1107 | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
1106 | 1108 | then throw((("The duck " + asset.name) + " is not staked")) | |
1107 | 1109 | else { | |
1108 | 1110 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
1109 | 1111 | if ((owner != address)) | |
1110 | 1112 | then throw("Staked NFT is not yours") | |
1111 | 1113 | else { | |
1112 | 1114 | let keyHealth = keyDuckHealth(assetIdStr) | |
1113 | 1115 | let health = valueOrElse(getInteger(keyHealth), 100) | |
1114 | 1116 | if ((health != 100)) | |
1115 | 1117 | then throw("Please heal your duck before unstaking") | |
1116 | 1118 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyHealth), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address)), prologAction] | |
1117 | 1119 | } | |
1118 | 1120 | } | |
1119 | 1121 | } | |
1120 | 1122 | } | |
1121 | 1123 | ||
1122 | 1124 | ||
1123 | 1125 | ||
1124 | 1126 | @Callable(i) | |
1125 | 1127 | func claimRes (amount,landAssetIdStr) = { | |
1126 | 1128 | let prologAction = prolog(i) | |
1127 | 1129 | if ((size(i.payments) != 0)) | |
1128 | 1130 | then throw("claimRes doesn't require any payments") | |
1129 | 1131 | else { | |
1130 | 1132 | let addr = toString(i.originCaller) | |
1131 | 1133 | let result = claimResInternal(addr, amount, claimModeDuck, landAssetIdStr) | |
1132 | 1134 | $Tuple2((((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))) :+ StringEntry(result._4, makeString(result._5, ":"))) :+ prologAction), result._3[bpIdxRes]) | |
1133 | 1135 | } | |
1134 | 1136 | } | |
1135 | 1137 | ||
1136 | 1138 | ||
1137 | 1139 | ||
1138 | 1140 | @Callable(i) | |
1139 | 1141 | func claimResToWH (amount,landAssetIdStr) = { | |
1140 | 1142 | let prologAction = prolog(i) | |
1141 | 1143 | if ((size(i.payments) != 0)) | |
1142 | 1144 | then throw("claimRes doesn't require any payments") | |
1143 | 1145 | else { | |
1144 | 1146 | let addr = toString(i.originCaller) | |
1145 | 1147 | let result = claimResInternal(addr, amount, claimModeWh, landAssetIdStr) | |
1146 | 1148 | $Tuple2((((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))) :+ StringEntry(result._4, makeString(result._5, ":"))) :+ prologAction), result._5[whIdxRes]) | |
1147 | 1149 | } | |
1148 | 1150 | } | |
1149 | 1151 | ||
1150 | 1152 | ||
1151 | 1153 | ||
1152 | 1154 | @Callable(i) | |
1153 | 1155 | func flight (message,sig) = { | |
1154 | 1156 | let prologAction = prolog(i) | |
1155 | 1157 | if (!(sigVerify_8Kb(message, sig, pub))) | |
1156 | 1158 | then throw("signature does not match") | |
1157 | 1159 | else if ((size(i.payments) != 0)) | |
1158 | 1160 | then throw("flight doesn't require any payments") | |
1159 | 1161 | else { | |
1160 | 1162 | let parts = split(toUtf8String(message), ";") | |
1161 | 1163 | let hp = split(split(parts[0], "|")[0], "_") | |
1162 | 1164 | let curHP = parseIntValue(hp[0]) | |
1163 | 1165 | let newHP = parseIntValue(hp[1]) | |
1164 | 1166 | let newLocAndTime = split(parts[1], ":") | |
1165 | 1167 | let newLocation = newLocAndTime[0] | |
1166 | 1168 | let time = parseIntValue(newLocAndTime[1]) | |
1167 | 1169 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
1168 | 1170 | then true | |
1169 | 1171 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
1170 | 1172 | then throw("signature outdated") | |
1171 | 1173 | else { | |
1172 | 1174 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
1173 | 1175 | let keyHealth = keyDuckHealth(duckAssetId) | |
1174 | 1176 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
1175 | 1177 | if ((oldFromState != curHP)) | |
1176 | 1178 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
1177 | 1179 | else if ((0 >= curHP)) | |
1178 | 1180 | then throw("You can't fly with zero health") | |
1179 | 1181 | else { | |
1180 | 1182 | let locKey = keyDuckLocation(duckAssetId) | |
1181 | 1183 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
1182 | 1184 | if ((newLocation == curLocation)) | |
1183 | 1185 | then throw("You can't fly to the same location") | |
1184 | 1186 | else $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
1185 | 1187 | then newLocation | |
1186 | 1188 | else curLocation), IntegerEntry(keyHealth, newHP), prologAction], unit) | |
1187 | 1189 | } | |
1188 | 1190 | } | |
1189 | 1191 | } | |
1190 | 1192 | } | |
1191 | 1193 | ||
1192 | 1194 | ||
1193 | 1195 | ||
1194 | 1196 | @Callable(i) | |
1195 | 1197 | func setHealth (health,duckAssetId) = { | |
1196 | 1198 | let prologAction = prolog(i) | |
1197 | 1199 | if (if ((0 > health)) | |
1198 | 1200 | then true | |
1199 | 1201 | else (health > 100)) | |
1200 | 1202 | then throw("HP should be within 0..100") | |
1201 | 1203 | else [IntegerEntry(keyDuckHealth(duckAssetId), health), prologAction] | |
1202 | 1204 | } | |
1203 | 1205 | ||
1204 | 1206 | ||
1205 | 1207 | ||
1206 | 1208 | @Callable(i) | |
1207 | 1209 | func heal (matType,amount) = { | |
1208 | 1210 | let prologAction = prolog(i) | |
1209 | 1211 | if (if ((0 > matType)) | |
1210 | 1212 | then true | |
1211 | 1213 | else (matType >= NUMRES)) | |
1212 | 1214 | then throw(("Unknown material: " + toString(matType))) | |
1213 | 1215 | else if ((0 >= amount)) | |
1214 | 1216 | then throw(("Amount should be positive! " + toString(amount))) | |
1215 | 1217 | else { | |
1216 | 1218 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
1217 | 1219 | let keyHealth = keyDuckHealth(duckAssetId) | |
1218 | 1220 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
1219 | 1221 | if ((oldHealth >= 100)) | |
1220 | 1222 | then throw("HP should be < 100 to heal") | |
1221 | 1223 | else { | |
1222 | 1224 | let bpKey = keyBackpackByDuck(duckAssetId) | |
1223 | 1225 | let currentPack = getBackpack(bpKey) | |
1224 | 1226 | let mList = split(currentPack[bpIdxMat], "_") | |
1225 | 1227 | let currentAmount = parseIntValue(mList[matType]) | |
1226 | 1228 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
1227 | 1229 | let spendAmount = (deltaHealth * HEALCOST) | |
1228 | 1230 | if ((spendAmount > currentAmount)) | |
1229 | 1231 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
1230 | 1232 | else { | |
1231 | 1233 | let newMat = subOneInList(mList, matType, spendAmount) | |
1232 | 1234 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), prologAction] | |
1233 | 1235 | } | |
1234 | 1236 | } | |
1235 | 1237 | } | |
1236 | 1238 | } | |
1237 | 1239 | ||
1238 | 1240 | ||
1239 | 1241 | ||
1240 | 1242 | @Callable(i) | |
1241 | 1243 | func updateBackpack (duckAssetId,newPack) = { | |
1242 | 1244 | let prologAction = prolog(i) | |
1243 | 1245 | if ((i.caller != economyContract)) | |
1244 | 1246 | then throw("permission denied") | |
1245 | 1247 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack), prologAction], newPack) | |
1246 | 1248 | } | |
1247 | 1249 | ||
1248 | 1250 | ||
1249 | 1251 | ||
1250 | 1252 | @Callable(i) | |
1251 | 1253 | func buySLand () = { | |
1252 | 1254 | let prologAction = prolog(i) | |
1253 | 1255 | if ((size(i.payments) != 1)) | |
1254 | 1256 | then throw("Exactly one payment required") | |
1255 | 1257 | else { | |
1256 | 1258 | let pmt = value(i.payments[0]) | |
1257 | 1259 | if ((pmt.assetId != usdnAssetId)) | |
1258 | 1260 | then throw("Allowed USDN payment only!") | |
1259 | 1261 | else if ((pmt.amount != EXPUSDN)) | |
1260 | 1262 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
1261 | 1263 | else { | |
1262 | 1264 | let result = expeditionInternal(i.caller, i.transactionId) | |
1263 | 1265 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdnAssetId)) :+ prologAction), result._2._1) | |
1264 | 1266 | } | |
1265 | 1267 | } | |
1266 | 1268 | } | |
1267 | 1269 | ||
1268 | 1270 | ||
1269 | 1271 | ||
1270 | 1272 | @Callable(i) | |
1271 | 1273 | func expeditionBuy (message,sig) = { | |
1272 | 1274 | let prologAction = prolog(i) | |
1273 | 1275 | if ((size(i.payments) != 1)) | |
1274 | 1276 | then throw("Exactly one payment required") | |
1275 | 1277 | else { | |
1276 | 1278 | let pmt = value(i.payments[0]) | |
1277 | 1279 | if ((pmt.assetId != usdnAssetId)) | |
1278 | 1280 | then throw("Allowed USDN payment only!") | |
1279 | 1281 | else if ((pmt.amount != EXPUSDN)) | |
1280 | 1282 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
1281 | 1283 | else { | |
1282 | 1284 | let result = expeditionCommon(false, i.caller, i.transactionId, message, sig) | |
1283 | 1285 | if ((result._2 == "")) | |
1284 | 1286 | then result | |
1285 | 1287 | else $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdnAssetId)) :+ prologAction), result._2) | |
1286 | 1288 | } | |
1287 | 1289 | } | |
1288 | 1290 | } | |
1289 | 1291 | ||
1290 | 1292 | ||
1291 | 1293 | ||
1292 | 1294 | @Callable(i) | |
1293 | 1295 | func expedition (message,sig) = { | |
1294 | 1296 | let prologAction = prolog(i) | |
1295 | 1297 | if ((size(i.payments) != 0)) | |
1296 | 1298 | then throw("expedition doesn't require any payments") | |
1297 | 1299 | else { | |
1298 | 1300 | let result = expeditionCommon(true, i.caller, i.transactionId, message, sig) | |
1299 | 1301 | $Tuple2((result._1 :+ prologAction), result._2) | |
1300 | 1302 | } | |
1301 | 1303 | } | |
1302 | 1304 | ||
1303 | 1305 | ||
1304 | 1306 | ||
1305 | 1307 | @Callable(i) | |
1306 | 1308 | func upgradeInfra (landAssetId) = { | |
1307 | 1309 | let prologAction = prolog(i) | |
1308 | 1310 | if ((size(i.payments) != 0)) | |
1309 | 1311 | then throw("Infrastructure upgrade doesn't require any payments") | |
1310 | 1312 | else { | |
1311 | 1313 | let result = upInfraCommon(true, i.caller, 0, landAssetId) | |
1312 | 1314 | $Tuple2((result._1 :+ prologAction), result._2) | |
1313 | 1315 | } | |
1314 | 1316 | } | |
1315 | 1317 | ||
1316 | 1318 | ||
1317 | 1319 | ||
1318 | 1320 | @Callable(i) | |
1319 | 1321 | func upgradeInfraUsdn (landAssetId) = { | |
1320 | 1322 | let prologAction = prolog(i) | |
1321 | 1323 | if ((size(i.payments) != 1)) | |
1322 | 1324 | then throw("Exactly one payment required") | |
1323 | 1325 | else { | |
1324 | 1326 | let pmt = value(i.payments[0]) | |
1325 | 1327 | if ((pmt.assetId != usdnAssetId)) | |
1326 | 1328 | then throw("Allowed USDN payment only!") | |
1327 | 1329 | else { | |
1328 | 1330 | let result = upInfraCommon(false, i.caller, pmt.amount, landAssetId) | |
1329 | 1331 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdnAssetId)) :+ prologAction), result._2) | |
1330 | 1332 | } | |
1331 | 1333 | } | |
1332 | 1334 | } | |
1333 | 1335 | ||
1334 | 1336 | ||
1335 | 1337 | ||
1336 | 1338 | @Callable(i) | |
1337 | 1339 | func activateArtifact (artName,landAssetId) = { | |
1338 | 1340 | let prologAction = prolog(i) | |
1339 | 1341 | if ((size(i.payments) != 0)) | |
1340 | 1342 | then throw("Artifact activation doesn't require any payments") | |
1341 | 1343 | else { | |
1342 | 1344 | let result = match artName { | |
1343 | 1345 | case _ => | |
1344 | 1346 | if (("PRESALE" == $match0)) | |
1345 | 1347 | then activatePresaleArt(toString(i.caller), landAssetId) | |
1346 | 1348 | else throw("Unknown artifact") | |
1347 | 1349 | } | |
1348 | 1350 | (result :+ prologAction) | |
1349 | 1351 | } | |
1350 | 1352 | } | |
1351 | 1353 | ||
1352 | 1354 | ||
1353 | 1355 | ||
1354 | 1356 | @Callable(i) | |
1355 | 1357 | func mergeLands (landAssetIds) = { | |
1356 | 1358 | let prologAction = prolog(i) | |
1357 | 1359 | if ((size(i.payments) != 0)) | |
1358 | 1360 | then throw("Lands merging doesn't require any payments") | |
1359 | 1361 | else { | |
1360 | 1362 | let result = mergeCommon(true, toString(i.caller), 0, landAssetIds, i.transactionId) | |
1361 | 1363 | $Tuple2((result._1 :+ prologAction), result._2) | |
1362 | 1364 | } | |
1363 | 1365 | } | |
1364 | 1366 | ||
1365 | 1367 | ||
1366 | 1368 | ||
1367 | 1369 | @Callable(i) | |
1368 | 1370 | func mergeLandsUsdn (landAssetIds) = { | |
1369 | 1371 | let prologAction = prolog(i) | |
1370 | 1372 | if ((size(i.payments) != 1)) | |
1371 | 1373 | then throw("Exactly one payment required") | |
1372 | 1374 | else { | |
1373 | 1375 | let pmt = value(i.payments[0]) | |
1374 | 1376 | if ((pmt.assetId != usdnAssetId)) | |
1375 | 1377 | then throw("Allowed USDN payment only!") | |
1376 | 1378 | else { | |
1377 | 1379 | let result = mergeCommon(false, toString(i.caller), pmt.amount, landAssetIds, i.transactionId) | |
1378 | 1380 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdnAssetId)) :+ prologAction), result._2) | |
1379 | 1381 | } | |
1380 | 1382 | } | |
1381 | 1383 | } | |
1382 | 1384 | ||
1383 | 1385 | ||
1384 | 1386 | ||
1385 | 1387 | @Callable(i) | |
1386 | 1388 | func splitByGlobalWeightsREADONLY (amount) = $Tuple2(nil, getNeededMaterials(amount)) | |
1387 | 1389 | ||
1388 | 1390 | ||
1389 | 1391 | ||
1390 | 1392 | @Callable(i) | |
1391 | 1393 | func splitByGlobalAndLocalWeightsREADONLY (matAmount,resAmount,terrains) = { | |
1392 | 1394 | let terrainCounts = countTerrains(terrains) | |
1393 | 1395 | $Tuple2(nil, $Tuple2(getNeededMaterials(matAmount), distributeByWeights(resAmount, terrainCounts))) | |
1394 | 1396 | } | |
1395 | 1397 | ||
1396 | 1398 | ||
1397 | 1399 | ||
1398 | 1400 | @Callable(i) | |
1399 | 1401 | func getBackpackREADONLY (duckAssetId) = $Tuple2(nil, makeString(getBackpack(keyBackpackByDuck(duckAssetId)), ":")) | |
1400 | 1402 | ||
1401 | 1403 | ||
1402 | 1404 | ||
1403 | 1405 | @Callable(i) | |
1404 | 1406 | func getWarehouseREADONLY (landAssetId) = { | |
1405 | 1407 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
1406 | 1408 | let landIndex = (numPiecesBySize(split(asset.description, "_")[recLandSize]) / SSIZE) | |
1407 | 1409 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
1408 | 1410 | $Tuple2(nil, makeString(getWarehouse(keyWarehouseByLand(landAssetId), landIndex, infraLevel), ":")) | |
1409 | 1411 | } | |
1410 | 1412 | ||
1411 | 1413 |
github/deemru/w8io/169f3d6 152.24 ms ◑