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

Use publicnode rpcs #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ Alternatively you can use a private key directly with the `--privatekey` option,

Ethereal supports all main Ethereum networks It auto-detects the network by querying the connected node for the network ID. The connection should be geth-compatible, so either geth itself or parity with the `--geth` flag to enable geth compatibility mode. The connection could be a local node or a network service such as Infura.

Ethereal contains default connections via Infura to most major networks that can be defined by the `--network` argument. Supported neworks are mainnet, sepolia and holesky. Alternatively a connection to a custom node can be created using the `--connection` argument. For example a local IPC node might use `--connection=/home/ethereum/.ethereum/geth.ipc` or `--connection=http://localhost:8545/`

**The Infura key for Ethereal is shared among all users. If you are going to carry out a lot of queries of chain data please either use a local node or your own Infura account.**
Ethereal contains default connections via [publicnode](https://ethereum.publicnode.com/) to most major networks that can be defined by the `--network` argument. Supported neworks are mainnet, sepolia and holesky. Alternatively a connection to a custom node can be created using the `--connection` argument. For example a local IPC node might use `--connection=/home/ethereum/.ethereum/geth.ipc` or `--connection=http://localhost:8545/`

### Configuration file

Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ func connectionAddress(_ context.Context) (string, error) {

switch strings.ToLower(viper.GetString("network")) {
case "mainnet":
return "https://mainnet.infura.io/v3/831a5442dc2e4536a9f8dee4ea1707a6", nil
return "https://ethereum-rpc.publicnode.com", nil
case "sepolia":
return "https://sepolia.infura.io/v3/831a5442dc2e4536a9f8dee4ea1707a6", nil
return "https://ethereum-sepolia-rpc.publicnode.com", nil
case "holesky":
return "https://holesky.infura.io/v3/831a5442dc2e4536a9f8dee4ea1707a6", nil
return "https://ethereum-holesky-rpc.publicnode.com", nil
default:
return "", fmt.Errorf("unknown network %s", viper.GetString("network"))
}
Expand Down
2 changes: 1 addition & 1 deletion util/funcparser/goerli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestGoerli(t *testing.T) {
}

// Connect to goerli
conn, err := ethclient.Dial("https://goerli.infura.io/v3/831a5442dc2e4536a9f8dee4ea1707a6")
conn, err := ethclient.Dial("https://ethereum-sepolia-rpc.publicnode.com")
require.Nil(t, err, "failed to connect to goerli")

json, err := os.ReadFile("Tester.json")
Expand Down