LayerZero UA Configuration
// 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)
);
}Last updated