Skip to content

ChatterPay: A wallet for WhatsApp that integrates AI and Account Abstraction, enabling any user to easily and securely use blockchain without technical knowledge.

Notifications You must be signed in to change notification settings

P4-Games/ChatterPay-Subgraph

Repository files navigation

ChatterPay

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 🤖:

WhatsApp Bot

Components

 

Components Interaction

About this repo

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

Getting Started

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.

🧰 1. Requirements

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

📥 2. Clone and install dependencies

git clone https://github.com/P4-Games/ChatterPay-Subgraph.git
cd ChatterPay-Subgraph
yarn install  # or npm install

If 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 100000

⚙️ 3. Local Environment

Setup

Before 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 (scroll or scroll-sepolia)
  • Generates subgraph.yaml and schema.graphql for the selected network
  • Runs graph codegen and graph build
  • Deploys the subgraph to your local Graph Node

Run the full setup with:

yarn setup-local
# or
npm run setup-local

During 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-sepolia

If you encounter issues specifically with The Graph CLI installation, you can manually reinstall or fix it following: ➡️ ./.doc/development/install_graph_cli.md

Working with data

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-logs

Inspecting the Database (PostgreSQL)

For 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

Update and rebuild during development

When you edit any files in src/**, regenerate and rebuild the subgraph:

node scripts/generate-subgraph.js
graph codegen
graph build

Temporary build files (not committed to the repository)

/build
/generated
/subgraph.yaml

⚙️ 4. Test and Production Environment Setup

For test and production installation steps, see ➡️ ./.doc/implementation/implementation.md

Additional Info

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

 

X Instagram LinkedIn Facebook YouTube WhatsApp Community

About

ChatterPay: A wallet for WhatsApp that integrates AI and Account Abstraction, enabling any user to easily and securely use blockchain without technical knowledge.

Topics

Resources

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •