You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have inline unpacking taking place in our encoding functions, but do not support packing within our decoding function. Furthermore, we are unnecessarily using an unpacking loop statement on non-padded types within our encoding functions..
How can it be fixed
We should create two new operations (pack and unpack) that take in a segment of memory and unpack or pack the content. These operations should then be used inside of our ABI encode/decode operations in cases where the padded_size and data_size of the inner type of an ABI array are not equal. In cases where they are equal (i.e. u256 arrays and bytes) we just copy or return the entire segment of memory without modifying the content.
The text was updated successfully, but these errors were encountered:
What is wrong?
We currently have inline unpacking taking place in our encoding functions, but do not support packing within our decoding function. Furthermore, we are unnecessarily using an unpacking loop statement on non-padded types within our encoding functions..
How can it be fixed
We should create two new operations (
pack
andunpack
) that take in a segment of memory and unpack or pack the content. These operations should then be used inside of our ABI encode/decode operations in cases where thepadded_size
anddata_size
of the inner type of an ABI array are not equal. In cases where they are equal (i.e.u256
arrays andbytes
) we just copy or return the entire segment of memory without modifying the content.The text was updated successfully, but these errors were encountered: