Chatterpay is a Wallet for WhatsApp that integrates AI and Account Abstraction, enabling any user to use blockchain easily and securely without technical knowledge.
Create Wallet, Transfer, Swap, and mint NFTs — directly from WhatsApp!
Built for: Level Up Hackathon - Ethereum Argentina 2024 & Ethereum Uruguay 2024
Build By: mpefaur, tomasfrancizco, TomasDmArg, gonzageraci, dappsar
Get started with our Bot 🤖:
Components
- Landing Page (product, source code)
- User Dashboard Website (product, source code)
- Backend API (source code)
- Smart Contracts (source code)
- Data Indexing (Subgraph) (source code) (this repo)
- Bot AI (Chatizalo) (product)
- Bot AI Admin Dashboard Website (product)
This repository contains a GraphQL API designed for tracking deposits from non-Chatters to ChatterPay Accounts.
It indexes from a defined block in the Scroll network, representing when the latest deployment started.
Currently, only the following tokens are included: USDT, and WETH, which are supported by ChatterPay. More may be added in the future.
Built With
- GraphQL CLI: The Graph CLI
- Language: TypeScript
This section explains, step by step, how to set up and run the ChatterPay Subgraph locally, in development, or in production. It assumes no prior experience with The Graph, GraphQL, or blockchain indexing.
Make sure the following are installed on your system:
| Tool | Purpose | Install |
|---|---|---|
| git | clone the repository | Download |
| nvm | manage Node.js versions | nvm-sh/nvm |
| Node.js (≥ 18.x) & npm | core JavaScript runtime | comes with nvm |
| Yarn (optional but recommended) | dependency manager | npm install -g yarn |
| Docker + Docker Compose | runs the local Graph Node, IPFS, and Postgres | Install Docker |
| The Graph CLI | main CLI tool for subgraphs | see .doc/development/install_graph_cli.md |
git clone https://github.com/P4-Games/ChatterPay-Subgraph.git
cd ChatterPay-Subgraph
yarn install # or npm installIf you hit dependency errors (proxy, timeout, or registry issues), reset npm/yarn configs:
set http_proxy=
set https_proxy=
npm config rm https-proxy
npm config rm proxy
npm config set registry "https://registry.npmjs.org"
yarn cache clean
yarn config delete proxy
yarn --network-timeout 100000Before running the subgraph, you must prepare your environment. This process is automated through a single command.
The setup-local script installs and configures everything required to run the subgraph locally:
- Installs The Graph CLI (via npm) if not present
- Sets up and starts Docker containers (Graph Node, IPFS, and Postgres)
- Detects or prompts for the target network (
scrollorscroll-sepolia) - Generates
subgraph.yamlandschema.graphqlfor the selected network - Runs
graph codegenandgraph build - Deploys the subgraph to your local Graph Node
Run the full setup with:
yarn setup-local
# or
npm run setup-localDuring execution, the script will ask:
🌐 Select network (scroll / scroll-sepolia):
You can also skip the prompt by providing the network directly:
yarn setup-local scroll
# or
yarn setup-local scroll-sepoliaIf you encounter issues specifically with The Graph CLI installation, you can manually reinstall or fix it following: ➡️ ./.doc/development/install_graph_cli.md
Once everything is up and running, open:
http://localhost:8000/subgraphs/name/chatterpay-subgraph/graphql
You can explore and run queries directly in the browser using the built-in GraphQL playground.
After the containers are started, the subgraph will begin syncing blocks from the network.
The starting block number is defined in networks.json.
If the block number is far behind the current chain head, syncing may take a while — that’s normal.
Once synchronization is complete, you can test it by performing a transaction in ChatterPay. Check the logs of the Graph Node container to confirm the subgraph picked it up.
To view the logs:
yarn docker-logsFor details on how to access the Postgres container, explore schemas, and verify that your subgraph entities are being indexed correctly (e.g., ERC20Transfer, ChatterPayAccount), see:
➡️ ./.doc/development/postgresql_commands.md
When you edit any files in src/**, regenerate and rebuild the subgraph:
node scripts/generate-subgraph.js
graph codegen
graph build/build
/generated
/subgraph.yaml
For test and production installation steps, see ➡️ ./.doc/implementation/implementation.md
Contribution
Thank you for considering helping out with the source code! We welcome contributions from anyone on the internet and are grateful for even the smallest fixes.
If you'd like to contribute to ChatterPay, please fork, fix, commit, and send a pull request for the maintainers to review and merge into the main code base. For more complex changes, please check with the core devs first to ensure alignment with the project’s philosophy and to simplify the review process.
Contributors
See more in: https://github.com/P4-Games/chatterPay-Subgraph/graphs/contributors
