Skip to content

Instantly share code, notes, and snippets.

@hewigovens
Created August 4, 2023 01:14
Show Gist options
  • Save hewigovens/78959dc2e023db3b47cca08d96a10354 to your computer and use it in GitHub Desktop.
Save hewigovens/78959dc2e023db3b47cca08d96a10354 to your computer and use it in GitHub Desktop.
Query vitalik.eth using thegraph API
curl --location 'https://api.thegraph.com/subgraphs/name/ensdomains/ens' \
--header 'Content-Type: application/json' \
--data '{
"query": "query getRecords($id: String!) {\n domain(id: $id) {\n name\n isMigrated\n createdAt\n resolver {\n texts\n coinTypes\n contentHash\n addr {\n id\n }\n }\n id\n }\n}",
"variables": {
"id": "0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835"
},
"operationName": "getRecords"
}'
@hewigovens
Copy link
Author

The id 0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835 is namehash(vitalik.eth)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment