Skip to content
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

fix(cast): reset env.tx.caller for impersonated txs #9544

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Conversation

yash-atreya
Copy link
Member

Motivation

Closes #9541

Solution

Reset env.tx.caller to tx.from for impersonated txs

@yash-atreya yash-atreya marked this pull request as ready for review December 12, 2024 08:55
@yash-atreya yash-atreya enabled auto-merge (squash) December 12, 2024 08:58
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

lgtm, minor nit, pls check

crates/cast/bin/cmd/run.rs Outdated Show resolved Hide resolved
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

lgtm

@yash-atreya yash-atreya merged commit 2eec098 into master Dec 12, 2024
22 checks passed
@yash-atreya yash-atreya deleted the yash/fix-9541 branch December 12, 2024 10:10
@@ -251,6 +257,12 @@ impl RunArgs {

configure_tx_env(&mut env, &tx.inner);

if is_impersonated_tx(&tx.inner.inner) {
Copy link
Member

Choose a reason for hiding this comment

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

should this be moved to configure_tx_env?

@grandizzy grandizzy added T-bug Type: bug C-cast Command: cast labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-bug Type: bug
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

cast run fails on transactions that used an impersonated address
4 participants