Skip to main content
In this tutorial, you will bridge USDT0 from Ethereum Sepolia to the Stable Testnet programmatically using TypeScript and ethers v6. You will build the script incrementally, adding one function per step. This tutorial uses the OFT Mesh path. The OFT Adapter on Sepolia locks your tokens, LayerZero’s dual-DVN verification confirms the message, and USDT0 is minted on Stable. For a full explanation of how this works, see Bridging to Stable.
Want fewer lines of code? The Stable SDK exposes quoteBridge and bridge and picks the route (LayerZero or LI.FI) for you.

Prerequisites

  • Node.js 18.0.0 or higher (node --version to verify)
  • A Sepolia wallet with a private key you control (never use a key holding real funds)
  • SepoliaETH for gas (get some from sepoliafaucet.com or faucets.chain.link/sepolia)
  • Basic familiarity with running scripts from the terminal

1. Set up the project

Your package.json should include:

2. Configure your environment

Create a .env file with your credentials:
For SEPOLIA_RPC_URL, any of these work:
  • Public: https://rpc.sepolia.org or https://ethereum-sepolia-rpc.publicnode.com
  • Alchemy: https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY
  • Infura: https://sepolia.infura.io/v3/YOUR_KEY

3. Scaffold the script

Create bridge.ts with the imports, configuration, and a main function. You will add functions to this file in the following steps, and call them from main.

4. Mint test USDT0 on Sepolia

The test USDT0 contract on Sepolia exposes a public mint function. Add the following function to bridge.ts above main:
Then call it from main:
Run the script:

Checkpoint: You should see a non-zero USDT0 balance logged after the mint confirms.

5. Approve the OFT Adapter

Before the OFT Adapter can move your tokens, it needs an ERC-20 allowance. Add this function above main:
Add the call in main after mint:
Run the script. You can comment out the await mint(...) call if you already have tokens from the previous run.
Checkpoint: The script should log a non-zero allowance after the approval confirms.

6. Quote the fee and send the bridge transaction

The quoteSend call returns the LayerZero messaging fee in SepoliaETH, which you pass as msg.value to send. Add this function above main:
Add the call in main after approve:

7. Verify arrival on Stable Testnet

After sending, the script can poll the Stable Testnet RPC until the tokens arrive. Add this function above main:
Add the call in main after send:

8. Run the complete bridge

Your main function should now look like this:
Run it:

Checkpoint: You should see output like this:
You can also search your wallet address on the Stable Testnet explorer to confirm the mint event.

What you have built

You bridged USDT0 from Ethereum Sepolia to Stable Testnet. You now know how to:
  • Mint test USDT0 on Sepolia using the contract’s public mint function
  • Approve an OFT Adapter to spend ERC-20 tokens on your behalf
  • Construct LayerZero sendParams with 32-byte address encoding and executor options
  • Quote the cross-chain messaging fee with quoteSend before committing funds
  • Execute a cross-chain token transfer with send and confirm delivery on the destination chain
  • Verify on-chain state using Stable’s RPC (https://rpc.testnet.stable.xyz, chain ID 2201) and Stablescan

Send your first USDT0

Use the bridged USDT0 with native and ERC-20 transfers.

Bridging to Stable

Deep dive on OFT Mesh vs Legacy Mesh mechanics.

Testnet information

Full network parameters, RPC endpoints, and faucet details.
Last modified on May 11, 2026