A TypeScript AWS Lambda bot that runs on a schedule to monitor Curve pools.
- Node.js v18 or later
- AWS CLI configured with appropriate credentials
- AWS CDK CLI installed globally (
npm install -g aws-cdk
)
- Clone the repository:
git clone [your-repo-url]
cd curve-pool-alerts
- Install dependencies:
npm install
- Build the project:
npm run build
- 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
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
The project uses ESLint with TypeScript support for code quality.
- Run linting check:
npm run lint
- Fix auto-fixable issues:
npm run lint:fix
- 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
- Make sure you have AWS credentials configured:
aws configure
- Deploy the stack:
npm run deploy
.
├── src/
│ └── lambda/ # Lambda function code
├── lib/ # CDK infrastructure code
├── bin/ # CDK app entry point
├── dist/ # Compiled JavaScript
└── cdk.out/ # CDK output