-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore: do not send hardhat_setLedgerOutputEnabled over http #5578
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: d144d83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
dbe99af
to
8a96f1d
Compare
8a96f1d
to
6771f00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small typo in the changeset
Resolves #5406
The goal of this PR is to suppress
hardhat_setLedgerOutputEnabled - Method not supported
warnings from the local hardhat node logs. They appear there when one performs a deployment against a node and does not usehardhat-ledger
plugin.The approach presented in this PR is a "quick fix". It assumes that if a message with
hardhat_setLedgerOutputEnabled
method reaches an HTTP provider, it should be treated as an error and not processed further (otherwise, it would have been consumed by the ledger provider before it could reach the http provider). This ensures that ifhardhat-ledger
plugin is not used, thehardhat_setLedgerOutputEnabled
message will never reach a running node. Hence, a warning will not be printed out by the node.This is not an ideal solution as it exposes plugin context in the core package further. Some alternatives that I was thinking about in no particular order:
hardhat_setLedgerOutputEnabled
at all if a ledger provider is not present in the chain (the challenge being identifying a ledger provider)outputEnabled
a configuration option of the ledger plugin (I'm not sure whether completely enabling/disabling output is valid for the plugin; during deployment, we only disable it temporarily)