Overview
This tutorial shows how to bridge assets between HyperEVM (Hyperliquid’s EVM layer) and Plasma using the deBridge Liquidity Network (DLN) API. You will build a JavaScript application that creates cross-chain swap orders, executes bridge transactions, and monitors their status. By the end, you will have working code that:- Quotes bridge fees and estimated output amounts
- Executes cross-chain transfers from HyperEVM to Plasma
- Monitors order status until completion
- Handles the reverse direction (Plasma to HyperEVM)
Prerequisites
- Chainstack account with Plasma and Hyperliquid nodes deployed
- Node.js 18 or later
- A wallet with assets on HyperEVM (HYPE, USDT, or other supported tokens)
- Basic familiarity with ethers.js
deBridge supports both directions: HyperEVM → Plasma and Plasma → HyperEVM. This tutorial covers both.
Network parameters
Token addresses
1. Set up the project
.env file:
2. Initialize the bridge client
Createbridge.js:
3. Get a bridge quote
Add the quote function to fetch estimated amounts and fees:4. Execute the bridge transaction
Add functions to handle token approval and transaction execution:5. Monitor order status
Add status tracking to monitor the cross-chain transfer:6. Bridge from HyperEVM to Plasma
Add the main bridging function:7. Bridge from Plasma to HyperEVM
Add the reverse direction:8. Run the bridge
Add the main execution and example usage:package.json for ES modules:
9. Test the bridge
Run the bridge in either direction:Alternative: Using the deBridge UI
For manual transfers without code:- Visit app.debridge.finance
- Connect your wallet
- Select HyperEVM as source chain
- Select Plasma as destination chain
- Choose token and amount
- Click Swap and confirm
Troubleshooting
”Quote failed” error
Check that both chains are supported by deBridge and the token addresses are correct. Use the native token address (0x0000...0000) for HYPE and XPL.
Transaction stuck
Cross-chain transfers typically complete in 1-5 minutes. If stuck longer:- Check order status at stats-api.dln.trade
- Contact deBridge support with your transaction hash
Insufficient balance
Ensure you have enough:- Source tokens for the bridge amount
- Native tokens for gas (HYPE on HyperEVM, XPL on Plasma)
Rate limiting
The public RPC endpoints have rate limits:- HyperEVM public: 100 requests/minute
- Plasma public: varies
Supported tokens
deBridge supports bridging various tokens between HyperEVM and Plasma. Check the deBridge app for the current list of supported assets. Common routes:- HYPE ↔ XPL (native tokens)
- USDT on HyperEVM ↔ USDT0 on Plasma
- ETH variants ↔ wrapped versions
Conclusion
You now have working code to bridge assets between HyperEVM and Plasma using the deBridge DLN API. The same pattern works for bridging between any chains supported by deBridge. For production applications, consider:- Adding comprehensive error handling
- Implementing retry logic with exponential backoff
- Setting up monitoring for stuck transactions
- Using webhooks for status notifications
