TelePay is a cross-chain USD transfer system built for Telegram, enabling seamless transfers between users while abstracting away blockchain complexity.
TelePay consists of a network of smart contracts deployed across multiple chains that enable:
- Native USD transfers between Telegram users
- Cross-chain deposits and withdrawals
- Abstracted transaction fees and complexity
- Batched transfer operations
- Automated liquidity management
- Deposit USDC to any user's balance using their public key
- Withdraw USDC to any chain
- Transfer USDC between TelePay users
- Cross-chain transfers via CCTP
- Each supported chain has an identical contract deployment
- Cross-chain messaging handled via Circle's CCTP
- Frontend interface available as a Telegram Mini App
- Signature-based authorization for user operations
- Python 3.8+
- Foundry
- Node.js 16+
- Clone the repository and install Foundry dependencies:
$ forge install
- Set up Python virtual environment:
# Create virtual environment
$ python3 -m venv ./venv
# Activate virtual environment
# On macOS/Linux:
$ source venv/bin/activate
# On Windows:
$ .\venv\Scripts\activate
# Install Python dependencies
$ pip3 install -r requirements.txt
- Set up environment variables:
# Copy example env file
$ cp .env.example .env
# Add your private key and other required variables to .env
PRIVATE_KEY=0x...
$ forge build
$ forge test
You can deploy and verify the contracts in two ways:
Using the Python deployment script:
# Make sure your virtual environment is activated
$ source venv/bin/activate
# First, set up your explorer API keys in .env:
BASE_EXPLORER_API_KEY=your_basescan_api_key
ETHERSCAN_API_KEY=your_etherscan_api_key
ARBISCAN_API_KEY=your_arbiscan_api_key
# Run deployment script
$ python3 script/deploy.py
The script will:
- Deploy Telepay on Base Sepolia
- Verify Telepay contract on Basescan
- Deploy Vault on Ethereum Sepolia
- Verify Vault contract on Etherscan
- Deploy Router on Arbitrum Sepolia
- Verify Router contract on Arbiscan
- Update .env with all contract addresses
- Guide you through the process with interactive prompts
If you prefer to deploy and verify manually:
# 1. Deploy and verify Telepay on Base Sepolia
$ forge script script/Telepay.s.sol --fork-url base_sepolia --broadcast --verify -vvv \
--etherscan-api-key $BASE_EXPLORER_API_KEY
# Copy BASE_TELEPAY_ADDRESS to .env
# 2. Deploy and verify Vault and Router on Ethereum Sepolia
$ forge script script/Telepay.s.sol --fork-url eth_sepolia --broadcast --verify -vvv \
--etherscan-api-key $ETHERSCAN_API_KEY
# Copy ETH_VAULT_ADDRESS to .env
# 3. Deploy and verify Router on Arbitrum
$ forge script script/Telepay.s.sol --fork-url arbitrum_sepolia --broadcast --verify -vvv \
--etherscan-api-key $ARBISCAN_API_KEY
To verify your contracts, you'll need API keys from:
- Base Sepolia: https://basescan.org/apis
- Ethereum Sepolia: https://etherscan.io/apis
- Arbitrum Sepolia: https://arbiscan.io/apis
Networks are configured in foundry.toml:
base_sepolia
eth_sepolia
arbitrum_sepolia
- Base Sepolia: https://www.coinbase.com/faucets/base-ethereum-goerli-faucet
- Ethereum Sepolia: https://sepoliafaucet.com
- Arbitrum Sepolia: https://sepolia-faucet.arbitrum.io
- Frontend Repository: @lfglabs-dev/app.telepay.cc
- Telegram Bot: TelePay Bot
This project is under active development. Use at your own risk.