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
In the encodeSingle function, addresses are translated to unit160, so far so good.
Then the recursive call hits the uint-like check and the supplied size (i.e., 160) is retrieved. However, BN's toArrayLike function is called with a fix 32 bytes length. Which is fine, since the EVM operates with this word length, except for the addresses.
@axic Can you confirm whether this is the intended behavior? AFAIK, addresses should be 20 bytes, in which case encodeSingle must retain the information during the recursive call that it's encoding an address (or generally, whether it should respect the parsed size). I don't know how this behavior manifests with more exotic function signatures.
The text was updated successfully, but these errors were encountered:
In the
encodeSingle
function, addresses are translated tounit160
, so far so good.Then the recursive call hits the uint-like check and the supplied size (i.e., 160) is retrieved. However, BN's
toArrayLike
function is called with a fix 32 bytes length. Which is fine, since the EVM operates with this word length, except for the addresses.@axic Can you confirm whether this is the intended behavior? AFAIK, addresses should be 20 bytes, in which case
encodeSingle
must retain the information during the recursive call that it's encoding an address (or generally, whether it should respect the parsed size). I don't know how this behavior manifests with more exotic function signatures.The text was updated successfully, but these errors were encountered: