ipld-eth-server/pkg/watcher/example/sql/transfer_table.sql

10 lines
361 B
MySQL
Raw Normal View History

2020-02-27 21:07:33 +00:00
CREATE TABLE eth.token_transfers (
id SERIAL PRIMARY KEY,
receipt_id INTEGER NOT NULL REFERENCES eth.receipt_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
log_index INTEGER NOT NULL,
contract_address VARCHAR(66) NOT NULL,
src VARCHAR(66) NOT NULL,
dst VARCHAR(66) NOT NULL,
amount NUMERIC NOT NULL,
UNIQUE (receipt_id, log_index)
);