Skip to content

A bot to watch Generalized TCR contracts and call functions on behalf of users

License

Notifications You must be signed in to change notification settings

kleros/gtcr-action-bot

Repository files navigation

GeneralizedTCR Action Bot

JavaScript Style Guide Conventional Commits Commitizen Friendly

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.

Prerequisites

We recommend using volta

  • Tested on NodeJS version 14.

Get Started

  1. Clone this repo.
  2. Duplicate .env.example, rename it to .env and fill in the environment variables.
  3. Run yarn to install dependencies and then yarn start to run the service

Production

  1. Create a .env file with the name of the network you wish to use. Example .env.xdai.
  2. Look into package.json for the appropriate script (e.g. start:xdai). Create one if it does not yet exist.
  3. Use PM2 like so: pm2 start yarn --interpreter bash --name gtcr-action-bot-<network> -- start:<network>, replacing network with the network name.

Example for xDai: pm2 start yarn --interpreter bash --name gab-xdai -- start:xdai

Contributing

See CONTRIBUTING.md.

About

A bot to watch Generalized TCR contracts and call functions on behalf of users

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published