From ff25bbf331944403a76d8071cc863f18384e855f Mon Sep 17 00:00:00 2001 From: fabianhug Date: Wed, 6 May 2026 21:35:39 +0200 Subject: [PATCH] chore: Update examples to require at least 2 DVNs for production OApps; added warnings and documentation links in config files and README.md files across multiple examples. --- examples/lzapp-migration/README.md | 3 +++ examples/lzapp-migration/layerzero.config.ts | 6 ++++++ examples/lzapp-migration/lzapp.config.ts | 6 ++++++ examples/mint-burn-oft-adapter/README.md | 3 +++ .../mint-burn-oft-adapter/layerzero.config.ts | 6 ++++-- examples/oapp-aptos-move/README.md | 3 +++ .../oapp-aptos-move/move.layerzero.config.ts | 6 ++++++ examples/oapp-read/README.md | 3 +++ examples/oapp-read/layerzero.config.ts | 6 ++++++ examples/oapp-solana/README.md | 3 +++ .../oapp-solana/docs/move.layerzero.config.ts | 6 ++++++ examples/oapp-solana/layerzero.config.ts | 4 +++- examples/oapp/README.md | 3 +++ examples/oapp/layerzero.config.ts | 6 ++++-- examples/oft-adapter-aptos-move/README.md | 3 +++ .../move.layerzero.config.ts | 6 ++++++ examples/oft-adapter-initia/README.md | 3 +++ .../move.layerzero.config.ts | 6 ++++++ examples/oft-adapter/README.md | 3 +++ examples/oft-adapter/layerzero.config.ts | 6 ++++-- examples/oft-aptos-move/README.md | 3 +++ .../oft-aptos-move/move.layerzero.config.ts | 6 ++++++ examples/oft-hyperliquid/README.md | 3 +++ examples/oft-hyperliquid/layerzero.config.ts | 4 +++- examples/oft-initia/README.md | 3 +++ examples/oft-initia/move.layerzero.config.ts | 6 ++++++ examples/oft-solana/README.md | 3 +++ .../oft-solana/docs/move.layerzero.config.ts | 6 ++++++ examples/oft-solana/layerzero.config.ts | 4 +++- examples/oft-upgradeable/README.md | 3 +++ examples/oft-upgradeable/layerzero.config.ts | 6 ++++-- examples/oft/README.md | 3 +++ examples/oft/layerzero.config.ts | 6 ++++-- examples/omni-call/README.md | 3 +++ examples/omni-call/layerzero.config.ts | 5 ++++- examples/onft721/README.md | 3 +++ examples/onft721/layerzero.config.ts | 6 ++++-- examples/ovault-evm/README.md | 3 +++ examples/ovault-evm/layerzero.asset.config.ts | 18 ++++++++++++------ examples/ovault-evm/layerzero.share.config.ts | 18 ++++++++++++------ examples/uniswap-read/README.md | 3 +++ examples/uniswap-read/layerzero.config.ts | 6 ++++++ examples/view-pure-read/README.md | 3 +++ examples/view-pure-read/layerzero.config.ts | 6 ++++++ 44 files changed, 193 insertions(+), 28 deletions(-) diff --git a/examples/lzapp-migration/README.md b/examples/lzapp-migration/README.md index 04d47e6775..1d93de349d 100644 --- a/examples/lzapp-migration/README.md +++ b/examples/lzapp-migration/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** Both `lzapp.config.ts` and `layerzero.config.ts` ship a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/lzapp-migration/layerzero.config.ts b/examples/lzapp-migration/layerzero.config.ts index d2aee5e90a..e47eb42157 100644 --- a/examples/lzapp-migration/layerzero.config.ts +++ b/examples/lzapp-migration/layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + // Note: Do not use address for EVM OmniPointHardhat contracts. Contracts are loaded using hardhat-deploy. const sepoliaContract: OmniPointHardhat = { eid: EndpointId.SEPOLIA_TESTNET, /// EndpointV1 diff --git a/examples/lzapp-migration/lzapp.config.ts b/examples/lzapp-migration/lzapp.config.ts index 282695042d..55513a2d15 100644 --- a/examples/lzapp-migration/lzapp.config.ts +++ b/examples/lzapp-migration/lzapp.config.ts @@ -2,6 +2,12 @@ import { EndpointId } from '@layerzerolabs/lz-definitions' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + const sepoliaContract: OmniPointHardhat = { eid: EndpointId.SEPOLIA_TESTNET, /// EndpointV1 contractName: 'LzApp', // Update this if trying out the other contracts, i.e. MyLzApp diff --git a/examples/mint-burn-oft-adapter/README.md b/examples/mint-burn-oft-adapter/README.md index b275e0e7ad..65807d6629 100644 --- a/examples/mint-burn-oft-adapter/README.md +++ b/examples/mint-burn-oft-adapter/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/mint-burn-oft-adapter/layerzero.config.ts b/examples/mint-burn-oft-adapter/layerzero.config.ts index 2b0eb425d6..618ed6641c 100644 --- a/examples/mint-burn-oft-adapter/layerzero.config.ts +++ b/examples/mint-burn-oft-adapter/layerzero.config.ts @@ -36,8 +36,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/oapp-aptos-move/README.md b/examples/oapp-aptos-move/README.md index 9898bfd1b8..54776954ab 100644 --- a/examples/oapp-aptos-move/README.md +++ b/examples/oapp-aptos-move/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `move.layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). + # OApp Aptos Move Example ## Setup and Installation diff --git a/examples/oapp-aptos-move/move.layerzero.config.ts b/examples/oapp-aptos-move/move.layerzero.config.ts index 3a496ce3e0..8a34952ac9 100644 --- a/examples/oapp-aptos-move/move.layerzero.config.ts +++ b/examples/oapp-aptos-move/move.layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oapp-read/README.md b/examples/oapp-read/README.md index 3e8ec495c6..b0735034a4 100644 --- a/examples/oapp-read/README.md +++ b/examples/oapp-read/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production read OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN read channel for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to the `requiredDVNs` array to avoid single-point-of-trust state queries. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oapp-read/layerzero.config.ts b/examples/oapp-read/layerzero.config.ts index 766091b6af..3b0cee864f 100644 --- a/examples/oapp-read/layerzero.config.ts +++ b/examples/oapp-read/layerzero.config.ts @@ -2,6 +2,12 @@ import { ChannelId, EndpointId } from '@layerzerolabs/lz-definitions' import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import { type OAppReadOmniGraphHardhat, type OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN on the read channel for clarity. +// Production read OApps must use at least 2 DVNs to avoid single-point-of-trust state queries. +// Before mainnet, add a non-LayerZero-Labs DVN to `requiredDVNs` below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + const sepoliaContract: OmniPointHardhat = { eid: EndpointId.ARBSEP_V2_TESTNET, contractName: 'ReadPublic', diff --git a/examples/oapp-solana/README.md b/examples/oapp-solana/README.md index e8f19f638a..58992df43f 100644 --- a/examples/oapp-solana/README.md +++ b/examples/oapp-solana/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oapp-solana/docs/move.layerzero.config.ts b/examples/oapp-solana/docs/move.layerzero.config.ts index 11d6a0b953..16df9e15e9 100644 --- a/examples/oapp-solana/docs/move.layerzero.config.ts +++ b/examples/oapp-solana/docs/move.layerzero.config.ts @@ -4,6 +4,12 @@ import { EndpointId } from '@layerzerolabs/lz-definitions' import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oapp-solana/layerzero.config.ts b/examples/oapp-solana/layerzero.config.ts index bad0ae4704..b68905077c 100644 --- a/examples/oapp-solana/layerzero.config.ts +++ b/examples/oapp-solana/layerzero.config.ts @@ -43,7 +43,9 @@ const pathways: TwoWayConfig[] = [ [ arbitrumContract, // Arbitrum contract solanaContract, // Solana contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] [20, 32], // [Arbitrum to Solana outbound confirmations, Solana to Arbitrum outbound confirmations] [SOLANA_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Arbitrum to Solana enforcedOptions, Solana to Arbitrum enforcedOptions ], diff --git a/examples/oapp/README.md b/examples/oapp/README.md index 0cea7853f9..6730534266 100644 --- a/examples/oapp/README.md +++ b/examples/oapp/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oapp/layerzero.config.ts b/examples/oapp/layerzero.config.ts index 5a57c57f3a..7c60c57cd1 100644 --- a/examples/oapp/layerzero.config.ts +++ b/examples/oapp/layerzero.config.ts @@ -34,8 +34,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/oft-adapter-aptos-move/README.md b/examples/oft-adapter-aptos-move/README.md index fff438037f..12e46fda0d 100644 --- a/examples/oft-adapter-aptos-move/README.md +++ b/examples/oft-adapter-aptos-move/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `move.layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). + # OFT Adapter Aptos Move Example ## Setup and Installation diff --git a/examples/oft-adapter-aptos-move/move.layerzero.config.ts b/examples/oft-adapter-aptos-move/move.layerzero.config.ts index 1be4e29411..9c464f0735 100644 --- a/examples/oft-adapter-aptos-move/move.layerzero.config.ts +++ b/examples/oft-adapter-aptos-move/move.layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oft-adapter-initia/README.md b/examples/oft-adapter-initia/README.md index 1c904359b3..90fab87c96 100644 --- a/examples/oft-adapter-initia/README.md +++ b/examples/oft-adapter-initia/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `move.layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). + ## OFT Initia Example The following is a guide for deploying OFT's and wiring them to Initia. diff --git a/examples/oft-adapter-initia/move.layerzero.config.ts b/examples/oft-adapter-initia/move.layerzero.config.ts index 6d21d93d82..0932ac347d 100644 --- a/examples/oft-adapter-initia/move.layerzero.config.ts +++ b/examples/oft-adapter-initia/move.layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oft-adapter/README.md b/examples/oft-adapter/README.md index abd471aac0..9d32d69b48 100644 --- a/examples/oft-adapter/README.md +++ b/examples/oft-adapter/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oft-adapter/layerzero.config.ts b/examples/oft-adapter/layerzero.config.ts index a7a7d1e2a4..9d96a1564d 100644 --- a/examples/oft-adapter/layerzero.config.ts +++ b/examples/oft-adapter/layerzero.config.ts @@ -51,8 +51,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/oft-aptos-move/README.md b/examples/oft-aptos-move/README.md index bda4aefdd8..e503043978 100644 --- a/examples/oft-aptos-move/README.md +++ b/examples/oft-aptos-move/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `move.layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). + # OFT Aptos Move Example ## Setup and Installation diff --git a/examples/oft-aptos-move/move.layerzero.config.ts b/examples/oft-aptos-move/move.layerzero.config.ts index 1be4e29411..9c464f0735 100644 --- a/examples/oft-aptos-move/move.layerzero.config.ts +++ b/examples/oft-aptos-move/move.layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oft-hyperliquid/README.md b/examples/oft-hyperliquid/README.md index 2092b19740..ce2b742b5b 100644 --- a/examples/oft-hyperliquid/README.md +++ b/examples/oft-hyperliquid/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oft-hyperliquid/layerzero.config.ts b/examples/oft-hyperliquid/layerzero.config.ts index c42271d407..74a5dbeeaa 100644 --- a/examples/oft-hyperliquid/layerzero.config.ts +++ b/examples/oft-hyperliquid/layerzero.config.ts @@ -36,7 +36,9 @@ const pathways: TwoWayConfig[] = [ [ hyperevmContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] [1, 20], // [A to B confirmations, B to A confirmations] [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], diff --git a/examples/oft-initia/README.md b/examples/oft-initia/README.md index 34da9f2f95..466957fdba 100644 --- a/examples/oft-initia/README.md +++ b/examples/oft-initia/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `move.layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to every `requiredDVNs` array. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). + ## OFT Initia Example The following is a guide for deploying OFT's and wiring them to Initia. diff --git a/examples/oft-initia/move.layerzero.config.ts b/examples/oft-initia/move.layerzero.config.ts index 8900222a47..a59fa58475 100644 --- a/examples/oft-initia/move.layerzero.config.ts +++ b/examples/oft-initia/move.layerzero.config.ts @@ -3,6 +3,12 @@ import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index ee250f32c1..7d6b65e914 100644 --- a/examples/oft-solana/README.md +++ b/examples/oft-solana/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

diff --git a/examples/oft-solana/docs/move.layerzero.config.ts b/examples/oft-solana/docs/move.layerzero.config.ts index ac5091bb12..a02af8b772 100644 --- a/examples/oft-solana/docs/move.layerzero.config.ts +++ b/examples/oft-solana/docs/move.layerzero.config.ts @@ -4,6 +4,12 @@ import { EndpointId } from '@layerzerolabs/lz-definitions' import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' import { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN in `requiredDVNs` for clarity. +// Production OApps must use at least 2 DVNs. Before mainnet, add a non-LayerZero-Labs +// DVN to each `requiredDVNs` array below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + enum MsgType { SEND = 1, SEND_AND_CALL = 2, diff --git a/examples/oft-solana/layerzero.config.ts b/examples/oft-solana/layerzero.config.ts index d4b336ed84..f782ed2a4e 100644 --- a/examples/oft-solana/layerzero.config.ts +++ b/examples/oft-solana/layerzero.config.ts @@ -53,7 +53,9 @@ export default async function () { [ arbitrumContract, // Chain A contract solanaContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] [15, 32], // [A to B confirmations, B to A confirmations] [SOLANA_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], diff --git a/examples/oft-upgradeable/README.md b/examples/oft-upgradeable/README.md index 52e7ab47c0..ff4c787798 100644 --- a/examples/oft-upgradeable/README.md +++ b/examples/oft-upgradeable/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oft-upgradeable/layerzero.config.ts b/examples/oft-upgradeable/layerzero.config.ts index 36aacd130a..09c9873e98 100644 --- a/examples/oft-upgradeable/layerzero.config.ts +++ b/examples/oft-upgradeable/layerzero.config.ts @@ -35,8 +35,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/oft/README.md b/examples/oft/README.md index 083acb54c1..2d04bfb537 100644 --- a/examples/oft/README.md +++ b/examples/oft/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/oft/layerzero.config.ts b/examples/oft/layerzero.config.ts index 377076a00e..a375a233eb 100644 --- a/examples/oft/layerzero.config.ts +++ b/examples/oft/layerzero.config.ts @@ -36,8 +36,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/omni-call/README.md b/examples/omni-call/README.md index 7eaf551523..e568c9d18a 100644 --- a/examples/omni-call/README.md +++ b/examples/omni-call/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/omni-call/layerzero.config.ts b/examples/omni-call/layerzero.config.ts index bfd8de9087..33509b1da4 100644 --- a/examples/omni-call/layerzero.config.ts +++ b/examples/omni-call/layerzero.config.ts @@ -15,8 +15,11 @@ const baseContract: OmniPointHardhat = { export default async function () { // note: pathways declared here are automatically bidirectional // if you declare A,B there's no need to declare B,A + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + // [1, 1] confirmations is fine for local dev; production typically uses 15+ on each side. const connections = await generateConnectionsConfig([ - [arbitrumContract, baseContract, [['LayerZero Labs'], []], [1, 1], [undefined, undefined]], + [arbitrumContract, baseContract, [['LayerZero Labs', ''], []], [1, 1], [undefined, undefined]], ]) return { diff --git a/examples/onft721/README.md b/examples/onft721/README.md index 10ec191cff..d12693576c 100644 --- a/examples/onft721/README.md +++ b/examples/onft721/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/onft721/layerzero.config.ts b/examples/onft721/layerzero.config.ts index 6580359405..bad0d4f722 100644 --- a/examples/onft721/layerzero.config.ts +++ b/examples/onft721/layerzero.config.ts @@ -36,8 +36,10 @@ const pathways: TwoWayConfig[] = [ [ baseContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/ovault-evm/README.md b/examples/ovault-evm/README.md index 97279eae8f..2f1ea96361 100644 --- a/examples/ovault-evm/README.md +++ b/examples/ovault-evm/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production OApps must use at least 2 DVNs.** This example's `layerzero.asset.config.ts` and `layerzero.share.config.ts` ship a single-DVN default for clarity. Before deploying to mainnet, replace `` with a non-LayerZero-Labs DVN provider on every pathway. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/ovault-evm/layerzero.asset.config.ts b/examples/ovault-evm/layerzero.asset.config.ts index 194a785261..2744beb98c 100644 --- a/examples/ovault-evm/layerzero.asset.config.ts +++ b/examples/ovault-evm/layerzero.asset.config.ts @@ -49,22 +49,28 @@ const pathways: TwoWayConfig[] = [ [ optimismContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], [ optimismContract, // Chain A contract baseContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], [ arbitrumContract, // Chain A contract baseContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/ovault-evm/layerzero.share.config.ts b/examples/ovault-evm/layerzero.share.config.ts index c166265028..f5c31aa0e3 100644 --- a/examples/ovault-evm/layerzero.share.config.ts +++ b/examples/ovault-evm/layerzero.share.config.ts @@ -49,22 +49,28 @@ const pathways: TwoWayConfig[] = [ [ optimismContract, // Chain A contract arbitrumContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], [ optimismContract, // Chain A contract baseContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], [ arbitrumContract, // Chain A contract baseContract, // Chain B contract - [['LayerZero Labs'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] - [1, 1], // [A to B confirmations, B to A confirmations] + // Replace with a non-LayerZero-Labs DVN provider for this pathway. + // See https://docs.layerzero.network/v2/deployments/dvn-addresses for available providers. + [['LayerZero Labs', ''], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ] + [1, 1], // [A to B confirmations, B to A confirmations] — production typically uses 15+ [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions ], ] diff --git a/examples/uniswap-read/README.md b/examples/uniswap-read/README.md index 3e8ec495c6..b0735034a4 100644 --- a/examples/uniswap-read/README.md +++ b/examples/uniswap-read/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production read OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN read channel for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to the `requiredDVNs` array to avoid single-point-of-trust state queries. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/uniswap-read/layerzero.config.ts b/examples/uniswap-read/layerzero.config.ts index 01c979a68e..0b352b7ed7 100644 --- a/examples/uniswap-read/layerzero.config.ts +++ b/examples/uniswap-read/layerzero.config.ts @@ -2,6 +2,12 @@ import { ChannelId, EndpointId } from '@layerzerolabs/lz-definitions' import type { OAppReadOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN on the read channel for clarity. +// Production read OApps must use at least 2 DVNs to avoid single-point-of-trust state queries. +// Before mainnet, add a non-LayerZero-Labs DVN to `requiredDVNs` below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + const arbitrumContract: OmniPointHardhat = { eid: EndpointId.ARBITRUM_V2_MAINNET, contractName: 'UniswapV3QuoteDemo', diff --git a/examples/view-pure-read/README.md b/examples/view-pure-read/README.md index 4864942e7f..512b59c336 100644 --- a/examples/view-pure-read/README.md +++ b/examples/view-pure-read/README.md @@ -1,3 +1,6 @@ +> [!WARNING] +> **Production read OApps must use at least 2 DVNs.** This example's `layerzero.config.ts` ships a single-DVN read channel for clarity. Before deploying to mainnet, add a non-LayerZero-Labs DVN to the `requiredDVNs` array to avoid single-point-of-trust state queries. See the [Production DVN Configuration](https://docs.layerzero.network/v2/deployments/dvn-addresses) reference and the [migration guide for existing 1-of-1 OApps](https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn). +

LayerZero diff --git a/examples/view-pure-read/layerzero.config.ts b/examples/view-pure-read/layerzero.config.ts index 9ff9f84841..7e44f30290 100644 --- a/examples/view-pure-read/layerzero.config.ts +++ b/examples/view-pure-read/layerzero.config.ts @@ -2,6 +2,12 @@ import { ChannelId, EndpointId } from '@layerzerolabs/lz-definitions' import type { OAppReadOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' +// TODO: This example uses a single LayerZero Labs DVN on the read channel for clarity. +// Production read OApps must use at least 2 DVNs to avoid single-point-of-trust state queries. +// Before mainnet, add a non-LayerZero-Labs DVN to `requiredDVNs` below. See: +// - DVN providers: https://docs.layerzero.network/v2/deployments/dvn-addresses +// - Migration guide: https://docs.layerzero.network/v2/get-started/migrating-from-single-dvn + const arbitrumContract: OmniPointHardhat = { eid: EndpointId.ARBSEP_V2_TESTNET, contractName: 'ReadViewOrPure',