Skip to content

Commit 0d8a56f

Browse files
committed
add correct comments to lz-set-config and lz-get-config, and add notice about lz-set-delegate in README
1 parent 1d725f4 commit 0d8a56f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ GammaSwap token used to secure liquidation and rebalancing logic in exchange for
3232

3333
# How to set DVNs, SendLib, ReceiveLib, and Executors
3434

35+
*The delegate of GS token has to also be the timelockController. Otherwise the timelockController
36+
won't be able to set the configurations. Set the delegate using task lz-set-delegate.ts.
37+
3538
1. Fill in LZ configurations in helper-hardhat-config.ts.
3639
Get DVNs from https://docs.layerzero.network/v2/deployments/dvn-addresses
3740
Get Send/Rec/Exec Libs from https://docs.layerzero.network/v2/deployments/deployed-contracts

tasks/lz-gen-config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { OAppEnforcedOption, OmniPointHardhat } from "@layerzerolabs/toolbox-har
55
import { EndpointId } from "@layerzerolabs/lz-definitions";
66
import { ExecutorOptionType } from "@layerzerolabs/lz-v2-utilities";
77

8-
// run as "npx hardhat --network arbitrumSepolia lz-set-delegate --addr 0x1234... --lastid 0x12456789.."
8+
// run as "npx hardhat --network arbitrumSepolia lz-get-config"
99
task("lz-gen-config", "Set delegate for GS token's endpoint")
10-
.addOptionalParam("addr", "Custom address of delegate")
11-
.addOptionalParam("lastid", "Custom last Id in case last transaction was cancelled")
1210
.setAction(async (taskArgs, hre) => {
1311
if (hre.network.name === "hardhat") {
1412
console.warn(

tasks/lz-set-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GS } from "../typechain-types";
44
import { HardhatRuntimeEnvironment } from "hardhat/types";
55
const { abi: EndpoingV2ABI } = require("@layerzerolabs/lz-evm-protocol-v2/artifacts/contracts/EndpointV2.sol/EndpointV2.json")
66

7-
// run as "npx hardhat --network arbitrumSepolia lz-set-config --dest baseSepolia"
7+
// run as "npx hardhat --network arbitrumSepolia lz-set-config --dest baseSepolia --lastid 0x12345... --zerolastid 1 --exec 1"
88
task("lz-set-config", "Set config for LZ network to dest network")
99
.addOptionalParam("dest", "Destination network")
1010
.addOptionalParam("lastid", "Custom last Id")

0 commit comments

Comments
 (0)