Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.87 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.87 KB

Web3 API

The Web3 API provides an implementation of existing JSON-RPC APIs for the Hedera network. JSON-RPC API is a widely used standard for interacting with distributed ledgers. The aim in providing a Hedera implementation of these APIs is to ease the migration of existing dApps to Hedera and simplify the developer on-ramp.

Ethereum API

Currently, the Web3 module only provides a partial implementation of the Ethereum JSON-RPC API.

Technologies

This module uses Spring Boot for its application framework. To serve the JSON-RPC APIs, Spring WebFlux is used with annotation-based controllers. Spring Data JPA with Hibernate is used for the persistence layer.

Acceptance Tests

The Web3 API uses Postman tests to verify proper operation. The Newman command-line collection runner is used to execute the tests against a remote server. To use newman, either the executable binary or Docker approach can be used. With either approach, a baseUrl variable can be supplied to customize the target server.

Executable

First ensure newman is installed locally using npm, then execute newman.

npm install -g newman
newman run hedera-mirror-web3/postman.json --env-var baseUrl=https://previewnet.mirrornode.hedera.com

Docker

docker run --rm -v "${PWD}/hedera-mirror-web3/postman.json:/tmp/postman.json" -t postman/newman run /tmp/postman.json --env-var baseUrl=https://previewnet.mirrornode.hedera.com

Note: To test against an instance running on the same machine as Docker use your local IP instead of 127.0.0.1.