Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix imports in examples #4

Merged
merged 1 commit into from
Aug 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ The promise resolves to `null` if no proxy can be detected.

```ts
import { InfuraProvider } from '@ethersproject/providers'
import { detectProxyTarget, EIP1193ProviderRequestFunc } from 'evm-proxy-detection'
import detectProxyTarget from 'evm-proxy-detection'

const infuraProvider = new InfuraProvider(1, process.env.INFURA_API_KEY)
const requestFunc: EIP1193ProviderRequestFunc = ({ method, params }) =>
infuraProvider.send(method, params)
const requestFunc = ({ method, params }) => infuraProvider.send(method, params)

const target = await detectProxyTarget(
'0xA7AeFeaD2F25972D80516628417ac46b3F2604Af',
Expand All @@ -56,7 +55,7 @@ Otherwise, you can use providers like [eip1193-provider](https://www.npmjs.com/p

```ts
import Web3 from 'web3'
import { detectProxyTarget } from 'evm-proxy-detection'
import detectProxyTarget from 'evm-proxy-detection'

const web3 = new Web3(Web3.givenProvider || 'ws://localhost:8545')

Expand Down