Skip to content

feat: Add support for all rlp.Serializable derived transactions #49

@mikeshultz

Description

@mikeshultz

Right now most of our funcs check for native-types. For example:

if isinstance(tx, Transaction):
encoded_tx = encode(tx, Transaction)
elif isinstance(tx, Type1Transaction):
encoded_tx = tx.transaction_type.to_byte() + encode(tx, Type1Transaction)
elif isinstance(tx, Type2Transaction):
encoded_tx = tx.transaction_type.to_byte() + encode(tx, Type2Transaction)
else:
raise ValueError(
"Only Transaction and Type2Transaction objects are currently supported"
)

Look into supporting any rlp.Serializable objects to allow for easier integration. May need to validate the objects for the necessary props/types (Python Protocols could be useful?) to make sure but it should be doable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions