Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.http.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# Network Configuration
CHAIN_ID= # The network chain id. Local/previewnet = 0x12a (298), Previewnet = 0x129 (297), Testnet = 0x128 (296), Mainnet = 0x127 (295)
HEDERA_NETWORK= # Which network to connect to. Can be: previewnet, testnet, mainnet or a map of IPs and nodes e.g. {"127.0.0.1:50211":"0.0.3"}
MIRROR_NODE_URL= # The Mirror Node API endpoint
MIRROR_NODE_URL= # The Mirror Node API endpoint e.g. https://testnet.mirrornode.hedera.com or https://mainnet.mirrornode.hedera.com

# Operator Account (Required for transaction execution)
# Operator Account (Required for transaction execution; use the Hedera Portal account for an account with 1000 HBAR / day https://hubs.ly/Q03Vw-vz0)
OPERATOR_ID_MAIN= # Operator account ID used to pay for transactions e.g. 0.0.1001
OPERATOR_KEY_MAIN= # Operator private key used to sign transactions in hex encoded DER format
# OPERATOR_KEY_FORMAT=DER # Optional. Operator private key format. Valid types: DER, HEX_ECDSA, or HEX_ED25519
Expand Down
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,41 @@ You must have installed

We also recommend installing the "prettier" plugin in IntelliJ.

### Steps
### Quickstart

From the root of the project workspace:
Clone the repository

1. Run `npm install`. This will create populate and link `node_modules`.
2. Run `npm run build`. This will clean and compile the relay library and the server.
3. Run `npm run start`. This will start the server on port `7546`.
```bash
git clone https://github.com/hiero-ledger/hiero-json-rpc-relay.git
cd hiero-json-rpc-relay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still add steps to install packages and build the project as well, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in the instructions for starting the dockerized version of the application, but we could include an alternative section on running it directly with npm start as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we shouldn't keep Node/NPM in the requirements, because they no longer apply to the docker-only startup instruction.

```

Configure required environment variables

```bash
cp .env.http.example .env
```

Open .env in your code editor and populate these vars

```
# ========== REQUIRED CONFIGURATION ==========
# Network Configuration
CHAIN_ID= # The network chain id. Local/previewnet = 0x12a (298), Previewnet = 0x129 (297), Testnet = 0x128 (296), Mainnet = 0x127 (295)
HEDERA_NETWORK= # Which network to connect to. Can be: previewnet, testnet, mainnet or a map of IPs and nodes e.g. {"127.0.0.1:50211":"0.0.3"}
MIRROR_NODE_URL= # The Mirror Node API endpoint e.g. https://testnet.mirrornode.hedera.com or https://mainnet.mirrornode.hedera.com

# Operator Account (Required for transaction execution; use the Hedera Portal (https://hubs.ly/Q03Vw-vN0) account for 1000 HBAR / day)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is https://hubs.ly/Q03Vw-vN0? Can we not include it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it might be better to use a faucet address with our domain.

Also, I would avoid the bracket-inside-a-bracket construction. Maybe use markdown format [Hedera Portal](address to hedera portal) instead?

Also, I'm missing information that the description about the faucet applies only to the testnet/previewnet configuration.

OPERATOR_ID_MAIN= # Operator account ID used to pay for transactions e.g. 0.0.1001
OPERATOR_KEY_MAIN= # Operator private key used to sign transactions in hex encoded DER format
OPERATOR_KEY_FORMAT= # Optional. Operator private key format. Valid types: DER, HEX_ECDSA, or HEX_ED25519
```

Spin up Docker containers (JSON RPC Relay source code & Redis Cache)

Alternatively, after `npm install`, from within the IDE, you should see the `Start Relay Microservice`
run configuration. You should be able to just run that configuration, and it should start the server on port `7546`.
```
docker compose up -d
```

## Testing

Expand Down
Loading
Loading