-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support older hard forks #1372
Conversation
@@ -188,6 +196,40 @@ export class HardhatNode extends EventEmitter { | |||
return [common, node]; | |||
} | |||
|
|||
private static _validateHardforks( |
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.
We validate this here because:
- The config validation can't make requests and fetch the remote chainId.
- 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( |
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.
Throwing ProviderError
s 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 () { |
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.
Created this other tests as they depend on fixture projects, and not the PROVIDERS
array.
packages/hardhat-core/src/internal/hardhat-network/provider/node.ts
Outdated
Show resolved
Hide resolved
packages/hardhat-core/src/internal/hardhat-network/provider/node.ts
Outdated
Show resolved
Hide resolved
packages/hardhat-core/test/internal/hardhat-network/provider/hardhat-network-options.ts
Outdated
Show resolved
Hide resolved
packages/hardhat-core/test/internal/hardhat-network/provider/hardhat-network-options.ts
Outdated
Show resolved
Hide resolved
…ardhat-network-options.ts Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
…de.ts Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
…ation-issue Workaround transactions recreation issue
No description provided.