-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from wavesplatform/eth_support
Add ethereum transaction support
- Loading branch information
Showing
22 changed files
with
1,321 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/com/wavesplatform/wavesj/info/EthereumTransactionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.wavesplatform.wavesj.info; | ||
|
||
import com.wavesplatform.transactions.EthereumTransaction; | ||
import com.wavesplatform.wavesj.ApplicationStatus; | ||
import com.wavesplatform.wavesj.StateChanges; | ||
|
||
public class EthereumTransactionInfo extends TransactionInfo { | ||
|
||
private final StateChanges stateChanges; | ||
private final String bytes; | ||
|
||
public EthereumTransactionInfo(EthereumTransaction tx, ApplicationStatus applicationStatus, int height, | ||
StateChanges stateChanges, String bytes) { | ||
super(tx, applicationStatus, height); | ||
this.stateChanges = stateChanges; | ||
this.bytes = bytes; | ||
} | ||
|
||
public EthereumTransaction tx() { | ||
return (EthereumTransaction) super.tx(); | ||
} | ||
|
||
public Boolean isTransferTransaction() { | ||
return tx().payload() instanceof EthereumTransaction.Transfer; | ||
} | ||
|
||
public Boolean isInvokeTransaction() { | ||
return tx().payload() instanceof EthereumTransaction.Invocation; | ||
} | ||
|
||
public StateChanges getStateChanges() { | ||
return stateChanges; | ||
} | ||
|
||
public String getBytes() { | ||
return bytes; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "EthereumTransaction{} " + super.toString(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.