Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Invalid contract output parsing #443

@karalabe

Description

@karalabe

I have the following output ABI definition for a contract call:

[{"name":"major","type":"uint32"},{"name":"minor","type":"uint32"},{"name":"patch","type":"uint32"},{"name":"commit","type":"bytes20"},{"name":"pass","type":"address[]"},{"name":"fail","type":"address[]"}]

Calling the specific method returns the following EVM output:

000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000945e4c7991a3d210c5efc1a2cb8feeabad7cb9ca0000000000000000000000000000000000000000000000000000000000000000

Web3 (at least the one included in Geth) parses this as:

[1, 2, 4, "0x0000000000000000000000000000000000000004", ["0x0000000000000000000000000000000000000002"], []]

Whereas the Go ABI parser parses it (corrently) as:

{"Major": 1, "Minor": 2, "Patch": 4, "Commit": "0x0000000000000000000000000000000000000004", "Pass": ["0x945e4c7991a3d210c5efc1a2cb8feeabad7cb9ca"], "Fail": []}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions