Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to configure hedera-json-rpc-relay address #140

Closed
yaroslav-007 opened this issue Mar 20, 2024 · 2 comments
Closed

A way to configure hedera-json-rpc-relay address #140

yaroslav-007 opened this issue Mar 20, 2024 · 2 comments

Comments

@yaroslav-007
Copy link

Problem

Hello,

We are currently working on issue Add support for smart contract verification #558 in local node repo.

We would like to be able to configure (preferably by variable) the address for hedera-json-rpc-relay for localnode in

rpc: ["http://localhost:7546"],

Solution

Adding variable for hedera rpc relay address

Alternatives

No response

@acuarica
Copy link
Contributor

Hi @yaroslav-007, after PR #164, there is a new mechanism to use custom chains. You just need to mount a custom sourcify-chains.json to configure networks. See compose.yaml and sourcify-chains.json for more details.

# The list of actual chains to be used by the `server`.
# Go to http://localhost:5555/chains to see the effective list displayed to the user.
#
# The RPCs for Hedera public networks (mainnet, testnet and previewnet)
# are already configured in `sourcify/services/server/src/chains.json`.
#
# Note that when `NODE_ENV=development` Sourcify enables two more development networks:
# - (1337) Ganache Localhost - http://localhost:8545
# - (31337) Hardhat Network Localhost - http://localhost:8545
- type: bind
source: ./sourcify-chains.json
target: /home/app/services/server/dist/sourcify-chains.json

"298": {
"sourcifyName": "Hedera Localnet",
"supported": true,
"rpc": [
"http://host.docker.internal:7546"
]
}

I believe this should solve the issue, please let us know if you need more support.

@yaroslav-007
Copy link
Author

Hello,
The new mechanism for using custom chains is working as per my tests/implementation.

Thanks for the support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants