Skip to content

Commit 3d0cfef

Browse files
authored
Create README.md
1 parent 987fec6 commit 3d0cfef

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# hello_etherscan
2+
3+
hello_etherscan is just a wrapper for the [Etherscan Api](https://etherscan.io/apis). There are many different network calls and it may be best to just abstract out this huge bulk of code into a module or library.
4+
5+
## Getting Started
6+
7+
This library is still in beta and not ready for it's first release, there are still a few more [issues](https://github.com/EbenezerGH/hello_etherscan/issues) to complete.
8+
9+
To use this project as a module:
10+
11+
Clone project or download
12+
```
13+
https://github.com/EbenezerGH/hello_etherscan.git
14+
```
15+
16+
In your app directory's gradle, import the module
17+
```
18+
implementation project(':etherscanapi')
19+
```
20+
In your root directory's settings.gradle be sure to add the module into your include right after your previous module seperated by a comma [Example Implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/settings.gradle)
21+
```
22+
':etherscanapi'
23+
```
24+
25+
Call `ApiKey.takeOff.setApiKey("[your api key here]")` if recording api usage in the etherscan.io console [see [Example implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/app/src/main/java/jfyg/etherscan/helloetherescan/HelloEtherscanApplication.kt)]
26+
```
27+
ApiKey.takeOff.setApiKey("1I7CRNU2QIU253UBPFVB5UV2C2PBDURAIYZ")
28+
```
29+
30+
Lastly call the given function that's needed by creating an instance of one of the Etherscan Apis [accounts, contracts, transactions, blocks, eventLogs, geth, websockets, tokens, [stat](https://etherscan.io/apis#stats)]
31+
32+
```
33+
Log.d(TAG, "The Status is ${stat.getNetworkStatus()}")
34+
Log.d(TAG, "The Message is ${stat.getNetworkMessage()}")
35+
Log.d(TAG, "The current price of Ether in Btc: ${stat.getLastPriceInBtc()}")
36+
```
37+
```
38+
D/jfyg.etherscan.helloetherescan.MainActivity: The Status is 1
39+
D/jfyg.etherscan.helloetherescan.MainActivity: The Message is OK
40+
D/jfyg.etherscan.helloetherescan.MainActivity: The current price of Ether in Btc: 0.07416
41+
```
42+
43+
## Authors
44+
45+
* [**Ebenezer Ackon**](http://www.ebenezerackon.com/)
46+
Only me so far but eagerly accepting help :)
47+
## License
48+
49+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

0 commit comments

Comments
 (0)