Cross-Chain Messaging

ZetaChain’s cross-chain messaging lets you send value and data between chains in a single step, and build dApps that span across multiple chains.

Start Building →

How does cross-chain messaging work?

Contracts on any connected chain can send data and value to other contracts on other chains through ZetaChain’s Connector contracts. ZetaChain’s cross-chain messaging also lets you build value-transfer apps that don’t create new wrapped assets and risk for users. Implement "sender", "receiver" and "revert" functions to get intuitive, traceable, and revertible behavior so your users don’t get stuck or risk their funds.

Build Universal dApps →

contract YourContract is ZetaInteractor, ZetaReceiver {
  constructor(address connectorAddress)
  ZetaInteractor(connectorAddress) {}

  function sendMessage(uint256 chainId) external payable {
    connector.send(
      ZetaInterfaces.SendInput({
        destinationChainId: chainId,
        destinationAddress: interactorsByChainId[chainId],
        destinationGasLimit: 300000,
        message: abi.encode("Hello, Cross-Chain World!"),
        zetaValueAndGas: msg.value,
        zetaParams: abi.encode("")
      })
    );
  }

  function onZetaMessage(
    ZetaInterfaces.ZetaMessage calldata zetaMessage
  ) external override isValidMessageCall(zetaMessage) {
    // Handle the message
  }

  function onZetaRevert(
    ZetaInterfaces.ZetaRevert calldata zetaRevert
  ) external override isValidRevertCall(zetaRevert) {
    // Handle the revert
  }
}

Built for an unparalleled developer experience

Easily pass data to other chains

Speed where it matters

Use your existing contracts

Deploy contracts on two or more connected chains implementing connector calls. Simple functions can send arbitrary data and value message between blockchains to synchronize state, exchange value, or interact agnostically.

Call a simple function to send and swap value, or NFTs to an address on a different chain. The message is received by ZetaChain and signed on the destination in one-step, and there’s no need to update state back on the source chain.

With message passing, you can build your app logic across all the chains you need. ZetaChain acts as a message verifier and relayer, which makes it easy to use your existing infrastructure and achieve connectivity.

Working with Cross-chain Messaging

Explore Universal Apps

Explore what others are building as Universal apps on ZetaChain.

Sushi

DeFi

A leading multi-chain DEX deployed across 30+ blockchains, cooking up a community-built, open-source ecosystem of all the DeFi tools you need.

Dmail Network

Social

Dmail Network is an AI-powered decentralized communication infrastructure built to provide encrypted emails, unified notifications, and targeted marketing across multiple chains and dApps for users, developers, marketers and influencers.

KaratDAO

Social

The largest ZK ID infrastructure with 350,000 onchain paying users and multiple DApps built on. Data, Social, powered by MPC/ZK technologies.

Have questions?
Check out FAQ or chat with an expert.