Skip to content

Commit

Permalink
fix(tests): Withdrawals use
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz committed Feb 11, 2024
1 parent 7002f3a commit 4ec7d20
Showing 1 changed file with 21 additions and 52 deletions.
73 changes: 21 additions & 52 deletions tests/shanghai/eip4895_withdrawals/test_withdrawals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
TestAddress,
Transaction,
TransactionException,
Transactions,
Withdrawal,
Withdrawals,
compute_create_address,
)
from ethereum_test_tools.vm.opcode import Opcodes as Op
Expand Down Expand Up @@ -502,60 +504,27 @@ def test_no_evm_execution(blockchain_test: BlockchainTestFiller):
}
blocks = [
Block(
txs=[
Transaction(
nonce=0,
gas_limit=100000,
to=Address(0x300),
),
Transaction(
nonce=1,
gas_limit=100000,
to=Address(0x400),
),
],
withdrawals=[
Withdrawal(
index=0,
validator=0,
address=Address(0x100),
amount=1,
),
Withdrawal(
index=1,
validator=1,
address=Address(0x200),
amount=1,
),
],
txs=Transactions(
gas_limit=100_000,
to=[Address(0x300), Address(0x400)], # Two transactions, one to each account
),
withdrawals=Withdrawals(
validator=range(2),
address=[Address(0x100), Address(0x200)], # Two withdrawals, one to each account
amount=1,
),
),
Block(
txs=[
Transaction(
nonce=2,
gas_limit=100000,
to=Address(0x100),
),
Transaction(
nonce=3,
gas_limit=100000,
to=Address(0x200),
),
],
withdrawals=[
Withdrawal(
index=0,
validator=0,
address=Address(0x300),
amount=1,
),
Withdrawal(
index=1,
validator=1,
address=Address(0x400),
amount=1,
),
],
txs=Transactions(
nonce=2,
gas_limit=100_000,
to=[Address(0x100), Address(0x200)], # Two transactions, one to each account
),
withdrawals=Withdrawals(
validator=range(2),
address=[Address(0x300), Address(0x400)], # Two withdrawals, one to each account
amount=1,
),
),
]

Expand Down

0 comments on commit 4ec7d20

Please sign in to comment.