You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const provider = new ethers.providers.StaticJsonRpcProvider(url);
The provider just hangs and nothing really happens. If I call the rest endpoint (from Postman) it works.
I was thinking maybe I should provide the chain id and name of the network but I can't find it for the beacon chain. I also tried passing the infura project id and secret as basic auth but that didn't work either.
Am I doing something wrong or is querying eth 2.0 not possible this way? Any help is appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to connect to https://secret:secret@eth2-beacon-mainnet.infura.io (eth 2.0) using ethers.js and query blocks from beacon chain.
The provider just hangs and nothing really happens. If I call the rest endpoint (from Postman) it works.
I was thinking maybe I should provide the chain id and name of the network but I can't find it for the beacon chain. I also tried passing the infura project id and secret as basic auth but that didn't work either.
Am I doing something wrong or is querying eth 2.0 not possible this way? Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions