From 6503c7d09ee40d4078857bfa56633adda35537b6 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Fri, 9 Feb 2024 16:01:54 -0800 Subject: [PATCH] WIP --- packages/devtools-evm-hardhat/src/runtime.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/devtools-evm-hardhat/src/runtime.ts b/packages/devtools-evm-hardhat/src/runtime.ts index 1b6a5e302..a10901954 100644 --- a/packages/devtools-evm-hardhat/src/runtime.ts +++ b/packages/devtools-evm-hardhat/src/runtime.ts @@ -1,7 +1,6 @@ import type { HardhatRuntimeEnvironment, EthereumProvider } from 'hardhat/types' import pMemoize from 'p-memoize' -import type { JsonRpcProvider } from 'ethers' import { ConfigurationError } from './errors' import { HardhatContext } from 'hardhat/internal/context' import { Environment as HardhatRuntimeEnvironmentImplementation } from 'hardhat/internal/core/runtime-environment' @@ -10,6 +9,7 @@ import { EndpointBasedFactory, Factory, formatEid } from '@layerzerolabs/devtool import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' import assert from 'assert' import memoize from 'micro-memoize' +import { Provider } from '@layerzerolabs/devtools-evm' /** * Helper type for when we need to grab something asynchronously by the network name @@ -130,10 +130,8 @@ export const createGetHreByEid = ( * @param {EIP1193Provider} provider * @returns {JsonRpcProvider} */ -export const wrapEIP1193Provider = ( - provider: EthereumProvider, - networkName: string = 'unnamed network' -): JsonRpcProvider => new HardhatEthersProvider(provider, networkName) +export const wrapEIP1193Provider = (provider: EthereumProvider, networkName: string = 'unnamed network'): Provider => + new HardhatEthersProvider(provider, networkName) /** * Gets an EndpointId defined in the hardhat config