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

ethers v6 #288

Open
aleciten opened this issue Jul 14, 2023 · 16 comments
Open

ethers v6 #288

aleciten opened this issue Jul 14, 2023 · 16 comments

Comments

@aleciten
Copy link

Any plans to upgrade relayer to use ethers v6?

@xkelxmc
Copy link

xkelxmc commented Aug 8, 2023

I'm also interested in this topic

@Hicham010
Copy link

Wen ethers v6?

@fumiyamizuguchi
Copy link

It's been a year since the release of ethers.js v6. Many projects are now based on v6, and downgrading to v5 just for Defender is difficult. I urge you to promptly support ethers.js v6.

@froggiedev
Copy link

What's the status on this? @shahnami @spalladino @tirumerla @MCarlomagno

@tirumerla
Copy link
Contributor

What's the status on this? @shahnami @spalladino @tirumerla @MCarlomagno

Hello @froggiedev apologies for the late reply. We have this item in our todo list and we are planning to tackle it in next few weeks. We will keep you updated once it's released.

@tirumerla
Copy link
Contributor

Hello Folks, we released ethers v6 support in the latest defender-sdk package. You can use defender-sdk package with defender 2.0. Please let us know if this works for you or any feedback you may have on defender-sdk packages. We are looking into adding ethers v6 to defender-client packages but timeline is unknown. We also have plans to deprecate defender-client packages soon would recommend switching to defender-sdk if it works for your usecases.

Please let me know if you have any questions.

@aleciten
Copy link
Author

Awesome news!, we'll try it out and let you guys know.

Thanks

@stewart-lore
Copy link

stewart-lore commented Jan 16, 2024

The relay package in defender-sdk is still using ethers5. Are you planning on upgrading this this to 6?

Reference:

"@ethersproject/abstract-provider": "^5.6.1",

@MCarlomagno
Copy link
Member

Hi @stewart-lore that's correct, we upgraded ethers from v5 to v6, but we still are using 5.x version for abstract-provider, there is no such dependency for ethers 6 so we are working on migrating and, ideally, remove them. This is planned to happen in the following weeks

@naddison36
Copy link

I've tried using @openzeppelin/defender-sdk v1.9.0 with ethers v6.10.0 but its incompatible when using the relay signer.

When I try and wait for a transaction to be mined using const receipt = await tx.wait(), I get the following error

/primestaked-eth/node_modules/ethers/src.ts/providers/provider.ts:1516
                if ((await receipt.confirmations()) >= confirms) {
                                   ^
TypeError: receipt.confirmations is not a function
    at DefenderRelayProvider.txListener (/primestaked-eth/node_modules/ethers/src.ts/providers/provider.ts:1516:36)
    at Timeout._onTimeout (/primestaked-eth/node_modules/@ethersproject/providers/src.ts/base-provider.ts:2137:32)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

ethers.js v6 changed confirmations from a number in v5 to a promise that resolves a number.

Ethers v5 TransactionResponse
https://docs.ethers.org/v5/api/providers/types/#providers-TransactionResponse

Ethers v6 TransactionResponse
https://docs.ethers.org/v6/api/providers/#TransactionReceipt-confirmations

@naddison36
Copy link

The best way to replicate the Ethers v6 compatibility issue of the relay signer is to run the ethers-signer example in the Defender SDK. It uses Ethers v6 and is currently failing

@naddison36
Copy link

For anyone using Hardhat, you'll need to down the hardhat-chai-matchers and hardhat-ethers dependencies to work with Ethers v5. Here's what I'm using

    "@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
    "@nomiclabs/hardhat-ethers": "^2.2.3",
    "@openzeppelin/defender-sdk": "^1.9.0",
    "ethers": "^5.7.2",
    "hardhat": "^2.18.3",

@jkirkpatrick
Copy link

Almost a year and still no Ethers v6? The impact on defender-admin-client has my team abandoning defender... for the second time this year.

@MCarlomagno
Copy link
Member

@jkirkpatrick we are deprecating this package in favor of defender-sdk, which already supports ethers v6.

I attach some resources:

@jkirkpatrick
Copy link

@MCarlomagno So you're saying the current documentation and installation guides for Defender v2 are incorrect, and if I don't start by cloning the starter repo, I am out of luck due to the lack of a migration guide?

@MCarlomagno
Copy link
Member

MCarlomagno commented Apr 29, 2024

So you're saying the current documentation and installation guides for Defender v2 are incorrect

Could you share the incorrect docs please? so we can fix them as soon as possible
Thanks!

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

No branches or pull requests

10 participants