-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBC TransferMsg: add memo field #1477
Comments
Nice. This is API breaking but can be added easily in 2.0.0. |
It is API breaking for cosmwasm-std, and requires ibc-go v3.4 or v4.2 for wasmd (with cosmos-sdk v0.45), but can be done in a way such that existing contracts don't break (the field is optional). Maybe with some Rust/Serde magic the field can be set to an empty string in cosmwasm-std if not provided in the struct? |
The act of adding a field to Rust is the source code breaking part. But this is what CosmWasm 2.0 will be. Source code breaking but not breaking existing contracts. |
Oh I see, then it's a way less dramatic 2.0 than I thought |
Yeah, nothing is really communicated yet. Alpha leak here. |
But if you want more of those things, let us know. I'm piling them up here: https://github.com/CosmWasm/cosmwasm/milestone/27 |
Cosmwasm does not support a memo field in IBCMsg.TransferMsg and won't until cosmwasm v2. This patch allows using the channel id as an optional comma delimited string to piggyback a memo string. See: CosmWasm/cosmwasm#1477
so addin optional field into json breaks things apart? bad |
if somebody wants memo, use https://github.com/osmosis-labs/osmosis/blob/2e06b7ba485e73a36168ff5e47d63e8f249c9f7e/cosmwasm/contracts/outpost/src/execute.rs#L67 . I port it to our chain too. |
It does not break anything, we've added it on Secret and it works just fine with or without it. |
IMO a better way to define breakage is if v1 contracts won't work on CosmWasm v2 chain. If that's the case BTW, you'll have to find a way to migrate all old contracts to v2. |
Memo is essential btw. ICF IBC hooks are still bad. Why? They requre 2x blocks to transfer + act. Imagine the MEV/sandwith/slippage of this? The only DeFi option to use IBC is with memo (when memo carries batch id or execution). We need memo in std :) |
Yeah. #1878 fixed this in 2.0. In the meantime you can use CosmosMsg::Stargate to create a bank send with a memo (using prost or anybuf)
Nope. Adding a field to an enum case is a source code breaking change for users of cosmwasm_std. |
Add
memo
field toIBCMsg.TransferMsg
. See blogThe text was updated successfully, but these errors were encountered: