tx · AgbM6Gs7awitt6iAHrrbSm2ESUEDiH41AJo2PQox3KYD 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.02900000 Waves 2024.11.29 21:10 [3393059] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "AgbM6Gs7awitt6iAHrrbSm2ESUEDiH41AJo2PQox3KYD", "fee": 2900000, "feeAssetId": null, "timestamp": 1732903856450, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "kztU2jFFiCfSV5x2KfNHyPKvAGXFGgFujJzVbHdVgRegwNuYs2KnXtcKT1fnVRzpNFzDt6gxApA7N4n8jRxBt4i" ], "script": "base64:BgJHCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIDCgEIEgASAwoBCBIAEgB2AANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ3AICt4gQABU1VTFQ4AIDC1y8ACkRBWV9NSUxMSVMAgLiZKQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoAE09ORV9QRVJDRU5UX0RJVklTT1IAZAAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC1dFRUtfQkxPQ0tTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAOBOAwkAAAIBAVQFByRtYXRjaDAAtAEJAAIBAg1Vbmtub3duIGNoYWluAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmt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M4IAgUPaXNzdWVOZnRBY3Rpb25zBQtidXJuQWN0aW9ucwUSYnVybkNvdW50ZXJBY3Rpb25zBQ1wcm9sb2dBY3Rpb25zBQ1jaGFuZ2VBY3Rpb25zCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBCQERQGV4dHJOYXRpdmUoMTA1MykCBQt3bGdDb250cmFjdAULdGVhbUFkZHJLZXkFB2ZvclRlYW0FCndsZ0Fzc2V0SWQJAJQKAgUKbmZ0QXNzZXRJZAUJd2xnUmVtYWluAWkBDG9wZW5OZnRDaGVzdAADCQECIT0CCAUBaQZjYWxsZXIFBHRoaXMJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAkAlAoCBQNuaWwAAADZaiWE", "height": 3393059, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GTrSpgmsDcgs3Yz7WkLKXEyUAZtnguqUei7puENiVaj4 Next: 43J7GB86TDF7zSb1Vtm65V19HfnedVDvFGUHLjvGeV4R Diff:
Old | New | Differences | |
---|---|---|---|
955 | 955 | else if ((rarityIdx == idxRarityP)) | |
956 | 956 | then throw("You can't exchange NFTs of this rarity") | |
957 | 957 | else throw("Unknown rarity") | |
958 | - | let minWlgFee = fraction(totalBonus, | |
958 | + | let minWlgFee = fraction(totalBonus, MULT6, getWlgPrice(0)) | |
959 | 959 | let change = (wlgFee - minWlgFee) | |
960 | 960 | let forTeam = (minWlgFee / 2) | |
961 | 961 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
965 | 965 | let changeActions = if ((change > 0)) | |
966 | 966 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
967 | 967 | else nil | |
968 | - | let $ | |
969 | - | let issueNftActions = $ | |
970 | - | let nftAssetId = $ | |
968 | + | let $t02778127942 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
969 | + | let issueNftActions = $t02778127942._1 | |
970 | + | let nftAssetId = $t02778127942._2 | |
971 | 971 | let burned = size(burnActions) | |
972 | 972 | let burnCounterActions = if ((burned == 0)) | |
973 | 973 | then nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT7 = 10000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let USDT2ACRES_MULTIPLIER = 10 | |
15 | 15 | ||
16 | 16 | let ONE_PERCENT_DIVISOR = 100 | |
17 | 17 | ||
18 | 18 | let chain = take(drop(this.bytes, 1), 1) | |
19 | 19 | ||
20 | 20 | let WEEK_BLOCKS = match chain { | |
21 | 21 | case _ => | |
22 | 22 | if ((base58'2W' == $match0)) | |
23 | 23 | then 10080 | |
24 | 24 | else if ((base58'2T' == $match0)) | |
25 | 25 | then 180 | |
26 | 26 | else throw("Unknown chain") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let usdtAssetId = match chain { | |
30 | 30 | case _ => | |
31 | 31 | if ((base58'2W' == $match0)) | |
32 | 32 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
33 | 33 | else if ((base58'2T' == $match0)) | |
34 | 34 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
35 | 35 | else throw("Unknown chain") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | let defaultRest2AddressStr = match chain { | |
39 | 39 | case _ => | |
40 | 40 | if ((base58'2W' == $match0)) | |
41 | 41 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
42 | 42 | else if ((base58'2T' == $match0)) | |
43 | 43 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
44 | 44 | else throw("Unknown chain") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | let arbitrageDelay = match chain { | |
48 | 48 | case _ => | |
49 | 49 | if ((base58'2W' == $match0)) | |
50 | 50 | then DAY_MILLIS | |
51 | 51 | else if ((base58'2T' == $match0)) | |
52 | 52 | then 60000 | |
53 | 53 | else throw("Unknown chain") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | let oldStakingContractStr = match chain { | |
57 | 57 | case _ => | |
58 | 58 | if ((base58'2W' == $match0)) | |
59 | 59 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
60 | 60 | else if ((base58'2T' == $match0)) | |
61 | 61 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
62 | 62 | else throw("Unknown chain") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let IdxCfgAcres2Dapp = 1 | |
69 | 69 | ||
70 | 70 | let IdxCfgWlgDapp = 2 | |
71 | 71 | ||
72 | 72 | let IdxCfgInvestFundDapp = 5 | |
73 | 73 | ||
74 | 74 | func keyRestCfg () = "%s__restConfig" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyRest2Address () = "%s__rest2Addr" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
87 | 87 | ||
88 | 88 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
89 | 89 | ||
90 | 90 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
91 | 91 | ||
92 | 92 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
93 | 93 | ||
94 | 94 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
95 | 95 | ||
96 | 96 | let oldAcresContractKey = "oldAcresContract" | |
97 | 97 | ||
98 | 98 | func keyBlocked () = "contractsBlocked" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | let wlgAssetIdKey = "wlg_assetId" | |
108 | 108 | ||
109 | 109 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
110 | 110 | ||
111 | 111 | let acresIssuedAmountKey = "acresIssuedAmount" | |
112 | 112 | ||
113 | 113 | let acresAssetIdKey = "acresAssetId" | |
114 | 114 | ||
115 | 115 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
116 | 116 | ||
117 | 117 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func asInt (v) = match v { | |
133 | 133 | case n: Int => | |
134 | 134 | n | |
135 | 135 | case _ => | |
136 | 136 | throw("fail to cast into Int") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func asTuple5Ints (val) = match val { | |
141 | 141 | case t: (Int, Int, Int, Int, Int) => | |
142 | 142 | t | |
143 | 143 | case _ => | |
144 | 144 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func asTuple4Ints (val) = match val { | |
149 | 149 | case t: (Int, Int, Int, Int) => | |
150 | 150 | t | |
151 | 151 | case _ => | |
152 | 152 | throw("fail to cast into (Int, Int, Int, Int)") | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func asTuple3Ints (val) = match val { | |
157 | 157 | case t: (Int, Int, Int) => | |
158 | 158 | t | |
159 | 159 | case _ => | |
160 | 160 | throw("fail to cast into (Int, Int, Int)") | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func asTuple2Ints (val) = match val { | |
165 | 165 | case t: (Int, Int) => | |
166 | 166 | t | |
167 | 167 | case _ => | |
168 | 168 | throw("fail to cast into (Int, Int)") | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func fixedPoint (val,decimals) = { | |
173 | 173 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
174 | 174 | let lowPart = toString((val % tenPow)) | |
175 | 175 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
176 | 176 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let M6_ = 1000000 | |
181 | 181 | ||
182 | 182 | let M8_ = 100000000 | |
183 | 183 | ||
184 | 184 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
185 | 185 | ||
186 | 186 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
187 | 187 | ||
188 | 188 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
195 | 195 | ||
196 | 196 | let totalFarmingPowerKey = "totalFarmingPower" | |
197 | 197 | ||
198 | 198 | let MAX_WL_NFTS = 3 | |
199 | 199 | ||
200 | 200 | let MAX_ARK_NFTS = 1 | |
201 | 201 | ||
202 | 202 | let ARK_NFT_BONUS = 5000 | |
203 | 203 | ||
204 | 204 | let MAX_NFTS_STAKED_BY_USER = 4 | |
205 | 205 | ||
206 | 206 | let keyNftTotalIssued = "nftTotalIssued" | |
207 | 207 | ||
208 | 208 | let keyNftTotalBurned = "nftTotalBurned" | |
209 | 209 | ||
210 | 210 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
211 | 211 | ||
212 | 212 | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
213 | 213 | ||
214 | 214 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
227 | 227 | ||
228 | 228 | func getLevelByAcres (acres) = { | |
229 | 229 | let acr = ((acres + 99999999) / M8_) | |
230 | 230 | func checker (acc,item) = if ((item >= acr)) | |
231 | 231 | then acc | |
232 | 232 | else (acc + 1) | |
233 | 233 | ||
234 | 234 | let $l = levelAcres | |
235 | 235 | let $s = size($l) | |
236 | 236 | let $acc0 = 0 | |
237 | 237 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
238 | 238 | then $a | |
239 | 239 | else checker($a, $l[$i]) | |
240 | 240 | ||
241 | 241 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
242 | 242 | then $a | |
243 | 243 | else throw("List size exceeds 10") | |
244 | 244 | ||
245 | 245 | $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) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
253 | 253 | let notBonused = getFarmingPowerByAcres(acres) | |
254 | 254 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | let teamAddrKey = "teamAddr" | |
259 | 259 | ||
260 | 260 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | let keyLastAcresSellTime = "lastAcresSellTime" | |
264 | 264 | ||
265 | 265 | let keyLastLimitLeft = "lastLimitLeft" | |
266 | 266 | ||
267 | 267 | let names = ["Gold shovel", "Pickaxe"] | |
268 | 268 | ||
269 | 269 | let descriptions = ["Reward for early birds", "Increases FarmPower"] | |
270 | 270 | ||
271 | 271 | let idxDescrShovel = 0 | |
272 | 272 | ||
273 | 273 | let idxDescrPickaxe = 1 | |
274 | 274 | ||
275 | 275 | let rarityThresholds = [5, 10, 20] | |
276 | 276 | ||
277 | 277 | let idxThresholdC = 0 | |
278 | 278 | ||
279 | 279 | let idxThresholdU = 1 | |
280 | 280 | ||
281 | 281 | let idxThresholdL = 2 | |
282 | 282 | ||
283 | 283 | let namez = ["SHOVEL", "PICKAXE"] | |
284 | 284 | ||
285 | 285 | let idxNameShovel = 0 | |
286 | 286 | ||
287 | 287 | let idxNamePickaxe = 1 | |
288 | 288 | ||
289 | 289 | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP"] | |
290 | 290 | ||
291 | 291 | let idxKeyC = 0 | |
292 | 292 | ||
293 | 293 | let idxKeyP = 4 | |
294 | 294 | ||
295 | 295 | let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"] | |
296 | 296 | ||
297 | 297 | let idxRarityC = 0 | |
298 | 298 | ||
299 | 299 | let idxRarityU = 1 | |
300 | 300 | ||
301 | 301 | let idxRarityL = 2 | |
302 | 302 | ||
303 | 303 | let idxRarityE = 3 | |
304 | 304 | ||
305 | 305 | let idxRarityP = 4 | |
306 | 306 | ||
307 | 307 | let collectionz = ["Digging tools"] | |
308 | 308 | ||
309 | 309 | let idxCollDig = 0 | |
310 | 310 | ||
311 | 311 | let bonusTypez = ["FarmPower"] | |
312 | 312 | ||
313 | 313 | let idxBonusTypeFp = 0 | |
314 | 314 | ||
315 | 315 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
316 | 316 | then valueOrElse(getBoolean(keyBlocked()), false) | |
317 | 317 | else false) | |
318 | 318 | then throw("Contracts are under maintenance") | |
319 | 319 | else { | |
320 | 320 | let addr = toString(i.originCaller) | |
321 | 321 | let week = (height / WEEK_BLOCKS) | |
322 | 322 | let lastWeekKey = keyLastWeekTxIdByUser(addr) | |
323 | 323 | let lastWeekTxIdByUser = getString(lastWeekKey) | |
324 | 324 | let txId = toBase58String(i.transactionId) | |
325 | 325 | let wtx = ((toString(week) + "_") + txId) | |
326 | 326 | let curWeekKey = keyCurWeekTxIdByUser(addr) | |
327 | 327 | if (isDefined(lastWeekTxIdByUser)) | |
328 | 328 | then { | |
329 | 329 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
330 | 330 | if ((lastWeekTx[0] == toString(week))) | |
331 | 331 | then [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
332 | 332 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
333 | 333 | then [StringEntry(curWeekKey, wtx)] | |
334 | 334 | else { | |
335 | 335 | let curWeekTxIdByUser = getStringValue(curWeekKey) | |
336 | 336 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
337 | 337 | if ((curWeekTx[0] == toString(week))) | |
338 | 338 | then [StringEntry(curWeekKey, wtx)] | |
339 | 339 | else [StringEntry(lastWeekKey, curWeekTxIdByUser), StringEntry(curWeekKey, wtx)] | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | else [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | func createNftDescrCustom (contKey,nftSerial,collection,name,descr,rarity,bonus,bonusType) = (((((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contKey) + "\", ") + "\"number\": ") + toString(nftSerial)) + ", ") + "\"collection\": \"") + collection) + "\", ") + "\"name\": \"") + name) + "\", ") + "\"description\": \"") + descr) + "\", ") + "\"rare\": \"") + rarity) + "\", ") + "\"bonus\": ") + toString(bonus)) + ", ") + "\"bonusType\": \"") + bonusType) + "\"}") | |
347 | 347 | ||
348 | 348 | ||
349 | 349 | func issueNftCustom (nameIdx,contKeyIdx,collIdx,rarityIdx,bonusPerc,descrIdx,bonusTypeIdx,addr) = { | |
350 | 350 | let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0) | |
351 | 351 | let rarity = rarityNames[rarityIdx] | |
352 | 352 | let name = (((namez[nameIdx] + "-") + take(rarity, 1)) + toString(bonusPerc)) | |
353 | 353 | let issue = Issue(name, createNftDescrCustom(contentKeyz[contKeyIdx], nftSerial, collectionz[collIdx], names[nameIdx], descriptions[descrIdx], rarityNames[rarityIdx], bonusPerc, bonusTypez[bonusTypeIdx]), 1, 0, false) | |
354 | 354 | let nftAssetId = calculateAssetId(issue) | |
355 | 355 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
360 | 360 | then (bonusDelta == 0) | |
361 | 361 | else false) | |
362 | 362 | then throw("Nothing to do") | |
363 | 363 | else { | |
364 | 364 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
365 | 365 | if ((wlgResult == wlgResult)) | |
366 | 366 | then { | |
367 | 367 | let now = lastBlock.timestamp | |
368 | 368 | let timeKey = keyAcresStakedTimeByUser(address) | |
369 | 369 | let amountKey = keyAcresStakedAmtByUser(address) | |
370 | 370 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
371 | 371 | if (if ((0 > amt)) | |
372 | 372 | then (0 > (oldAcresAmount + amt)) | |
373 | 373 | else false) | |
374 | 374 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
375 | 375 | else { | |
376 | 376 | let newAcresAmount = (oldAcresAmount + amt) | |
377 | 377 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
378 | 378 | let userFpKey = keyFarmingPowerByUser(address) | |
379 | 379 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
380 | 380 | let bonusKey = keyUserFullBonus(address) | |
381 | 381 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
382 | 382 | if (if ((0 > bonusDelta)) | |
383 | 383 | then (0 > (oldBonus + bonusDelta)) | |
384 | 384 | else false) | |
385 | 385 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
386 | 386 | else { | |
387 | 387 | let $t068386937 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
388 | 388 | let newBonusedFp = $t068386937._1 | |
389 | 389 | let ignored = $t068386937._2 | |
390 | 390 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
391 | 391 | let acresActions = if ((amt == 0)) | |
392 | 392 | then nil | |
393 | 393 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
394 | 394 | $Tuple2(((((acresActions :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))) :+ IntegerEntry(bonusKey, (oldBonus + bonusDelta))), wlgResult) | |
395 | 395 | } | |
396 | 396 | } | |
397 | 397 | } | |
398 | 398 | else throw("Strict value is not equal to itself.") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | func getWlgPrice (usdtBalanceCorrection) = { | |
403 | 403 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
404 | 404 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
405 | 405 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
406 | 406 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
407 | 407 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
408 | 408 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func getSwapLimitAcres () = { | |
413 | 413 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
414 | 414 | let acres2Usd = assetBalance(this, usdtAssetId) | |
415 | 415 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
416 | 416 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
417 | 417 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
418 | 418 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
419 | 419 | let now = lastBlock.timestamp | |
420 | 420 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
421 | 421 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
422 | 422 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | ||
426 | 426 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
427 | 427 | ||
428 | 428 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
429 | 429 | ||
430 | 430 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
431 | 431 | ||
432 | 432 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
433 | 433 | ||
434 | 434 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
435 | 435 | ||
436 | 436 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
437 | 437 | ||
438 | 438 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
439 | 439 | ||
440 | 440 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
441 | 441 | ||
442 | 442 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
443 | 443 | ||
444 | 444 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
445 | 445 | ||
446 | 446 | func isArkimalIssued (nfo) = { | |
447 | 447 | let issuer = toString(nfo.issuer) | |
448 | 448 | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
449 | 449 | then (issuer == oldStakingContractStr) | |
450 | 450 | else false) | |
451 | 451 | then true | |
452 | 452 | else (issuer == incubator)) | |
453 | 453 | then true | |
454 | 454 | else (issuer == breeder)) | |
455 | 455 | then true | |
456 | 456 | else (issuer == turtleIncubator)) | |
457 | 457 | then true | |
458 | 458 | else (issuer == turtleBreeder)) | |
459 | 459 | then true | |
460 | 460 | else (issuer == canineIncubator)) | |
461 | 461 | then true | |
462 | 462 | else (issuer == canineBreeder)) | |
463 | 463 | then true | |
464 | 464 | else (issuer == felineIncubator)) | |
465 | 465 | then true | |
466 | 466 | else (issuer == felineBreeder)) | |
467 | 467 | then nfo.name | |
468 | 468 | else if ((issuer == mutantBreeder)) | |
469 | 469 | then nfo.description | |
470 | 470 | else "" | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
475 | 475 | then throw(("NFT is not supported: " + descr)) | |
476 | 476 | else { | |
477 | 477 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
478 | 478 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
479 | 479 | } | |
480 | 480 | ||
481 | 481 | ||
482 | 482 | func rarityIdxByDescriprion (descr) = if (!(contains(descr, "\"rare\""))) | |
483 | 483 | then throw(("NFT is not supported: " + descr)) | |
484 | 484 | else { | |
485 | 485 | let rarityStr = split_4C(split_4C(split_4C(descr, "\"rare\"")[1], ",")[0], "\"")[1] | |
486 | 486 | value(indexOf(rarityNames, rarityStr)) | |
487 | 487 | } | |
488 | 488 | ||
489 | 489 | ||
490 | 490 | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
491 | 491 | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
492 | 492 | if ((nftNumber >= limit)) | |
493 | 493 | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
494 | 494 | else { | |
495 | 495 | let $t01175711833 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
496 | 496 | let actions = $t01175711833._1 | |
497 | 497 | let wlgClaimedAmount = $t01175711833._2 | |
498 | 498 | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
499 | 499 | } | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | @Callable(i) | |
504 | 504 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
505 | 505 | then throw("Access denied") | |
506 | 506 | else $Tuple2(prolog(i), 42) | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | ||
510 | 510 | @Callable(i) | |
511 | 511 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
512 | 512 | then throw("Permission denied") | |
513 | 513 | else { | |
514 | 514 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
515 | 515 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | 520 | @Callable(i) | |
521 | 521 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
522 | 522 | then throw("permission denied") | |
523 | 523 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func unstakeAcres (amount) = { | |
529 | 529 | let prologActions = prolog(i) | |
530 | 530 | if ((0 >= amount)) | |
531 | 531 | then throw("Amount should be positive") | |
532 | 532 | else { | |
533 | 533 | let address = toString(i.caller) | |
534 | 534 | if ((size(i.payments) != 0)) | |
535 | 535 | then throw("No payments required") | |
536 | 536 | else { | |
537 | 537 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
538 | 538 | if ((arbReleaseTime > lastBlock.timestamp)) | |
539 | 539 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
540 | 540 | else { | |
541 | 541 | let $t01340713487 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
542 | 542 | let actions = $t01340713487._1 | |
543 | 543 | let wlgClaimedAmount = $t01340713487._2 | |
544 | 544 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
545 | 545 | } | |
546 | 546 | } | |
547 | 547 | } | |
548 | 548 | } | |
549 | 549 | ||
550 | 550 | ||
551 | 551 | ||
552 | 552 | @Callable(i) | |
553 | 553 | func stakeAcres () = { | |
554 | 554 | let prologActions = prolog(i) | |
555 | 555 | let address = toString(i.caller) | |
556 | 556 | if ((size(i.payments) != 1)) | |
557 | 557 | then throw("exactly 1 payment must be attached") | |
558 | 558 | else { | |
559 | 559 | let pmt = i.payments[0] | |
560 | 560 | let amt = pmt.amount | |
561 | 561 | if (if (!(isDefined(pmt.assetId))) | |
562 | 562 | then true | |
563 | 563 | else (value(pmt.assetId) != acresAssetId)) | |
564 | 564 | then throw("ACRES payments only!") | |
565 | 565 | else { | |
566 | 566 | let $t01393814014 = stakeUnstakeAcresInternal(amt, address, 0) | |
567 | 567 | let actions = $t01393814014._1 | |
568 | 568 | let wlgClaimedAmount = $t01393814014._2 | |
569 | 569 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
570 | 570 | } | |
571 | 571 | } | |
572 | 572 | } | |
573 | 573 | ||
574 | 574 | ||
575 | 575 | ||
576 | 576 | @Callable(i) | |
577 | 577 | func buyAcres () = { | |
578 | 578 | let prologActions = prolog(i) | |
579 | 579 | if ((size(i.payments) != 1)) | |
580 | 580 | then throw("exactly 1 payment must be attached") | |
581 | 581 | else { | |
582 | 582 | let pmt = i.payments[0] | |
583 | 583 | let usdtAmount = pmt.amount | |
584 | 584 | if (if (!(isDefined(pmt.assetId))) | |
585 | 585 | then true | |
586 | 586 | else (value(pmt.assetId) != usdtAssetId)) | |
587 | 587 | then throw("USDT payments only!") | |
588 | 588 | else if ((MULT6 > usdtAmount)) | |
589 | 589 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
590 | 590 | else { | |
591 | 591 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
592 | 592 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
593 | 593 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
594 | 594 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
595 | 595 | if ((req == req)) | |
596 | 596 | then { | |
597 | 597 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
598 | 598 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
599 | 599 | } | |
600 | 600 | else throw("Strict value is not equal to itself.") | |
601 | 601 | } | |
602 | 602 | } | |
603 | 603 | } | |
604 | 604 | ||
605 | 605 | ||
606 | 606 | ||
607 | 607 | @Callable(i) | |
608 | 608 | func buyAcresREADONLY (usdtAmount) = { | |
609 | 609 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
610 | 610 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
611 | 611 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
612 | 612 | } | |
613 | 613 | ||
614 | 614 | ||
615 | 615 | ||
616 | 616 | @Callable(i) | |
617 | 617 | func sellAcres () = { | |
618 | 618 | let prologActions = prolog(i) | |
619 | 619 | if ((size(i.payments) != 1)) | |
620 | 620 | then throw("exactly 1 payment must be attached") | |
621 | 621 | else { | |
622 | 622 | let pmt = i.payments[0] | |
623 | 623 | let acresAmount = pmt.amount | |
624 | 624 | if (if (!(isDefined(pmt.assetId))) | |
625 | 625 | then true | |
626 | 626 | else (value(pmt.assetId) != acresAssetId)) | |
627 | 627 | then throw("ACRES payments only!") | |
628 | 628 | else if ((MULT7 > acresAmount)) | |
629 | 629 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
630 | 630 | else { | |
631 | 631 | let addr = toString(i.caller) | |
632 | 632 | let $t01587115919 = getSwapLimitAcres() | |
633 | 633 | let limitAction = $t01587115919._1 | |
634 | 634 | let maxUsdt = $t01587115919._2 | |
635 | 635 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
636 | 636 | if ((acresAmount > maxAcres)) | |
637 | 637 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
638 | 638 | else { | |
639 | 639 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
640 | 640 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
641 | 641 | } | |
642 | 642 | } | |
643 | 643 | } | |
644 | 644 | } | |
645 | 645 | ||
646 | 646 | ||
647 | 647 | ||
648 | 648 | @Callable(i) | |
649 | 649 | func sellAcresREADONLY (address,acresAmount) = { | |
650 | 650 | let $t01641516463 = getSwapLimitAcres() | |
651 | 651 | let limitAction = $t01641516463._1 | |
652 | 652 | let maxUsdt = $t01641516463._2 | |
653 | 653 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
654 | 654 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
655 | 655 | } | |
656 | 656 | ||
657 | 657 | ||
658 | 658 | ||
659 | 659 | @Callable(i) | |
660 | 660 | func convertOldStakes () = if ((i.caller != this)) | |
661 | 661 | then throw("Temporarily disabled") | |
662 | 662 | else { | |
663 | 663 | let address = toString(i.caller) | |
664 | 664 | if ((size(i.payments) != 0)) | |
665 | 665 | then throw("No payments required") | |
666 | 666 | else { | |
667 | 667 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
668 | 668 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
669 | 669 | let gotAcres0 = if ((amount > 0)) | |
670 | 670 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
671 | 671 | else $Tuple2(0, 0) | |
672 | 672 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
673 | 673 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
674 | 674 | let landsResult = if (isDefined(landsStr)) | |
675 | 675 | then { | |
676 | 676 | let lands = split_51C(value(landsStr), "_") | |
677 | 677 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
678 | 678 | then throw("landAssetId is required") | |
679 | 679 | else { | |
680 | 680 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
681 | 681 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
682 | 682 | } | |
683 | 683 | ||
684 | 684 | let rr = { | |
685 | 685 | let $l = lands | |
686 | 686 | let $s = size($l) | |
687 | 687 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
688 | 688 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
689 | 689 | then $a | |
690 | 690 | else oneLand($a, $l[$i]) | |
691 | 691 | ||
692 | 692 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
693 | 693 | then $a | |
694 | 694 | else throw("List size exceeds 100") | |
695 | 695 | ||
696 | 696 | $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($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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
697 | 697 | } | |
698 | 698 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
699 | 699 | if ((finalize == finalize)) | |
700 | 700 | then { | |
701 | 701 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
702 | 702 | if ((req == req)) | |
703 | 703 | then { | |
704 | 704 | let $t01833218470 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller) | |
705 | 705 | let nftActions = $t01833218470._1 | |
706 | 706 | let nftAssetId = $t01833218470._2 | |
707 | 707 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
708 | 708 | } | |
709 | 709 | else throw("Strict value is not equal to itself.") | |
710 | 710 | } | |
711 | 711 | else throw("Strict value is not equal to itself.") | |
712 | 712 | } | |
713 | 713 | else $Tuple5(0, 0, 0, 0, nil) | |
714 | 714 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
715 | 715 | let duckResult = if ((duckAssetId != "")) | |
716 | 716 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
717 | 717 | else $Tuple3(0, 0, 0) | |
718 | 718 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
719 | 719 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
720 | 720 | } | |
721 | 721 | } | |
722 | 722 | ||
723 | 723 | ||
724 | 724 | ||
725 | 725 | @Callable(i) | |
726 | 726 | func unstakeLandsREADONLY (address) = { | |
727 | 727 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
728 | 728 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
729 | 729 | let landsResult = if (isDefined(landsStr)) | |
730 | 730 | then { | |
731 | 731 | let lands = split_51C(value(landsStr), "_") | |
732 | 732 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
733 | 733 | then throw("landAssetId is required") | |
734 | 734 | else { | |
735 | 735 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
736 | 736 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
737 | 737 | } | |
738 | 738 | ||
739 | 739 | let $l = lands | |
740 | 740 | let $s = size($l) | |
741 | 741 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
742 | 742 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
743 | 743 | then $a | |
744 | 744 | else oneLand($a, $l[$i]) | |
745 | 745 | ||
746 | 746 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
747 | 747 | then $a | |
748 | 748 | else throw("List size exceeds 100") | |
749 | 749 | ||
750 | 750 | $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($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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
751 | 751 | } | |
752 | 752 | else $Tuple4(0, 0, 0, 0) | |
753 | 753 | $Tuple2(nil, landsResult) | |
754 | 754 | } | |
755 | 755 | ||
756 | 756 | ||
757 | 757 | ||
758 | 758 | @Callable(i) | |
759 | 759 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
760 | 760 | then throw("Permission denied") | |
761 | 761 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
762 | 762 | ||
763 | 763 | ||
764 | 764 | ||
765 | 765 | @Callable(i) | |
766 | 766 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
767 | 767 | let amountKey = keyAcresStakedAmtByUser(address) | |
768 | 768 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
769 | 769 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
770 | 770 | let userFpKey = keyFarmingPowerByUser(address) | |
771 | 771 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
772 | 772 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
773 | 773 | let $t02063520722 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
774 | 774 | let newBonusedFp = $t02063520722._1 | |
775 | 775 | let ignored = $t02063520722._2 | |
776 | 776 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
777 | 777 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
778 | 778 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
779 | 779 | } | |
780 | 780 | ||
781 | 781 | ||
782 | 782 | ||
783 | 783 | @Callable(i) | |
784 | 784 | func issuePickC1 (forAddress) = if ((i.caller != wlgContract)) | |
785 | 785 | then throw("Permission denied") | |
786 | 786 | else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
787 | 787 | ||
788 | 788 | ||
789 | 789 | ||
790 | 790 | @Callable(i) | |
791 | 791 | func stakeNFT () = { | |
792 | 792 | let prologActions = prolog(i) | |
793 | 793 | if ((size(i.payments) != 1)) | |
794 | 794 | then throw("Exactly one payment required") | |
795 | 795 | else { | |
796 | 796 | let pmt = value(i.payments[0]) | |
797 | 797 | if ((pmt.amount != 1)) | |
798 | 798 | then throw("NFT token should be attached as payment") | |
799 | 799 | else { | |
800 | 800 | let assetId = value(pmt.assetId) | |
801 | 801 | let asset = value(assetInfo(assetId)) | |
802 | 802 | let assetIdStr = toBase58String(assetId) | |
803 | 803 | let addr = toString(i.caller) | |
804 | 804 | let nftsKey = keyStakedNFTsByOwner(addr) | |
805 | 805 | let nftsStr = getString(nftsKey) | |
806 | 806 | let nfts = if (isDefined(nftsStr)) | |
807 | 807 | then split_4C(value(nftsStr), "_") | |
808 | 808 | else nil | |
809 | 809 | if (containsElement(nfts, assetIdStr)) | |
810 | 810 | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
811 | 811 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
812 | 812 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
813 | 813 | else { | |
814 | 814 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
815 | 815 | if ((asset.issuer == this)) | |
816 | 816 | then { | |
817 | 817 | let $t02213122321 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
818 | 818 | let actions = $t02213122321._1 | |
819 | 819 | let wlgClaimedAmount = $t02213122321._2 | |
820 | 820 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
821 | 821 | } | |
822 | 822 | else if ((isArkimalIssued(asset) == "")) | |
823 | 823 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
824 | 824 | else { | |
825 | 825 | let $t02250222653 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
826 | 826 | let actions = $t02250222653._1 | |
827 | 827 | let wlgClaimedAmount = $t02250222653._2 | |
828 | 828 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
829 | 829 | } | |
830 | 830 | } | |
831 | 831 | } | |
832 | 832 | } | |
833 | 833 | } | |
834 | 834 | ||
835 | 835 | ||
836 | 836 | ||
837 | 837 | @Callable(i) | |
838 | 838 | func unstakeNFT (assetIdStr) = { | |
839 | 839 | let prologActions = prolog(i) | |
840 | 840 | if ((size(i.payments) != 0)) | |
841 | 841 | then throw("No payments required") | |
842 | 842 | else { | |
843 | 843 | let assetId = fromBase58String(assetIdStr) | |
844 | 844 | let addr = toString(i.caller) | |
845 | 845 | let asset = value(assetInfo(assetId)) | |
846 | 846 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
847 | 847 | if (!(isDefined(getInteger(timeKey)))) | |
848 | 848 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
849 | 849 | else { | |
850 | 850 | let nftsKey = keyStakedNFTsByOwner(addr) | |
851 | 851 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
852 | 852 | let idx = indexOf(nfts, assetIdStr) | |
853 | 853 | if (!(isDefined(idx))) | |
854 | 854 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
855 | 855 | else { | |
856 | 856 | let listAction = if ((size(nfts) > 1)) | |
857 | 857 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
858 | 858 | else DeleteEntry(nftsKey) | |
859 | 859 | let isWL = (asset.issuer == this) | |
860 | 860 | if (isWL) | |
861 | 861 | then { | |
862 | 862 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
863 | 863 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
864 | 864 | let $t02381823897 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
865 | 865 | let actions = $t02381823897._1 | |
866 | 866 | let wlgClaimedAmount = $t02381823897._2 | |
867 | 867 | $Tuple2(((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ IntegerEntry(keyWlNftTotalStaked, max([0, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) - 1)]))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
868 | 868 | } | |
869 | 869 | else { | |
870 | 870 | let arkimalName = isArkimalIssued(asset) | |
871 | 871 | if ((arkimalName == "")) | |
872 | 872 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
873 | 873 | else { | |
874 | 874 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
875 | 875 | let $t02455724641 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
876 | 876 | let actions = $t02455724641._1 | |
877 | 877 | let wlgClaimedAmount = $t02455724641._2 | |
878 | 878 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
879 | 879 | } | |
880 | 880 | } | |
881 | 881 | } | |
882 | 882 | } | |
883 | 883 | } | |
884 | 884 | } | |
885 | 885 | ||
886 | 886 | ||
887 | 887 | ||
888 | 888 | @Callable(i) | |
889 | 889 | func exchangeNFTs () = { | |
890 | 890 | let prologActions = prolog(i) | |
891 | 891 | if ((3 > size(i.payments))) | |
892 | 892 | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
893 | 893 | else if ((size(i.payments) > 6)) | |
894 | 894 | then throw("Max one WLGOLD and 5 NFT payments allowed") | |
895 | 895 | else { | |
896 | 896 | let addr = toString(i.caller) | |
897 | 897 | func addUp (acc,pmt) = { | |
898 | 898 | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
899 | 899 | if ((assetId == wlgAssetId)) | |
900 | 900 | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
901 | 901 | else { | |
902 | 902 | let asset = value(assetInfo(assetId)) | |
903 | 903 | if ((asset.issuer != this)) | |
904 | 904 | then throw("Only WL-issued NFTs allowed") | |
905 | 905 | else { | |
906 | 906 | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
907 | 907 | if (if ((acc._4 > 0)) | |
908 | 908 | then (rarityIx != acc._4) | |
909 | 909 | else false) | |
910 | 910 | then throw("You can exchange only NFTs of the same rarity") | |
911 | 911 | else { | |
912 | 912 | let bonusPerc = bonusByDescription(value(asset.description)) | |
913 | 913 | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
914 | 914 | } | |
915 | 915 | } | |
916 | 916 | } | |
917 | 917 | } | |
918 | 918 | ||
919 | 919 | let $t02603026245 = { | |
920 | 920 | let $l = i.payments | |
921 | 921 | let $s = size($l) | |
922 | 922 | let $acc0 = $Tuple4(0, 0, nil, -1) | |
923 | 923 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
924 | 924 | then $a | |
925 | 925 | else addUp($a, $l[$i]) | |
926 | 926 | ||
927 | 927 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
928 | 928 | then $a | |
929 | 929 | else throw("List size exceeds 6") | |
930 | 930 | ||
931 | 931 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
932 | 932 | } | |
933 | 933 | let wlgFee = $t02603026245._1 | |
934 | 934 | let totalBonus = $t02603026245._2 | |
935 | 935 | let burnActions = $t02603026245._3 | |
936 | 936 | let rarityIdx = $t02603026245._4 | |
937 | 937 | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
938 | 938 | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
939 | 939 | then idxRarityC | |
940 | 940 | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
941 | 941 | then idxRarityU | |
942 | 942 | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
943 | 943 | else if ((rarityIdx == idxRarityU)) | |
944 | 944 | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
945 | 945 | then idxRarityU | |
946 | 946 | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
947 | 947 | then idxRarityL | |
948 | 948 | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
949 | 949 | else if ((rarityIdx == idxRarityL)) | |
950 | 950 | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
951 | 951 | then idxRarityL | |
952 | 952 | else idxRarityE | |
953 | 953 | else if ((rarityIdx == idxRarityE)) | |
954 | 954 | then idxRarityE | |
955 | 955 | else if ((rarityIdx == idxRarityP)) | |
956 | 956 | then throw("You can't exchange NFTs of this rarity") | |
957 | 957 | else throw("Unknown rarity") | |
958 | - | let minWlgFee = fraction(totalBonus, | |
958 | + | let minWlgFee = fraction(totalBonus, MULT6, getWlgPrice(0)) | |
959 | 959 | let change = (wlgFee - minWlgFee) | |
960 | 960 | let forTeam = (minWlgFee / 2) | |
961 | 961 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
962 | 962 | if ((0 > change)) | |
963 | 963 | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
964 | 964 | else { | |
965 | 965 | let changeActions = if ((change > 0)) | |
966 | 966 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
967 | 967 | else nil | |
968 | - | let $ | |
969 | - | let issueNftActions = $ | |
970 | - | let nftAssetId = $ | |
968 | + | let $t02778127942 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
969 | + | let issueNftActions = $t02778127942._1 | |
970 | + | let nftAssetId = $t02778127942._2 | |
971 | 971 | let burned = size(burnActions) | |
972 | 972 | let burnCounterActions = if ((burned == 0)) | |
973 | 973 | then nil | |
974 | 974 | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
975 | 975 | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
976 | 976 | } | |
977 | 977 | } | |
978 | 978 | } | |
979 | 979 | ||
980 | 980 | ||
981 | 981 | ||
982 | 982 | @Callable(i) | |
983 | 983 | func openNftChest () = if ((i.caller != this)) | |
984 | 984 | then throw("Permission denied") | |
985 | 985 | else $Tuple2(nil, 0) | |
986 | 986 | ||
987 | 987 |
github/deemru/w8io/026f985 121.31 ms ◑