Skip to content

Commit

Permalink
feat: index assets contracts (FuelLabs#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigobranas authored and raghukapur9 committed Sep 25, 2024
1 parent fd5e166 commit 1e73385
Show file tree
Hide file tree
Showing 16 changed files with 1,033 additions and 104 deletions.
21 changes: 11 additions & 10 deletions packages/graphql/database/1.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
CREATE TABLE indexer.block_statistics (
id SERIAL PRIMARY KEY,
timestamp TIMESTAMP NOT NULL,
number_of_blocks INTEGER NOT NULL,
cumulative_block_reward NUMERIC NOT NULL,
start_block INTEGER NOT NULL,
end_block INTEGER NOT NULL
create table indexer.assets_contracts (
asset_id text not null,
contract_id text not null,
transaction_id text not null,
name text,
symbol text,
decimals integer,
error text,
primary key (asset_id, contract_id)
);

CREATE UNIQUE INDEX ON indexer.block_statistics(id);
CREATE INDEX ON indexer.block_statistics(timestamp);
create index on indexer.assets_contracts (asset_id);
create index on indexer.assets_contracts (contract_id);
Loading

0 comments on commit 1e73385

Please sign in to comment.