line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
5
|
|
|
5
|
|
31
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
135
|
|
4
|
5
|
|
|
5
|
|
23
|
no indirect; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
108
|
|
5
|
5
|
|
|
5
|
|
20
|
|
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
34
|
|
6
|
|
|
|
|
|
|
use Carp; |
7
|
5
|
|
|
5
|
|
306
|
use parent qw(REFECO::Blockchain::Contract::Solidity::ABI::Type); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
703
|
|
8
|
5
|
|
|
5
|
|
370
|
|
|
5
|
|
|
|
|
247
|
|
|
5
|
|
|
|
|
25
|
|
9
|
|
|
|
|
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
return unless $self->data; |
11
|
33
|
|
|
33
|
0
|
68
|
|
12
|
33
|
100
|
|
|
|
98
|
my @splited_signatures = $self->split_tuple_signature->@*; |
13
|
|
|
|
|
|
|
|
14
|
8
|
|
|
|
|
24
|
for (my $sig_index = 0; $sig_index < @splited_signatures; $sig_index++) { |
15
|
|
|
|
|
|
|
push $self->instances->@*, |
16
|
8
|
|
|
|
|
36
|
REFECO::Blockchain::Contract::Solidity::ABI::Type::new_type( |
17
|
29
|
|
|
|
|
86
|
signature => $splited_signatures[$sig_index], |
18
|
|
|
|
|
|
|
data => $self->data->[$sig_index]); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
my $tuple_signatures = substr($self->signature, 1, length($self->signature) - 2); |
25
|
|
|
|
|
|
|
$tuple_signatures =~ s/((\((?>[^)(]*(?2)?)*\))|[^,()]*)(*SKIP),/$1\n/g; |
26
|
18
|
|
|
18
|
0
|
32
|
my @types = split('\n', $tuple_signatures); |
27
|
18
|
|
|
|
|
58
|
return \@types; |
28
|
18
|
|
|
|
|
208
|
} |
29
|
18
|
|
|
|
|
63
|
|
30
|
18
|
|
|
|
|
74
|
my $self = shift; |
31
|
|
|
|
|
|
|
return $self->encoded if $self->encoded; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $offset = $self->get_initial_offset; |
34
|
35
|
|
|
35
|
0
|
58
|
|
35
|
35
|
100
|
|
|
|
87
|
for my $instance ($self->instances->@*) { |
36
|
|
|
|
|
|
|
$instance->encode; |
37
|
22
|
|
|
|
|
69
|
if ($instance->is_dynamic) { |
38
|
|
|
|
|
|
|
$self->push_static($self->encode_offset($offset)); |
39
|
16
|
|
|
|
|
43
|
$self->push_dynamic($instance->encoded); |
40
|
50
|
|
|
|
|
139
|
$offset += scalar $instance->encoded->@*; |
41
|
50
|
100
|
|
|
|
121
|
next; |
42
|
14
|
|
|
|
|
47
|
} |
43
|
14
|
|
|
|
|
33
|
|
44
|
14
|
|
|
|
|
47
|
$self->push_static($instance->encoded); |
45
|
14
|
|
|
|
|
38
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
return $self->encoded; |
48
|
36
|
|
|
|
|
80
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $self = shift; |
51
|
16
|
|
|
|
|
38
|
|
52
|
|
|
|
|
|
|
unless (scalar $self->instances->@* > 0) { |
53
|
|
|
|
|
|
|
push $self->instances->@*, REFECO::Blockchain::Contract::Solidity::ABI::Type::new_type(signature => $_) |
54
|
|
|
|
|
|
|
for $self->split_tuple_signature->@*; |
55
|
11
|
|
|
11
|
0
|
16
|
} |
56
|
|
|
|
|
|
|
|
57
|
11
|
100
|
|
|
|
27
|
return $self->read_stack_set_data; |
58
|
|
|
|
|
|
|
} |
59
|
4
|
|
|
|
|
11
|
|
60
|
|
|
|
|
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
return 1 if $self->is_dynamic; |
62
|
11
|
|
|
|
|
33
|
my $size = 1; |
63
|
|
|
|
|
|
|
my $instance_size = 0; |
64
|
|
|
|
|
|
|
for my $signature ($self->split_tuple_signature->@*) { |
65
|
|
|
|
|
|
|
my $instance = REFECO::Blockchain::Contract::Solidity::ABI::Type::new_type(signature => $signature); |
66
|
6
|
|
|
6
|
0
|
12
|
$instance_size += $instance->static_size // 0; |
67
|
6
|
50
|
|
|
|
12
|
} |
68
|
6
|
|
|
|
|
304
|
|
69
|
6
|
|
|
|
|
10
|
return $size * $instance_size; |
70
|
6
|
|
|
|
|
14
|
} |
71
|
12
|
|
|
|
|
26
|
|
72
|
12
|
|
50
|
|
|
33
|
1; |
73
|
|
|
|
|
|
|
|