getNetwork allow optional chainId and network name
See original GitHub issueThe function already exists in essential-eth
, but it does not accept any params. The params should be optional and introduce a new type Networkish
https://docs.ethers.io/v5/api/providers/#providers--networks
// By Chain Name
getNetwork("homestead");
// {
// chainId: 1,
// ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
// name: 'homestead'
// }
// By Chain ID
getNetwork(1);
// {
// chainId: 1,
// ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
// name: 'homestead'
// }
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
API Providers - Ethers.js
Create a new EtherscanProvider connected to network with the optional apiKey. ... for a common network name, a number for a common chain...
Read more >Network ID and chain ID - Hyperledger Besu
Besu sets the chain ID (and by default the network ID) automatically, using either the --genesis-file option or when specifying a network ......
Read more >Network Management — Brownie 1.19.2 documentation
Live networks with the same chain ID share local data about contract deployments. See chainid.network for a list of chain IDs. The following...
Read more >How to use the ethers.ethers.providers function in ethers - Snyk
fromMnemonic(mnemonic, cfPath).connect(ethprovider); const network = await ethprovider.getNetwork(); let store; if (urls.pisaUrl(network.chainId)) { store ...
Read more >use chainId instead of network name · Issue #26 - GitHub
currently it looks like this: it would be better if chainId's are used here instead of network names. Because if a wallet wants...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yea, sorry @dawsbot I got super busy in other stuff. Unassign me for now, and I’ll come back after a while!
Sure will try that!