Skip to content

Commit 5a28805

Browse files
authored
fix compute_address calls (#744)
Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent 5687c86 commit 5a28805

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

tests/verkle/eip4762_verkle_gas_witness/test_codecopy_generic_initcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_generic_codecopy_initcode(blockchain_test: BlockchainTestFiller, fork:
5050
TestAddress: Account(balance=1000000000000000000000),
5151
}
5252

53-
contract_address = compute_create_address(TestAddress, 0)
53+
contract_address = compute_create_address(address=TestAddress, nonce=0)
5454
if instruction == Op.EXTCODECOPY:
5555
deploy_code = Op.EXTCODECOPY(contract_address, 0, 0, 100) + Op.ORIGIN * 100
5656
data = Initcode(deploy_code=deploy_code)

tests/verkle/eip4762_verkle_gas_witness/test_creates.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_create(
6565
"""
6666
contract_code = Op.PUSH0 * code_size
6767
if create_instruction is None or create_instruction == Op.CREATE:
68-
contract_address = compute_create_address(TestAddress, 0)
68+
contract_address = compute_create_address(address=TestAddress, nonce=0)
6969
else:
7070
contract_address = compute_create2_address(
7171
TestAddress, 0xDEADBEEF, Initcode(deploy_code=contract_code)
@@ -129,7 +129,7 @@ def test_create_insufficient_gas(
129129
"""
130130
contract_code = Op.PUSH0 * (129 * 31 + 42)
131131
if create_instruction is None or create_instruction == Op.CREATE:
132-
contract_address = compute_create_address(TestAddress, 0)
132+
contract_address = compute_create_address(address=TestAddress, nonce=0)
133133
else:
134134
contract_address = compute_create2_address(
135135
TestAddress, 0xDEADBEEF, Initcode(deploy_code=contract_code)
@@ -237,7 +237,7 @@ def test_big_calldata(
237237
"""
238238
contract_code = Op.PUSH0 * (1000 * 31 + 42)
239239
if create_instruction is None or create_instruction == Op.CREATE:
240-
contract_address = compute_create_address(TestAddress, 0)
240+
contract_address = compute_create_address(address=TestAddress, nonce=0)
241241
else:
242242
contract_address = compute_create2_address(
243243
TestAddress, 0xDEADBEEF, Initcode(deploy_code=contract_code)
@@ -291,7 +291,7 @@ def _create(
291291
tx_value = 0
292292
tx_data = deploy_code
293293
if generate_collision:
294-
contract_address = compute_create_address(TestAddress, 0)
294+
contract_address = compute_create_address(address=TestAddress, nonce=0)
295295
pre[contract_address] = Account(nonce=1)
296296
elif create_instruction is not None and create_instruction.int() == Op.CREATE2.int():
297297
pre[TestAddress2] = Account(
@@ -309,7 +309,7 @@ def _create(
309309
tx_value = value
310310
tx_data = deploy_code
311311
if generate_collision:
312-
contract_address = compute_create_address(TestAddress, 0)
312+
contract_address = compute_create_address(address=TestAddress, nonce=0)
313313
pre[contract_address] = Account(nonce=1)
314314

315315
tx = Transaction(

tests/verkle/eip4762_verkle_gas_witness/test_extcodesize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _extcodesize(
131131

132132
post = {}
133133
if not fails:
134-
contract_address = compute_create_address(TestAddress, tx.nonce)
134+
contract_address = compute_create_address(address=TestAddress, nonce=tx.nonce)
135135
post[contract_address] = Account(storage={0: len(bytecode)})
136136

137137
# witness = Witness()

tests/verkle/eip6800_genesis_verkle_tree/test_contract_codechunking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_code_chunking(blockchain_test: BlockchainTestFiller, fork: str, bytecod
7777
)
7878
blocks = [Block(txs=[tx])]
7979

80-
contract_address = compute_create_address(TestAddress, tx.nonce)
80+
contract_address = compute_create_address(address=TestAddress, nonce=tx.nonce)
8181

8282
post = {
8383
contract_address: Account(

tests/verkle/eip6800_genesis_verkle_tree/test_contract_creation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_contract_creation(
6868
)
6969
blocks = [Block(txs=[tx])]
7070

71-
contract_address = compute_create_address(TestAddress, tx.nonce)
71+
contract_address = compute_create_address(address=TestAddress, nonce=tx.nonce)
7272

7373
post = {
7474
contract_address: Account(

tests/verkle/eip6800_genesis_verkle_tree/test_storage_slot_write.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_storage_slot_write(blockchain_test: BlockchainTestFiller, fork: str, sl
7272
)
7373
blocks = [Block(txs=[tx])]
7474

75-
contract_address = compute_create_address(TestAddress, tx.nonce)
75+
contract_address = compute_create_address(address=TestAddress, nonce=tx.nonce)
7676

7777
post = {
7878
contract_address: Account(

0 commit comments

Comments
 (0)