diff --git a/docs/MIGRATING.md b/docs/MIGRATING.md index aa699bdb..cd85c293 100644 --- a/docs/MIGRATING.md +++ b/docs/MIGRATING.md @@ -14,6 +14,9 @@ - The field `BlockInfo.Time` now uses a wrapper type `Uint64` instead of `uint64` to ensure string serialization. You can use `uint64(u)` to get the underlying value. +- The field `IBCReceiveResponse.Acknowledgement` can now be `nil`. In this case, + no acknowledgement must be written. Callers need to handle this case + separately from empty data. - CosmWasm gas values were reduced by a factor of 1000, so each instruction now consumes 150 CosmWasm gas instead of 150000. This should be taken into account when converting between CosmWasm gas and Cosmos SDK gas. diff --git a/types/ibc.go b/types/ibc.go index 6fc412f1..eba4d3e9 100644 --- a/types/ibc.go +++ b/types/ibc.go @@ -256,7 +256,9 @@ type IBCReceiveResult struct { // and not inform the calling chain). // This is the counterpart of (IbcReceiveResponse)(https://github.com/CosmWasm/cosmwasm/blob/v0.15.0/packages/std/src/ibc.rs#L247-L267). type IBCReceiveResponse struct { - // binary encoded data to be returned to calling chain as the acknowledgement + // Acknowledgement is binary encoded data to be returned to calling chain as the acknowledgement. + // If this field is nil, no acknowledgement must be written. For contracts before CosmWasm 2.0, this + // was always a non-nil value. See also https://github.com/CosmWasm/cosmwasm/pull/1892. Acknowledgement []byte `json:"acknowledgement"` // Messages comes directly from the contract and is it's request for action. // If the ReplyOn value matches the result, the runtime will invoke this