-
Notifications
You must be signed in to change notification settings - Fork 270
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: Utilize generic to better support Typechain types #325
Conversation
Thanks for the suggestion @phated! This is a great idea. Are you sure that this will achieve the desired outcome though? I would imagine the return value should depend on the type of the factory argument. |
I linked it into the project I'm helping on and it seemed to make the typechecker happy, but I could also see the need to cast the return value using |
@phated I've pushed in your branch what I believe will give the right results. Can you try it out? |
@frangio Hmm, I just linked that into my project and it doesn't work. The type inferred is still |
Something like:
And then cast the returning obj to the desired Contract type:
|
@frimoldi That would be awesome. Can you somehow test it? If you can also submit a PR that would be great. |
@frangio yep, I will. Wanted to see if there was interest still. 👍🏽 |
Closing in favor of #535 We no longer use this plugin, so I don't have a need for this anymore. |
This adds a generic to the return result of the DeployFunction. This allows better integration with Typechain types, like so: