Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kleros/gtcr-action-bot

A bot to watch Generalized TCR contracts and call functions on behalf of users
https://github.com/kleros/gtcr-action-bot

backend curated-list generalized-curated-list

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        


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](https://volta.sh/)

- 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- -- start:`, replacing `network` with the network name.

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

## Contributing

See CONTRIBUTING.md.