tx · E75tUB8UfyrFxqfMTpSMQJREEnex3jh7QQab5gkg1jTt

3Mq4LDNtBNSJicpMR5TxG89n1D9mMavMAj7:  -0.04000000 Waves

2022.04.15 15:58 [2009699] smart account 3Mq4LDNtBNSJicpMR5TxG89n1D9mMavMAj7 > SELF 0.00000000 Waves

{ "type": 13, "id": "E75tUB8UfyrFxqfMTpSMQJREEnex3jh7QQab5gkg1jTt", "fee": 4000000, "feeAssetId": null, "timestamp": 1650027570748, "version": 2, "chainId": 84, "sender": "3Mq4LDNtBNSJicpMR5TxG89n1D9mMavMAj7", "senderPublicKey": "FJZaKJq3aMAC6bg2qfp2qgfv31a2jNRDaYaCR9TY5HP3", "proofs": [ "5NM1rFUk4qs2NPzU4Q7mC6UGr5rFjnzYosgbnz5Bbnm3P6YpxNQKGgYSPd2Kd5Mk2UJ87AyGSFKBBaEuKCnu2EQw" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAADAAAAAAJJRAEAAAAgx9nxFhF/Vet+hUeMSuI6u+gulwcg4JEAkzyDXj2OTUcAAAAAAkxQAQAAACAadIp7bdSyK0gbz1W2AjU0nxj3S33gDXc8ar9GU2PFIwAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAklECQAAAgAAAAECAAAAG2F0dGFjaCB0ZXN0TlNCVCB0b2tlbnMgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAklEBAAAAAt0b3RhbElzc3VlZAQAAAAHJG1hdGNoMAkAA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2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQQAAAAHYnVybmluZwkBAAAABEJ1cm4AAAACBQAAAAJMUAUAAAAGYW1vdW50BAAAAAh0cmFuc2ZlcgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAluZXdBbW91bnQFAAAAAklECQAETAAAAAIFAAAAB2J1cm5pbmcJAARMAAAAAgUAAAAIdHJhbnNmZXIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V55uI8+g==", "height": 2009699, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 14eTN7BkapEHnSXWQ7C6WyGN1xy1JsDUnjYXmFpEuaGm Next: 75w1197Pc7fX3iQHDABWyhKxgXxAqyZqUBrBeaAr5RTj Diff:
OldNewDifferences
2626 }
2727 else throw("Can't find asset")
2828 }
29- let k = (((h * 100000000) / ((g * 100000000) - f)) * f)
29+ let k = (((h * 100000000) / (g * 100000000)) * f)
3030 let l = (k / 100000000)
3131 let m = Reissue(b, l, true)
3232 let n = ScriptTransfer(d.caller, l, b)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'ET8t5TozeUrUQfMzLzVeHTVo2vmiEeu2apj3AN6zwzsG'
55
66 let b = base58'2nGfqMHdunJuX8jYzruMKz1e1vMNrhJtWMjHizRhB8Fk'
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 = (((h * 100000000) / ((g * 100000000) - f)) * f)
29+ let k = (((h * 100000000) / (g * 100000000)) * f)
3030 let l = (k / 100000000)
3131 let m = Reissue(b, l, true)
3232 let n = ScriptTransfer(d.caller, l, b)
3333 [m, n]
3434 }
3535 }
3636
3737
3838
3939 @Callable(d)
4040 func withdraw (o) = {
4141 let p = d.payments[0]
4242 let q = d.payments[0].assetId
4343 if ((q != b))
4444 then throw("Attach the correct LP token")
4545 else {
4646 let r = (p.amount - o)
4747 if ((0 > o))
4848 then throw("Can't withdraw negative amount")
4949 else if ((0 > r))
5050 then throw("Not enough balance")
5151 else {
5252 let s = Burn(b, o)
5353 let n = ScriptTransfer(d.caller, r, a)
5454 [s, n]
5555 }
5656 }
5757 }
5858
5959
6060 @Verifier(t)
6161 func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
6262

github/deemru/w8io/169f3d6 
25.17 ms