-
Notifications
You must be signed in to change notification settings - Fork 20
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
Contract Types Plugin - Initial Implementation #91
Conversation
…s-generator-plugin
|
Deploying with Cloudflare Pages
|
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.
@ricklove as usual, good stuff!
A few thoughts/suggestions:
-
The init and scaffold tasks accept the output directory as a positional argument. Perhaps to keep to the UE consistent, we could accept a positional argument here as well instead of the typescriptDir option?
-
We're using verbs for task names everywhere else. Similarly to the above, to achieve consistently, perhaps we could rename the task from "types" to "gen types"? @russellmorton any verb suggestions?
-
There were a couple of inline TODOs, which is fine. Could we also create issues for those and list the issue #s beside the TODOs please?
-
I'm glad to see all of the automated tests. I just need to check with the SDET guys to see if they have any preference to move these somewhere else. @alexzbusko ?
-
I took forever to get you a code review on this. As such, this branch has diverged from main quite a bit. Do you mind merging main into your branch please? I promise not to take so long for the final sign-off.
Thanks again Rick. Really appreciate all of the effort on this. @alexzbusko when you're able, would you be able to pull this branch down, build it, and give it a spin once Rick makes some of the adjustments above? I'll do the same. We'll then have some manual test coverage on both Windows and Mac.
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.
Can't wait to see this merged in. Just a few minor adjustments @ricklove
|
This should be ready, just need to test the positional argument |
Having trouble using the positional argument, debugging now |
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.
Looks great!
Full readme: taqueria-plugin-contract-type-generator/Readme.md
Requires:
Related Issues:
Completes
contract.methods
andcontract.methodsObject
parameters are fully typedcontract.storage
is fully typedoriginate
storage parameter is fully typedThis plugin will generate typescript types for a contract.
In the simple case, it reads the
artifacts
folder for any*.tz
Michelson files and will generate a types file with the matching filename for each.Example Usage (based on an nft auction contract from open minter sdk)
Example typegen task
Example type output