- Ensure you have a
forta.config.json
file in the agent dir. Sample:
{
"jsonRpcUrl": "https://bsc-dataseed.binance.org/",
}
- Ensure you have installed all the necessary dependencies with npm:
cd <AGENT-DIR>
npm install
# if the bot is typescript
npm run build
cp -r ./dist/src/* ./dist
# can use these to simulate a local tx
# admin-events
npm run tx 0x14b29d2fde6ffb5cf48b0339b9f2cfe4c18f49824ab4749fbd8ad6c26413886a
npm run tx 0x402c5a796b8d865beeb02b8b07da82505a4ebd8e8436101b0c7b37a50c7c3c3e
npm run tx 0xf557a374134c5d06025fc0bffc95924c619dabaea5c26981ceaa9f8321895a16
# operational-events
npm run tx 0x869db8da0f74b186d417ca39343f6e802c458252863c7666b643028563730e7e
# substantial-value-events
npm run tx 0x2378466e8d2e85f82baf846ee5114ff465cb8e0be1614111b82f007eecece6dd
npm run tx 0x89caa53495a6a2a2c5ca6debc5b1fa247a87f14c143e0363f4b12ec8e00bdf8c
- Run a forta agent locally from repo root:
yarn hardhat forta:run
- Run a forta agent from the agent dir:
npm run start
- Locally build docker image and test from agent dir. You will need to copy the
abis/ui
toabi
in the agent dir:
docker build -t testbuild .
docker run testbuild
- The
npm build
for substantial-value-events is broken. The files need to be manually copied fromdist/src
todist
. - Dockerfiles aren't proper. Getting this in substantial-value-events bot while building docker image:
npm WARN prepare removing existing node_modules/ before installation
- Tests have to be added properly.
-
Navigate to the bot dashboard page.
Eg: Substantial event bot (https://explorer.forta.network/bot/0x65b2580b43899f87c1d347a9ca3d917991c4906305de0c22a969a716eaf6d1a8)
-
Navigate & click the 'Subscribe to this bot' button.
-
In the 'Add Subscription' pop up select 'Slack' as the integration.
-
This will prompt to select subscription type which should be set to 'Single Bot', 'Bot to watch' should be set to the bot ID's (Present in the README.md)
-
Finally the slack webhook url should be entered which can be generated using the (https://slack.com/help/articles/115005265063-Incoming-webhooks-for-Slack) guide. This link is to be pasted into the slack webhook placeholder in the 'Add Subscription' pop up.