Documentation Index
Fetch the complete documentation index at: https://docs.melt.finance/llms.txt
Use this file to discover all available pages before exploring further.
Contract Architecture
Melt’s smart contracts implement a Lock & Mint bridge pattern using LayerZero V2 for cross-chain messaging.Contracts
| Contract | Chain | Purpose |
|---|---|---|
| MeltHub | HyperEVM | Central hub — receives bridges, mints tokens, routes to HyperCore |
| MeltBridge | Source chains | Locks tokens, sends cross-chain messages to MeltHub |
| MeltAsset | HyperEVM | ERC20 + OFT wrapped token with role-based access |
| MeltFactory | HyperEVM | Deploys new MeltAsset tokens, manages HyperCore integration |
| MeltFeeController | HyperEVM | Per-user fee overrides for market makers and special integrations |
| MeltDebridgeHook | HyperEVM | Auto-deposits USDC from deBridge into HyperCore spot balance |
Tech Stack
- Solidity 0.8.22
- Foundry (Forge + Cast) for testing and deployment
- LayerZero V2 OApp for cross-chain messaging
- OpenZeppelin Contracts for ERC20, AccessControl, Pausable, ReentrancyGuard
Key Concepts
Config Key
Tokens are identified by aconfigKey — the keccak256 hash of (originalToken, sourceEid). This allows the same underlying token to have different configs when bridged from different source chains.
Roles
| Role | Granted To | Purpose |
|---|---|---|
MINTER_ROLE | MeltHub, MeltFactory | Mint wrapped tokens |
BURNER_ROLE | MeltHub | Burn wrapped tokens without approval |
ADMIN_ROLE | Multisig | Admin operations (set fees, pause tokens) |
REGISTRAR_ROLE | MeltFactory | Register tokens and configure HyperCore |
DEFAULT_ADMIN_ROLE | MeltFactory (then transferable) | Manage roles on MeltAsset |
owner | Multisig | Owner operations on MeltBridge, MeltFactory |
Next Steps
- Integration Guide — flows, code examples, events, and fee structure
- Deployment Addresses — all mainnet and testnet contract addresses
