Cadence may not be adding a built-in library for encoding and decoding any time soon, so it might be useful to create a temporary one for now to fulfil the existing demands of the developers related to that.
The encoding and decoding library can be used to provide the generic function parameters, and it is also useful to sign the encoded data stream.
Suggest A Solution
Create an immutable smart contract without a state that would have the encode and decode functions, which will take two arrays of arguments, One would be the values, and the other would be the corresponding types.
We have to define the standard encoding scheme that we wanna have for the cadence, For reference, we can learn from this
Issue To Be Solved
Cadence may not be adding a built-in library for encoding and decoding any time soon, so it might be useful to create a temporary one for now to fulfil the existing demands of the developers related to that.
The encoding and decoding library can be used to provide the generic function parameters, and it is also useful to sign the encoded data stream.
Suggest A Solution
encode
anddecode
functions, which will take two arrays of arguments, One would be the values, and the other would be the corresponding types.We have to define the standard encoding scheme that we wanna have for the cadence, For reference, we can learn from this