tx · 3BchB5GD25f9aYn2zVd3n3zHXcoEiNgEYe8gB7nJhzaH 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg: -0.00800000 Waves 2024.10.01 19:06 [3308008] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves
{ "type": 13, "id": "3BchB5GD25f9aYn2zVd3n3zHXcoEiNgEYe8gB7nJhzaH", "fee": 800000, "feeAssetId": null, "timestamp": 1727798778895, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "2EwWRzSifKPbBeRMA8257Sk4HSUkD3wZCqwP7JDqDXpWrv9WchCe2xHLwZ4LyYZ5nyfS1f2VarB3hrBY7r9XV4Er" ], "script": "base64:BgIdCAISBAoCCAESBAoCAQgSAwoBCBIDCgEBEgMKAQgvABRPTERfU1RBS0lOR19ERUFETElORQCY0IGrpDIABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgAQYWNyZXMyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1A0VUgzVDluWHBNTnBVbVNtUWpQbUV6M0c4NXQzem42ZUEDCQAAAgEBVAUHJG1hdGNoMAIjM05CUHgxRmNpdTNKUU5FR1oyMWpTblRkdXRMTkdHQlVTWGgJAAIBAg1Vbmtub3duIGNoYWluAANTRVACAl9fAAVNVUxUOACAwtcvAQ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WQEHYWRkcmVzcwQHdGltZUtleQkBGGtleUFjcmVzU3Rha2VkVGltZUJ5VXNlcgEFB2FkZHJlc3MECWFtb3VudEtleQkBGmtleUFjcmVzU3Rha2VkQW1vdW50QnlVc2VyAQUHYWRkcmVzcwQLYWNyZXNBbW91bnQJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUJYW1vdW50S2V5AAAECGxhc3RUaW1lCQELdmFsdWVPckVsc2UCCQCfCAEFB3RpbWVLZXkAAAQMY2xhaW1lZEFjcmVzCQESY2xhaW1BY3Jlc0ludGVybmFsAwUHYWRkcmVzcwULYWNyZXNBbW91bnQFCGxhc3RUaW1lCQCUCgIFA25pbAkAzAgCBQxjbGFpbWVkQWNyZXMJAMwIAgUIbGFzdFRpbWUFA25pbABOB7w/", "height": 3308008, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2jGDdtqxis5m52qzjswowB72TUw7E1ZMY8vbnryyBigh Next: EUCjGU24MAifd5Qkm1PNfpGW6Xpje1ecv7hXGKn7GPxn Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let OLD_STAKING_DEADLINE = 1727740799000 | |
5 | + | ||
4 | 6 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 7 | ||
6 | 8 | let defaultRestAddressStr = match chain { | |
124 | 126 | } | |
125 | 127 | ||
126 | 128 | ||
127 | - | func finalTime () = min([lastBlock.timestamp, | |
129 | + | func finalTime () = min([lastBlock.timestamp, OLD_STAKING_DEADLINE]) | |
128 | 130 | ||
129 | 131 | ||
130 | 132 | let DAILYRESBYPIECE = 3456000 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let OLD_STAKING_DEADLINE = 1727740799000 | |
5 | + | ||
4 | 6 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 7 | ||
6 | 8 | let defaultRestAddressStr = match chain { | |
7 | 9 | case _ => | |
8 | 10 | if ((base58'2W' == $match0)) | |
9 | 11 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
10 | 12 | else if ((base58'2T' == $match0)) | |
11 | 13 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
12 | 14 | else throw("Unknown chain") | |
13 | 15 | } | |
14 | 16 | ||
15 | 17 | let acres2AddressStr = match chain { | |
16 | 18 | case _ => | |
17 | 19 | if ((base58'2W' == $match0)) | |
18 | 20 | then "3P4UH3T9nXpMNpUmSmQjPmEz3G85t3zn6eA" | |
19 | 21 | else if ((base58'2T' == $match0)) | |
20 | 22 | then "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh" | |
21 | 23 | else throw("Unknown chain") | |
22 | 24 | } | |
23 | 25 | ||
24 | 26 | let SEP = "__" | |
25 | 27 | ||
26 | 28 | let MULT8 = 100000000 | |
27 | 29 | ||
28 | 30 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
29 | 31 | ||
30 | 32 | ||
31 | 33 | let IdxCfgStakingDapp = 1 | |
32 | 34 | ||
33 | 35 | let IdxCfgEconomyDapp = 2 | |
34 | 36 | ||
35 | 37 | let IdxCfgWlgDapp = 4 | |
36 | 38 | ||
37 | 39 | let IdxCfgAcresDapp = 8 | |
38 | 40 | ||
39 | 41 | func keyRestCfg () = "%s__restConfig" | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func keyRestAddress () = "%s__restAddr" | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
46 | 48 | ||
47 | 49 | ||
48 | 50 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
49 | 51 | ||
50 | 52 | ||
51 | 53 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
52 | 54 | ||
53 | 55 | let restCfg = readRestCfgOrFail(restContract) | |
54 | 56 | ||
55 | 57 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
56 | 58 | ||
57 | 59 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
58 | 60 | ||
59 | 61 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
60 | 62 | ||
61 | 63 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
62 | 64 | ||
63 | 65 | let acresIssuedAmountKey = "acresIssuedAmount" | |
64 | 66 | ||
65 | 67 | let acresAssetIdKey = "acresAssetId" | |
66 | 68 | ||
67 | 69 | let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet") | |
68 | 70 | ||
69 | 71 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | let IdxEffTotal = 0 | |
73 | 75 | ||
74 | 76 | func keyResProportions () = "resTypesProportions" | |
75 | 77 | ||
76 | 78 | ||
77 | 79 | func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr) | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func asInt (v) = match v { | |
81 | 83 | case n: Int => | |
82 | 84 | n | |
83 | 85 | case _ => | |
84 | 86 | throw("fail to cast into Int") | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | 90 | func asTwoIntsTuple (val) = match val { | |
89 | 91 | case t2: (Int, Int) => | |
90 | 92 | t2 | |
91 | 93 | case _ => | |
92 | 94 | throw("fail to cast into (Int, Int)") | |
93 | 95 | } | |
94 | 96 | ||
95 | 97 | ||
96 | 98 | func getVotingPower (userAddrStrOrEmpty) = { | |
97 | 99 | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
98 | 100 | func adder (acc,item) = (acc + parseIntValue(item)) | |
99 | 101 | ||
100 | 102 | let totalPower = { | |
101 | 103 | let $l = props | |
102 | 104 | let $s = size($l) | |
103 | 105 | let $acc0 = 0 | |
104 | 106 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
105 | 107 | then $a | |
106 | 108 | else adder($a, $l[$i]) | |
107 | 109 | ||
108 | 110 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
109 | 111 | then $a | |
110 | 112 | else throw("List size exceeds 6") | |
111 | 113 | ||
112 | 114 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
113 | 115 | } | |
114 | 116 | let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0) | |
115 | 117 | [totalPower, usersPower] | |
116 | 118 | } | |
117 | 119 | ||
118 | 120 | ||
119 | 121 | func fixedPoint (val,decimals) = { | |
120 | 122 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
121 | 123 | let lowPart = toString((val % tenPow)) | |
122 | 124 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
123 | 125 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
124 | 126 | } | |
125 | 127 | ||
126 | 128 | ||
127 | - | func finalTime () = min([lastBlock.timestamp, | |
129 | + | func finalTime () = min([lastBlock.timestamp, OLD_STAKING_DEADLINE]) | |
128 | 130 | ||
129 | 131 | ||
130 | 132 | let DAILYRESBYPIECE = 3456000 | |
131 | 133 | ||
132 | 134 | let USDT2ACRES_MULTIPLIER = 10 | |
133 | 135 | ||
134 | 136 | let MILLION6 = 100000000000000 | |
135 | 137 | ||
136 | 138 | let DAYMILLIS = 86400000 | |
137 | 139 | ||
138 | 140 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
139 | 141 | ||
140 | 142 | ||
141 | 143 | func keyAcresLockedAmountByUser (addr) = ("acresLockedAmountByUser_" + addr) | |
142 | 144 | ||
143 | 145 | ||
144 | 146 | func keyAcresLockedEtaByUser (addr) = ("acresLockedEtaByUser_" + addr) | |
145 | 147 | ||
146 | 148 | ||
147 | 149 | let acresStakedTotalKey = "acresStakedAmountTotal" | |
148 | 150 | ||
149 | 151 | let BLACKLISTED1 = "3P2NGX4Q5nge1MCauwQW5aqYLdkccSGj1Ep_3P2xFAHW9yhyNohYozWd4HFhEXZu3bsNSoR_3P2yKaZ2gvn9Xe5tti81a7P9LZhHgjvToV9_3P37zQ3cf2ecu55RmJqEiGSivdzN9avt3m9_3P4az6dtzsvGCWFAxa94UdevKzXyEwxEiFG_3P4kZU6X3TTLFcSUe55JSy8BySqitcPgMBz_3P5hCxBEh3NgNizZhNBreyBSqtbhJYLkKPD_3P7HLvucy11yxyMJUwjzXFHHKMEDwi1EwfC_3P8JuaqH9PTQAv8D5HBGgQfKauLTYt2NQft_3P9gTDB4rtDEVbpX3asU63H4Zinh2EnTmZE_3P9iN3qrtfJicUVy7amZeVsetVD3vUMk8be_3PCa2BsAa6JBLirszQfV5r9fJrujfhwtwfP_3PD3i4XN8KtygcFx4ry5M7UGqdfH8VYvtRT_3PDEMnnJNc2kx9cPEmvVvhXUr8SvhANKhsa_3PDGE9tKQizaeZFeDDq5aYSv89nwYbfirpZ_3PDMKQTCrUPZECVXEJJ8m1sHtutSu1naSf1_3PGh2Qu6Yvx8GTCRRVNvBUVZLdaidYSaxo5_3PKkmAtbSK5D2hQdo1RfEg8eXyMbDcRUc92_3PLMnbxzssP8W8E8XjJ1RLBBg8UZL8Cz3P2_3PMuxo4PCAox9s4a7R1eszh4iqqu8gS7jHv_3PNrMtEQChw87WZU1JAJ7aGHykCa8TjnDNK_3PPuBXfWoBy3EEory7c7vgi9Usjka7o5tBj_3PQwyeyEhT4Y6aGAL6tg73aQWJtV1zRt3nR_3PRGDShuMGb84MJtTJvtTg8qDfswkYWcm3e" | |
150 | 152 | ||
151 | 153 | let PROMO1_AMOUNT = 4970178 | |
152 | 154 | ||
153 | 155 | func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr) | |
154 | 156 | ||
155 | 157 | ||
156 | 158 | func claimAcresInternal (addr,acresAmount,lastClaimTime) = { | |
157 | 159 | let deltaTime = (finalTime() - lastClaimTime) | |
158 | 160 | let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8)) | |
159 | 161 | let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil)) | |
160 | 162 | let gotUsdt = max([0, canGetUsdt]) | |
161 | 163 | (gotUsdt * USDT2ACRES_MULTIPLIER) | |
162 | 164 | } | |
163 | 165 | ||
164 | 166 | ||
165 | 167 | func claimInternal (addr,acresAmount,lastClaimTime) = { | |
166 | 168 | let deltaTime = (finalTime() - lastClaimTime) | |
167 | 169 | if ((0 > deltaTime)) | |
168 | 170 | then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", final = ") + toString(finalTime()))) | |
169 | 171 | else { | |
170 | 172 | let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8)) | |
171 | 173 | let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil)) | |
172 | 174 | let gotUsdt = if ((0 >= canGetUsdt)) | |
173 | 175 | then 0 | |
174 | 176 | else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1 | |
175 | 177 | (gotUsdt * USDT2ACRES_MULTIPLIER) | |
176 | 178 | } | |
177 | 179 | } | |
178 | 180 | ||
179 | 181 | ||
180 | 182 | func unstakeAcresRO (amount,address) = { | |
181 | 183 | let timeKey = keyAcresStakedTimeByUser(address) | |
182 | 184 | let claimedAcres = claimAcresInternal(address, amount, valueOrElse(getInteger(timeKey), 0)) | |
183 | 185 | $Tuple2(amount, claimedAcres) | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | 189 | @Callable(i) | |
188 | 190 | func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this)) | |
189 | 191 | then throw("Permission denied") | |
190 | 192 | else if (isDefined(getBinary(acresAssetIdKey))) | |
191 | 193 | then throw("Already initialized") | |
192 | 194 | else { | |
193 | 195 | let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces) | |
194 | 196 | let issuedAmount = (MILLION6 - (nftAcres * MULT8)) | |
195 | 197 | let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0) | |
196 | 198 | let assetId = calculateAssetId(issue) | |
197 | 199 | [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)] | |
198 | 200 | } | |
199 | 201 | ||
200 | 202 | ||
201 | 203 | ||
202 | 204 | @Callable(i) | |
203 | 205 | func unstakeAcresCallback (amount,address) = if ((toString(i.caller) != acres2AddressStr)) | |
204 | 206 | then throw("Permission denied") | |
205 | 207 | else if ((0 >= amount)) | |
206 | 208 | then throw("Amount should be positive") | |
207 | 209 | else { | |
208 | 210 | let timeKey = keyAcresStakedTimeByUser(address) | |
209 | 211 | let amountKey = keyAcresStakedAmountByUser(address) | |
210 | 212 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
211 | 213 | if ((amount > oldAcresAmount)) | |
212 | 214 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8))) | |
213 | 215 | else { | |
214 | 216 | let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0) | |
215 | 217 | let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0) | |
216 | 218 | let now = lastBlock.timestamp | |
217 | 219 | let unstakableAmount = if (isBlacklistedPromo1(address)) | |
218 | 220 | then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT) | |
219 | 221 | else (oldAcresAmount - lockedAmount) | |
220 | 222 | if (if ((lockedETA > now)) | |
221 | 223 | then (amount > unstakableAmount) | |
222 | 224 | else false) | |
223 | 225 | then throw(((("Only " + fixedPoint(unstakableAmount, 8)) + " ACRES can be unstaked now, wait until ") + toString(lockedETA))) | |
224 | 226 | else { | |
225 | 227 | let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0) | |
226 | 228 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
227 | 229 | let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0)) | |
228 | 230 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2((amount + claimedAcres), wlgResult)) | |
229 | 231 | } | |
230 | 232 | } | |
231 | 233 | } | |
232 | 234 | ||
233 | 235 | ||
234 | 236 | ||
235 | 237 | @Callable(i) | |
236 | 238 | func unstakeAllAcresREADONLY (address) = { | |
237 | 239 | let amount = valueOrElse(getInteger(keyAcresStakedAmountByUser(address)), 0) | |
238 | 240 | let unstakedWithClaimed = unstakeAcresRO(amount, address) | |
239 | 241 | $Tuple2(nil, unstakedWithClaimed) | |
240 | 242 | } | |
241 | 243 | ||
242 | 244 | ||
243 | 245 | ||
244 | 246 | @Callable(i) | |
245 | 247 | func requestAcresCallback (amount) = { | |
246 | 248 | let caller = i.caller | |
247 | 249 | if (if ((toString(caller) != acres2AddressStr)) | |
248 | 250 | then (caller != stakingContract) | |
249 | 251 | else false) | |
250 | 252 | then throw("Permission denied") | |
251 | 253 | else $Tuple2([ScriptTransfer(caller, amount, acresAssetId)], amount) | |
252 | 254 | } | |
253 | 255 | ||
254 | 256 | ||
255 | 257 | ||
256 | 258 | @Callable(i) | |
257 | 259 | func claimAcresREADONLY (address) = { | |
258 | 260 | let timeKey = keyAcresStakedTimeByUser(address) | |
259 | 261 | let amountKey = keyAcresStakedAmountByUser(address) | |
260 | 262 | let acresAmount = valueOrElse(getInteger(amountKey), 0) | |
261 | 263 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
262 | 264 | let claimedAcres = claimAcresInternal(address, acresAmount, lastTime) | |
263 | 265 | $Tuple2(nil, [claimedAcres, lastTime]) | |
264 | 266 | } | |
265 | 267 | ||
266 | 268 |
github/deemru/w8io/026f985 32.36 ms ◑