This project is a Next.js application that manages and triggers subscriptions for the Flux protocol across multiple blockchain networks.
- Automated subscription management
- Multi-chain support (Sei, Mantle, Celo, Base)
- Periodic checks and triggers for active subscriptions
- Secure API endpoints for subscription management
- Node.js (version specified in
package.json
) - npm or yarn
-
Clone the repository
-
Install dependencies:
npm install
# or
yarn install
- Set up environment variables:
Create a
.env
file in the root directory and add the following:
CRON_SECRET=your_cron_secret
PRIVATE_KEY=your_private_key
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
/app
: Main application code/api
: API routes/lib
: Utility functions and constants
/public
: Static assets/styles
: Global styles
The core subscription logic is handled in:
startLine: 11
endLine: 79
This file contains the main logic for checking and triggering subscriptions across different chains.
Chain-specific configurations and contract addresses are defined in:
startLine: 1
endLine: 18
This project is configured for deployment on Vercel. The vercel.json
file includes cron job configurations for periodic tasks.