tx · 6vv8YwYhwBUM2CT6p7RHVdVs6JH5KDXxvrAFjpSZaseE

3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg:  -0.00800000 Waves

2023.09.23 17:41 [2768161] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves

{ "type": 13, "id": "6vv8YwYhwBUM2CT6p7RHVdVs6JH5KDXxvrAFjpSZaseE", "fee": 800000, "feeAssetId": null, "timestamp": 1695480109850, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "4mCyoC8hynmnpTGxye9SmyghAxyCNdfUXxCwSZZaBkiePNBLC9XEV5RvbDbw9wBARbNdcLFJi16neGkrVkTZWaFm" ], "script": "base64:BgIdCAISBAoCCAESABIDCgEBEgASAwoBARIAEgMKAQgqAAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyABNhY3Jlc1N0YWtlZFRvdGFsS2V5AhZhY3Jlc1N0YWtlZEFtb3VudFRvdGFsAAp4cE5ld1NMYW5kAMCWsQIAD0RBSUxZUkVTQllQSUVDRQCA+NIBABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFWRlZmF1bHRSZXN0QWR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lS2V5AAAJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgUHdGltZUtleQgFCWxhc3RCbG9jawl0aW1lc3RhbXAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQxjbGFpbWVkQWNyZXMFDGFjcmVzQXNzZXRJZAUDbmlsCQCUCgIFDHByb2xvZ1Jlc3VsdAUJd2xnUmVzdWx0AWkBEmNsYWltQWNyZXNSRUFET05MWQEHYWRkcmVzcwQHdGltZUtleQkBGGtleUFjcmVzU3Rha2VkVGltZUJ5VXNlcgEFB2FkZHJlc3MECWFtb3VudEtleQkBGmtleUFjcmVzU3Rha2VkQW1vdW50QnlVc2VyAQUHYWRkcmVzcwQLYWNyZXNBbW91bnQJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUJYW1vdW50S2V5AAAECGxhc3RUaW1lCQELdmFsdWVPckVsc2UCCQCfCAEFB3RpbWVLZXkAAAQMY2xhaW1lZEFjcmVzCQESY2xhaW1BY3Jlc0ludGVybmFsAwUHYWRkcmVzcwULYWNyZXNBbW91bnQFCGxhc3RUaW1lCQCUCgIFA25pbAkAzAgCBQxjbGFpbWVkQWNyZXMJAMwIAgUIbGFzdFRpbWUFA25pbADEe/co", "height": 2768161, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GQv1JNJiP1C3iFkFy3yAbwmEnzLgjdjuvX83zYyJzLES Next: 6wtoAm8MX5XaLQzjHAbe1kRpigouPL7kdNGMC2QPTLUr Diff:
OldNewDifferences
102102 }
103103
104104
105+func asTwoIntsTuple (val) = match val {
106+ case t2: (Int, Int) =>
107+ t2
108+ case _ =>
109+ throw("fail to cast into (Int, Int)")
110+}
111+
112+
105113 func getVotingPower (userAddrStrOrEmpty) = {
106114 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
107115 func adder (acc,item) = (acc + parseIntValue(item))
131139 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
132140 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
133141 }
134-
135-
136-func asTwoIntsTuple (val) = match val {
137- case t2: (Int, Int) =>
138- t2
139- case _ =>
140- throw("fail to cast into (Int, Int)")
141-}
142142
143143
144144 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MILLION6 = 100000000000000
55
66 let DAYMILLIS = 86400000
77
88 func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr)
99
1010
1111 let acresStakedTotalKey = "acresStakedAmountTotal"
1212
1313 let xpNewSLand = 5000000
1414
1515 let DAILYRESBYPIECE = 3456000
1616
1717 let USDT2ACRES_MULTIPLIER = 10
1818
1919 let chain = take(drop(this.bytes, 1), 1)
2020
2121 let usdtAssetId = match chain {
2222 case _ =>
2323 if ((base58'2W' == $match0))
2424 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
2525 else if ((base58'2T' == $match0))
2626 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
2727 else throw("Unknown chain")
2828 }
2929
3030 let defaultRestAddressStr = match chain {
3131 case _ =>
3232 if ((base58'2W' == $match0))
3333 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
3434 else if ((base58'2T' == $match0))
3535 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
3636 else throw("Unknown chain")
3737 }
3838
3939 let SEP = "__"
4040
4141 let MULT6 = 1000000
4242
4343 let MULT8 = 100000000
4444
4545 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
4646
4747
4848 let IdxCfgStakingDapp = 1
4949
5050 let IdxCfgEconomyDapp = 2
5151
5252 let IdxCfgWlgDapp = 4
5353
5454 let IdxCfgAcresDapp = 8
5555
5656 func keyRestCfg () = "%s__restConfig"
5757
5858
5959 func keyRestAddress () = "%s__restAddr"
6060
6161
6262 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
6363
6464
6565 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
6666
6767
6868 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
6969
7070 let restCfg = readRestCfgOrFail(restContract)
7171
7272 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
7373
7474 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
7575
7676 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
7777
7878 let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
7979
8080 let acresIssuedAmountKey = "acresIssuedAmount"
8181
8282 let acresAssetIdKey = "acresAssetId"
8383
8484 let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet")
8585
8686 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
8787
8888
8989 let IdxEffTotal = 0
9090
9191 func keyResProportions () = "resTypesProportions"
9292
9393
9494 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
9595
9696
9797 func asInt (v) = match v {
9898 case n: Int =>
9999 n
100100 case _ =>
101101 throw("fail to cast into Int")
102102 }
103103
104104
105+func asTwoIntsTuple (val) = match val {
106+ case t2: (Int, Int) =>
107+ t2
108+ case _ =>
109+ throw("fail to cast into (Int, Int)")
110+}
111+
112+
105113 func getVotingPower (userAddrStrOrEmpty) = {
106114 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
107115 func adder (acc,item) = (acc + parseIntValue(item))
108116
109117 let totalPower = {
110118 let $l = props
111119 let $s = size($l)
112120 let $acc0 = 0
113121 func $f0_1 ($a,$i) = if (($i >= $s))
114122 then $a
115123 else adder($a, $l[$i])
116124
117125 func $f0_2 ($a,$i) = if (($i >= $s))
118126 then $a
119127 else throw("List size exceeds 6")
120128
121129 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
122130 }
123131 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
124132 [totalPower, usersPower]
125133 }
126134
127135
128136 func fixedPoint (val,decimals) = {
129137 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
130138 let lowPart = toString((val % tenPow))
131139 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
132140 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
133141 }
134-
135-
136-func asTwoIntsTuple (val) = match val {
137- case t2: (Int, Int) =>
138- t2
139- case _ =>
140- throw("fail to cast into (Int, Int)")
141-}
142142
143143
144144 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
145145
146146
147147 func claimAcresInternal (addr,acresAmount,lastClaimTime) = {
148148 let deltaTime = (lastBlock.timestamp - lastClaimTime)
149149 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
150150 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
151151 let gotUsdt = max([0, canGetUsdt])
152152 (gotUsdt * USDT2ACRES_MULTIPLIER)
153153 }
154154
155155
156156 func claimInternal (addr,acresAmount,lastClaimTime) = {
157157 let deltaTime = (lastBlock.timestamp - lastClaimTime)
158158 if ((0 > deltaTime))
159159 then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", current = ") + toString(lastBlock.timestamp)))
160160 else {
161161 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
162162 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
163163 let gotUsdt = if ((0 >= canGetUsdt))
164164 then 0
165165 else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1
166166 (gotUsdt * USDT2ACRES_MULTIPLIER)
167167 }
168168 }
169169
170170
171171 @Callable(i)
172172 func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this))
173173 then throw("Permission denied")
174174 else if (isDefined(getBinary(acresAssetIdKey)))
175175 then throw("Already initialized")
176176 else {
177177 let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces)
178178 let issuedAmount = (MILLION6 - (nftAcres * MULT8))
179179 let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0)
180180 let assetId = calculateAssetId(issue)
181181 [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)]
182182 }
183183
184184
185185
186186 @Callable(i)
187187 func stakeAcres () = {
188188 let prologResult = prolog()
189189 let address = toString(i.caller)
190190 if ((size(i.payments) != 1))
191191 then throw("exactly 1 payment must be attached")
192192 else {
193193 let pmt = i.payments[0]
194194 let amt = pmt.amount
195195 if (if (!(isDefined(pmt.assetId)))
196196 then true
197197 else (value(pmt.assetId) != acresAssetId))
198198 then throw("ACRES payments only!")
199199 else {
200200 let timeKey = keyAcresStakedTimeByUser(address)
201201 let amountKey = keyAcresStakedAmountByUser(address)
202202 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
203203 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
204204 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
205205 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
206206 $Tuple2(((((if ((claimedAcres == 0))
207207 then nil
208208 else [ScriptTransfer(i.caller, claimedAcres, acresAssetId)]) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(amountKey, (oldAcresAmount + amt))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amt))), $Tuple2(prologResult, wlgResult))
209209 }
210210 }
211211 }
212212
213213
214214
215215 @Callable(i)
216216 func unstakeAcres (amount) = {
217217 let prologResult = prolog()
218218 if ((0 >= amount))
219219 then throw("Amount should be positive")
220220 else {
221221 let address = toString(i.caller)
222222 if ((size(i.payments) != 0))
223223 then throw("No payments required")
224224 else {
225225 let timeKey = keyAcresStakedTimeByUser(address)
226226 let amountKey = keyAcresStakedAmountByUser(address)
227227 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
228228 if ((amount > oldAcresAmount))
229229 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8)))
230230 else {
231231 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
232232 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
233233 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
234234 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2(prologResult, wlgResult))
235235 }
236236 }
237237 }
238238 }
239239
240240
241241
242242 @Callable(i)
243243 func buyAcres () = {
244244 let prologResult = prolog()
245245 let address = toString(i.caller)
246246 if ((size(i.payments) != 1))
247247 then throw("exactly 1 payment must be attached")
248248 else {
249249 let pmt = i.payments[0]
250250 let amt = pmt.amount
251251 if (if (!(isDefined(pmt.assetId)))
252252 then true
253253 else (value(pmt.assetId) != usdtAssetId))
254254 then throw("USDT payments only!")
255255 else if ((MULT6 > amt))
256256 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
257257 else {
258258 let acresAmount = (amt * USDT2ACRES_MULTIPLIER)
259259 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [address, fraction(xpNewSLand, acresAmount, (25 * MULT8))], nil))
260260 $Tuple2([ScriptTransfer(economyContract, amt, usdtAssetId), ScriptTransfer(i.caller, acresAmount, acresAssetId)], $Tuple2(prologResult, accStatsResult))
261261 }
262262 }
263263 }
264264
265265
266266
267267 @Callable(i)
268268 func burnAcres (amount) = if ((i.caller != stakingContract))
269269 then throw("Permission denied")
270270 else $Tuple2([Burn(acresAssetId, amount)], amount)
271271
272272
273273
274274 @Callable(i)
275275 func claimAcres () = {
276276 let prologResult = prolog()
277277 let address = toString(i.caller)
278278 if ((size(i.payments) != 0))
279279 then throw("No payments required")
280280 else {
281281 let timeKey = keyAcresStakedTimeByUser(address)
282282 let amountKey = keyAcresStakedAmountByUser(address)
283283 let acresAmount = valueOrElse(getInteger(amountKey), 0)
284284 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
285285 let claimedAcres = claimInternal(address, acresAmount, valueOrElse(getInteger(timeKey), 0))
286286 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), ScriptTransfer(i.caller, claimedAcres, acresAssetId)], $Tuple2(prologResult, wlgResult))
287287 }
288288 }
289289
290290
291291
292292 @Callable(i)
293293 func claimAcresREADONLY (address) = {
294294 let timeKey = keyAcresStakedTimeByUser(address)
295295 let amountKey = keyAcresStakedAmountByUser(address)
296296 let acresAmount = valueOrElse(getInteger(amountKey), 0)
297297 let lastTime = valueOrElse(getInteger(timeKey), 0)
298298 let claimedAcres = claimAcresInternal(address, acresAmount, lastTime)
299299 $Tuple2(nil, [claimedAcres, lastTime])
300300 }
301301
302302

github/deemru/w8io/026f985 
38.14 ms