Skip to content
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

chore(subgraph,networks): migrate all subgraphs to studio #13338

Merged
merged 34 commits into from
Feb 19, 2024

Conversation

clemsos
Copy link
Member

@clemsos clemsos commented Feb 12, 2024

Description

This PR includes several things

  • remove support for the graph hosted version from our scripts
  • replace old endpoints by new studio one (all owned by ARB wallets) in networks package
  • remove endpointV2 param from networks package (it is confusing and unconsistent atm)

List of networks migrated

  • arbitrum
  • avalanche
  • base
  • bsc
  • celo
  • gnosis
  • goerli
  • linea (not supported by stuudio)
  • mainnet
  • mumbai
  • optimism
  • polygon
  • scroll
  • sepolia
  • zkevm
  • zksync (in another PR)

Issues

Fixes #12867
Refs #

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

Release Note Draft Snippet

@@ -62,9 +62,8 @@ export const avalanche: NetworkConfig = {
startBlock: 17188332,
subgraph: {
endpoint:
'https://api.thegraph.com/subgraphs/name/unlock-protocol/avalanche',
endpointV2:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the apps still use endpointV2 though... so we need to change them as well.

@@ -53,11 +53,11 @@ export const celo: NetworkConfig = {
provider: 'https://rpc.unlock-protocol.com/42220',
publicLockVersionToDeploy: 13,
publicProvider: 'https://forno.celo.org',
startBlock: 7179039,
startBlock: 13994123,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? Hum, why this change?

@@ -33,7 +33,7 @@ export class SubgraphService {
createSdk(networkId = 1) {
const network = this.networks[networkId]

const client = new GraphQLClient(network.subgraph.endpointV2!)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice yuou fixed it!

Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok this is very cool! Thank you so much!

@julien51 julien51 self-requested a review February 13, 2024 16:43
@julien51
Copy link
Member

Actually it looks loke BSC is supported: https://thegraph.com/docs/en/developing/supported-networks/
Screenshot 2024-02-13 at 11 44 09 AM

@clemsos
Copy link
Member Author

clemsos commented Feb 14, 2024

so far deploying with bsc is failing with the following error

exec error: Error: Command failed: graph deploy --version-label="v0.0.1" --product=subgraph-studio unlock-protocol-bsc
    Error: The Subgraph Studio only allows subgraphs for these networks: 
    mainnet, rinkeby, goerli, gnosis, chapel, optimism-goerli, clover, fantom,
     matic, fantom-testnet, arbitrum-goerli, fuji, celo-alfajores, mumbai, 
    aurora-testnet, near-testnet, optimism, optimism-goerli, 
    theta-testnet-001, osmo-test-4, base-testnet, base, celo, arbitrum-one, 
    arbitrum-sepolia, avalanche, zksync-era, zksync-era-testnet, sepolia, 
    polygon-zkevm-testnet, polygon-zkevm, scroll-sepolia, scroll

@julien51
Copy link
Member

Are you sure you are using the latest version of the graph cli?

@julien51
Copy link
Member

Also @clemsos will this be the opportunity to fix the production CI job? https://github.com/unlock-protocol/unlock/actions/runs/7902183545/job/21567271870

@clemsos clemsos merged commit cf003ca into master Feb 19, 2024
19 checks passed
@clemsos clemsos deleted the migrate-subgraphs branch February 19, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move all subgraphs to Studio, under the multisig account
2 participants