Skip to content

Add data field to legacy transaction #23

@PiVortex

Description

@PiVortex

The legacy transaction type for EVM does not support the data field - it should

https://github.com/NearDeFi/chainsig.js/blob/main/src/chain-adapters/EVM/types.ts#L22

Rather than having different methods for legacy and different EIPs, we can change EVMUnsignedTransaction to be any one of TransactionRequest instead of a specific one.

https://github.com/NearDeFi/chainsig.js/blob/main/src/chain-adapters/EVM/types.ts#L10
https://github.com/wevm/viem/blob/3bc5e6f3c4a317441063342dd9ec2aaa7eb56b01/src/types/transaction.ts#L287

As such LegacyTransaction methods can be removed.

Since removing LegacyTransaction will add a breaking change I would suggest for now adding support for all transaction types to EVMUnsignedTransaction and later removing LegacyTransaction along with other breaking changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions