Open gabrielstoica opened 9 months ago
Up @ricmoo
I’ll get some docs up soon on typing in Ethers.
I’m also working on a version of Contracts based on AbiType that can automatically generate types from the ABI.
Thanks, @ricmoo - looking forward to it!
Any update on this one, or can you provide an example of how we should address this @ricmoo ? Thanks!
Also looking forward to seeing some examples. Especially since downgrading to 5.7.2 reports using a highly vulnerable version of the ws dependency.
Ethers Version
6.10.0
Search Terms
abi, type
Describe the Problem
Having the following code snippet, when trying to deploy a custom
Box
contract, I'm getting the following type error:Type 'BaseContract & Omit<ContractInterface, keyof BaseContract>' is missing the following properties from type 'Box': UPGRADE_INTERFACE_VERSION, foo, initialize, owner, and 5 more.
How should one specify the contract type when deploying using
new ContractFactory()
so all theBox
-specific methods should be included and therefore suggested? (e.g.box.owner()
,box.version()
)Code Snippet
Contract ABI
No response
Errors
Environment
Hardhat
Environment (Other)
No response