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

[v6] cannot set staticNetwork in JsonRpcApiProviderOptions #3834

Closed
wmwqyvon opened this issue Feb 26, 2023 · 2 comments
Closed

[v6] cannot set staticNetwork in JsonRpcApiProviderOptions #3834

wmwqyvon opened this issue Feb 26, 2023 · 2 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@wmwqyvon
Copy link

Ethers Version

6.0.8

Search Terms

No response

Describe the Problem

the code:

const provider = new ethers.JsonRpcProvider(
    "https://arb1.arbitrum.io/rpc",
    42161n,
    {staticNetwork: Network.from(42161)}
);

the error:

TypeError: staticNetwork MUST match network object (argument="options", value={ "staticNetwork": { "chainId": 42161, "name": "arbitrum" } }, code=INVALID_ARGUMENT, version=6.0.8)
{
  code: 'INVALID_ARGUMENT',
  argument: 'options',
  value: { staticNetwork: Network {} }
}

Help me, please!

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

@wmwqyvon wmwqyvon added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Feb 26, 2023
@ricmoo ricmoo added the on-deck This Enhancement or Bug is currently being worked on. label Mar 7, 2023
@ricmoo ricmoo added bug Verified to be an issue. and removed investigate Under investigation and may be a bug. labels Apr 24, 2023
@ricmoo
Copy link
Member

ricmoo commented Apr 24, 2023

I've reproduced this and am working on it. Sorry for the delay.

@ricmoo
Copy link
Member

ricmoo commented May 20, 2023

Fixed in v6.4.0.

Thanks! :)

@ricmoo ricmoo closed this as completed May 20, 2023
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels May 20, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants