The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Blockchain::Ethereum::Transaction::EIP1559 - Ethereum Fee Market transaction abstraction

SYNOPSIS

Transaction abstraction for Legacy transactions

    my $transaction = Blockchain::Ethereum::Transaction::Legacy->new(
        nonce     => '0x9',
        gas_price => '0x4A817C800',
        gas_limit => '0x5208',
        to        => '0x3535353535353535353535353535353535353535',
        value     => '0xDE0B6B3A7640000',
        chain_id  => '0x1'
    );

    $transaction->sign('4646464646464646464646464646464646464646464646464646464646464646');
    my $raw_transaction = $transaction->serialize(1);
    ```

METHODS

sign

Check the parent transaction class for details Blockchain::Ethereum::Transaction

tx_format

Determines if all required fields for the transaction type are given.

Expected fields:

- chain_id - nonce - max_fee_per_gas - max_priority_fee_per_gas - gas_limit - to - value - data - access_list - v - r - s

Returns a array reference containing the avaialble fields for the transaction type

serialize

Encodes the given transaction parameters to RLP

  • $signed boolean to idenfity if the transaction is already signed (adds v r s if true) or not

Returns the RLP encoded transaction bytes

set_v

Sets the v transaction field using the given y-parity

  • $y y-parity

Returns the v hexadecimal value also sets the v fields from transaction

AUTHOR

Reginaldo Costa, <refeco at cpan.org>

BUGS

Please report any bugs or feature requests to https://github.com/refeco/perl-ethereum-transaction

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Blockchain::Ethereum::Transaction::EIP1559

LICENSE AND COPYRIGHT

This software is Copyright (c) 2022 by REFECO.

This is free software, licensed under:

  The MIT License