tx · B1yyma4EEtnetLDpJ4biwWLhxGF1MSs5Xo5AsPPqE56J 3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH: -0.04000000 Waves 2022.04.18 08:57 [2013605] smart account 3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH > SELF 0.00000000 Waves
{ "type": 13, "id": "B1yyma4EEtnetLDpJ4biwWLhxGF1MSs5Xo5AsPPqE56J", "fee": 4000000, "feeAssetId": null, "timestamp": 1650261544991, "version": 2, "chainId": 84, "sender": "3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH", "senderPublicKey": "HJ4JLtArYaaiBiWho6gzLRbKUVM6ZVTaKmci6sgFQtEm", "proofs": [ "XtGGbLKC5kQ9KrfVRXQiBAwThHHPjS13ZpaaXRP1pKRNc7XyjDMih4KE6LjE4ie97XhgiCRa2eZDQnh7eSYXHBC" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAADAAAAAAJJRAEAAAAg/xBHdpoc7iAAQfoZXdECvjjJUsHBvTbctJWSuRHjmWIAAAAAAkxQAQAAACBUgJin8ZP4V+99JlgBkqGEJd4kKpy7bL9Mn0vxHVzLPwAAAAAJaXNTdG9wcGVkBwAAAAIAAAABaQEAAAAFc3Rha2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACXBtdEFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAAAklECQAAAgAAAAECAAAAG2F0dGFjaCB0ZXN0TlNCVCB0b2tlbnMgb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrBAAAAAppblRyZWFzdXJ5CQAD8AAAAAIFAAAABHRoaXMFAAAAAklEBAAAAAt0b3RhbElzc3VlZAQAAAAHJG1hdGN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AAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UEAAAAB2J1cm5pbmcJAQAAAARCdXJuAAAAAgUAAAACTFAFAAAABmFtb3VudAQAAAAIdHJhbnNmZXIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAJbmV3QW1vdW50BQAAAAJJRAkABEwAAAACBQAAAAdidXJuaW5nCQAETAAAAAIFAAAACHRyYW5zZmVyBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleXTjzvA=", "height": 2013605, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8D3CRxx866SXSLt1nQpSmwNAoFDW2BsodEm8r2MyPsha Next: 5gytzwAFUasdnBk71L6xhuScowbyG2ZHh7XP4oYCZCUD Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'JAfMu2seKNzTVfqi5w5Pjh4kwwPTZPCEFpc2q2vDyFeh' | |
5 | 5 | ||
6 | 6 | let b = base58'6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU' | |
7 | 7 | ||
8 | 8 | let c = false | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func stake () = { | |
12 | 12 | let e = value(d.payments[0]) | |
13 | 13 | let f = e.amount | |
14 | 14 | if ((e.assetId != a)) | |
15 | 15 | then throw("attach testNSBT tokens only") | |
16 | 16 | else if (c) | |
17 | 17 | then throw("smart contract is on lock") | |
18 | 18 | else { | |
19 | 19 | let g = assetBalance(this, a) | |
20 | 20 | let h = { | |
21 | 21 | let i = assetInfo(b) | |
22 | 22 | if ($isInstanceOf(i, "Asset")) | |
23 | 23 | then { | |
24 | 24 | let j = i | |
25 | 25 | j.quantity | |
26 | 26 | } | |
27 | 27 | else throw("Can't find asset") | |
28 | 28 | } | |
29 | 29 | let k = fraction(h, 1, g) | |
30 | 30 | let l = (f * k) | |
31 | 31 | let m = Reissue(b, k, true) | |
32 | 32 | let n = ScriptTransfer(d.caller, k, b) | |
33 | 33 | [m, n] | |
34 | 34 | } | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(d) | |
40 | 40 | func withdraw (o) = { | |
41 | 41 | let p = d.payments[0] | |
42 | 42 | let q = d.payments[0].assetId | |
43 | 43 | if ((q != b)) | |
44 | 44 | then throw("Attach the correct LP token") | |
45 | 45 | else { | |
46 | 46 | let r = (p.amount - o) | |
47 | 47 | if ((0 > o)) | |
48 | 48 | then throw("Can't withdraw negative amount") | |
49 | 49 | else if ((0 > r)) | |
50 | 50 | then throw("Not enough balance") | |
51 | 51 | else { | |
52 | 52 | let s = Burn(b, o) | |
53 | 53 | let n = ScriptTransfer(d.caller, r, a) | |
54 | 54 | [s, n] | |
55 | 55 | } | |
56 | 56 | } | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Verifier(t) | |
61 | 61 | func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) | |
62 | 62 |
github/deemru/w8io/169f3d6 30.75 ms ◑