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, txFee numeric, nonce numeric, txStatus text, isContract bool, 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 );