Skip to content
Tenzro
← All tutorials
Tutorial · Execution and bridges

Bridge with LayerZero V2

Find a LayerZero V2 route, compare its quote with other bridges, send TNZO or a supported token, and track the transfer from a Tenzro node.

Intermediate20 min

LayerZero V2 is a message-passing protocol. Applications built on it (OApps) send messages through an EndpointV2 contract on each chain, and tokens built on it (OFTs) move by burning or locking on the source chain and minting or releasing on the destination. Each inbound message is checked by a set of independent verifier networks (DVNs) chosen by the application before it is executed.

On Tenzro Network 1, LayerZero is one adapter in the node's bridge router. You reach it through the generic tenzro bridge commands with --protocol layerzero, or let the router pick the cheapest route and compare. Inbound LayerZero deliveries to Tenzro are accepted only with the required DVN attestations, and each message ID is accepted once.

Prerequisites

  • The tenzro CLI (see CLI reference).
  • A funded Tenzro account. Fund it by transferring TNZO to its address from another wallet or account.
  • A recipient address on the destination chain.
bash
export RPC=https://rpc.tenzro.xyz
export ME=0x<your-address>

1. List the adapters and routes

bash
tenzro bridge adapters --rpc $RPC
tenzro bridge routes --from-chain tenzro --to-chain base --token TNZO --rpc $RPC

The routes list shows each adapter that can carry the token between the two chains, with its protocol label and supported tokens. If LayerZero is not in the list for your pair, the router cannot use it for that transfer.

2. Quote

Ask for a quote pinned to LayerZero:

bash
tenzro bridge quote --rpc $RPC \
  --from-chain tenzro --to-chain base \
  --token TNZO --amount 10000000000000000000 \
  --protocol layerzero
json
{
  "from_chain": "tenzro",
  "to_chain": "base",
  "token": "TNZO",
  "input_amount": "10000000000000000000",
  "estimated_output": "...",
  "estimated_fee": "...",
  "estimated_time_secs": ...,
  "adapter": "layerzero",
  "all_routes": [ { "adapter": "layerzero", "fee": "...", "time_secs": ... } ],
  "status": "quoted"
}

Drop --protocol to see every route side by side in all_routes; the router's default choice is the cheapest one. Amounts are in the token's smallest unit (TNZO has 18 decimals).

3. Send

The transfer moves your funds, so the request must be signed by the sending account (see RPC access):

bash
tenzro bridge execute --rpc $RPC \
  --from-chain tenzro --to-chain base \
  --token TNZO --amount 10000000000000000000 \
  --sender $ME \
  --recipient 0x<recipient-on-base> \
  --protocol layerzero
json
{
  "transfer_id": "lz-...",
  "source_chain": "tenzro",
  "dest_chain": "base",
  "asset": "TNZO",
  "amount": "10000000000000000000",
  "tx_hash": "0x...",
  "protocol": "layerzero",
  "fee_paid": "...",
  "estimated_arrival_ms": ...,
  "status": "Pending"
}

--protocol pins the adapter for this one transfer only. If no registered adapter matches, the node refuses the request and names the adapters it has, rather than falling back to another bridge.

4. Track

bash
tenzro bridge status lz-... --protocol layerzero --rpc $RPC

The status moves from Pending to complete once the destination chain has executed the message, and the record then includes the destination transaction hash. You can also follow the message by its GUID on LayerZero Scan.

5. Send from your own contract (optional)

If you are writing an OApp, you do not need the router. Deploy your OApp on the chains you use, set its peers and DVN configuration, and call EndpointV2.send() directly. The endpoint quotes its fee through EndpointV2.quote(). Use the router when you want Tenzro to choose between LayerZero and the other bridges for a plain token transfer.

Next steps