ComposableFi / composable-ibc

A trustless, cross-chain bridging protocol.
https://picasso.network
76 stars 50 forks source link

Consider using `cosmwasm_std::Binary` in favour of self defined bytes types #506

Open damiannolan opened 2 months ago

damiannolan commented 2 months ago

https://docs.rs/cosmwasm-std/2.0.4/cosmwasm_std/struct.Binary.html

The cosmwasm_std::Binary type conveniently handles base64 serde functionality out of the box.

Consider using this in favour of alias Bytes wrapping Vec<u8> and serde annotations.

for example:

- #[schemars(with = "String")]
- #[serde(with = "Base64", default)]
- pub client_message: Bytes,
+ pub client_message: cosmwasm_std::Binary