tx · FkuouCruxf26S6783WN9HtAwaEcUXm26w4tpTzigbPrD 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.02800000 Waves 2024.11.28 21:26 [3391644] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "FkuouCruxf26S6783WN9HtAwaEcUXm26w4tpTzigbPrD", "fee": 2800000, "feeAssetId": null, "timestamp": 1732818376730, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "imauMqPzTWKcG6ME6FtvjAVkdHTuof8yjGnJ47QuD66PH3J8K2sRSpVjER5aSr3nSax8eFd6Z2Tq3S6oTHKn6HE" ], "script": "base64:BgJPCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIECgIIARIFCgMIAQESABIDCgEIEgASAGEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALV0VFS19CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAA4E4DCQAAAgEBVAUHJG1hdGNoMAC0AQkAAgECDVVua25vd24gY2hhaW4AC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFmRlZmF1bHR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I0NjUyAl8xBApuZnRBc3NldElkCAUNJHQwMjQ1ODAyNDY1MgJfMgQGYnVybmVkCQCQAwEFC2J1cm5BY3Rpb25zBBJidXJuQ291bnRlckFjdGlvbnMDCQAAAgUGYnVybmVkAAAFA25pbAkAzAgCCQEMSW50ZWdlckVudHJ5AgURa2V5TmZ0VG90YWxCdXJuZWQJAGQCCQELdmFsdWVPckVsc2UCCQCfCAEFEWtleU5mdFRvdGFsQnVybmVkAAAFBmJ1cm5lZAUDbmlsCQCUCgIJAM4IAgkAzggCCQDOCAIJAM4IAgUPaXNzdWVOZnRBY3Rpb25zBQtidXJuQWN0aW9ucwUSYnVybkNvdW50ZXJBY3Rpb25zBQ1wcm9sb2dBY3Rpb25zBQ1jaGFuZ2VBY3Rpb25zBQpuZnRBc3NldElkAWkBDG9wZW5OZnRDaGVzdAADCQECIT0CCAUBaQZjYWxsZXIFBHRoaXMJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAkAlAoCBQNuaWwAAADZx2S5", "height": 3391644, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DhrsDEdURfpBtFMsR4xdekhPVbQWSDftaEeZzrEYwVbC Next: CMpXSrPGqpkQoKJdzK7MYiNCSt36qmxUuv5ZZ1SRskHE Diff:
Old | New | Differences | |
---|---|---|---|
849 | 849 | ||
850 | 850 | ||
851 | 851 | @Callable(i) | |
852 | - | func exchangeNFTs () = { | |
853 | - | let prologActions = prolog(i) | |
854 | - | if ((3 > size(i.payments))) | |
855 | - | then throw("Min one USDT and 2 NFT payments allowed") | |
856 | - | else if ((size(i.payments) > 6)) | |
857 | - | then throw("Max one USDT and 5 NFT payments allowed") | |
858 | - | else { | |
859 | - | let addr = toString(i.caller) | |
860 | - | func addUp (acc,pmt) = { | |
861 | - | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
862 | - | if ((assetId == usdtAssetId)) | |
863 | - | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
852 | + | func exchangeNFTs () = if ((i.caller != this)) | |
853 | + | then throw("Temporarily disabled") | |
854 | + | else { | |
855 | + | let prologActions = prolog(i) | |
856 | + | if ((3 > size(i.payments))) | |
857 | + | then throw("Min one USDT and 2 NFT payments allowed") | |
858 | + | else if ((size(i.payments) > 6)) | |
859 | + | then throw("Max one USDT and 5 NFT payments allowed") | |
860 | + | else { | |
861 | + | let addr = toString(i.caller) | |
862 | + | func addUp (acc,pmt) = { | |
863 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
864 | + | if ((assetId == usdtAssetId)) | |
865 | + | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
866 | + | else { | |
867 | + | let asset = value(assetInfo(assetId)) | |
868 | + | if ((asset.issuer != this)) | |
869 | + | then throw("Only WL-issued NFTs allowed") | |
870 | + | else { | |
871 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
872 | + | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
873 | + | } | |
874 | + | } | |
875 | + | } | |
876 | + | ||
877 | + | let $t02404424123 = { | |
878 | + | let $l = i.payments | |
879 | + | let $s = size($l) | |
880 | + | let $acc0 = $Tuple3(0, 0, nil) | |
881 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
882 | + | then $a | |
883 | + | else addUp($a, $l[$i]) | |
884 | + | ||
885 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
886 | + | then $a | |
887 | + | else throw("List size exceeds 6") | |
888 | + | ||
889 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
890 | + | } | |
891 | + | let usdtFee = $t02404424123._1 | |
892 | + | let totalBonus = $t02404424123._2 | |
893 | + | let burnActions = $t02404424123._3 | |
894 | + | let nftIndex = if ((totalBonus == 3)) | |
895 | + | then 2 | |
896 | + | else if ((totalBonus == 5)) | |
897 | + | then 3 | |
898 | + | else if ((totalBonus == 10)) | |
899 | + | then 4 | |
900 | + | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
901 | + | let change = (usdtFee - (totalBonus * MULT6)) | |
902 | + | if ((0 > change)) | |
903 | + | then throw((("You need to attach " + toString(totalBonus)) + " USDT as fee")) | |
864 | 904 | else { | |
865 | - | let asset = value(assetInfo(assetId)) | |
866 | - | if ((asset.issuer != this)) | |
867 | - | then throw("Only WL-issued NFTs allowed") | |
868 | - | else { | |
869 | - | let bonusPerc = bonusByDescription(value(asset.description)) | |
870 | - | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
871 | - | } | |
905 | + | let changeActions = if ((change > 0)) | |
906 | + | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
907 | + | else nil | |
908 | + | let $t02458024652 = issueNFTinternal(nftIndex, i.caller) | |
909 | + | let issueNftActions = $t02458024652._1 | |
910 | + | let nftAssetId = $t02458024652._2 | |
911 | + | let burned = size(burnActions) | |
912 | + | let burnCounterActions = if ((burned == 0)) | |
913 | + | then nil | |
914 | + | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
915 | + | $Tuple2(((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions), nftAssetId) | |
872 | 916 | } | |
873 | 917 | } | |
918 | + | } | |
874 | 919 | ||
875 | - | let $t02398024059 = { | |
876 | - | let $l = i.payments | |
877 | - | let $s = size($l) | |
878 | - | let $acc0 = $Tuple3(0, 0, nil) | |
879 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
880 | - | then $a | |
881 | - | else addUp($a, $l[$i]) | |
882 | 920 | ||
883 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
884 | - | then $a | |
885 | - | else throw("List size exceeds 6") | |
886 | 921 | ||
887 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
888 | - | } | |
889 | - | let usdtFee = $t02398024059._1 | |
890 | - | let totalBonus = $t02398024059._2 | |
891 | - | let burnActions = $t02398024059._3 | |
892 | - | let nftIndex = if ((totalBonus == 3)) | |
893 | - | then 2 | |
894 | - | else if ((totalBonus == 5)) | |
895 | - | then 3 | |
896 | - | else if ((totalBonus == 10)) | |
897 | - | then 4 | |
898 | - | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
899 | - | let change = (usdtFee - (totalBonus * MULT6)) | |
900 | - | if ((0 > change)) | |
901 | - | then throw((("You need to attach " + toString(totalBonus)) + " USDT as fee")) | |
902 | - | else { | |
903 | - | let changeActions = if ((change > 0)) | |
904 | - | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
905 | - | else nil | |
906 | - | let $t02451624588 = issueNFTinternal(nftIndex, i.caller) | |
907 | - | let issueNftActions = $t02451624588._1 | |
908 | - | let nftAssetId = $t02451624588._2 | |
909 | - | let burned = size(burnActions) | |
910 | - | let burnCounterActions = if ((burned == 0)) | |
911 | - | then nil | |
912 | - | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
913 | - | $Tuple2(((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions), nftAssetId) | |
914 | - | } | |
915 | - | } | |
916 | - | } | |
922 | + | @Callable(i) | |
923 | + | func openNftChest () = if ((i.caller != this)) | |
924 | + | then throw("Permission denied") | |
925 | + | else $Tuple2(nil, 0) | |
917 | 926 | ||
918 | 927 |
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 acresIssuedAmountKey = "acresIssuedAmount" | |
108 | 108 | ||
109 | 109 | let acresAssetIdKey = "acresAssetId" | |
110 | 110 | ||
111 | 111 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
112 | 112 | ||
113 | 113 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func asInt (v) = match v { | |
129 | 129 | case n: Int => | |
130 | 130 | n | |
131 | 131 | case _ => | |
132 | 132 | throw("fail to cast into Int") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func asTuple5Ints (val) = match val { | |
137 | 137 | case t: (Int, Int, Int, Int, Int) => | |
138 | 138 | t | |
139 | 139 | case _ => | |
140 | 140 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func asTuple4Ints (val) = match val { | |
145 | 145 | case t: (Int, Int, Int, Int) => | |
146 | 146 | t | |
147 | 147 | case _ => | |
148 | 148 | throw("fail to cast into (Int, Int, Int, Int)") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func asTuple3Ints (val) = match val { | |
153 | 153 | case t: (Int, Int, Int) => | |
154 | 154 | t | |
155 | 155 | case _ => | |
156 | 156 | throw("fail to cast into (Int, Int, Int)") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func asTuple2Ints (val) = match val { | |
161 | 161 | case t: (Int, Int) => | |
162 | 162 | t | |
163 | 163 | case _ => | |
164 | 164 | throw("fail to cast into (Int, Int)") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func fixedPoint (val,decimals) = { | |
169 | 169 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
170 | 170 | let lowPart = toString((val % tenPow)) | |
171 | 171 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
172 | 172 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | let M6_ = 1000000 | |
177 | 177 | ||
178 | 178 | let M8_ = 100000000 | |
179 | 179 | ||
180 | 180 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
181 | 181 | ||
182 | 182 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
183 | 183 | ||
184 | 184 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
191 | 191 | ||
192 | 192 | let totalFarmingPowerKey = "totalFarmingPower" | |
193 | 193 | ||
194 | 194 | let IdxDtx3PercConversion = 0 | |
195 | 195 | ||
196 | 196 | let MAX_WL_NFTS = 3 | |
197 | 197 | ||
198 | 198 | let MAX_ARK_NFTS = 1 | |
199 | 199 | ||
200 | 200 | let ARK_NFT_BONUS = 5000 | |
201 | 201 | ||
202 | 202 | let MAX_NFTS_STAKED_BY_USER = 4 | |
203 | 203 | ||
204 | 204 | let keyNftTotalIssued = "nftTotalIssued" | |
205 | 205 | ||
206 | 206 | let keyNftTotalBurned = "nftTotalBurned" | |
207 | 207 | ||
208 | 208 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
209 | 209 | ||
210 | 210 | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
211 | 211 | ||
212 | 212 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
225 | 225 | ||
226 | 226 | func getLevelByAcres (acres) = { | |
227 | 227 | let acr = ((acres + 99999999) / M8_) | |
228 | 228 | func checker (acc,item) = if ((item >= acr)) | |
229 | 229 | then acc | |
230 | 230 | else (acc + 1) | |
231 | 231 | ||
232 | 232 | let $l = levelAcres | |
233 | 233 | let $s = size($l) | |
234 | 234 | let $acc0 = 0 | |
235 | 235 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
236 | 236 | then $a | |
237 | 237 | else checker($a, $l[$i]) | |
238 | 238 | ||
239 | 239 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
240 | 240 | then $a | |
241 | 241 | else throw("List size exceeds 10") | |
242 | 242 | ||
243 | 243 | $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) | |
244 | 244 | } | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
251 | 251 | let notBonused = getFarmingPowerByAcres(acres) | |
252 | 252 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | let keyLastAcresSellTime = "lastAcresSellTime" | |
260 | 260 | ||
261 | 261 | let keyLastLimitLeft = "lastLimitLeft" | |
262 | 262 | ||
263 | 263 | let nftNames = ["SHOVEL-P3", "PICKAXE-C1", "PICKAXE-C3", "PICKAXE-C5", "PICKAXE-C10"] | |
264 | 264 | ||
265 | 265 | let contentKeys = ["contentShovelP3", "contentPickaxeC1", "contentPickaxeC3", "contentPickaxeC5", "contentPickaxeC10"] | |
266 | 266 | ||
267 | 267 | let names = ["Gold shovel", "Pickaxe", "Pickaxe", "Pickaxe", "Pickaxe"] | |
268 | 268 | ||
269 | 269 | let descriptions = ["Reward for early birds", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower", "Increases FarmPower"] | |
270 | 270 | ||
271 | 271 | let rarities = ["Promo", "Common", "Common", "Common", "Common"] | |
272 | 272 | ||
273 | 273 | let bonuses = [3, 1, 3, 5, 10] | |
274 | 274 | ||
275 | 275 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
276 | 276 | then valueOrElse(getBoolean(keyBlocked()), false) | |
277 | 277 | else false) | |
278 | 278 | then throw("Contracts are under maintenance") | |
279 | 279 | else { | |
280 | 280 | let addr = toString(i.originCaller) | |
281 | 281 | let week = (height / WEEK_BLOCKS) | |
282 | 282 | let lastWeekTxIdByUser = getString(keyLastWeekTxIdByUser(addr)) | |
283 | 283 | let txId = toBase58String(i.transactionId) | |
284 | 284 | let wtx = ((toString(week) + "_") + txId) | |
285 | 285 | if (isDefined(lastWeekTxIdByUser)) | |
286 | 286 | then { | |
287 | 287 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
288 | 288 | if ((lastWeekTx[0] == toString(week))) | |
289 | 289 | then [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
290 | 290 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
291 | 291 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
292 | 292 | else { | |
293 | 293 | let curWeekTxIdByUser = getStringValue(keyLastWeekTxIdByUser(addr)) | |
294 | 294 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
295 | 295 | if ((curWeekTx[0] == toString(week))) | |
296 | 296 | then [StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
297 | 297 | else [StringEntry(keyLastWeekTxIdByUser(addr), curWeekTxIdByUser), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
298 | 298 | } | |
299 | 299 | } | |
300 | 300 | else [StringEntry(keyLastWeekTxIdByUser(addr), wtx), StringEntry(keyCurWeekTxIdByUser(addr), wtx)] | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func createNftDescription (nftIndex,nftSerial) = ((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contentKeys[nftIndex]) + "\", ") + "\"number\": ") + nftSerial) + ", ") + "\"collection\": \"Digging tools") + "\", ") + "\"name\": \"") + names[nftIndex]) + "\", ") + "\"description\": \"") + descriptions[nftIndex]) + "\", ") + "\"rare\": \"") + rarities[nftIndex]) + "\", ") + "\"bonus\": ") + toString(bonuses[nftIndex])) + ", ") + "\"bonusType\": \"FarmPower\"}") | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | func issueNFTinternal (nftIndex,addr) = if ((nftIndex >= size(contentKeys))) | |
308 | 308 | then throw("nftIndex out of bounds") | |
309 | 309 | else { | |
310 | 310 | let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0) | |
311 | 311 | let issue = Issue(nftNames[nftIndex], createNftDescription(nftIndex, toString(nftSerial)), 1, 0, false) | |
312 | 312 | let nftAssetId = calculateAssetId(issue) | |
313 | 313 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
318 | 318 | then (bonusDelta == 0) | |
319 | 319 | else false) | |
320 | 320 | then throw("Nothing to do") | |
321 | 321 | else { | |
322 | 322 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
323 | 323 | if ((wlgResult == wlgResult)) | |
324 | 324 | then { | |
325 | 325 | let now = lastBlock.timestamp | |
326 | 326 | let timeKey = keyAcresStakedTimeByUser(address) | |
327 | 327 | let amountKey = keyAcresStakedAmtByUser(address) | |
328 | 328 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
329 | 329 | if (if ((0 > amt)) | |
330 | 330 | then (0 > (oldAcresAmount + amt)) | |
331 | 331 | else false) | |
332 | 332 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
333 | 333 | else { | |
334 | 334 | let newAcresAmount = (oldAcresAmount + amt) | |
335 | 335 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
336 | 336 | let userFpKey = keyFarmingPowerByUser(address) | |
337 | 337 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
338 | 338 | let bonusKey = keyUserFullBonus(address) | |
339 | 339 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
340 | 340 | if (if ((0 > bonusDelta)) | |
341 | 341 | then (0 > (oldBonus + bonusDelta)) | |
342 | 342 | else false) | |
343 | 343 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
344 | 344 | else { | |
345 | 345 | let $t048204919 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
346 | 346 | let newBonusedFp = $t048204919._1 | |
347 | 347 | let ignored = $t048204919._2 | |
348 | 348 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
349 | 349 | let acresActions = if ((amt == 0)) | |
350 | 350 | then nil | |
351 | 351 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
352 | 352 | $Tuple2(((((acresActions :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))) :+ IntegerEntry(bonusKey, (oldBonus + bonusDelta))), wlgResult) | |
353 | 353 | } | |
354 | 354 | } | |
355 | 355 | } | |
356 | 356 | else throw("Strict value is not equal to itself.") | |
357 | 357 | } | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func getWlgPrice (usdtBalanceCorrection) = { | |
361 | 361 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
362 | 362 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
363 | 363 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
364 | 364 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
365 | 365 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
366 | 366 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | func getSwapLimitAcres () = { | |
371 | 371 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
372 | 372 | let acres2Usd = assetBalance(this, usdtAssetId) | |
373 | 373 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
374 | 374 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
375 | 375 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
376 | 376 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
377 | 377 | let now = lastBlock.timestamp | |
378 | 378 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
379 | 379 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
380 | 380 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
381 | 381 | } | |
382 | 382 | ||
383 | 383 | ||
384 | 384 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
385 | 385 | ||
386 | 386 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
387 | 387 | ||
388 | 388 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
389 | 389 | ||
390 | 390 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
391 | 391 | ||
392 | 392 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
393 | 393 | ||
394 | 394 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
395 | 395 | ||
396 | 396 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
397 | 397 | ||
398 | 398 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
399 | 399 | ||
400 | 400 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
401 | 401 | ||
402 | 402 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
403 | 403 | ||
404 | 404 | func isArkimalIssued (nfo) = { | |
405 | 405 | let issuer = toString(nfo.issuer) | |
406 | 406 | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
407 | 407 | then (issuer == oldStakingContractStr) | |
408 | 408 | else false) | |
409 | 409 | then true | |
410 | 410 | else (issuer == incubator)) | |
411 | 411 | then true | |
412 | 412 | else (issuer == breeder)) | |
413 | 413 | then true | |
414 | 414 | else (issuer == turtleIncubator)) | |
415 | 415 | then true | |
416 | 416 | else (issuer == turtleBreeder)) | |
417 | 417 | then true | |
418 | 418 | else (issuer == canineIncubator)) | |
419 | 419 | then true | |
420 | 420 | else (issuer == canineBreeder)) | |
421 | 421 | then true | |
422 | 422 | else (issuer == felineIncubator)) | |
423 | 423 | then true | |
424 | 424 | else (issuer == felineBreeder)) | |
425 | 425 | then nfo.name | |
426 | 426 | else if ((issuer == mutantBreeder)) | |
427 | 427 | then nfo.description | |
428 | 428 | else "" | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
433 | 433 | then throw(("NFT is not supported: " + descr)) | |
434 | 434 | else { | |
435 | 435 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
436 | 436 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
437 | 437 | } | |
438 | 438 | ||
439 | 439 | ||
440 | 440 | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
441 | 441 | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
442 | 442 | if ((nftNumber >= limit)) | |
443 | 443 | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
444 | 444 | else { | |
445 | 445 | let $t094469522 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
446 | 446 | let actions = $t094469522._1 | |
447 | 447 | let wlgClaimedAmount = $t094469522._2 | |
448 | 448 | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
449 | 449 | } | |
450 | 450 | } | |
451 | 451 | ||
452 | 452 | ||
453 | 453 | @Callable(i) | |
454 | 454 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
455 | 455 | then throw("Access denied") | |
456 | 456 | else $Tuple2(prolog(i), 42) | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | 460 | @Callable(i) | |
461 | 461 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
462 | 462 | then throw("Permission denied") | |
463 | 463 | else { | |
464 | 464 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
465 | 465 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
466 | 466 | } | |
467 | 467 | ||
468 | 468 | ||
469 | 469 | ||
470 | 470 | @Callable(i) | |
471 | 471 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
472 | 472 | then throw("permission denied") | |
473 | 473 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
474 | 474 | ||
475 | 475 | ||
476 | 476 | ||
477 | 477 | @Callable(i) | |
478 | 478 | func unstakeAcres (amount) = { | |
479 | 479 | let prologActions = prolog(i) | |
480 | 480 | if ((0 >= amount)) | |
481 | 481 | then throw("Amount should be positive") | |
482 | 482 | else { | |
483 | 483 | let address = toString(i.caller) | |
484 | 484 | if ((size(i.payments) != 0)) | |
485 | 485 | then throw("No payments required") | |
486 | 486 | else { | |
487 | 487 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
488 | 488 | if ((arbReleaseTime > lastBlock.timestamp)) | |
489 | 489 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
490 | 490 | else { | |
491 | 491 | let $t01109611176 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
492 | 492 | let actions = $t01109611176._1 | |
493 | 493 | let wlgClaimedAmount = $t01109611176._2 | |
494 | 494 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
495 | 495 | } | |
496 | 496 | } | |
497 | 497 | } | |
498 | 498 | } | |
499 | 499 | ||
500 | 500 | ||
501 | 501 | ||
502 | 502 | @Callable(i) | |
503 | 503 | func stakeAcres () = { | |
504 | 504 | let prologActions = prolog(i) | |
505 | 505 | let address = toString(i.caller) | |
506 | 506 | if ((size(i.payments) != 1)) | |
507 | 507 | then throw("exactly 1 payment must be attached") | |
508 | 508 | else { | |
509 | 509 | let pmt = i.payments[0] | |
510 | 510 | let amt = pmt.amount | |
511 | 511 | if (if (!(isDefined(pmt.assetId))) | |
512 | 512 | then true | |
513 | 513 | else (value(pmt.assetId) != acresAssetId)) | |
514 | 514 | then throw("ACRES payments only!") | |
515 | 515 | else { | |
516 | 516 | let $t01162711703 = stakeUnstakeAcresInternal(amt, address, 0) | |
517 | 517 | let actions = $t01162711703._1 | |
518 | 518 | let wlgClaimedAmount = $t01162711703._2 | |
519 | 519 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
520 | 520 | } | |
521 | 521 | } | |
522 | 522 | } | |
523 | 523 | ||
524 | 524 | ||
525 | 525 | ||
526 | 526 | @Callable(i) | |
527 | 527 | func buyAcres () = { | |
528 | 528 | let prologActions = prolog(i) | |
529 | 529 | if ((size(i.payments) != 1)) | |
530 | 530 | then throw("exactly 1 payment must be attached") | |
531 | 531 | else { | |
532 | 532 | let pmt = i.payments[0] | |
533 | 533 | let usdtAmount = pmt.amount | |
534 | 534 | if (if (!(isDefined(pmt.assetId))) | |
535 | 535 | then true | |
536 | 536 | else (value(pmt.assetId) != usdtAssetId)) | |
537 | 537 | then throw("USDT payments only!") | |
538 | 538 | else if ((MULT6 > usdtAmount)) | |
539 | 539 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
540 | 540 | else { | |
541 | 541 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
542 | 542 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
543 | 543 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
544 | 544 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
545 | 545 | if ((req == req)) | |
546 | 546 | then { | |
547 | 547 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
548 | 548 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
549 | 549 | } | |
550 | 550 | else throw("Strict value is not equal to itself.") | |
551 | 551 | } | |
552 | 552 | } | |
553 | 553 | } | |
554 | 554 | ||
555 | 555 | ||
556 | 556 | ||
557 | 557 | @Callable(i) | |
558 | 558 | func buyAcresREADONLY (usdtAmount) = { | |
559 | 559 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
560 | 560 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
561 | 561 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
562 | 562 | } | |
563 | 563 | ||
564 | 564 | ||
565 | 565 | ||
566 | 566 | @Callable(i) | |
567 | 567 | func sellAcres () = { | |
568 | 568 | let prologActions = prolog(i) | |
569 | 569 | if ((size(i.payments) != 1)) | |
570 | 570 | then throw("exactly 1 payment must be attached") | |
571 | 571 | else { | |
572 | 572 | let pmt = i.payments[0] | |
573 | 573 | let acresAmount = pmt.amount | |
574 | 574 | if (if (!(isDefined(pmt.assetId))) | |
575 | 575 | then true | |
576 | 576 | else (value(pmt.assetId) != acresAssetId)) | |
577 | 577 | then throw("ACRES payments only!") | |
578 | 578 | else if ((MULT7 > acresAmount)) | |
579 | 579 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
580 | 580 | else { | |
581 | 581 | let addr = toString(i.caller) | |
582 | 582 | let $t01356013608 = getSwapLimitAcres() | |
583 | 583 | let limitAction = $t01356013608._1 | |
584 | 584 | let maxUsdt = $t01356013608._2 | |
585 | 585 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
586 | 586 | if ((acresAmount > maxAcres)) | |
587 | 587 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
588 | 588 | else { | |
589 | 589 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
590 | 590 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
591 | 591 | } | |
592 | 592 | } | |
593 | 593 | } | |
594 | 594 | } | |
595 | 595 | ||
596 | 596 | ||
597 | 597 | ||
598 | 598 | @Callable(i) | |
599 | 599 | func sellAcresREADONLY (address,acresAmount) = { | |
600 | 600 | let $t01410414152 = getSwapLimitAcres() | |
601 | 601 | let limitAction = $t01410414152._1 | |
602 | 602 | let maxUsdt = $t01410414152._2 | |
603 | 603 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
604 | 604 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
605 | 605 | } | |
606 | 606 | ||
607 | 607 | ||
608 | 608 | ||
609 | 609 | @Callable(i) | |
610 | 610 | func convertOldStakes () = if ((i.caller != this)) | |
611 | 611 | then throw("Temporarily disabled") | |
612 | 612 | else { | |
613 | 613 | let address = toString(i.caller) | |
614 | 614 | if ((size(i.payments) != 0)) | |
615 | 615 | then throw("No payments required") | |
616 | 616 | else { | |
617 | 617 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
618 | 618 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
619 | 619 | let gotAcres0 = if ((amount > 0)) | |
620 | 620 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
621 | 621 | else $Tuple2(0, 0) | |
622 | 622 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
623 | 623 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
624 | 624 | let landsResult = if (isDefined(landsStr)) | |
625 | 625 | then { | |
626 | 626 | let lands = split_51C(value(landsStr), "_") | |
627 | 627 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
628 | 628 | then throw("landAssetId is required") | |
629 | 629 | else { | |
630 | 630 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
631 | 631 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
632 | 632 | } | |
633 | 633 | ||
634 | 634 | let rr = { | |
635 | 635 | let $l = lands | |
636 | 636 | let $s = size($l) | |
637 | 637 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
638 | 638 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
639 | 639 | then $a | |
640 | 640 | else oneLand($a, $l[$i]) | |
641 | 641 | ||
642 | 642 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
643 | 643 | then $a | |
644 | 644 | else throw("List size exceeds 100") | |
645 | 645 | ||
646 | 646 | $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) | |
647 | 647 | } | |
648 | 648 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
649 | 649 | if ((finalize == finalize)) | |
650 | 650 | then { | |
651 | 651 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
652 | 652 | if ((req == req)) | |
653 | 653 | then { | |
654 | 654 | let $t01602116101 = issueNFTinternal(IdxDtx3PercConversion, i.caller) | |
655 | 655 | let nftActions = $t01602116101._1 | |
656 | 656 | let nftAssetId = $t01602116101._2 | |
657 | 657 | $Tuple5(rr._1, rr._2, rr._3, rr._4, nftActions) | |
658 | 658 | } | |
659 | 659 | else throw("Strict value is not equal to itself.") | |
660 | 660 | } | |
661 | 661 | else throw("Strict value is not equal to itself.") | |
662 | 662 | } | |
663 | 663 | else $Tuple5(0, 0, 0, 0, nil) | |
664 | 664 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
665 | 665 | let duckResult = if ((duckAssetId != "")) | |
666 | 666 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
667 | 667 | else $Tuple3(0, 0, 0) | |
668 | 668 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
669 | 669 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
670 | 670 | } | |
671 | 671 | } | |
672 | 672 | ||
673 | 673 | ||
674 | 674 | ||
675 | 675 | @Callable(i) | |
676 | 676 | func unstakeLandsREADONLY (address) = { | |
677 | 677 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
678 | 678 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
679 | 679 | let landsResult = if (isDefined(landsStr)) | |
680 | 680 | then { | |
681 | 681 | let lands = split_51C(value(landsStr), "_") | |
682 | 682 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
683 | 683 | then throw("landAssetId is required") | |
684 | 684 | else { | |
685 | 685 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
686 | 686 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
687 | 687 | } | |
688 | 688 | ||
689 | 689 | let $l = lands | |
690 | 690 | let $s = size($l) | |
691 | 691 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
692 | 692 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
693 | 693 | then $a | |
694 | 694 | else oneLand($a, $l[$i]) | |
695 | 695 | ||
696 | 696 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
697 | 697 | then $a | |
698 | 698 | else throw("List size exceeds 100") | |
699 | 699 | ||
700 | 700 | $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) | |
701 | 701 | } | |
702 | 702 | else $Tuple4(0, 0, 0, 0) | |
703 | 703 | $Tuple2(nil, landsResult) | |
704 | 704 | } | |
705 | 705 | ||
706 | 706 | ||
707 | 707 | ||
708 | 708 | @Callable(i) | |
709 | 709 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
710 | 710 | then throw("Permission denied") | |
711 | 711 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
712 | 712 | ||
713 | 713 | ||
714 | 714 | ||
715 | 715 | @Callable(i) | |
716 | 716 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
717 | 717 | let amountKey = keyAcresStakedAmtByUser(address) | |
718 | 718 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
719 | 719 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
720 | 720 | let userFpKey = keyFarmingPowerByUser(address) | |
721 | 721 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
722 | 722 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
723 | 723 | let $t01826618353 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
724 | 724 | let newBonusedFp = $t01826618353._1 | |
725 | 725 | let ignored = $t01826618353._2 | |
726 | 726 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
727 | 727 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
728 | 728 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
729 | 729 | } | |
730 | 730 | ||
731 | 731 | ||
732 | 732 | ||
733 | 733 | @Callable(i) | |
734 | 734 | func issueNFT (forAddress,nftIndex) = if ((i.caller != wlgContract)) | |
735 | 735 | then throw("Permission denied") | |
736 | 736 | else issueNFTinternal(nftIndex, addressFromStringValue(forAddress)) | |
737 | 737 | ||
738 | 738 | ||
739 | 739 | ||
740 | 740 | @Callable(i) | |
741 | 741 | func issueNftAdmin (forAddress,nftIndex,serial) = if ((i.caller != this)) | |
742 | 742 | then throw("Permission denied") | |
743 | 743 | else if ((nftIndex >= size(contentKeys))) | |
744 | 744 | then throw("nftIndex out of bounds") | |
745 | 745 | else { | |
746 | 746 | let issue = Issue(nftNames[nftIndex], createNftDescription(nftIndex, toString(serial)), 1, 0, false) | |
747 | 747 | let nftAssetId = calculateAssetId(issue) | |
748 | 748 | $Tuple2([issue, IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), serial), ScriptTransfer(addressFromStringValue(forAddress), 1, nftAssetId)], nftAssetId) | |
749 | 749 | } | |
750 | 750 | ||
751 | 751 | ||
752 | 752 | ||
753 | 753 | @Callable(i) | |
754 | 754 | func stakeNFT () = { | |
755 | 755 | let prologActions = prolog(i) | |
756 | 756 | if ((size(i.payments) != 1)) | |
757 | 757 | then throw("Exactly one payment required") | |
758 | 758 | else { | |
759 | 759 | let pmt = value(i.payments[0]) | |
760 | 760 | if ((pmt.amount != 1)) | |
761 | 761 | then throw("NFT token should be attached as payment") | |
762 | 762 | else { | |
763 | 763 | let assetId = value(pmt.assetId) | |
764 | 764 | let asset = value(assetInfo(assetId)) | |
765 | 765 | let assetIdStr = toBase58String(assetId) | |
766 | 766 | let addr = toString(i.caller) | |
767 | 767 | let nftsKey = keyStakedNFTsByOwner(addr) | |
768 | 768 | let nftsStr = getString(nftsKey) | |
769 | 769 | let nfts = if (isDefined(nftsStr)) | |
770 | 770 | then split_4C(value(nftsStr), "_") | |
771 | 771 | else nil | |
772 | 772 | if (containsElement(nfts, assetIdStr)) | |
773 | 773 | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
774 | 774 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
775 | 775 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
776 | 776 | else { | |
777 | 777 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
778 | 778 | if ((asset.issuer == this)) | |
779 | 779 | then { | |
780 | 780 | let $t02032220512 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
781 | 781 | let actions = $t02032220512._1 | |
782 | 782 | let wlgClaimedAmount = $t02032220512._2 | |
783 | 783 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
784 | 784 | } | |
785 | 785 | else if ((isArkimalIssued(asset) == "")) | |
786 | 786 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
787 | 787 | else { | |
788 | 788 | let $t02069320844 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
789 | 789 | let actions = $t02069320844._1 | |
790 | 790 | let wlgClaimedAmount = $t02069320844._2 | |
791 | 791 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
792 | 792 | } | |
793 | 793 | } | |
794 | 794 | } | |
795 | 795 | } | |
796 | 796 | } | |
797 | 797 | ||
798 | 798 | ||
799 | 799 | ||
800 | 800 | @Callable(i) | |
801 | 801 | func unstakeNFT (assetIdStr) = { | |
802 | 802 | let prologActions = prolog(i) | |
803 | 803 | if ((size(i.payments) != 0)) | |
804 | 804 | then throw("No payments required") | |
805 | 805 | else { | |
806 | 806 | let assetId = fromBase58String(assetIdStr) | |
807 | 807 | let addr = toString(i.caller) | |
808 | 808 | let asset = value(assetInfo(assetId)) | |
809 | 809 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
810 | 810 | if (!(isDefined(getInteger(timeKey)))) | |
811 | 811 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
812 | 812 | else { | |
813 | 813 | let nftsKey = keyStakedNFTsByOwner(addr) | |
814 | 814 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
815 | 815 | let idx = indexOf(nfts, assetIdStr) | |
816 | 816 | if (!(isDefined(idx))) | |
817 | 817 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
818 | 818 | else { | |
819 | 819 | let listAction = if ((size(nfts) > 1)) | |
820 | 820 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
821 | 821 | else DeleteEntry(nftsKey) | |
822 | 822 | let isWL = (asset.issuer == this) | |
823 | 823 | if (isWL) | |
824 | 824 | then { | |
825 | 825 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
826 | 826 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
827 | 827 | let $t02200922088 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
828 | 828 | let actions = $t02200922088._1 | |
829 | 829 | let wlgClaimedAmount = $t02200922088._2 | |
830 | 830 | $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) | |
831 | 831 | } | |
832 | 832 | else { | |
833 | 833 | let arkimalName = isArkimalIssued(asset) | |
834 | 834 | if ((arkimalName == "")) | |
835 | 835 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
836 | 836 | else { | |
837 | 837 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
838 | 838 | let $t02274822832 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
839 | 839 | let actions = $t02274822832._1 | |
840 | 840 | let wlgClaimedAmount = $t02274822832._2 | |
841 | 841 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
842 | 842 | } | |
843 | 843 | } | |
844 | 844 | } | |
845 | 845 | } | |
846 | 846 | } | |
847 | 847 | } | |
848 | 848 | ||
849 | 849 | ||
850 | 850 | ||
851 | 851 | @Callable(i) | |
852 | - | func exchangeNFTs () = { | |
853 | - | let prologActions = prolog(i) | |
854 | - | if ((3 > size(i.payments))) | |
855 | - | then throw("Min one USDT and 2 NFT payments allowed") | |
856 | - | else if ((size(i.payments) > 6)) | |
857 | - | then throw("Max one USDT and 5 NFT payments allowed") | |
858 | - | else { | |
859 | - | let addr = toString(i.caller) | |
860 | - | func addUp (acc,pmt) = { | |
861 | - | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
862 | - | if ((assetId == usdtAssetId)) | |
863 | - | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
852 | + | func exchangeNFTs () = if ((i.caller != this)) | |
853 | + | then throw("Temporarily disabled") | |
854 | + | else { | |
855 | + | let prologActions = prolog(i) | |
856 | + | if ((3 > size(i.payments))) | |
857 | + | then throw("Min one USDT and 2 NFT payments allowed") | |
858 | + | else if ((size(i.payments) > 6)) | |
859 | + | then throw("Max one USDT and 5 NFT payments allowed") | |
860 | + | else { | |
861 | + | let addr = toString(i.caller) | |
862 | + | func addUp (acc,pmt) = { | |
863 | + | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
864 | + | if ((assetId == usdtAssetId)) | |
865 | + | then $Tuple3((acc._1 + pmt.amount), acc._2, acc._3) | |
866 | + | else { | |
867 | + | let asset = value(assetInfo(assetId)) | |
868 | + | if ((asset.issuer != this)) | |
869 | + | then throw("Only WL-issued NFTs allowed") | |
870 | + | else { | |
871 | + | let bonusPerc = bonusByDescription(value(asset.description)) | |
872 | + | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
873 | + | } | |
874 | + | } | |
875 | + | } | |
876 | + | ||
877 | + | let $t02404424123 = { | |
878 | + | let $l = i.payments | |
879 | + | let $s = size($l) | |
880 | + | let $acc0 = $Tuple3(0, 0, nil) | |
881 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
882 | + | then $a | |
883 | + | else addUp($a, $l[$i]) | |
884 | + | ||
885 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
886 | + | then $a | |
887 | + | else throw("List size exceeds 6") | |
888 | + | ||
889 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
890 | + | } | |
891 | + | let usdtFee = $t02404424123._1 | |
892 | + | let totalBonus = $t02404424123._2 | |
893 | + | let burnActions = $t02404424123._3 | |
894 | + | let nftIndex = if ((totalBonus == 3)) | |
895 | + | then 2 | |
896 | + | else if ((totalBonus == 5)) | |
897 | + | then 3 | |
898 | + | else if ((totalBonus == 10)) | |
899 | + | then 4 | |
900 | + | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
901 | + | let change = (usdtFee - (totalBonus * MULT6)) | |
902 | + | if ((0 > change)) | |
903 | + | then throw((("You need to attach " + toString(totalBonus)) + " USDT as fee")) | |
864 | 904 | else { | |
865 | - | let asset = value(assetInfo(assetId)) | |
866 | - | if ((asset.issuer != this)) | |
867 | - | then throw("Only WL-issued NFTs allowed") | |
868 | - | else { | |
869 | - | let bonusPerc = bonusByDescription(value(asset.description)) | |
870 | - | $Tuple3(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1))) | |
871 | - | } | |
905 | + | let changeActions = if ((change > 0)) | |
906 | + | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
907 | + | else nil | |
908 | + | let $t02458024652 = issueNFTinternal(nftIndex, i.caller) | |
909 | + | let issueNftActions = $t02458024652._1 | |
910 | + | let nftAssetId = $t02458024652._2 | |
911 | + | let burned = size(burnActions) | |
912 | + | let burnCounterActions = if ((burned == 0)) | |
913 | + | then nil | |
914 | + | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
915 | + | $Tuple2(((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions), nftAssetId) | |
872 | 916 | } | |
873 | 917 | } | |
918 | + | } | |
874 | 919 | ||
875 | - | let $t02398024059 = { | |
876 | - | let $l = i.payments | |
877 | - | let $s = size($l) | |
878 | - | let $acc0 = $Tuple3(0, 0, nil) | |
879 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
880 | - | then $a | |
881 | - | else addUp($a, $l[$i]) | |
882 | 920 | ||
883 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
884 | - | then $a | |
885 | - | else throw("List size exceeds 6") | |
886 | 921 | ||
887 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
888 | - | } | |
889 | - | let usdtFee = $t02398024059._1 | |
890 | - | let totalBonus = $t02398024059._2 | |
891 | - | let burnActions = $t02398024059._3 | |
892 | - | let nftIndex = if ((totalBonus == 3)) | |
893 | - | then 2 | |
894 | - | else if ((totalBonus == 5)) | |
895 | - | then 3 | |
896 | - | else if ((totalBonus == 10)) | |
897 | - | then 4 | |
898 | - | else throw("Only bonuses of 3%, 5% or 10% are supported") | |
899 | - | let change = (usdtFee - (totalBonus * MULT6)) | |
900 | - | if ((0 > change)) | |
901 | - | then throw((("You need to attach " + toString(totalBonus)) + " USDT as fee")) | |
902 | - | else { | |
903 | - | let changeActions = if ((change > 0)) | |
904 | - | then [ScriptTransfer(i.caller, change, usdtAssetId)] | |
905 | - | else nil | |
906 | - | let $t02451624588 = issueNFTinternal(nftIndex, i.caller) | |
907 | - | let issueNftActions = $t02451624588._1 | |
908 | - | let nftAssetId = $t02451624588._2 | |
909 | - | let burned = size(burnActions) | |
910 | - | let burnCounterActions = if ((burned == 0)) | |
911 | - | then nil | |
912 | - | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
913 | - | $Tuple2(((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions), nftAssetId) | |
914 | - | } | |
915 | - | } | |
916 | - | } | |
922 | + | @Callable(i) | |
923 | + | func openNftChest () = if ((i.caller != this)) | |
924 | + | then throw("Permission denied") | |
925 | + | else $Tuple2(nil, 0) | |
917 | 926 | ||
918 | 927 |
github/deemru/w8io/026f985 87.14 ms ◑