On this page
LayerZero
Omniassets transfers use LayerZero V2 for cross-chain messaging. Your integration supplies a destination endpoint ID and type-3 executor options with enough destination receive gas.
Endpoint IDs are not chain IDs
Pass dstEid, not the EVM chain ID, to quote and send functions.
| Network | Chain ID | LayerZero EID |
|---|---|---|
| Ethereum | 1 | 30101 |
| Base | 8453 | 30184 |
| Polygon | 137 | 30109 |
| BNB Chain | 56 | 30102 |
| Robinhood Chain | 4663 | 30416 |
| Ink | 57073 | 30339 |
| HyperEVM | 999 | 30367 |
The current EVM deployments are connected as one active mesh.
Read the gas floor
The destination performs more work when it creates an Omniasset for the first time.
function minTransferGas() external view returns (uint128);
function minCreationGas() external view returns (uint128);Use minCreationGas() when isFirstTransfer is true and minTransferGas() otherwise. These values are validation floors, so add a reasonable margin and simulate when possible.
The flag affects only this source-side gas validation. It is not included in the cross-chain payload. On delivery, the Registry decides whether an Omniasset must be deployed.
const minimumGas = await publicClient.readContract({
address: omnisea,
abi: omniseaAbi,
functionName: isFirstTransfer ? "minCreationGas" : "minTransferGas",
});
const receiveGas = minimumGas + minimumGas / 5n;Build lzReceive options
This helper encodes one LayerZero V2 executor lzReceive option with zero destination value:
import type { Hex } from "viem";
const u128 = (value: bigint) => value.toString(16).padStart(32, "0");
export function lzReceiveOptions(gas: bigint): Hex {
return `0x000301002101${u128(gas)}${u128(0n)}`;
}
const options = lzReceiveOptions(receiveGas);Omnisea rejects options with a native drop or nonzero destination receive value. Fund the source call with the returned quote instead.
Plain transfers
LayerZero composition is optional. For a normal transfer, keep it disabled:
const compose = {
composer: zeroAddress,
gasLimit: 0n,
message: "0x",
} as const;If composer is set, gasLimit must be nonzero and the LayerZero options must also provide enough lzCompose gas. Composition executes after the destination token credit, so an application failure does not repeat the mint or unlock.
Quote after building options
Execution options are part of the quoted message. Build them first, then pass the same bytes to quote and send. Changing the gas value changes the LayerZero fee.
See Quote for the complete rule and Deployments for current EIDs and addresses.