perl-ethereum-transaction

Ethereum transaction abstraction for signing and generating raw transactions

Table of contents

Usage

    my $transaction = Blockchain::Ethereum::Transaction::EIP1559->new(
        nonce                    => '0x0',
        max_fee_per_gas          => '0x9',
        max_priority_fee_per_gas => '0x0',
        gas_limit                => '0x1DE2B9',
        to                       => '0x3535353535353535353535353535353535353535'
        value                    => '0xDE0B6B3A7640000',
        data                     => '0x',
        chain_id                 => '0x539'
    );

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

    print unpack("H*", $raw_transaction);

Standalone version

ethereum-raw-tx --tx-type=legacy --chain-id=0x1 --nonce=0x9 --gas-price=0x4A817C800 --gas-limit=0x5208 --to=0x3535353535353535353535353535353535353535 --value=0xDE0B6B3A7640000 --pk=0x4646464646464646464646464646464646464646464646464646464646464646

Supported Transaction Types

Installation

cpanminus

cpanm Blockchain::Ethereum::Transaction

make

perl Makefile.PL
make
make test
make install

Support and Documentation

After installing, you can find documentation for this module with the perldoc command.

perldoc Blockchain::Ethereum::Transaction

You can also look for information at:

License and Copyright

This software is Copyright (c) 2023 by REFECO.

This is free software, licensed under:

The MIT License