Skip to content

Support CosmWasm environment for ibc-proto #4

Closed
@romac

Description

Crate

ibc-proto

Summary

The reason for this PR is to have the ibc-proto crate being reusable in the context of a cosmwasm light client, a new type of IBC client.
this PR includes a non-exhaustive set of changes required to have the ibc-proto compilable and runnable in a cosmwasm environment.
The

adding feature client to opt out client implementations as tonic dependency must be removed when compiling within

change is necessary because in cosmwasm we don't have access to the getrandom crate, so I needed to remove dependency on tonic.

The

adding #[derive(::schemars::JsonSchema)] attribute for structs that might be of value within an IBC-related cosmwasm contract

extension is needed if we want to pass such structures in and out of a cosmwasm smart contract (serde alone is not enough)
I think the following one explain themselves

making no_std a feature, so above derive macro can work

This one is actually important outside the scope of cosmwasm as well, as you already added serde::Serialize and serde::Deserialize support.

adding #[serde(default)] field attribute to fields that might be omitted by Golang omitempty directive.

Originally posted by @lightyear15 in https://github.com/informalsystems/ibc-rs/issues/1628#issuecomment-1047927312


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions