tx · 8pz19ydTFtqwsveD5SQcL8TbR4B3fb4fbSiQDcQtdDVs

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.03 22:44 [2080600] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "8pz19ydTFtqwsveD5SQcL8TbR4B3fb4fbSiQDcQtdDVs", "fee": 1000000, "feeAssetId": null, "timestamp": 1654285547625, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "5B4HzbcURL8wM4KnFmUqq2NxP7PvzvvjZYh7tj4fSM3wurK7E8qcoc4sBmYr6E48wUw3jWHzUsPg1D84kfpFVxte" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlcG9za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Z2h0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOV2l0aGRyYXdBbW91bnQFAAAABEJVc2QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJZEFwcEZyZWVzCQAAaAAAAAIFAAAAB0ZlZVBhaWQAAAAAAAX14QAFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAAAsHFrf", "height": 2080600, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4a7B2T7fQN8BZWk85GStF69CrSyKjnasdxVYZeQsAUob Next: HuRAekSiZELC2GEi336z26vBWq2WpKzUdHiJ6PWdH5E9 Diff:
OldNewDifferences
44 let BUsd = base58'nrDXX1zHfGht7xExqNxDu7voCy9wzmc9vJxwcc2jLga'
55
66 let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj'
7+
8+@Callable(i)
9+func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_LastUnstake"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), 0)]
10+
11+
712
813 @Callable(i)
914 func DepositFunds () = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BUsd = base58'nrDXX1zHfGht7xExqNxDu7voCy9wzmc9vJxwcc2jLga'
55
66 let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj'
7+
8+@Callable(i)
9+func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_LastUnstake"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), 0)]
10+
11+
712
813 @Callable(i)
914 func DepositFunds () = {
1015 let UserLiquidity = (toBase58String(i.caller.bytes) + "_Liq")
1116 let UserBalance = match getInteger(this, UserLiquidity) {
1217 case a: Int =>
1318 a
1419 case _ =>
1520 0
1621 }
1722 let pmt = if ((size(i.payments) == 1))
1823 then i.payments[0]
1924 else throw("Attached payment is required")
2025 if (if ((0 >= pmt.amount))
2126 then true
2227 else (pmt.assetId != BUsd))
2328 then throw("Can only deposit BUsd tokens, and amount should be positive")
2429 else {
2530 let NewBalance = (UserBalance + pmt.amount)
2631 [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), NewBalance)]
2732 }
2833 }
2934
3035
3136
3237 @Callable(i)
3338 func WithdrawLiq () = {
3439 let UserLiquidity = (toBase58String(i.caller.bytes) + "_Liq")
3540 let LastUnstakeBlock = (toBase58String(i.caller.bytes) + "_LastUnstake")
3641 let trxUnstakeNum = (toBase58String(i.caller.bytes) + "_trxUnstake")
3742 let dAppFrees = Address(dAppFees)
3843 let WaitTime = 10
3944 let FeePaid = 1
4045 let amount = match getInteger(this, UserLiquidity) {
4146 case a: Int =>
4247 a
4348 case _ =>
4449 0
4550 }
4651 let trxUnstakeValue = match getInteger(this, trxUnstakeNum) {
4752 case a: Int =>
4853 a
4954 case _ =>
5055 0
5156 }
5257 let LastUnstakeBlockValue = match getInteger(this, LastUnstakeBlock) {
5358 case a: Int =>
5459 a
5560 case _ =>
5661 0
5762 }
5863 if ((amount == 0))
5964 then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((amount / 100000000))))
6065 else if (if ((trxUnstakeValue == 2))
6166 then (height > (trxUnstakeValue + WaitTime))
6267 else false)
6368 then throw(("Second withdraw cannot be done before " + " min"))
6469 else {
6570 let PaidtrxValue = if ((trxUnstakeValue == 3))
6671 then 0
6772 else (trxUnstakeValue + 1)
6873 let UserAccount = if ((trxUnstakeValue == 3))
6974 then 0
7075 else ((amount - (FeePaid * 100000000)) - (((PaidtrxValue * 25) * (amount - (FeePaid * 100000000))) / 100))
7176 let WithdrawAmount = ((25 * amount) / 100)
7277 $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), PaidtrxValue), IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), height), ScriptTransfer(i.caller, WithdrawAmount, BUsd), ScriptTransfer(dAppFrees, (FeePaid * 100000000), BUsd)], BUsd)
7378 }
7479 }
7580
7681

github/deemru/w8io/169f3d6 
25.81 ms