tx · 867S4Y24bcqCwbTbJVk6eQ7epxWhtDJk1jUaUHk69Lmb

3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH:  -0.04000000 Waves

2022.04.18 08:30 [2013580] smart account 3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH > SELF 0.00000000 Waves

{ "type": 13, "id": "867S4Y24bcqCwbTbJVk6eQ7epxWhtDJk1jUaUHk69Lmb", "fee": 4000000, "feeAssetId": null, "timestamp": 1650259874159, "version": 2, "chainId": 84, "sender": "3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH", "senderPublicKey": "HJ4JLtArYaaiBiWho6gzLRbKUVM6ZVTaKmci6sgFQtEm", "proofs": [ "4aDXfEfsHrGzWeWTwXENpoXWuYJiy7zJBnFu1f37R71v2Dg7ShcTnDk5NoRGCygAPC6Sob7xJ8e1dDAVkZMr4kLm" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAADAAAAAAJJRAEAAAAg/xBHdpoc7iAAQfoZXdECvjjJUsHBvTbctJWSuRHjmWIAAAAAAkxQAQAAACBUgJin8ZP4V+99JlgBkqGEJd4kKpy7bL9Mn0vxHVzLPwAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAklECQAAAgAAAAECAAAAG2F0dGFjaCB0ZXN0TlNCVCB0b2tlbnMgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAklEBAAAAAt0b3RhbElzc3VlZAQAAAAHJG1h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W1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQQAAAAHYnVybmluZwkBAAAABEJ1cm4AAAACBQAAAAJMUAUAAAAGYW1vdW50BAAAAAh0cmFuc2ZlcgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAluZXdBbW91bnQFAAAAAklECQAETAAAAAIFAAAAB2J1cm5pbmcJAARMAAAAAgUAAAAIdHJhbnNmZXIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5dsE61Q==", "height": 2013580, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E5xe143ab6vZLy9xY7xRNqsvTfiSrjJBhx1BjkUPTmym Next: HNdPdcmn76rgjNd15Mpnnx9b4TuXXwjqaHZfopMKnPNB Diff:
OldNewDifferences
2626 }
2727 else throw("Can't find asset")
2828 }
29- let k = Reissue(b, g, true)
30- let l = ScriptTransfer(d.caller, g, b)
31-[k, l]
29+ let k = (h / g)
30+ let l = (f * k)
31+ let m = Reissue(b, l, true)
32+ let n = ScriptTransfer(d.caller, l, b)
33+[m, n]
3234 }
3335 }
3436
3537
3638
3739 @Callable(d)
38-func withdraw (m) = {
39- let n = d.payments[0]
40- let o = d.payments[0].assetId
41- if ((o != b))
40+func withdraw (o) = {
41+ let p = d.payments[0]
42+ let q = d.payments[0].assetId
43+ if ((q != b))
4244 then throw("Attach the correct LP token")
4345 else {
44- let p = (n.amount - m)
45- if ((0 > m))
46+ let r = (p.amount - o)
47+ if ((0 > o))
4648 then throw("Can't withdraw negative amount")
47- else if ((0 > p))
49+ else if ((0 > r))
4850 then throw("Not enough balance")
4951 else {
50- let q = Burn(b, m)
51- let l = ScriptTransfer(d.caller, p, a)
52-[q, l]
52+ let s = Burn(b, o)
53+ let n = ScriptTransfer(d.caller, r, a)
54+[s, n]
5355 }
5456 }
5557 }
5658
5759
58-@Verifier(r)
59-func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
60+@Verifier(t)
61+func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
6062
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'JAfMu2seKNzTVfqi5w5Pjh4kwwPTZPCEFpc2q2vDyFeh'
55
66 let b = base58'6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU'
77
88 let c = false
99
1010 @Callable(d)
1111 func stake () = {
1212 let e = value(d.payments[0])
1313 let f = e.amount
1414 if ((e.assetId != a))
1515 then throw("attach testNSBT tokens only")
1616 else if (c)
1717 then throw("smart contract is on lock")
1818 else {
1919 let g = assetBalance(this, a)
2020 let h = {
2121 let i = assetInfo(b)
2222 if ($isInstanceOf(i, "Asset"))
2323 then {
2424 let j = i
2525 j.quantity
2626 }
2727 else throw("Can't find asset")
2828 }
29- let k = Reissue(b, g, true)
30- let l = ScriptTransfer(d.caller, g, b)
31-[k, l]
29+ let k = (h / g)
30+ let l = (f * k)
31+ let m = Reissue(b, l, true)
32+ let n = ScriptTransfer(d.caller, l, b)
33+[m, n]
3234 }
3335 }
3436
3537
3638
3739 @Callable(d)
38-func withdraw (m) = {
39- let n = d.payments[0]
40- let o = d.payments[0].assetId
41- if ((o != b))
40+func withdraw (o) = {
41+ let p = d.payments[0]
42+ let q = d.payments[0].assetId
43+ if ((q != b))
4244 then throw("Attach the correct LP token")
4345 else {
44- let p = (n.amount - m)
45- if ((0 > m))
46+ let r = (p.amount - o)
47+ if ((0 > o))
4648 then throw("Can't withdraw negative amount")
47- else if ((0 > p))
49+ else if ((0 > r))
4850 then throw("Not enough balance")
4951 else {
50- let q = Burn(b, m)
51- let l = ScriptTransfer(d.caller, p, a)
52-[q, l]
52+ let s = Burn(b, o)
53+ let n = ScriptTransfer(d.caller, r, a)
54+[s, n]
5355 }
5456 }
5557 }
5658
5759
58-@Verifier(r)
59-func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
60+@Verifier(t)
61+func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
6062

github/deemru/w8io/169f3d6 
29.94 ms