Skip to content

Releases: dethcrypto/TypeChain

@typechain/[email protected]

09 Jun 18:39
Compare
Choose a tag to compare

@typechain/[email protected]

09 Jun 18:39
Compare
Choose a tag to compare

Patch Changes

@typechain/[email protected]

09 Jun 18:39
Compare
Choose a tag to compare

Minor Changes

  • 63691c4: - Expose TypechainUserConfig type.
    • Removed contractName from interface output see #692 for details.

Patch Changes

@typechain/[email protected]

09 Jun 18:39
Compare
Choose a tag to compare

Minor Changes

  • 015abb2: Added support for inputs wrapped in promise for ethers-v5 target.

Patch Changes

[email protected]

24 Mar 08:12
Compare
Choose a tag to compare

Major Changes

  • 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: We are not emitting contractName fields on contracts and factories anymore.

    Why?
    contractName breaks polymorphism for example: exact token implementation is not assignable to token interface.

    What do to?
    We are adding optional flag --discriminate-types to continue emitting contractName.

  • 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.

Minor Changes

  • 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

Patch Changes

  • e1f832c: Make parsing JSON abi files more resilent. This should improve foundry integration.

@typechain/[email protected]

24 Mar 08:12
Compare
Choose a tag to compare

Major Changes

  • 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.

Minor Changes

  • 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

Patch Changes

@typechain/[email protected]

24 Mar 08:12
Compare
Choose a tag to compare

Minor Changes

  • 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.

Patch Changes

@typechain/[email protected]

24 Mar 08:12
Compare
Choose a tag to compare

Major Changes

  • 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.

    Why?

    contractName breaks polymorphism for example: exact token implementation is not assignable to token interface.

    What do to?

    We are adding optional flag --discriminate-types to continue emitting contractName.

Minor Changes

  • a59ae6e: Prefer import type in generated files when possible

Patch Changes

@typechain/[email protected]

24 Mar 08:12
Compare
Choose a tag to compare

Depends on typechain ^8.0.0.

Major Changes

  • 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: We are not emitting contractName fields on contracts and factories anymore.

    Why?
    contractName breaks polymorphism for example: exact token implementation is not assignable to token interface.

    What do to?
    We are adding optional flag --discriminate-types to continue emitting contractName.

Minor Changes

  • d86d048: The method overloads for getEvent, getFunction, decodeFunctionResult, encodeFunctionData follow these rules:

    • If these entities are not overloaded in the contract ABI and --always-generate-overloads is off, just the
      entities' names are used (without the signature)
    • If the entities are overloaded, only signatures are used to
      disambiguate them
    • If --always-generate-overloads is on, additional overloads are generated for functions that are
      not ambiguous
    • For the method and event names in the events and functions properties only signature names are used
      (that's according to the ethers API - they don't use shorthand naming).
  • 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

  • 47ab651: For every event, TypeChain now emits an interface with its named properties.

    Before

    export type ApprovalEvent = TypedEvent<
      [string, string, BigNumber],
      { owner: string; approved: string; tokenId: BigNumber }
    >

    After

    export interface ApprovalEventObject {
      owner: string
      approved: string
      tokenId: BigNumber
    }
    export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>

Patch Changes

  • 2395289: ContractFactory subclasses now use explicit "override" modifiers.

    TypeScript version 4.3 or newer is now required.

  • 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.

[email protected]

07 Mar 10:50
d51ef63
Compare
Choose a tag to compare

Patch Changes

  • 7e7bbed: Add support for foundry / forge style artifacts