tx · BPmq2smDgemLBYyCjRFMiS7BBakxr9roAduCoumrGnuV

3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh:  -0.02900000 Waves

2024.11.29 20:45 [3393033] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves

{ "type": 13, "id": "BPmq2smDgemLBYyCjRFMiS7BBakxr9roAduCoumrGnuV", "fee": 2900000, "feeAssetId": null, "timestamp": 1732902395381, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "5Fk6QeqYVWkSG2WBCoqffWED3hPnbEwDXnrrKVaTY6kFyn97UxT1ekvL8rKQLJ1rVaXmQkeQ1AKNg43AbFrWx1iy" ], "script": "base64:BgJHCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIDCgEIEgASAwoBCBIAEgB2AANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ3AICt4gQABU1VTFQ4AIDC1y8ACkRBWV9NSUxMSVMAgLiZKQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoAE09ORV9QRVJDRU5UX0RJVklTT1IAZAAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC1dFRUtfQkxPQ0tTBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAOBOAwkAAAIBAVQFByRtYXRjaDAAtAEJAAIBAg1Vbmtub3duIGNoYWluAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub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ULYnVybkFjdGlvbnMFEmJ1cm5Db3VudGVyQWN0aW9ucwUNcHJvbG9nQWN0aW9ucwUNY2hhbmdlQWN0aW9ucwkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBEUBleHRyTmF0aXZlKDEwNTMpAgULd2xnQ29udHJhY3QFC3RlYW1BZGRyS2V5BQdmb3JUZWFtBQp3bGdBc3NldElkCQCUCgIFCm5mdEFzc2V0SWQFCXdsZ1JlbWFpbgFpAQxvcGVuTmZ0Q2hlc3QAAwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIRUGVybWlzc2lvbiBkZW5pZWQJAJQKAgUDbmlsAAAAzSKPCg==", "height": 3393033, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BmBgAqaGJ7Qbyxex4qya2KRicGSDoRUa3snWTH9ht4NK Next: GTrSpgmsDcgs3Yz7WkLKXEyUAZtnguqUei7puENiVaj4 Diff:
OldNewDifferences
886886
887887
888888 @Callable(i)
889-func exchangeNFTs () = if ((i.caller != this))
890- then throw("Temporarily disabled")
891- else {
892- let prologActions = prolog(i)
893- if ((3 > size(i.payments)))
894- then throw("Min one WLGOLD and 2 NFT payments allowed")
895- else if ((size(i.payments) > 6))
896- then throw("Max one WLGOLD and 5 NFT payments allowed")
897- else {
898- let addr = toString(i.caller)
899- func addUp (acc,pmt) = {
900- let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed")
901- if ((assetId == wlgAssetId))
902- then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3)
903- else {
904- let asset = value(assetInfo(assetId))
905- if ((asset.issuer != this))
906- then throw("Only WL-issued NFTs allowed")
907- else {
908- let rarityIx = rarityIdxByDescriprion(value(asset.description))
909- if (if ((acc._4 > 0))
910- then (rarityIx != acc._4)
911- else false)
912- then throw("You can exchange only NFTs of the same rarity")
913- else {
914- let bonusPerc = bonusByDescription(value(asset.description))
915- $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx)
916- }
917- }
918- }
919- }
920-
921- let $t02616926384 = {
922- let $l = i.payments
923- let $s = size($l)
924- let $acc0 = $Tuple4(0, 0, nil, -1)
925- func $f0_1 ($a,$i) = if (($i >= $s))
926- then $a
927- else addUp($a, $l[$i])
928-
929- func $f0_2 ($a,$i) = if (($i >= $s))
930- then $a
931- else throw("List size exceeds 6")
932-
933- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
934- }
935- let wlgFee = $t02616926384._1
936- let totalBonus = $t02616926384._2
937- let burnActions = $t02616926384._3
938- let rarityIdx = $t02616926384._4
939- let newRarityIdx = if ((rarityIdx == idxRarityC))
940- then if ((rarityThresholds[idxThresholdC] > totalBonus))
941- then idxRarityC
942- else if ((rarityThresholds[idxThresholdU] > totalBonus))
943- then idxRarityU
944- else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%"))
945- else if ((rarityIdx == idxRarityU))
946- then if ((rarityThresholds[idxThresholdU] > totalBonus))
947- then idxRarityU
948- else if ((rarityThresholds[idxThresholdL] > totalBonus))
949- then idxRarityL
950- else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%"))
951- else if ((rarityIdx == idxRarityL))
952- then if ((rarityThresholds[idxThresholdL] > totalBonus))
953- then idxRarityL
954- else idxRarityE
955- else if ((rarityIdx == idxRarityE))
956- then idxRarityE
957- else if ((rarityIdx == idxRarityP))
958- then throw("You can't exchange NFTs of this rarity")
959- else throw("Unknown rarity")
960- let minWlgFee = fraction(totalBonus, 100, getWlgPrice(0))
961- let change = (wlgFee - minWlgFee)
962- let forTeam = (minWlgFee / 2)
963- let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
964- if ((0 > change))
965- then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
889+func exchangeNFTs () = {
890+ let prologActions = prolog(i)
891+ if ((3 > size(i.payments)))
892+ then throw("Min one WLGOLD and 2 NFT payments allowed")
893+ else if ((size(i.payments) > 6))
894+ then throw("Max one WLGOLD and 5 NFT payments allowed")
895+ else {
896+ let addr = toString(i.caller)
897+ func addUp (acc,pmt) = {
898+ let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed")
899+ if ((assetId == wlgAssetId))
900+ then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3)
966901 else {
967- let changeActions = if ((change > 0))
968- then [ScriptTransfer(i.caller, change, wlgAssetId)]
969- else nil
970- let $t02791828079 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
971- let issueNftActions = $t02791828079._1
972- let nftAssetId = $t02791828079._2
973- let burned = size(burnActions)
974- let burnCounterActions = if ((burned == 0))
975- then nil
976- else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))]
977- $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain))
902+ let asset = value(assetInfo(assetId))
903+ if ((asset.issuer != this))
904+ then throw("Only WL-issued NFTs allowed")
905+ else {
906+ let rarityIx = rarityIdxByDescriprion(value(asset.description))
907+ if (if ((acc._4 > 0))
908+ then (rarityIx != acc._4)
909+ else false)
910+ then throw("You can exchange only NFTs of the same rarity")
911+ else {
912+ let bonusPerc = bonusByDescription(value(asset.description))
913+ $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx)
914+ }
915+ }
978916 }
979917 }
980- }
918+
919+ let $t02602226237 = {
920+ let $l = i.payments
921+ let $s = size($l)
922+ let $acc0 = $Tuple4(0, 0, nil, -1)
923+ func $f0_1 ($a,$i) = if (($i >= $s))
924+ then $a
925+ else addUp($a, $l[$i])
926+
927+ func $f0_2 ($a,$i) = if (($i >= $s))
928+ then $a
929+ else throw("List size exceeds 6")
930+
931+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
932+ }
933+ let wlgFee = $t02602226237._1
934+ let totalBonus = $t02602226237._2
935+ let burnActions = $t02602226237._3
936+ let rarityIdx = $t02602226237._4
937+ let newRarityIdx = if ((rarityIdx == idxRarityC))
938+ then if ((rarityThresholds[idxThresholdC] > totalBonus))
939+ then idxRarityC
940+ else if ((rarityThresholds[idxThresholdU] > totalBonus))
941+ then idxRarityU
942+ else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%"))
943+ else if ((rarityIdx == idxRarityU))
944+ then if ((rarityThresholds[idxThresholdU] > totalBonus))
945+ then idxRarityU
946+ else if ((rarityThresholds[idxThresholdL] > totalBonus))
947+ then idxRarityL
948+ else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%"))
949+ else if ((rarityIdx == idxRarityL))
950+ then if ((rarityThresholds[idxThresholdL] > totalBonus))
951+ then idxRarityL
952+ else idxRarityE
953+ else if ((rarityIdx == idxRarityE))
954+ then idxRarityE
955+ else if ((rarityIdx == idxRarityP))
956+ then throw("You can't exchange NFTs of this rarity")
957+ else throw("Unknown rarity")
958+ let minWlgFee = fraction(totalBonus, 100, getWlgPrice(0))
959+ let change = (wlgFee - minWlgFee)
960+ let forTeam = (minWlgFee / 2)
961+ let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
962+ if ((0 > change))
963+ then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
964+ else {
965+ let changeActions = if ((change > 0))
966+ then [ScriptTransfer(i.caller, change, wlgAssetId)]
967+ else nil
968+ let $t02777127932 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
969+ let issueNftActions = $t02777127932._1
970+ let nftAssetId = $t02777127932._2
971+ let burned = size(burnActions)
972+ let burnCounterActions = if ((burned == 0))
973+ then nil
974+ else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))]
975+ $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain))
976+ }
977+ }
978+ }
981979
982980
983981
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT7 = 10000000
99
1010 let MULT8 = 100000000
1111
1212 let DAY_MILLIS = 86400000
1313
1414 let USDT2ACRES_MULTIPLIER = 10
1515
1616 let ONE_PERCENT_DIVISOR = 100
1717
1818 let chain = take(drop(this.bytes, 1), 1)
1919
2020 let WEEK_BLOCKS = match chain {
2121 case _ =>
2222 if ((base58'2W' == $match0))
2323 then 10080
2424 else if ((base58'2T' == $match0))
2525 then 180
2626 else throw("Unknown chain")
2727 }
2828
2929 let usdtAssetId = match chain {
3030 case _ =>
3131 if ((base58'2W' == $match0))
3232 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
3333 else if ((base58'2T' == $match0))
3434 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
3535 else throw("Unknown chain")
3636 }
3737
3838 let defaultRest2AddressStr = match chain {
3939 case _ =>
4040 if ((base58'2W' == $match0))
4141 then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
4242 else if ((base58'2T' == $match0))
4343 then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
4444 else throw("Unknown chain")
4545 }
4646
4747 let arbitrageDelay = match chain {
4848 case _ =>
4949 if ((base58'2W' == $match0))
5050 then DAY_MILLIS
5151 else if ((base58'2T' == $match0))
5252 then 60000
5353 else throw("Unknown chain")
5454 }
5555
5656 let oldStakingContractStr = match chain {
5757 case _ =>
5858 if ((base58'2W' == $match0))
5959 then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1"
6060 else if ((base58'2T' == $match0))
6161 then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm"
6262 else throw("Unknown chain")
6363 }
6464
6565 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
6666
6767
6868 let IdxCfgAcres2Dapp = 1
6969
7070 let IdxCfgWlgDapp = 2
7171
7272 let IdxCfgInvestFundDapp = 5
7373
7474 func keyRestCfg () = "%s__restConfig"
7575
7676
7777 func keyRest2Address () = "%s__rest2Addr"
7878
7979
8080 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
8181
8282
8383 func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
8484
8585
8686 let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
8787
8888 let rest2Cfg = readRestCfgOrFail(rest2Contract)
8989
9090 let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp)
9191
9292 let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp)
9393
9494 let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp)
9595
9696 let oldAcresContractKey = "oldAcresContract"
9797
9898 func keyBlocked () = "contractsBlocked"
9999
100100
101101 func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr)
102102
103103
104104 func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr)
105105
106106
107107 let wlgAssetIdKey = "wlg_assetId"
108108
109109 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
110110
111111 let acresIssuedAmountKey = "acresIssuedAmount"
112112
113113 let acresAssetIdKey = "acresAssetId"
114114
115115 let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet")
116116
117117 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
118118
119119
120120 func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr)
121121
122122
123123 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
124124
125125
126126 func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr)
127127
128128
129129 func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr)
130130
131131
132132 func asInt (v) = match v {
133133 case n: Int =>
134134 n
135135 case _ =>
136136 throw("fail to cast into Int")
137137 }
138138
139139
140140 func asTuple5Ints (val) = match val {
141141 case t: (Int, Int, Int, Int, Int) =>
142142 t
143143 case _ =>
144144 throw("fail to cast into (Int, Int, Int, Int, Int)")
145145 }
146146
147147
148148 func asTuple4Ints (val) = match val {
149149 case t: (Int, Int, Int, Int) =>
150150 t
151151 case _ =>
152152 throw("fail to cast into (Int, Int, Int, Int)")
153153 }
154154
155155
156156 func asTuple3Ints (val) = match val {
157157 case t: (Int, Int, Int) =>
158158 t
159159 case _ =>
160160 throw("fail to cast into (Int, Int, Int)")
161161 }
162162
163163
164164 func asTuple2Ints (val) = match val {
165165 case t: (Int, Int) =>
166166 t
167167 case _ =>
168168 throw("fail to cast into (Int, Int)")
169169 }
170170
171171
172172 func fixedPoint (val,decimals) = {
173173 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
174174 let lowPart = toString((val % tenPow))
175175 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
176176 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
177177 }
178178
179179
180180 let M6_ = 1000000
181181
182182 let M8_ = 100000000
183183
184184 let wlgIssuedAmtKey = "wlg_issuedAmount"
185185
186186 let zbIssuedAmtKey = "zbill_issuedAmount"
187187
188188 func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr)
189189
190190
191191 func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr)
192192
193193
194194 let acresStakdTotalKey = "acresStakedAmountTotal"
195195
196196 let totalFarmingPowerKey = "totalFarmingPower"
197197
198198 let MAX_WL_NFTS = 3
199199
200200 let MAX_ARK_NFTS = 1
201201
202202 let ARK_NFT_BONUS = 5000
203203
204204 let MAX_NFTS_STAKED_BY_USER = 4
205205
206206 let keyNftTotalIssued = "nftTotalIssued"
207207
208208 let keyNftTotalBurned = "nftTotalBurned"
209209
210210 let keyWlNftTotalStaked = "WlNftTotalStaked"
211211
212212 let keyArkNftTotalStaked = "ArkNftTotalStaked"
213213
214214 func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId)
215215
216216
217217 func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr)
218218
219219
220220 func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr)
221221
222222
223223 func keyUserFullBonus (addr) = ("userFullBonus_" + addr)
224224
225225
226226 let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000]
227227
228228 func getLevelByAcres (acres) = {
229229 let acr = ((acres + 99999999) / M8_)
230230 func checker (acc,item) = if ((item >= acr))
231231 then acc
232232 else (acc + 1)
233233
234234 let $l = levelAcres
235235 let $s = size($l)
236236 let $acc0 = 0
237237 func $f0_1 ($a,$i) = if (($i >= $s))
238238 then $a
239239 else checker($a, $l[$i])
240240
241241 func $f0_2 ($a,$i) = if (($i >= $s))
242242 then $a
243243 else throw("List size exceeds 10")
244244
245245 $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)
246246 }
247247
248248
249249 func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4))
250250
251251
252252 func getFarmingPowerByAcresAndBonus (acres,bonus6) = {
253253 let notBonused = getFarmingPowerByAcres(acres)
254254 $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused)
255255 }
256256
257257
258258 let teamAddrKey = "teamAddr"
259259
260260 func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr)
261261
262262
263263 let keyLastAcresSellTime = "lastAcresSellTime"
264264
265265 let keyLastLimitLeft = "lastLimitLeft"
266266
267267 let names = ["Gold shovel", "Pickaxe"]
268268
269269 let descriptions = ["Reward for early birds", "Increases FarmPower"]
270270
271271 let idxDescrShovel = 0
272272
273273 let idxDescrPickaxe = 1
274274
275275 let rarityThresholds = [5, 10, 20]
276276
277277 let idxThresholdC = 0
278278
279279 let idxThresholdU = 1
280280
281281 let idxThresholdL = 2
282282
283283 let namez = ["SHOVEL", "PICKAXE"]
284284
285285 let idxNameShovel = 0
286286
287287 let idxNamePickaxe = 1
288288
289289 let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP"]
290290
291291 let idxKeyC = 0
292292
293293 let idxKeyP = 4
294294
295295 let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"]
296296
297297 let idxRarityC = 0
298298
299299 let idxRarityU = 1
300300
301301 let idxRarityL = 2
302302
303303 let idxRarityE = 3
304304
305305 let idxRarityP = 4
306306
307307 let collectionz = ["Digging tools"]
308308
309309 let idxCollDig = 0
310310
311311 let bonusTypez = ["FarmPower"]
312312
313313 let idxBonusTypeFp = 0
314314
315315 func prolog (i) = if (if ((i.originCaller != rest2Contract))
316316 then valueOrElse(getBoolean(keyBlocked()), false)
317317 else false)
318318 then throw("Contracts are under maintenance")
319319 else {
320320 let addr = toString(i.originCaller)
321321 let week = (height / WEEK_BLOCKS)
322322 let lastWeekKey = keyLastWeekTxIdByUser(addr)
323323 let lastWeekTxIdByUser = getString(lastWeekKey)
324324 let txId = toBase58String(i.transactionId)
325325 let wtx = ((toString(week) + "_") + txId)
326326 let curWeekKey = keyCurWeekTxIdByUser(addr)
327327 if (isDefined(lastWeekTxIdByUser))
328328 then {
329329 let lastWeekTx = split(value(lastWeekTxIdByUser), "_")
330330 if ((lastWeekTx[0] == toString(week)))
331331 then [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)]
332332 else if ((lastWeekTx[0] == toString((week - 1))))
333333 then [StringEntry(curWeekKey, wtx)]
334334 else {
335335 let curWeekTxIdByUser = getStringValue(curWeekKey)
336336 let curWeekTx = split(curWeekTxIdByUser, "_")
337337 if ((curWeekTx[0] == toString(week)))
338338 then [StringEntry(curWeekKey, wtx)]
339339 else [StringEntry(lastWeekKey, curWeekTxIdByUser), StringEntry(curWeekKey, wtx)]
340340 }
341341 }
342342 else [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)]
343343 }
344344
345345
346346 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) + "\"}")
347347
348348
349349 func issueNftCustom (nameIdx,contKeyIdx,collIdx,rarityIdx,bonusPerc,descrIdx,bonusTypeIdx,addr) = {
350350 let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0)
351351 let rarity = rarityNames[rarityIdx]
352352 let name = (((namez[nameIdx] + "-") + take(rarity, 1)) + toString(bonusPerc))
353353 let issue = Issue(name, createNftDescrCustom(contentKeyz[contKeyIdx], nftSerial, collectionz[collIdx], names[nameIdx], descriptions[descrIdx], rarityNames[rarityIdx], bonusPerc, bonusTypez[bonusTypeIdx]), 1, 0, false)
354354 let nftAssetId = calculateAssetId(issue)
355355 $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId)
356356 }
357357
358358
359359 func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0))
360360 then (bonusDelta == 0)
361361 else false)
362362 then throw("Nothing to do")
363363 else {
364364 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
365365 if ((wlgResult == wlgResult))
366366 then {
367367 let now = lastBlock.timestamp
368368 let timeKey = keyAcresStakedTimeByUser(address)
369369 let amountKey = keyAcresStakedAmtByUser(address)
370370 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
371371 if (if ((0 > amt))
372372 then (0 > (oldAcresAmount + amt))
373373 else false)
374374 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8)))
375375 else {
376376 let newAcresAmount = (oldAcresAmount + amt)
377377 let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0)
378378 let userFpKey = keyFarmingPowerByUser(address)
379379 let oldFp = valueOrElse(getInteger(userFpKey), 0)
380380 let bonusKey = keyUserFullBonus(address)
381381 let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0)
382382 if (if ((0 > bonusDelta))
383383 then (0 > (oldBonus + bonusDelta))
384384 else false)
385385 then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%"))
386386 else {
387387 let $t068386937 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta))
388388 let newBonusedFp = $t068386937._1
389389 let ignored = $t068386937._2
390390 let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0)
391391 let acresActions = if ((amt == 0))
392392 then nil
393393 else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))]
394394 $Tuple2(((((acresActions :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))) :+ IntegerEntry(bonusKey, (oldBonus + bonusDelta))), wlgResult)
395395 }
396396 }
397397 }
398398 else throw("Strict value is not equal to itself.")
399399 }
400400
401401
402402 func getWlgPrice (usdtBalanceCorrection) = {
403403 let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet")
404404 let wlgUsd = assetBalance(wlgContract, usdtAssetId)
405405 let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection)
406406 let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0))
407407 let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal)
408408 fraction(totalFundsUsd, MULT8, issuedAmount)
409409 }
410410
411411
412412 func getSwapLimitAcres () = {
413413 let wlgUsd = assetBalance(wlgContract, usdtAssetId)
414414 let acres2Usd = assetBalance(this, usdtAssetId)
415415 let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0))
416416 let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR)
417417 let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit)
418418 let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0)
419419 let now = lastBlock.timestamp
420420 let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS))
421421 let limitLeftUsdt = min([currentLimit, defaultLimit])
422422 $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt)
423423 }
424424
425425
426426 let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og")
427427
428428 let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "")
429429
430430 let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "")
431431
432432 let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "")
433433
434434 let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "")
435435
436436 let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "")
437437
438438 let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "")
439439
440440 let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "")
441441
442442 let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "")
443443
444444 let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "")
445445
446446 func isArkimalIssued (nfo) = {
447447 let issuer = toString(nfo.issuer)
448448 if (if (if (if (if (if (if (if (if (if ((chain == base58'2T'))
449449 then (issuer == oldStakingContractStr)
450450 else false)
451451 then true
452452 else (issuer == incubator))
453453 then true
454454 else (issuer == breeder))
455455 then true
456456 else (issuer == turtleIncubator))
457457 then true
458458 else (issuer == turtleBreeder))
459459 then true
460460 else (issuer == canineIncubator))
461461 then true
462462 else (issuer == canineBreeder))
463463 then true
464464 else (issuer == felineIncubator))
465465 then true
466466 else (issuer == felineBreeder))
467467 then nfo.name
468468 else if ((issuer == mutantBreeder))
469469 then nfo.description
470470 else ""
471471 }
472472
473473
474474 func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\"")))
475475 then throw(("NFT is not supported: " + descr))
476476 else {
477477 let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0]
478478 parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1)))
479479 }
480480
481481
482482 func rarityIdxByDescriprion (descr) = if (!(contains(descr, "\"rare\"")))
483483 then throw(("NFT is not supported: " + descr))
484484 else {
485485 let rarityStr = split_4C(split_4C(split_4C(descr, "\"rare\"")[1], ",")[0], "\"")[1]
486486 value(indexOf(rarityNames, rarityStr))
487487 }
488488
489489
490490 func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = {
491491 let nftNumber = valueOrElse(getInteger(userNumKey), 0)
492492 if ((nftNumber >= limit))
493493 then throw((("You can stake max " + toString(limit)) + " of such NFTs"))
494494 else {
495495 let $t01175711833 = stakeUnstakeAcresInternal(0, addr, bonus6)
496496 let actions = $t01175711833._1
497497 let wlgClaimedAmount = $t01175711833._2
498498 $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount)
499499 }
500500 }
501501
502502
503503 @Callable(i)
504504 func saveLastTx () = if (!(containsElement([wlgContract], i.caller)))
505505 then throw("Access denied")
506506 else $Tuple2(prolog(i), 42)
507507
508508
509509
510510 @Callable(i)
511511 func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this))
512512 then throw("Permission denied")
513513 else {
514514 let oldAcrContAddr = addressFromStringValue(oldAcrContract)
515515 [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)]
516516 }
517517
518518
519519
520520 @Callable(i)
521521 func setBlocked (isBlocked) = if ((i.caller != this))
522522 then throw("permission denied")
523523 else [BooleanEntry(keyBlocked(), isBlocked)]
524524
525525
526526
527527 @Callable(i)
528528 func unstakeAcres (amount) = {
529529 let prologActions = prolog(i)
530530 if ((0 >= amount))
531531 then throw("Amount should be positive")
532532 else {
533533 let address = toString(i.caller)
534534 if ((size(i.payments) != 0))
535535 then throw("No payments required")
536536 else {
537537 let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay)
538538 if ((arbReleaseTime > lastBlock.timestamp))
539539 then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime)))
540540 else {
541541 let $t01340713487 = stakeUnstakeAcresInternal(-(amount), address, 0)
542542 let actions = $t01340713487._1
543543 let wlgClaimedAmount = $t01340713487._2
544544 $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount)
545545 }
546546 }
547547 }
548548 }
549549
550550
551551
552552 @Callable(i)
553553 func stakeAcres () = {
554554 let prologActions = prolog(i)
555555 let address = toString(i.caller)
556556 if ((size(i.payments) != 1))
557557 then throw("exactly 1 payment must be attached")
558558 else {
559559 let pmt = i.payments[0]
560560 let amt = pmt.amount
561561 if (if (!(isDefined(pmt.assetId)))
562562 then true
563563 else (value(pmt.assetId) != acresAssetId))
564564 then throw("ACRES payments only!")
565565 else {
566566 let $t01393814014 = stakeUnstakeAcresInternal(amt, address, 0)
567567 let actions = $t01393814014._1
568568 let wlgClaimedAmount = $t01393814014._2
569569 $Tuple2((actions ++ prologActions), wlgClaimedAmount)
570570 }
571571 }
572572 }
573573
574574
575575
576576 @Callable(i)
577577 func buyAcres () = {
578578 let prologActions = prolog(i)
579579 if ((size(i.payments) != 1))
580580 then throw("exactly 1 payment must be attached")
581581 else {
582582 let pmt = i.payments[0]
583583 let usdtAmount = pmt.amount
584584 if (if (!(isDefined(pmt.assetId)))
585585 then true
586586 else (value(pmt.assetId) != usdtAssetId))
587587 then throw("USDT payments only!")
588588 else if ((MULT6 > usdtAmount))
589589 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
590590 else {
591591 let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER)
592592 let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount))
593593 let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey))
594594 let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil)
595595 if ((req == req))
596596 then {
597597 let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil))
598598 $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain)
599599 }
600600 else throw("Strict value is not equal to itself.")
601601 }
602602 }
603603 }
604604
605605
606606
607607 @Callable(i)
608608 func buyAcresREADONLY (usdtAmount) = {
609609 let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER)
610610 let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount))
611611 $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn])
612612 }
613613
614614
615615
616616 @Callable(i)
617617 func sellAcres () = {
618618 let prologActions = prolog(i)
619619 if ((size(i.payments) != 1))
620620 then throw("exactly 1 payment must be attached")
621621 else {
622622 let pmt = i.payments[0]
623623 let acresAmount = pmt.amount
624624 if (if (!(isDefined(pmt.assetId)))
625625 then true
626626 else (value(pmt.assetId) != acresAssetId))
627627 then throw("ACRES payments only!")
628628 else if ((MULT7 > acresAmount))
629629 then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES"))
630630 else {
631631 let addr = toString(i.caller)
632632 let $t01587115919 = getSwapLimitAcres()
633633 let limitAction = $t01587115919._1
634634 let maxUsdt = $t01587115919._2
635635 let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER)
636636 if ((acresAmount > maxAcres))
637637 then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES"))
638638 else {
639639 let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2)
640640 $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount)
641641 }
642642 }
643643 }
644644 }
645645
646646
647647
648648 @Callable(i)
649649 func sellAcresREADONLY (address,acresAmount) = {
650650 let $t01641516463 = getSwapLimitAcres()
651651 let limitAction = $t01641516463._1
652652 let maxUsdt = $t01641516463._2
653653 let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2)
654654 $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0])
655655 }
656656
657657
658658
659659 @Callable(i)
660660 func convertOldStakes () = if ((i.caller != this))
661661 then throw("Temporarily disabled")
662662 else {
663663 let address = toString(i.caller)
664664 if ((size(i.payments) != 0))
665665 then throw("No payments required")
666666 else {
667667 let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey))
668668 let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0)
669669 let gotAcres0 = if ((amount > 0))
670670 then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil))
671671 else $Tuple2(0, 0)
672672 let oldStakingAddress = addressFromStringValue(oldStakingContractStr)
673673 let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address))
674674 let landsResult = if (isDefined(landsStr))
675675 then {
676676 let lands = split_51C(value(landsStr), "_")
677677 func oneLand (acc,landAssetId) = if ((landAssetId == ""))
678678 then throw("landAssetId is required")
679679 else {
680680 let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil))
681681 $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4))
682682 }
683683
684684 let rr = {
685685 let $l = lands
686686 let $s = size($l)
687687 let $acc0 = $Tuple4(0, 0, 0, 0)
688688 func $f0_1 ($a,$i) = if (($i >= $s))
689689 then $a
690690 else oneLand($a, $l[$i])
691691
692692 func $f0_2 ($a,$i) = if (($i >= $s))
693693 then $a
694694 else throw("List size exceeds 100")
695695
696696 $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)
697697 }
698698 let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil)
699699 if ((finalize == finalize))
700700 then {
701701 let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil)
702702 if ((req == req))
703703 then {
704704 let $t01833218470 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller)
705705 let nftActions = $t01833218470._1
706706 let nftAssetId = $t01833218470._2
707707 $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions)
708708 }
709709 else throw("Strict value is not equal to itself.")
710710 }
711711 else throw("Strict value is not equal to itself.")
712712 }
713713 else $Tuple5(0, 0, 0, 0, nil)
714714 let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "")
715715 let duckResult = if ((duckAssetId != ""))
716716 then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil))
717717 else $Tuple3(0, 0, 0)
718718 let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0)
719719 $Tuple2((landsResult._5 ++ x._1), x._2)
720720 }
721721 }
722722
723723
724724
725725 @Callable(i)
726726 func unstakeLandsREADONLY (address) = {
727727 let oldStakingAddress = addressFromStringValue(oldStakingContractStr)
728728 let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address))
729729 let landsResult = if (isDefined(landsStr))
730730 then {
731731 let lands = split_51C(value(landsStr), "_")
732732 func oneLand (acc,landAssetId) = if ((landAssetId == ""))
733733 then throw("landAssetId is required")
734734 else {
735735 let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil))
736736 $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4))
737737 }
738738
739739 let $l = lands
740740 let $s = size($l)
741741 let $acc0 = $Tuple4(0, 0, 0, 0)
742742 func $f0_1 ($a,$i) = if (($i >= $s))
743743 then $a
744744 else oneLand($a, $l[$i])
745745
746746 func $f0_2 ($a,$i) = if (($i >= $s))
747747 then $a
748748 else throw("List size exceeds 100")
749749
750750 $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)
751751 }
752752 else $Tuple4(0, 0, 0, 0)
753753 $Tuple2(nil, landsResult)
754754 }
755755
756756
757757
758758 @Callable(i)
759759 func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr)))
760760 then throw("Permission denied")
761761 else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0)
762762
763763
764764
765765 @Callable(i)
766766 func simulateStakeAcresREADONLY (address,addedAmount) = {
767767 let amountKey = keyAcresStakedAmtByUser(address)
768768 let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount)
769769 let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0)
770770 let userFpKey = keyFarmingPowerByUser(address)
771771 let oldFp = valueOrElse(getInteger(userFpKey), 0)
772772 let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0)
773773 let $t02063520722 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus)
774774 let newBonusedFp = $t02063520722._1
775775 let ignored = $t02063520722._2
776776 let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0)
777777 let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp)
778778 $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp])
779779 }
780780
781781
782782
783783 @Callable(i)
784784 func issuePickC1 (forAddress) = if ((i.caller != wlgContract))
785785 then throw("Permission denied")
786786 else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress))
787787
788788
789789
790790 @Callable(i)
791791 func stakeNFT () = {
792792 let prologActions = prolog(i)
793793 if ((size(i.payments) != 1))
794794 then throw("Exactly one payment required")
795795 else {
796796 let pmt = value(i.payments[0])
797797 if ((pmt.amount != 1))
798798 then throw("NFT token should be attached as payment")
799799 else {
800800 let assetId = value(pmt.assetId)
801801 let asset = value(assetInfo(assetId))
802802 let assetIdStr = toBase58String(assetId)
803803 let addr = toString(i.caller)
804804 let nftsKey = keyStakedNFTsByOwner(addr)
805805 let nftsStr = getString(nftsKey)
806806 let nfts = if (isDefined(nftsStr))
807807 then split_4C(value(nftsStr), "_")
808808 else nil
809809 if (containsElement(nfts, assetIdStr))
810810 then throw(("Your staked NFTs already contain " + assetIdStr))
811811 else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER))
812812 then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs"))
813813 else {
814814 let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_"))
815815 if ((asset.issuer == this))
816816 then {
817817 let $t02213122321 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS)
818818 let actions = $t02213122321._1
819819 let wlgClaimedAmount = $t02213122321._2
820820 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
821821 }
822822 else if ((isArkimalIssued(asset) == ""))
823823 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
824824 else {
825825 let $t02250222653 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS)
826826 let actions = $t02250222653._1
827827 let wlgClaimedAmount = $t02250222653._2
828828 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
829829 }
830830 }
831831 }
832832 }
833833 }
834834
835835
836836
837837 @Callable(i)
838838 func unstakeNFT (assetIdStr) = {
839839 let prologActions = prolog(i)
840840 if ((size(i.payments) != 0))
841841 then throw("No payments required")
842842 else {
843843 let assetId = fromBase58String(assetIdStr)
844844 let addr = toString(i.caller)
845845 let asset = value(assetInfo(assetId))
846846 let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr)
847847 if (!(isDefined(getInteger(timeKey))))
848848 then throw((("NFT " + asset.name) + " is not staked by you"))
849849 else {
850850 let nftsKey = keyStakedNFTsByOwner(addr)
851851 let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_")
852852 let idx = indexOf(nfts, assetIdStr)
853853 if (!(isDefined(idx)))
854854 then throw(("Your staked NFTs don't contain " + assetIdStr))
855855 else {
856856 let listAction = if ((size(nfts) > 1))
857857 then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_"))
858858 else DeleteEntry(nftsKey)
859859 let isWL = (asset.issuer == this)
860860 if (isWL)
861861 then {
862862 let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0)
863863 let bonusVal = (bonusByDescription(value(asset.description)) * 10000)
864864 let $t02381823897 = stakeUnstakeAcresInternal(0, addr, -(bonusVal))
865865 let actions = $t02381823897._1
866866 let wlgClaimedAmount = $t02381823897._2
867867 $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)
868868 }
869869 else {
870870 let arkimalName = isArkimalIssued(asset)
871871 if ((arkimalName == ""))
872872 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
873873 else {
874874 let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0)
875875 let $t02455724641 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS))
876876 let actions = $t02455724641._1
877877 let wlgClaimedAmount = $t02455724641._2
878878 $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount)
879879 }
880880 }
881881 }
882882 }
883883 }
884884 }
885885
886886
887887
888888 @Callable(i)
889-func exchangeNFTs () = if ((i.caller != this))
890- then throw("Temporarily disabled")
891- else {
892- let prologActions = prolog(i)
893- if ((3 > size(i.payments)))
894- then throw("Min one WLGOLD and 2 NFT payments allowed")
895- else if ((size(i.payments) > 6))
896- then throw("Max one WLGOLD and 5 NFT payments allowed")
897- else {
898- let addr = toString(i.caller)
899- func addUp (acc,pmt) = {
900- let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed")
901- if ((assetId == wlgAssetId))
902- then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3)
903- else {
904- let asset = value(assetInfo(assetId))
905- if ((asset.issuer != this))
906- then throw("Only WL-issued NFTs allowed")
907- else {
908- let rarityIx = rarityIdxByDescriprion(value(asset.description))
909- if (if ((acc._4 > 0))
910- then (rarityIx != acc._4)
911- else false)
912- then throw("You can exchange only NFTs of the same rarity")
913- else {
914- let bonusPerc = bonusByDescription(value(asset.description))
915- $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx)
916- }
917- }
918- }
919- }
920-
921- let $t02616926384 = {
922- let $l = i.payments
923- let $s = size($l)
924- let $acc0 = $Tuple4(0, 0, nil, -1)
925- func $f0_1 ($a,$i) = if (($i >= $s))
926- then $a
927- else addUp($a, $l[$i])
928-
929- func $f0_2 ($a,$i) = if (($i >= $s))
930- then $a
931- else throw("List size exceeds 6")
932-
933- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
934- }
935- let wlgFee = $t02616926384._1
936- let totalBonus = $t02616926384._2
937- let burnActions = $t02616926384._3
938- let rarityIdx = $t02616926384._4
939- let newRarityIdx = if ((rarityIdx == idxRarityC))
940- then if ((rarityThresholds[idxThresholdC] > totalBonus))
941- then idxRarityC
942- else if ((rarityThresholds[idxThresholdU] > totalBonus))
943- then idxRarityU
944- else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%"))
945- else if ((rarityIdx == idxRarityU))
946- then if ((rarityThresholds[idxThresholdU] > totalBonus))
947- then idxRarityU
948- else if ((rarityThresholds[idxThresholdL] > totalBonus))
949- then idxRarityL
950- else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%"))
951- else if ((rarityIdx == idxRarityL))
952- then if ((rarityThresholds[idxThresholdL] > totalBonus))
953- then idxRarityL
954- else idxRarityE
955- else if ((rarityIdx == idxRarityE))
956- then idxRarityE
957- else if ((rarityIdx == idxRarityP))
958- then throw("You can't exchange NFTs of this rarity")
959- else throw("Unknown rarity")
960- let minWlgFee = fraction(totalBonus, 100, getWlgPrice(0))
961- let change = (wlgFee - minWlgFee)
962- let forTeam = (minWlgFee / 2)
963- let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
964- if ((0 > change))
965- then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
889+func exchangeNFTs () = {
890+ let prologActions = prolog(i)
891+ if ((3 > size(i.payments)))
892+ then throw("Min one WLGOLD and 2 NFT payments allowed")
893+ else if ((size(i.payments) > 6))
894+ then throw("Max one WLGOLD and 5 NFT payments allowed")
895+ else {
896+ let addr = toString(i.caller)
897+ func addUp (acc,pmt) = {
898+ let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed")
899+ if ((assetId == wlgAssetId))
900+ then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3)
966901 else {
967- let changeActions = if ((change > 0))
968- then [ScriptTransfer(i.caller, change, wlgAssetId)]
969- else nil
970- let $t02791828079 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
971- let issueNftActions = $t02791828079._1
972- let nftAssetId = $t02791828079._2
973- let burned = size(burnActions)
974- let burnCounterActions = if ((burned == 0))
975- then nil
976- else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))]
977- $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain))
902+ let asset = value(assetInfo(assetId))
903+ if ((asset.issuer != this))
904+ then throw("Only WL-issued NFTs allowed")
905+ else {
906+ let rarityIx = rarityIdxByDescriprion(value(asset.description))
907+ if (if ((acc._4 > 0))
908+ then (rarityIx != acc._4)
909+ else false)
910+ then throw("You can exchange only NFTs of the same rarity")
911+ else {
912+ let bonusPerc = bonusByDescription(value(asset.description))
913+ $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx)
914+ }
915+ }
978916 }
979917 }
980- }
918+
919+ let $t02602226237 = {
920+ let $l = i.payments
921+ let $s = size($l)
922+ let $acc0 = $Tuple4(0, 0, nil, -1)
923+ func $f0_1 ($a,$i) = if (($i >= $s))
924+ then $a
925+ else addUp($a, $l[$i])
926+
927+ func $f0_2 ($a,$i) = if (($i >= $s))
928+ then $a
929+ else throw("List size exceeds 6")
930+
931+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
932+ }
933+ let wlgFee = $t02602226237._1
934+ let totalBonus = $t02602226237._2
935+ let burnActions = $t02602226237._3
936+ let rarityIdx = $t02602226237._4
937+ let newRarityIdx = if ((rarityIdx == idxRarityC))
938+ then if ((rarityThresholds[idxThresholdC] > totalBonus))
939+ then idxRarityC
940+ else if ((rarityThresholds[idxThresholdU] > totalBonus))
941+ then idxRarityU
942+ else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%"))
943+ else if ((rarityIdx == idxRarityU))
944+ then if ((rarityThresholds[idxThresholdU] > totalBonus))
945+ then idxRarityU
946+ else if ((rarityThresholds[idxThresholdL] > totalBonus))
947+ then idxRarityL
948+ else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%"))
949+ else if ((rarityIdx == idxRarityL))
950+ then if ((rarityThresholds[idxThresholdL] > totalBonus))
951+ then idxRarityL
952+ else idxRarityE
953+ else if ((rarityIdx == idxRarityE))
954+ then idxRarityE
955+ else if ((rarityIdx == idxRarityP))
956+ then throw("You can't exchange NFTs of this rarity")
957+ else throw("Unknown rarity")
958+ let minWlgFee = fraction(totalBonus, 100, getWlgPrice(0))
959+ let change = (wlgFee - minWlgFee)
960+ let forTeam = (minWlgFee / 2)
961+ let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
962+ if ((0 > change))
963+ then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
964+ else {
965+ let changeActions = if ((change > 0))
966+ then [ScriptTransfer(i.caller, change, wlgAssetId)]
967+ else nil
968+ let $t02777127932 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
969+ let issueNftActions = $t02777127932._1
970+ let nftAssetId = $t02777127932._2
971+ let burned = size(burnActions)
972+ let burnCounterActions = if ((burned == 0))
973+ then nil
974+ else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))]
975+ $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain))
976+ }
977+ }
978+ }
981979
982980
983981
984982 @Callable(i)
985983 func openNftChest () = if ((i.caller != this))
986984 then throw("Permission denied")
987985 else $Tuple2(nil, 0)
988986
989987

github/deemru/w8io/026f985 
79.87 ms