Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyuchan committed Mar 24, 2024
1 parent 65a240b commit 76f6bcf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ Use `scanner/schema.sql` to create tables in DB.
* `node` is required.
* `start` is not required, starting from `4636000` by default.
* `interval` is not required, default value is `12` in seconds.
## Updater
### Config
Modify the config file in `updater/config.toml`
### Run
```
./updater
```
14 changes: 2 additions & 12 deletions scanner/schema.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
drop table if exists evm_last_height;
drop table if exists evm_stakes;
drop table if exists evm_delegations;
drop table if exists evm_undelegations;
drop table if exists evm_jailed;
drop table if exists evm_punish;
drop table if exists evm_update_validator;
drop table if exists evm_coinbase_mint;
drop table if exists evm_receipts;
drop table if exists evm_audit;
drop table if exists evm_validators;

create table if not exists evm_last_height(
tip varchar(3) not null,
height bigint not null,
Expand Down Expand Up @@ -124,6 +112,8 @@ create table if not exists evm_audit(
amount numeric(48) not null,
op integer not null
);
create index idxvld on evm_audit(validator);
create index idxdlg on evm_audit(delegator);

create table if not exists evm_validators(
block_num bigint not null,
Expand Down
2 changes: 1 addition & 1 deletion updater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl UpdaterConfig {
struct Args {
/// Node RPC
#[arg(long)]
pub node: String,
pub node: Option<String>,
/// Block height to start scanning
#[arg(long)]
pub start: Option<u64>,
Expand Down

0 comments on commit 76f6bcf

Please sign in to comment.