Closed giorgionocera closed 1 year ago
Hello, I also suggest to update the ibc-go v1 transfer,because they added the memo field: https://github.com/cosmos/ibc-go/blob/10324f5bf6840892cd7bba8a40231fc52a8b1745/proto/ibc/applications/transfer/v1/tx.proto#L41
As you can see here, the memo field is missing: https://github.com/osmosis-labs/osmojs/blob/59d389d695ea9325310dc014a52ef314bc3e55b0/packages/osmojs/proto/ibc/applications/transfer/v1/tx.proto#L40
Thank you!
working on this now, will be using git submodules to get the latest. Had to make some updates to telescope for some new syntax that is popping up in here.
some amino messages have changed, not sure if this is the correct version of the SDK
- "type": "cosmos-sdk/MsgVote",
+ "type": "cosmos-sdk/v1/MsgVote",
- "type": "cosmos-sdk/MsgDeposit",
+ "type": "cosmos-sdk/v1/MsgDeposit",
- "type": "cosmos-sdk/MsgWithdrawValidatorCommission",
+ "type": "cosmos-sdk/MsgWithdrawValCommission",
The new amino names seem correct. It matches both the osmosis sdk fork and upstream: https://github.com/osmosis-labs/cosmos-sdk/blob/6ed904cdb75fe08a9310e7df49eaf9c5b2b64692/proto/cosmos/distribution/v1beta1/tx.proto#L62 https://github.com/cosmos/cosmos-sdk/blob/59e5ca20b65a43896f4704f879f78358b060bc58/proto/cosmos/distribution/v1beta1/tx.proto#L101
This seems to have been introduced in November (https://github.com/cosmos/cosmos-sdk/pull/13501) was the previous generation of osmojs older than that?
ok cool, I've upgraded and published
osmojs@15.2.0
Thank you! But it seems that "memo" fields are still missing, or am I missing something?
@DavideSegullo the memo seems to be there: https://github.com/osmosis-labs/osmojs/blob/osmojs%4015.2.0/packages/osmojs/src/codegen/ibc/applications/transfer/v2/packet.ts#L22
Are you using 15.2.0? how are you using it?
Oh sorry, the linter probably hadn't updated and was still showing me the old type definitions, now it seems good, I'll give it a try! Thank you for your support!
Everything seems okay to me, I even tested with transfer messages using the memo!
Yup, thank you, guys! 🙏 I think we're done with this issue. It can be closed.
We only saw that amino is not working with this message: it seems that the encoded message does not have the memo. But we do not know if it is an issue due to this implementation. At the moment we are using the "sign direct".
My fault 😬 amino types are working. The signer called by cosmos-kit
refers to not updated amino types. In fact, if you overwrite the default ones with the ones exported by osmojs
, everything works smoothly.
I hope this could help!
There seems to be a misalignment between the latest cosmos proto and the osmojs ones for the IBC transactions.
As you can see, the proto file available on the
cosmos
repo in theibc-go
folder includes the info for the IBC memo parameter: https://github.com/cosmos/ibc-go/blob/10324f5bf6840892cd7bba8a40231fc52a8b1745/proto/ibc/applications/transfer/v2/packet.proto#L5-L21As you can see here: https://github.com/osmosis-labs/osmojs/blob/59d389d695ea9325310dc014a52ef314bc3e55b0/packages/osmojs/proto/ibc/applications/transfer/v2/packet.proto#L5-L19
osmojs seems to be not yet updated 😬, nor at its last version: https://github.com/osmosis-labs/osmojs/blob/59d389d695ea9325310dc014a52ef314bc3e55b0/packages/osmojs/proto/ibc/applications/transfer/v2/packet.proto#L5-L19
On the other hand, it seems that cosmjs already provide such a feature: https://github.com/confio/cosmjs-types/blob/6e3448a046b86f4448d577a73edf8f2229e8ad61/src/ibc/applications/transfer/v2/packet.ts#L11-L26
Moreover, could you please construct the
MessageComposer
as you did for the IBC transfer message?