File Coverage

lib/Finance/Dogechain/Address.pm
Criterion Covered Total %
statement 3 24 12.5
branch n/a
condition n/a
subroutine 1 6 16.6
pod 5 5 100.0
total 9 35 25.7


line stmt bran cond sub pod time code
1             package Finance::Dogechain::Address;
2             $Finance::Dogechain::Address::VERSION = '1.20210418.2306';
3 1     1   519 use Mojo::Base -base, -signatures, 'Finance::Dogechain::Base';
  1         203422  
  1         9  
4              
5             has 'address';
6              
7 0     0 1   sub balance($self) {
  0            
  0            
8 0           return $self->return_field_if_success( '/address/balance/' . $self->address, 'balance' );
9             }
10              
11 0     0 1   sub received($self) {
  0            
  0            
12 0           return $self->return_field_if_success( '/address/received/' . $self->address, 'received' );
13             }
14              
15 0     0 1   sub sent($self) {
  0            
  0            
16 0           return $self->return_field_if_success( '/address/sent' . $self->address, 'sent' );
17             }
18              
19 0     0 1   sub unspent($self) {
  0            
  0            
20             return [
21             map {
22 0           $_->{value} / 100000000;
  0            
23             }
24             $self->return_field_if_success( '/unspent/' . $self->address, 'unspent_outputs' )->@*
25             ];
26             }
27              
28 0     0 1   sub TO_JSON($self) {
  0            
  0            
29 0           return '[Finance::Dogechain::Address](address => ' . $self->address . ')';
30             }
31              
32             'to the moon';
33             __END__