Skip to content

paraswap/paraswap-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paraswap Subgraph

ParaSwap aggregates decentralized exchanges and other DeFi services in one comprehensive interface to streamline and facilitate users' interactions with decentralized finance.

To read more about Paraswap, visit the official documentaion page here.

About the Subgraph

This subgraph dynamically tracks all the transactions (swaps) made via Paraswap on the Ethereum (mainnet) chain. This subgraph supports Paraswap v0.1.0 to the latest v5 release.

You can query the subgraph via GraphQL from the legacy explorer here.

Instructions to run locally

Setup Graph Node

  1. Have a local graph-node setup. Please visit https://github.com/graphprotocol/graph-node for more instructions.

  2. Start the local graph-node using the instructions. Replace the [url] segment of the cargo command with your RPC provider's url with the network prefix. Example (for mainnet):

    cargo run -p graph-node --release -- \
    --postgres-url postgresql://USERNAME[:PASSWORD]@localhost:5432/graph-node \
    --ethereum-rpc mainnet:<URL> \
    --ipfs 127.0.0.1:5001
    

Build the Subgraph

  1. Clone the subgraph, and run yarn codegen to generate the required schema and TS files.
  2. Run yarn build to generate the build files to be deployed.
  3. Run yarn create-local followed by yarn deploy-local to deploy the subgraph to the local graph-node.
  4. If you wish to remove the local deployed graph, run yarn remove-local.
  5. To redploy, follow steps 2 and 3 again.

Checkout package.json to check the corresponding yarn commands.

About

Subgraph for swaps on ParaSwap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published