Why is Signer marked optional in Contract constructor. #3242
grapevinegizmos
started this conversation in
General
Replies: 1 comment
-
The contract can still be used to call Depending whether you pass in null, a Proviser or a Signer depends on what functionality you get. The error should indicate that a Signer is needed for any operation that requires a Signer… |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The code for the constructor of 'Contract' is
constructor(contractInterface: ContractInterface, bytecode: BytesLike | { object: string }, signer?: Signer) {
Why is signer optional? I get a null reference error trying to call public view function on a contract created without a signer. So what's the point of the optional signer?
Beta Was this translation helpful? Give feedback.
All reactions