Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Feb 10, 2024
1 parent e3f2113 commit 6503c7d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/devtools-evm-hardhat/src/runtime.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6503c7d

Please sign in to comment.