Replies: 1 comment 3 replies
-
do functions in this contract help you decode? https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-stdlib/sources/from_bcs.move I'm not familiar with decoding/encoding, so please bear with me |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Discord user ID
No response
Describe your question in detail.
Hey, I'm implementing IBC protocol in aptos-move. Some of the
entry
functions we have expectsproof
parameter which should be just arbitrary bytes as the protocol spec suggests. Thisproof
is then decoded by the corresponding light client (the proof type might change based on the light client).To do this, we tried to use
Any
because it's not allowed to decode bytes into arbitrary types. But then realizedAny
is not allowed as a transaction parameter. Then we tried having a function to manually decode arbitrary bytes usingbcs
but again realized that there is no support for partial decoding (peel) similar to here.For now we are using our protobuf helpers to decode arbitrary types. But I would love to not do that and just be able to encode/decode as easy as possible. Is there a way to achieve this?
What error, if any, are you getting?
No response
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
Linux (Ubuntu, Fedora, Windows WSL, etc.)
Which SDK or tool are you using? (if any)
N/A
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions