tx · 9GXmGKeAVHoaPLvQ3aggYUJ8XyKWgcBE8TabPsRTvvza

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.05 09:52 [2082724] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "9GXmGKeAVHoaPLvQ3aggYUJ8XyKWgcBE8TabPsRTvvza", "fee": 1000000, "feeAssetId": null, "timestamp": 1654411931078, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4GiaJZ93vXH8ztHeJgzwqB4g25vMTN2TEEJPcSSKFUv7d3zbpsHiV9ZNSPg8ZtLAsS59o1bGtASRE8QBC8BcymBf" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERl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EZyZWVzCQAAaAAAAAIFAAAAB0ZlZVBhaWQAAAAAAAX14QAFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAAC7KhrI", "height": 2082724, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BVW23vCXtEKVhQiNT7mAVE5iEMqFdvu5uguUFuenT7Bx Next: 6my9d7vpBW6koM9xWB84ouevW9wEkPTNY1xgpcPZQDR4 Diff:
OldNewDifferences
7474 else {
7575 let WaitTime = if ((trxUnstakeValue == 0))
7676 then 2
77- else 10
77+ else 100
7878 if (((LastUnstakeBlockValue + WaitTime) > height))
7979 then throw((("Second withdraw cannot be done before " + toString(((height - LastUnstakeBlockValue) - WaitTime))) + " min"))
8080 else {
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 LastUnstakeBlock = (toBase58String(i.caller.bytes) + "_LastUnstake")
1717 let UserBalance = match getInteger(this, UserLiquidity) {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 let pmt = if ((size(i.payments) == 1))
2424 then i.payments[0]
2525 else throw("Attached payment is required")
2626 if ((UserBalance != 0))
2727 then throw("You already have funds supplied, cannot supply more than once")
2828 else if (if (((50 * 100000000) > pmt.amount))
2929 then true
3030 else (pmt.assetId != BUsd))
3131 then throw("Can only deposit BUsd tokens, and amount should be at least 50 BUsd")
3232 else {
3333 let NewBalance = (UserBalance + pmt.amount)
3434 [IntegerEntry((toBase58String(i.caller.bytes) + "_Liq"), NewBalance), IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), NewBalance), IntegerEntry((toBase58String(i.caller.bytes) + "_LastUnstake"), height)]
3535 }
3636 }
3737
3838
3939
4040 @Callable(i)
4141 func WithdrawLiq () = {
4242 let UserLiquidity = (toBase58String(i.caller.bytes) + "_Liq")
4343 let LastUnstakeBlock = (toBase58String(i.caller.bytes) + "_LastUnstake")
4444 let trxUnstakeNum = (toBase58String(i.caller.bytes) + "_trxUnstake")
4545 let User1stDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
4646 let dAppFrees = Address(dAppFees)
4747 let FeePaid = 1
4848 let User1stDepositValue = match getInteger(this, User1stDeposit) {
4949 case a: Int =>
5050 a
5151 case _ =>
5252 0
5353 }
5454 let amount = match getInteger(this, UserLiquidity) {
5555 case a: Int =>
5656 a
5757 case _ =>
5858 0
5959 }
6060 let trxUnstakeValue = match getInteger(this, trxUnstakeNum) {
6161 case a: Int =>
6262 a
6363 case _ =>
6464 0
6565 }
6666 let LastUnstakeBlockValue = match getInteger(this, LastUnstakeBlock) {
6767 case a: Int =>
6868 a
6969 case _ =>
7070 0
7171 }
7272 if ((amount == 0))
7373 then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((amount / 100000000))))
7474 else {
7575 let WaitTime = if ((trxUnstakeValue == 0))
7676 then 2
77- else 10
77+ else 100
7878 if (((LastUnstakeBlockValue + WaitTime) > height))
7979 then throw((("Second withdraw cannot be done before " + toString(((height - LastUnstakeBlockValue) - WaitTime))) + " min"))
8080 else {
8181 let PaidtrxValue = if ((trxUnstakeValue == 3))
8282 then 0
8383 else (trxUnstakeValue + 1)
8484 let WithdrawAmount = ((User1stDepositValue / 4) - (FeePaid * 100000000))
8585 let UserAccount = if ((trxUnstakeValue == 3))
8686 then 0
8787 else (User1stDepositValue - (PaidtrxValue * WithdrawAmount))
8888 $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)
8989 }
9090 }
9191 }
9292
9393

github/deemru/w8io/169f3d6 
41.08 ms