-
Notifications
You must be signed in to change notification settings - Fork 5
fix: review sov-ibc-transfer implementation and apply fixes #133
Conversation
escrowed_token
+ move away from base64-encoded memoescrowed_token
+ move away from base64-encoded memo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks, Farhad!
if !memo.as_ref().is_empty() { | ||
return Err(TokenTransferError::Other( | ||
"Memo must be empty when burning tokens".to_string(), | ||
)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain why this is required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a safety check and disallowing someone to pass a huge memo that might overload the system. This perhaps should be taken care at ibc-rs ( I mean the memo size), then we can drop it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. But this may prevent users from using the ibc-middleware hooks in counterparty chains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some comments about this situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new changes look awesome ! 👍
Added new comments.
escrowed_token
+ move away from base64-encoded memoThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some last comments. Otherwise, the PR looks solid 🪨
Thanks, @Farhad-Shabani ! ✨
if !memo.as_ref().is_empty() { | ||
return Err(TokenTransferError::Other( | ||
"Memo must be empty when burning tokens".to_string(), | ||
)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some comments about this situation?
Closes: #132
Description
Along with this PR:
escrowed_token
state field.TokenId
, we can directly get itsString
representation, eliminating the need to rely onmemo
.minted_token_id_to_name
to disallow using theTokenId
of an IBC-minted token as the denomination for sending back to the source chain. (Brought up in discussions with @rnbguy)ibc_transfer
address as the sender.PR author checklist
docs/
).