Skip to content

Can't connect to goerli via the default provider #3979

Open
@GildedHonour

Description

@GildedHonour

Ethers Version

6.x

Search Terms

No response

Describe the Problem

Why doesn't this code work in 5.7.2

const provider = ethers.getDefaultProvider("goerli", {
  etherscan: process.env.ETHERSCAN_API_KEY,
});

and no longer does in 6.x

TypeError: unsupported network (argument="network", value="goerli", code=INVALID_ARGUMENT, version=6.2.3)

?

How's it unsupported? According to the documentation of the v6, it should work.

How to connect to "goerli" via the default provider?

And the same error will get thrown for "sepolia" as well.

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

Metadata

Metadata

Assignees

Labels

bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions