← Back to home

AttestationStationSubgraph

Query with graphQL the AttestationStation on Optimism thanks to a subgraph

Screenshots

AttestationStationSubgraph screenshot 1
AttestationStationSubgraph screenshot 2
AttestationStationSubgraph screenshot 3

Problem Statement

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

Solution

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/3We 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 likegraph deploy --studio atst-subgraph --network optimism

Hackathon

Scaling Ethereum 2023

2023

Contributors