Skip to content

Commit

Permalink
transaction test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Jan 16, 2025
1 parent 06abe36 commit fc19902
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/frontier/transactions/test_transactions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""Test address field in transaction rlp."""

from typing import Optional, Union

import pytest
from pydantic import Field

from ethereum_test_base_types import Bytes
from ethereum_test_tools import (
Address,
Alloc,
Transaction,
TransactionException,
TransactionTestFiller,
)

REFERENCE_SPEC_GIT_PATH = None
REFERENCE_SPEC_VERSION = None

pytestmark = pytest.mark.valid_from("Frontier")


class TestTransaction(Transaction):
"""Test version of the Transaction class where 'to' accepts Bytes."""

to: Optional[Union[Bytes, Address, None]] = Field(Bytes(bytes.fromhex("00")))


def test_tx_address_less_than_20(
transaction_test: TransactionTestFiller,
pre: Alloc,
):
"""Test sending a transaction with an empty authorization list."""
tx = TestTransaction(
gas_limit=100_000,
to=bytes.fromhex("0011"),
value=0,
error=TransactionException.TYPE_3_TX_MAX_BLOB_GAS_ALLOWANCE_EXCEEDED,
sender=pre.fund_eoa(),
)
tx = tx.with_signature_and_sender()
hash = tx.hash

transaction_test(
pre=pre,
tx=tx,
)

0 comments on commit fc19902

Please sign in to comment.