dethcrypto / dethcrypto/TypeChain

Truffle constructor type omits JSON allowing access to contract name

Open
#750 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

I have some code which attempts to get the contract name by checking `contractInstance.constructor._json.contractName` and this executes fine, but can't compile with TypeChain, throwing error `Property '_json' does not exist on type 'Function'.ts(2339)`. Is there a better way to get the contract name, or can the typings be added to allow access to the `_json` property?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.