VDB-117: Add Vow.flog transformer (#80)

* Add DB migrations for flog

* Add Vow addresses and constants

* Add err logging to ABI signature getter, test for flog sig

* Add flog transformer

* Add tests+data for flog transformer

* Prepend DB tables and columns with vow_

* Panic on failure to get method sig
This commit is contained in:
Edvard Hübinette
2018-10-25 12:19:46 +02:00
committed by GitHub
parent 78d746bb5b
commit be249437c2
22 changed files with 941 additions and 8 deletions
+67 -1
View File
@@ -1044,6 +1044,40 @@ CREATE SEQUENCE maker.vat_tune_id_seq
ALTER SEQUENCE maker.vat_tune_id_seq OWNED BY maker.vat_tune.id;
--
-- Name: vow_flog; Type: TABLE; Schema: maker; Owner: -
--
CREATE TABLE maker.vow_flog (
id integer NOT NULL,
header_id integer NOT NULL,
era integer NOT NULL,
log_idx integer NOT NULL,
tx_idx integer NOT NULL,
raw_log jsonb
);
--
-- Name: vow_flog_id_seq; Type: SEQUENCE; Schema: maker; Owner: -
--
CREATE SEQUENCE maker.vow_flog_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: vow_flog_id_seq; Type: SEQUENCE OWNED BY; Schema: maker; Owner: -
--
ALTER SEQUENCE maker.vow_flog_id_seq OWNED BY maker.vow_flog.id;
--
-- Name: logs; Type: TABLE; Schema: public; Owner: -
--
@@ -1152,7 +1186,8 @@ CREATE TABLE public.checked_headers (
vat_tune_checked boolean DEFAULT false NOT NULL,
vat_grab_checked boolean DEFAULT false NOT NULL,
vat_flux_checked boolean DEFAULT false NOT NULL,
vat_slip_checked boolean DEFAULT false NOT NULL
vat_slip_checked boolean DEFAULT false NOT NULL,
vow_flog_checked boolean DEFAULT false NOT NULL
);
@@ -1663,6 +1698,13 @@ ALTER TABLE ONLY maker.vat_toll ALTER COLUMN id SET DEFAULT nextval('maker.vat_t
ALTER TABLE ONLY maker.vat_tune ALTER COLUMN id SET DEFAULT nextval('maker.vat_tune_id_seq'::regclass);
--
-- Name: vow_flog id; Type: DEFAULT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.vow_flog ALTER COLUMN id SET DEFAULT nextval('maker.vow_flog_id_seq'::regclass);
--
-- Name: blocks id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -2165,6 +2207,22 @@ ALTER TABLE ONLY maker.vat_tune
ADD CONSTRAINT vat_tune_pkey PRIMARY KEY (id);
--
-- Name: vow_flog vow_flog_header_id_tx_idx_log_idx_key; Type: CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.vow_flog
ADD CONSTRAINT vow_flog_header_id_tx_idx_log_idx_key UNIQUE (header_id, tx_idx, log_idx);
--
-- Name: vow_flog vow_flog_pkey; Type: CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.vow_flog
ADD CONSTRAINT vow_flog_pkey PRIMARY KEY (id);
--
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@@ -2535,6 +2593,14 @@ ALTER TABLE ONLY maker.vat_tune
ADD CONSTRAINT vat_tune_header_id_fkey FOREIGN KEY (header_id) REFERENCES public.headers(id) ON DELETE CASCADE;
--
-- Name: vow_flog vow_flog_header_id_fkey; Type: FK CONSTRAINT; Schema: maker; Owner: -
--
ALTER TABLE ONLY maker.vow_flog
ADD CONSTRAINT vow_flog_header_id_fkey FOREIGN KEY (header_id) REFERENCES public.headers(id) ON DELETE CASCADE;
--
-- Name: transactions blocks_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--