LayerZero Peer Address ↔ bytes32 Converter

Convert an EVM address to and from the left-zero-padded bytes32 form LayerZero V2's setPeer(uint32,bytes32) requires, and generate the ready-to-use setPeer calldata — with eid lookup by chain name, chain ID, or eid.

How to use the LayerZero Peer Address Converter

  1. Enter an address or a bytes32 value — whichever you have, the other is filled in automatically.
  2. Enter the target chain's eid, by searching its name/chain ID or typing the eid directly.
  3. Copy the generated setPeer calldata and submit it through your OApp owner's usual transaction flow.

How This Tool Works

Paste an address into the Address field — it's automatically padded to a 32-byte bytes32 value in the field below, ready for setPeer.

Or paste an existing bytes32 value directly — if its top 12 bytes are zero, the equivalent address is filled in automatically.

In the Target chain (eid) field, type a chain name, chain ID, or eid to search, or enter an eid number directly if you already know it.

Once both a valid bytes32 value and eid are present, the full setPeer(uint32,bytes32) calldata appears — along with a confirmation of which chain the eid resolved to, so you can double-check the target before copying — ready to paste into a Safe (Gnosis Safe) transaction builder's raw data field, cast send --data, or your wallet's hex-data field. If you'd rather use Etherscan's Write Contract tab, which takes _eid and _peer as separate fields instead of raw calldata, just enter the eid and copy the bytes32 value above instead.

Frequently Asked Questions

Advertisement

Related tools

Advertisement