Skip to content

feat(cast): enable cast calldata (or any such commands) to take --file as input argument. #10013

@AdvayAgrawal

Description

@AdvayAgrawal

Component

Cast

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.0.0-stable

What version of Foundryup are you on?

foundryup: 0.3.3

What command(s) is the bug in?

cast calldata

Operating System

Windows

Describe the bug

Note: I am using WSL on Windows.

Reference contract: 0x9641d764fc13c8B624c04430C7356C1C7C8102e2, on BSC

In the given contract, I wanted to call a function named "multiSend(bytes)", with the bytes being a concatenated set of 454 transactions. Mentioned the data and calldata to be verified below

calldata.txt
data.txt

Before signing the transaction, i wanted to make sure the calldata is right, so i simply ran the command
cast calldata "multiSend(bytes)" <big parameter>, and the command reverted with message: bash: /home/advay/.foundry/bin/cast: Argument list too long

I couldn't find an alternative/workaround to this, so i had to sign the transaction without properly verifying calldata.
Let me know if there is a solution to this. Thanks

Possible improvement: Enable cast calldata (or any such commands) to take a file as input argument.

Metadata

Metadata

Assignees

Labels

C-castCommand: castT-featureType: featurefirst issueA good way to start contributing

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions