git clone https://github.com/soroswap/zephyr-indexer.git
cd zephyr-indexer
docker build -t hello-zephyr .
docker run -it hello-zephyr /bin/bash
export MERCURY_JWT=<YOUR_MERCURY_JWT_TOKEN>
mercury-cli --jwt $MERCURY_JWT --local false --mainnet false deploy
cd mercury-helpers
yarn token
cd ..
export MERCURY_JWT=your_token_here
Replace your_token_here
with your actual Mercury JWT token.
mercury-cli --jwt $MERCURY_JWT --local false --mainnet true deploy
- To deploy in testnet, change
--mainnet
tofalse
.
mercury-cli --jwt $MERCURY_JWT --local false --mainnet true catchup --contracts "router_address"
mercury-cli --jwt $MERCURY_JWT --local false --mainnet true catchup --contracts "factory_address"
You can monitor the catchup progress at:
https://mainnet.mercurydata.app/catchups/{catchup_id}
Wait until all catchups are completed before proceeding.
Once the router and factory catchups are completed:
- Go to
mercury-helpers/src/scripts/pairs-subscribe.ts
. - Choose between
mainnetPairsTable
ortestnetPairsTable
to subscribe to the pairs you desire. - Run the subscription command:
cd mercury-helpers
yarn pairs:subscribe
After subscribing to the pairs, run:
yarn pairs:catchups
This will generate pairs-catchups-mainnet.sh
with the commands needed to catch up each pair. To avoid overloading the system:
- Run the first 5 pairs and wait until they complete.
- Then, proceed with the next set of 5 pairs, and so on. (to avoid mercury crash)
Once all catchups are completed, your data should be fully synchronized.
Next Steps:
- Verify that all data is correct and synchronized.