Skip to content

chisel: ABI-encoded values incorrectly displayed when dumped #5253

Open
@Sabnock01

Description

@Sabnock01

Component

Chisel

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

chisel 0.1.1 (f9fc929 2023-06-29T00:05:24.689819239Z)

What command(s) is the bug in?

chisel

Operating System

Linux

Describe the bug

When dumping an ABI-encoded value in chisel, the entire value is put into the Contents section, this includes the words containing the offset and length. chisel will then derive it's own offset and length from this total value.

Compare the following example in chisel vs forge test output:
image
Note that revertStringOne's offset 0x20 and length 0x0f are both in the Contents and the offset and length as shown are derived from the total 96 bytes while both decoded and revertStringTwo have their own offset and length where none should exist.

This forge test displays the values as one would expect.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions