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

Cannot use pancake-subgraph to get special pair/token data #108

Closed
yyxx2z opened this issue Sep 7, 2021 · 3 comments
Closed

Cannot use pancake-subgraph to get special pair/token data #108

yyxx2z opened this issue Sep 7, 2021 · 3 comments

Comments

@yyxx2z
Copy link

yyxx2z commented Sep 7, 2021

Hey guys, when I use your Pairs query to search this contract address

0x8c83E7AEF5116bE215223d3688a2f5dc4c7F241b

It always give the null response.
So can you tell me what happened in the case.

That following is my SQL:

{
  token (id: "0x8c83E7AEF5116bE215223d3688a2f5dc4c7F241b") {
    name
    id
  }
}

// or

{
  pair (id: "0x8c83E7AEF5116bE215223d3688a2f5dc4c7F241b") {
    name
    id
  }
}
@ChefKai
Copy link
Contributor

ChefKai commented Sep 7, 2021

Hello, this is because you are trying to fetch a Token entity while your address is referring to a Pair / Pancake LP's. The following query is working, please have a look at it:

GraphQL query:

{
  pair (id: "0x8c83e7aef5116be215223d3688a2f5dc4c7f241b") {
    id
    name
  }
  token (id: "0x765b85839717ebfc84378b83381a4814897a0506") {
    id
    name
  }
}

Response:

{
  "data": {
    "pair": {
      "id": "0x8c83e7aef5116be215223d3688a2f5dc4c7f241b",
      "name": "REI-BUSD"
    },
    "token": {
      "id": "0x765b85839717ebfc84378b83381a4814897a0506",
      "name": "Zerogoki Token"
    }
  }
}

Note: Please keep in mind that all addresses are in lowercase.

@ChefKai ChefKai closed this as completed Sep 7, 2021
@yyxx2z
Copy link
Author

yyxx2z commented Sep 7, 2021

Thx a lot

@yyxx2z
Copy link
Author

yyxx2z commented Sep 8, 2021

Sorry to bother you again.
I could not use this subgraph to get Wault contract data.
GraphQL:

{
  pair(id: "0x4b31d95654300cbe8ce3fe2b2ec5c6d2929ae7a6") {
    id
    name
  }
}

Response:

{
  "data": {
    "pair": null
  }
}

I am try to find one subgraph on thegraph to search from whole BSC. I only find this subgraph but your guys archived the github repository:

https://github.com/pancakeswap/pancake-v2-subgraph

So could you tell me how to get Wault contract data by thegraph?
It will very helpful to me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants