NAME

Blockchain::Ethereum::Transaction::Legacy - Ethereum Legacy transaction abstraction

SYNOPSIS

Transaction abstraction for Legacy transactions

my $transaction = Blockchain::Ethereum::Transaction::E->new(
    nonce                    => '0x0',
    max_fee_per_gas          => '0x9',
    max_priority_fee_per_gas => '0x0',
    gas_limit                => '0x1DE2B9',
    value                    => '0x1',
    data                     => '0x0',
    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
- gas_price
- gas_limit
- to
- value
- data
- v
- r
- s

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

serialize

Encodes the given transaction parameters to RLP

Usage:

serialize(1) -> RLP encoded transaction bytes
  • $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

Usage:

serialize(1) -> RLP encoded transaction bytes
  • $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::Legacy

LICENSE AND COPYRIGHT

This software is Copyright (c) 2022 by REFECO.

This is free software, licensed under:

The MIT License