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

Goerli URL for AlchemyProvider class not updated #3320

Closed
EdwardsVO opened this issue Aug 30, 2022 · 1 comment
Closed

Goerli URL for AlchemyProvider class not updated #3320

EdwardsVO opened this issue Aug 30, 2022 · 1 comment
Assignees
Labels
investigate Under investigation and may be a bug.

Comments

@EdwardsVO
Copy link

EdwardsVO commented Aug 30, 2022

Ethers Version

5.6.9

Search Terms

provider

Describe the Problem

AlchemyProvider class, getUrl method not updated.
host for Goerli network

before:
static getUrl(network: Network, apiKey: string): ConnectionInfo {
let host = null;
switch (network.name) {
case "homestead":
host = "eth-mainnet.alchemyapi.io/v2/";
break;
case "ropsten":
host = "eth-ropsten.alchemyapi.io/v2/";
break;
case "rinkeby":
host = "eth-rinkeby.alchemyapi.io/v2/";
break;
case "goerli":
host = "eth-goerli.alchemyapi.io/v2/";
break;
case "kovan":
host = "eth-kovan.alchemyapi.io/v2/";
break;
case "matic":
host = "polygon-mainnet.g.alchemy.com/v2/";
break;
case "maticmum":
host = "polygon-mumbai.g.alchemy.com/v2/";
break;
case "arbitrum":
host = "arb-mainnet.g.alchemy.com/v2/";
break;
case "arbitrum-rinkeby":
host = "arb-rinkeby.g.alchemy.com/v2/";
break;
case "optimism":
host = "opt-mainnet.g.alchemy.com/v2/";
break;
case "optimism-kovan":
host = "opt-kovan.g.alchemy.com/v2/";
break;
default:
logger.throwArgumentError("unsupported network", "network", arguments[0]);
}

Goerli link updates to: "eth-goerli.g.alchemyapi.io/v2/";

So, update:

static getUrl(network: Network, apiKey: string): ConnectionInfo {
let host = null;
switch (network.name) {
case "homestead":
host = "eth-mainnet.alchemyapi.io/v2/";
break;
case "ropsten":
host = "eth-ropsten.alchemyapi.io/v2/";
break;
case "rinkeby":
host = "eth-rinkeby.alchemyapi.io/v2/";
break;
case "goerli":
host = "eth-goerli.g.alchemyapi.io/v2/";
break;
case "kovan":
host = "eth-kovan.alchemyapi.io/v2/";
break;
case "matic":
host = "polygon-mainnet.g.alchemy.com/v2/";
break;
case "maticmum":
host = "polygon-mumbai.g.alchemy.com/v2/";
break;
case "arbitrum":
host = "arb-mainnet.g.alchemy.com/v2/";
break;
case "arbitrum-rinkeby":
host = "arb-rinkeby.g.alchemy.com/v2/";
break;
case "optimism":
host = "opt-mainnet.g.alchemy.com/v2/";
break;
case "optimism-kovan":
host = "opt-kovan.g.alchemy.com/v2/";
break;
default:
logger.throwArgumentError("unsupported network", "network", arguments[0]);
}

Code Snippet

provider = new AlchemyProvider("goerli", process.env.ETH_ALCHEMY_API_KEY);

Contract ABI

const abi = [
    "function mint(uint _amount, address receiver) public",
  ];

Errors

Function not called

Environment

node.js (v12 or newer)

Environment (Other)

No response

@EdwardsVO EdwardsVO added the investigate Under investigation and may be a bug. label Aug 30, 2022
@EdwardsVO EdwardsVO changed the title Bug Report Title Goerli URL for AlchemyProvider class not updated Aug 30, 2022
@ricmoo
Copy link
Member

ricmoo commented Oct 19, 2022

This has been updated in 5.7.2.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug.
Projects
None yet
Development

No branches or pull requests

2 participants