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

JsonRpcProvider.connection not documented #2611

Closed
aspiers opened this issue Jan 27, 2022 · 5 comments
Closed

JsonRpcProvider.connection not documented #2611

aspiers opened this issue Jan 27, 2022 · 5 comments
Labels
documentation Documentation related issue.

Comments

@aspiers
Copy link

aspiers commented Jan 27, 2022

Unless I'm going crazy, JsonRpcProvider.connection is the only public API for obtaining the URL which the provider is connected to ... but it's not documented:

IIUC, it returns either an object like { url: "https://..." }, or the ConnectionInfo object which was passed into the constructor.

And while I'm here, I note that the ConnectionInfo type is documented under API > Utilities > Web Utilities, which seems like an very odd and counter-intuitive place to put it:

https://docs.ethers.io/v5/api/utils/web/#ConnectionInfo

I doubt anyone would be able to easily find that via the navbar alone.

@aspiers aspiers added the documentation Documentation related issue. label Jan 27, 2022
@aspiers
Copy link
Author

aspiers commented Jan 27, 2022

See #1954 for an example of fallout from this missing documentation.

@aspiers
Copy link
Author

aspiers commented Jan 27, 2022

BTW when using hardhat-ethers, it gets harder: NomicFoundation/hardhat#2309

@ricmoo
Copy link
Member

ricmoo commented Jan 31, 2022

I can't do anything about Hardhat, you would have to discuss that with them.

But I'll update the ethers docs. :)

@ricmoo
Copy link
Member

ricmoo commented Feb 1, 2022

@aspiers
Copy link
Author

aspiers commented Feb 6, 2022

Great thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related issue.
Projects
None yet
Development

No branches or pull requests

2 participants