alchemy-sdk-js icon indicating copy to clipboard operation
alchemy-sdk-js copied to clipboard

FR: Add support for ethersjs v6

Open robotoer opened this issue 2 years ago • 12 comments

Is your feature request related to a problem? Please describe. Usage of alchemy-sdk with ethers v6 does work due to updates to the provider structure

robotoer avatar May 29 '23 18:05 robotoer

@robotoer Was there any particular feature in ethers v6 that you're looking to use?

thebrianchen avatar Jun 06 '23 18:06 thebrianchen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs

github-actions[bot] avatar Jul 07 '23 02:07 github-actions[bot]

Leaving this PR open to gauge developer demand. If you are using ethers v6 and want the sdk to support it, please comment what features you're looking for from v6. Thanks!

thebrianchen avatar Jan 24 '24 23:01 thebrianchen

@thebrianchen nextjs 14 and the alchemy sdk are currently unusable without this upgrade. See:

https://github.com/ethers-io/ethers.js/issues/4469 and on this repo https://github.com/alchemyplatform/alchemy-sdk-js/issues/400

SohailKh avatar Feb 12 '24 06:02 SohailKh

@SohailKh Would adding the option to pass in your own connectionInfo overrides to the underlying provider based on the issue in ethers thread help?

The reason we are not considering upgrading to ethers is v6 without sufficient developer demand is because it will a breaking change the to the alchemy SDK. Currently, ethers v5 has 5x more weekly downloads than v6. If there is a particular set of features that developers require from v6 that aren't supported in v5, we will re-prioritize. Thanks!

thebrianchen avatar Mar 05 '24 17:03 thebrianchen

Hello to the team and thank you for your work!! As said above, ethers 5 is not usable with nextjs 14 ... We did the nextjs migration few months ago and there was no other way than migrating ethers from 5 to 6 in order to make them both working together. If migration is not considered now, it might lead being stuck with a deprecated stack and make future migration even more painful... I know ethers changed quite a lot of things between both versions (I have to go through it on my side) but it seems to be for the better... -> no more BigNumber to be used throughout the code if I have to pick one "randomly" ...

tazous avatar Mar 13 '24 13:03 tazous

@thebrianchen The main reason I've updated my apps to ethers.js v6 is the use of the native BigInt type over the BigNumber library used in ethers.js v5. There's not really any new functionality I need from ethers.js v6 aside from that.

I realize the hesitation to update to v6 because of breaking changes but could it possibly be added an option instead? Some kind of flag when when creating your alchemy instance or something? In some of my apps I've installed ethers.js v6 alongside ethers.js v5 in a different namespace so that we can slowly migrate over (example below).

Package.json:

"ethers": "5.7.2",
"ethers-v6": "npm:[email protected]",
"ethers-v6,": "link:@typechain/ethers-v6,",

Code:

import { ...ethersV5Stuff } from 'ethers';
import { ...ethersV6Stuff } from 'ethers-v6';

Then you can have both in the same project easily and possibly slowly start supporting it. I'd love to be able to solely use the Alchemy SDK, but the lack of support for BigInt/EthersV6 is stopping that.

jhubbardsf avatar Mar 27 '24 14:03 jhubbardsf

@SohailKh Would adding the option to pass in your own connectionInfo overrides to the underlying provider based on the issue in https://github.com/ethers-io/ethers.js/issues/4469#issuecomment-1932145334 help?

Yes. Is that possible to do?

Bookcliff avatar Apr 04 '24 21:04 Bookcliff

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs

github-actions[bot] avatar May 05 '24 01:05 github-actions[bot]

@SohailKh @Bookcliff I've added support for the ConnectionInfo override in v3.3.1. This should you workaround the error in #400 by passing your own AlchemySettings.connectionInfoOverrides option.

thebrianchen avatar May 08 '24 16:05 thebrianchen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs

github-actions[bot] avatar Jun 08 '24 01:06 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs

github-actions[bot] avatar Jul 17 '24 01:07 github-actions[bot]