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

Export createGetUrl function with browser fetch version #4929

Open
tornadocontrib opened this issue Jan 24, 2025 · 2 comments
Open

Export createGetUrl function with browser fetch version #4929

tornadocontrib opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@tornadocontrib
Copy link

Ethers Version

6.x

Search Terms

No response

Describe the Problem

Currently only createGetUrl from node http request version is exported from ethers.js and it is impossible to use fetch version of it from node.js

Would be great if you could export this as well, to avoid reimplementing the whole code like this https://github.com/tornadocontrib/tornado-scripts/blob/main/src/providers.ts#L129

Code Snippet

Contract ABI

Errors

Environment

No response

Environment (Other)

No response

@tornadocontrib tornadocontrib added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Jan 24, 2025
@ricmoo
Copy link
Member

ricmoo commented Jan 24, 2025

You want the browser implementation of createGetUrl exported in node environments?

I have been planning to use the “modern” node exports for another feature, I could add this as well, something akin to import { createGetUrl } from "ethers/utils-browser";. Or possibly just "ethers/browser"?

@tornadocontrib
Copy link
Author

@ricmoo Yes import { createGetUrl } from "ethers/utils-browser"; would sound ideal

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. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants