Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
AdvayAgrawal opened this issue Mar 5, 2025 · 3 comments
Open
2 tasks done
Assignees
Labels
C-cast Command: cast first issue A good way to start contributing T-feature Type: feature

Comments

@AdvayAgrawal
Copy link

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.

@AdvayAgrawal AdvayAgrawal added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Mar 5, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Mar 5, 2025
@zerosnacks zerosnacks added T-feature Type: feature and removed T-bug Type: bug labels Mar 5, 2025
@zerosnacks zerosnacks changed the title Unable to create calldata for functions with huge parameters feat(cast): enable cast calldata (or any such commands) to take --file as input argument. Mar 5, 2025
@zerosnacks zerosnacks added C-cast Command: cast first issue A good way to start contributing and removed T-needs-triage Type: this issue needs to be labelled labels Mar 5, 2025
@DarkLord017
Copy link

Hey @zerosnacks , can i work on this issue ?

@grandizzy
Copy link
Collaborator

Hey @zerosnacks , can i work on this issue ?

assigned, thank you!

@AdvayAgrawal
Copy link
Author

Hi @DarkLord017,
Just curious about the progress on this. Is there a PR linked to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast first issue A good way to start contributing T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

4 participants