Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
665160e
wip
david30907d Sep 25, 2025
33beb6d
wip: at least SSE works
david30907d Sep 27, 2025
0f05d24
fixCI: now token balance endpoint works
david30907d Oct 6, 2025
ec38d86
fix: native address should be native
david30907d Oct 6, 2025
7bc8681
wip: stablecoin config works and we can supply to aave now
david30907d Oct 6, 2025
e72229e
wip: split intent into 2 phase, init and continue to solve swap dust …
david30907d Oct 7, 2025
a8e0acb
test: increase coverage
david30907d Oct 8, 2025
e683e9d
test: increase test coverage
david30907d Oct 9, 2025
07e5e85
fix: accept native token to zapIn
david30907d Oct 9, 2025
260d960
refactor: remove dead code
david30907d Oct 10, 2025
a0b9c8b
chore: remove abandoned enhanced cache files
david30907d Oct 10, 2025
e5d7850
fix: weth should use eth's price + remove unused tests
david30907d Oct 10, 2025
652e591
fix: weth price + ethers + remove duplicate code
david30907d Oct 11, 2025
e154040
refactor: modularize multiple configs
david30907d Oct 12, 2025
637476e
• - Removed the unused token filtering/allocation/grouping helpers an…
david30907d Oct 12, 2025
5f9641e
refactor: reorg modules
david30907d Oct 12, 2025
c2f7c82
fix: pendle works now
david30907d Oct 12, 2025
33f43a6
fix: velodrome v2 works
david30907d Oct 12, 2025
a5708ef
chores/feat: add error msg if token config is missing in config/token…
david30907d Oct 13, 2025
c3d8361
refactor: Cut out the retry backoff delays. Added a local mock for r…
david30907d Oct 13, 2025
6396cbf
wip: use config to support Pendle's any token can be zapped in
david30907d Oct 13, 2025
c03a607
fix: pendle can send txns but still failed with slippage issue
david30907d Oct 13, 2025
1c96583
fix(pendle): now we can use weth to zapin/out
david30907d Oct 13, 2025
550860e
fixCI: lint
david30907d Oct 14, 2025
becc993
chainId is the canonical identifier - it's what the Pendle API expect…
david30907d Oct 14, 2025
713612f
Removed the chain parameter from both resolveRpcUrl() and getRpcProvi…
david30907d Oct 14, 2025
2db6704
fixCI
david30907d Oct 14, 2025
f3ff000
Swapped out the old express-validator dependency for fully in-house m…
david30907d Oct 14, 2025
021eb12
fixCI: add env
david30907d Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ REBALANCE_BACKEND_TIMEOUT=10000
PLATFORM_FEE_RATE=0.0001
REFERRER_FEE_SHARE=0.7
TREASURY_ADDRESS=0x2eCBC6f229feD06044CDb0dD772437a30190CD50

# Balance Service Configuration
# Moralis Web3 Data API for multi-chain token balance aggregation
# Get your API key from: https://admin.moralis.io/web3apis
MORALIS_API_KEY=your_moralis_api_key_here

# Balance cache TTL in milliseconds (default: 180000 = 3 minutes)
BALANCE_CACHE_TTL=180000

# Moralis API request timeout in milliseconds (default: 10000)
MORALIS_TIMEOUT=10000
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
branches: [main, develop]
pull_request:
branches: [main, develop]

env:
COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }}
MORALIS_API_KEY: ${{ secrets.MORALIS_API_KEY }}
jobs:
quality:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A Node.js Express API server for intent-based DeFi operations, providing optimal
- **Comprehensive Caching**: In-memory caching with configurable TTL for price data
- **Multiple Price Sources**: CoinMarketCap, CoinGecko with extensible architecture
- **Retry Logic**: Automatic retry with exponential backoff for failed requests
- **Input Validation**: Comprehensive parameter validation using express-validator
- **Input Validation**: Comprehensive parameter validation via custom middleware
- **Error Handling**: Robust error handling with meaningful error messages
- **CORS Support**: Configured for cross-origin requests
- **Testing**: Comprehensive test suite with Jest and Supertest
Expand Down Expand Up @@ -49,6 +49,9 @@ ZEROX_API_KEY=your_0x_api_key_here
# Price API Keys
COINMARKETCAP_API_KEY=your_coinmarketcap_api_key_here,your_second_key_here

# RPC Provider (optional - falls back to public RPCs if not provided)
ALCHEMY_API_KEY=your_alchemy_api_key_here

# Server Configuration
PORT=3002
NODE_ENV=development
Expand Down Expand Up @@ -318,6 +321,9 @@ ZEROX_API_KEY=your_0x_api_key_here
# Price API Keys
COINMARKETCAP_API_KEY=your_coinmarketcap_api_key_here

# RPC Provider (optional - falls back to public RPCs if not provided)
ALCHEMY_API_KEY=your_alchemy_api_key_here

# Server Configuration
PORT=3002
NODE_ENV=production
Expand Down
Loading