Overview
This quickstart guide will help you set up the deBridge contracts, run tests, and execute your first cross-chain transfer. By the end, you’ll understand the basic workflow of the protocol.Prerequisites
Before you begin, ensure you have:- Node.js 16.x or higher
- Yarn or npm package manager
- Git for cloning the repository
Installation
Running Tests
Verify your setup by running the test suite:Understanding the Architecture
The deBridge Protocol consists of several key components:DeBridgeGate
Main contract for sending assets and messages cross-chain
CallProxy
Executes cross-chain smart contract calls
OraclesManager
Manages the decentralized validator network
DeBridgeToken
ERC-20 wrapped tokens for cross-chain assets
Your First Cross-Chain Transfer
Let’s walk through sending assets cross-chain:Track Transaction
Monitor your cross-chain transaction:
- Testnet Explorer: https://testnet-explorer.debridge.finance/
- Mainnet Explorer: https://mainnet-explorer.debridge.finance/
Running Examples
The repository includes working examples:Send Native Token
Send ERC-20 Token
Cross-Chain Message (Incrementor)
See the Examples section for detailed guides on each example.
Key Concepts
Before building with deBridge, understand these core concepts:- Lock-and-Mint: Assets are locked on the source chain and wrapped tokens (deTokens) are minted on the destination
- Oracle Network: Independent validators sign and verify cross-chain transactions
- CallProxy: Enables arbitrary smart contract calls across chains
- Fees: Consist of fixed protocol fees and percentage-based transfer fees
Next Steps
Architecture Overview
Understand how the protocol works
Integration Guide
Integrate deBridge into your application
Smart Contracts
Explore contract documentation
Examples
Learn from working examples
Common Issues
Cannot find module '../typechain-types'
Cannot find module '../typechain-types'
TypeChain types haven’t been generated yet.Solution:
Transaction reverts with 'NotEnoughReserves'
Transaction reverts with 'NotEnoughReserves'
The bridge doesn’t have enough liquidity for your transfer.Solution:
- Check
maxAmountfor the asset - Try a smaller amount
- Wait for liquidity to be replenished
Claim not executing automatically
Claim not executing automatically
Insufficient execution fee was provided.Solution:
- Include a higher execution fee when sending
- Manually claim the transaction (advanced)
Resources
- Documentation Portal: https://docs.debridge.finance/
- deBridge App: https://app.debridge.finance/
- GitHub: https://github.com/debridge-finance
- Discord: https://discord.com/invite/debridge
- Twitter: https://twitter.com/DebridgeFinance
Support
Need help? Reach out through:- Discord: Join the #developer channel
- GitHub Issues: Report bugs or request features
- Documentation: Check the integration guides