| 1 | package Finance::Dogechain::Transaction; | ||||||||||
| 2 | 1 | $Finance::Dogechain::Transaction::VERSION = '1.20210418.2306'; | |||||||||
| 3 | 1 | ▶ | use Mojo::Base -base, -signatures, 'Finance::Dogechain::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Finance::Dogechain::Address; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | has 'tx_id'; | |||||||||
| 7 | |||||||||||
| 8 | ▶ | sub transaction($self) { | |||||||||
|
Subroutine
transaction: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 9 | 0 | my $tx = $self->return_field_if_success( '/transaction/' . $self->tx_id, 'transaction' ); | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | if ($tx) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 0 | $self->convert_addresses_in_place( $tx->{inputs}, $tx->{outputs} ); | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 0 | return $tx; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | ▶ | sub convert_addresses_in_place($self, @items) { | |||||||||
|
Subroutine
convert_addresses_in_place: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 19 | 0 | ▶ | while (my $items = shift @items) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | for my $item (@$items) { | |||||||||
| 21 | 0 | $item->{address} = Finance::Dogechain::Address->new( address => $item->{address} ); | |||||||||
| 22 | } | ||||||||||
| 23 | } | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | ▶ | sub TO_JSON($self) { | |||||||||
|
Subroutine
TO_JSON: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 27 | 0 | return '[Finance::Dogechain::Transaction](tx_id => ' . $self->tx_id . ')'; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 1 | 'to the moon'; | |||||||||
| 31 | __END__ | ||||||||||