ScaleX DEX Smart Contracts
ScaleX DEX is built on a sophisticated smart contract architecture that enables efficient CLOB trading while maintaining decentralization and security. This guide covers all contract addresses, ABIs, and integration patterns.Contract Architecture
The ScaleX DEX system consists of four main smart contracts working together:ScaleXRouter
Main entry point for all user interactions and trade routing
PoolManager
Manages trading pairs and pool deployments
OrderBook
Handles order placement and matching using Red-Black Tree
BalanceManager
Manages token deposits, withdrawals, and locks
Deployed Contract Addresses
ScaleX DEX is deployed across multiple testnet environments for comprehensive testing and development:ScaleX Devnet Contracts
Core Contracts
Core Contracts
ScaleXRouter ContractPoolManager ContractOrderBook ContractBalanceManager Contract
Test Tokens
Test Tokens
Mock USDCMock WETHMock WBTCMock ChainlinkMock PEPE
Base Sepolia Testnet Contracts
Core Contracts
Core Contracts
ScaleXRouter ContractPoolManager ContractOrderBook ContractBalanceManager Contract
Test Tokens
Test Tokens
Mock USDCMock WETHMock WBTCMock Chainlink
Network Information
| Network | Chain ID | RPC URL | Explorer |
|---|---|---|---|
| ScaleX Devnet | 1802 | https://testnet-rpc.scalex.money | https://testnet-explorer.scalex.money |
| Base Sepolia | 84532 | https://sepolia.base.org | https://sepolia.basescan.org |
Contract Interfaces
ScaleXRouter Interface
The main entry point for all trading operations:OrderBook Interface
Handles order matching and execution:Integration Examples
Basic Trading Integration
Advanced Integration Patterns
Batch Operations
Real-time Price Monitoring
Gas Optimization
Efficient Order Management
Security Considerations
Best Practices
Input Validation
Input Validation
Error Handling
Error Handling
Access Control
Access Control
Testing & Development
Local Development Setup
Contract ABIs
The contract ABIs are available in the contracts repository or can be fetched from the block explorer.Download ABIs
Get the latest contract ABIs from GitHub
API Integration
Use the REST API for easier integration
Ready to build on ScaleX DEX? The smart contract architecture provides a robust foundation for creating yield-generating trading applications.
