On this page

Events

Use the LayerZero message GUID to correlate a source transfer with its destination delivery. BridgeMessageSent and BridgeMessageReceived emit the same GUID.

Source events

EventMeaning
OriginalLockedAn original ERC-20 entered the Vault. actualAmount is the amount sent cross-chain.
RepresentationBurnedAn Omniasset was burned on the source chain.
BridgeMessageSentThe Router submitted the LayerZero message and returned its GUID.
event OriginalLocked(
    address indexed originalToken,
    address indexed owner,
    uint256 requestedAmount,
    uint256 actualAmount
);

event RepresentationBurned(
    address indexed representation,
    uint32 indexed originalEid,
    bytes32 indexed originalTokenHash,
    bytes originalToken,
    address owner,
    uint256 amount
);

event BridgeMessageSent(
    bytes32 indexed guid,
    uint32 indexed dstEid,
    uint32 indexed originalEid,
    bytes originalToken,
    uint256 amount,
    bytes recipient,
    uint256 nativeFee,
    uint256 protocolFee
);

For fee-on-transfer originals, requestedAmount and actualAmount can differ. Index actualAmount or the amount in BridgeMessageSent as the transferred amount.

Destination events

EventMeaning
RepresentationDeployedThe destination created this asset's Omniasset contract.
RepresentationMintedThe destination minted an Omniasset to the recipient.
OriginalUnlockedThe original chain released Vault backing to the recipient.
BridgeMessageReceivedThe destination accepted and executed the bridge payload.
event RepresentationDeployed(
    uint32 indexed originalEid,
    bytes32 indexed originalTokenHash,
    bytes originalToken,
    address representation
);

event RepresentationMinted(
    address indexed representation,
    uint32 indexed originalEid,
    bytes32 indexed originalTokenHash,
    bytes originalToken,
    address recipient,
    uint256 amount
);

event OriginalUnlocked(
    address indexed originalToken,
    address indexed recipient,
    uint256 amount
);

event BridgeMessageReceived(
    bytes32 indexed guid,
    uint32 indexed srcEid,
    uint32 indexed originalEid,
    bytes originalToken,
    bytes recipient,
    uint256 amount
);

AssetMetadataSynced can also appear when the destination mints a representation. Token identity and frozen name, symbol, and decimals are explained in Asset identity.

Failure events

Destination execution failures are emitted by OmniseaRouter, not the core contract.

event MessageFailed(
    bytes32 indexed guid,
    uint32 indexed srcEid,
    bytes32 messageHash,
    bytes32 reasonHash
);

event FailedMessageRetried(bytes32 indexed guid, uint32 indexed srcEid);

event FailedMessageRestored(
    bytes32 indexed guid,
    bytes32 indexed restoreGuid,
    uint32 indexed dstEid,
    uint256 nativeFee
);

A source send receipt is not proof of destination delivery. Treat BridgeMessageReceived, FailedMessageRetried, or the final restore delivery as the terminal onchain state. See Transfer lifecycle.

Suggested index keys

Store at least:

  • source chain, source transaction hash, and GUID;
  • source and destination EIDs;
  • original asset identity;
  • recipient and actual amount;
  • destination transaction hash;
  • current state: sent, delivered, failed, retried, or restored.
Introducing Omnipad-Launch tokens between chains