TypeChain icon indicating copy to clipboard operation
TypeChain copied to clipboard

fix(ethers-v6): correctly type event listener

Open pocin opened this issue 2 years ago • 1 comments

fixes #867

Not sure about the broader implications of this, but when i made this change to the generated file it correctly types the last event listener arg so one can do

  contract.on(
    contract.filters.Swap,
    async (
      address,
      fundsOwner,
      userSellTokenAmount,
      userBuyTokenAmount,
      event
    ) => {
      console.log(event.log.transactionHash) // this
  })

seems to be working fine in my script so far

pocin avatar Nov 02 '23 11:11 pocin

⚠️ No Changeset found

Latest commit: b1512f0650bda507e0ed2c55b762a2ff6f845d26

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 02 '23 11:11 changeset-bot[bot]