Skip to content

Commit 4b22dd7

Browse files
committed
set test configurations
1 parent ea612f2 commit 4b22dd7

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

helper-hardhat-config.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ export const networkConfig: networkConfigInfo = {
115115
confirmations: 1,
116116
requiredDVNCount: 1,
117117
requiredDVNs: [
118-
'0x88b27057a9e00c5f05dda29241027aff63f9e6e0'
118+
'0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'
119+
]
120+
},
121+
sonicTestnet: {
122+
confirmations: 1,
123+
requiredDVNCount: 1,
124+
requiredDVNs: [
125+
'0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'
119126
]
120127
}
121128
},
@@ -124,7 +131,14 @@ export const networkConfig: networkConfigInfo = {
124131
confirmations: 1,
125132
requiredDVNCount: 1,
126133
requiredDVNs: [
127-
'0x88b27057a9e00c5f05dda29241027aff63f9e6e0'
134+
'0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'
135+
]
136+
},
137+
sonicTestnet: {
138+
confirmations: 1,
139+
requiredDVNCount: 1,
140+
requiredDVNs: [
141+
'0x53f488e93b4f1b60e8e83aa374dbe1780a1ee8a8'
128142
]
129143
}
130144
}

tasks/lz-set-config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { abi: EndpoingV2ABI } = require("@layerzerolabs/lz-evm-protocol-v2/artifa
66

77
// run as "npx hardhat --network arbitrumSepolia lz-set-config --dest baseSepolia"
88
task("lz-set-config", "Set config for LZ network to dest network")
9-
.addParam("dest", "destination network")
9+
.addOptionalParam("dest", "destination network")
1010
.setAction(async (taskArgs, hre) => {
1111
if (hre.network.name === "hardhat") {
1212
console.warn(
@@ -77,8 +77,8 @@ task("lz-set-config", "Set config for LZ network to dest network")
7777
const values = []
7878
for(let i = 0; i < lzPeers.length; i++) {
7979
const peerNetwork = lzPeers[i]
80-
if (network.name != peerNetwork) {
81-
80+
const setNetwork = taskArgs.dest == peerNetwork || (!taskArgs.dest && network.name != peerNetwork)
81+
if (setNetwork) {
8282
const peerCfg = networkConfig[peerNetwork]
8383
const destEid = Number(peerCfg.lzEid || "0");
8484
if(destEid == 0) continue;
@@ -199,7 +199,7 @@ task("lz-set-config", "Set config for LZ network to dest network")
199199
if(tx && tx.transactionHash) {
200200
console.log("execute batch setConfig() at", tx.transactionHash)
201201
}
202-
console.log("----------------------------------------------------")/**/
202+
console.log("----------------------------------------------------")
203203
}
204204
);
205205

0 commit comments

Comments
 (0)