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:BgIwCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIANwAFY2hhaW4JALAJAQkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkbkFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDABILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAwkAAAICAVQFByRtYXRjaDABIPd26vf3g8pl224T7gI7z1gplanB0Y3yS9ps2B1igMjeCQACAQINVW5rbm93biBjaGFpbgANaW5jdWJhdG9yQWRkcgQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM1BFa3RWdXgyUmhjaFNONjNEc0RvNGI0bXo0UXF6S1NlRHYDCQAAAgIBVAUHJG1hdGNoMAUEdGhpcwkAAgECDVVua25vd24gY2hhaW4AC2JyZWVkZXJBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUERWdVU0NUg3RWg1ZG10T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kJAgkAzAgCCAUQbnVtQWN0aW9uQW5kU2VlZAJfMQkAzAgCAgFTCQDMCAIIBQF0Al8xCQDMCAIJAJEDAgUKY29udGluZW50cwUMY29udGluZW50SWR4BQNuaWwCAV8AAQAABwQHYXNzZXRJZAkAuAgBBQVpc3N1ZQQCaWQJANgEAQUHYXNzZXRJZAkAlAoCCQDMCAIIBRBudW1BY3Rpb25BbmRTZWVkAl8yCQDMCAIFBWlzc3VlCQDMCAIJAQtTdHJpbmdFbnRyeQIJARBrZXlMYW5kVG9Bc3NldElkAQgFEG51bUFjdGlvbkFuZFNlZWQCXzEFAmlkCQDMCAIJAQtTdHJpbmdFbnRyeQIJARVrZXlMYW5kQXNzZXRJZFRvT3duZXIBBQJpZAUIdXNlckFkZHIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBEWtleUxhbmROdW1Ub093bmVyAQgFEG51bUFjdGlvbkFuZFNlZWQCXzEFCHVzZXJBZGRyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgABBQdhc3NldElkBQNuaWwFBHVuaXQAWzI7KQ==", "height": 2364495, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7wP2j5BUYgypJyKj5Jfj2m6vHu2X8fzCScUFfYcwZnES Next: FexwAejT51B3YHBFn68M9YAGXZjjCPYDjF44bVaeCseG Diff:
Old | New | Differences | |
---|---|---|---|
57 | 57 | ||
58 | 58 | let FIVEMINUTESMILLIS = 300000 | |
59 | 59 | ||
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 | + | ||
60 | 76 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
61 | 77 | ||
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) | |
63 | 93 | ||
64 | 94 | ||
65 | 95 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
74 | 104 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
75 | 105 | ||
76 | 106 | ||
77 | - | func | |
107 | + | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
78 | 108 | ||
79 | 109 | ||
80 | 110 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
174 | 204 | } | |
175 | 205 | ||
176 | 206 | ||
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 | + | ||
177 | 231 | @Callable(i) | |
178 | 232 | func stakeLand () = { | |
179 | 233 | let pmt = value(i.payments[0]) | |
200 | 254 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
201 | 255 | if (isDefined(getInteger(timeKey))) | |
202 | 256 | then throw((("NFT " + asset.name) + " is already staked")) | |
203 | - | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry( | |
257 | + | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandNumToOwner(landNum), address)] | |
204 | 258 | } | |
205 | 259 | } | |
206 | 260 | } | |
224 | 278 | if (!(isDefined(timeKey))) | |
225 | 279 | then throw((("NFT " + asset.name) + " is not staked")) | |
226 | 280 | else { | |
227 | - | let owner = valueOrErrorMessage(getString( | |
281 | + | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
228 | 282 | if ((owner != address)) | |
229 | 283 | then throw("Staked NFT is not yours") | |
230 | 284 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address))] | |
321 | 375 | if (!(isDefined(savedTime))) | |
322 | 376 | then throw((("NFT " + asset.name) + " is not staked")) | |
323 | 377 | else { | |
324 | - | let owner = getStringValue( | |
378 | + | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
325 | 379 | if ((owner != addr)) | |
326 | 380 | then throw((LANDPREFIX + " is not yours")) | |
327 | 381 | else { | |
456 | 510 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack) | |
457 | 511 | ||
458 | 512 | ||
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 | + |
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 | + | 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 | + | ||
60 | 76 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
61 | 77 | ||
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) | |
63 | 93 | ||
64 | 94 | ||
65 | 95 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
66 | 96 | ||
67 | 97 | ||
68 | 98 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
69 | 99 | ||
70 | 100 | ||
71 | 101 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
72 | 102 | ||
73 | 103 | ||
74 | 104 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
75 | 105 | ||
76 | 106 | ||
77 | - | func | |
107 | + | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
78 | 108 | ||
79 | 109 | ||
80 | 110 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
81 | 111 | ||
82 | 112 | ||
83 | 113 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
84 | 114 | ||
85 | 115 | ||
86 | 116 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
87 | 117 | ||
88 | 118 | ||
89 | 119 | let recLandNum = 0 | |
90 | 120 | ||
91 | 121 | let recLandSize = 1 | |
92 | 122 | ||
93 | 123 | let recTerrains = 2 | |
94 | 124 | ||
95 | 125 | let recContinent = 3 | |
96 | 126 | ||
97 | 127 | let locIdxContinent = 0 | |
98 | 128 | ||
99 | 129 | let locIdxType = 1 | |
100 | 130 | ||
101 | 131 | let locIdxId = 2 | |
102 | 132 | ||
103 | 133 | let bpIdxLevel = 0 | |
104 | 134 | ||
105 | 135 | let bpIdxRes = 1 | |
106 | 136 | ||
107 | 137 | let bpIdxMat = 2 | |
108 | 138 | ||
109 | 139 | let bpIdxProd = 3 | |
110 | 140 | ||
111 | 141 | 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)] | |
112 | 142 | ||
113 | 143 | ||
114 | 144 | func numPiecesBySize (landSize) = match landSize { | |
115 | 145 | case _ => | |
116 | 146 | if (("S" == $match0)) | |
117 | 147 | then 25 | |
118 | 148 | else if (("M" == $match0)) | |
119 | 149 | then 100 | |
120 | 150 | else if (("L" == $match0)) | |
121 | 151 | then 225 | |
122 | 152 | else if (("XL" == $match0)) | |
123 | 153 | then 400 | |
124 | 154 | else if (("XXL" == $match0)) | |
125 | 155 | then 625 | |
126 | 156 | else throw("Unknown land size") | |
127 | 157 | } | |
128 | 158 | ||
129 | 159 | ||
130 | 160 | func subOneInList (aList,idx,amount) = { | |
131 | 161 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
132 | 162 | then toString((parseIntValue(aList[i]) - amount)) | |
133 | 163 | else aList[i])) | |
134 | 164 | ||
135 | 165 | let r = { | |
136 | 166 | let $l = [0, 1, 2, 3, 4, 5] | |
137 | 167 | let $s = size($l) | |
138 | 168 | let $acc0 = nil | |
139 | 169 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
140 | 170 | then $a | |
141 | 171 | else subber($a, $l[$i]) | |
142 | 172 | ||
143 | 173 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
144 | 174 | then $a | |
145 | 175 | else throw("List size exceeds 6") | |
146 | 176 | ||
147 | 177 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
148 | 178 | } | |
149 | 179 | makeString(r, "_") | |
150 | 180 | } | |
151 | 181 | ||
152 | 182 | ||
153 | 183 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex) = { | |
154 | 184 | func adder (acc,i) = { | |
155 | 185 | let resOfType = ((fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
156 | 186 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
157 | 187 | } | |
158 | 188 | ||
159 | 189 | let r = { | |
160 | 190 | let $l = [0, 1, 2, 3, 4, 5] | |
161 | 191 | let $s = size($l) | |
162 | 192 | let $acc0 = nil | |
163 | 193 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
164 | 194 | then $a | |
165 | 195 | else adder($a, $l[$i]) | |
166 | 196 | ||
167 | 197 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
168 | 198 | then $a | |
169 | 199 | else throw("List size exceeds 6") | |
170 | 200 | ||
171 | 201 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
172 | 202 | } | |
173 | 203 | makeString(r, "_") | |
174 | 204 | } | |
175 | 205 | ||
176 | 206 | ||
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 | + | ||
177 | 231 | @Callable(i) | |
178 | 232 | func stakeLand () = { | |
179 | 233 | let pmt = value(i.payments[0]) | |
180 | 234 | let assetId = value(pmt.assetId) | |
181 | 235 | let address = toString(i.caller) | |
182 | 236 | if ((pmt.amount != 1)) | |
183 | 237 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
184 | 238 | else { | |
185 | 239 | let asset = value(assetInfo(assetId)) | |
186 | 240 | if ((asset.issuer != this)) | |
187 | 241 | then throw("Unknown issuer of token") | |
188 | 242 | else if (!(contains(asset.name, LANDPREFIX))) | |
189 | 243 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
190 | 244 | else { | |
191 | 245 | let landNumSize = drop(asset.name, 4) | |
192 | 246 | let landNum = if (contains(landNumSize, "XXL")) | |
193 | 247 | then dropRight(landNumSize, 3) | |
194 | 248 | else if (contains(landNumSize, "XL")) | |
195 | 249 | then dropRight(landNumSize, 2) | |
196 | 250 | else dropRight(landNumSize, 1) | |
197 | 251 | if (!(isDefined(parseInt(landNum)))) | |
198 | 252 | then throw(("Cannot parse land number from " + asset.name)) | |
199 | 253 | else { | |
200 | 254 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
201 | 255 | if (isDefined(getInteger(timeKey))) | |
202 | 256 | then throw((("NFT " + asset.name) + " is already staked")) | |
203 | - | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry( | |
257 | + | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(toBase58String(assetId)), address), StringEntry(keyLandNumToOwner(landNum), address)] | |
204 | 258 | } | |
205 | 259 | } | |
206 | 260 | } | |
207 | 261 | } | |
208 | 262 | ||
209 | 263 | ||
210 | 264 | ||
211 | 265 | @Callable(i) | |
212 | 266 | func unstakeLand (landAssetId) = if ((size(i.payments) != 0)) | |
213 | 267 | then throw("unstake doesn't require any payments") | |
214 | 268 | else { | |
215 | 269 | let assetId = fromBase58String(landAssetId) | |
216 | 270 | let address = toString(i.caller) | |
217 | 271 | let asset = value(assetInfo(assetId)) | |
218 | 272 | if ((asset.issuer != this)) | |
219 | 273 | then throw("Unknown issuer of token") | |
220 | 274 | else if (!(contains(asset.name, LANDPREFIX))) | |
221 | 275 | then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked")) | |
222 | 276 | else { | |
223 | 277 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
224 | 278 | if (!(isDefined(timeKey))) | |
225 | 279 | then throw((("NFT " + asset.name) + " is not staked")) | |
226 | 280 | else { | |
227 | - | let owner = valueOrErrorMessage(getString( | |
281 | + | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
228 | 282 | if ((owner != address)) | |
229 | 283 | then throw("Staked NFT is not yours") | |
230 | 284 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address))] | |
231 | 285 | } | |
232 | 286 | } | |
233 | 287 | } | |
234 | 288 | ||
235 | 289 | ||
236 | 290 | ||
237 | 291 | @Callable(i) | |
238 | 292 | func stakeDuck () = { | |
239 | 293 | let pmt = value(i.payments[0]) | |
240 | 294 | let assetId = value(pmt.assetId) | |
241 | 295 | let address = toString(i.caller) | |
242 | 296 | if ((pmt.amount != 1)) | |
243 | 297 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
244 | 298 | else { | |
245 | 299 | let asset = value(assetInfo(assetId)) | |
246 | 300 | if (if ((asset.issuer != incubatorAddr)) | |
247 | 301 | then (asset.issuer != breederAddr) | |
248 | 302 | else false) | |
249 | 303 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
250 | 304 | else if (!(contains(asset.name, DUCKPREFIX))) | |
251 | 305 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
252 | 306 | else { | |
253 | 307 | let assetIdStr = toBase58String(assetId) | |
254 | 308 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
255 | 309 | if (isDefined(getInteger(timeKey))) | |
256 | 310 | then throw((("NFT " + asset.name) + " is already staked")) | |
257 | 311 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
258 | 312 | then throw(("You already staked one duck: " + asset.name)) | |
259 | 313 | else { | |
260 | 314 | let locKey = keyDuckLocation(assetIdStr) | |
261 | 315 | let location = getString(locKey) | |
262 | 316 | let keyHealth = keyDuckHealth(assetIdStr) | |
263 | 317 | let health = getInteger(keyHealth) | |
264 | 318 | let bpKey = keyBackpackByDuck(assetIdStr) | |
265 | 319 | let backpack = getString(bpKey) | |
266 | 320 | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
267 | 321 | then nil | |
268 | 322 | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health)) | |
269 | 323 | then nil | |
270 | 324 | else ([IntegerEntry(keyHealth, 100)] ++ (if (isDefined(backpack)) | |
271 | 325 | then nil | |
272 | 326 | else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
273 | 327 | } | |
274 | 328 | } | |
275 | 329 | } | |
276 | 330 | } | |
277 | 331 | ||
278 | 332 | ||
279 | 333 | ||
280 | 334 | @Callable(i) | |
281 | 335 | func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0)) | |
282 | 336 | then throw("unstake doesn't require any payments") | |
283 | 337 | else { | |
284 | 338 | let assetId = fromBase58String(assetIdStr) | |
285 | 339 | let address = toString(i.caller) | |
286 | 340 | let asset = value(assetInfo(assetId)) | |
287 | 341 | if (if ((asset.issuer != incubatorAddr)) | |
288 | 342 | then (asset.issuer != breederAddr) | |
289 | 343 | else false) | |
290 | 344 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
291 | 345 | else if (!(contains(asset.name, DUCKPREFIX))) | |
292 | 346 | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
293 | 347 | else { | |
294 | 348 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
295 | 349 | if (!(isDefined(timeKey))) | |
296 | 350 | then throw((("NFT " + asset.name) + " is not staked")) | |
297 | 351 | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
298 | 352 | then throw((("The duck " + asset.name) + " is not staked")) | |
299 | 353 | else { | |
300 | 354 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
301 | 355 | if ((owner != address)) | |
302 | 356 | then throw("Staked NFT is not yours") | |
303 | 357 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
304 | 358 | } | |
305 | 359 | } | |
306 | 360 | } | |
307 | 361 | ||
308 | 362 | ||
309 | 363 | ||
310 | 364 | @Callable(i) | |
311 | 365 | func claimRes (amount,landAssetId) = if ((size(i.payments) != 0)) | |
312 | 366 | then throw("claimRes doesn't require any payments") | |
313 | 367 | else { | |
314 | 368 | let addr = toString(i.caller) | |
315 | 369 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
316 | 370 | if (!(contains(asset.name, LANDPREFIX))) | |
317 | 371 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
318 | 372 | else { | |
319 | 373 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
320 | 374 | let savedTime = getInteger(timeKey) | |
321 | 375 | if (!(isDefined(savedTime))) | |
322 | 376 | then throw((("NFT " + asset.name) + " is not staked")) | |
323 | 377 | else { | |
324 | - | let owner = getStringValue( | |
378 | + | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
325 | 379 | if ((owner != addr)) | |
326 | 380 | then throw((LANDPREFIX + " is not yours")) | |
327 | 381 | else { | |
328 | 382 | let d = split(asset.description, "_") | |
329 | 383 | let landSize = d[recLandSize] | |
330 | 384 | let terrainCounts = countTerrains(d[recTerrains]) | |
331 | 385 | let duck = getString(keyStakedDuckByOwner(addr)) | |
332 | 386 | if (!(isDefined(duck))) | |
333 | 387 | then throw("You don't have a duck staked") | |
334 | 388 | else { | |
335 | 389 | let duckAssetIdStr = value(duck) | |
336 | 390 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetIdStr)), DEFAULTLOCATION) | |
337 | 391 | let loc = split(value(curLocation), "_") | |
338 | 392 | if ((loc[locIdxType] != "L")) | |
339 | 393 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
340 | 394 | else if ((loc[locIdxId] != landAssetId)) | |
341 | 395 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
342 | 396 | else { | |
343 | 397 | let deltaTime = (lastBlock.timestamp - value(savedTime)) | |
344 | 398 | if ((0 > deltaTime)) | |
345 | 399 | then throw(((("Saved timestamp is in future, saved = " + toString(value(savedTime))) + ", current = ") + toString(lastBlock.timestamp))) | |
346 | 400 | else { | |
347 | 401 | let pieces = numPiecesBySize(landSize) | |
348 | 402 | let availRes = (fraction(deltaTime, DAILYRESBYPIECE, DAYMILLIS) * pieces) | |
349 | 403 | if ((amount > availRes)) | |
350 | 404 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
351 | 405 | else { | |
352 | 406 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (pieces * DAILYRESBYPIECE)) | |
353 | 407 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
354 | 408 | let bpKey = keyBackpackByDuck(duckAssetIdStr) | |
355 | 409 | let currentPack = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
356 | 410 | let currentRes = split(currentPack[bpIdxRes], "_") | |
357 | 411 | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25)) | |
358 | 412 | let newPack = makeString([currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
359 | 413 | $Tuple2([StringEntry(bpKey, newPack), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, owner), newTimestamp)], unit) | |
360 | 414 | } | |
361 | 415 | } | |
362 | 416 | } | |
363 | 417 | } | |
364 | 418 | } | |
365 | 419 | } | |
366 | 420 | } | |
367 | 421 | } | |
368 | 422 | ||
369 | 423 | ||
370 | 424 | ||
371 | 425 | @Callable(i) | |
372 | 426 | func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
373 | 427 | then throw("signature does not match") | |
374 | 428 | else if ((size(i.payments) != 0)) | |
375 | 429 | then throw("flight doesn't require any payments") | |
376 | 430 | else { | |
377 | 431 | let parts = split(toUtf8String(message), ";") | |
378 | 432 | let hp = split(split(parts[0], "|")[0], "_") | |
379 | 433 | let curHP = parseIntValue(hp[0]) | |
380 | 434 | let newHP = parseIntValue(hp[1]) | |
381 | 435 | let newLocAndTime = split(parts[1], ":") | |
382 | 436 | let newLocation = newLocAndTime[0] | |
383 | 437 | let time = parseIntValue(newLocAndTime[1]) | |
384 | 438 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
385 | 439 | then true | |
386 | 440 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
387 | 441 | then throw("signature outdated") | |
388 | 442 | else { | |
389 | 443 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
390 | 444 | let keyHealth = keyDuckHealth(duckAssetId) | |
391 | 445 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
392 | 446 | if ((oldFromState != curHP)) | |
393 | 447 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
394 | 448 | else if ((0 >= curHP)) | |
395 | 449 | then throw("You can't fly with zero health") | |
396 | 450 | else { | |
397 | 451 | let locKey = keyDuckLocation(duckAssetId) | |
398 | 452 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
399 | 453 | if ((newLocation == curLocation)) | |
400 | 454 | then throw("You can't fly to the same location") | |
401 | 455 | else $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
402 | 456 | then newLocation | |
403 | 457 | else curLocation), IntegerEntry(keyHealth, newHP)], unit) | |
404 | 458 | } | |
405 | 459 | } | |
406 | 460 | } | |
407 | 461 | ||
408 | 462 | ||
409 | 463 | ||
410 | 464 | @Callable(i) | |
411 | 465 | func setHealth (health,duckAssetId) = if (if ((0 > health)) | |
412 | 466 | then true | |
413 | 467 | else (health > 100)) | |
414 | 468 | then throw("HP should be within 0..100") | |
415 | 469 | else [IntegerEntry(keyDuckHealth(duckAssetId), health)] | |
416 | 470 | ||
417 | 471 | ||
418 | 472 | ||
419 | 473 | @Callable(i) | |
420 | 474 | func heal (matType,amount) = if (if ((0 > matType)) | |
421 | 475 | then true | |
422 | 476 | else (matType >= NUMRES)) | |
423 | 477 | then throw(("Unknown material: " + toString(matType))) | |
424 | 478 | else if ((0 >= amount)) | |
425 | 479 | then throw(("Amount should be positive! " + toString(amount))) | |
426 | 480 | else { | |
427 | 481 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
428 | 482 | let keyHealth = keyDuckHealth(duckAssetId) | |
429 | 483 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
430 | 484 | if ((oldHealth >= 100)) | |
431 | 485 | then throw("HP should be < 100 to heal") | |
432 | 486 | else { | |
433 | 487 | let bpKey = keyBackpackByDuck(duckAssetId) | |
434 | 488 | let currentPack = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
435 | 489 | let matList = split(currentPack[bpIdxMat], "_") | |
436 | 490 | let mList = if ((size(matList) != NUMRES)) | |
437 | 491 | then ["0", "0", "0", "0", "0", "0"] | |
438 | 492 | else matList | |
439 | 493 | let currentAmount = parseIntValue(mList[matType]) | |
440 | 494 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
441 | 495 | let spendAmount = (deltaHealth * HEALCOST) | |
442 | 496 | if ((spendAmount > currentAmount)) | |
443 | 497 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
444 | 498 | else { | |
445 | 499 | let newMat = subOneInList(mList, matType, spendAmount) | |
446 | 500 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] | |
447 | 501 | } | |
448 | 502 | } | |
449 | 503 | } | |
450 | 504 | ||
451 | 505 | ||
452 | 506 | ||
453 | 507 | @Callable(i) | |
454 | 508 | func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr)) | |
455 | 509 | then throw("permission denied") | |
456 | 510 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack) | |
457 | 511 | ||
458 | 512 | ||
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 ◑