-
Notifications
You must be signed in to change notification settings - Fork 11
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
Create typescript type defs #102
Create typescript type defs #102
Conversation
@thekevinbrown Code looks good, seems to be failing allot of pipeline checks in Netlify however. Can you please look into this please? |
The errors from Netlify are for tests around type generation:
What's interesting is this should be failing Travis if it's a real thing, and if it's not, why is Netlify choking on it? I'll investigate. |
The problem was that the tests were broken because of the changes. Separately there's a PR to get Travis to actually run our tests (#108), but you can run them locally in the meantime with I've pushed a commit to your branch to fix the tests, and while I was at it I used a fancy Javascript feature called destructuring to make the function calls a bit cleaner since those params weren't required everywhere. Hope you don't mind, but if you do feel free to change the function signature back to how you had it. As next steps:
|
…eters and tables.
…ate tests to pass.
43df56f
to
5832aca
Compare
This extends the type generator to allow nested types in actions parameters and tables as they can be derived from the provided abi file for a contract.
The current implementation falls back to a string for non-primitive types in action parameters which opens up a potential source of bugs in created tests with the absense of type checking.
This change populates the tables and actions parameters using not just the provided primitives but also nested structs referenced and used from the abi before finally defaulting to a string if a matching primitive and embedded struct is not found.