Skip to content
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

Parse reply helpers #502

Merged
merged 28 commits into from
Oct 26, 2021
Merged

Parse reply helpers #502

merged 28 commits into from
Oct 26, 2021

Conversation

maurolacy
Copy link
Contributor

Closes #480.

Events helpers not implemented, but they don't require protobuf, so, can be deserialized directly. In any case, we can add them in a follow-up.

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

A few comments on improving checks on the production code (it works for most, but has some limits it doesn't error on).

And a few cleanup requests for the tests. Testing parse_protobuf_string and parse_protobuf_bytes as units is more important. You can ignore the "table test" setup comments for now if it is a lot of work. Can be follow up sometime, mainly a comment in general as I see you adopting this pattern (which I know well from Go)

packages/cw0/src/parse_reply.rs Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
@maurolacy maurolacy mentioned this pull request Oct 25, 2021
ethanfrey
ethanfrey previously approved these changes Oct 25, 2021
Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff.
Let's merge.

A few code style comments it would be good to address in a simple follow up

packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Outdated Show resolved Hide resolved
packages/cw0/src/parse_reply.rs Show resolved Hide resolved
Copy link
Contributor

@ueco-jb ueco-jb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at most code, and following Ethan's approval.

packages/cw0/Cargo.toml Outdated Show resolved Hide resolved
@maurolacy maurolacy merged commit ad8ab33 into main Oct 26, 2021
@maurolacy maurolacy deleted the 480-reply-parsing-helpers branch October 26, 2021 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add helpers for parsing the protobuf MsgInstantiate and MsgExecute responses
3 participants