FAKE Gotchi Subgraph
The subgraph provides all the information needed for the fakegotchis.com webpage. It allows to fetch all the happened events on-chain as well as useful entities for the Cards and NFTs. Furthermore in provides some useful stats. The full documentation can be found here LINK
The endpoint is: https://api.thegraph.com/subgraphs/name/aavegotchi/fake-gotchis-matic
The Playground can be found HERE
Events
The Events can be queried as followed:
{
erc1155Transfers(first: 5) {
from {
id
}
to {
id
}
valueExact
}
metadataFlags(first: 5) {
flaggedBy {
id
}
metadata {
id
}
}
metadataLikes(first: 5) {
likedBy {
id
}
metadata {
id
}
}
}
the response contains the ID of the aavegotchi and the svg...
{
"data": {
"erc1155Transfers": [
{
"from": null,
"to": {
"id": "0x8d46fd7160940d89da026d59b2e819208e714e82"
},
"valueExact": "2535"
},
{
"from": {
"id": "0x8d46fd7160940d89da026d59b2e819208e714e82"
},
"to": {
"id": "0x57f1a63b97ec36777054a4a94468083ae9cf0cc8"
},
"valueExact": "1"
},
{
"from": {
"id": "0x57f1a63b97ec36777054a4a94468083ae9cf0cc8"
},
"to": null,
"valueExact": "1"
},
{
"from": {
"id": "0x8d46fd7160940d89da026d59b2e819208e714e82"
},
"to": {
"id": "0xc29029de05bf135a90c19f31f866f8774a39dbb6"
},
"valueExact": "1"
},
{
"from": {
"id": "0x8d46fd7160940d89da026d59b2e819208e714e82"
},
"to": {
"id": "0x92baffdd6cfb11a4e57a58ffec4833b4d1abd25d"
},
"valueExact": "1"
}
],
"metadataFlags": [
{
"flaggedBy": {
"id": "0xc89a3292eb0a8396a2505deb6195afa7f83a8a30"
},
"metadata": {
"id": "1"
}
},
{
"flaggedBy": {
"id": "0xf0b3868bdfdc28ed7ebca122ce821e0211fd3c0f"
},
"metadata": {
"id": "4"
}
},
{
"flaggedBy": {
"id": "0x20906e454a9d20181350630ead131d8dfa21dd3f"
},
"metadata": {
"id": "4"
}
},
{
"flaggedBy": {
"id": "0x1ea25519e4829bf579a58f133c4bf31e7e6f7565"
},
"metadata": {
"id": "4"
}
},
{
"flaggedBy": {
"id": "0x6fd155b9d52f80e8a73a8a2537268602978486e2"
},
"metadata": {
"id": "4"
}
}
],
"metadataLikes": [
{
"likedBy": {
"id": "0x3aef590df6febaa81477c1cea3009bb9e096730c"
},
"metadata": {
"id": "1"
}
},
{
"likedBy": {
"id": "0xc89a3292eb0a8396a2505deb6195afa7f83a8a30"
},
"metadata": {
"id": "1"
}
},
{
"likedBy": {
"id": "0x501ffc7ee44f7986c24fb5bf7c04c1ed6377ec87"
},
"metadata": {
"id": "1"
}
},
{
"likedBy": {
"id": "0x1ea25519e4829bf579a58f133c4bf31e7e6f7565"
},
"metadata": {
"id": "1"
}
},
{
"likedBy": {
"id": "0xb53cf0a586973ab15c0a045990d06b4fa083dd5a"
},
"metadata": {
"id": "1"
}
}
]
}
}
Cards and NFTs
Cards are are ERC1155s and NFTs ERC721. The Subgraph allows to query for both:
{
account(id:"0x01c28a969a7d0ba03419c8c80be59928c4732cd9") {
id
ERC721tokens(first: 3) {
metadata {
name
artistName
description
}
}
ERC1155balances(first: 3) {
id
}
}
}
the response contains all the information: In this case the accounts owns multiple NFTs, but no cards.
{
"data": {
"account": {
"id": "0x01c28a969a7d0ba03419c8c80be59928c4732cd9",
"ERC721tokens": [
{
"metadata": {
"name": "Chubby Gotchi Family Portrait",
"artistName": "Gotchi Bulls",
"description": "These are reimaginings of many actual Aavegotchis that take on a life of their own in the Chubby World!"
}
},
{
"metadata": {
"name": "Chubby Gotchi Family Portrait",
"artistName": "Gotchi Bulls",
"description": "These are reimaginings of many actual Aavegotchis that take on a life of their own in the Chubby World!"
}
},
{
"metadata": {
"name": "Chubby Gotchi Family Portrait",
"artistName": "Gotchi Bulls",
"description": "These are reimaginings of many actual Aavegotchis that take on a life of their own in the Chubby World!"
}
}
],
"ERC1155balances": []
}
}
}
Statistics
The subgraph provides also some useful stats. For example how large is the supply and how many cards and nfts are already burned.
{
totalStatistics {
totalOwners
totalFakeGotchiPieces
totalNFTs
burnedNFTs
burnedCards
}
nftstatistics {
holders(first: 3) {
id
amount
}
burned
amountHolder
totalSupply
}
}
The response looks like this:
{
"data": {
"totalStatistics": [
{
"totalOwners": 57,
"totalFakeGotchiPieces": 14,
"totalNFTs": 920,
"burnedNFTs": 0,
"burnedCards": 0
}
],
"nftstatistics": [
{
"holders": [
{
"id": "0x07a009e9e98649bff954cf3032ceb3e21e020f49-1",
"amount": 1
},
{
"id": "0x3c2262255793f2b4629f7b9a2d57ce78f7842a8d-1",
"amount": 2
},
{
"id": "0x57f1a63b97ec36777054a4a94468083ae9cf0cc8-1",
"amount": 90
}
],
"burned": 0,
"amountHolder": 9,
"totalSupply": 100
},
{
"holders": [
{
"id": "0x26cf02f892b04af4cf350539ce2c77fcf79ec172-10",
"amount": 1
},
{
"id": "0x3c2262255793f2b4629f7b9a2d57ce78f7842a8d-10",
"amount": 1
},
{
"id": "0x4572192ed1dee5fd0f8f07269be4ef3e3e270715-10",
"amount": 1
}
],
"burned": 0,
"amountHolder": 12,
"totalSupply": 30
},
{
"holders": [
{
"id": "0x3bd59ed16c462b4464091830dab828dce079076f-11",
"amount": 1
},
{
"id": "0x5e31c357d03e9528e9bf95bd16e5c1ab3f7d37d0-11",
"amount": 1
},
{
"id": "0x81e5cd19323ce7f6b36c9511fbc98d477a188b13-11",
"amount": 67
}
],
"burned": 0,
"amountHolder": 3,
"totalSupply": 69
},
{
"holders": [
{
"id": "0x0465c733bcbc4e15f15d393d919cf6dc8ae757ce-12",
"amount": 1
},
{
"id": "0x2fa37cb96c19e9b1f9ad060aed00c0cfc727ae39-12",
"amount": 1
},
{
"id": "0x3c2262255793f2b4629f7b9a2d57ce78f7842a8d-12",
"amount": 2
}
],
"burned": 0,
"amountHolder": 7,
"totalSupply": 25
},
{
"holders": [
{
"id": "0x0465c733bcbc4e15f15d393d919cf6dc8ae757ce-13",
"amount": 1
},
{
"id": "0x2fa37cb96c19e9b1f9ad060aed00c0cfc727ae39-13",
"amount": 11
},
{
"id": "0x3c2262255793f2b4629f7b9a2d57ce78f7842a8d-13",
"amount": 1
}
],
"burned": 0,
"amountHolder": 9,
"totalSupply": 20
},
{
"holders": [
{
"id": "0x082e8a9da4397bc24ac22fad57cd7063dc1cd58b-14",
"amount": 42
}
],
"burned": 0,
"amountHolder": 1,
"totalSupply": 42
},
{
"holders": [
{
"id": "0xc29029de05bf135a90c19f31f866f8774a39dbb6-15",
"amount": 100
}
],
"burned": 0,
"amountHolder": 1,
"totalSupply": 100
},
{
"holders": [
{
"id": "0x2dd1951f15e2f9b629209dc43fac402fa7a91d8f-2",
"amount": 1
},
{
"id": "0x5e31c357d03e9528e9bf95bd16e5c1ab3f7d37d0-2",
"amount": 1
},
{
"id": "0xcd3014700f40d44f36c520b3bc887b7a603673dd-2",
"amount": 1
}
],
"burned": 0,
"amountHolder": 5,
"totalSupply": 64
},
{
"holders": [
{
"id": "0x137173233cc1ecf6d6ba9799868c8272352fb2e5-3",
"amount": 17
},
{
"id": "0x5e31c357d03e9528e9bf95bd16e5c1ab3f7d37d0-3",
"amount": 1
},
{
"id": "0x6994ba66fd6789044c4ad43786cc16840d099c8a-3",
"amount": 1
}
],
"burned": 0,
"amountHolder": 4,
"totalSupply": 20
},
{
"holders": [
{
"id": "0x01c28a969a7d0ba03419c8c80be59928c4732cd9-5",
"amount": 19
},
{
"id": "0x1ea25519e4829bf579a58f133c4bf31e7e6f7565-5",
"amount": 1
},
{
"id": "0x2fa37cb96c19e9b1f9ad060aed00c0cfc727ae39-5",
"amount": 1
}
],
"burned": 0,
"amountHolder": 6,
"totalSupply": 100
},
{
"holders": [
{
"id": "0x0465c733bcbc4e15f15d393d919cf6dc8ae757ce-6",
"amount": 1
},
{
"id": "0x3c2262255793f2b4629f7b9a2d57ce78f7842a8d-6",
"amount": 1
},
{
"id": "0x44e9d011df8741be2493e99297e9ad67bb1aa85b-6",
"amount": 95
}
],
"burned": 0,
"amountHolder": 6,
"totalSupply": 100
},
{
"holders": [
{
"id": "0x1d130d29b3906555030452f0f29cdb0b9750fd21-7",
"amount": 35
},
{
"id": "0x2fa37cb96c19e9b1f9ad060aed00c0cfc727ae39-7",
"amount": 1
},
{
"id": "0x30dcca068f593cbffb5affe8a89f35ae49614972-7",
"amount": 1
}
],
"burned": 0,
"amountHolder": 15,
"totalSupply": 50
},
{
"holders": [
{
"id": "0x92baffdd6cfb11a4e57a58ffec4833b4d1abd25d-8",
"amount": 100
}
],
"burned": 0,
"amountHolder": 1,
"totalSupply": 100
},
{
"holders": [
{
"id": "0x0465c733bcbc4e15f15d393d919cf6dc8ae757ce-9",
"amount": 1
},
{
"id": "0x08a534738ba8ec107ed65986a3de66c330441b9a-9",
"amount": 1
},
{
"id": "0x2dd1951f15e2f9b629209dc43fac402fa7a91d8f-9",
"amount": 1
}
],
"burned": 0,
"amountHolder": 14,
"totalSupply": 100
}
]
}
}
NFT Proposals
It takes time to mint a NFT. It requires that the card is burned and some art is added. After some days the NFT can be minted. Proposals can be liked, flagged or change their status.
{
metadataActionLogs(where: {status: 0} first: 1) {
name
publisher {
id
}
publisherName
artist {
id
}
artistName
fileHash
flagCount
likeCount
status
}
}
The status codes are 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;
The result shows all neccesary informations:
{
"data": {
"metadataActionLogs": [
{
"name": "FUD vs FOMO",
"publisher": {
"id": "0x187dad1e0dd5e599091c2ec88e89afb4cde4b7a3"
},
"publisherName": "Skeenee",
"artist": {
"id": "0x15b89bae8ba07c249c4a7985317a9d14f19ca67f"
},
"artistName": "Skeenee",
"fileHash": "aaRv5WVb0XHPF9NOGmchDl6tm2xduZjL8_9XVYZhtR0",
"flagCount": 0,
"likeCount": 15,
"status": 0
}
]
}
}
Last updated