TypeChain icon indicating copy to clipboard operation
TypeChain copied to clipboard

Truffle constructor type omits JSON allowing access to contract name

Open wbt opened this issue 3 years ago • 0 comments

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?

wbt avatar Aug 10 '22 14:08 wbt