Skip to content

test(canton): cover EVM transaction param parsing edge cases #771

@Pessina

Description

@Pessina

Follow-up from PR #740.

Code:

/// Convert Canton EvmTransactionParams to an alloy TxEip1559.
///
/// TODO(test): test address extraction from 32-byte padded hex (Canton format)
/// vs 20-byte unpadded hex. Test hex parsing of all numeric fields (chain_id,
/// nonce, gas_limit, fees, value) including edge cases like leading zeros.
impl TryFrom<&EvmTransactionParams> for TxEip1559 {

Context: EvmTransactionParams accepts Canton-formatted hex values and converts them into TxEip1559. Add tests for 32-byte padded address extraction vs 20-byte unpadded hex, plus numeric parsing for chain_id, nonce, gas_limit, fees, and value, including leading-zero edge cases.

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