- 3469800: Escape dirs starting with digits
- 9107713: Fix the detection of inputs root in some specific scenarios
- c4720b9: fix tuples in event signatures and also arrays of tuples in functions
- cd4bb0f: Add the node16 moduleSuffix also to directories (including the
index
filename) as in ESM directory root files have to be explicitly stated (including their file extension).
- 15541e4: Support for
nodenext
style import paths with new CLI flag:--node16-modules
- bbc9656: Skip run if project has no ABIs
- 63691c4: - Expose
TypechainUserConfig
type.- Removed
contractName
from interface output see #692 for details.
- Removed
-
3a8a99a: Directory tree in generated types now reflects the directory tree in the inputs. Also, only the main contract type is reexported from each file.
This change solves a number of name clashing problems. All generated code can still be imported after updating the import path.
-
978490f: ## What's breaking:
We are not emitting
contractName
fields on contracts and factories anymore.contractName
breaks polymorphism for example: exact token implementation is not assignable to token interface.We are adding optional flag
--discriminate-types
to continue emittingcontractName
. -
975a9dc: Fix type generation for arrays of nested structs ex:
GovernanceMessage.Call[][] calldata _remoteCalls
.Fix structs parser in typechain package. Now only struct tuples are registered.
- 5b9a7fb:
typechain
will now resolve targets better in cases where the core package is symlinked - e447bfb: Added optional
config.inputDir
property and--input-dir
flag to control directory structure in generated types. If not set, it's inferred as lowest common path of all ABI files. - a59ae6e: Prefer
import type
in generated files when possible
- e1f832c: Make parsing JSON abi files more resilent. This should improve foundry integration.
- 7e7bbed: Add support for foundry / forge style artifacts
- 92939ea: Structs will be namespaced using contract name when available
- d244e41: Fix event name generation for events with arrays
-
5f81ca9: Using
--ts-nocheck
(config.tsNocheck
) flag, you can now add// @ts-nocheck
comment in case where code generated by TypeChain doesn't pass typechecking.Read more in TypeScript docs.
-
156c744: Given --help flag,
typechain
CLI now shows the usage guide.
- 135f6ce: Fix
structName
for nested array of struct
- a26ea50: Constant size struct arrays are now properly supported and don't cause malformed TS emit anymore.
- a0fba00: Ethers V5 target doesn't emit unused imports anymore.
- c6b6e5f: Remove unnecessary console.log about structs internals
- 44a04c0: Fix bug in parsing names of free floating structs
- 33ee803: Fix tuple array signature
-
95517e9: Add support for Solidity structs
// before function deposit(amount: { token: string; value: BigNumberish }): Promise<ContractTransaction> // after export type AmountStruct = { token: string; value: BigNumberish } function deposit(amount: AmountStruct): Promise<ContractTransaction>
-
0ac4921: Propagate module resolution errors from inside of target.
Previously, when the version of
@typechain/ethers-v5
you were depending on was in some way broken,typechain
would just say that it could not find a target. Now, an error message will explain why.
- c7c2913: Escaped reserved words in argument names
- a3feb27: Support extracting library references in hardhat style artifacts
- b4fac2d: Add missing runtime dep
- 22134ac: Support optional
ignoreNodeModules
(default=true) flag for glob helper
- d60a343: Rename
--outDir
CLI option to--out-dir
- 5a60d00: Remove dependency on
ts-generator
- d60a343: Add
--always-generate-overloads
option and by default stop generating types for overloaded functions if there are no overloads (reduces bloat)
- dbfe92a: Improve error message in case of a missing target
- d07ae43: Fix signature of overloaded methods with struct in arguments
- 82633bb: Do not ship tests and original source files with the npm package