docs: add NATS details

This commit is contained in:
Mohamed Sohail 2024-05-27 18:05:58 +08:00
parent b92380bf91
commit 5d8dd60dca
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -46,6 +46,11 @@ nano .env.example
mv .env.example .env mv .env.example .env
``` ```
Special env variables:
* DEV=*
* FORCE_BACKFILL=*
Refer to [`config.toml`](config.toml) to understand different config value settings. Refer to [`config.toml`](config.toml) to understand different config value settings.
@ -55,6 +60,30 @@ Refer to [`config.toml`](config.toml) to understand different config value setti
docker run --env-file .env -p 127.0.0.1:5001:5001 celo-tracker:latest docker run --env-file .env -p 127.0.0.1:5001:5001 celo-tracker:latest
``` ```
## Processing NATS messages
### JSON structure
```js
{
"block": Number,
"contractAddress": String,
"success": Boolean,
"timetamp" Number,
"transactionHash": String,
"transactionType": String,
"payload": Object
}
```
### Monitoring with NATS CLI
Install NATS CLI from [here](https://github.com/nats-io/natscli?tab=readme-ov-file#installation).
```bash
nats subscribe "TRACKER.*"
```
## Caveats ## Caveats
* Reverted transactions older than 10 minutes will be skipped due to the trie potentially missing. To override this behavior, use an archive node and set `chain.archive_node` to `true`. * Reverted transactions older than 10 minutes will be skipped due to the trie potentially missing. To override this behavior, use an archive node and set `chain.archive_node` to `true`.