Skip to content

Commit 12ff75e

Browse files
authored
Merge branch 'main' into lockfiles-update/main
2 parents 5d245ba + 4973ba8 commit 12ff75e

122 files changed

Lines changed: 3519 additions & 4388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-approve-layerzero-bot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Assert changed files
2929
id: files
30-
uses: tj-actions/changed-files@v44
30+
uses: tj-actions/changed-files@v46.0.1
3131
with:
3232
files: |
3333
**/package.json

.github/workflows/on-main.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ concurrency:
2323
cancel-in-progress: false
2424

2525
jobs:
26-
check:
27-
name: Check code
28-
uses: ./.github/workflows/reusable-test.yaml
29-
secrets: inherit
30-
3126
publish:
3227
name: Publish NPM packages
33-
needs: check
3428
uses: ./.github/workflows/reusable-publish.yaml
3529
secrets: inherit

examples/lzapp-migration/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @layerzerolabs/lzapp-migration-example
22

3+
## 0.3.10
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [6afd57b]
8+
- Updated dependencies [6afd57b]
9+
- Updated dependencies [6afd57b]
10+
- @layerzerolabs/ua-devtools-evm-hardhat@10.0.0
11+
- @layerzerolabs/devtools-solana@3.1.0
12+
- @layerzerolabs/protocol-devtools@4.0.0
13+
- @layerzerolabs/ua-devtools-solana@9.0.0
14+
- @layerzerolabs/ua-devtools@6.0.0
15+
- @layerzerolabs/ua-devtools-evm@8.0.0
16+
317
## 0.3.9
418

519
### Patch Changes

examples/lzapp-migration/layerzero.config.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ const config: OAppOmniGraphHardhat = {
4242
ulnConfig: {
4343
confirmations: BigInt(15),
4444
requiredDVNs: ['0x8eebf8b423b73bfca51a1db4b7354aa0bfca9193'], // LayerZero Labs DVN
45-
optionalDVNs: [],
46-
optionalDVNThreshold: 0,
45+
// optionalDVNs omitted → inherit the default. To pin "no optional DVNs"
46+
// explicitly, set `optionalDVNs: []` (it now serializes to the NIL sentinel).
4747
},
4848
},
4949
receiveConfig: {
5050
ulnConfig: {
5151
confirmations: BigInt(32),
5252
requiredDVNs: ['0x8eebf8b423b73bfca51a1db4b7354aa0bfca9193'],
53-
optionalDVNs: [],
54-
optionalDVNThreshold: 0,
53+
// optionalDVNs omitted → inherit the default. To pin "no optional DVNs"
54+
// explicitly, set `optionalDVNs: []` (it now serializes to the NIL sentinel).
5555
},
5656
},
5757
},
@@ -85,11 +85,9 @@ const config: OAppOmniGraphHardhat = {
8585
requiredDVNs: [
8686
'4VDjp6XQaxoZf5RGwiPU9NR1EXSZn2TP4ATMmiSzLfhb', // LayerZero
8787
],
88-
// The address of the DVNs you will pay to verify a sent message on the source chain ).
89-
// The destination tx will wait until the configured threshold of `optionalDVNs` verify a message.
90-
optionalDVNs: [],
91-
// The number of `optionalDVNs` that need to successfully verify the message for it to be considered Verified.
92-
optionalDVNThreshold: 0,
88+
// optionalDVNs omitted → inherit the default. To pin "no optional DVNs"
89+
// explicitly, set `optionalDVNs: []` (it now serializes to the NIL sentinel),
90+
// with `optionalDVNThreshold: 0`.
9391
},
9492
},
9593
// Optional Receive Configuration
@@ -103,11 +101,9 @@ const config: OAppOmniGraphHardhat = {
103101
requiredDVNs: [
104102
'4VDjp6XQaxoZf5RGwiPU9NR1EXSZn2TP4ATMmiSzLfhb', // LayerZero
105103
],
106-
// The address of the DVNs you will pay to verify a sent message on the source chain ).
107-
// The destination tx will wait until the configured threshold of `optionalDVNs` verify a message.
108-
optionalDVNs: [],
109-
// The number of `optionalDVNs` that need to successfully verify the message for it to be considered Verified.
110-
optionalDVNThreshold: 0,
104+
// optionalDVNs omitted → inherit the default. To pin "no optional DVNs"
105+
// explicitly, set `optionalDVNs: []` (it now serializes to the NIL sentinel),
106+
// with `optionalDVNThreshold: 0`.
111107
},
112108
},
113109
enforcedOptions: [

examples/lzapp-migration/lzapp.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ const config: OAppOmniGraphHardhat = {
4040
ulnConfig: {
4141
confirmations: BigInt(1),
4242
requiredDVNs: ['0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'], // LayerZero Labs DVN for Arbitrum Sepolia
43-
optionalDVNs: [],
44-
optionalDVNThreshold: 0,
43+
// optionalDVNs omitted → inherit the default. Set `optionalDVNs: []` to
44+
// pin "no optional DVNs" (it now serializes to the NIL sentinel).
4545
},
4646
},
4747
receiveConfig: {
4848
ulnConfig: {
4949
confirmations: BigInt(1),
5050
requiredDVNs: ['0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'], // LayerZero Labs DVN for Arbitrum Sepolia
51-
optionalDVNs: [],
52-
optionalDVNThreshold: 0,
51+
// optionalDVNs omitted → inherit the default. Set `optionalDVNs: []` to
52+
// pin "no optional DVNs" (it now serializes to the NIL sentinel).
5353
},
5454
},
5555
},
@@ -71,16 +71,16 @@ const config: OAppOmniGraphHardhat = {
7171
ulnConfig: {
7272
confirmations: BigInt(1),
7373
requiredDVNs: ['0x8eebf8b423b73bfca51a1db4b7354aa0bfca9193'], // LayerZero Labs DVN on Ethereum Sepolia
74-
optionalDVNs: [],
75-
optionalDVNThreshold: 0,
74+
// optionalDVNs omitted → inherit the default. Set `optionalDVNs: []` to
75+
// pin "no optional DVNs" (it now serializes to the NIL sentinel).
7676
},
7777
},
7878
receiveConfig: {
7979
ulnConfig: {
8080
confirmations: BigInt(1),
8181
requiredDVNs: ['0x8eebf8b423b73bfca51a1db4b7354aa0bfca9193'], // LayerZero Labs DVN on Ethereum Sepolia
82-
optionalDVNs: [],
83-
optionalDVNThreshold: 0,
82+
// optionalDVNs omitted → inherit the default. Set `optionalDVNs: []` to
83+
// pin "no optional DVNs" (it now serializes to the NIL sentinel).
8484
},
8585
},
8686
},

examples/lzapp-migration/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/lzapp-migration-example",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
@@ -26,17 +26,17 @@
2626
"dependencies": {
2727
"@layerzerolabs/devtools": "^2.0.4",
2828
"@layerzerolabs/devtools-evm-hardhat": "^4.0.4",
29-
"@layerzerolabs/devtools-solana": "^3.0.5",
29+
"@layerzerolabs/devtools-solana": "^3.1.0",
3030
"@layerzerolabs/export-deployments": "^0.0.16",
3131
"@layerzerolabs/io-devtools": "^0.3.2",
3232
"@layerzerolabs/lz-evm-sdk-v1": "^3.0.49",
3333
"@layerzerolabs/oft-v2-solana-sdk": "^3.0.136",
34-
"@layerzerolabs/protocol-devtools": "^3.0.2",
34+
"@layerzerolabs/protocol-devtools": "^4.0.0",
3535
"@layerzerolabs/solidity-examples": "^1.1.0",
36-
"@layerzerolabs/ua-devtools": "^5.0.2",
37-
"@layerzerolabs/ua-devtools-evm": "^7.0.1",
38-
"@layerzerolabs/ua-devtools-evm-hardhat": "^9.0.1",
39-
"@layerzerolabs/ua-devtools-solana": "^8.0.5",
36+
"@layerzerolabs/ua-devtools": "^6.0.0",
37+
"@layerzerolabs/ua-devtools-evm": "^8.0.0",
38+
"@layerzerolabs/ua-devtools-evm-hardhat": "^10.0.0",
39+
"@layerzerolabs/ua-devtools-solana": "^9.0.0",
4040
"@metaplex-foundation/mpl-token-metadata": "^3.2.1",
4141
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
4242
"@metaplex-foundation/umi": "^0.9.2",
@@ -64,7 +64,7 @@
6464
"@layerzerolabs/solhint-config": "^3.0.12",
6565
"@layerzerolabs/test-devtools-evm-foundry": "~8.0.1",
6666
"@layerzerolabs/toolbox-foundry": "~0.1.12",
67-
"@layerzerolabs/toolbox-hardhat": "~0.6.13",
67+
"@layerzerolabs/toolbox-hardhat": "~0.6.14",
6868
"@nomicfoundation/hardhat-ethers": "^3.0.5",
6969
"@nomiclabs/hardhat-ethers": "^2.2.3",
7070
"@openzeppelin/contracts": "^4.8.2",

examples/lzapp-migration/tasks/common/taskHelper.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export async function getEpv1SendUlnConfig(
100100
const ulnConfig: Uln302UlnConfig = {
101101
confirmations: ulnConfigRaw.confirmations.toNumber(),
102102
requiredDVNs: ulnConfigRaw.requiredDVNs,
103+
requiredDVNCount: ulnConfigRaw.requiredDVNCount,
103104
optionalDVNs: ulnConfigRaw.optionalDVNs,
105+
optionalDVNCount: ulnConfigRaw.optionalDVNCount,
104106
optionalDVNThreshold: ulnConfigRaw.optionalDVNThreshold,
105107
}
106108

@@ -141,7 +143,9 @@ export async function getEpv1ReceiveUlnConfig(
141143
const ulnConfig: Uln302UlnConfig = {
142144
confirmations: ulnConfigRaw.confirmations.toNumber(),
143145
requiredDVNs: ulnConfigRaw.requiredDVNs,
146+
requiredDVNCount: ulnConfigRaw.requiredDVNCount,
144147
optionalDVNs: ulnConfigRaw.optionalDVNs,
148+
optionalDVNCount: ulnConfigRaw.optionalDVNCount,
145149
optionalDVNThreshold: ulnConfigRaw.optionalDVNThreshold,
146150
}
147151

@@ -330,7 +334,9 @@ export async function getEpv1DefaultSendConfig(
330334
const emptyUlnConfig: Uln302UlnConfig = {
331335
confirmations: BigInt(0),
332336
requiredDVNs: [zeroAddress],
337+
requiredDVNCount: 0,
333338
optionalDVNs: [],
339+
optionalDVNCount: 0,
334340
optionalDVNThreshold: 0,
335341
}
336342

@@ -348,7 +354,9 @@ export async function getEpv1DefaultSendConfig(
348354
const ulnConfig: Uln302UlnConfig = {
349355
confirmations: ulnConfigRaw.confirmations.toNumber(),
350356
requiredDVNs: ulnConfigRaw.requiredDVNs,
357+
requiredDVNCount: ulnConfigRaw.requiredDVNCount,
351358
optionalDVNs: ulnConfigRaw.optionalDVNs,
359+
optionalDVNCount: ulnConfigRaw.optionalDVNCount,
352360
optionalDVNThreshold: ulnConfigRaw.optionalDVNThreshold,
353361
}
354362

@@ -386,7 +394,9 @@ export async function getEpv1DefaultReceiveConfig(
386394
const emptyUlnConfig: Uln302UlnConfig = {
387395
confirmations: BigInt(0),
388396
requiredDVNs: [zeroAddress],
397+
requiredDVNCount: 0,
389398
optionalDVNs: [],
399+
optionalDVNCount: 0,
390400
optionalDVNThreshold: 0,
391401
}
392402

@@ -404,7 +414,9 @@ export async function getEpv1DefaultReceiveConfig(
404414
const ulnConfig: Uln302UlnConfig = {
405415
confirmations: ulnConfigRaw.confirmations.toNumber(),
406416
requiredDVNs: ulnConfigRaw.requiredDVNs,
417+
requiredDVNCount: ulnConfigRaw.requiredDVNCount,
407418
optionalDVNs: ulnConfigRaw.optionalDVNs,
419+
optionalDVNCount: ulnConfigRaw.optionalDVNCount,
408420
optionalDVNThreshold: ulnConfigRaw.optionalDVNThreshold,
409421
}
410422

@@ -471,7 +483,15 @@ function encodeExecutorConfig(config: Uln302ExecutorConfig): string {
471483

472484
/**
473485
* Encodes the UlnConfig into ABI-encoded bytes.
474-
* @param config Uln302UlnConfig object
486+
*
487+
* The DVN counts are derived from the array lengths rather than read from the config's
488+
* `requiredDVNCount`/`optionalDVNCount`. That is only valid because the callers here feed
489+
* RESOLVED configs (read via `getConfig` -> `getUlnConfig`, which collapses any stored NIL
490+
* sentinel to 0 before returning). Uln301 inherits `UlnBase`, so its stored config CAN hold a
491+
* NIL sentinel — if this were ever pointed at a raw/stored config (`getAppUlnConfig`), the
492+
* length derivation would silently drop that sentinel. Keep it on the resolved-config path.
493+
*
494+
* @param config Uln302UlnConfig object (resolved, not raw/stored)
475495
* @returns ABI-encoded string
476496
*/
477497
function encodeUlnConfig(config: Uln302UlnConfig): string {
@@ -481,10 +501,10 @@ function encodeUlnConfig(config: Uln302UlnConfig): string {
481501
],
482502
[
483503
[
484-
config.confirmations,
485-
config.requiredDVNs.length,
486-
config.optionalDVNs.length,
487-
config.optionalDVNThreshold,
504+
config.confirmations ?? 0,
505+
(config.requiredDVNs || []).length,
506+
(config.optionalDVNs || []).length,
507+
config.optionalDVNThreshold ?? 0,
488508
config.requiredDVNs || [],
489509
config.optionalDVNs || [],
490510
],

examples/mint-burn-oft-adapter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.148",
3131
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.148",
3232
"@layerzerolabs/lz-v2-utilities": "^3.0.148",
33-
"@layerzerolabs/metadata-tools": "^3.0.0",
33+
"@layerzerolabs/metadata-tools": "^4.0.0",
3434
"@layerzerolabs/oapp-evm": "^0.4.1",
3535
"@layerzerolabs/oft-evm": "^4.0.1",
3636
"@layerzerolabs/prettier-config-next": "^2.3.39",
3737
"@layerzerolabs/solhint-config": "^3.0.12",
3838
"@layerzerolabs/test-devtools-evm-foundry": "~8.0.1",
3939
"@layerzerolabs/toolbox-foundry": "~0.1.12",
40-
"@layerzerolabs/toolbox-hardhat": "~0.6.13",
40+
"@layerzerolabs/toolbox-hardhat": "~0.6.14",
4141
"@nomicfoundation/hardhat-ethers": "^3.0.5",
4242
"@nomiclabs/hardhat-ethers": "^2.2.3",
4343
"@openzeppelin/contracts": "^5.0.2",

examples/oapp-aptos-move/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@babel/core": "^7.23.9",
3737
"@jest/globals": "^29.7.0",
3838
"@layerzerolabs/devtools-extensible-cli": "^0.0.7",
39-
"@layerzerolabs/devtools-move": "^1.0.17",
39+
"@layerzerolabs/devtools-move": "^2.0.0",
4040
"@layerzerolabs/eslint-config-next": "~2.3.39",
4141
"@layerzerolabs/lz-config-types": "^3.0.15",
4242
"@layerzerolabs/lz-definitions": "^3.0.148",
@@ -55,7 +55,7 @@
5555
"@layerzerolabs/solhint-config": "^3.0.12",
5656
"@layerzerolabs/test-devtools-evm-foundry": "~8.0.1",
5757
"@layerzerolabs/toolbox-foundry": "~0.1.12",
58-
"@layerzerolabs/toolbox-hardhat": "~0.6.13",
58+
"@layerzerolabs/toolbox-hardhat": "~0.6.14",
5959
"@nomicfoundation/hardhat-ethers": "^3.0.5",
6060
"@nomiclabs/hardhat-ethers": "^2.2.3",
6161
"@openzeppelin/contracts": "^5.0.2",

examples/oapp-solana/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@coral-xyz/anchor": "^0.31.1",
3636
"@layerzerolabs/devtools": "~2.0.4",
3737
"@layerzerolabs/devtools-evm-hardhat": "^4.0.4",
38-
"@layerzerolabs/devtools-solana": "~3.0.6",
38+
"@layerzerolabs/devtools-solana": "~3.1.0",
3939
"@layerzerolabs/eslint-config-next": "~2.3.39",
4040
"@layerzerolabs/io-devtools": "~0.3.2",
4141
"@layerzerolabs/lz-definitions": "^3.0.86",
@@ -44,19 +44,19 @@
4444
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.86",
4545
"@layerzerolabs/lz-solana-sdk-v2": "^3.0.118",
4646
"@layerzerolabs/lz-v2-utilities": "^3.0.86",
47-
"@layerzerolabs/metadata-tools": "^3.0.0",
47+
"@layerzerolabs/metadata-tools": "^4.0.0",
4848
"@layerzerolabs/oapp-evm": "^0.4.1",
4949
"@layerzerolabs/prettier-config-next": "^2.3.39",
50-
"@layerzerolabs/protocol-devtools": "^3.0.2",
51-
"@layerzerolabs/protocol-devtools-solana": "^8.0.5",
50+
"@layerzerolabs/protocol-devtools": "^4.0.0",
51+
"@layerzerolabs/protocol-devtools-solana": "^9.0.0",
5252
"@layerzerolabs/solhint-config": "^3.0.12",
5353
"@layerzerolabs/test-devtools-evm-foundry": "~8.0.1",
5454
"@layerzerolabs/toolbox-foundry": "~0.1.12",
55-
"@layerzerolabs/toolbox-hardhat": "~0.6.13",
56-
"@layerzerolabs/ua-devtools": "~5.0.2",
57-
"@layerzerolabs/ua-devtools-evm": "~7.0.1",
58-
"@layerzerolabs/ua-devtools-evm-hardhat": "~9.0.1",
59-
"@layerzerolabs/ua-devtools-solana": "~8.0.5",
55+
"@layerzerolabs/toolbox-hardhat": "~0.6.14",
56+
"@layerzerolabs/ua-devtools": "~6.0.0",
57+
"@layerzerolabs/ua-devtools-evm": "~8.0.0",
58+
"@layerzerolabs/ua-devtools-evm-hardhat": "~10.0.0",
59+
"@layerzerolabs/ua-devtools-solana": "~9.0.0",
6060
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
6161
"@metaplex-foundation/umi": "^0.9.2",
6262
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",

0 commit comments

Comments
 (0)