forked from cerc-io/ipld-eth-server
Combine price feed transformers
- fetches logs from all three price feeds in one query - assumes eth/usd price feed will be updated to include LogValue event - updates transformers to run separate from header sync
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
DROP TABLE maker.peps;
|
||||
DROP SCHEMA maker;
|
||||
@@ -1,9 +0,0 @@
|
||||
CREATE TABLE maker.peps (
|
||||
id SERIAL PRIMARY KEY,
|
||||
block_number BIGINT NOT NULL,
|
||||
header_id INTEGER NOT NULL,
|
||||
usd_value NUMERIC,
|
||||
CONSTRAINT headers_fk FOREIGN KEY (header_id)
|
||||
REFERENCES headers (id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
@@ -1 +0,0 @@
|
||||
DROP TABLE maker.pips;
|
||||
@@ -1,9 +0,0 @@
|
||||
CREATE TABLE maker.pips (
|
||||
id SERIAL PRIMARY KEY,
|
||||
block_number BIGINT NOT NULL,
|
||||
header_id INTEGER NOT NULL,
|
||||
usd_value NUMERIC,
|
||||
CONSTRAINT headers_fk FOREIGN KEY (header_id)
|
||||
REFERENCES headers (id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
@@ -1 +0,0 @@
|
||||
DROP TABLE maker.reps;
|
||||
@@ -1,9 +0,0 @@
|
||||
CREATE TABLE maker.reps (
|
||||
id SERIAL PRIMARY KEY,
|
||||
block_number BIGINT NOT NULL,
|
||||
header_id INTEGER NOT NULL,
|
||||
usd_value NUMERIC,
|
||||
CONSTRAINT headers_fk FOREIGN KEY (header_id)
|
||||
REFERENCES headers (id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE maker.price_feeds;
|
||||
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE maker.price_feeds (
|
||||
id SERIAL PRIMARY KEY,
|
||||
block_number BIGINT NOT NULL,
|
||||
header_id INTEGER NOT NULL,
|
||||
medianizer_address bytea,
|
||||
tx_idx INTEGER NOT NULL,
|
||||
usd_value NUMERIC,
|
||||
UNIQUE (header_id, medianizer_address, tx_idx),
|
||||
CONSTRAINT headers_fk FOREIGN KEY (header_id)
|
||||
REFERENCES headers (id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user