-
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
Merged
Merged
Support older hard forks #1372
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c3e7887
Update the list of supported hardforks
alcuadrado c6de2c4
Validate both local and remote HF
alcuadrado 96224b6
Correctly format pre/post byzantium receipts
alcuadrado 8d9b716
Test hardhat network's HF validation
alcuadrado 362ebf8
Test the pre/post Byzantium receipt formatting
alcuadrado cccd5be
Fix linting error
alcuadrado d2248e9
Update packages/hardhat-core/test/internal/hardhat-network/provider/h…
alcuadrado 61a3625
Update packages/hardhat-core/src/internal/hardhat-network/provider/no…
alcuadrado d6a49d3
Add a comment explaining a failure to validate the commons
alcuadrado 889d219
Address review comments
alcuadrado 173b76a
Imprve the hardhat_impersonateAccount test
alcuadrado af18363
Workaround an issue due to Block recreating all the txs
alcuadrado f773156
Style fix
alcuadrado e214e25
Remove brokin unused import
alcuadrado 644259a
Merge pull request #1377 from nomiclabs/workaround-transactions-recre…
fvictorio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Address review comments
- Loading branch information
commit 889d219506d3cf7c77ccd82d0f28f99c32847537
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,7 +133,6 @@ export class HardhatNode extends EventEmitter { | |
common = await makeForkCommon(config); | ||
|
||
this._validateHardforks( | ||
config.hardfork, | ||
config.forkConfig.blockNumber, | ||
common, | ||
forkClient.getNetworkId() | ||
|
@@ -197,7 +196,6 @@ export class HardhatNode extends EventEmitter { | |
} | ||
|
||
private static _validateHardforks( | ||
localHardfork: string, | ||
forkBlockNumber: number | undefined, | ||
common: Common, | ||
remoteChainId: number | ||
|
@@ -206,7 +204,7 @@ export class HardhatNode extends EventEmitter { | |
throw new InternalError( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throwing |
||
`Invalid hardfork selected in Hardhat Network's config. | ||
|
||
The hardfork must be at least spuriousDragon, but ${localHardfork} was given.` | ||
The hardfork must be at least spuriousDragon, but ${common.hardfork()} was given.` | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
node
task can provide a different block number so the config validation won't be enough.