Skip to content

Commit

Permalink
Merge pull request #3 from tangle-network/trung-tin/services-pallet-i…
Browse files Browse the repository at this point in the history
…ndexing
  • Loading branch information
AtelyPham authored Nov 4, 2024
2 parents 3ba1512 + b361679 commit 2b214d4
Show file tree
Hide file tree
Showing 35 changed files with 1,188 additions and 62 deletions.
44 changes: 34 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<h1 align="left"> webb-graphql </h1>
<p align="left">
<strong>A collection of GraphQL queries and clients for Webb's protocols. </strong>
<strong>A collection of GraphQL queries and clients for Tangle Network. </strong>
</p>

<!-- TABLE OF CONTENTS -->
Expand All @@ -21,40 +21,64 @@
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#contribute">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#need-help">Need help?</a></li>
</ul>
</details>

<h1 id="start"> Getting Started </h1>

Webb-GraphQL contains packages for GraphQL queries and clients for our various applications and infrastructures. Namely GraphQL queries/client for Tangle MPC pallets and Webb's VAnchor private bridge application.
Tangle GraphQL contains packages for GraphQL queries and clients for our various applications and infrastructures. Namely GraphQL queries/client for Tangle Network pallets.

<h2 id="prerequisites"> Prerequisites</h2>

Before you begin, ensure you have met the following requirements:

- You have installed the latest version of Node.js and npm.
- [NodeJS](https://nodejs.org/en/): A modern (e.g. the LTS version) installation of NodeJS.
- [Docker](https://www.docker.com/): The project will use Docker to run a local version of the SubQuery's node.

<h2 id="installation"> Installation </h2>

To install Webb-GraphQL packages:
To install Tangle GraphQL packages:

```bash
yarn install
```

<h2 id="usage"> Usage </h2>

To use Webb-GraphQL, refer to the README.md of the package you are interested in.
To use Tangle GraphQL, refer to the README.md of the package you are interested in.

<h2 id="contribute"> Contributing </h2>

Interested in contributing to Webb-GraphQL? We appreciate your interest! We are always appreciative for contributions from the open-source community!
Interested in contributing to Tangle GraphQL? We appreciate your interest! We are always appreciative for contributions from the open-source community!

If you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!

<h2 id="license"> License </h2>
<h2 id="need-help"> Need help? </h2>

Licensed under <a href="LICENSE">GNU General Public License v3.0</a>.
If you need help or you want to additional information please:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the GNU General Public License v3.0 license, shall be licensed as above, without any additional terms or conditions.
- Refer to the [Tangle Network Official Documentation](https://docs.tangle.tools/) or [Webb Official Documentation](https://docs.webb.tools/).
- If you have feedback on how to improve the dApp interface or you have a specific question? Check out the [Tangle dApp Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/tangle-dapp) or [Webb dApp Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/webb-dapp-feedback).
- If you found a bug please [open an issue](https://github.com/webb-tools/webb-dapp/issues/new/choose) or [join our Discord](https://discord.gg/jUDeFpggrR) server to report it.

---

**Follow us at**
[![Follow Tangle on twitter](https://img.shields.io/twitter/follow/tangle_network.svg?style=social)](https://twitter.com/intent/follow?screen_name=tangle_network)
[![Follow Webb on twitter](https://img.shields.io/twitter/follow/webbprotocol.svg?style=social)](https://twitter.com/intent/follow?screen_name=webbprotocol)
[![Follow Webb on LinkedIn](https://img.shields.io/badge/LinkedIn-webbprotocol-blue?style=flat&logo=linkedin&logoColor=b0c0c0&labelColor=363D44)](https://www.linkedin.com/company/webb-protocol/)

---

**Share** the project link with your network on social media.

<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//github.com/webb-tools/webb-dapp" target="_blank">
<img src="https://img.shields.io/twitter/url?label=LinkedIn&logo=LinkedIn&style=social&url=https%3A%2F%2Fgithub.com%2Fwebb-tools%2Fwebb-dapp" alt="Share on LinkedIn"/>
</a>
<a href="https://twitter.com/intent/tweet?text=%F0%9F%9A%80%20Explore%20%60webb-tools/webb-dapp%60%20Monorepo%20on%20Github%3A%20your%20%23zeroKnowledgeApp%20in%20%23blockchain.%20Secure%2c%20efficient%20%23crypto%20interactions%20await!%0A%0ADive%20in%20%E2%9E%A1%EF%B8%8F%20https%3A//github.com/webb-tools/webb-dapp%20%23webbEcosystem" target="_blank">
<img src="https://img.shields.io/twitter/url?label=Twitter&logo=Twitter&style=social&url=https%3A%2F%2Fgithub.com%2Fwebb-tools%2Fwebb-dapp" alt="Shared on Twitter"/>
</a>
<a href="https://t.me/share/url?text=%F0%9F%9A%80%20Explore%20%60webb-tools/webb-dapp%60%20Monorepo%20on%20Github%3A%20your%20%23zeroKnowledgeApp%20in%20%23blockchain.%20Secure%2c%20efficient%20%23crypto%20interactions%20await!%0A%0ADive%20in%20%E2%9E%A1%EF%B8%8F%20https%3A//github.com/webb-tools/webb-dapp%20%23webbEcosystem&url=https%3A%2F%2Fgithub.com%2Fwebb-tools%2Fwebb-dapp" target="_blank">
<img src="https://img.shields.io/twitter/url?label=Telegram&logo=Telegram&style=social&url=https%3A%2F%2Fgithub.com%2Fawebb-tools%webb-dapp" alt="Share on Telegram"/>
</a>
20 changes: 11 additions & 9 deletions packages/tangle-subql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,19 @@ For this project, you can try to query with the following GraphQL code to get a
```graphql
{
query {
transfers {
operators {
nodes {
id
amount
blockNumber
date
from {
id
}
to {
id
currentStake
scheduledUnstakeAmount
joinedAt
lastUpdatedAt
statusHistory {
nodes {
id
status
blockNumber
}
}
}
}
Expand Down
80 changes: 80 additions & 0 deletions packages/tangle-subql/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,86 @@ const project: SubstrateProject = {
method: 'Created',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleBlueprintCreated',
filter: {
module: 'services',
method: 'BlueprintCreated',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleJobCalled',
filter: {
module: 'services',
method: 'JobCalled',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleJobResultSubmitted',
filter: {
module: 'services',
method: 'JobResultSubmitted',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleRegistered',
filter: {
module: 'services',
method: 'Registered',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleServiceInitiated',
filter: {
module: 'services',
method: 'ServiceInitiated',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleServiceRequestApproved',
filter: {
module: 'services',
method: 'ServiceRequestApproved',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleServiceRequested',
filter: {
module: 'services',
method: 'ServiceRequested',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleServiceRequestRejected',
filter: {
module: 'services',
method: 'ServiceRequestRejected',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleServiceTerminated',
filter: {
module: 'services',
method: 'ServiceTerminated',
},
},
{
kind: SubstrateHandlerKind.Event,
handler: 'handleUnregistered',
filter: {
module: 'services',
method: 'Unregistered',
},
},
],
},
},
Expand Down
Loading

0 comments on commit 2b214d4

Please sign in to comment.