zkBridge
  • Polyhedra Network
  • zkBridge: Trustless Cross-chain Bridges Made Practical
    • Introducing zkBridge protocol
    • Block header relay network
    • Updater contract
    • Proof systems of zkBridge
    • zkBridge Research Paper
  • zkLightClient Overview
    • Introduction
    • zkLightClient on LayerZero ​
  • LayerZero zkLightClient Configurations
    • LayerZero V1 zkLightClient Oracle Addresses
    • LayerZero V2 zkLightClient DVN Addresses
    • LayerZero UA Configuration
  • Proving Ethereum Full PoS Consensus in ZK
    • Overview
    • Why Proving Ethereum full consensus?
    • System design for proving Ethereum full consensus
    • Efficient proof system for proving Ethereum full consensus
    • Performance evaluation
    • Concluding remarks
  • Application Use Cases
    • NFT transfer
    • Message passing
  • Tutorial
    • Import and transfer NFTs
  • Code Examples
    • Deploying Cross-chain NFTs
      • Cross-chain ERC-721
      • Cross-chain ERC-1155
Powered by GitBook
On this page
  1. LayerZero zkLightClient Configurations

LayerZero UA Configuration

To configure zkLightClient as the oracle using LayerZero UA, your application needs to modify the default oracle of the L0 Endpoint.

You can use the following code in ILayerZeroEndpoint to set the zkLightClient oracle.

// Remember to call this piece of code in ILayerZeroEndpoint on both the sender chain and receiver chain to set up zkLightClient as the oracle.
/**

* @param dstChainId - the destination chain identifier

* @param zkLightClient - the ZkLightClient address

*/

function setOracle(uint16 dstChainId, address zkLightClient) external {

    uint256 TYPE_ORACLE = 6;

    ILayerZeroEndpoint(lzEndpointAddress).setConfig(

        ILayerZeroEndpoint(lzEndpointAddress).getSendVersion(address(this)),

        dstChainId,

        TYPE_ORACLE,

        abi.encode(zkLightClient)

    );

}

Important: Please remember to set it in both the application of the sender chain and the application of the receiver chain to make sure the message is correctly delivered.

For more information, check out the tutorial here.

PreviousLayerZero V2 zkLightClient DVN AddressesNextOverview

Last updated 8 months ago

ILayerZeroUserApplicationConfigLayerZero Docs
Logo