Releases: dethcrypto/TypeChain
@typechain/ethers-v5@6.0.1
Patch Changes
- 9ab1929: Fix code generation for events without any args
@typechain/web3-v1@2.2.0
Minor Changes
- 7f18b27: Accept BN as input for numbers
@typechain/web3-v1@2.1.0
Minor Changes
- 5761302: Support passing block number to call functions
typechain@4.0.2
Patch Changes
- d07ae43: Fix signature of overloaded methods with struct in arguments
@typechain/ethers-v5@6.0.0
Major Changes
-
cd73777: Improve typings for events. Generate types for
queryFilter
for events.Note: This is a breaking change as it requires using TypeScript >= 4.0.0 (previously 3.9 was fine.)
Example:
const filter = contract.filters.Transfer() // TypedEventFilter<> const result = await contract.queryFilter(filter) // TypedEvent<> result[0].args.from // type support for named event parameters result[0].args[0] // type support by index contract.on(filter, (from, to, value, event) => { from // string to // string value // BigNumber event // TypedEvent<> })
@typechain/truffle-v5@4.0.1
Patch Changes
- ebaeffc: Add missing properties to
Truffle.ContractInstance
typechain@4.0.1
@typechain/ethers-v4@4.0.0
Major Changes
-
0d4b293: Changed return type of functions from a object with number indexes, to an array merged with object containing named
outputs.Before, solidity function like this:
function x() public pure returns (uint256)
Generated such method signature:
x(overrides?: CallOverrides): Promise<{0: BigNumber}>;
New output is:
x(overrides?: CallOverrides): Promise<[BigNumber]>;
The difference is that now you can use standard array destructuring while working with output types.
Patch Changes
- db5baa5: Do not generate typings in contract type itself for reserved keywords that would collide with ethers internals
@typechain/ethers-v5@5.0.0
Major Changes
-
0d4b293: Changed return type of functions from a object with number indexes, to an array merged with object containing named
outputs.Before, solidity function like this:
function x() public pure returns (uint256)
Generated such method signature:
x(overrides?: CallOverrides): Promise<{0: BigNumber}>;
New output is:
x(overrides?: CallOverrides): Promise<[BigNumber]>;
The difference is that now you can use standard array destructuring while working with output types.
Patch Changes
- db5baa5: Do not generate typings in contract type itself for reserved keywords that would collide with ethers internals
@typechain/truffle-v5@4.0.0
Major Changes
-
f8711eb: Changed return type of functions from an array to a object. This represents better runtime types.
Before, solidity function like this:
function x() public pure returns (uint256)
Generated such method signature:
x(txDetails?: Truffle.TransactionDetails): Promise<[BigNumber]>;
New output is:
x(txDetails?: Truffle.TransactionDetails): Promise<{0: BigNumber}>;
The difference is that now you can use standard object destructuring while working with output types.
typechain@4.0.1
Patch Changes
- 82633bb: Do not ship tests and original source files with the npm package
@typechain/ethers-v4@3.0.1
@typechain/ethers-v4
Fix broken import paths in generated factories. #304