-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(proto): Fixed types encoding (#38)
There was an assumption that serde was correlated with proto encoding. The tests passed since they verified that serde serialization worked which was true. This new update adds proto encoding testing along with two major changes. 1. All types in `abstract-any` were moved from being just `T` to `Any<T>`. The reason for this is that proto has to support for adding custom generic encoding/decoding techniques, making generating this very hard to do. This could be reserved for a future update, but for current requirements its not needed. 2. Added `GenericData` type. When dealing with a response that may have an array of different types, for example `QueryAccountsResponse<BaseAccount<_>>` inside the `Auth` module doesn't work because it can also contain `ModuleAccount<_>` and `IcaAccount<_>`, replacing this with `QueryAccountsResponse<GenericData>` and validating each `Any::type_url` to determine what to decode into.
- Loading branch information
Showing
10 changed files
with
141 additions
and
544 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.