Add ERC20 token watcher example

- starting with the totalSupply function
- sets contract config on transformer by passing it into the transformer
initializer
- handles block records with the same number for different nodes for both creating token_supply records, and finding missing blocks
This commit is contained in:
Elizabeth Engelman
2018-06-27 14:41:51 -05:00
parent 7533e6d476
commit 7ee253b2a3
21 changed files with 1357 additions and 1 deletions
@@ -0,0 +1 @@
DROP TABLE token_supply;
@@ -0,0 +1,9 @@
CREATE TABLE token_supply (
id SERIAL,
block_id INTEGER NOT NULL,
supply DECIMAL NOT NULL,
token_address CHARACTER VARYING(66) NOT NULL,
CONSTRAINT blocks_fk FOREIGN KEY (block_id)
REFERENCES blocks (id)
ON DELETE CASCADE
)