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

fix: return no accounts if eth_accounts is deprecated #5655

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

kanej
Copy link
Member

@kanej kanej commented Aug 19, 2024

Erigon now responds that eth_accounts is deprecated when we make an RPC call. Instead of erroring we now return an empty set of accounts from hre.ethers.getSigners if eth_accounts is deprecated. Effectively we fall back with no unlocked accounts available from the node.

Fixes #5572.

Manual Testing

This was tested by running a local Erigon node in dev mode, connecting to it via a Hardhat script and invoking hre.ethers.getSigners().

Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 2:59pm

Copy link

changeset-bot bot commented Aug 19, 2024

🦋 Changeset detected

Latest commit: 056704e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/hardhat-ethers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Aug 19, 2024
Erigon now responds that `eth_accounts` is deprecated when we make an
RPC call. Instead of erroring we now return an empty set of accounts
from `getSigners` if `eth_accounts` is deprecated.

Fixes #5572.
@kanej kanej force-pushed the fix/erigon_depcrecated_eth_accounts branch from 0d89ce7 to 056704e Compare August 19, 2024 14:58
@kanej kanej marked this pull request as ready for review August 19, 2024 17:40
@kanej kanej requested a review from alcuadrado August 19, 2024 17:41
@kanej kanej merged commit 93b30d5 into main Aug 19, 2024
34 checks passed
@kanej kanej deleted the fix/erigon_depcrecated_eth_accounts branch August 19, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

ProviderError: the method has been deprecated: eth_accounts
2 participants