Giter Club home page Giter Club logo

lido-subgraph's Introduction

Lido Subgraph

Subgraph to index Lido contracts.

Live Deployments

The Graph Network

Explorer page with playground:

https://thegraph.com/explorer/subgraph?id=HXfMc1jPHfFQoccWd7VMv66km75FoxVHDMvsJj5vG5vf

GraphQL API url (API key is needed):

https://gateway.thegraph.com/api/[api-key]/subgraphs/id/HXfMc1jPHfFQoccWd7VMv66km75FoxVHDMvsJj5vG5vf

The Graph Hosted

WARNING: Hosted Service is going to be sunset. We highly recommend using the Decentralized Network version instead.

Mainnet

Explorer page with playground: https://thegraph.com/legacy-explorer/subgraph/lidofinance/lido

GraphQL API url: https://api.thegraph.com/subgraphs/name/lidofinance/lido

Testnet (Goerli)

Explorer page with playground: https://thegraph.com/legacy-explorer/subgraph/lidofinance/lido-testnet

GraphQL API url: https://api.thegraph.com/subgraphs/name/lidofinance/lido-testnet

Contracts

  • Lido
  • Lido Oracle
  • Node Operator Registry
  • Voting
  • EasyTrack
  • Deposit Security Module

Developing

Install dependencies with yarn and run yarn codegen. Repeat yarn codegen after any schema changes or changes affecting generated files.

Testing

You can test any synced Lido deployment, simply fill an .env file and run:

yarn test

Deploying

Locally

First, set an .env file. You can check an example in .env.local.example.

Run create-local first if Subgraph does not exist yet. Run deploy-local to deploy the Subgraph.

The Graph Hosted

Pushes to master branch will automatically get the Subgraph deployed to The Graph.

Notes

  1. Addresses are stored as-is, without conversion to checksum addresses. Keep that in mind when filtering entities by address.
  2. Please note that it's now advised not to rely on this Subgraph's node operator keys for duplicate key checks. We've hit a technical limitation on withdrawal credentials changes when unused keys are cropped. We can't guarantee cropped keys will be deleted from this Subgraph correctly in the future.

lido-subgraph's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lido-subgraph's Issues

How to query entities like CurrentFees and TotalRewards?

In the Graph playground, it is not possible to query for the above mentioned entities. This is due to the entity names are being in plural form which conflicts with the GraphQL server.
For example, the following query will result in an error.

query MyGraphQ {
	currentFees {
		id
    feeBasisPoints
    treasuryFeeBasisPoints
    insuranceFeeBasisPoints
    operatorsFeeBasisPoints
	}
}

The error will be,

{
	"errors": [
		{
			"locations": [
				{
					"column": 0,
					"line": 0
				}
			],
			"message": "No value provided for required argument: `id`"
		}
	]
}

How to resolve this?

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • Update dependency graphql to v15.5.2
  • Update dependency node-fetch to v3

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Subgraph endpoint update required

Hey team,

We've noticed that you're referencing a subgraph deployed on The Graph's hosted service in this repository. Just a heads-up: after June 12th, hosted service subgraph endpoints will no longer be available as the offering is being deprecated.

If you are the subgraph owner or maintainer, it's time to upgrade your subgraph to the network. This ensures everything keeps running smoothly and you get access to all the latest features and improvements. Here is a quick guide with all the upgrade steps.

If you're not the subgraph owner or maintainer, check Graph Explorer to see if the subgraph development team has already upgraded to the network. If you don’t find an upgraded subgraph, a friendly nudge to the subgraph development team would be greatly appreciated—it's a quick process that benefits everyone. Here's the upgrade guide with all the necessary steps for the subgraph development team.

Once the subgraph is upgraded to the network, you can create an API key and updated query URL in Subgraph Studio then update this repository to query from the new endpoint, https://api.studio.thegraph.com/query/<ID>/<SUBGRAPH_NAME>/<VERSION>

Need more support or have more questions? Feel free to reach out to [email protected]. We're here to help!

Cheers,

Paka

Correct handling of transferShares()

When Lido.transferShares() is used, both TransferShares and Transfer events are emitted same as when Lido.transfer() is used.

However, looking at only Transfer we can't calculate the correct amount of shares that were transferred.

We need to index both events and check their order (event index in tx or block) to react accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.