Skip to content

Commit

Permalink
Merge pull request hyperledger-web3j#338 from oscarguindzberg/toString
Browse files Browse the repository at this point in the history
Add TransactionReceipt.toString() and Log.toString()
  • Loading branch information
conor10 authored Feb 9, 2018
2 parents 231b15a + fa97c99 commit fdf8348
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,20 @@ public int hashCode() {
result = 31 * result + (getTopics() != null ? getTopics().hashCode() : 0);
return result;
}

@Override
public String toString() {
return "Log{"
+ "removed=" + removed
+ ", logIndex='" + logIndex + '\''
+ ", transactionIndex='" + transactionIndex + '\''
+ ", transactionHash='" + transactionHash + '\''
+ ", blockHash='" + blockHash + '\''
+ ", blockNumber='" + blockNumber + '\''
+ ", address='" + address + '\''
+ ", data='" + data + '\''
+ ", type='" + type + '\''
+ ", topics=" + topics
+ '}';
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

package org.web3j.protocol.core.methods.response;

import java.math.BigInteger;
Expand Down Expand Up @@ -248,4 +249,23 @@ public int hashCode() {
result = 31 * result + (getLogsBloom() != null ? getLogsBloom().hashCode() : 0);
return result;
}

@Override
public String toString() {
return "TransactionReceipt{"
+ "transactionHash='" + transactionHash + '\''
+ ", transactionIndex='" + transactionIndex + '\''
+ ", blockHash='" + blockHash + '\''
+ ", blockNumber='" + blockNumber + '\''
+ ", cumulativeGasUsed='" + cumulativeGasUsed + '\''
+ ", gasUsed='" + gasUsed + '\''
+ ", contractAddress='" + contractAddress + '\''
+ ", root='" + root + '\''
+ ", status='" + status + '\''
+ ", from='" + from + '\''
+ ", to='" + to + '\''
+ ", logs=" + logs
+ ", logsBloom='" + logsBloom + '\''
+ '}';
}
}

0 comments on commit fdf8348

Please sign in to comment.