Add receipts (#119)

* Conversion between Geth Receipt and core.Receipt

* Add receipt to DB

* Insert receipts with transactions

* Update Travis CI to use dep for dependencies
This commit is contained in:
Matt K
2018-01-03 11:23:43 -06:00
committed by GitHub
parent 13748a92e5
commit 4fabe3e917
17 changed files with 484 additions and 38 deletions
@@ -0,0 +1,2 @@
DROP TABLE receipts;
@@ -0,0 +1,16 @@
CREATE TABLE receipts
(
id SERIAL PRIMARY KEY,
transaction_id INTEGER NOT NULL,
contract_address VARCHAR(42),
cumulative_gas_used NUMERIC,
gas_used NUMERIC,
state_root VARCHAR(66),
status INTEGER,
tx_hash VARCHAR(66),
CONSTRAINT transaction_fk FOREIGN KEY (transaction_id)
REFERENCES transactions (id)
ON DELETE CASCADE
);
@@ -0,0 +1 @@
DROP INDEX transaction_id_index;
@@ -0,0 +1 @@
CREATE INDEX transaction_id_index ON receipts (transaction_id);