-
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
Small improvements to the config resolution of EDR networks #5865
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -158,7 +158,7 @@ export class EdrProvider extends EventEmitter implements EthereumProvider { | |||
const provider = await context.createProvider( | |||
config.chainType === "optimism" | |||
? OPTIMISM_CHAIN_TYPE | |||
: GENERIC_CHAIN_TYPE, | |||
: GENERIC_CHAIN_TYPE, // TODO: l1 is missing here |
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.
what's the difference in EDR between generic and l1? are there l1-specific rpc methods or config?
@@ -143,8 +143,26 @@ export class NetworkManagerImplementation { | |||
); | |||
|
|||
if (resolvedNetworkConfig.type === "edr") { | |||
if ( | |||
resolvedChainType !== "optimism" && |
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.
Not to be resolved in this PR, but I'm starting to think that all these keywords need to be constants.
07b9706
to
8328d37
Compare
23dc821
to
86b9c58
Compare
This is a small PR to that I put in place to be able to enable forking in EDR networks. It is not complete, though.
It does just a few things:
chainType
can be leftundefined
, as that's important to be able to change them during connection.chainType
during connection.forkConfig
to the resolved network config, without any actual resolution.The reason this PR is important is that optimism needs to be tested in forked mode.