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 - Ethereum transaction abstraction

VERSION

Version 0.002

SYNOPSIS

In most cases you don't want to use this directly, use instead:

METHODS

sign

Fill up the r, s and v fields for the transaction

Usage:

    sign($private_key) -> $self
  • private_key - hexadecimal private key (non 0x prefixed)

self

tx_format

To be implemented by the child classes, it will determine if all required fields for the transaction type are given.

Usage:

    tx_format() -> array reference

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

serialize

To be implemented by the child classes, 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

To be implemented by the child classes, set the v transaction field using the given y-parity

Usage:

    set_v($v_uint) -> $v
  • $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

LICENSE AND COPYRIGHT

This software is Copyright (c) 2022 by REFECO.

This is free software, licensed under:

  The MIT License