-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use schema information when generating client #275
Conversation
1ea78cd
to
d99f0c7
Compare
55a0dfa
to
1e3d043
Compare
4cb8573
to
ac9f4ec
Compare
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.
LGTM! :)
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.
The readme in examples should be updated as well.
But also, there are as far as I see no tests of the generated code. That's not so problematic for the initial development since it's being tested on the fly, but it is a problem for maintenance.
I would expect some tests that would check at least a few example modules used as sources and then checking the correct functions are present in the generated module, that the generated TS modules actually type-check, and ideally also that the types are sensible, but this would probably require a bit more work.
As it is now it's too hard to make sure that the generated code is sensible unless I've missed something.
cc4f167
to
0c86233
Compare
0c86233
to
d340b75
Compare
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.
We agreed to implement tests in the followup PR.
Looks good otherwise.
Purpose
Should be merged after #270.
Closes #254
Generate smart contract clients, which uses schema information to take structured parameters and provides function for parsing events, return values and error messages.
Example
An example of a wCCD client can be seen by running (from
./examples
):The generated clients can be found in
examples/ccd-js-gen/wCCD/lib/
Changes
ContractEvent
type wrapper and update API to use it.