tx · BastVKfqQe28s41833wDTESM4tQo8f4YbPtoMhzpNeiQ 3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr: -0.01000000 Waves 2023.05.02 11:19 [2559893] smart account 3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr > SELF 0.00000000 Waves
{ "type": 13, "id": "BastVKfqQe28s41833wDTESM4tQo8f4YbPtoMhzpNeiQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1683015630321, "version": 2, "chainId": 84, "sender": "3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr", "senderPublicKey": "FDZa2xgu4cguexFSg1X8LsKUrqcYEcLGDpixvT2hNxE5", "proofs": [ "6s21jUSPQtbXwTuNV5QahgwSDrXP18dLgzMEJA26N682irK8opv5TsTfKzwcUP2PXFLMnntuu8dsxzFE5BqAJGL" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAADAAAAAAh4dG5hcHlJZAEAAAAEE6vZMwAAAAAFeHRuSWQBAAAAIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AAAAAAlpc1N0b3BwZWQHAAAAAgAAAAFpAQAAAA9idXlYVE5BUFlmb3JYVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABXh0bklkCQAAAgAAAAECAAAAFWF0dGFjaCBYVE4gdG9rZW4gb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAh4dG5hcHlJZAUAAAADbmlsAAAAAWkBAAAAEHNlbGxYVE5BUFlmb3JYVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAACHh0bmFweUlkCQAAAgAAAAECAAAAGGF0dGFjaCBYVE5BUFkgdG9rZW4gb25seQMFAAAACWlzU3RvcHBlZAkAAAIAAAABAgAAABlzbWFydCBjb250cmFjdCBpcyBvbiBsb2NrCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAV4dG5JZAUAAAADbmlsAAAAAAu8/OM=", "height": 2559893, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7H6UZtvP9KzJmodBMWpgzK41qdHMdJnEazjnohA1kEA6 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let xtnapyId = base58'WAVES' | |
5 | + | ||
6 | + | let xtnId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
7 | + | ||
8 | + | let isStopped = false | |
9 | + | ||
10 | + | @Callable(i) | |
11 | + | func buyXTNAPYforXTN () = { | |
12 | + | let pmt = value(i.payments[0]) | |
13 | + | let amount = pmt.amount | |
14 | + | if ((pmt.assetId != xtnId)) | |
15 | + | then throw("attach XTN token only") | |
16 | + | else if (isStopped) | |
17 | + | then throw("smart contract is on lock") | |
18 | + | else [ScriptTransfer(i.caller, amount, xtnapyId)] | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func sellXTNAPYforXTN () = { | |
25 | + | let pmt = value(i.payments[0]) | |
26 | + | let amount = pmt.amount | |
27 | + | if ((pmt.assetId != xtnapyId)) | |
28 | + | then throw("attach XTNAPY token only") | |
29 | + | else if (isStopped) | |
30 | + | then throw("smart contract is on lock") | |
31 | + | else [ScriptTransfer(i.caller, amount, xtnId)] | |
32 | + | } | |
33 | + | ||
34 | + |
github/deemru/w8io/169f3d6 17.46 ms ◑