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