-
Notifications
You must be signed in to change notification settings - Fork 62
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
ICS-20: Add JSON encoding support #213
Conversation
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
what is possible timeline this to be merged into main? or at least squash (so easy maintain forks/merges/rebases) |
assertFalse(ICS20LibTestHelper.isEscapedJSONString('abc"')); | ||
assertFalse(ICS20LibTestHelper.isEscapedJSONString('"abc')); | ||
assertFalse(ICS20LibTestHelper.isEscapedJSONString('a"bc')); | ||
|
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.
123ibc/SDHWEQWEWQEQW is also True
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.
yeah, I will add more test cases
string calldata sourcePort, | ||
string calldata sourceChannel, | ||
uint64 timeoutHeight | ||
) external { | ||
if (!denom.toSlice().startsWith(_makeDenomPrefix(sourcePort, sourceChannel))) { | ||
require(ICS20Lib.isEscapedJSONString(denom) && ICS20Lib.isEscapedJSONString(receiver), "unescaped 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.
i doubt you should validate. it will just burn gas. people already send right strings, or get pack fail ACK.
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.
First, denom
can be removed by making this a contract to IICS20Bank
implementers. I will revert a change in 201e8f5
A format of receiver
is not defined in ics-20, so I think this validation is basically necessary as it depends on the ics-20 impl on the counterparty chain.
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
…not constant gas cost Signed-off-by: Jun Kimura <[email protected]>
Signed-off-by: Jun Kimura <[email protected]>
fix #81