cosmos / solidity-ibc-eureka

This is a work-in-progress solidity implementation of IBC Eureka.
MIT License
26 stars 2 forks source link

JSON parsing in ICS20 is key-order dependent and strict #22

Open gjermundgaraba opened 3 months ago

gjermundgaraba commented 3 months ago

The current implementation of the ICS20Lib requires the keys in the transfer packet data JSON to be in a specific order. If any keys are out of order, the parsing fails.

If we found a way to support parsing it in any order, it would be great, but we need to consider the gas cost, and ideally keep the best-case scenario to more or less the same gas as now.

Another issue is that the JSON parsing would fail if there are any missing or added fields. The only optional field at this point is the memo field. So we should figure out what we want to allow for and update that.