GeneralizedTCR Action Bot
This bot watches a GTCR Factory contract and all GTCR contracts spawned from it. It is a convenience tool and does primarily two things:
- Detects submissions that passed the challenge period and executes them for the user.
- Detects pending crowdfunding rewards that were not withdrawn, and withdraws them for the user.
We recommend using volta
- Tested on NodeJS version 14.
- Clone this repo.
- Duplicate
.env.example
, rename it to.env
and fill in the environment variables. - Run
yarn
to install dependencies and thenyarn start
to run the service
- Create a
.env
file with the name of the network you wish to use. Example.env.xdai
. - Look into
package.json
for the appropriate script (e.g. start:xdai). Create one if it does not yet exist. - Use PM2 like so:
pm2 start yarn --interpreter bash --name gtcr-action-bot-<network> -- start:<network>
, replacingnetwork
with the network name.
Example for xDai:
pm2 start yarn --interpreter bash --name gab-xdai -- start:xdai
See CONTRIBUTING.md.