Skip to content

Commit

Permalink
1.0.2 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodforGod committed Apr 13, 2019
1 parent 03f2538 commit 44a5fe4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Library supports all available EtherScan *API* calls for all available *Ethereum
<dependency>
<groupId>com.github.goodforgod</groupId>
<artifactId>java-etherscan-api</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</dependency>
```

**Gradle**
```groovy
dependencies {
compile 'com.github.goodforgod:java-etherscan-api:1.0.1'
compile 'com.github.goodforgod:java-etherscan-api:1.0.2'
}
```

Expand Down Expand Up @@ -165,6 +165,8 @@ Token API methods migrated to [Account](#account-api) & [Stats](#stats-api) resp

## Version History

**1.0.2** - Minor http client improvements.

**1.0.1** - Gorli & TOBALABA networks support.

**1.0.0** - Initial project with all API functionality, for all available networks, with tests coverage for all cases.
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/io/api/etherscan/model/BaseTx.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ public BigInteger getGasUsed() {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof BaseTx)) return false;

BaseTx baseTx = (BaseTx) o;

if (blockNumber != baseTx.blockNumber) return false;
if (timeStamp != null ? !timeStamp.equals(baseTx.timeStamp) : baseTx.timeStamp != null) return false;
if (hash != null ? !hash.equals(baseTx.hash) : baseTx.hash != null) return false;
if (from != null ? !from.equals(baseTx.from) : baseTx.from != null) return false;
if (to != null ? !to.equals(baseTx.to) : baseTx.to != null) return false;
return value != null ? value.equals(baseTx.value) : baseTx.value == null;
}

Expand All @@ -88,6 +90,8 @@ public int hashCode() {
int result = (int) (blockNumber ^ (blockNumber >>> 32));
result = 31 * result + (timeStamp != null ? timeStamp.hashCode() : 0);
result = 31 * result + (hash != null ? hash.hashCode() : 0);
result = 31 * result + (from != null ? from.hashCode() : 0);
result = 31 * result + (to != null ? to.hashCode() : 0);
result = 31 * result + (value != null ? value.hashCode() : 0);
return result;
}
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/io/api/etherscan/model/TxInternal.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,19 @@ public String getErrCode() {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!(o instanceof TxInternal)) return false;
if (!super.equals(o)) return false;

TxInternal that = (TxInternal) o;

if (traceId != that.traceId) return false;
if (isError != that.isError) return false;
if (type != null ? !type.equals(that.type) : that.type != null) return false;
return errCode != null ? errCode.equals(that.errCode) : that.errCode == null;
}

@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (type != null ? type.hashCode() : 0);
result = 31 * result + (int) (traceId ^ (traceId >>> 32));
result = 31 * result + isError;
result = 31 * result + (errCode != null ? errCode.hashCode() : 0);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ public class AccountTxTokenTest extends Assert {

@Test
public void correct() {
List<TxToken> txs = api.account().txsToken("0x05fBf1E3f105df6a4553f3C7f2ed93070A4BAB46");
List<TxToken> txs = api.account().txsToken("0xE376F69ED2218076682e2b3B7b9099eC50aD68c4");
assertNotNull(txs);
assertEquals(106, txs.size());
assertEquals(3, txs.size());
assertTxs(txs);
assertNotEquals(0, txs.get(0).getGasPrice());
assertNotEquals(-1, txs.get(0).getNonce());
assertNotNull(txs.get(0).toString());

assertNotNull(txs.get(0).toString());
assertNotEquals(txs.get(0).toString(), txs.get(1).toString());

assertNotEquals(txs.get(0), txs.get(1));
Expand Down

0 comments on commit 44a5fe4

Please sign in to comment.