https://github.com/codingchili/ethereum-gateway
API gateway for subscribing to blocks and sending GraphQL queries to Geth.
https://github.com/codingchili/ethereum-gateway
chili-core elasticsearch ethereum gateway hazelcast kotlin microservices
Last synced: about 1 year ago
JSON representation
API gateway for subscribing to blocks and sending GraphQL queries to Geth.
- Host: GitHub
- URL: https://github.com/codingchili/ethereum-gateway
- Owner: codingchili
- License: mit
- Created: 2019-11-29T16:59:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-29T17:09:38.000Z (over 6 years ago)
- Last Synced: 2025-02-12T15:51:39.658Z (about 1 year ago)
- Topics: chili-core, elasticsearch, ethereum, gateway, hazelcast, kotlin, microservices
- Language: Kotlin
- Size: 268 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Broker Ethereum
Publisher/subscriber services for the Geth JSON RPC-API implemented as microservices. All of the microservices are implemented using the chili-core framework and written in Kotlin.
Includes the following libraries
- Hazelcast
- Web3j
- Vert.x (chili)
- Polymer 3 / web components
- ElasticSearch
- Kibana
- Geth 1.9.2

Overview of the services in the system, the *Service components are implemented using chili-core.

NOTE 1: the web interface is not a part of this repository as its unlicensed.
NOTE 2: uses __block__ data enriched with mock whisper data as the whisper RPC calls isn't implemented in the Web3j client.
### Build & Run
1. Build the jar dist
```console
./gradlew jar
```
2. Start geth ethereum client
```console
$ geth --testnet --graphql --shh --rpcapi admin,miner,eth,web3 --rpc console
```
Start all services in the same JVM
```console
java -jar .jar --deploy all
```
Websocket now deployed on :8080.
To host the UI during development run
```console
npm install
polymer serve
```
From the resouraces/web/ folder.
To build the distribution bundle run
```polymer
polymer build
```
### GraphQL
See: [bitfalls.com/exploring-ethereum-graphql](https://bitfalls.com/2018/08/01/ethql-exploring-ethereum-blockchain-graphql/)
Example query to grab block 0x1.
```json
query { block(number: 1) { hash } }
```