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

Support older hard forks #1372

Merged
merged 15 commits into from
Apr 6, 2021
Merged

Support older hard forks #1372

merged 15 commits into from
Apr 6, 2021

Conversation

alcuadrado
Copy link
Member

No description provided.

@@ -188,6 +196,40 @@ export class HardhatNode extends EventEmitter {
return [common, node];
}

private static _validateHardforks(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We validate this here because:

  1. The config validation can't make requests and fetch the remote chainId.
  2. The node task can provide a different block number so the config validation won't be enough.

remoteChainId: number
): void {
if (!common.gteHardfork("spuriousDragon")) {
throw new InternalError(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throwing ProviderErrors because this are thrown from a request, as the HardhatNode instance is created on the first RPC request.

@@ -4506,3 +4508,47 @@ describe("Eth module", function () {
});
});
});

describe("Eth module - special tests", function () {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created this other tests as they depend on fixture projects, and not the PROVIDERS array.

@fvictorio fvictorio merged commit 888378a into master Apr 6, 2021
@fvictorio fvictorio deleted the support-older-hardforks branch April 6, 2021 20:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants