Skip to content

[ethers-v5] Separate import and type import #737

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set the current solidity version.
### Local linking

Run `pnpm build` to build all packages or `pnpm watch` to start watching. Then enter desired package directory and run
`pmpm link`.
`pnpm link`.

### Debugging 🐞

Expand Down
17 changes: 3 additions & 14 deletions packages/target-ethers-v5/src/codegen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,15 @@ export function codegenContractTypings(contract: Contract, codegenConfig: Codege
const imports =
createImportsForUsedIdentifiers(
{
ethers: ['BaseContract', 'BigNumber', 'Signer', 'utils'],
'type ethers': [
'BaseContract',
'BigNumber',
'BigNumberish',
'BytesLike',
'CallOverrides',
'ContractTransaction',
'Overrides',
'PayableOverrides',
'PopulatedTransaction',
'Signer',
'utils',
],
'type @ethersproject/abi': ['FunctionFragment', 'Result', 'EventFragment'],
'type @ethersproject/providers': ['Listener', 'Provider'],
Expand Down Expand Up @@ -207,16 +204,8 @@ export function codegenContractFactory(
const imports =
createImportsForUsedIdentifiers(
{
ethers: [
'Signer',
'utils',
'Contract',
'ContractFactory',
'PayableOverrides',
'BytesLike',
'BigNumberish',
'Overrides',
],
ethers: ['Signer', 'utils', 'Contract', 'ContractFactory'],
'type ethers': ['PayableOverrides', 'BytesLike', 'BigNumberish', 'Overrides'],
'type @ethersproject/providers': ['Provider', 'TransactionRequest'],
},
source,
Expand Down