Skip to content

Commit

Permalink
better failed ethereum
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed Jul 14, 2022
1 parent 037e251 commit 4c427a4
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions include/BlockchainParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,19 +431,28 @@ private function processFailedTransaction( $txkey, $tx )
] );
break;
case TX_ETHEREUM:
$this->appendTS( [
UID => $this->getNewUid(),
TXKEY => $txkey,
TYPE => TX_ETHEREUM,
A => $this->getSenderId( $tx['sender'] ),
B => MYSELF,
ASSET => NO_ASSET,
AMOUNT => 0,
FEEASSET => $tx[FEEASSET],
FEE => $tx[FEE],
ADDON => 0,
GROUP => FAILED_GROUP,
] );
$payload = $tx['payload'];
switch( $payload['type'] )
{
case 'invocation':
$this->appendTS( [
UID => $this->getNewUid(),
TXKEY => $txkey,
TYPE => TX_ETHEREUM,
A => $this->getSenderId( $tx['sender'] ),
B => $this->getRecipientId( $payload['dApp'] ),
ASSET => NO_ASSET,
AMOUNT => 0,
FEEASSET => $tx[FEEASSET],
FEE => $tx[FEE],
ADDON => 0,
GROUP => FAILED_GROUP,
] );
break;

default:
w8io_error( 'unknown failed payload type: ' . $payload['type'] );
}
break;
case TX_EXCHANGE:
// https://docs.waves.tech/en/blockchain/transaction/transaction-validation
Expand Down

0 comments on commit 4c427a4

Please sign in to comment.