Releases: pinax-network/subgraph-antelope-tokens
Releases · pinax-network/subgraph-antelope-tokens
v0.3.0
What's new
schema.graphql
breaking changes- upgrade to new Rust substreams v0.6.0
- block-index v0.2.0 NOT being used currently
GraphQL
Balances by Owner
query BalanceByOwner{
balances(first: 20, where:{ owner: "eosio.stake" }) {
balance
token{
code
symcode
precision
}
}
}
Tokens by Top Holders
query TokensHolders {
balances(where: {token_: {code: "eosio.token"}} orderBy: balance, orderDirection: desc) {
owner
balance
token{
code
symcode
}
}
}
Token Supply
query Supply {
supplies(first: 20, orderBy: block__number, orderDirection: desc){
supply
max_supply
token{
code
symcode
precision
}
}
}
Recent Balances Changes
query RecentBalancesChanges {
balances(first: 20, orderBy: block__number, orderDirection: desc) {
owner
balance
token{
code
symcode
}
block{
number
date
}
}
}
Modules
Name: graph_out
Initial block: 0
Kind: map
Input: params:
Input: source: sf.substreams.v1.Clock
Input: map: block_index:map_db_ops
Output Type: proto:sf.substreams.sink.entity.v1.EntityChanges
Hash: 794c63419bbe05e1308a9c7e56f8a54778d87724
Name: block_index:index_blocks
Initial block: 0
Kind: index
Input: source: sf.antelope.type.v1.Block
Output Type: proto:sf.substreams.index.v1.Keys
Hash: 15f03d68c8b56336999fac6be2a3d1c6d558288b
Name: block_index:map_db_ops
Initial block: 0
Kind: map
Input: source: sf.antelope.type.v1.Block
Block Filter: (using *block_index:index_blocks*): `&{db.table:accounts || db.table:stat}`
Output Type: proto:sf.antelope.type.v1.DBOps
Hash: 9df5eeba09d51a87ea9eaf3ca18a13111cc495b1
v0.2.0
- due to indexing performance issues, removed
deriveFrom
from fields- updated GraphQL to not use
deriveFrom
- updated GraphQL to not use
GraphQL
type Balance @entity {
id: ID!
owner: String!
balance: BigDecimal!
# token
code: String!
symcode: String!
sym: String!
precision: BigInt!
# delete mutations
is_deleted: Boolean!
# order by
timestamp: Timestamp! # microseconds
block_number: BigInt!
block_date: String!
}
type Supply @entity {
id: ID!
supply: BigDecimal!
max_supply: BigDecimal!
# token
code: String!
symcode: String!
sym: String!
precision: BigInt!
# delete mutations
is_deleted: Boolean!
# order by
timestamp: Timestamp! # microseconds
block_number: BigInt!
block_date: String!
}
type Token @entity {
id: ID!
code: String!
symcode: String!
sym: String!
precision: BigInt!
# order by
timestamp: Timestamp! # microseconds
block_number: BigInt!
block_date: String!
}
v0.1.2
Subgraph Deployments:
- WAX:
QmSA8FHytfKMtCot3FesVw4eau8Kh5Zrk9uH4du8iBvqqd
- EOS:
QmNR6VWqBJPxa78yU86Z1Vo7LhSKd4UgU61trUC86Rb1aV
What's Changed
- Feature/handle remove by @DenisCarriere in #3
New Contributors
- @DenisCarriere made their first contribution in #3
Full Changelog: v0.1.0...v0.1.2
v0.1.0
Subgraph: Antelope Tokens
Token Balances & Supply
WAX, EOS, Ultra, Telos...
sf.antelope.type.v1.Block
- Balances
- Supply & Max Supply
Chains
- API Key: https://thegraph.com/studio/apikeys/
- Base URL: https://gateway.thegraph.com/api
- Query URL format:
{base_url}
/api/{api-key}
/subgraphs/id/{subgraph_id}
Chain | Subgraph ID |
---|---|
WAX | 6Tt5mHVNDyAo3KbsYMUeemmzs2381vXUquXw75EnG9cW |
EOS | Ce1om4KPxZHwFxhtz2pVuCD4AUiKisrYecHVWsvEW6MU |
GraphQL
Balances by Owner
query BalanceByOwner{
balances(first: 20, orderBy:block__number, orderDirection:desc,
where:{ owner:"swap.alcor" }) {
token{
code
symcode
precision
}
balance
}
}
Tokens by Top Holders
query TokensHolders {
tokens(first:20, orderBy:block__number, orderDirection:desc){
code
symcode
balances(first:5, orderBy: balance, orderDirection: desc) {
owner
balance
}
}
}
Token Supply
query Supply {
supplies(first:20, orderBy:block__number, orderDirection:desc){
supply
maxSupply
token{
code
symcode
}
}
}
Recent Balances Changes
query RecentBalancesChanges {
balances(first: 20, orderBy:block__number, orderDirection:desc) {
owner
balance
block{
timestamp
number
}
token{
code
symcode
precision
}
}
}
Modules
Name: graph_out
Initial block: 0
Kind: map
Input: params: db.table:accounts || db.table:stat
Input: source: sf.substreams.v1.Clock
Input: map: block_index:map_db_ops
Block Filter: (using *block_index:index_blocks*): `&{<nil>}`
Output Type: proto:sf.substreams.sink.entity.v1.EntityChanges
Hash: 1bbc37d2304437b6afbe27a6a716ec48e3b1e805
Name: block_index:index_blocks
Initial block: 0
Kind: index
Input: source: sf.antelope.type.v1.Block
Output Type: proto:sf.substreams.index.v1.Keys
Hash: 15f03d68c8b56336999fac6be2a3d1c6d558288b
Name: block_index:map_db_ops
Initial block: 0
Kind: map
Input: source: sf.antelope.type.v1.Block
Block Filter: (using *block_index:index_blocks*): `&{db.table:accounts || db.table:stat}`
Output Type: proto:sf.antelope.type.v1.DBOps
Hash: 9df5eeba09d51a87ea9eaf3ca18a13111cc495b1