Indexer is doing two things now:
- Forwarding all rpc requests from Dapp.
- Sync
Utxo
from manta node, so Dapp can getUtxo
more quickly.
Please take a look at indexer design if you're interested.
- rustc >= 1.58
- Sqlite >= 3.0
- yarn, nodejs >= 16.0
- Build the binary.
cargo b --profile production
- Get and configure the config files.
You should copy both folders
conf
andmigrations
to where you want to put. Please configure the config.toml
[indexer.configuration]
frequency = 2
rpc_method = "mantaPay_pull_ledger_diff"
full_node = "ws://127.0.0.1:9800"
port = 7788
prometheus_port = 7789
- Run indexer.
./manta-indexer --config-path ./conf --migrations-path ./migrations
- Setup a local relaychain network with polkadot-launch. You can use this json file to launch those nodes.
- Start indexer.
cargo r
- Run some typescript based test cases.
cd tests/integration-tests
yarn
yarn initialize-assets # configure public assets
yarn mint # mint some private assets for generating Utxos
yarn test-relayer
- Run some rust based test cases by cargo. This step is based on step 3 due to some utxos generated by that steps.
cargo test