mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
43 lines
No EOL
777 B
Text
43 lines
No EOL
777 B
Text
CREATE TABLE IF NOT EXISTS blocks (
|
|
hash text primary key,
|
|
coinbase text,
|
|
gasUsed numeric,
|
|
gasLimit numeric,
|
|
txCount numeric,
|
|
uncleCount numeric,
|
|
age timestamp,
|
|
parentHash text,
|
|
uncleHash text,
|
|
difficulty bigint,
|
|
size text,
|
|
nonce numeric,
|
|
number bigint
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS txs (
|
|
txHash text,
|
|
to_addr text,
|
|
from_addr text,
|
|
blockhash text references blocks(hash),
|
|
blocknumber text,
|
|
amount numeric,
|
|
gasprice numeric,
|
|
gas numeric,
|
|
gasLimit numeric,
|
|
txFee numeric,
|
|
nonce numeric,
|
|
txStatus text,
|
|
isContract bool,
|
|
age timestamp,
|
|
data bytea
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS accounts (
|
|
addr text primary key unique,
|
|
balance numeric,
|
|
txCountAccount numeric
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS contracts (
|
|
txHash text
|
|
); |