Notes
- L1-to-L2: Uses
sendToL2on token-specific L1Bridge contracts - L2-to-L2 or L2-to-L1: Uses
swapAndSendon L2AmmWrapper (swaps canonical token to hToken for bridging) - Each supported token has separate bridge contracts on L1 and AMM wrappers on L2
- Bonders provide fast liquidity on destination (minutes), settle via canonical bridge later
bonderFeeon L2 must be obtained from Hop API or SDK- Finality: minutes with bonder, 7+ days without bonder (canonical path)
Its names in a program
On Ethereum,Hop is a namespace: its contracts need no import.
Deployments
ABI
HopL1BridgeABI
import HopL1BridgeABI from "./protocols/hop/HopL1BridgeABI.json"; Speaks for: l1EthBridge, l1UsdcBridge.
sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee) payable
HopL2AmmWrapperABI
import HopL2AmmWrapperABI from "./protocols/hop/HopL2AmmWrapperABI.json"; Speaks for: l2AmmWrapper.
swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline) payable
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
