MetaMask uses Infura to submit transactions and query balances, and Infura can be flaky.
If you want to use your node's eth1 container, this guide will help you (provided you are staking from home!)
This guide assumes you're using Geth or Besu as an eth1 client
Run rocketpool service config
and go to the Execution Client (ETH1) section.
First, Check Expose RPC Ports.
Then:
- If you're using Chrome and Geth:
- set Additional Flags to contain
--http.corsdomain=chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn
- set Additional Flags to contain
- If you're using Chrome and Besu:
- set Additional Flags to contain
--rpc-http-cors-origins=chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn
- set Additional Flags to contain
- If you're using Firefox:
- Navigate to
about:debugging#/runtime/this-firefox
. You need to get the moz-extension domain for your installation of MetaMask. It is unique to you. It resemblesmoz-extension://9675fa0d-3038-4741-a5df-c38217e77bd6
(with no trailing/manifest.json
)- If you're using Geth, set Additional Flags to contain
--http.corsdomain=moz-extension://your-moz-extension-id
- If you're using Besu, set Additional Flags to contain
--rpc-http-cors-origins=moz-extension://your-moz-extension-id
- If you're using Geth, set Additional Flags to contain
- Navigate to
Save and exit, restarting the containers when prompted.
On the node, run:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://0.0.0.0:8545
You should see a response similar to: "jsonrpc":"2.0","id":67,"result":"Geth/v1.10.17-stable-25c9b49f/linux-amd64/go1.18"}
Go to the MetaMask settings and go to the Networks tab. Click Add a network.
Fill it out like this and hit save (using the LAN or Tailscale IP address of your node in the RPC URL):
Note: MetaMask may show a red error complaining that chain id 1 is used by Ethereum Mainnet. You can ignore this error.
Note: You must append :8545
to your IP address as shown in the screenshot.
Hit save. You should be all set!