Replace the Bytes
alias in CosmWasm context with cosmwasm_std::Binary
#1271
Labels
A: breaking
Admin: breaking change that may impact operators
O: maintainability
Objective: cause to ease modification, fault corrections and improve code understanding
Milestone
Improvement Summary
Currently, the CosmWasm context uses a
Bytes
alias to serialize/deserialize Base64 strings to bytes through the use of Serde tags (for example, see here). However, Bytes can be replaced withcosmwasm_std::Binary
, which allows us to remove all the Serde and Schemars tags. Here is an example of the proposed change:Context
As part of the ongoing migration in the 08-wasm contract API, we recommend moving away from using the
Bytes
alias in favor ofcosmwasm_std::Binary
.The recent changes to the merkle path in
08-wasm
can be seen here. Until more generic paths are supported in ibc-rs (see issue #1255), these bytes must be asserted as UTF-8 strings before being passed down to the Tendermint context.By making this change, we simplify the code and reduce potential points of failure related to serialization/deserialization.
The text was updated successfully, but these errors were encountered: