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.

"signer is not a function"

See original GitHub issue

Seemingly ethers will not let you access a contract function named signer. Ran into this last night when we were testing a contract with a public signer variable. Is there a way around this naming conflict?

I can create a minimal working example (the stacktrace for the error unfortunately has details that need to be obfuscated) if you need one.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ricmoocommented, Nov 20, 2020

(I see now that’s the same as the suggestion by @zemse)

1reaction
ricmoocommented, Nov 20, 2020

There are a few names that collide with the properties present on the object already. And with JavaScript objects in general. Unfortunately the only way to get at these is to use the signature format accessors, contract["signer()"](), for example if your method does not take in any parameters.

It is similar if you have a method that collides with a JavaScript built-in, like prototype.

Let me know if that solves things…

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: signer.sign is not a function · Issue #105 - GitHub
Hi everyone, I am trying to implement this package following the example here, but I really don't know how to do it.
Read more >
this.signer.sendTransaction is not a function ethers js
I looked at the ethers js documentation and it said the signer should inherit the sendTransaction function. Not sure what is wrong though....
Read more >
ethers.js - Following the Hardhat tutorial, I get this error ...
getSigners is not a function - Ethereum Stack Exchange. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.
Read more >
@aws-sdk/s3-request-presigner | AWS SDK for JavaScript v3
This package provides a presigner based on signature V4 that will attempt to generate signed url for S3. Get Presigned URL with Client...
Read more >
Functions and Duties of a California Notary Public - CA.gov
If the document does not have a title, the notary public may indicate the type of document is a “declaration” or “affidavit.” ➢...
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