Skip to content

Commit

Permalink
Merge branch 'main' into fix/101-subgraph-withsetsnumerictraits-is-null
Browse files Browse the repository at this point in the history
  • Loading branch information
cinnabarhorse committed Dec 30, 2023
2 parents 1a3fbac + ddc05db commit 09b790c
Show file tree
Hide file tree
Showing 33 changed files with 12,562 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Install Yarn
run: npm i -g yarn
- name: Install Libs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
- name: Install Yarn
run: npm i -g yarn
- name: Install Libs
Expand Down
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,88 @@ test("handleMintPortals - should update portal status and stats entity", () => {
});
```



## Example Queries

In this section we provide some example queries which should help you to get first ideas of what to fetch from the graph and how to do it. You can insert all events on the Playground and get the results. If you need help on how to integrate those queries in your app please take a look into the [General Section](https://docs.aavegotchi.com/subgraphs/general).
Events

## Account owned NFTs

You can fetch the NFTs of one Account with the following query:

```
account(id:"0x01c28a969a7d0ba03419c8c80be59928c4732cd9") {
id
ERC721tokens(first: 5) {
metadata {
name
artistName
description
}
}
ERC1155balances {
id
}
}
```

## New NFT proposals
Further its also possible to fetch upcoming NFTs.
```
{
metadataActionLogs(where: {status: 0}) {
name
publisher {
id
}
publisherName
artist {
id
}
artistName
fileHash
flagCount
likeCount
}
}
```

The status codes defined as follows:
```
export const METADATA_STATUS_PENDING = 0;
export const METADATA_STATUS_PAUSED = 1;
export const METADATA_STATUS_APPROVED = 2;
export const METADATA_STATUS_DECLINED = 3;
```

## Stats
Additionally we store some useful statistics on the subgraph. You can combine this with a block number and create a chart out of it.

```
{
statistics {
totalOwners
totalFakeGotchiPieces
totalNFTs
burnedNFTs
burnedCards
}
nftstatistics {
holders(first: 3) {
id
amount
}
burned
amountHolder
totalSupply
}
}
```

## Contribute

If you want to contribute it would be best to start with a fork. A new branch called feat/name, fix/bug or docs/docTitle for the specific scope. Afterwards please create a PR with a the prefix `WIP:`.
Expand Down
Loading

0 comments on commit 09b790c

Please sign in to comment.