question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ethers] generate typings for the contract-returning methods

See original GitHub issue

The ethers main Contract class has a bunch of methods that return another instance of the same contract, e.g.

    connect(signerOrProvider: Signer | Provider | string): Contract;
    attach(addressOrName: string): Contract;

These methods should also be included in the generated .d.ts contract files, so the returned instances are also properly typed. What do you think? I could maybe make a PR for this some time.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
krzkaczorcommented, Jun 4, 2019

Thanks @quezak for this! I will release new verion tmrw.

0reactions
gitcoinbotcommented, Jun 18, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 200.0 DAI (200.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @quezak.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve typings for contracts #1384 - ethers-io/ethers.js - GitHub
Hey Richard! I am the maintainer of TypeChain and I would like to forward some ideas that would greatly improve our generated types....
Read more >
Documentation - Ethers.js
Returns a new Wallet with a random private key, generated from cryptographically secure entropy sources. If the current environment does not have a...
Read more >
TypeChain target Ethers-v5 - npm
Contract typings. The main files generated by this target are <contract-name>.ts . They declare typesafe interfaces for your contracts on top of ...
Read more >
Contracts — ethers.js 4.0.0 documentation
A Non-Constant method requires a fee (in Ether) to be paid, but may perform any ... Binary Interface (ABI), usually generated from the...
Read more >
Introducing TypeChain — Typescript bindings for Ethereum ...
... typings build in. For others you can find typings on npm. ... It uses provided ABI files to generate typed wrappers for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found