Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numotrade/indexer
Real-time data on Numo markets.
https://github.com/numotrade/indexer
amm ethereum indexer ponder
Last synced: 4 days ago
JSON representation
Real-time data on Numo markets.
- Host: GitHub
- URL: https://github.com/numotrade/indexer
- Owner: numotrade
- Created: 2024-06-30T16:52:43.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-02T00:01:10.000Z (5 months ago)
- Last Synced: 2024-11-02T18:32:35.410Z (13 days ago)
- Topics: amm, ethereum, indexer, ponder
- Language: TypeScript
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Numo GraphQL API
The repo contains the indexer for the Numo v1 smart contract suite deployed on Arbitrum.
## Set up
- Run `bun i` to install dependancies.
- Create a `.env` file and add an RPC endpoint.
- Run bun dev to start development server.## Sample queries
### Get the current balance and all approvals for an account
```graphql
{
account(id: "0x1337f7970E8399ccbc625647FCE58a9dADA5aA66") {
balance
approvals {
spender
amount
}
}
}
```### Get the top 10 accounts by balance
```graphql
{
accounts(first: 10, orderBy: "balance", orderDirection: "desc") {
id
balance
}
}
```### Get the current owner of the token contract
```graphql
{
accounts(where: { isOwner: true }) {
id
}
}
```### Get all transfer events for an account
```graphql
{
account(id: "0x1337f7970E8399ccbc625647FCE58a9dADA5aA66") {
transferEventsTo {
from
amount
}
transferEventsFrom {
to
amount
}
}
}
```