diff --git a/docker-compose.yml b/docker-compose.yml index 861a13bf..f9466b5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - "26656-26657:26656-26657" - "1317:1317" - "8545:8545" + - "8546:8546" environment: - ID=0 - LOG=${LOG:-emintd.log} @@ -25,6 +26,7 @@ services: - "26659-26660:26656-26657" - "1318:1317" - "8546:8545" + - "8546:8546" environment: - ID=1 - LOG=${LOG:-emintd.log} @@ -45,6 +47,7 @@ services: - "26661-26662:26656-26657" - "1319:1317" - "8547:8545" + - "8546:8546" volumes: - ./build:/ethermint:Z networks: @@ -62,6 +65,7 @@ services: - "26663-26664:26656-26657" - "1320:1317" - "8548:8545" + - "8546:8546" volumes: - ./build:/ethermint:Z networks: diff --git a/docs/quickstart/testnet.md b/docs/quickstart/testnet.md index 24b38c45..942d3a1f 100644 --- a/docs/quickstart/testnet.md +++ b/docs/quickstart/testnet.md @@ -233,6 +233,27 @@ example: docker logs -f emintdnode0 ``` +### Interact With the Testnet + +#### Ethereum JSON RPC & Websocket Ports + +To interact with the testnet via WebSockets or RPC/API, you will send your request to the corresponding ports: + +| Eth JSON-RPC | Eth WS | +|--------------|--------| +| `8545` | `8546` | + +You can send a curl command such as: + +```bash +curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" 192.162.10.1:8545 +``` +::: tip +The IP address will be the public IP of the docker container. +::: + +Additional instructions on how to interact with the WebSocket can be found on the [events documentation](./events.md#ethereum-websocket). + ### Keys & Accounts To interact with `emintcli` and start querying state or creating txs, you use the diff --git a/networks/local/ethermintnode/Dockerfile b/networks/local/ethermintnode/Dockerfile index 451fcc81..194690a9 100644 --- a/networks/local/ethermintnode/Dockerfile +++ b/networks/local/ethermintnode/Dockerfile @@ -26,7 +26,7 @@ COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/emintd /usr/b COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/emintcli /usr/bin/emintcli COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/scripts/start.sh / -EXPOSE 26656 26657 1317 8545 +EXPOSE 26656 26657 1317 8545 8546 # Run emintd by default, omit entrypoint to ease using container with emintcli ENTRYPOINT ["/bin/bash", "-c"] \ No newline at end of file