File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff 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 />
2524Additionally 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 />
2928dbname=your_db_name<br />
@@ -32,6 +31,9 @@ password=your_password<br />
3231host=your_host<br />
3332port=your_port<br />
3433
34+ [ rpc] <br />
35+ url=your_rpc_url<br />
36+
3537## Usage
3638Run the hex.py and uniswap_v2.py file periodically. (with cron jobs, jenkins, or etc.)
3739
Original file line number Diff line number Diff line change 11from web3 import Web3
22
3+ from configs .credentials import get_config
4+
35
46def 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
You can’t perform that action at this time.
0 commit comments