tx · BvbpfFcnw5YHicUvSX7ruBWMYT5vc3cPbGuSkKEJ8Ueh

3Mt4pmCGGRuWGuNy3pyyRij45rySapd44Mw:  -0.01000000 Waves

2022.05.05 19:39 [2038647] smart account 3Mt4pmCGGRuWGuNy3pyyRij45rySapd44Mw > SELF 0.00000000 Waves

{ "type": 13, "id": "BvbpfFcnw5YHicUvSX7ruBWMYT5vc3cPbGuSkKEJ8Ueh", "fee": 1000000, "feeAssetId": null, "timestamp": 1651768782474, "version": 2, "chainId": 84, "sender": "3Mt4pmCGGRuWGuNy3pyyRij45rySapd44Mw", "senderPublicKey": "88pVWRX5DjU6wHFa5a8qeFQ3fuykBy1BXq7Z8pjdxhsc", "proofs": [ "3sP6x4257hnfR5cWEDJV7ZauRCPgyQm3ByGWg7sedQDk2znoYavPXj9cifJKopKj8noGgEMSDQHoi4D4cnxc6Nsk" ], "script": "base64:AAIDAAAAAAAAATsIARIAEgAaBgoBYRIBaRoQCgFiEgtTdGFrZWRUb2tlbhoICgFjEgNwbXQaFwoBZBISVXNlclN0YWtlZFRva2VuS2V5GhcKAWUSElVzZXJHb3Zlcm5Ub2tlbktleRoXCgFmEhJVc2VyTGFzdFN0YWtlQmxvY2saHQoBZxIYY3VycmVudEFtb3VudFN0YWtlZFRva2VuGgwKAWgSByRtYXRjaDAaBgoBaRIBYRoZCgFqEhRuZXdBbW91bnRTdGFrZWRUb2tlbhofCgFrEhpDb250cmFjdFdhbGxldFN0YWtlQmFsYW5jZRoQCgFsEgtBY3R1YWxEZWxheRocCgFtEhdVc2VyTGFzdFN0YWtlQmxvY2tWYWx1ZRoPCgFuEgpjdXJyZW50S2V5GhIKAW8SDWN1cnJlbnRBbW91bnQAAAAAAAAAAgAAAAFhAQAAAAVTdGFrZQAAAAAEAAAAAWIBAAAAIDuWMw0Cl6r3boWUBaO2GhLrBr0cYVyuuqg+TPg3fGFFBAAAAAFjCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFhAAAAB3BheW1lbnQDAwkAA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AAABbQQAAAABaAkABBoAAAACBQAAAAR0aGlzBQAAAAFmAwkAAAEAAAACBQAAAAFoAgAAAANJbnQEAAAAAWkFAAAAAWgFAAAAAWkAAAAAAAAAAAAEAAAAAW4JAAJYAAAAAQgIBQAAAAFhAAAABmNhbGxlcgAAAAVieXRlcwQAAAABbwQAAAABaAkABBoAAAACBQAAAAR0aGlzBQAAAAFkAwkAAAEAAAACBQAAAAFoAgAAAANJbnQEAAAAAWkFAAAAAWgFAAAAAWkAAAAAAAAAAAADCQAAZgAAAAIAAAAAAAAAAAAFAAAAAW8JAAACAAAAAQIAAAAeQ2FuJ3Qgd2l0aGRyYXcgbmVnYXRpdmUgYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAFvCQAAAgAAAAEJAAEsAAAAAgIAAABBVXNlciBjYW5ub3Qgd2l0aGRyYXcgbW9yZSB0aGFuIGRlcG9zaXRlZCBmdW5kcywgWW91ciBkZXBvc2l0IGlzOiAJAAGkAAAAAQkAAGkAAAACBQAAAAFvAAAAAAAF9eEAAwkAAGYAAAACCQAAZAAAAAIFAAAAAW0FAAAAAWwFAAAABmhlaWdodAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAAWQFAAAAAW8JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAAWYAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABYQAAAAZjYWxsZXIFAAAAAW8FAAAAAWIFAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAKkNhbm5vdCB1bnN0YWtlIGJlZm9yZSB0aGUgbWluaW11bSBwZXJpb2Q6IAkAAaQAAAABBQAAAAFsAAAAAKw9CGY=", "height": 2038647, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GzhR8NLsR8q5iyotfuQbrgSTYxzUSvSwWUMPVSvS1Dav Next: 2gXdP1dpBJrBLYWHv8eDX8Gtpi1nw6z3ByXb4Wz2tPzL Diff:
OldNewDifferences
3737 let b = base58'51bthK9ab3y4G4gj88qeoQ4XuYM2ex2hape7yc6QzAyS'
3838 let f = (toBase58String(a.caller.bytes) + "_UserLastStakeBlock")
3939 let d = (toBase58String(a.caller.bytes) + "_Stake")
40- let l = (1440 * 7)
40+ let l = (1440 * 1)
4141 let m = {
4242 let h = getInteger(this, f)
4343 if ($isInstanceOf(h, "Int"))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func Stake () = {
88 let b = base58'51bthK9ab3y4G4gj88qeoQ4XuYM2ex2hape7yc6QzAyS'
99 let c = extract(a.payment)
1010 if (if ((c.amount > 0))
1111 then (c.assetId == b)
1212 else false)
1313 then {
1414 let d = (toBase58String(a.caller.bytes) + "_Stake")
1515 let e = (toBase58String(a.caller.bytes) + "_Earnings")
1616 let f = (toBase58String(a.caller.bytes) + "_UserLastStakeBlock")
1717 let g = {
1818 let h = getInteger(this, d)
1919 if ($isInstanceOf(h, "Int"))
2020 then {
2121 let i = h
2222 i
2323 }
2424 else 0
2525 }
2626 let j = (g + c.amount)
2727 let k = assetBalance(this, b)
2828 WriteSet([DataEntry(d, j), DataEntry(f, height)])
2929 }
3030 else throw("Can deposit only StakeToken")
3131 }
3232
3333
3434
3535 @Callable(a)
3636 func WithdrawStakedFunds () = {
3737 let b = base58'51bthK9ab3y4G4gj88qeoQ4XuYM2ex2hape7yc6QzAyS'
3838 let f = (toBase58String(a.caller.bytes) + "_UserLastStakeBlock")
3939 let d = (toBase58String(a.caller.bytes) + "_Stake")
40- let l = (1440 * 7)
40+ let l = (1440 * 1)
4141 let m = {
4242 let h = getInteger(this, f)
4343 if ($isInstanceOf(h, "Int"))
4444 then {
4545 let i = h
4646 i
4747 }
4848 else 0
4949 }
5050 let n = toBase58String(a.caller.bytes)
5151 let o = {
5252 let h = getInteger(this, d)
5353 if ($isInstanceOf(h, "Int"))
5454 then {
5555 let i = h
5656 i
5757 }
5858 else 0
5959 }
6060 if ((0 > o))
6161 then throw("Can't withdraw negative amount")
6262 else if ((0 > o))
6363 then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((o / 100000000))))
6464 else if (((m + l) > height))
6565 then ScriptResult(WriteSet([DataEntry(d, o), DataEntry(f, 0)]), TransferSet([ScriptTransfer(a.caller, o, b)]))
6666 else throw(("Cannot unstake before the minimum period: " + toString(l)))
6767 }
6868
6969

github/deemru/w8io/169f3d6 
33.76 ms