Skip to content

Commit

Permalink
added getStateChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed May 10, 2019
1 parent bbf96c8 commit 086f525
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/WavesKit.php
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,24 @@ public function getTransactionById( $id, $unconfirmed = false )
return $json;
}

/**
* Gets state changes of an invoke transaction by its id
*
* @param string $id Id of the invoke transaction
*
* @return array|false Invoke transaction with state changes as an array or FALSE on failure
*/
public function getStateChanges( $id )
{
if( false === ( $json = $this->fetch( "/debug/stateChanges/info/$id", false, null, [ 404 ] ) ) )
return false;

if( null === ( $json = $this->json_decode( $json ) ) || !isset( $json['stateChanges'] ) )
return false;

return $json;
}

/**
* Gets transactions for an address
*
Expand Down

0 comments on commit 086f525

Please sign in to comment.