Skip to content

Commit d58e729

Browse files
committed
Resolve conflicts
2 parents 8176601 + 898ce3f commit d58e729

27 files changed

+77
-37
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ For the latest version, check out the repo and call
9191

9292
## Running in Docker
9393

94-
1. Install Docker: https://docs.docker.com/install/
94+
1. Install Docker: https://docs.docker.com/get-docker/
9595

9696
2. Build a docker image
9797

docs/dockerhub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Uploading to Docker Hub
22

33
```bash
4-
ETHEREUMETL_VERSION=1.10.1
4+
ETHEREUMETL_VERSION=1.11.0
55
docker build -t ethereum-etl:${ETHEREUMETL_VERSION} -f Dockerfile .
66
docker tag ethereum-etl:${ETHEREUMETL_VERSION} blockchainetl/ethereum-etl:${ETHEREUMETL_VERSION}
77
docker push blockchainetl/ethereum-etl:${ETHEREUMETL_VERSION}

docs/exporting-the-blockchain.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
If you'd like to have blockchain data set up and hosted for you, [get in touch with us at D5](https://d5.ai/?ref=ethereumetl).
44

5-
1. Install python 3.5.3+ https://www.python.org/downloads/
5+
1. Install python 3.5.3+: [https://www.python.org/downloads/](https://www.python.org/downloads/)
66

77
1. You can use Infura if you don't need ERC20 transfers (Infura doesn't support eth_getFilterLogs JSON RPC method).
88
For that use `-p https://mainnet.infura.io` option for the commands below. If you need ERC20 transfers or want to
99
export the data ~40 times faster, you will need to set up a local Ethereum node:
1010

