Skip to content

Commit

Permalink
chore: add signer
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefCupcake committed Jul 25, 2024
1 parent 1d76309 commit 6ec25f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const LzEndpointABI = [{ "inputs": [ { "internalType": "address", "name": "_oapp
}];

// Create a contract instance
const contract = new ethers.Contract(LzEndpointAddress, LzEndpointABI, provider);
const signer = new ethers.Wallet('PK', provider);
const endpointContract = new ethers.Contract(LzEndpointAddress, LzEndpointABI, signer);

// Define the addresses and parameters
// find sendlib302 and receivelib302 addresses here: https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts
Expand Down Expand Up @@ -61,7 +62,7 @@ async function setConfig() {
console.log(ulnConfigEncoded);

const resetConfigParamUln = {
eid: 30102, // Replace with the target chain's endpoint ID
eid: remoteEid, // Replace with the target chain's endpoint ID
configType: ulnConfigType,
config: ulnConfigEncoded,
};
Expand All @@ -78,7 +79,7 @@ async function setConfig() {
console.log(executorConfigEncoded);

const resetConfigParamExecutor = {
eid: 30102, // Replace with the target chain's endpoint ID
eid: remoteEid, // Replace with the target chain's endpoint ID
configType: executorConfigType,
config: executorConfigEncoded,
};
Expand Down

0 comments on commit 6ec25f2

Please sign in to comment.