Skip to content

feat(cast mktx): add support for "--ethsign" option #10641

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

mablr
Copy link
Contributor

@mablr mablr commented May 26, 2025

Motivation

Resolve #10629 by adding "--ethsign" option to cast mktx command.

Solution

  • Sign transactions using "eth_signTransaction" on local node with unlocked accounts.
  • Same TX building logic as in "cast send --unlocked".
  • Added a test case to validate the new functionality.

Remarks

This new "--ethsign" option conflicts with "--raw-unsigned", this is properly declared in the Clap macro.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@mablr mablr marked this pull request as draft May 26, 2025 21:27
@mablr mablr force-pushed the feature/cast-mktx-ethsign branch from cc97a3b to 0301a53 Compare May 26, 2025 21:45
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice,

only have a smol nit

@mattsse mattsse added T-feature Type: feature C-cast Command: cast labels May 26, 2025
@mattsse mattsse marked this pull request as ready for review May 26, 2025 21:52
mattsse
mattsse previously approved these changes May 26, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

- Sign transactions using "eth_signTransaction" on local node with unlocked accounts.
- Same TX building logic as in "cast send --unlocked".
- Added a test case to validate the new functionality.
@mablr mablr force-pushed the feature/cast-mktx-ethsign branch from 2e35b7e to f8db86b Compare May 26, 2025 22:12
@mablr
Copy link
Contributor Author

mablr commented May 26, 2025

I fixed everything and squashed intermediate commits. Thanks @mattsse for your feedback!

@mattsse mattsse enabled auto-merge (squash) May 26, 2025 22:32
@mattsse mattsse merged commit 496598b into foundry-rs:master May 26, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry May 26, 2025
Dargon789 pushed a commit to Dargon789/foundry that referenced this pull request May 28, 2025
- Sign transactions using "eth_signTransaction" on local node with unlocked accounts.
- Same TX building logic as in "cast send --unlocked".
- Added a test case to validate the new functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-feature Type: feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

cast sign-tx
2 participants