Get Started
Getting Started with Doppler V3 SDK
This section guides you through setting up and using the Doppler V3 SDK to interact with the Doppler protocol.
Prerequisites
Node.js: Version
18.14or highernpm or yarn: Package manager for installing dependencies
Web3 Provider: Access to Ethereum RPC endpoints (Infura, Alchemy, etc.)
Wallet: MetaMask or similar wallet for transaction signing
Installation
Install the Doppler V3 SDK, Viem, and Drift packages:
npm install doppler-v3-sdk viem @delvtech/drift @delvtech/drift-viem
# or
yarn add doppler-v3-sdk viem @delvtech/drift @delvtech/drift-viemThe SDK uses Drift for blockchain interactions.
Required Environment Variables
# RPC Endpoint
RPC_URL="https://sepolia.base.org"
# Wallet Private Key (for automated transactions)
PRIVATE_KEY="your-private-key"
# Network Configuration
CHAIN_ID=84532Basic Setup
1. Import the SDK
2. Initialize Drift Client
Set up your Drift client with both read and write capabilities:
Read-only operations
Read-write operations
3. Get Protocol Addresses
Core Concepts
Factory Classes
The SDK provides two main factory classes:
ReadFactory: For querying protocol state and reading dataReadWriteFactory: For creating tokens and interacting with pools
Asset Lifecycle
Token Creation: Deploy new tokens through the factory
Price Discovery: Initial liquidity provision and price discovery phase
Migration: Move liquidity to standard Uniswap V2 pools (or V4 pools if using fee streaming)
Trading: Normal trading on migrated pools
Quick Start Examples
Reading Protocol Data
Creating a New Token
Interacting with Your Created Pool
Once you've created a token, you can interact with its price discovery pool:
Network Support
The SDK supports multiple networks:
Base Sepolia (chainId: 84532) - Testnet
Base Mainnet (chainId: 8453) - Production
Unichain Mainnet (chainId: 130) - Production
Unichain Sepolia (chainId: 1301) - Testnet
Ink (chainId: 57073) - Production
For complete network addresses and additional supported networks, see the Contract Addresses documentation.
You can get free Base Sepolia ETH from the Base Sepolia faucet to test your applications.
Error Handling
The SDK provides comprehensive error handling for common scenarios:
Next Steps
Explore the Factory Reference for detailed API documentation
Learn about Token Operations for managing deployed tokens
Understand Quoter Usage for price calculations
Check out V4 Migration for upgrading to V4
Support
For additional help and examples:
Check the Token Launch Examples for comprehensive deployment scenarios
Review the Implementation Guide for protocol details
Join the community for discussions and support
Last updated