Time to read: 1 min
Build Omnichain Fungible Token (OFTs) on Rootstock with Layerzero
Rootstock supports LayerZero, a cross-chain messaging protocol. You can build omnichain applications (OApps) that send messages and tokens between Rootstock and other EVM chains. Fees, latency, and trust assumptions still depend on each route and endpoint configuration.
This tutorial shows how to implement OFT (Omnichain Fungible Token) transfers between Rootstock Testnet and Ethereum Sepolia using LayerZero OFT V2.
What you'll learn
- Set up Hardhat for cross-chain deployments
- Deploy an OFT contract for token transfers between chains
- Configure LayerZero endpoints for cross-chain communication
- Execute transfers between Rootstock and Ethereum Sepolia testnets using the crosschain transfer feature.
Prerequisites
To complete this tutorial, you'll need:
- Node.js: v18.18.0+
- RPC Providers (Rootstock, Alchemy)
- Etherscan API Key
- Sign up to get an API Key. This will be used for verifying the contracts.
- Metamask: Install and connect to Ethereum Sepolia and Rootstock Testnet
- Test Funds: Sepolia ETH and Rootstock rBTC
Important: Ensure you have sufficient test tokens on both networks.