Skip to content
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

Add packet data encoding format for each IBC app #987

Open
1 task
colin-axner opened this issue Jun 21, 2023 · 0 comments
Open
1 task

Add packet data encoding format for each IBC app #987

colin-axner opened this issue Jun 21, 2023 · 0 comments
Labels
app Application layer.

Comments

@colin-axner
Copy link
Contributor

colin-axner commented Jun 21, 2023

In the same vain as #918, determining the exact encoding format for an IBC app's packet data could be made easier.

I expect to see a document for each app, packet_data_encoding_format.md which should explain which encoding protocol is used and what value each field is marshalled as.

If we look at ICS-20 as an example, I see:

interface FungibleTokenPacketData {
  denom: string
  amount: uint256
  sender: string
  receiver: string
  memo: string
}

However, much farther down, underneath discussion of the acknowledgement type, I read:

Note that both the FungibleTokenPacketData as well as FungibleTokenPacketAcknowledgement must be JSON-encoded (not Protobuf encoded) when they serialized into packet data. Also note that uint256 is string encoded when converted to JSON, but must be a valid decimal number of the form [0-9]+.

It seems possible to me, the amount could have been encoded as a JSON number, so it would be nice to have a single document for each app which explains exactly how the encoding should be constructed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Application layer.
Projects
None yet
Development

No branches or pull requests

2 participants