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