Spectra is the ultimate marketplace for yield derivatives and the first protocol for future yield tokenisation.
This subgraph can be found on The Graph Hosted Service for the following networks:
You can also run this subgraph locally, if you wish. Instructions for that can be found in The Graph Documentation.
- Foundry, along with
anvil(included) - The IPFS CLI
- A running instance of Postgres
- The quickest way to get this up and running is through the official Docker image (
docker run -it --rm --network some-network postgres psql -h some-postgres -U postgres).
- The quickest way to get this up and running is through the official Docker image (
- The cargo Rust package manager
- The Graph CLI
yarn- Mainnet
yarn generate-config- other supported networks
yarn generate-config:<NETWORK>This step will load all contract ABIs used by our subgraph and generate the corresponding TypeScript interfaces.
yarn codegenTo deploy and run test scenarios on the locally running blockchain:
anvil --timestamp 100ipfs init
ipfs daemoncreatedb db_subgraphgit clone https://github.com/graphprotocol/graph-node/RUST_BACKTRACE=1 cargo run -p graph-node --release -- \
--postgres-url postgresql://<USER>:@localhost:5432/db_subgraph \
--ethereum-rpc mainnet:http://127.0.0.1:8545 \
--ipfs 127.0.0.1:5001 \
--debugyarn generate-config:localyarn create:localyarn deploy:localnpm iforge test --fork-url http://localhost:8545http://127.0.0.1:8000/subgraphs/name/perspectivefi/spectra-mainnet/graphql- Mainnet
yarn generate-config- other supported networks
generate-config:<NETWORK>yarn codegenyarn creategraph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>- Mainnet
yarn deploy- other network
yarn deploy:<NETWORK>Graph definition written in PlantUML framework - schema.puml
Coming soon