Indexer Carbonable in Rust
Install just. This is a more convenient task runner. Install docker Install rust
To install project and its dependencies.
$ just install
Everytime ${env}
is asked, default is testnet so you wille have to tell env only for mainnet
To testnet
$ just deploy
Or mainnet
$ just deploy mainnet
Indexer has 3 main commands :
- migration (just migrate // cd /srv/www && ./carbonable-migration)
- seeding (just run_seeding // cd /srv/www && ./carbonable-indexer --only-seed)
- indexing (just run_indexer // cd /srv/www && ./carbonable-indexer --only-index)
Base onchain contract address can be found under data/{env}.data.json
If at some time you need to reindex data or re-seed application (e.g contract address have changed)
$ just ssh ${env}
$ cd srv/www
$ ./carbonable-migration refresh
$ ./carbonable-indexer --only-seed
$ exit
$ just restart_indexer ${env}
List all available commands with documentation
$ just --list
Write migration:
$ cargo install sea-orm-cli
$ cd packages
$ sea-orm-cli migrate generate ${name_of_the_migration}
Full reset database
$ just reset && just run_seeding && just run_indexer