Carbonable / carbonable-indexer-rs

Indexer Carbonable in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

carbonable-indexer-rs

Indexer Carbonable in Rust

Pre-requisite

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

Deployment

To testnet

$ just deploy 

Or mainnet

$ just deploy mainnet

Description

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}

Utils

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

About

Indexer Carbonable in Rust

License:Apache License 2.0


Languages

Language:Rust 98.4%Language:Just 0.9%Language:Dockerfile 0.4%Language:Makefile 0.3%