# LayerZero Integration (/docs/builders/mainnet-layerzero)

## Overview

RISE Mainnet is integrated with LayerZero V1 and V2 for cross-chain messaging. This page provides the deployment addresses and configuration details for both versions.

## Chain Details

| Parameter                  | Value             |
| -------------------------- | ----------------- |
| Chain ID                   | `4153`            |
| LayerZero Endpoint ID (V1) | `401`             |
| LayerZero Endpoint ID (V2) | `30401`           |
| Chain Key                  | `rise-mainnet`    |
| Native Currency            | ETH               |
| Block Time                 | 900ms (0.9s)      |
| Chain Type                 | EVM (OP Stack L2) |
| Status                     | ACTIVE            |

## LayerZero V1 Deployments

### Core Contracts

| Contract            | Address                                      |
| ------------------- | -------------------------------------------- |
| Endpoint            | `0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7` |
| Ultra Light Node V2 | `0x38dE71124f7a447a01D67945a51eDcE9FF491251` |
| Treasury V2         | `0x980205D352F198748B626f6f7C38A8a5663Ec981` |
| Relayer V2          | `0xA658742d33ebd2ce2F0bdFf73515Aa797Fd161D9` |

### Validators

| Contract         | Address                                      |
| ---------------- | -------------------------------------------- |
| FP Validator     | `0xC1b15d3B262bEeC0e3565C11C9e0F6134BdaCB36` |
| MPT Validator 01 | `0x2D61DCDD36F10b22176E0433B86F74567d529aAa` |

### ULN Contracts

| Contract        | Address                                      |
| --------------- | -------------------------------------------- |
| Send ULN 301    | `0x37aaaf95887624a363effB7762D489E3C05c2a02` |
| Receive ULN 301 | `0x15e51701F245F6D5bd0FEE87bCAf55B0841451B3` |
| Nonce Contract  | `0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675` |

## LayerZero V2 Deployments

### Core Contracts

| Contract         | Address                                      |
| ---------------- | -------------------------------------------- |
| Endpoint V2      | `0x6F475642a6e85809B1c36Fa62763669b1b48DD5B` |
| Endpoint V2 View | `0xAaB5A48CFC03Efa9cC34A2C1aAcCCB84b4b770e4` |
| Executor         | `0x4208D6E27538189bB48E603D6123A94b8Abe0A0b` |
| LZ Executor      | `0x41Bdb4aa4A63a5b2Efc531858d3118392B1A1C3d` |

### ULN Contracts

| Contract        | Address                                      |
| --------------- | -------------------------------------------- |
| Send ULN 302    | `0xC39161c743D0307EB9BCc9FEF03eeb9Dc4802de7` |
| Receive ULN 302 | `0xe1844c5D63a9543023008D332Bd3d2e6f1FE1043` |

### Other Contracts

| Contract              | Address                                      |
| --------------------- | -------------------------------------------- |
| Blocked Message Lib   | `0xc1ce56b2099ca68720592583c7984cab4b6d7e7a` |
| Dead DVN (Deprecated) | `0x6788f52439ACA6BFF597d3eeC2DC9a44B8FEE842` |

## Decentralized Verification Networks (DVNs)

### Active DVNs

| DVN            | Address                                      | Version |
| -------------- | -------------------------------------------- | ------- |
| LayerZero Labs | `0x282b3386571f7f794450d5789911a9804fa346b4` | V2      |
| Nethermind     | `0x8d77d35604a9f37f488e41d1d916b2a0088f82dd` | V2      |
| Horizen        | `0x276e6b1138d2d49c0cda86658765d12ef84550c1` | V2      |

### Deprecated DVNs

| DVN       | Address                                      | Version | Status     |
| --------- | -------------------------------------------- | ------- | ---------- |
| LZDeadDVN | `0x6788f52439aca6bff597d3eec2dc9a44b8fee842` | V2      | Deprecated |

## Usage

### LayerZero V1

```solidity
interface ILayerZeroEndpoint {
    function send(
        uint16 _dstChainId,
        bytes calldata _destination,
        bytes calldata _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes calldata _adapterParams
    ) external payable;
}

// Example
ILayerZeroEndpoint endpoint = ILayerZeroEndpoint(0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7);
```

### LayerZero V2

```solidity
interface ILayerZeroEndpointV2 {
    function send(
        MessagingParams calldata _params,
        address _refundAddress
    ) external payable returns (MessagingReceipt memory);
}

// Example
ILayerZeroEndpointV2 endpoint = ILayerZeroEndpointV2(0x6F475642a6e85809B1c36Fa62763669b1b48DD5B);
```

## Resources

* [LayerZero Documentation](https://docs.layerzero.network/)
* [LayerZero V2 Docs](https://docs.layerzero.network/v2)
* [LayerZero Scan](https://layerzeroscan.com/)
