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