-
Notifications
You must be signed in to change notification settings - Fork 952
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 vm fork #3796
fix vm fork #3796
Conversation
✅ Deploy Preview for remixproject ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
49373ba
to
f4d5a4a
Compare
|
||
class CustomEthersStateManager extends StateManagerCommonStorageDump { | ||
private provider: ethers.providers.StaticJsonRpcProvider | ethers.providers.JsonRpcProvider | ||
private blockTag: string |
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.
blockTag
type definition (string
) does not match it's type definition on line 93 (bigint | 'earliest'
)
} else if (opts.provider instanceof ethers.providers.JsonRpcProvider) { | ||
this.provider = opts.provider | ||
} else { | ||
throw new Error(`valid JsonRpcProvider or url required; got ${opts.provider}`) |
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.
provider
can be of 3 types string | ethers.providers.StaticJsonRpcProvider | ethers.providers.JsonRpcProvider
. Shouldn't there be a third check for else if (opts.provider instanceof ethers.providers.StaticJsonRpcProvider)
before the else statement?
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.
StaticJsonRpcProvider
is a JsonRpcProvider
so it should just respond true to that check.
9e53fa6
to
d390adf
Compare
rewrite of the CustomEthersStateManager.
the previous implementation didn't handle well the checkpoint/revert.
in order to test it: