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::ABI::Type

VERSION

version 0.015

SYNOPSIS

Allows you to define and instantiate a solidity variable type:

    my $type = Blockchain::Ethereum::ABI::Type->new(
        signature => $signature,
        data      => $value
    );

    $type->encode();

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

METHODS

pad_right

Pads the given data to right 32 bytes with zeros

  • $data data to be padded

Returns the padded string

pad_left

Pads the given data to left 32 bytes with zeros

  • $data data to be padded

is_dynamic

Checks if the type signature is dynamic

Returns 1 for dynamic and 0 for static

fixed_length

Check if that is a length specified for the given signature

Integer length or undef in case of no length specified

AUTHOR

Reginaldo Costa <refeco@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2022 by REFECO.

This is free software, licensed under:

  The MIT (X11) License