tx · CNWn7BCogB6HKggy25AnT2ZtcZbKzEFid7WZC9okq8w3 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01800000 Waves 2023.06.06 17:20 [2610918] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "CNWn7BCogB6HKggy25AnT2ZtcZbKzEFid7WZC9okq8w3", "fee": 1800000, "feeAssetId": null, "timestamp": 1686061228242, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "2pkECjHNBFEk2T85wYBQenEqnpLHbxXcUgnP9Ffkmz1jxF4KBxWhffe11jfYUU8p2zEM2KQGfLXJb4w2nXsTrMmv" ], "script": "base64:BgJACAISAwoBGBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBGBIDCgEIEgMKARgSAwoBGBIDCgEYEgMKAQgSAEYABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgARSW5mcmFVcGdyYWRlQ29zdFMEByRtYXRjaDAFBWNoYWluAwkAAA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FAXMJAJQKAgUDbmlsBQZyZXN1bHQA4FFx5A==", "height": 2610918, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 63swBW2zm6oETtWbfok1sn3JXgW9EsUMAyz7B7bYgmv Next: Do714kwTAiETwg575wS3t5gWByraDb8Q49SbXbUpmkvM Diff:
Old | New | Differences | |
---|---|---|---|
53 | 53 | let DAYMILLIS = 86400000 | |
54 | 54 | ||
55 | 55 | let WHMULTIPLIER = 10000000000 | |
56 | + | ||
57 | + | let RESOURCEPRICEMIN = 39637 | |
58 | + | ||
59 | + | let DUTYMAXPACKAGES = 3 | |
60 | + | ||
61 | + | let DUTYBUYCOEF = 4 | |
62 | + | ||
63 | + | let EMERGENCYSELLCOEF = 10 | |
64 | + | ||
65 | + | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
66 | + | ||
67 | + | let recipeIdxPacksize = 7 | |
56 | 68 | ||
57 | 69 | let recLandNum = 0 | |
58 | 70 | ||
141 | 153 | ||
142 | 154 | ||
143 | 155 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
156 | + | ||
157 | + | ||
158 | + | func keyDutyWarehouseByType (prodType) = ("dutyWhByProd_" + toString(prodType)) | |
144 | 159 | ||
145 | 160 | ||
146 | 161 | func asString (v) = match v { | |
557 | 572 | } | |
558 | 573 | ||
559 | 574 | ||
575 | + | ||
576 | + | @Callable(i) | |
577 | + | func getEmergencyServiceDataREADONLY () = { | |
578 | + | func singleProd (acc,recipeStr) = { | |
579 | + | let n = acc._2 | |
580 | + | let recipe = split(recipeStr, "_") | |
581 | + | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
582 | + | let maxAmount = if ((n == 0)) | |
583 | + | then (DUTYMAXPACKAGES * packSize) | |
584 | + | else 0 | |
585 | + | let existAmount = valueOrElse(getInteger(keyDutyWarehouseByType(n)), 0) | |
586 | + | func addMat (ac,j) = (ac + parseIntValue(recipe[j])) | |
587 | + | ||
588 | + | let totalMat = { | |
589 | + | let $l = [0, 1, 2, 3, 4, 5] | |
590 | + | let $s = size($l) | |
591 | + | let $acc0 = 0 | |
592 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
593 | + | then $a | |
594 | + | else addMat($a, $l[$i]) | |
595 | + | ||
596 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
597 | + | then $a | |
598 | + | else throw("List size exceeds 6") | |
599 | + | ||
600 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
601 | + | } | |
602 | + | let buyPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
603 | + | let sellPrice = fraction((totalMat * EMERGENCYSELLCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
604 | + | let y = makeString([toString(maxAmount), toString(existAmount), toString(buyPrice), toString(sellPrice)], "_") | |
605 | + | $Tuple2((acc._1 :+ y), (n + 1)) | |
606 | + | } | |
607 | + | ||
608 | + | let s = makeString_2C(( let $l = productionMatrix | |
609 | + | let $s = size($l) | |
610 | + | let $acc0 = $Tuple2(nil, 0) | |
611 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
612 | + | then $a | |
613 | + | else singleProd($a, $l[$i]) | |
614 | + | ||
615 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
616 | + | then $a | |
617 | + | else throw("List size exceeds 50") | |
618 | + | ||
619 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1, ":") | |
620 | + | let result = ("%s%s__emergencyServiceData__" + s) | |
621 | + | $Tuple2(nil, result) | |
622 | + | } | |
623 | + | ||
624 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdtAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let defaultRestAddressStr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let InfraUpgradeCostS = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if ((base58'2W' == $match0)) | |
27 | 27 | then 10000000000 | |
28 | 28 | else if ((base58'2T' == $match0)) | |
29 | 29 | then 100000000 | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let SEP = "__" | |
34 | 34 | ||
35 | 35 | let MULT6 = 1000000 | |
36 | 36 | ||
37 | 37 | let ARTPRESALE = "PRESALE" | |
38 | 38 | ||
39 | 39 | let NUMRES = 6 | |
40 | 40 | ||
41 | 41 | let SSIZE = 25 | |
42 | 42 | ||
43 | 43 | let MSIZE = 100 | |
44 | 44 | ||
45 | 45 | let LSIZE = 225 | |
46 | 46 | ||
47 | 47 | let XLSIZE = 400 | |
48 | 48 | ||
49 | 49 | let XXLSIZE = 625 | |
50 | 50 | ||
51 | 51 | let DAILYRESBYPIECE = 3456000 | |
52 | 52 | ||
53 | 53 | let DAYMILLIS = 86400000 | |
54 | 54 | ||
55 | 55 | let WHMULTIPLIER = 10000000000 | |
56 | + | ||
57 | + | let RESOURCEPRICEMIN = 39637 | |
58 | + | ||
59 | + | let DUTYMAXPACKAGES = 3 | |
60 | + | ||
61 | + | let DUTYBUYCOEF = 4 | |
62 | + | ||
63 | + | let EMERGENCYSELLCOEF = 10 | |
64 | + | ||
65 | + | let productionMatrix = ["1_1_1_2_2_5_1_10_0", "2_2_2_4_4_10_1_10_0", "3_3_3_6_6_15_1_10_0", "2_5_5_2_7_5_2_100_1", "4_10_10_4_14_10_2_100_1", "6_15_15_6_21_15_2_100_1", "1_1_1_1_1_8_1_10_2", "2_2_2_2_2_16_1_10_2", "3_3_3_3_3_24_1_10_2", "9_9_1_5_5_1_5_100_3", "18_18_2_10_10_2_5_100_3", "27_27_3_15_15_3_5_100_3", "2_2_1_2_2_2_1_10_4", "4_4_2_4_4_4_1_10_4", "6_6_3_6_6_6_1_10_4"] | |
66 | + | ||
67 | + | let recipeIdxPacksize = 7 | |
56 | 68 | ||
57 | 69 | let recLandNum = 0 | |
58 | 70 | ||
59 | 71 | let recLandSize = 1 | |
60 | 72 | ||
61 | 73 | let recTerrains = 2 | |
62 | 74 | ||
63 | 75 | let recContinent = 3 | |
64 | 76 | ||
65 | 77 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
66 | 78 | ||
67 | 79 | ||
68 | 80 | let IdxCfgStakingDapp = 1 | |
69 | 81 | ||
70 | 82 | let IdxCfgEconomyDapp = 2 | |
71 | 83 | ||
72 | 84 | func keyRestCfg () = "%s__restConfig" | |
73 | 85 | ||
74 | 86 | ||
75 | 87 | func keyRestAddress () = "%s__restAddr" | |
76 | 88 | ||
77 | 89 | ||
78 | 90 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
79 | 91 | ||
80 | 92 | ||
81 | 93 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
82 | 94 | ||
83 | 95 | ||
84 | 96 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
85 | 97 | ||
86 | 98 | let restCfg = readRestCfgOrFail(restContract) | |
87 | 99 | ||
88 | 100 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
89 | 101 | ||
90 | 102 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
91 | 103 | ||
92 | 104 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
93 | 105 | ||
94 | 106 | ||
95 | 107 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
96 | 108 | ||
97 | 109 | ||
98 | 110 | func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId) | |
99 | 111 | ||
100 | 112 | ||
101 | 113 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
102 | 114 | ||
103 | 115 | ||
104 | 116 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
105 | 117 | ||
106 | 118 | ||
107 | 119 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
108 | 120 | ||
109 | 121 | ||
110 | 122 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
111 | 123 | ||
112 | 124 | ||
113 | 125 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
114 | 126 | ||
115 | 127 | ||
116 | 128 | func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId) | |
117 | 129 | ||
118 | 130 | ||
119 | 131 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
120 | 132 | ||
121 | 133 | ||
122 | 134 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
123 | 135 | ||
124 | 136 | ||
125 | 137 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
126 | 138 | ||
127 | 139 | ||
128 | 140 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
129 | 141 | ||
130 | 142 | ||
131 | 143 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
132 | 144 | ||
133 | 145 | ||
134 | 146 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
135 | 147 | ||
136 | 148 | ||
137 | 149 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
138 | 150 | ||
139 | 151 | ||
140 | 152 | func keyBlocked () = "contractsBlocked" | |
141 | 153 | ||
142 | 154 | ||
143 | 155 | func keyOrderByLand (landAssetId) = ("landOrder_" + landAssetId) | |
156 | + | ||
157 | + | ||
158 | + | func keyDutyWarehouseByType (prodType) = ("dutyWhByProd_" + toString(prodType)) | |
144 | 159 | ||
145 | 160 | ||
146 | 161 | func asString (v) = match v { | |
147 | 162 | case s: String => | |
148 | 163 | s | |
149 | 164 | case _ => | |
150 | 165 | throw("fail to cast into String") | |
151 | 166 | } | |
152 | 167 | ||
153 | 168 | ||
154 | 169 | func asBoolean (v) = match v { | |
155 | 170 | case s: Boolean => | |
156 | 171 | s | |
157 | 172 | case _ => | |
158 | 173 | throw("fail to cast into Boolean") | |
159 | 174 | } | |
160 | 175 | ||
161 | 176 | ||
162 | 177 | func numPiecesBySize (landSize) = match landSize { | |
163 | 178 | case _ => | |
164 | 179 | if (("S" == $match0)) | |
165 | 180 | then SSIZE | |
166 | 181 | else if (("M" == $match0)) | |
167 | 182 | then MSIZE | |
168 | 183 | else if (("L" == $match0)) | |
169 | 184 | then LSIZE | |
170 | 185 | else if (("XL" == $match0)) | |
171 | 186 | then XLSIZE | |
172 | 187 | else if (("XXL" == $match0)) | |
173 | 188 | then XXLSIZE | |
174 | 189 | else throw("Unknown land size") | |
175 | 190 | } | |
176 | 191 | ||
177 | 192 | ||
178 | 193 | let USDTPRIZEPART = 500000 | |
179 | 194 | ||
180 | 195 | func asListIntCompacted (val) = match val { | |
181 | 196 | case valAnyList: List[Any] => | |
182 | 197 | if ((size(valAnyList) != NUMRES)) | |
183 | 198 | then throw(("Array size is " + toString(size(valAnyList)))) | |
184 | 199 | else { | |
185 | 200 | func conv (acc,item) = match item { | |
186 | 201 | case it: Int => | |
187 | 202 | (acc :+ toString(it)) | |
188 | 203 | case _ => | |
189 | 204 | throw("List type is not Int") | |
190 | 205 | } | |
191 | 206 | ||
192 | 207 | let r = { | |
193 | 208 | let $l = valAnyList | |
194 | 209 | let $s = size($l) | |
195 | 210 | let $acc0 = nil | |
196 | 211 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
197 | 212 | then $a | |
198 | 213 | else conv($a, $l[$i]) | |
199 | 214 | ||
200 | 215 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
201 | 216 | then $a | |
202 | 217 | else throw("List size exceeds 6") | |
203 | 218 | ||
204 | 219 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
205 | 220 | } | |
206 | 221 | makeString(r, "_") | |
207 | 222 | } | |
208 | 223 | case _ => | |
209 | 224 | throw("fail to cast into List") | |
210 | 225 | } | |
211 | 226 | ||
212 | 227 | ||
213 | 228 | func asSplitResult (val) = match val { | |
214 | 229 | case t2: (List[Any], List[Any]) => | |
215 | 230 | $Tuple2(asListIntCompacted(t2._1), asListIntCompacted(t2._2)) | |
216 | 231 | case _ => | |
217 | 232 | throw("fail to cast into (List, List)") | |
218 | 233 | } | |
219 | 234 | ||
220 | 235 | ||
221 | 236 | func walletInternal (userAddressOpt) = { | |
222 | 237 | let addr = addressFromString(userAddressOpt) | |
223 | 238 | let balance = if (isDefined(addr)) | |
224 | 239 | then wavesBalance(value(addr)) | |
225 | 240 | else BalanceDetails(0, 0, 0, 0) | |
226 | 241 | let usdtBalance = if (isDefined(addr)) | |
227 | 242 | then assetBalance(value(addr), usdtAssetId) | |
228 | 243 | else 0 | |
229 | 244 | let customName = valueOrElse(getString(stakingContract, keyAddressToCustomName(userAddressOpt)), userAddressOpt) | |
230 | 245 | let refBy = valueOrElse(getString(stakingContract, keyAddressRefBy(userAddressOpt)), "") | |
231 | 246 | let refs = valueOrElse(getString(stakingContract, keyAddressReferrals(userAddressOpt)), "") | |
232 | 247 | let lastTxId = valueOrElse(getString(stakingContract, keyLastTxIdByUser(userAddressOpt)), "") | |
233 | 248 | [("%s%s__customName__" + customName), ("%s%s__referredBy__" + refBy), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%s%d__wavesBalance__" + toString(balance.available)), ("%s%s%d__usdtBalance__" + toString(usdtBalance))] | |
234 | 249 | } | |
235 | 250 | ||
236 | 251 | ||
237 | 252 | func applyBonuses (landAssetId,pieces) = { | |
238 | 253 | let infraLevel = valueOrElse(getInteger(stakingContract, keyInfraLevelByAssetId(landAssetId)), 0) | |
239 | 254 | let artPieces = valueOrElse(getInteger(stakingContract, keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), 0) | |
240 | 255 | let add6 = (infraLevel / 6) | |
241 | 256 | let add7 = (infraLevel / 7) | |
242 | 257 | $Tuple3(infraLevel, artPieces, ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, ((infraLevel + add6) + (2 * add7)), 5)) + fraction(DAILYRESBYPIECE, artPieces, (pieces * 5)))) | |
243 | 258 | } | |
244 | 259 | ||
245 | 260 | ||
246 | 261 | func getWarehouseTotalVolume (volPrefix) = { | |
247 | 262 | let parts = split(volPrefix, "_") | |
248 | 263 | ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
249 | 264 | } | |
250 | 265 | ||
251 | 266 | ||
252 | 267 | func getWarehouse (whKey,landIndex,infraLevel) = { | |
253 | 268 | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
254 | 269 | let totS = toString(getWarehouseTotalVolume(volPrefix)) | |
255 | 270 | let whStr = valueOrElse(getString(stakingContract, whKey), ((((volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0_0_") + totS) + "_") + totS)) | |
256 | 271 | split(whStr, ":") | |
257 | 272 | } | |
258 | 273 | ||
259 | 274 | ||
260 | 275 | func duckInfoTuple (duckAssetId) = $Tuple5(valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(duckAssetId)), -1), value(assetInfo(fromBase58String(duckAssetId))).name, valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), ""), valueOrElse(getInteger(stakingContract, keyDuckHealth(duckAssetId)), -1), asString(invoke(stakingContract, "getBackpackREADONLY", [duckAssetId], nil))) | |
261 | 276 | ||
262 | 277 | ||
263 | 278 | func duckInfoArray (duckAssetId,owner,duckInf) = { | |
264 | 279 | let customName = valueOrElse(getString(stakingContract, keyDuckAssetIdToCustomName(duckAssetId)), duckInf._2) | |
265 | 280 | [("%s%s__assetId__" + duckAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(duckInf._1)), ("%s%s__name__" + duckInf._2), ("%s%s__location__" + duckInf._3), ("%s%d__health__" + toString(duckInf._4)), ("%s%s__backPack__" + duckInf._5)] | |
266 | 281 | } | |
267 | 282 | ||
268 | 283 | ||
269 | 284 | func landInfoArray (landAssetId,owner,stakedTime) = if ((landAssetId == "")) | |
270 | 285 | then throw("landAssetId is required") | |
271 | 286 | else { | |
272 | 287 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
273 | 288 | let d = split(a.description, "_") | |
274 | 289 | let landNum = if ((a.quantity > 0)) | |
275 | 290 | then d[recLandNum] | |
276 | 291 | else ("-" + d[recLandNum]) | |
277 | 292 | let pieces = numPiecesBySize(d[recLandSize]) | |
278 | 293 | let productivity = applyBonuses(landAssetId, pieces) | |
279 | 294 | let deltaTime = (lastBlock.timestamp - stakedTime) | |
280 | 295 | let availRes = if ((stakedTime > 0)) | |
281 | 296 | then fraction(deltaTime, (productivity._3 * pieces), DAYMILLIS) | |
282 | 297 | else 0 | |
283 | 298 | let needMat = fraction(InfraUpgradeCostS, (pieces * (productivity._1 + 1)), SSIZE) | |
284 | 299 | let globalAndLocal = if ((stakedTime > 0)) | |
285 | 300 | then asSplitResult(invoke(stakingContract, "splitByGlobalAndLocalWeightsREADONLY", [needMat, availRes, d[recTerrains]], nil)) | |
286 | 301 | else $Tuple2(asListIntCompacted(invoke(stakingContract, "splitByGlobalWeightsREADONLY", [needMat], nil)), "") | |
287 | 302 | let customName = valueOrElse(getString(stakingContract, keyLandAssetIdToCustomName(landAssetId)), ((d[recContinent] + "-") + d[recLandNum])) | |
288 | 303 | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__customName__" + customName), ("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__description__" + makeString([landNum, d[recLandSize], d[recTerrains], d[recContinent]], "_")), ("%s%d__infraLevel__" + toString(productivity._1)), ("%s%s__availResByType__" + globalAndLocal._2), ("%s%d__availResTotal__" + toString(availRes)), ("%s%s__needMaterial__" + globalAndLocal._1), makeString(["%s%s", "landArtefacts", ("PRESALE:" + toString(productivity._2))], SEP), ("%s%s__warehouse__" + makeString(getWarehouse(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
289 | 304 | } | |
290 | 305 | ||
291 | 306 | ||
292 | 307 | func landOrderInfoArray (landAssetId,owner) = if ((landAssetId == "")) | |
293 | 308 | then throw("landAssetId is required") | |
294 | 309 | else { | |
295 | 310 | let a = value(assetInfo(fromBase58String(landAssetId))) | |
296 | 311 | let d = split(a.description, "_") | |
297 | 312 | let pieces = numPiecesBySize(d[recLandSize]) | |
298 | 313 | let productivity = applyBonuses(landAssetId, pieces) | |
299 | 314 | [("%s%s__assetId__" + landAssetId), ("%s%s__owner__" + owner), ("%s%s__warehouse__" + makeString(getWarehouse(keyWarehouseByLand(landAssetId), (pieces / SSIZE), productivity._1), ":")), ("%s%s__landOrder__" + valueOrElse(getString(economyContract, keyOrderByLand(landAssetId)), "0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:"))] | |
300 | 315 | } | |
301 | 316 | ||
302 | 317 | ||
303 | 318 | @Callable(i) | |
304 | 319 | func constructorV1 (contracts) = if ((i.caller != this)) | |
305 | 320 | then throw("permissions denied") | |
306 | 321 | else { | |
307 | 322 | func descriptor (acc,ignoredItem) = (acc + "%s") | |
308 | 323 | ||
309 | 324 | let descr = { | |
310 | 325 | let $l = contracts | |
311 | 326 | let $s = size($l) | |
312 | 327 | let $acc0 = "" | |
313 | 328 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
314 | 329 | then $a | |
315 | 330 | else descriptor($a, $l[$i]) | |
316 | 331 | ||
317 | 332 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
318 | 333 | then $a | |
319 | 334 | else throw("List size exceeds 10") | |
320 | 335 | ||
321 | 336 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
322 | 337 | } | |
323 | 338 | [StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRestAddress(), toString(this))] | |
324 | 339 | } | |
325 | 340 | ||
326 | 341 | ||
327 | 342 | ||
328 | 343 | @Callable(i) | |
329 | 344 | func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt)) | |
330 | 345 | ||
331 | 346 | ||
332 | 347 | ||
333 | 348 | @Callable(i) | |
334 | 349 | func duckByOwnerInfoREADONLY (userAddress) = { | |
335 | 350 | let stakedDuck = getString(stakingContract, keyStakedDuckByOwner(userAddress)) | |
336 | 351 | $Tuple2(nil, if (if (isDefined(addressFromString(userAddress))) | |
337 | 352 | then isDefined(stakedDuck) | |
338 | 353 | else false) | |
339 | 354 | then { | |
340 | 355 | let duckAssetId = value(stakedDuck) | |
341 | 356 | duckInfoArray(duckAssetId, userAddress, duckInfoTuple(duckAssetId)) | |
342 | 357 | } | |
343 | 358 | else duckInfoArray("", userAddress, $Tuple5(-1, "", "", -1, ""))) | |
344 | 359 | } | |
345 | 360 | ||
346 | 361 | ||
347 | 362 | ||
348 | 363 | @Callable(i) | |
349 | 364 | func duckByAssetIdInfoREADONLY (duckAssetId) = { | |
350 | 365 | let owner = getString(stakingContract, keyDuckIdToOwner(duckAssetId)) | |
351 | 366 | let duckInf = duckInfoTuple(duckAssetId) | |
352 | 367 | $Tuple2(nil, duckInfoArray(duckAssetId, if (isDefined(owner)) | |
353 | 368 | then value(owner) | |
354 | 369 | else "", duckInfoTuple(duckAssetId))) | |
355 | 370 | } | |
356 | 371 | ||
357 | 372 | ||
358 | 373 | ||
359 | 374 | @Callable(i) | |
360 | 375 | func landByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
361 | 376 | then throw("landAssetId is required") | |
362 | 377 | else { | |
363 | 378 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
364 | 379 | let owner = if ((stakedTime > 0)) | |
365 | 380 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
366 | 381 | else "" | |
367 | 382 | $Tuple2(nil, landInfoArray(landAssetId, owner, stakedTime)) | |
368 | 383 | } | |
369 | 384 | ||
370 | 385 | ||
371 | 386 | ||
372 | 387 | @Callable(i) | |
373 | 388 | func stakedLandsByOwnerInfoREADONLY (landOwnerAddress) = if ((landOwnerAddress == "")) | |
374 | 389 | then throw("landOwnerAddress is required") | |
375 | 390 | else { | |
376 | 391 | let landsStr = getString(stakingContract, keyStakedLandsByOwner(landOwnerAddress)) | |
377 | 392 | let lands = if (isDefined(landsStr)) | |
378 | 393 | then split_51C(value(landsStr), "_") | |
379 | 394 | else nil | |
380 | 395 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
381 | 396 | then throw("landAssetId is required") | |
382 | 397 | else { | |
383 | 398 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
384 | 399 | (acc :+ landInfoArray(landAssetId, landOwnerAddress, stakedTime)) | |
385 | 400 | } | |
386 | 401 | ||
387 | 402 | let r = { | |
388 | 403 | let $l = lands | |
389 | 404 | let $s = size($l) | |
390 | 405 | let $acc0 = nil | |
391 | 406 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
392 | 407 | then $a | |
393 | 408 | else oneLand($a, $l[$i]) | |
394 | 409 | ||
395 | 410 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
396 | 411 | then $a | |
397 | 412 | else throw("List size exceeds 40") | |
398 | 413 | ||
399 | 414 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
400 | 415 | } | |
401 | 416 | $Tuple2(nil, r) | |
402 | 417 | } | |
403 | 418 | ||
404 | 419 | ||
405 | 420 | ||
406 | 421 | @Callable(i) | |
407 | 422 | func landsByIdsInfoREADONLY (landAssetIds) = { | |
408 | 423 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
409 | 424 | then throw("landAssetId is required") | |
410 | 425 | else { | |
411 | 426 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
412 | 427 | let owner = if ((stakedTime > 0)) | |
413 | 428 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
414 | 429 | else "" | |
415 | 430 | (acc :+ landInfoArray(landAssetId, owner, stakedTime)) | |
416 | 431 | } | |
417 | 432 | ||
418 | 433 | let r = { | |
419 | 434 | let $l = landAssetIds | |
420 | 435 | let $s = size($l) | |
421 | 436 | let $acc0 = nil | |
422 | 437 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
423 | 438 | then $a | |
424 | 439 | else oneLand($a, $l[$i]) | |
425 | 440 | ||
426 | 441 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
427 | 442 | then $a | |
428 | 443 | else throw("List size exceeds 40") | |
429 | 444 | ||
430 | 445 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
431 | 446 | } | |
432 | 447 | $Tuple2(nil, r) | |
433 | 448 | } | |
434 | 449 | ||
435 | 450 | ||
436 | 451 | ||
437 | 452 | @Callable(i) | |
438 | 453 | func warehouseOrderByAssetIdInfoREADONLY (landAssetId) = if ((landAssetId == "")) | |
439 | 454 | then throw("landAssetId is required") | |
440 | 455 | else { | |
441 | 456 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
442 | 457 | let owner = if ((stakedTime > 0)) | |
443 | 458 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
444 | 459 | else "" | |
445 | 460 | $Tuple2(nil, landOrderInfoArray(landAssetId, owner)) | |
446 | 461 | } | |
447 | 462 | ||
448 | 463 | ||
449 | 464 | ||
450 | 465 | @Callable(i) | |
451 | 466 | func ordersByLandIdsInfoREADONLY (landAssetIds) = { | |
452 | 467 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
453 | 468 | then throw("landAssetId is required") | |
454 | 469 | else { | |
455 | 470 | let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(landAssetId)), -1) | |
456 | 471 | let owner = if ((stakedTime > 0)) | |
457 | 472 | then value(getString(stakingContract, keyLandAssetIdToOwner(landAssetId))) | |
458 | 473 | else "" | |
459 | 474 | (acc :+ landOrderInfoArray(landAssetId, owner)) | |
460 | 475 | } | |
461 | 476 | ||
462 | 477 | let r = { | |
463 | 478 | let $l = landAssetIds | |
464 | 479 | let $s = size($l) | |
465 | 480 | let $acc0 = nil | |
466 | 481 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
467 | 482 | then $a | |
468 | 483 | else oneLand($a, $l[$i]) | |
469 | 484 | ||
470 | 485 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
471 | 486 | then $a | |
472 | 487 | else throw("List size exceeds 40") | |
473 | 488 | ||
474 | 489 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40) | |
475 | 490 | } | |
476 | 491 | $Tuple2(nil, r) | |
477 | 492 | } | |
478 | 493 | ||
479 | 494 | ||
480 | 495 | ||
481 | 496 | @Callable(i) | |
482 | 497 | func cancelWarehouseOrders (landAssetIds) = if ((i.caller != this)) | |
483 | 498 | then throw("permission denied") | |
484 | 499 | else { | |
485 | 500 | let blocked = getBoolean(stakingContract, keyBlocked()) | |
486 | 501 | if (if (!(isDefined(blocked))) | |
487 | 502 | then true | |
488 | 503 | else (value(blocked) == false)) | |
489 | 504 | then throw("Contracts should be blocked before canceling orders") | |
490 | 505 | else { | |
491 | 506 | func oneLand (a,landAssetId) = if ((landAssetId == "")) | |
492 | 507 | then throw("landAssetId is required") | |
493 | 508 | else { | |
494 | 509 | let c = asBoolean(invoke(economyContract, "setWarehouseOrder", ["0@0_0@0_0@0_0@0_0@0_0@0:0@0_0@0_0@0_0@0_0@0_0@0:", landAssetId], nil)) | |
495 | 510 | if (if (a) | |
496 | 511 | then true | |
497 | 512 | else c) | |
498 | 513 | then !(if (a) | |
499 | 514 | then c | |
500 | 515 | else false) | |
501 | 516 | else false | |
502 | 517 | } | |
503 | 518 | ||
504 | 519 | let r = { | |
505 | 520 | let $l = landAssetIds | |
506 | 521 | let $s = size($l) | |
507 | 522 | let $acc0 = false | |
508 | 523 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
509 | 524 | then $a | |
510 | 525 | else oneLand($a, $l[$i]) | |
511 | 526 | ||
512 | 527 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
513 | 528 | then $a | |
514 | 529 | else throw("List size exceeds 30") | |
515 | 530 | ||
516 | 531 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
517 | 532 | } | |
518 | 533 | $Tuple2(nil, r) | |
519 | 534 | } | |
520 | 535 | } | |
521 | 536 | ||
522 | 537 | ||
523 | 538 | ||
524 | 539 | @Callable(i) | |
525 | 540 | func fixWarehouseFormats (landAssetIds) = if ((i.caller != this)) | |
526 | 541 | then throw("permission denied") | |
527 | 542 | else { | |
528 | 543 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
529 | 544 | then throw("landAssetId is required") | |
530 | 545 | else (acc + size(asString(invoke(stakingContract, "fixWarehouseFormat", [landAssetId], nil)))) | |
531 | 546 | ||
532 | 547 | let r = { | |
533 | 548 | let $l = landAssetIds | |
534 | 549 | let $s = size($l) | |
535 | 550 | let $acc0 = 0 | |
536 | 551 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
537 | 552 | then $a | |
538 | 553 | else oneLand($a, $l[$i]) | |
539 | 554 | ||
540 | 555 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
541 | 556 | then $a | |
542 | 557 | else throw("List size exceeds 25") | |
543 | 558 | ||
544 | 559 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25) | |
545 | 560 | } | |
546 | 561 | $Tuple2(nil, r) | |
547 | 562 | } | |
548 | 563 | ||
549 | 564 | ||
550 | 565 | ||
551 | 566 | @Callable(i) | |
552 | 567 | func sendUsdtPrize (userAddress) = if ((i.caller != stakingContract)) | |
553 | 568 | then throw("permission denied") | |
554 | 569 | else { | |
555 | 570 | let amt = fraction(assetBalance(this, usdtAssetId), USDTPRIZEPART, MULT6) | |
556 | 571 | $Tuple2([ScriptTransfer(addressFromStringValue(userAddress), amt, usdtAssetId)], amt) | |
557 | 572 | } | |
558 | 573 | ||
559 | 574 | ||
575 | + | ||
576 | + | @Callable(i) | |
577 | + | func getEmergencyServiceDataREADONLY () = { | |
578 | + | func singleProd (acc,recipeStr) = { | |
579 | + | let n = acc._2 | |
580 | + | let recipe = split(recipeStr, "_") | |
581 | + | let packSize = parseIntValue(recipe[recipeIdxPacksize]) | |
582 | + | let maxAmount = if ((n == 0)) | |
583 | + | then (DUTYMAXPACKAGES * packSize) | |
584 | + | else 0 | |
585 | + | let existAmount = valueOrElse(getInteger(keyDutyWarehouseByType(n)), 0) | |
586 | + | func addMat (ac,j) = (ac + parseIntValue(recipe[j])) | |
587 | + | ||
588 | + | let totalMat = { | |
589 | + | let $l = [0, 1, 2, 3, 4, 5] | |
590 | + | let $s = size($l) | |
591 | + | let $acc0 = 0 | |
592 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
593 | + | then $a | |
594 | + | else addMat($a, $l[$i]) | |
595 | + | ||
596 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
597 | + | then $a | |
598 | + | else throw("List size exceeds 6") | |
599 | + | ||
600 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
601 | + | } | |
602 | + | let buyPrice = fraction((totalMat * DUTYBUYCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
603 | + | let sellPrice = fraction((totalMat * EMERGENCYSELLCOEF), RESOURCEPRICEMIN, (packSize * 10)) | |
604 | + | let y = makeString([toString(maxAmount), toString(existAmount), toString(buyPrice), toString(sellPrice)], "_") | |
605 | + | $Tuple2((acc._1 :+ y), (n + 1)) | |
606 | + | } | |
607 | + | ||
608 | + | let s = makeString_2C(( let $l = productionMatrix | |
609 | + | let $s = size($l) | |
610 | + | let $acc0 = $Tuple2(nil, 0) | |
611 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
612 | + | then $a | |
613 | + | else singleProd($a, $l[$i]) | |
614 | + | ||
615 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
616 | + | then $a | |
617 | + | else throw("List size exceeds 50") | |
618 | + | ||
619 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._1, ":") | |
620 | + | let result = ("%s%s__emergencyServiceData__" + s) | |
621 | + | $Tuple2(nil, result) | |
622 | + | } | |
623 | + | ||
624 | + |
github/deemru/w8io/169f3d6 82.03 ms ◑