Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: web3py-ext send raw tx #38

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from eth_utils.curried import (
hexstr_if_str,
to_int,
is_hexstr
)
from eth_account._utils.transaction_utils import (
set_transaction_type_if_needed,
Expand Down Expand Up @@ -206,6 +207,9 @@ def from_bytes(cls, encoded_transaction: HexBytes) -> "TypedTransaction":

def method_choice_depends_on_transaction_type(value):
tx_type = value[0]
# if tx_type is hex string, then convert it to int.
if is_hexstr(tx_type):
tx_type = int(tx_type, 16)
if 0 <= tx_type and tx_type <= 0x7f and tx_type in KLAYTN_TYPED_TRANSACTION_GROUP:
return RPCEndpoint("klay_sendRawTransaction")
return RPCEndpoint("eth_sendRawTransaction")
Expand Down
Loading