Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinax-network/subgraph-template
Subgraph Template
https://github.com/pinax-network/subgraph-template
Last synced: about 2 months ago
JSON representation
Subgraph Template
- Host: GitHub
- URL: https://github.com/pinax-network/subgraph-template
- Owner: pinax-network
- License: mit
- Created: 2024-09-09T01:23:38.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T00:27:13.000Z (4 months ago)
- Last Synced: 2024-09-12T10:19:44.306Z (4 months ago)
- Language: Makefile
- Size: 666 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Subgraph: `TEMPLATE`
> Transactions, Decoded Actions & Database Operations
>
> [`sf.antelope.type.v1.Block`](https://buf.build/pinax/firehose-antelope/docs/main:sf.antelope.type.v1)- [x] **Blocks**
- [x] **Transactions**
- [x] **DatabaseOperations**
- [x] **Actions**
- [x] **Authorization**
- [x] **Receiver**## Smart Contracts
- `eosio.token`
## Subgraph
- **API Key**:
- **Base URL**:
- **Subgraph ID**: ``
- **Query URL format**: `{base_url}`/api/`{api-key}`/subgraphs/id/`{subgraph_id}`## GraphQL
```graphql
{
actions(
orderBy: block_number
orderDirection: desc
) {
block_number
timestamp
transaction {
id
}
account
name
jsonData
dbOps {
code
tableName
primaryKey
newDataJson
}
}
}
```### Example queries
- `code:mycontract`
- `code:tethertether && action:issue`
- `code:eosio.token && action:transfer && (data.to:myaccount || data.from:myaccount)`
- `auth:myaccount@active`
- `code:atomicassets && action:logmint`### Available query fields
These are the expressions that can be used in queries:
- `action:` - action name
- `code:` - smart contract account name
- `receiver:` - action receiver account
- `auth:` - account which authority was used to sign the action, i.e.
- `auth:` - account with any permission
- `auth:@` - account with a specific permission
- `input:true` - will match only the top-level actions
- `notif:true` - will match only notifications, excluding input action or other inline actions.
- `data.:` - will decode and match action parameters (doesn't support nested objects). Some examples:
- `data.from:myaccount`
- `data.memo:"your daily staking rewards"`
- `db.table:`
- `db.table:/`Queries can include `&&` and `||` logical operands, as well as `(` and `)` parenthesis.