Solidity-RLP icon indicating copy to clipboard operation
Solidity-RLP copied to clipboard

The list decoding of 0xc0c000880000000000000000 returns is 3 long list

Open Flydexo opened this issue 2 years ago • 0 comments

The following code

bytes memory data = hex"c0c000880000000000000000";
RLPReader.RLPItem memory RLPData = RLPReader.toRlpItem(data);
RLPReader.RLPItem[] memory arguments = RLPReader.toList(RLPData);

Does not revert where it should because this is not RLP at all, it starts with a list with 0 length and then continues with another 0 length list as all other RLP implementations (JS, python, rust and web revert)

And more wierdly it returns a 3 length list

Flydexo avatar Jun 11 '23 10:06 Flydexo