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