NAME

Blockchain::Ethereum::Transaction::Legacy - Ethereum Legacy 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
- 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