11-
1. Install geth https://github.com/ethereum/go-ethereum/wiki/Installing-Geth
11+
1. Install geth: [https://github.com/ethereum/go-ethereum/wiki/Installing-Geth](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth)
1212

1313
1. Start geth.
1414
Make sure it downloaded the blocks that you need by executing `eth.syncing` in the JS console.
1515
You can export blocks below `currentBlock`,
1616
there is no need to wait until the full sync as the state is not needed (unless you also need contracts bytecode
1717
and token details; for those you need to wait until the full sync). Note that you may need to wait for another day or
18-
two for the node to download the states. See this issue https://github.com/blockchain-etl/ethereum-etl/issues/265#issuecomment-970451522.
18+
two for the node to download the states. See this issue [https://github.com/blockchain-etl/ethereum-etl/issues/265#issuecomment-970451522](https://github.com/blockchain-etl/ethereum-etl/issues/265#issuecomment-970451522).
1919
Make sure to set `--txlookuplimit 0` if you use geth.
2020

2121
1. Install Ethereum ETL: `> pip3 install ethereum-etl`
@@ -42,7 +42,7 @@ output/token_transfers/start_block=00000000/end_block=00099999/token_transfers_0
4242

4343
Should work with geth and parity, on Linux, Mac, Windows.
4444
If you use Parity you should disable warp mode with `--no-warp` option because warp mode
45-
does not place all of the block or receipt data into the database https://wiki.parity.io/Getting-Synced
45+
does not place all of the block or receipt data into the database [https://wiki.parity.io/Getting-Synced](https://wiki.parity.io/Getting-Synced)
4646

4747
If you see weird behavior, e.g. wrong number of rows in the CSV files or corrupted files,
4848
check out this issue: https://github.com/medvedev1088/ethereum-etl/issues/28

docs/google-bigquery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Read [this article](https://medium.com/google-cloud/building-token-recommender-i
1616

1717
### Awesome BigQuery Views
1818

19-
https://github.com/blockchain-etl/awesome-bigquery-views
19+
[https://github.com/blockchain-etl/awesome-bigquery-views](https://github.com/blockchain-etl/awesome-bigquery-views)

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Ethereum ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.
44

5-
With 700+ likes on Github, Ethereum ETL is the most popular open source project for Ethereum data.
5+
With 1,700+ likes on GitHub, Ethereum ETL is the most popular open source project for Ethereum data.
66

77
Data is available for you to query right away in [Google BigQuery](https://goo.gl/oY5BCQ).
88

ethereumetl/cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949

5050
@click.group()
51-
@click.version_option(version='1.10.1')
51+
@click.version_option(version='1.11.0')
5252
@click.pass_context
5353
def cli(ctx):
5454
pass

ethereumetl/cli/stream.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def stream(last_synced_block_file, lag, provider_uri, output, start_block, entit
5858
configure_logging(log_file)
5959
configure_signals()
6060
entity_types = parse_entity_types(entity_types)
61-
validate_entity_types(entity_types, output)
6261

6362
from ethereumetl.streaming.eth_streamer_adapter import EthStreamerAdapter
6463
from blockchainetl.streaming.streamer import Streamer
@@ -99,12 +98,6 @@ def parse_entity_types(entity_types):
9998
return entity_types
10099

101100

102-
def validate_entity_types(entity_types, output):
103-
if output is not None and 'postgres' in output \
104-
and (EntityType.CONTRACT in entity_types or EntityType.TOKEN in entity_types):
105-
raise ValueError('contract and token are not yet supported entity types for postgres item exporter.')
106-
107-
108101
def pick_random_provider_uri(provider_uri):
109102
provider_uris = [uri.strip() for uri in provider_uri.split(',')]
110103
return random.choice(provider_uris)

ethereumetl/streaming/item_exporter_creator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def create_item_exporter(output):
5757
from blockchainetl.jobs.exporters.converters.unix_timestamp_item_converter import UnixTimestampItemConverter
5858
from blockchainetl.jobs.exporters.converters.int_to_decimal_item_converter import IntToDecimalItemConverter
5959
from blockchainetl.jobs.exporters.converters.list_field_item_converter import ListFieldItemConverter
60-
from ethereumetl.streaming.postgres_tables import BLOCKS, TRANSACTIONS, LOGS, TOKEN_TRANSFERS, TRACES
60+
from ethereumetl.streaming.postgres_tables import BLOCKS, TRANSACTIONS, LOGS, TOKEN_TRANSFERS, TRACES, TOKENS, CONTRACTS
6161

6262
item_exporter = PostgresItemExporter(
6363
output, item_type_to_insert_stmt_mapping={
@@ -66,6 +66,8 @@ def create_item_exporter(output):
6666
'log': create_insert_statement_for_table(LOGS),
6767
'token_transfer': create_insert_statement_for_table(TOKEN_TRANSFERS),
6868
'trace': create_insert_statement_for_table(TRACES),
69+
'token': create_insert_statement_for_table(TOKENS),
70+
'contract': create_insert_statement_for_table(CONTRACTS),
6971
},
7072
converters=[UnixTimestampItemConverter(), IntToDecimalItemConverter(),
7173
ListFieldItemConverter('topics', 'topic', fill=4)])

ethereumetl/streaming/postgres_tables.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from sqlalchemy import Table, Column, Integer, BigInteger, String, Numeric, MetaData, TIMESTAMP
23+
from sqlalchemy import Table, Column, Integer, BigInteger, Boolean, String, Numeric, \
24+
MetaData, PrimaryKeyConstraint, VARCHAR, TIMESTAMP
25+
from sqlalchemy.dialects.postgresql import ARRAY
2426

2527
metadata = MetaData()
2628

@@ -127,4 +129,25 @@
127129
Column('trace_id', String, primary_key=True),
128130
)
129131

132+
TOKENS = Table(
133+
'tokens', metadata,
134+
Column('address', VARCHAR(42)),
135+
Column('name', String),
136+
Column('symbol', String),
137+
Column('decimals', Integer),
138+
Column('function_sighashes', ARRAY(String)),
139+
Column('total_supply', Numeric(78)),
140+
Column('block_number', BigInteger),
141+
PrimaryKeyConstraint('address', 'block_number', name='tokens_pk'),
142+
)
130143

144+
CONTRACTS = Table(
145+
'contracts', metadata,
146+
Column('address', VARCHAR(42)),
147+
Column('bytecode', String),
148+
Column('function_sighashes', ARRAY(String)),
149+
Column('is_erc20', Boolean),
150+
Column('is_erc721', Boolean),
151+
Column('block_number', BigInteger),
152+
PrimaryKeyConstraint('address', 'block_number', name='contracts_pk'),
153+
)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ nav:
1616
- Citing: citing.md
1717
theme: readthedocs
1818
repo_url: https://github.com/blockchain-etl/ethereum-etl/
19+
edit_uri: edit/develop/docs

0 commit comments

Comments
 (0)