-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make typegen
factories an object instance
#2359
Conversation
typegen
factories an object instance
@nedsalk Does the described issue with Typegen factories indicate a design flaw, or is this change primarily to fit the needs of |
Coverage Report:
Changed Files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach. Would it be worth having interfaces for these factories?
@Torres-ssf This change is primarily to fit the needs of
@petertonysmith94 No because these factories themselves follow the interface of the |
typegen
factories currently are classes with static methods which is a problem when wanting to pass the whole factory as an argument because e.g. passing a wholeTestContract__factory
as an argument and using it in the manner offactoryArgument.deployContract
would yield anundefined.deployContract
error becauseTestContract__factory
is not an object instance. This PR is necessary to be able to pass the outputs of typegen tolaunchTestNode
in #1356. It doesn't break anything for end consumers.