Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 67 additions & 0 deletions onlyswaps-token-routes-api/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Network RPC URLs

ETHEREUM_RPC_URL=<your-ethereum-rpc-url>
ARBITRUM_RPC_URL=<your-arbitrum-rpc-url>
AVALANCHE_RPC_URL=<your-avalanche-rpc-url>
BASE_RPC_URL=<your-base-rpc-url>
BINANCE_RPC_URL=<your-binance-rpc-url>
FILECOIN_RPC_URL=<your-filecoin-rpc-url>
LINEA_RPC_URL=<your-linea-rpc-url>
OP_RPC_URL=<your-optimism-rpc-url>
SCROLL_RPC_URL=<your-scroll-rpc-url>
# Testnets and Calibration
ARC_TESTNET_RPC_URL=<your-arc-testnet-rpc-url>
AVALANCHE_FUJI_RPC_URL=<your-avalanche-fuji-rpc-url>
BASE_SEPOLIA_RPC_URL=<your-base-sepolia-rpc-url>
FILECOIN_CALIBRATION_RPC_URL=<your-filecoin-calibration-rpc-url>

# Router Contract Addresses

ETHEREUM_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
ARBITRUM_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
AVALANCHE_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
BASE_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
BINANCE_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
FILECOIN_ROUTER=0xA25921858Fa5Ee8177FaaFF1D6522730E4649648
LINEA_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
OP_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
SCROLL_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
# Testnets and Calibration
ARC_TESTNET_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
AVALANCHE_FUJI_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
BASE_SEPOLIA_ROUTER=0x16323707e61d20A39AaE5ab64808e480B91658aB
FILECOIN_CALIBRATION_ROUTER=0x1B37530129E84Cc0C4Db6C00c61beC06B9691b8c

# Starting Block Numbers (contract deployment blocks)
# Set to a specific block number to sync from that block
# Set to 0 to start from latest block (no historical sync, only new events)

ETHEREUM_START_BLOCK=0
ARBITRUM_START_BLOCK=0
AVALANCHE_START_BLOCK=0
BASE_START_BLOCK=0
BINANCE_START_BLOCK=0
FILECOIN_START_BLOCK=0
LINEA_START_BLOCK=0
OP_START_BLOCK=0
SCROLL_START_BLOCK=0
# Testnets and Calibration
ARC_TESTNET_START_BLOCK=0
AVALANCHE_FUJI_START_BLOCK=0
BASE_SEPOLIA_START_BLOCK=0
FILECOIN_CALIBRATION_START_BLOCK=0

# API Configuration
PORT=3000
NODE_ENV=development

# Sync Configuration
SYNC_INTERVAL=60000
# BLOCK_CHUNK_SIZE: Number of blocks to query per request
# Alchemy Free tier: max 10 blocks, Growth tier: max 10000 blocks
# Increase this value if you have a paid RPC plan for faster syncing
BLOCK_CHUNK_SIZE=10
# REQUEST_DELAY_MS: Delay between chunk requests to avoid rate limiting
# Alchemy Free tier: 330 req/sec, recommend 200-500ms delay
# Set to 0 for paid plans with higher limits
REQUEST_DELAY_MS=200
82 changes: 82 additions & 0 deletions onlyswaps-token-routes-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Dependencies
node_modules/
package-lock.json
yarn.lock
pnpm-lock.yaml

# Build outputs
dist/
build/
*.js
*.d.ts
*.js.map
!jest.config.js
!hardhat.config.js

# Environment variables
.env
.env.local
.env.*.local

# Database
data/db.json
data/*.json
*.db
*.sqlite

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
pnpm-debug.log*

# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
*~

# IDE
.vscode/
.idea/
*.swp
*.swo
*.swn
.sublime-*

# Testing
coverage/
.nyc_output/
*.lcov

# TypeScript
*.tsbuildinfo

# Temporary files
tmp/
temp/
*.tmp

# Cache
.cache/
.parcel-cache/
.eslintcache

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity
Loading
Loading