tx · 3DsgrbRAncKXuvTep9mgjJa5z9TvSmVoeUkZBPKj5fKN 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.02500000 Waves 2023.01.06 01:00 [2392231] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "3DsgrbRAncKXuvTep9mgjJa5z9TvSmVoeUkZBPKj5fKN", "fee": 2500000, "feeAssetId": null, "timestamp": 1672956048344, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "5zDHBFAP9zQXBhJvmYbYm6RfVHjJEiKKdBwZSzBC4DMjLSFzpeHSsULqGxUT4iPHVVC7XbpJv2AHow6eNWB1LMKj" ], "script": "base64:BgJECAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQhIAAVjaGFpbgkAsAkBCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgIBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck5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5bWVudHMJAQ11cEluZnJhQ29tbW9uAwYIBQFpBmNhbGxlcgULbGFuZEFzc2V0SWQBaQEQdXBncmFkZUluZnJhVXNkbgELbGFuZEFzc2V0SWQDCQECIT0CCQCQAwEIBQFpCHBheW1lbnRzAAEJAAIBAhxFeGFjdGx5IG9uZSBwYXltZW50IHJlcXVpcmVkBANwbXQJAQV2YWx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAMJAQIhPQIIBQNwbXQHYXNzZXRJZAULdXNkbkFzc2V0SWQJAAIBAhpBbGxvd2VkIFVTRE4gcGF5bWVudCBvbmx5IQQIbmV3TGV2ZWwJAGQCCQELdmFsdWVPckVsc2UCCQCfCAEJARZrZXlJbmZyYUxldmVsQnlBc3NldElkAQULbGFuZEFzc2V0SWQAAAABBAVhc3NldAkBBXZhbHVlAQkA7AcBCQDZBAEFC2xhbmRBc3NldElkBAFkCQC1CQIIBQVhc3NldAtkZXNjcmlwdGlvbgIBXwQEY29zdAkAawMFFUluZnJhVXBncmFkZUNvc3RTVXNkbgkAaAIJAQ9udW1QaWVjZXNCeVNpemUBCQCRAwIFAWQFC3JlY0xhbmRTaXplBQhuZXdMZXZlbAAZAwkBAiE9AggFA3BtdAZhbW91bnQFBGNvc3QJAAIBCQCsAgICG1BheW1lbnQgYXR0YWNoZWQgc2hvdWxkIGJlIAkApAMBBQRjb3N0CQENdXBJbmZyYUNvbW1vbgMHCAUBaQZjYWxsZXIFC2xhbmRBc3NldElkAP5yLgo=", "height": 2392231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AcVVsBoj3WReYh1Y9Sx18LhYGwSeu28Pud4tdCcg5fbA Next: Co5a3aRFimWPciBA5gBEqF9P9fbhnNUF93MbCW77BodK Diff:
Old | New | Differences | |
---|---|---|---|
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
144 | + | ||
145 | + | ||
146 | + | func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
144 | 147 | ||
145 | 148 | ||
146 | 149 | func keypresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
446 | 449 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", t._1, continent], "_"), 1, 0, false) | |
447 | 450 | let assetId = calculateAssetId(issue) | |
448 | 451 | let id = toBase58String(assetId) | |
449 | - | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), ScriptTransfer(caller, 1, assetId), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
452 | + | $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), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
450 | 453 | } | |
451 | 454 | } | |
452 | 455 | } | |
508 | 511 | let mList = split(currentPack[bpIdxMat], "_") | |
509 | 512 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), 25)), "_") | |
510 | 513 | let newRes = claimAll(landAssetId, pieces) | |
511 | - | $Tuple2([IntegerEntry(infraKey, newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, newMat, currentPack[bpIdxProd]], ":"))], newLevel) | |
514 | + | $Tuple2([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, newMat, currentPack[bpIdxProd]], ":"))], newLevel) | |
512 | 515 | } | |
513 | 516 | } | |
514 | 517 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let usdnAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if (("W" == $match0)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == $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 (("W" == $match0)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if (("T" == $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 (("W" == $match0)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if (("T" == $match0)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let economyAddr = match chain { | |
34 | 34 | case _ => | |
35 | 35 | if (("W" == $match0)) | |
36 | 36 | then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D") | |
37 | 37 | else if (("T" == $match0)) | |
38 | 38 | then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep") | |
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 DAILYRESBYPIECE = 3456000 | |
55 | 55 | ||
56 | 56 | let DAYMILLIS = 86400000 | |
57 | 57 | ||
58 | 58 | let FIVEMINUTESMILLIS = 300000 | |
59 | 59 | ||
60 | 60 | let RESOURCEPRICEMIN = 158549 | |
61 | 61 | ||
62 | 62 | let InfraUpgradeCostS = match chain { | |
63 | 63 | case _ => | |
64 | 64 | if (("W" == $match0)) | |
65 | 65 | then 18921595217 | |
66 | 66 | else if (("T" == $match0)) | |
67 | 67 | then 189215952 | |
68 | 68 | else throw("Unknown chain") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let InfraUpgradeCostSUsdn = match chain { | |
72 | 72 | case _ => | |
73 | 73 | if (("W" == $match0)) | |
74 | 74 | then 120000000 | |
75 | 75 | else if (("T" == $match0)) | |
76 | 76 | then 1200000 | |
77 | 77 | else throw("Unknown chain") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let EXPMATERIALS = match chain { | |
81 | 81 | case _ => | |
82 | 82 | if (("W" == $match0)) | |
83 | 83 | then 157679960139 | |
84 | 84 | else if (("T" == $match0)) | |
85 | 85 | then 1576799601 | |
86 | 86 | else throw("Unknown chain") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let EXPUSDN = match chain { | |
90 | 90 | case _ => | |
91 | 91 | if (("W" == $match0)) | |
92 | 92 | then 1000000000 | |
93 | 93 | else if (("T" == $match0)) | |
94 | 94 | then 10000000 | |
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let PresaleArtifactActivationTime = match chain { | |
99 | 99 | case _ => | |
100 | 100 | if (("W" == $match0)) | |
101 | 101 | then 1673136000000 | |
102 | 102 | else if (("T" == $match0)) | |
103 | 103 | then 1672790400000 | |
104 | 104 | else throw("Unknown chain") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | let MULT6 = 1000000 | |
108 | 108 | ||
109 | 109 | let FIVEX = toBigInt(5) | |
110 | 110 | ||
111 | 111 | let TWENTYX = toBigInt(20) | |
112 | 112 | ||
113 | 113 | let TWENTY2X = toBigInt((20 * 20)) | |
114 | 114 | ||
115 | 115 | let TWENTY3X = toBigInt(((20 * 20) * 20)) | |
116 | 116 | ||
117 | 117 | let TWENTY4X = toBigInt((((20 * 20) * 20) * 20)) | |
118 | 118 | ||
119 | 119 | let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
120 | 120 | ||
121 | 121 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
122 | 122 | ||
123 | 123 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
124 | 124 | ||
125 | 125 | func keyNextFreeLandNum () = "nextLandNum" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyLandToAssetId (landNum) = ("landToAsset_" + landNum) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
144 | + | ||
145 | + | ||
146 | + | func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
144 | 147 | ||
145 | 148 | ||
146 | 149 | func keypresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
147 | 150 | ||
148 | 151 | ||
149 | 152 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
150 | 153 | ||
151 | 154 | ||
152 | 155 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
153 | 156 | ||
154 | 157 | ||
155 | 158 | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
156 | 159 | ||
157 | 160 | ||
158 | 161 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
159 | 162 | ||
160 | 163 | ||
161 | 164 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
162 | 165 | ||
163 | 166 | ||
164 | 167 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
165 | 168 | ||
166 | 169 | ||
167 | 170 | func keyResProportions () = "resTypesProportions" | |
168 | 171 | ||
169 | 172 | ||
170 | 173 | let recLandNum = 0 | |
171 | 174 | ||
172 | 175 | let recLandSize = 1 | |
173 | 176 | ||
174 | 177 | let recTerrains = 2 | |
175 | 178 | ||
176 | 179 | let recContinent = 3 | |
177 | 180 | ||
178 | 181 | let locIdxContinent = 0 | |
179 | 182 | ||
180 | 183 | let locIdxType = 1 | |
181 | 184 | ||
182 | 185 | let locIdxId = 2 | |
183 | 186 | ||
184 | 187 | let bpIdxLevel = 0 | |
185 | 188 | ||
186 | 189 | let bpIdxRes = 1 | |
187 | 190 | ||
188 | 191 | let bpIdxMat = 2 | |
189 | 192 | ||
190 | 193 | let bpIdxProd = 3 | |
191 | 194 | ||
192 | 195 | func asString (v) = match v { | |
193 | 196 | case s: String => | |
194 | 197 | s | |
195 | 198 | case _ => | |
196 | 199 | throw("fail to cast into String") | |
197 | 200 | } | |
198 | 201 | ||
199 | 202 | ||
200 | 203 | func getNeededMaterials (total) = { | |
201 | 204 | let props = split(value(getString(keyResProportions())), "_") | |
202 | 205 | if ((size(props) != NUMRES)) | |
203 | 206 | then throw("Wrong proportions data") | |
204 | 207 | else { | |
205 | 208 | let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])] | |
206 | 209 | let sum = (((((r[0] + r[1]) + r[2]) + r[3]) + r[4]) + r[5]) | |
207 | 210 | if ((0 >= sum)) | |
208 | 211 | then throw("No lands staked") | |
209 | 212 | else { | |
210 | 213 | let norm6 = fraction(total, MULT6, sum) | |
211 | 214 | func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6)) | |
212 | 215 | ||
213 | 216 | let $l = r | |
214 | 217 | let $s = size($l) | |
215 | 218 | let $acc0 = nil | |
216 | 219 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
217 | 220 | then $a | |
218 | 221 | else normalizer($a, $l[$i]) | |
219 | 222 | ||
220 | 223 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
221 | 224 | then $a | |
222 | 225 | else throw("List size exceeds 6") | |
223 | 226 | ||
224 | 227 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
225 | 228 | } | |
226 | 229 | } | |
227 | 230 | } | |
228 | 231 | ||
229 | 232 | ||
230 | 233 | func subtractMaterials (shouldUseMat,has,totalNeed) = { | |
231 | 234 | let need = getNeededMaterials(totalNeed) | |
232 | 235 | func subtractor (acc,idx) = { | |
233 | 236 | let result = (parseIntValue(has[idx]) - need[idx]) | |
234 | 237 | if ((0 > result)) | |
235 | 238 | then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx]))) | |
236 | 239 | else (acc :+ toString(result)) | |
237 | 240 | } | |
238 | 241 | ||
239 | 242 | if (shouldUseMat) | |
240 | 243 | then { | |
241 | 244 | let $l = [0, 1, 2, 3, 4, 5] | |
242 | 245 | let $s = size($l) | |
243 | 246 | let $acc0 = nil | |
244 | 247 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
245 | 248 | then $a | |
246 | 249 | else subtractor($a, $l[$i]) | |
247 | 250 | ||
248 | 251 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
249 | 252 | then $a | |
250 | 253 | else throw("List size exceeds 6") | |
251 | 254 | ||
252 | 255 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
253 | 256 | } | |
254 | 257 | else has | |
255 | 258 | } | |
256 | 259 | ||
257 | 260 | ||
258 | 261 | func updateProportions (terrainCounts,landSizeIndex,sign) = { | |
259 | 262 | let props = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_") | |
260 | 263 | if ((size(props) != NUMRES)) | |
261 | 264 | then throw("Wrong proportions data") | |
262 | 265 | else { | |
263 | 266 | func updater (acc,i) = { | |
264 | 267 | let result = (parseIntValue(props[i]) + ((sign * terrainCounts[i]) * landSizeIndex)) | |
265 | 268 | if ((0 > result)) | |
266 | 269 | then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex))) | |
267 | 270 | else (acc :+ toString(result)) | |
268 | 271 | } | |
269 | 272 | ||
270 | 273 | let r = { | |
271 | 274 | let $l = [0, 1, 2, 3, 4, 5] | |
272 | 275 | let $s = size($l) | |
273 | 276 | let $acc0 = nil | |
274 | 277 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
275 | 278 | then $a | |
276 | 279 | else updater($a, $l[$i]) | |
277 | 280 | ||
278 | 281 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
279 | 282 | then $a | |
280 | 283 | else throw("List size exceeds 6") | |
281 | 284 | ||
282 | 285 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
283 | 286 | } | |
284 | 287 | makeString(r, "_") | |
285 | 288 | } | |
286 | 289 | } | |
287 | 290 | ||
288 | 291 | ||
289 | 292 | 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)] | |
290 | 293 | ||
291 | 294 | ||
292 | 295 | func numPiecesBySize (landSize) = match landSize { | |
293 | 296 | case _ => | |
294 | 297 | if (("S" == $match0)) | |
295 | 298 | then 25 | |
296 | 299 | else if (("M" == $match0)) | |
297 | 300 | then 100 | |
298 | 301 | else if (("L" == $match0)) | |
299 | 302 | then 225 | |
300 | 303 | else if (("XL" == $match0)) | |
301 | 304 | then 400 | |
302 | 305 | else if (("XXL" == $match0)) | |
303 | 306 | then 625 | |
304 | 307 | else throw("Unknown land size") | |
305 | 308 | } | |
306 | 309 | ||
307 | 310 | ||
308 | 311 | func subOneInList (aList,idx,amount) = { | |
309 | 312 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
310 | 313 | then toString((parseIntValue(aList[i]) - amount)) | |
311 | 314 | else aList[i])) | |
312 | 315 | ||
313 | 316 | let r = { | |
314 | 317 | let $l = [0, 1, 2, 3, 4, 5] | |
315 | 318 | let $s = size($l) | |
316 | 319 | let $acc0 = nil | |
317 | 320 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
318 | 321 | then $a | |
319 | 322 | else subber($a, $l[$i]) | |
320 | 323 | ||
321 | 324 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
322 | 325 | then $a | |
323 | 326 | else throw("List size exceeds 6") | |
324 | 327 | ||
325 | 328 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
326 | 329 | } | |
327 | 330 | makeString(r, "_") | |
328 | 331 | } | |
329 | 332 | ||
330 | 333 | ||
331 | 334 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
332 | 335 | func adder (acc,i) = { | |
333 | 336 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
334 | 337 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
335 | 338 | } | |
336 | 339 | ||
337 | 340 | let r = { | |
338 | 341 | let $l = [0, 1, 2, 3, 4, 5] | |
339 | 342 | let $s = size($l) | |
340 | 343 | let $acc0 = nil | |
341 | 344 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
342 | 345 | then $a | |
343 | 346 | else adder($a, $l[$i]) | |
344 | 347 | ||
345 | 348 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
346 | 349 | then $a | |
347 | 350 | else throw("List size exceeds 6") | |
348 | 351 | ||
349 | 352 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
350 | 353 | } | |
351 | 354 | makeString(r, "_") | |
352 | 355 | } | |
353 | 356 | ||
354 | 357 | ||
355 | 358 | func abs (x) = if ((x >= toBigInt(0))) | |
356 | 359 | then x | |
357 | 360 | else -(x) | |
358 | 361 | ||
359 | 362 | ||
360 | 363 | 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]] | |
361 | 364 | ||
362 | 365 | func genChar (n,freqs) = { | |
363 | 366 | let rem = toInt((n % TWENTYX)) | |
364 | 367 | let letter = if ((freqs[0] > rem)) | |
365 | 368 | then "A" | |
366 | 369 | else if ((freqs[1] > rem)) | |
367 | 370 | then "B" | |
368 | 371 | else if ((freqs[2] > rem)) | |
369 | 372 | then "C" | |
370 | 373 | else if ((freqs[3] > rem)) | |
371 | 374 | then "D" | |
372 | 375 | else if ((freqs[4] > rem)) | |
373 | 376 | then "E" | |
374 | 377 | else "F" | |
375 | 378 | letter | |
376 | 379 | } | |
377 | 380 | ||
378 | 381 | ||
379 | 382 | func getBackpack (bpKey) = { | |
380 | 383 | let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
381 | 384 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
382 | 385 | then p[bpIdxRes] | |
383 | 386 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
384 | 387 | then p[bpIdxMat] | |
385 | 388 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
386 | 389 | } | |
387 | 390 | ||
388 | 391 | ||
389 | 392 | func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
390 | 393 | then throw("signature does not match") | |
391 | 394 | else { | |
392 | 395 | let parts = split(toUtf8String(message), ";") | |
393 | 396 | let hp = split(split(parts[0], "|")[0], "_") | |
394 | 397 | let curHP = parseIntValue(hp[0]) | |
395 | 398 | let newHP = parseIntValue(hp[1]) | |
396 | 399 | let locAndTime = split(parts[1], ":") | |
397 | 400 | let targetLocation = split(locAndTime[0], "_") | |
398 | 401 | if ((targetLocation[1] != "E")) | |
399 | 402 | then throw("expedition target location type should be E") | |
400 | 403 | else { | |
401 | 404 | let time = parseIntValue(locAndTime[1]) | |
402 | 405 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
403 | 406 | then true | |
404 | 407 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
405 | 408 | then throw("signature outdated") | |
406 | 409 | else { | |
407 | 410 | let userAddr = toString(caller) | |
408 | 411 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
409 | 412 | let keyHealth = keyDuckHealth(duckAssetId) | |
410 | 413 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
411 | 414 | if ((oldFromState != curHP)) | |
412 | 415 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
413 | 416 | else if ((0 >= curHP)) | |
414 | 417 | then throw("You can't fly with zero health") | |
415 | 418 | else if ((0 >= newHP)) | |
416 | 419 | then $Tuple2(((if (!(shouldUseMat)) | |
417 | 420 | then [ScriptTransfer(caller, EXPUSDN, usdnAssetId)] | |
418 | 421 | else nil) :+ IntegerEntry(keyHealth, 0)), "") | |
419 | 422 | else { | |
420 | 423 | let bpKey = keyBackpackByDuck(duckAssetId) | |
421 | 424 | let currentPack = getBackpack(bpKey) | |
422 | 425 | let mList = split(currentPack[bpIdxMat], "_") | |
423 | 426 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
424 | 427 | let bigNum = abs(toBigInt(txId)) | |
425 | 428 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501) | |
426 | 429 | let landNum = toString(freeNum) | |
427 | 430 | let continentIdx = toInt((bigNum % FIVEX)) | |
428 | 431 | let f = freq[continentIdx] | |
429 | 432 | 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)) | |
430 | 433 | ||
431 | 434 | let t = { | |
432 | 435 | let $l = [1, 2, 3, 4, 5] | |
433 | 436 | let $s = size($l) | |
434 | 437 | let $acc0 = $Tuple2("", (bigNum / FIVEX)) | |
435 | 438 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
436 | 439 | then $a | |
437 | 440 | else terrainGenerator($a, $l[$i]) | |
438 | 441 | ||
439 | 442 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
440 | 443 | then $a | |
441 | 444 | else throw("List size exceeds 5") | |
442 | 445 | ||
443 | 446 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
444 | 447 | } | |
445 | 448 | let continent = continents[continentIdx] | |
446 | 449 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", t._1, continent], "_"), 1, 0, false) | |
447 | 450 | let assetId = calculateAssetId(issue) | |
448 | 451 | let id = toBase58String(assetId) | |
449 | - | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), ScriptTransfer(caller, 1, assetId), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
452 | + | $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), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
450 | 453 | } | |
451 | 454 | } | |
452 | 455 | } | |
453 | 456 | } | |
454 | 457 | ||
455 | 458 | ||
456 | 459 | func applyBonuses (landAssetId) = { | |
457 | 460 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
458 | 461 | let presaleBonus = if (valueOrElse(getBoolean(keypresaleArtActivatedByAssetId(landAssetId)), false)) | |
459 | 462 | then 3 | |
460 | 463 | else 0 | |
461 | 464 | (DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) | |
462 | 465 | } | |
463 | 466 | ||
464 | 467 | ||
465 | 468 | func claimAll (landAssetId,pieces) = { | |
466 | 469 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
467 | 470 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (((LANDPREFIX + " ") + landAssetId) + " is not staked")) | |
468 | 471 | let deltaTime = (lastBlock.timestamp - savedTime) | |
469 | 472 | if ((0 > deltaTime)) | |
470 | 473 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
471 | 474 | else { | |
472 | 475 | let dailyProductionByPiece = applyBonuses(landAssetId) | |
473 | 476 | let availRes = (fraction(deltaTime, dailyProductionByPiece, DAYMILLIS) * pieces) | |
474 | 477 | asString(invoke(this, "claimRes", [availRes, landAssetId], nil)) | |
475 | 478 | } | |
476 | 479 | } | |
477 | 480 | ||
478 | 481 | ||
479 | 482 | func upInfraCommon (shouldUseMat,caller,landAssetId) = { | |
480 | 483 | let addr = toString(caller) | |
481 | 484 | let infraKey = keyInfraLevelByAssetId(landAssetId) | |
482 | 485 | let curLevel = valueOrElse(getInteger(infraKey), 0) | |
483 | 486 | if ((curLevel >= 3)) | |
484 | 487 | then throw("Currently max infrastructure level = 3") | |
485 | 488 | else { | |
486 | 489 | let newLevel = (curLevel + 1) | |
487 | 490 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
488 | 491 | if (!(contains(asset.name, LANDPREFIX))) | |
489 | 492 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
490 | 493 | else { | |
491 | 494 | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
492 | 495 | if ((owner != addr)) | |
493 | 496 | then throw((LANDPREFIX + " is not yours")) | |
494 | 497 | else { | |
495 | 498 | let d = split(asset.description, "_") | |
496 | 499 | let landSize = d[recLandSize] | |
497 | 500 | let pieces = numPiecesBySize(landSize) | |
498 | 501 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
499 | 502 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
500 | 503 | let loc = split(value(curLocation), "_") | |
501 | 504 | if ((loc[locIdxType] != "L")) | |
502 | 505 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
503 | 506 | else if ((loc[locIdxId] != landAssetId)) | |
504 | 507 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
505 | 508 | else { | |
506 | 509 | let bpKey = keyBackpackByDuck(duckAssetId) | |
507 | 510 | let currentPack = getBackpack(bpKey) | |
508 | 511 | let mList = split(currentPack[bpIdxMat], "_") | |
509 | 512 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), 25)), "_") | |
510 | 513 | let newRes = claimAll(landAssetId, pieces) | |
511 | - | $Tuple2([IntegerEntry(infraKey, newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, newMat, currentPack[bpIdxProd]], ":"))], newLevel) | |
514 | + | $Tuple2([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, newMat, currentPack[bpIdxProd]], ":"))], newLevel) | |
512 | 515 | } | |
513 | 516 | } | |
514 | 517 | } | |
515 | 518 | } | |
516 | 519 | } | |
517 | 520 | ||
518 | 521 | ||
519 | 522 | @Callable(i) | |
520 | 523 | func stakeLand () = { | |
521 | 524 | let pmt = value(i.payments[0]) | |
522 | 525 | let assetId = value(pmt.assetId) | |
523 | 526 | let address = toString(i.caller) | |
524 | 527 | if ((pmt.amount != 1)) | |
525 | 528 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
526 | 529 | else { | |
527 | 530 | let asset = value(assetInfo(assetId)) | |
528 | 531 | if ((asset.issuer != this)) | |
529 | 532 | then throw("Unknown issuer of token") | |
530 | 533 | else if (!(contains(asset.name, LANDPREFIX))) | |
531 | 534 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
532 | 535 | else { | |
533 | 536 | let landNumSize = drop(asset.name, 4) | |
534 | 537 | let landNum = if (contains(landNumSize, "XXL")) | |
535 | 538 | then dropRight(landNumSize, 3) | |
536 | 539 | else if (contains(landNumSize, "XL")) | |
537 | 540 | then dropRight(landNumSize, 2) | |
538 | 541 | else dropRight(landNumSize, 1) | |
539 | 542 | let landNumInt = valueOrErrorMessage(parseInt(landNum), ("Cannot parse land number from " + asset.name)) | |
540 | 543 | let landAssetId = toBase58String(assetId) | |
541 | 544 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
542 | 545 | if (isDefined(getInteger(timeKey))) | |
543 | 546 | then throw((("NFT " + asset.name) + " is already staked")) | |
544 | 547 | else { | |
545 | 548 | let d = split(asset.description, "_") | |
546 | 549 | let terrainCounts = countTerrains(d[recTerrains]) | |
547 | 550 | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / 25), 1) | |
548 | 551 | let presaleActive = if ((500 >= landNumInt)) | |
549 | 552 | then (lastBlock.timestamp > PresaleArtifactActivationTime) | |
550 | 553 | else false | |
551 | 554 | [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)] | |
552 | 555 | } | |
553 | 556 | } | |
554 | 557 | } | |
555 | 558 | } | |
556 | 559 | ||
557 | 560 | ||
558 | 561 | ||
559 | 562 | @Callable(i) | |
560 | 563 | func unstakeLand (landAssetId) = if ((size(i.payments) != 0)) | |
561 | 564 | then throw("unstake doesn't require any payments") | |
562 | 565 | else { | |
563 | 566 | let assetId = fromBase58String(landAssetId) | |
564 | 567 | let address = toString(i.caller) | |
565 | 568 | let asset = value(assetInfo(assetId)) | |
566 | 569 | if ((asset.issuer != this)) | |
567 | 570 | then throw("Unknown issuer of token") | |
568 | 571 | else if (!(contains(asset.name, LANDPREFIX))) | |
569 | 572 | then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked")) | |
570 | 573 | else { | |
571 | 574 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
572 | 575 | if (!(isDefined(timeKey))) | |
573 | 576 | then throw((("NFT " + asset.name) + " is not staked")) | |
574 | 577 | else { | |
575 | 578 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
576 | 579 | if ((owner != address)) | |
577 | 580 | then throw((("Staked " + LANDPREFIX) + " is not yours")) | |
578 | 581 | else { | |
579 | 582 | let d = split(asset.description, "_") | |
580 | 583 | let terrainCounts = countTerrains(d[recTerrains]) | |
581 | 584 | let pieces = numPiecesBySize(d[recLandSize]) | |
582 | 585 | let props = updateProportions(terrainCounts, (pieces / 25), -1) | |
583 | 586 | let newRes = claimAll(landAssetId, pieces) | |
584 | 587 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(address)), (("You can't unstake " + LANDPREFIX) + " without a duck staked")) | |
585 | 588 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
586 | 589 | let loc = split(value(curLocation), "_") | |
587 | 590 | if ((loc[locIdxType] != "L")) | |
588 | 591 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
589 | 592 | else if ((loc[locIdxId] != landAssetId)) | |
590 | 593 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
591 | 594 | else { | |
592 | 595 | let bpKey = keyBackpackByDuck(duckAssetId) | |
593 | 596 | let currentPack = getBackpack(bpKey) | |
594 | 597 | [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address)), StringEntry(keyResProportions(), props), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":"))] | |
595 | 598 | } | |
596 | 599 | } | |
597 | 600 | } | |
598 | 601 | } | |
599 | 602 | } | |
600 | 603 | ||
601 | 604 | ||
602 | 605 | ||
603 | 606 | @Callable(i) | |
604 | 607 | func stakeDuck () = { | |
605 | 608 | let pmt = value(i.payments[0]) | |
606 | 609 | let assetId = value(pmt.assetId) | |
607 | 610 | let address = toString(i.caller) | |
608 | 611 | if ((pmt.amount != 1)) | |
609 | 612 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
610 | 613 | else { | |
611 | 614 | let asset = value(assetInfo(assetId)) | |
612 | 615 | if (if ((asset.issuer != incubatorAddr)) | |
613 | 616 | then (asset.issuer != breederAddr) | |
614 | 617 | else false) | |
615 | 618 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
616 | 619 | else if (!(contains(asset.name, DUCKPREFIX))) | |
617 | 620 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
618 | 621 | else { | |
619 | 622 | let assetIdStr = toBase58String(assetId) | |
620 | 623 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
621 | 624 | if (isDefined(getInteger(timeKey))) | |
622 | 625 | then throw((("NFT " + asset.name) + " is already staked")) | |
623 | 626 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
624 | 627 | then throw(("You already staked one duck: " + asset.name)) | |
625 | 628 | else { | |
626 | 629 | let locKey = keyDuckLocation(assetIdStr) | |
627 | 630 | let location = getString(locKey) | |
628 | 631 | let keyHealth = keyDuckHealth(assetIdStr) | |
629 | 632 | let health = getInteger(keyHealth) | |
630 | 633 | let bpKey = keyBackpackByDuck(assetIdStr) | |
631 | 634 | let backpack = getString(bpKey) | |
632 | 635 | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
633 | 636 | then nil | |
634 | 637 | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health)) | |
635 | 638 | then nil | |
636 | 639 | else ([IntegerEntry(keyHealth, 100)] ++ (if (isDefined(backpack)) | |
637 | 640 | then nil | |
638 | 641 | else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
639 | 642 | } | |
640 | 643 | } | |
641 | 644 | } | |
642 | 645 | } | |
643 | 646 | ||
644 | 647 | ||
645 | 648 | ||
646 | 649 | @Callable(i) | |
647 | 650 | func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0)) | |
648 | 651 | then throw("unstake doesn't require any payments") | |
649 | 652 | else { | |
650 | 653 | let assetId = fromBase58String(assetIdStr) | |
651 | 654 | let address = toString(i.caller) | |
652 | 655 | let asset = value(assetInfo(assetId)) | |
653 | 656 | if (if ((asset.issuer != incubatorAddr)) | |
654 | 657 | then (asset.issuer != breederAddr) | |
655 | 658 | else false) | |
656 | 659 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
657 | 660 | else if (!(contains(asset.name, DUCKPREFIX))) | |
658 | 661 | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
659 | 662 | else { | |
660 | 663 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
661 | 664 | if (!(isDefined(timeKey))) | |
662 | 665 | then throw((("NFT " + asset.name) + " is not staked")) | |
663 | 666 | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
664 | 667 | then throw((("The duck " + asset.name) + " is not staked")) | |
665 | 668 | else { | |
666 | 669 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
667 | 670 | if ((owner != address)) | |
668 | 671 | then throw("Staked NFT is not yours") | |
669 | 672 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
670 | 673 | } | |
671 | 674 | } | |
672 | 675 | } | |
673 | 676 | ||
674 | 677 | ||
675 | 678 | ||
676 | 679 | @Callable(i) | |
677 | 680 | func claimRes (amount,landAssetId) = if ((size(i.payments) != 0)) | |
678 | 681 | then throw("claimRes doesn't require any payments") | |
679 | 682 | else { | |
680 | 683 | let addr = toString(i.originCaller) | |
681 | 684 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
682 | 685 | if (!(contains(asset.name, LANDPREFIX))) | |
683 | 686 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
684 | 687 | else { | |
685 | 688 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
686 | 689 | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
687 | 690 | if ((owner != addr)) | |
688 | 691 | then throw((LANDPREFIX + " is not yours")) | |
689 | 692 | else { | |
690 | 693 | let d = split(asset.description, "_") | |
691 | 694 | let landSize = d[recLandSize] | |
692 | 695 | let terrainCounts = countTerrains(d[recTerrains]) | |
693 | 696 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
694 | 697 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
695 | 698 | let loc = split(value(curLocation), "_") | |
696 | 699 | if ((loc[locIdxType] != "L")) | |
697 | 700 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
698 | 701 | else if ((loc[locIdxId] != landAssetId)) | |
699 | 702 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
700 | 703 | else { | |
701 | 704 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked")) | |
702 | 705 | let deltaTime = (lastBlock.timestamp - savedTime) | |
703 | 706 | if ((0 > deltaTime)) | |
704 | 707 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
705 | 708 | else { | |
706 | 709 | let pieces = numPiecesBySize(landSize) | |
707 | 710 | let dailyProductionByPiece = applyBonuses(landAssetId) | |
708 | 711 | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
709 | 712 | if ((amount > availRes)) | |
710 | 713 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
711 | 714 | else { | |
712 | 715 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
713 | 716 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
714 | 717 | let bpKey = keyBackpackByDuck(duckAssetId) | |
715 | 718 | let currentPack = getBackpack(bpKey) | |
716 | 719 | let currentRes = split(currentPack[bpIdxRes], "_") | |
717 | 720 | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25), dailyProductionByPiece) | |
718 | 721 | let newPack = makeString([currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
719 | 722 | $Tuple2([StringEntry(bpKey, newPack), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, owner), newTimestamp)], bpRes) | |
720 | 723 | } | |
721 | 724 | } | |
722 | 725 | } | |
723 | 726 | } | |
724 | 727 | } | |
725 | 728 | } | |
726 | 729 | ||
727 | 730 | ||
728 | 731 | ||
729 | 732 | @Callable(i) | |
730 | 733 | func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
731 | 734 | then throw("signature does not match") | |
732 | 735 | else if ((size(i.payments) != 0)) | |
733 | 736 | then throw("flight doesn't require any payments") | |
734 | 737 | else { | |
735 | 738 | let parts = split(toUtf8String(message), ";") | |
736 | 739 | let hp = split(split(parts[0], "|")[0], "_") | |
737 | 740 | let curHP = parseIntValue(hp[0]) | |
738 | 741 | let newHP = parseIntValue(hp[1]) | |
739 | 742 | let newLocAndTime = split(parts[1], ":") | |
740 | 743 | let newLocation = newLocAndTime[0] | |
741 | 744 | let time = parseIntValue(newLocAndTime[1]) | |
742 | 745 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
743 | 746 | then true | |
744 | 747 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
745 | 748 | then throw("signature outdated") | |
746 | 749 | else { | |
747 | 750 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
748 | 751 | let keyHealth = keyDuckHealth(duckAssetId) | |
749 | 752 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
750 | 753 | if ((oldFromState != curHP)) | |
751 | 754 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
752 | 755 | else if ((0 >= curHP)) | |
753 | 756 | then throw("You can't fly with zero health") | |
754 | 757 | else { | |
755 | 758 | let locKey = keyDuckLocation(duckAssetId) | |
756 | 759 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
757 | 760 | if ((newLocation == curLocation)) | |
758 | 761 | then throw("You can't fly to the same location") | |
759 | 762 | else $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
760 | 763 | then newLocation | |
761 | 764 | else curLocation), IntegerEntry(keyHealth, newHP)], unit) | |
762 | 765 | } | |
763 | 766 | } | |
764 | 767 | } | |
765 | 768 | ||
766 | 769 | ||
767 | 770 | ||
768 | 771 | @Callable(i) | |
769 | 772 | func setHealth (health,duckAssetId) = if (if ((0 > health)) | |
770 | 773 | then true | |
771 | 774 | else (health > 100)) | |
772 | 775 | then throw("HP should be within 0..100") | |
773 | 776 | else [IntegerEntry(keyDuckHealth(duckAssetId), health)] | |
774 | 777 | ||
775 | 778 | ||
776 | 779 | ||
777 | 780 | @Callable(i) | |
778 | 781 | func heal (matType,amount) = if (if ((0 > matType)) | |
779 | 782 | then true | |
780 | 783 | else (matType >= NUMRES)) | |
781 | 784 | then throw(("Unknown material: " + toString(matType))) | |
782 | 785 | else if ((0 >= amount)) | |
783 | 786 | then throw(("Amount should be positive! " + toString(amount))) | |
784 | 787 | else { | |
785 | 788 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
786 | 789 | let keyHealth = keyDuckHealth(duckAssetId) | |
787 | 790 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
788 | 791 | if ((oldHealth >= 100)) | |
789 | 792 | then throw("HP should be < 100 to heal") | |
790 | 793 | else { | |
791 | 794 | let bpKey = keyBackpackByDuck(duckAssetId) | |
792 | 795 | let currentPack = getBackpack(bpKey) | |
793 | 796 | let mList = split(currentPack[bpIdxMat], "_") | |
794 | 797 | let currentAmount = parseIntValue(mList[matType]) | |
795 | 798 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
796 | 799 | let spendAmount = (deltaHealth * HEALCOST) | |
797 | 800 | if ((spendAmount > currentAmount)) | |
798 | 801 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
799 | 802 | else { | |
800 | 803 | let newMat = subOneInList(mList, matType, spendAmount) | |
801 | 804 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] | |
802 | 805 | } | |
803 | 806 | } | |
804 | 807 | } | |
805 | 808 | ||
806 | 809 | ||
807 | 810 | ||
808 | 811 | @Callable(i) | |
809 | 812 | func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr)) | |
810 | 813 | then throw("permission denied") | |
811 | 814 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack) | |
812 | 815 | ||
813 | 816 | ||
814 | 817 | ||
815 | 818 | @Callable(i) | |
816 | 819 | func expeditionBuy (message,sig) = if ((size(i.payments) != 1)) | |
817 | 820 | then throw("Exactly one payment required") | |
818 | 821 | else { | |
819 | 822 | let pmt = value(i.payments[0]) | |
820 | 823 | if ((pmt.assetId != usdnAssetId)) | |
821 | 824 | then throw("Allowed USDN payment only!") | |
822 | 825 | else if ((pmt.amount != EXPUSDN)) | |
823 | 826 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
824 | 827 | else expeditionCommon(false, i.caller, i.transactionId, message, sig) | |
825 | 828 | } | |
826 | 829 | ||
827 | 830 | ||
828 | 831 | ||
829 | 832 | @Callable(i) | |
830 | 833 | func expedition (message,sig) = if ((size(i.payments) != 0)) | |
831 | 834 | then throw("expedition doesn't require any payments") | |
832 | 835 | else expeditionCommon(true, i.caller, i.transactionId, message, sig) | |
833 | 836 | ||
834 | 837 | ||
835 | 838 | ||
836 | 839 | @Callable(i) | |
837 | 840 | func upgradeInfra (landAssetId) = if ((size(i.payments) != 0)) | |
838 | 841 | then throw("Infrastructure upgrade doesn't require any payments") | |
839 | 842 | else upInfraCommon(true, i.caller, landAssetId) | |
840 | 843 | ||
841 | 844 | ||
842 | 845 | ||
843 | 846 | @Callable(i) | |
844 | 847 | func upgradeInfraUsdn (landAssetId) = if ((size(i.payments) != 1)) | |
845 | 848 | then throw("Exactly one payment required") | |
846 | 849 | else { | |
847 | 850 | let pmt = value(i.payments[0]) | |
848 | 851 | if ((pmt.assetId != usdnAssetId)) | |
849 | 852 | then throw("Allowed USDN payment only!") | |
850 | 853 | else { | |
851 | 854 | let newLevel = (valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) + 1) | |
852 | 855 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
853 | 856 | let d = split(asset.description, "_") | |
854 | 857 | let cost = fraction(InfraUpgradeCostSUsdn, (numPiecesBySize(d[recLandSize]) * newLevel), 25) | |
855 | 858 | if ((pmt.amount != cost)) | |
856 | 859 | then throw(("Payment attached should be " + toString(cost))) | |
857 | 860 | else upInfraCommon(false, i.caller, landAssetId) | |
858 | 861 | } | |
859 | 862 | } | |
860 | 863 | ||
861 | 864 |
github/deemru/w8io/026f985 96.00 ms ◑