diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..83c31f3 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,130 @@ +# Cosmos TXs Tracer Contributor Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers to make participation in our project and our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment include: + +- Using welcoming and inclusive language +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best for the overall community +- Demonstrating empathy and kindness toward other people + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and unwelcome sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or any electronic + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within the community spaces and in public +spaces when an individual is representing the project or its community. +Examples of representing a project or community include using an official +e-mail address, posting via an official social media account, or acting as an +appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All complaints will be reviewed and +investigated and will result in a response that is deemed necessary and +appropriate to the circumstances. The project team is obligated to maintain +confidentiality with regard to the reporter of an incident. + +## Enforcement Guidelines + +Community maintainers will follow these Community Impact Guidelines in +determining the consequences for any action they deem in violation of this Code +of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community maintainers, +providing clarity around the nature of the violation and an explanation +of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved for a specified period of time. This +includes avoiding interactions in project and community spaces as well as +external channels like social media. Violating these terms may lead to a +temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][mozilla coc]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][faq]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[mozilla coc]: https://github.com/mozilla/diversity +[faq]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..12b818c --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,100 @@ +# Contributing in Cosmos TXs Tracer πŸ” + +First of all, thanks for investing your time in contributing this project! :partying_face: :hugs: + +The following guide will help you in workflow for Contributing to Cosmos TXs Tracer, as opening an issue or creating a PR. Feel free to propose changes to this document in a pull request. To get an overview of the project, read the [README](README.md). + +## I have a question. How can I ask? :thinking_face: + +> **Note:** Please don't create an issue to simply ask a question. You'll get faster results by using our channels like: + +- [Official nabla Discord server](https://discord.gg/WzXYRd3AwH) (**recommended**) :gear: +- [nabla Official Twitter account](https://twitter.com/nabla_hq) :bulb: + +## How Can I Contribute? :handshake: + +### Reporting Bugs :bug: + +This section guides you through submitting a bug report for Cosmos TXs Tracer. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer:, and find related reports (when exists) :mag_right:. + +#### Before Submitting A Bug Report :ballot_box_with_check: + +- **Check if you can reproduce** the problem in the **latest version** of Cosmos TXs Tracer. +- **Perform a [cursory search](https://github.com/search?q=is%3Aissue+repo%3Anabla-studio%2Fcosmos-txs-tracer)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. + +> **Note:** If you find a **Closed** issue which seems to describe your issue, open a new one and reference the original issue in the body of your new one. + +#### How to submit a Bug Report? :incoming_envelope: + +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on this repository and provide the needed information by filling in [the template](https://github.com/nabla-studio/cosmos-txs-tracer/issues/new?assignees=&labels=bug&template=BUG-REPORT.yml&title=%5BBug%5D%3A+). + +You have to completely explain the problem and include additional details to help maintainers reproduce the problem: + +- **Choose a clear and descriptive title** for the issue to identify the related problem. +- **Describe the exact steps to reproduce the problem** in as many details as possible. For example, start by explaining what action you produced. When listing steps, don't just say what you did, but explain **how** you did it. For example, if you reached a page, explain if you reached from direct link, or tapping some buttons. +- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. +- **Explain which behavior you expected to see instead and why.** +- **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. +- **Include your public addresses**, if available +- **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below. + +Provide more context by answering: + +- **Is it possible to reliably reproduce this issue?** If not, please try to provide details about how often the problem happens and under which conditions it normally happens. +### Suggesting Enhancements :sparkles: + +This section guides you through submitting an enhancement suggestion for Cosmos TXs Tracer, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. + +#### Before Submitting An Enhancement Suggestion :ballot_box_with_check: + +- **Perform a [cursory search](https://github.com/search?q=is%3Aissue+repo%3Anabla-studio%2Fcosmos-txs-tracer)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. + +#### How to submit a Enhancement Suggestion? :incoming_envelope: + +Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue on this repository and provide the needed information by filling in [the template](https://github.com/nabla-studio/cosmos-txs-tracer/issues/new?assignees=&labels=enhancement%2Cimprovement&template=ENHANCEMENT-REPORT.yml&title=%5BEnhancement%5D%3A+). + +You have to explain the suggestion you want to propose and include additional details to help maintainers understand the suggestion: + +- **Use a clear and descriptive title** for the issue to identify the suggestion. +- **Describe the current behavior** and **explain which behavior you expected to see instead** and why, by explaining as many steps as you can to correctly understand the whole story. +- **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Cosmos TXs Tracer which the suggestion is related to. +- **Explain why this enhancement would be useful** to most Cosmos TXs Tracer users. +- **List, if there exist, some other Mobile Wallet or similar services where this enhancement exists.** + +### How to provide solutions :construction::heavy_plus_sign: + +We love pull requests. Please follow these steps to have your contribution considered by the maintainers: + +#### Getting Started :beginner: + +1. Make sure you have a [**GitHub account**](https://github.com/signup/free>). +2. If you want to help in fixing a bug or to propose a solution for an improvement, firstly **check if there exists a related issue**. Otherwise **create a new one following the above documentation**. +3. **Fork the repository** on GitHub. +4. **Create a branch** for your edits starting by the `main` one. + +#### Commit your update :new: + +Commit the changes once you are happy with them. We use conventional commits on our repo, so please, **follow that convention**. + +Once your changes are ready, don't forget to self-review to speed up the review process :zap:. + +#### Pull Request :twisted_rightwards_arrows: + +When you're finished with the changes, create a pull request, also known as a PR. + +1. **Fill the "Pull Request" template** to help the reviewers understanding your changes as well as the purpose of your pull request. +2. Don't forget to [**link PR to issue**](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). +3. **Enable the checkbox** to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. + +Once you submit your PR, a team member will review your proposal. We may ask questions or request for additional information. + +- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. +- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). + +#### Thank you! :pray: + +Congratulations, your work is now available to the whole nabla community. :tada::clap: + +The nabla team thanks you :sparkles:. + +We also thanks to Github and Faker.py team for their contributing guides. diff --git a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml new file mode 100644 index 0000000..ba38a86 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml @@ -0,0 +1,46 @@ +--- +name: "\U0001F41B Bug Report" +description: "If something isn't working as expected \U0001F914" +title: '[Bug]: ' +labels: ['bug'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: checkboxes + id: prerequisites + attributes: + label: Prerequisites + description: Ensure to have completed the submission checklist + options: + - label: You read the guidelines for contributing. + required: true + - label: You are able to reproduce the problem in the latest version of Cosmos TXs Tracer. + required: true + - label: You checked that the problem has not yet been reported (also through closed issues). + required: true + - type: textarea + id: step-description + attributes: + label: Describe the exact steps to reproduce the problem in as many details as possible + description: When listing steps, don’t just say what you did, but explain how you did it. + placeholder: Tell us what you did to obtain the issue. + validations: + required: true + - type: textarea + id: bug-description + attributes: + label: Describe the issue behavior + description: Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior. + placeholder: Tell us what you see. + validations: + required: true + - type: textarea + id: txs + attributes: + label: Transactions + description: Please insert some transaction hashes to guarantee a deeper debug (it is not required, but could help!). + placeholder: ex. BB53FB... + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT-REPORT.yml b/.github/ISSUE_TEMPLATE/ENHANCEMENT-REPORT.yml new file mode 100644 index 0000000..45ebc7c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ENHANCEMENT-REPORT.yml @@ -0,0 +1,44 @@ +--- +name: "\U0001F680 Enhancement Proposal Report" +description: "If I think something could be improved \U00002692" +title: '[Enhancement]: ' +labels: ['enhancement', 'improvement'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this enhancement report! + - type: checkboxes + id: prerequisites + attributes: + label: Prerequisites + description: Ensure to have completed the submission checklist + options: + - label: You read the guidelines for contributing. + required: true + - label: You checked that the enhancement has not yet been reported (also through closed issues). + required: true + - type: textarea + id: enhancement-description + attributes: + label: Describe the current behavior + description: Describe the current behavior and explain which behavior you expected to see instead and why, by explaining as many steps as you can to correctly understand the whole story. + placeholder: Tell us what you see and what you what you would like to see. + validations: + required: true + - type: textarea + id: usage-description + attributes: + label: Explain the motivation + description: Explain why this enhancement would be useful to most Cosmos TXs Tracer users. + placeholder: Tell us why we should work on this enhancement. + validations: + required: true + - type: textarea + id: references + attributes: + label: Provide a list of references + description: List, if there exist, some other mobile Wallet or similar services where this enhancement exists. + placeholder: Tell us who else provides this enhancement. + validations: + required: false \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..571d051 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ +### :nerd_face: Describe the purpose of the Pull Request + +Describe the big picture of your changes, to communicate to the maintainers why they should accept this pull request. + +### :rotating_light: Ensure to have answered all the submission questions + +- [ ] You read the guidelines for contributing. +- [ ] You correctly created an issue about the things you want to solve with this PR. +- [ ] You are requesting to **pull a topic/feature/bugfix branch** (right side). Don't request your master! +- [ ] You checked the commits' message styles matches our requested structure. +- [ ] You added necessary documentation (where needed). +- [ ] You performed fully tests on your code. +- [ ] You are introducing breaking changes. + +### :link: Issue linking + +Please, provide the id of the issues you want to solve with this PR. + +### :heart: Thanks! + +Thanks for taking the time in contributing to Cosmos TXs Tracer! diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..976a8dd --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2023 nabla s.r.l. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 7558f90..ec6ca18 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,109 @@ -# CosmosTxsTracer +# πŸ” Cosmos TXs Tracer - +Cosmos TXs Tracer is a repository containing a TypeScript-based package, the +`txs-tracer-core` that enables to track a transaction on the Cosmos ecosystem, +and some demo applications that allow to test such a package. The tracer is +able to track both single chain transactions and IBC (cross-chain) ones, by +listening on the channel through a websocket connection, wihtout the usage of +polling. -✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ +## 🌐 Overview -## Understand this workspace +The core package, is the implementation of two different FSMs that are +represented below. The first, implementing a tracker for single chain +transactions, which, in the success scenario, proceeds as follows: + +1. initiates a websocket connection to the node server; +2. sends a query message to subscribe a specific event; +3. if does not receive any tx up to a particular point in time, a timeout fires + and a search is performed. + +![Single chain tx track FSM](https://github.com/nabla-studio/cosmos-txs-tracer/blob/main/docs/single_tx.jpeg) + +The second, implements a tracker for IBC transactions, which involves tracking +transactions between multiple chains. In the success scenario, it proceeds as +follows: + +1. send a packet (executing the listening as described above); +2. wait for the acknowledgement of the packet (executing the listening as + described above); +3. it is considered completed only if receives the acknowledgement packet. + +![IBC tx track FSM](https://github.com/nabla-studio/cosmos-txs-tracer/blob/main/docs/ibc_tx.jpeg) + +In the end, the demo applications provides the ability to test the package in +two different scenarios: + +1. The `apps/demo-app` simply show an example where it is possible to track a + single tx. In particular, it listen on the first swap message it is sent; +2. The `apps/demo-app-cosmos` is a more complex example, using also the + cosmos-kit, where the user is able to connect his wallet and perform TXs on the + mainnet. More specifically, the user can: + +- SEND and check the status of such a send transaction +- Perform an IBC between Osmosis and Cosmos and follow the whole transaction, + by checking the IBC transfer status. + +## πŸ”§ Installation + +Node.js is required to run the project. + +1. Clone the repository to your local machine: + +```bash +git clone https://github.com/nabla-studio/cosmos-tx-tracer.git +``` + +2. Install the dependencies: + +```bash +cd cosmos-tx-tracer +pnpm i +``` + +3. Start the development server for the one of the example app: + +```bash +nx serve APP_NAME +``` + +example, to run the example `apps/demo-app`: + +```bash +nx serve demo-app +``` + +4. Open your browser and navigate to http://localhost:4200 to see the app in + action. + +### Understand this workspace Run `nx graph` to see a diagram of the dependencies of the projects. -## Remote caching +### Remote caching + +Run `npx nx connect-to-nx-cloud` to enable remote caching and make CI faster. + +## πŸ‘₯ Authors + +πŸ‘€ **Davide Segullo** (Code) + +- Github: [@DavideSegullo](https://github.com/DavideSegullo) +- Twitter: [@davide_segullo](https://twitter.com/davide_segullo) + +## πŸŽ‰ Contributing + +We ❀️ contributions! If you'd like to contribute, please read our contributing +guidelines. + +## πŸ“œ License + +This project is licensed under the Apache-2.0 License. See the LICENSE file for +more information. -Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster. +## πŸ™‹ Support -## Further help +If you have any questions or comments about this project, please feel free to +contact us on discord. -Visit the [Nx Documentation](https://nx.dev) to learn more. +Copyright Β© 2023 [nabla](https://github.com/nabla-studio). diff --git a/docs/ibc_tx.jpeg b/docs/ibc_tx.jpeg new file mode 100644 index 0000000..b16ff16 Binary files /dev/null and b/docs/ibc_tx.jpeg differ diff --git a/docs/single_tx.jpeg b/docs/single_tx.jpeg new file mode 100644 index 0000000..09a61a8 Binary files /dev/null and b/docs/single_tx.jpeg differ