A python tool to observe
flare-systems-deployment
and
fdc-suite-deployment.
It does so without keeping any state. This allows it to only require the
identity address of the observed entity and an observer node rpc. It can send
error messages to:
- discord via webhook
- slack via webhook
- telegram bot via sendMessage method
- generic rest api via http post method
The easiest way to run is via docker. The only required env variables are
RPC_BASE_URL and IDENTITY_ADDRESS. Others can be set as desired. For example,
FAST_UPDATE_PROBABILITY_THRESHOLD_PPB sets the minimum false positive
probability (in parts per billion) that triggers fast update alerts. It defaults
to 100 when not provided.
docker run \
-e RPC_BASE_URL="https://flare-api.flare.network" \
-e IDENTITY_ADDRESS="0x0000000000000000000000000000000000000000" \
-e NOTIFICATION_DISCORD_WEBHOOK="https://discord.com/api/webhooks/secret/secret" \
-e NOTIFICATION_TELEGRAM_BOT_TOKEN="secret" \
-e NOTIFICATION_TELEGRAM_CHAT_ID="secret" \
-e NOTIFICATION_SLACK_WEBHOOK="https://hooks.slack.com/services/secret/secret/secret" \
-e NOTIFICATION_GENERIC_WEBHOOK="http://host:port/path" \
ghcr.io/flare-foundation/fsp-observer:mainAlternatively python can be used to run:
python -m venv venv
pip install -r requirements.txt
# optionally create .env file
RPC_BASE_URL="https://flare-api.flare.network" \
IDENTITY_ADDRESS="0x0000000000000000000000000000000000000000" \
python main.pyIf it complains about a block not being found your observer node might not have enough history, try to set MIN_TO_COMPARE_BLOCKS to a lower value (default is 1_000_000).