Deployment and Testing
To deploy and test the Telegram bot, follow these steps:
Deployment
Set Environment Variables:
Create a
.env
file in the project root.Add the necessary variables such as
TELEGRAM_BOT_TOKEN
,ETH_RPC_SEPOLIA
, etc.
Deploy to a Cloud Platform:
Choose a cloud service like Heroku, Vercel, or any platform that supports Node.js.
Deploy the bot along with the Express server.
Set Webhook:
Configure the bot’s webhook using the
/setWebhook
endpoint.Example:
Testing
Local Testing:
Run the bot locally with:
Interact with the bot via Telegram to test commands and workflows.
Webhook Testing:
Ensure the webhook is correctly set and responding to Telegram messages.
Use tools like ngrok to expose your local server to the internet for testing.
Blockchain Interaction Testing:
Test transactions on a testnet (e.g., Sepolia).
Verify that contributions and withdrawals are processed correctly and securely.
Last updated