line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
5
|
|
|
5
|
|
2310
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
129
|
|
4
|
5
|
|
|
5
|
|
23
|
no indirect; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
106
|
|
5
|
5
|
|
|
5
|
|
19
|
|
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
25
|
|
6
|
|
|
|
|
|
|
use Carp; |
7
|
5
|
|
|
5
|
|
186
|
use Math::BigInt; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
304
|
|
8
|
5
|
|
|
5
|
|
5637
|
use parent qw(REFECO::Blockchain::Contract::Solidity::ABI::Type); |
|
5
|
|
|
|
|
154442
|
|
|
5
|
|
|
|
|
30
|
|
9
|
5
|
|
|
5
|
|
114710
|
|
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
38
|
|
10
|
|
|
|
|
|
|
use constant DEFAULT_INT_SIZE => 256; |
11
|
5
|
|
|
5
|
|
349
|
|
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
2500
|
|
12
|
|
|
|
|
|
|
my $self = shift; |
13
|
|
|
|
|
|
|
return $self->encoded if $self->encoded; |
14
|
87
|
|
|
87
|
0
|
136
|
|
15
|
87
|
100
|
|
|
|
179
|
my $bdata = Math::BigInt->new($self->data); |
16
|
|
|
|
|
|
|
|
17
|
39
|
|
|
|
|
95
|
croak "Invalid numeric data @{[$self->data]}" if $bdata->is_nan; |
18
|
|
|
|
|
|
|
|
19
|
39
|
100
|
|
|
|
3300
|
croak "Invalid data length, signature: @{[$self->fixed_length]}, data length: @{[$bdata->length]}" |
|
1
|
|
|
|
|
10
|
|
20
|
|
|
|
|
|
|
if $self->fixed_length && $bdata->length > $self->fixed_length; |
21
|
38
|
100
|
66
|
|
|
350
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
22
|
|
|
|
|
|
|
croak "Invalid negative numeric data @{[$self->data]}" |
23
|
|
|
|
|
|
|
if $bdata->is_neg && $self->signature =~ /^uint|bool/; |
24
|
37
|
100
|
66
|
|
|
102
|
|
|
2
|
|
|
|
|
4
|
|
25
|
|
|
|
|
|
|
croak "Invalid bool data it must be 1 or 0 but given @{[$self->data]}" |
26
|
|
|
|
|
|
|
if !$bdata->is_zero && !$bdata->is_one && $self->signature =~ /^bool/; |
27
|
35
|
100
|
100
|
|
|
250
|
|
|
1
|
|
100
|
|
|
3
|
|
28
|
|
|
|
|
|
|
$self->push_static($self->pad_left($bdata->to_hex)); |
29
|
|
|
|
|
|
|
|
30
|
34
|
|
|
|
|
336
|
return $self->encoded; |
31
|
|
|
|
|
|
|
} |
32
|
34
|
|
|
|
|
88
|
|
33
|
|
|
|
|
|
|
my $self = shift; |
34
|
|
|
|
|
|
|
return Math::BigInt->from_hex($self->data->[0]); |
35
|
|
|
|
|
|
|
} |
36
|
14
|
|
|
14
|
0
|
22
|
|
37
|
14
|
|
|
|
|
31
|
my $self = shift; |
38
|
|
|
|
|
|
|
if ($self->signature =~ /[a-z](\d+)/) { |
39
|
|
|
|
|
|
|
return $1; |
40
|
|
|
|
|
|
|
} |
41
|
77
|
|
|
77
|
1
|
725
|
return DEFAULT_INT_SIZE; |
42
|
77
|
100
|
|
|
|
170
|
} |
43
|
59
|
|
|
|
|
256
|
|
44
|
|
|
|
|
|
|
1; |
45
|
18
|
|
|
|
|
66
|
|