Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
cancun compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kjeom committed Apr 23, 2024
1 parent 3377b81 commit a381976
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
LEGACY_TRANSACTION_VALID_VALUES,
is_int_or_prefixed_hexstr,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
is_int_or_prefixed_hexstr,
is_empty_or_checksum_address,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
is_int_or_prefixed_hexstr,
is_empty_or_checksum_address,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
is_int_or_prefixed_hexstr,
is_empty_or_checksum_address,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
is_int_or_prefixed_hexstr,
)

from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
is_int_or_prefixed_hexstr,
is_empty_or_checksum_address,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
is_int_or_prefixed_hexstr,
is_empty_or_checksum_address,
)
from eth_account._utils.typed_transactions import (
from eth_account._utils.typed_transactions.typed_transaction import (
_TypedTransactionImplementation
)
from eth_account._utils.signing import (
Expand Down
12 changes: 8 additions & 4 deletions web3py-ext/web3py_ext/transaction/wrapper_typed_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Any,
Callable,
Dict,
List,
Union,
)
from cytoolz import (
Expand Down Expand Up @@ -29,9 +30,7 @@
TypedTransaction,
AccessListTransaction,
DynamicFeeTransaction,
HexBytes,
set_transaction_type_if_needed,
is_int_or_prefixed_hexstr,
BlobTransaction,
)
from eth_utils.curried import (
hexstr_if_str,
Expand Down Expand Up @@ -84,7 +83,7 @@
* EIP-2930's AccessListTransaction : is translated as Klaytn Extended EIP-2930
* EIP-1559's DynamicFeeTransaction : is translated as Klaytn Extended EIP-1559
"""
def from_dict(cls, dictionary: Dict[str, Any]) -> "TypedTransaction":
def from_dict(cls, dictionary: Dict[str, Any], blobs: List[bytes] = None) -> "TypedTransaction":
"""
Builds a TypedTransaction from a dictionary.
Verifies the dictionary is well formed.
Expand All @@ -99,6 +98,8 @@ def from_dict(cls, dictionary: Dict[str, Any]) -> "TypedTransaction":
transaction = AccessListTransaction
elif transaction_type == DynamicFeeTransaction.transaction_type:
transaction = DynamicFeeTransaction
elif transaction_type == BlobTransaction.transaction_type:
transaction = BlobTransaction
elif transaction_type == ValueTransferTransaction.transaction_type:
transaction = ValueTransferTransaction
elif transaction_type == ValueTransferWithMemoTransaction.transaction_type:
Expand Down Expand Up @@ -148,6 +149,9 @@ def from_bytes(cls, encoded_transaction: HexBytes) -> "TypedTransaction":
elif encoded_transaction[0] == DynamicFeeTransaction.transaction_type:
transaction_type = DynamicFeeTransaction.transaction_type
transaction = DynamicFeeTransaction.from_bytes(encoded_transaction)
elif encoded_transaction[0] == BlobTransaction.transaction_type:
transaction_type = BlobTransaction.transaction_type
transaction = BlobTransaction.from_bytes(encoded_transaction)
elif encoded_transaction[0] == ValueTransferTransaction.transaction_type:
transaction_type = ValueTransferTransaction.transaction_type
transaction = ValueTransferTransaction.from_bytes(encoded_transaction)
Expand Down

0 comments on commit a381976

Please sign in to comment.