-
Notifications
You must be signed in to change notification settings - Fork 230
feat: add network validation for subgraph contract addresse #2083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 39159cc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @timmclean Can you please review it! |
|
I'll have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of things:
- sign the commits (this is a repo requirement): https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
- make it pass lint
pnpm lintand testspnpm test - add minor-version changeset
pnpm changeset
66aa0b3 to
0cae2ea
Compare
|
@YaroShkvorets Thanks! Have done the required changes |
|
But I have signedoff while amending the last commit @YaroShkvorets |
|
You haven't added GPG key to your GitHub account to make it verified: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification |
Signed-off-by: Harsh Dev Pathak <[email protected]>
|
@YaroShkvorets Yah have done it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach doesn't work.
You are querying Graph node JSON RPC endpoint for transaction count when you should be querying EVM chain JSON RPC instead. Graph node doesn't support eth_* methods.
Technically you can load the networks registry, get JSON RPC endpoint for that chain and try querying it. Just keep in mind that there could be dead ones, non-evm chains, and other edge cases you need to handle.
Also before submitting a PR it's a good idea to verify the fix works at least on a happy path.

fix: #617
Adds a pre-deployment check to warn users if subgraph contract addresses don’t exist on the target network.