-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forks,tests): EIP-2935: Contract update
- Loading branch information
Showing
8 changed files
with
126 additions
and
13 deletions.
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
Binary file modified
BIN
-17 Bytes
(83%)
src/ethereum_test_forks/forks/contracts/history_contract.bin
Binary file not shown.
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
15 changes: 15 additions & 0 deletions
15
tests/prague/eip2935_historical_block_hashes_from_state/contract_deploy_tx.json
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"type": "0x0", | ||
"nonce": "0x0", | ||
"to": null, | ||
"gas": "0x3d090", | ||
"gasPrice": "0xe8d4a51000", | ||
"maxPriorityFeePerGas": null, | ||
"maxFeePerGas": null, | ||
"value": "0x0", | ||
"input": "0x60538060095f395ff33373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500", | ||
"v": "0x1b", | ||
"r": "0x539", | ||
"s": "0xbaefe09f0109759", | ||
"hash": "0x8c7bd2d3713a0b2bb693463d2a78c4d612ac47dd38ecb74f8996a4b6fc96f03c" | ||
} |
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
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
26 changes: 26 additions & 0 deletions
26
tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
abstract: Tests [EIP-2935: Serve historical block hashes from state](https://eips.ethereum.org/EIPS/eip-2935). | ||
Test system contract deployment for [EIP-2935: Serve historical block hashes from state](https://eips.ethereum.org/EIPS/eip-2935). | ||
""" # noqa: E501 | ||
|
||
from os.path import realpath | ||
from pathlib import Path | ||
|
||
from ethereum_test_forks import Prague | ||
from ethereum_test_tools import Address, generate_system_contract_deploy_test | ||
|
||
from .spec import Spec, ref_spec_2935 | ||
|
||
REFERENCE_SPEC_GIT_PATH = ref_spec_2935.git_path | ||
REFERENCE_SPEC_VERSION = ref_spec_2935.version | ||
|
||
|
||
@generate_system_contract_deploy_test( | ||
fork=Prague, | ||
tx_json_path=Path(realpath(__file__)).parent / "contract_deploy_tx.json", | ||
expected_deploy_address=Address(Spec.HISTORY_STORAGE_ADDRESS), | ||
expected_system_contract_storage=None, | ||
) | ||
def test_system_contract_deployment(*args, **kwargs): | ||
"""Verify deployment of the block hashes system contract.""" | ||
yield from [] |
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