Query with graphQL the AttestationStation on Optimism thanks to a subgraph
This project makes the AttestationStation data available on the graph.
The AttestationStation is a recommendation system on-chain proposed by optimism. A creator (an ETH address) attests on a subject (another ETH address); a description is provided.
Indexing this data in the graph allows for developers to query it using graphQL
The code is heavily inspired from https://github.com/graphprotocol/hardhat-graph-demo. Submitted a small fix on the docker file for postgres configuration https://github.com/graphprotocol/hardhat-graph-demo/pull/3
We build a subgraph for the smart contract AttestationStation copied from https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-periphery/contracts/universal/op-nft/AttestationStation.sol. For an explanation on the AttestionStation see ttps://community.optimism.io/docs/governance/attestation-station/#
All this works locally. In order to deploy the graph and make it available online, one would need to deploy the code on the graph using a command like graph deploy --studio atst-subgraph --network optimism