- Notifications
You must be signed in to change notification settings - Fork86
A GraphQL interface to Ethereum 🔥
License
Consensys/ethql
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
EthQL is a server that exposes a GraphQL endpoint to the public Ethereum ledger. It works against the standard JSON-RPCAPIs offered by all Ethereum clients. It is built in TypeScript, and thus leverages the vast ecosystem of GraphQLtooling while preserving compile-time type safety.
EthQL regards blockchain data as a graph, and leverages the extensibility of GraphQL to introduce additionalfunctionality, amongst which are:
- Decoding of standard transactions (e.g. ERC20, ENS, ERC223, etc.) out of the box.
- New query patterns enabled by indexing solutions (e.g. all transactions between any two accounts).
- Automatic batching and caching of requests.
- New filtering capabilities.
- Simple, inline unit conversions.
- Enhancing public data with information overlays imported from other sources.
NOTE: This project is under heavy development.
You need a running Node environment with at least:
- nodejs >= 8.0.0
- yarn
Clone the repo and run:
$ yarn install$ yarn bootstrap$ yarn run devJSON-RPC (web3): Using HTTP(S) provider with endpoint: https://mainnet.infura.io/Running a GraphQL API server at http://0.0.0.0:4000/graphql (browse here: http://localhost:4000/graphql)
This EthQL server usesInfura as a backend in anonymous mode. If you have an Infura project ID (and if you don't, you should sign up for one!) you can set it like this:
$ INFURA_ID=myid yarn run dev
Thedebug
module is included in Dev Dependencies
To turn on debugging:
DEBUG=ethql:*
We suggest fiddling with someExample Use Cases to see somequeries in action.
For an in-depth guide on how to use EthQL, please start with the documentTop-Level Queries. This document shows all of the rootfields available to query, including information on specific block(s), transaction(s), and account(s).
The following sections provide a deep dive into all of the fields available on top-level queries:
- Block Query Fields
- Account Query Fields
- Transaction Query Fields
- Log Query Fields
- Decoded Transaction Query Fields
If you are interested in fixing issues and contributing directly to the code base, please see the documentHow to Contribute, which covers the following:
Please see also ourCode of Conduct.
- Request a new feature onGitHub.
- Vote forpopular feature requests.
- File a bug inGitHub Issues.
- Tweet us with other feedback
PegaSys’ mission is to build blockchain solutions ready for production in business environments. We are committed toopen source, and are creating a framework for collaborative innovation for the public-chain community and leadingenterprises.
Our team is composed of engineers leading in the areas of big data processing, applied cryptography, open sourcecomputing, cloud services, and blockchain development.
About
A GraphQL interface to Ethereum 🔥