Skip to content

Commit dcbf013

Browse files
Merge pull request #30 from benispresence/benjamin
Benjamin
2 parents 66270c4 + 5910220 commit dcbf013

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ Data Source is a full node of the ethereum blockchain.
1111
![](images/hexbase_erd.jpeg "Hexbase ERD")
1212

1313
## Requirements
14-
- run ethereum consensus & execution client locally
1514
- PostgreSQL database
16-
- 80Gb disk space
15+
- 5Gb disk space
1716
- 8GB RAM
1817
- Core i7-10700 or stronger
1918

2019
## Recommendations
2120
- visualisation open-source software for business intelligence: Metabase (recommendation). You can visualize queries from your Hexbase-Database.
21+
- run ethereum consensus & execution client locally
2222

2323
## Configuration
24-
Set up a local ethereum node and host a rpc connection on "http://localhost:8545".<br />
2524
Additionally configure a file named "global_config.ini" and adjust the PATH_CONFIG in configs/credentials.py .<br />
26-
The global_config.ini should look like this:
25+
You have to configure the postgres credentials and the rpc_url in this file. The global_config.ini should look like this:
2726

2827
[postgre_db]<br />
2928
dbname=your_db_name<br />
@@ -32,6 +31,9 @@ password=your_password<br />
3231
host=your_host<br />
3332
port=your_port<br />
3433

34+
[rpc]<br />
35+
url=your_rpc_url<br />
36+
3537
## Usage
3638
Run the hex.py and uniswap_v2.py file periodically. (with cron jobs, jenkins, or etc.)
3739

configs/web3.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from web3 import Web3
22

3+
from configs.credentials import get_config
4+
35

46
def get_local_node_conn():
57
"""
68
:return: A connection to web3 via a local ethereum node.
79
"""
8-
local_node_url = "http://localhost:8545"
9-
web3_conn = Web3(Web3.HTTPProvider(local_node_url))
10+
config = get_config()
11+
url = config['rpc']['url']
12+
web3_conn = Web3(Web3.HTTPProvider(url))
1013
return web3_conn

0 commit comments

Comments
 (0)