tx · GQ7S5FzPiZcUeV5am3HjxW8ykU4iqZBueSuTew41U8JL

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.03 23:10 [2080629] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "GQ7S5FzPiZcUeV5am3HjxW8ykU4iqZBueSuTew41U8JL", "fee": 1000000, "feeAssetId": null, "timestamp": 1654287054060, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "5pCWieMADxRzoip24qmBtNrNVfyaML2E6Ueb3GZ7kvx2fSCnCp96KwfwgKZcSBqHeqjpg9ogFY7tzAUpaVUQkdo5" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlcG9zaXR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5dGVzAgAAAAxfTGFzdFVuc3Rha2UFAAAABmhlaWdodAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADldpdGhkcmF3QW1vdW50BQAAAARCVXNkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACWRBcHBGcmVlcwkAAGgAAAACBQAAAAdGZWVQYWlkAAAAAAAF9eEABQAAAARCVXNkBQAAAANuaWwFAAAABEJVc2QAAAAAhMSucw==", "height": 2080629, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EekgJfPmAQok9joRfaYEGctmvZLG3PpEtieDoLdGPrNu Next: Ghm7dMNxYZZrsRZYEtjHTVdqi4XBdnXXJp7XPqzCMyGn Diff:
OldNewDifferences
6565 else if (if ((trxUnstakeValue == 2))
6666 then (height > (LastUnstakeBlockValue + WaitTime))
6767 else false)
68- then throw((("Second withdraw cannot be done before " + toString(((height - LastUnstakeBlockValue) - WaitTime))) + " min"))
68+ then throw((("Second withdraw cannot be done before " + toString(height)) + " min"))
6969 else {
7070 let PaidtrxValue = if ((trxUnstakeValue == 3))
7171 then 0
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'
77
88 @Callable(i)
99 func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_LastUnstake"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), 0)]
1010
1111
1212
1313 @Callable(i)
1414 func DepositFunds () = {
1515 let UserLiquidity = (toBase58String(i.caller.bytes) + "_Liq")
1616 let UserBalance = match getInteger(this, UserLiquidity) {
1717 case a: Int =>
1818 a
1919 case _ =>
2020 0
2121 }
2222 let pmt = if ((size(i.payments) == 1))
2323 then i.payments[0]
2424 else throw("Attached payment is required")
2525 if (if ((0 >= pmt.amount))
2626 then true
2727 else (pmt.assetId != BUsd))
2828 then throw("Can only deposit BUsd tokens, and amount should be positive")
2929 else {
3030 let NewBalance = (UserBalance + pmt.amount)
3131 [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), NewBalance)]
3232 }
3333 }
3434
3535
3636
3737 @Callable(i)
3838 func WithdrawLiq () = {
3939 let UserLiquidity = (toBase58String(i.caller.bytes) + "_Liq")
4040 let LastUnstakeBlock = (toBase58String(i.caller.bytes) + "_LastUnstake")
4141 let trxUnstakeNum = (toBase58String(i.caller.bytes) + "_trxUnstake")
4242 let dAppFrees = Address(dAppFees)
4343 let WaitTime = 10
4444 let FeePaid = 1
4545 let amount = match getInteger(this, UserLiquidity) {
4646 case a: Int =>
4747 a
4848 case _ =>
4949 0
5050 }
5151 let trxUnstakeValue = match getInteger(this, trxUnstakeNum) {
5252 case a: Int =>
5353 a
5454 case _ =>
5555 0
5656 }
5757 let LastUnstakeBlockValue = match getInteger(this, LastUnstakeBlock) {
5858 case a: Int =>
5959 a
6060 case _ =>
6161 0
6262 }
6363 if ((amount == 0))
6464 then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((amount / 100000000))))
6565 else if (if ((trxUnstakeValue == 2))
6666 then (height > (LastUnstakeBlockValue + WaitTime))
6767 else false)
68- then throw((("Second withdraw cannot be done before " + toString(((height - LastUnstakeBlockValue) - WaitTime))) + " min"))
68+ then throw((("Second withdraw cannot be done before " + toString(height)) + " min"))
6969 else {
7070 let PaidtrxValue = if ((trxUnstakeValue == 3))
7171 then 0
7272 else (trxUnstakeValue + 1)
7373 let UserAccount = if ((trxUnstakeValue == 3))
7474 then 0
7575 else ((amount - (FeePaid * 100000000)) - (((PaidtrxValue * 25) * (amount - (FeePaid * 100000000))) / 100))
7676 let WithdrawAmount = ((25 * amount) / 100)
7777 $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_trxUnstake"), PaidtrxValue), IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_LastUnstake"), height), ScriptTransfer(i.caller, WithdrawAmount, BUsd), ScriptTransfer(dAppFrees, (FeePaid * 100000000), BUsd)], BUsd)
7878 }
7979 }
8080
8181

github/deemru/w8io/026f985 
37.63 ms