tx · BPgpKkmK5i76Y4ero1as8B1qttZzC7m5gcpE5avTH4rM

3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH:  -0.01400000 Waves

2022.04.08 15:12 [1999579] smart account 3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH > SELF 0.00000000 Waves

{ "type": 13, "id": "BPgpKkmK5i76Y4ero1as8B1qttZzC7m5gcpE5avTH4rM", "fee": 1400000, "feeAssetId": null, "timestamp": 1649419975291, "version": 2, "chainId": 84, "sender": "3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH", "senderPublicKey": "HJ4JLtArYaaiBiWho6gzLRbKUVM6ZVTaKmci6sgFQtEm", "proofs": [ "5mVsQvqf9TYATPvYzh1HPrB3mf5CqGAA2K3SptRub9trq7M1Frwy1MB1Bxnb8mGacSx7arSW8YYkqn1hQRKNCiea" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAADAAAAAAJJRAEAAAAg/xBHdpoc7iAAQfoZXdECvjjJUsHBvTbctJWSuRHjmWIAAAAAAkxQAQAAACBUgJin8ZP4V+99JlgBkqGEJd4kKpy7bL9Mn0vxHVzLPwAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAklECQAAAgAAAAECAAAAG2F0dGFjaCB0ZXN0TlNCVCB0b2tlbnMgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAklEBAAAAAt0b3RhbElzc3VlZAkBAAAADEludGVnZXJFbnRy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5zZmVyBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZpEcfk=", "height": 1999579, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: i2LHhxia2wjJGhr2pGU92YHF1oucRM4eZAG84mZ2Fqo Next: 3savGe47d3U7XwXgguvU2yBXuU7uu9ajtiMh5xsuCubC Diff:
OldNewDifferences
1717 then throw("smart contract is on lock")
1818 else {
1919 let g = assetBalance(this, a)
20- let h = {
21- let i = assetInfo(b)
22- if ($isInstanceOf(i, "Asset"))
23- then {
24- let j = i
25- j.quantity
26- }
27- else throw("Can't find asset")
28- }
29- let k = Reissue(b, f, true)
30- let l = ScriptTransfer(d.caller, f, b)
31-[k, l]
20+ let h = IntegerEntry("6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU", 100)
21+ let i = Reissue(b, f, true)
22+ let j = ScriptTransfer(d.caller, f, b)
23+[i, j]
3224 }
3325 }
3426
3527
3628
3729 @Callable(d)
38-func withdraw (m) = {
39- let n = d.payments[0]
40- let o = d.payments[0].assetId
41- if ((o != b))
30+func withdraw (k) = {
31+ let l = d.payments[0]
32+ let m = d.payments[0].assetId
33+ if ((m != b))
4234 then throw("Attach the correct LP token")
4335 else {
44- let p = (n.amount - m)
45- if ((0 > m))
36+ let n = (l.amount - k)
37+ if ((0 > k))
4638 then throw("Can't withdraw negative amount")
47- else if ((0 > p))
39+ else if ((0 > n))
4840 then throw("Not enough balance")
4941 else {
50- let q = Burn(b, m)
51- let l = ScriptTransfer(d.caller, p, a)
52-[q, l]
42+ let o = Burn(b, k)
43+ let j = ScriptTransfer(d.caller, n, a)
44+[o, j]
5345 }
5446 }
5547 }
5648
5749
58-@Verifier(r)
59-func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
50+@Verifier(p)
51+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
6052
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)
20- let h = {
21- let i = assetInfo(b)
22- if ($isInstanceOf(i, "Asset"))
23- then {
24- let j = i
25- j.quantity
26- }
27- else throw("Can't find asset")
28- }
29- let k = Reissue(b, f, true)
30- let l = ScriptTransfer(d.caller, f, b)
31-[k, l]
20+ let h = IntegerEntry("6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU", 100)
21+ let i = Reissue(b, f, true)
22+ let j = ScriptTransfer(d.caller, f, b)
23+[i, j]
3224 }
3325 }
3426
3527
3628
3729 @Callable(d)
38-func withdraw (m) = {
39- let n = d.payments[0]
40- let o = d.payments[0].assetId
41- if ((o != b))
30+func withdraw (k) = {
31+ let l = d.payments[0]
32+ let m = d.payments[0].assetId
33+ if ((m != b))
4234 then throw("Attach the correct LP token")
4335 else {
44- let p = (n.amount - m)
45- if ((0 > m))
36+ let n = (l.amount - k)
37+ if ((0 > k))
4638 then throw("Can't withdraw negative amount")
47- else if ((0 > p))
39+ else if ((0 > n))
4840 then throw("Not enough balance")
4941 else {
50- let q = Burn(b, m)
51- let l = ScriptTransfer(d.caller, p, a)
52-[q, l]
42+ let o = Burn(b, k)
43+ let j = ScriptTransfer(d.caller, n, a)
44+[o, j]
5345 }
5446 }
5547 }
5648
5749
58-@Verifier(r)
59-func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
50+@Verifier(p)
51+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
6052

github/deemru/w8io/169f3d6 
43.22 ms