-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathexecutions.sql
More file actions
25 lines (23 loc) · 935 Bytes
/
executions.sql
File metadata and controls
25 lines (23 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DROP TABLE IF EXISTS executions;
CREATE TABLE executions (
tx_index INTEGER UNSIGNED,
-- tx_hash TEXT,
tx_hash_id INTEGER UNSIGNED, -- id of record in index_transactions
block_index INTEGER,
-- source TEXT,
source_id INTEGER UNSIGNED, -- id of record in index_addresses
contract_id INTEGER UNSIGNED, -- id of record in index_contracts
gas_price BIGINT,
gas_start BIGINT,
gas_cost BIGINT,
gas_remained BIGINT,
value BIGINT,
data BLOB,
output BLOB,
status TEXT
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE UNIQUE INDEX tx_index ON executions (tx_index);
CREATE INDEX block_index ON executions (block_index);
CREATE INDEX source_id ON executions (source_id);
CREATE INDEX tx_hash_id ON executions (tx_hash_id);
CREATE INDEX contract_id ON executions (contract_id);