Skip to content

abi-encode and calldata accept redundant arguments #5053

@CodeSandwich

Description

@CodeSandwich

Component

Cast

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (33f3fee 2023-05-26T00:03:48.457406188Z)

What command(s) is the bug in?

cast abi-encode, cast calldata

Operating System

Linux

Describe the bug

Redundant arguments for cast abi-encode and cast calldata are ignored, but an error should be raised, because the user clearly made a mistake. For example both cast abi-encode "function(uint8)" 123 567 and cast calldata "function(uint8)" 123 567 simply ignore 567, which can lead to uncaught bugs and unexpected results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-castCommand: castT-bugType: bugfirst issueA good way to start contributing

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions