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). +
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 `
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
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 `
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
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
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
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
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
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
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
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
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