5
5
[ ![ Coverage] ( https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=coverage )] ( https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api )
6
6
[ ![ Maintainability Rating] ( https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=sqale_rating )] ( https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api )
7
7
[ ![ Lines of Code] ( https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=ncloc )] ( https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api )
8
- [ ![ ] ( https://jitpack.io/v/GoodforGod/java-etherscan-api.svg )] ( https://jitpack.io/#GoodforGod/java-etherscan-api )
9
8
10
9
[ Etherscan.io] ( https://etherscan.io/apis ) Java API implementation.
11
10
@@ -15,15 +14,15 @@ Library supports all available EtherScan *API* calls for all available *Ethereum
15
14
16
15
** Gradle**
17
16
``` groovy
18
- implementation "com.github.goodforgod:java-etherscan-api:2.0.0-SNAPSHOT "
17
+ implementation "com.github.goodforgod:java-etherscan-api:2.0.0"
19
18
```
20
19
21
20
** Maven**
22
21
``` xml
23
22
<dependency >
24
23
<groupId >com.github.goodforgod</groupId >
25
24
<artifactId >java-etherscan-api</artifactId >
26
- <version >2.0.0-SNAPSHOT </version >
25
+ <version >2.0.0</version >
27
26
</dependency >
28
27
```
29
28
@@ -41,9 +40,9 @@ implementation "com.github.goodforgod:java-etherscan-api:2.0.0-SNAPSHOT"
41
40
- [ Token] ( #token-api )
42
41
- [ Version History] ( #version-history )
43
42
44
- ## Mainnet and Testnets
43
+ ## MainNet and TestNets
45
44
46
- API support Ethereum [ default networks] ( https://docs.etherscan.io/getting-started/endpoint-urls ) :
45
+ API support all Ethereum [ default networks] ( https://docs.etherscan.io/getting-started/endpoint-urls ) :
47
46
- [ Mainnet] ( https://api.etherscan.io/ )
48
47
- [ Goerli] ( https://api-goerli.etherscan.io/ )
49
48
- [ Sepolia] ( https://api-sepolia.etherscan.io/ )
@@ -121,8 +120,8 @@ Abi abi = api.contract().contractAbi("0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
121
120
** Get event logs for single topic**
122
121
``` java
123
122
EtherScanAPI api = EtherScanAPI . build();
124
- LogQuery query = LogQueryBuilder . with (" 0x33990122638b9132ca29c723bdf037f1a891a70c" )
125
- .topic (" 0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545" )
123
+ LogQuery query = LogQuery . builder (" 0x33990122638b9132ca29c723bdf037f1a891a70c" )
124
+ .withTopic (" 0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545" )
126
125
.build();
127
126
List<Log > logs = api. logs(). logs(query);
128
127
```
@@ -163,7 +162,7 @@ Optional<BlockProxy> block = api.proxy().block(15215);
163
162
** Statistic about last price**
164
163
``` java
165
164
EtherScanAPI api = EtherScanAPI . build();
166
- Price price = api. stats(). lastPrice ();
165
+ Price price = api. stats(). priceLast ();
167
166
```
168
167
169
168
### Transaction API
0 commit comments