tx · EJUih26gnK7JcrYUpLPafmH4zxkW3wVuFYk7k8rQG4x6

3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm:  -0.01600000 Waves

2022.12.17 18:54 [2364495] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves

{ "type": 13, "id": "EJUih26gnK7JcrYUpLPafmH4zxkW3wVuFYk7k8rQG4x6", "fee": 1600000, "feeAssetId": null, "timestamp": 1671292469848, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "Xq9y2g1SimLxFZAD2yyW3rTnX1TebABgZEkkEkHXfWaheEr8cNLrBQLNck6twCFFmVW5mjjrTc1NJJJ6omtizJR" ], "script": "base64:BgIwCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIANwAFY2hhaW4JALAJAQkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkbkFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDABILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAwkAAAICAVQFByRtYXRjaDABIPd26vf3g8pl224T7gI7z1gplanB0Y3yS9ps2B1igMjeCQACAQINVW5rbm93biBjaGFpbgANaW5jdWJhdG9yQWRkcgQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM1BFa3RWdXgyUmhjaFNONjNEc0RvNGI0bXo0UXF6S1NlRHYDCQAAAgIBVAUHJG1hdGNoMAUEdGhpcwkAAgECDVVua25vd24gY2hhaW4AC2JyZWVkZXJBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUERWdVU0NUg3RWg1ZG10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ALkJAgkAzAgCCAUQbnVtQWN0aW9uQW5kU2VlZAJfMQkAzAgCAgFTCQDMCAIIBQF0Al8xCQDMCAIJAJEDAgUKY29udGluZW50cwUMY29udGluZW50SWR4BQNuaWwCAV8AAQAABwQHYXNzZXRJZAkAuAgBBQVpc3N1ZQQCaWQJANgEAQUHYXNzZXRJZAkAlAoCCQDMCAIIBRBudW1BY3Rpb25BbmRTZWVkAl8yCQDMCAIFBWlzc3VlCQDMCAIJAQtTdHJpbmdFbnRyeQIJARBrZXlMYW5kVG9Bc3NldElkAQgFEG51bUFjdGlvbkFuZFNlZWQCXzEFAmlkCQDMCAIJAQtTdHJpbmdFbnRyeQIJARVrZXlMYW5kQXNzZXRJZFRvT3duZXIBBQJpZAUIdXNlckFkZHIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBEWtleUxhbmROdW1Ub093bmVyAQgFEG51bUFjdGlvbkFuZFNlZWQCXzEFCHVzZXJBZGRyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgABBQdhc3NldElkBQNuaWwFBHVuaXQAWzI7KQ==", "height": 2364495, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7wP2j5BUYgypJyKj5Jfj2m6vHu2X8fzCScUFfYcwZnES Next: FexwAejT51B3YHBFn68M9YAGXZjjCPYDjF44bVaeCseG Diff:
OldNewDifferences
5757
5858 let FIVEMINUTESMILLIS = 300000
5959
60+let RESOURCEPRICEMIN = 158549
61+
62+let EXPMATERIALS = 157679960139
63+
64+let FIVEX = toBigInt(5)
65+
66+let TWENTYX = toBigInt(20)
67+
68+let TWENTY2X = toBigInt((20 * 20))
69+
70+let TWENTY3X = toBigInt(((20 * 20) * 20))
71+
72+let TWENTY4X = toBigInt((((20 * 20) * 20) * 20))
73+
74+let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20))
75+
6076 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
6177
62-func keyAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
78+let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
79+
80+func keyNextFreeLandNum () = "nextLandNum"
81+
82+
83+func keyFreeLandNumsMap () = "freeLandNumsMap"
84+
85+
86+func keyLandToAssetId (landNum) = ("landToAsset_" + landNum)
87+
88+
89+func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize)
90+
91+
92+func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
6393
6494
6595 func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
74104 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
75105
76106
77-func keyLandToOwner (landNum) = ("landOwner_" + landNum)
107+func keyLandNumToOwner (landNum) = ("landOwner_" + landNum)
78108
79109
80110 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
174204 }
175205
176206
207+func abs (x) = if ((x >= toBigInt(0)))
208+ then x
209+ else -(x)
210+
211+
212+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]]
213+
214+func genChar (n,continentIdx) = {
215+ let rem = toInt((n % TWENTYX))
216+ let letter = if ((freq[continentIdx][0] > rem))
217+ then "A"
218+ else if ((freq[continentIdx][1] > rem))
219+ then "B"
220+ else if ((freq[continentIdx][2] > rem))
221+ then "C"
222+ else if ((freq[continentIdx][3] > rem))
223+ then "D"
224+ else if ((freq[continentIdx][4] > rem))
225+ then "E"
226+ else "F"
227+ letter
228+ }
229+
230+
177231 @Callable(i)
178232 func stakeLand () = {
179233 let pmt = value(i.payments[0])
200254 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
201255 if (isDefined(getInteger(timeKey)))
202256 then throw((("NFT " + asset.name) + " is already staked"))
203- else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandToOwner(landNum), address)]
257+ else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandNumToOwner(landNum), address)]
204258 }
205259 }
206260 }
224278 if (!(isDefined(timeKey)))
225279 then throw((("NFT " + asset.name) + " is not staked"))
226280 else {
227- let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
281+ let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
228282 if ((owner != address))
229283 then throw("Staked NFT is not yours")
230284 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address))]
321375 if (!(isDefined(savedTime)))
322376 then throw((("NFT " + asset.name) + " is not staked"))
323377 else {
324- let owner = getStringValue(keyAssetIdToOwner(landAssetId))
378+ let owner = getStringValue(keyLandAssetIdToOwner(landAssetId))
325379 if ((owner != addr))
326380 then throw((LANDPREFIX + " is not yours"))
327381 else {
456510 else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack)
457511
458512
513+
514+@Callable(i)
515+func expedition () = if ((size(i.payments) != 0))
516+ then throw("expedition doesn't require any payments")
517+ else {
518+ let userAddr = toString(i.caller)
519+ let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked")
520+ let keyHealth = keyDuckHealth(duckAssetId)
521+ let health = valueOrElse(getInteger(keyHealth), 100)
522+ if ((0 >= health))
523+ then throw("Your duck needs healing")
524+ else {
525+ let currentPack = split(valueOrElse(getString(keyBackpackByDuck(duckAssetId)), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
526+ let matList = split(currentPack[bpIdxMat], "_")
527+ let totalMat = (((((parseIntValue(matList[0]) + parseIntValue(matList[1])) + parseIntValue(matList[2])) + parseIntValue(matList[3])) + parseIntValue(matList[4])) + parseIntValue(matList[5]))
528+ let nums = split_51C(valueOrErrorMessage(getString(keyFreeLandNumsMap()), (keyFreeLandNumsMap() + " is not initialized")), "_")
529+ let len = size(nums)
530+ let bigNum = abs(toBigInt(i.transactionId))
531+ let numActionAndSeed = if ((len == 0))
532+ then {
533+ let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
534+ $Tuple3(toString(freeNum), IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), bigNum)
535+ }
536+ else {
537+ let q = toBigInt(len)
538+ let mapIdx = toInt((bigNum % q))
539+ $Tuple3(nums[mapIdx], StringEntry(keyFreeLandNumsMap(), makeString_11C(removeByIndex(nums, mapIdx), "_")), (bigNum / q))
540+ }
541+ let continentIdx = toInt((numActionAndSeed._3 % FIVEX))
542+ func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, continentIdx)) + genChar((acc._2 / TWENTYX), continentIdx)) + genChar((acc._2 / TWENTY2X), continentIdx)) + genChar((acc._2 / TWENTY3X), continentIdx)) + genChar((acc._2 / TWENTY4X), continentIdx)), (acc._2 / TWENTY5X))
543+
544+ let t = {
545+ let $l = [1, 2, 3, 4, 5]
546+ let $s = size($l)
547+ let $acc0 = $Tuple2("", (bigNum / FIVEX))
548+ func $f0_1 ($a,$i) = if (($i >= $s))
549+ then $a
550+ else terrainGenerator($a, $l[$i])
551+
552+ func $f0_2 ($a,$i) = if (($i >= $s))
553+ then $a
554+ else throw("List size exceeds 5")
555+
556+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
557+ }
558+ let issue = Issue(keyNftName(numActionAndSeed._1, "S"), makeString([numActionAndSeed._1, "S", t._1, continents[continentIdx]], "_"), 1, 0, false)
559+ let assetId = calculateAssetId(issue)
560+ let id = toBase58String(assetId)
561+ $Tuple2([numActionAndSeed._2, issue, StringEntry(keyLandToAssetId(numActionAndSeed._1), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(numActionAndSeed._1), userAddr), ScriptTransfer(i.caller, 1, assetId)], unit)
562+ }
563+ }
564+
565+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chain = toUtf8String(take(drop(this.bytes, 1), 1))
55
66 let usdnAssetId = match chain {
77 case _ =>
88 if (("W" == $match0))
99 then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1010 else if (("T" == $match0))
1111 then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
1212 else throw("Unknown chain")
1313 }
1414
1515 let incubatorAddr = match chain {
1616 case _ =>
1717 if (("W" == $match0))
1818 then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv")
1919 else if (("T" == $match0))
2020 then this
2121 else throw("Unknown chain")
2222 }
2323
2424 let breederAddr = match chain {
2525 case _ =>
2626 if (("W" == $match0))
2727 then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb")
2828 else if (("T" == $match0))
2929 then this
3030 else throw("Unknown chain")
3131 }
3232
3333 let economyAddr = match chain {
3434 case _ =>
3535 if (("W" == $match0))
3636 then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D")
3737 else if (("T" == $match0))
3838 then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep")
3939 else throw("Unknown chain")
4040 }
4141
4242 let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD'
4343
4444 let HEALCOST = 10000
4545
4646 let LANDPREFIX = "LAND"
4747
4848 let DUCKPREFIX = "DUCK"
4949
5050 let DEFAULTLOCATION = "Africa_F_Africa"
5151
5252 let NUMRES = 6
5353
5454 let DAILYRESBYPIECE = 3456000
5555
5656 let DAYMILLIS = 86400000
5757
5858 let FIVEMINUTESMILLIS = 300000
5959
60+let RESOURCEPRICEMIN = 158549
61+
62+let EXPMATERIALS = 157679960139
63+
64+let FIVEX = toBigInt(5)
65+
66+let TWENTYX = toBigInt(20)
67+
68+let TWENTY2X = toBigInt((20 * 20))
69+
70+let TWENTY3X = toBigInt(((20 * 20) * 20))
71+
72+let TWENTY4X = toBigInt((((20 * 20) * 20) * 20))
73+
74+let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20))
75+
6076 let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"]
6177
62-func keyAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
78+let continents = ["Americas", "Europe", "Asia", "Africa", "Oceania"]
79+
80+func keyNextFreeLandNum () = "nextLandNum"
81+
82+
83+func keyFreeLandNumsMap () = "freeLandNumsMap"
84+
85+
86+func keyLandToAssetId (landNum) = ("landToAsset_" + landNum)
87+
88+
89+func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize)
90+
91+
92+func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId)
6393
6494
6595 func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
6696
6797
6898 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
6999
70100
71101 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
72102
73103
74104 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
75105
76106
77-func keyLandToOwner (landNum) = ("landOwner_" + landNum)
107+func keyLandNumToOwner (landNum) = ("landOwner_" + landNum)
78108
79109
80110 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
81111
82112
83113 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
84114
85115
86116 func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
87117
88118
89119 let recLandNum = 0
90120
91121 let recLandSize = 1
92122
93123 let recTerrains = 2
94124
95125 let recContinent = 3
96126
97127 let locIdxContinent = 0
98128
99129 let locIdxType = 1
100130
101131 let locIdxId = 2
102132
103133 let bpIdxLevel = 0
104134
105135 let bpIdxRes = 1
106136
107137 let bpIdxMat = 2
108138
109139 let bpIdxProd = 3
110140
111141 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)]
112142
113143
114144 func numPiecesBySize (landSize) = match landSize {
115145 case _ =>
116146 if (("S" == $match0))
117147 then 25
118148 else if (("M" == $match0))
119149 then 100
120150 else if (("L" == $match0))
121151 then 225
122152 else if (("XL" == $match0))
123153 then 400
124154 else if (("XXL" == $match0))
125155 then 625
126156 else throw("Unknown land size")
127157 }
128158
129159
130160 func subOneInList (aList,idx,amount) = {
131161 func subber (acc,i) = (acc :+ (if ((i == idx))
132162 then toString((parseIntValue(aList[i]) - amount))
133163 else aList[i]))
134164
135165 let r = {
136166 let $l = [0, 1, 2, 3, 4, 5]
137167 let $s = size($l)
138168 let $acc0 = nil
139169 func $f0_1 ($a,$i) = if (($i >= $s))
140170 then $a
141171 else subber($a, $l[$i])
142172
143173 func $f0_2 ($a,$i) = if (($i >= $s))
144174 then $a
145175 else throw("List size exceeds 6")
146176
147177 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
148178 }
149179 makeString(r, "_")
150180 }
151181
152182
153183 func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex) = {
154184 func adder (acc,i) = {
155185 let resOfType = ((fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i]) * landSizeIndex)
156186 (acc :+ toString((parseIntValue(currentRes[i]) + resOfType)))
157187 }
158188
159189 let r = {
160190 let $l = [0, 1, 2, 3, 4, 5]
161191 let $s = size($l)
162192 let $acc0 = nil
163193 func $f0_1 ($a,$i) = if (($i >= $s))
164194 then $a
165195 else adder($a, $l[$i])
166196
167197 func $f0_2 ($a,$i) = if (($i >= $s))
168198 then $a
169199 else throw("List size exceeds 6")
170200
171201 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
172202 }
173203 makeString(r, "_")
174204 }
175205
176206
207+func abs (x) = if ((x >= toBigInt(0)))
208+ then x
209+ else -(x)
210+
211+
212+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]]
213+
214+func genChar (n,continentIdx) = {
215+ let rem = toInt((n % TWENTYX))
216+ let letter = if ((freq[continentIdx][0] > rem))
217+ then "A"
218+ else if ((freq[continentIdx][1] > rem))
219+ then "B"
220+ else if ((freq[continentIdx][2] > rem))
221+ then "C"
222+ else if ((freq[continentIdx][3] > rem))
223+ then "D"
224+ else if ((freq[continentIdx][4] > rem))
225+ then "E"
226+ else "F"
227+ letter
228+ }
229+
230+
177231 @Callable(i)
178232 func stakeLand () = {
179233 let pmt = value(i.payments[0])
180234 let assetId = value(pmt.assetId)
181235 let address = toString(i.caller)
182236 if ((pmt.amount != 1))
183237 then throw((("NFT " + LANDPREFIX) + " token should be attached as payment"))
184238 else {
185239 let asset = value(assetInfo(assetId))
186240 if ((asset.issuer != this))
187241 then throw("Unknown issuer of token")
188242 else if (!(contains(asset.name, LANDPREFIX)))
189243 then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted"))
190244 else {
191245 let landNumSize = drop(asset.name, 4)
192246 let landNum = if (contains(landNumSize, "XXL"))
193247 then dropRight(landNumSize, 3)
194248 else if (contains(landNumSize, "XL"))
195249 then dropRight(landNumSize, 2)
196250 else dropRight(landNumSize, 1)
197251 if (!(isDefined(parseInt(landNum))))
198252 then throw(("Cannot parse land number from " + asset.name))
199253 else {
200254 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
201255 if (isDefined(getInteger(timeKey)))
202256 then throw((("NFT " + asset.name) + " is already staked"))
203- else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandToOwner(landNum), address)]
257+ else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandNumToOwner(landNum), address)]
204258 }
205259 }
206260 }
207261 }
208262
209263
210264
211265 @Callable(i)
212266 func unstakeLand (landAssetId) = if ((size(i.payments) != 0))
213267 then throw("unstake doesn't require any payments")
214268 else {
215269 let assetId = fromBase58String(landAssetId)
216270 let address = toString(i.caller)
217271 let asset = value(assetInfo(assetId))
218272 if ((asset.issuer != this))
219273 then throw("Unknown issuer of token")
220274 else if (!(contains(asset.name, LANDPREFIX)))
221275 then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked"))
222276 else {
223277 let timeKey = keyStakedTimeByAssetId(landAssetId)
224278 if (!(isDefined(timeKey)))
225279 then throw((("NFT " + asset.name) + " is not staked"))
226280 else {
227- let owner = valueOrErrorMessage(getString(keyAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
281+ let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned"))
228282 if ((owner != address))
229283 then throw("Staked NFT is not yours")
230284 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address))]
231285 }
232286 }
233287 }
234288
235289
236290
237291 @Callable(i)
238292 func stakeDuck () = {
239293 let pmt = value(i.payments[0])
240294 let assetId = value(pmt.assetId)
241295 let address = toString(i.caller)
242296 if ((pmt.amount != 1))
243297 then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment"))
244298 else {
245299 let asset = value(assetInfo(assetId))
246300 if (if ((asset.issuer != incubatorAddr))
247301 then (asset.issuer != breederAddr)
248302 else false)
249303 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
250304 else if (!(contains(asset.name, DUCKPREFIX)))
251305 then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted"))
252306 else {
253307 let assetIdStr = toBase58String(assetId)
254308 let timeKey = keyStakedTimeByAssetId(assetIdStr)
255309 if (isDefined(getInteger(timeKey)))
256310 then throw((("NFT " + asset.name) + " is already staked"))
257311 else if (isDefined(getString(keyStakedDuckByOwner(address))))
258312 then throw(("You already staked one duck: " + asset.name))
259313 else {
260314 let locKey = keyDuckLocation(assetIdStr)
261315 let location = getString(locKey)
262316 let keyHealth = keyDuckHealth(assetIdStr)
263317 let health = getInteger(keyHealth)
264318 let bpKey = keyBackpackByDuck(assetIdStr)
265319 let backpack = getString(bpKey)
266320 ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location))
267321 then nil
268322 else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health))
269323 then nil
270324 else ([IntegerEntry(keyHealth, 100)] ++ (if (isDefined(backpack))
271325 then nil
272326 else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")]))))))
273327 }
274328 }
275329 }
276330 }
277331
278332
279333
280334 @Callable(i)
281335 func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0))
282336 then throw("unstake doesn't require any payments")
283337 else {
284338 let assetId = fromBase58String(assetIdStr)
285339 let address = toString(i.caller)
286340 let asset = value(assetInfo(assetId))
287341 if (if ((asset.issuer != incubatorAddr))
288342 then (asset.issuer != breederAddr)
289343 else false)
290344 then throw((("Unknown issuer of " + DUCKPREFIX) + " token"))
291345 else if (!(contains(asset.name, DUCKPREFIX)))
292346 then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked"))
293347 else {
294348 let timeKey = keyStakedTimeByAssetId(toBase58String(assetId))
295349 if (!(isDefined(timeKey)))
296350 then throw((("NFT " + asset.name) + " is not staked"))
297351 else if (!(isDefined(keyStakedDuckByOwner(address))))
298352 then throw((("The duck " + asset.name) + " is not staked"))
299353 else {
300354 let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned"))
301355 if ((owner != address))
302356 then throw("Staked NFT is not yours")
303357 else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))]
304358 }
305359 }
306360 }
307361
308362
309363
310364 @Callable(i)
311365 func claimRes (amount,landAssetId) = if ((size(i.payments) != 0))
312366 then throw("claimRes doesn't require any payments")
313367 else {
314368 let addr = toString(i.caller)
315369 let asset = value(assetInfo(fromBase58String(landAssetId)))
316370 if (!(contains(asset.name, LANDPREFIX)))
317371 then throw((("NFT " + LANDPREFIX) + " token should be passed as param"))
318372 else {
319373 let timeKey = keyStakedTimeByAssetId(landAssetId)
320374 let savedTime = getInteger(timeKey)
321375 if (!(isDefined(savedTime)))
322376 then throw((("NFT " + asset.name) + " is not staked"))
323377 else {
324- let owner = getStringValue(keyAssetIdToOwner(landAssetId))
378+ let owner = getStringValue(keyLandAssetIdToOwner(landAssetId))
325379 if ((owner != addr))
326380 then throw((LANDPREFIX + " is not yours"))
327381 else {
328382 let d = split(asset.description, "_")
329383 let landSize = d[recLandSize]
330384 let terrainCounts = countTerrains(d[recTerrains])
331385 let duck = getString(keyStakedDuckByOwner(addr))
332386 if (!(isDefined(duck)))
333387 then throw("You don't have a duck staked")
334388 else {
335389 let duckAssetIdStr = value(duck)
336390 let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetIdStr)), DEFAULTLOCATION)
337391 let loc = split(value(curLocation), "_")
338392 if ((loc[locIdxType] != "L"))
339393 then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L"))
340394 else if ((loc[locIdxId] != landAssetId))
341395 then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId))
342396 else {
343397 let deltaTime = (lastBlock.timestamp - value(savedTime))
344398 if ((0 > deltaTime))
345399 then throw(((("Saved timestamp is in future, saved = " + toString(value(savedTime))) + ", current = ") + toString(lastBlock.timestamp)))
346400 else {
347401 let pieces = numPiecesBySize(landSize)
348402 let availRes = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * pieces)
349403 if ((amount > availRes))
350404 then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount)))
351405 else {
352406 let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE))
353407 let newTimestamp = (lastBlock.timestamp - newDeltaTime)
354408 let bpKey = keyBackpackByDuck(duckAssetIdStr)
355409 let currentPack = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
356410 let currentRes = split(currentPack[bpIdxRes], "_")
357411 let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25))
358412 let newPack = makeString([currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":")
359413 $Tuple2([StringEntry(bpKey, newPack), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, owner), newTimestamp)], unit)
360414 }
361415 }
362416 }
363417 }
364418 }
365419 }
366420 }
367421 }
368422
369423
370424
371425 @Callable(i)
372426 func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub)))
373427 then throw("signature does not match")
374428 else if ((size(i.payments) != 0))
375429 then throw("flight doesn't require any payments")
376430 else {
377431 let parts = split(toUtf8String(message), ";")
378432 let hp = split(split(parts[0], "|")[0], "_")
379433 let curHP = parseIntValue(hp[0])
380434 let newHP = parseIntValue(hp[1])
381435 let newLocAndTime = split(parts[1], ":")
382436 let newLocation = newLocAndTime[0]
383437 let time = parseIntValue(newLocAndTime[1])
384438 if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS)))
385439 then true
386440 else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time))
387441 then throw("signature outdated")
388442 else {
389443 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
390444 let keyHealth = keyDuckHealth(duckAssetId)
391445 let oldFromState = valueOrElse(getInteger(keyHealth), 100)
392446 if ((oldFromState != curHP))
393447 then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP)))
394448 else if ((0 >= curHP))
395449 then throw("You can't fly with zero health")
396450 else {
397451 let locKey = keyDuckLocation(duckAssetId)
398452 let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION)
399453 if ((newLocation == curLocation))
400454 then throw("You can't fly to the same location")
401455 else $Tuple2([StringEntry(locKey, if ((newHP > 0))
402456 then newLocation
403457 else curLocation), IntegerEntry(keyHealth, newHP)], unit)
404458 }
405459 }
406460 }
407461
408462
409463
410464 @Callable(i)
411465 func setHealth (health,duckAssetId) = if (if ((0 > health))
412466 then true
413467 else (health > 100))
414468 then throw("HP should be within 0..100")
415469 else [IntegerEntry(keyDuckHealth(duckAssetId), health)]
416470
417471
418472
419473 @Callable(i)
420474 func heal (matType,amount) = if (if ((0 > matType))
421475 then true
422476 else (matType >= NUMRES))
423477 then throw(("Unknown material: " + toString(matType)))
424478 else if ((0 >= amount))
425479 then throw(("Amount should be positive! " + toString(amount)))
426480 else {
427481 let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked")
428482 let keyHealth = keyDuckHealth(duckAssetId)
429483 let oldHealth = valueOrElse(getInteger(keyHealth), 100)
430484 if ((oldHealth >= 100))
431485 then throw("HP should be < 100 to heal")
432486 else {
433487 let bpKey = keyBackpackByDuck(duckAssetId)
434488 let currentPack = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
435489 let matList = split(currentPack[bpIdxMat], "_")
436490 let mList = if ((size(matList) != NUMRES))
437491 then ["0", "0", "0", "0", "0", "0"]
438492 else matList
439493 let currentAmount = parseIntValue(mList[matType])
440494 let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)])
441495 let spendAmount = (deltaHealth * HEALCOST)
442496 if ((spendAmount > currentAmount))
443497 then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount)))
444498 else {
445499 let newMat = subOneInList(mList, matType, spendAmount)
446500 [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))]
447501 }
448502 }
449503 }
450504
451505
452506
453507 @Callable(i)
454508 func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr))
455509 then throw("permission denied")
456510 else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack)
457511
458512
513+
514+@Callable(i)
515+func expedition () = if ((size(i.payments) != 0))
516+ then throw("expedition doesn't require any payments")
517+ else {
518+ let userAddr = toString(i.caller)
519+ let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked")
520+ let keyHealth = keyDuckHealth(duckAssetId)
521+ let health = valueOrElse(getInteger(keyHealth), 100)
522+ if ((0 >= health))
523+ then throw("Your duck needs healing")
524+ else {
525+ let currentPack = split(valueOrElse(getString(keyBackpackByDuck(duckAssetId)), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":")
526+ let matList = split(currentPack[bpIdxMat], "_")
527+ let totalMat = (((((parseIntValue(matList[0]) + parseIntValue(matList[1])) + parseIntValue(matList[2])) + parseIntValue(matList[3])) + parseIntValue(matList[4])) + parseIntValue(matList[5]))
528+ let nums = split_51C(valueOrErrorMessage(getString(keyFreeLandNumsMap()), (keyFreeLandNumsMap() + " is not initialized")), "_")
529+ let len = size(nums)
530+ let bigNum = abs(toBigInt(i.transactionId))
531+ let numActionAndSeed = if ((len == 0))
532+ then {
533+ let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501)
534+ $Tuple3(toString(freeNum), IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), bigNum)
535+ }
536+ else {
537+ let q = toBigInt(len)
538+ let mapIdx = toInt((bigNum % q))
539+ $Tuple3(nums[mapIdx], StringEntry(keyFreeLandNumsMap(), makeString_11C(removeByIndex(nums, mapIdx), "_")), (bigNum / q))
540+ }
541+ let continentIdx = toInt((numActionAndSeed._3 % FIVEX))
542+ func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, continentIdx)) + genChar((acc._2 / TWENTYX), continentIdx)) + genChar((acc._2 / TWENTY2X), continentIdx)) + genChar((acc._2 / TWENTY3X), continentIdx)) + genChar((acc._2 / TWENTY4X), continentIdx)), (acc._2 / TWENTY5X))
543+
544+ let t = {
545+ let $l = [1, 2, 3, 4, 5]
546+ let $s = size($l)
547+ let $acc0 = $Tuple2("", (bigNum / FIVEX))
548+ func $f0_1 ($a,$i) = if (($i >= $s))
549+ then $a
550+ else terrainGenerator($a, $l[$i])
551+
552+ func $f0_2 ($a,$i) = if (($i >= $s))
553+ then $a
554+ else throw("List size exceeds 5")
555+
556+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
557+ }
558+ let issue = Issue(keyNftName(numActionAndSeed._1, "S"), makeString([numActionAndSeed._1, "S", t._1, continents[continentIdx]], "_"), 1, 0, false)
559+ let assetId = calculateAssetId(issue)
560+ let id = toBase58String(assetId)
561+ $Tuple2([numActionAndSeed._2, issue, StringEntry(keyLandToAssetId(numActionAndSeed._1), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(numActionAndSeed._1), userAddr), ScriptTransfer(i.caller, 1, assetId)], unit)
562+ }
563+ }
564+
565+

github/deemru/w8io/169f3d6 
78.41 ms