Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Git-on-my-level/curve-pool-alerts

Open more actions menu

Repository files navigation

Curve Pool Alerts Bot

A TypeScript AWS Lambda bot that runs on a schedule to monitor Curve pools.

Prerequisites

  • Node.js v18 or later
  • AWS CLI configured with appropriate credentials
  • AWS CDK CLI installed globally (npm install -g aws-cdk)

Setup

  1. Clone the repository:
git clone [your-repo-url]
cd curve-pool-alerts
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Configure the application:
# Copy the example config file
cp src/lambda/config.example.ts src/lambda/config.ts

# Edit the config file with your settings
# Replace YOUR_SLACK_WEBHOOK_URL with your actual Slack webhook URL
# Customize the chains and tokens you want to monitor

Testing

Run the test suite:

npm test

The project includes:

  • Unit tests for individual components
  • Integration tests with mocked external services
  • Live integration tests against the Curve API

Linting

The project uses ESLint with TypeScript support for code quality.

  • Run linting check:
npm run lint
  • Fix auto-fixable issues:
npm run lint:fix

Local Development

  • Build the project: npm run build
  • Watch for changes: npm run watch
  • Synthesize CloudFormation template: npm run synth
  • Compare deployed stack with current state: npm run diff

Deployment

Manual Deployment

  1. Make sure you have AWS credentials configured:
aws configure
  1. Deploy the stack:
npm run deploy

Project Structure

.
├── src/
│   └── lambda/           # Lambda function code
├── lib/                  # CDK infrastructure code
├── bin/                  # CDK app entry point
├── dist/                 # Compiled JavaScript
└── cdk.out/             # CDK output

About

Publish Slack alerts when Curve assets go below threshold

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.