Closed JacoboLansac closed 2 hours ago
encodePacked
does not pad address with 0 bytes producing invalid abi encoding which can't be decoded by abi.encode
abi.encode(addr1, value1)
:
0x000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000186a0
abi.encodePacked(addr1, value1)
:
0x123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000
Component
Chisel
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (c3069a5 2024-11-05T00:22:10.424475717Z)
What command(s) is the bug in?
abi.decode()
after callingabi.encodePacked()
Operating System
Linux
Describe the bug
The revert looks like this: