From 7c12c38b3237e51cf0c4dc8ba59e5fbf8a6f19df Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 11 Dec 2023 14:13:48 -0800 Subject: [PATCH] fix: Fix taskHelpers --- .../ua-utils-evm-hardhat/src/utils/taskHelpers.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/ua-utils-evm-hardhat/src/utils/taskHelpers.ts b/packages/ua-utils-evm-hardhat/src/utils/taskHelpers.ts index 5a8e934da..78e072fd9 100644 --- a/packages/ua-utils-evm-hardhat/src/utils/taskHelpers.ts +++ b/packages/ua-utils-evm-hardhat/src/utils/taskHelpers.ts @@ -1,7 +1,7 @@ import { Address } from '@layerzerolabs/utils' import { Uln302ExecutorConfig, Uln302UlnConfig } from '@layerzerolabs/protocol-utils' import { createConnectedContractFactory, getEidForNetworkName } from '@layerzerolabs/utils-evm-hardhat' -import { Endpoint, Uln302 } from '@layerzerolabs/protocol-utils-evm' +import { Endpoint, Uln302, createUln302Factory } from '@layerzerolabs/protocol-utils-evm' export async function getSendConfig( localNetworkName: string, @@ -11,7 +11,11 @@ export async function getSendConfig( const localEid = getEidForNetworkName(localNetworkName) const remoteEid = getEidForNetworkName(remoteNetworkName) const contractFactory = createConnectedContractFactory() - const localEndpointSDK = new Endpoint(await contractFactory({ eid: localEid, contractName: 'EndpointV2' })) + const uln302Factory = createUln302Factory(contractFactory) + const localEndpointSDK = new Endpoint( + await contractFactory({ eid: localEid, contractName: 'EndpointV2' }), + uln302Factory + ) // First we get the SDK for the local send library let sendLibrary: Address @@ -38,7 +42,11 @@ export async function getReceiveConfig( const localEid = getEidForNetworkName(localNetworkName) const remoteEid = getEidForNetworkName(remoteNetworkName) const contractFactory = createConnectedContractFactory() - const localEndpointSDK = new Endpoint(await contractFactory({ eid: localEid, contractName: 'EndpointV2' })) + const uln302Factory = createUln302Factory(contractFactory) + const localEndpointSDK = new Endpoint( + await contractFactory({ eid: localEid, contractName: 'EndpointV2' }), + uln302Factory + ) // First we get the SDK for the local send library let receiveLibrary: Address