Skip to content

refactor(script): isolate Tempo session signer handling#15089

Merged
mattsse merged 6 commits into
foundry-rs:masterfrom
0xKarl98:wrapper
Jun 7, 2026
Merged

refactor(script): isolate Tempo session signer handling#15089
mattsse merged 6 commits into
foundry-rs:masterfrom
0xKarl98:wrapper

Conversation

@0xKarl98

@0xKarl98 0xKarl98 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Towards OSS-162 ,

Extract the Forge script Tempo session signer policy into script::session, including:

  • scoped signer identity by (chain, sender)
  • remaining unsigned transaction signer lookup data
  • single-session-sender validation
  • insertion of a live session access key only when it covers the remaining transaction set

broadcast.rs now uses this module when preparing raw signer maps, and build.rs uses the same scope model when checking whether a resumed script has all required signers available.

Also adds a CLI regression test for cast wallet session --for "<forge> script ... --broadcast" and updates the test utility helper that builds sibling Foundry binaries so it preserves the current Cargo target directory and profile.

@0xKarl98 0xKarl98 changed the title Wrapper refactor(script): isolate Tempo session signer handling Jun 6, 2026
mattsse
mattsse previously approved these changes Jun 6, 2026

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

stevencartavia
stevencartavia previously approved these changes Jun 6, 2026
mablr
mablr previously approved these changes Jun 6, 2026
mablr
mablr previously requested changes Jun 6, 2026

@mablr mablr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm, just a smol nit on test :)

Comment thread crates/cast/tests/cli/keychain.rs Outdated
);

let for_command = format!(
"{} script {} --tc SessionForgeScript --broadcast --rpc-url {} --root {}",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wallet_session_run_for_forge_script_submits_with_session_key reaches timeout (90s).

The test only needs to prove the session key path submits and writes a broadcast hash, so using the full forge script default timeout (120s) is unnecessary. Setting explicitly a lower timeout should fix this test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Have fixed !

@0xKarl98 0xKarl98 dismissed stale reviews from stevencartavia and mattsse via c545062 June 7, 2026 01:36
@0xKarl98 0xKarl98 enabled auto-merge (squash) June 7, 2026 01:46
@0xKarl98 0xKarl98 requested a review from mablr June 7, 2026 01:47
@mattsse mattsse dismissed mablr’s stale review June 7, 2026 07:45

completed

@mattsse mattsse disabled auto-merge June 7, 2026 07:45
@mattsse mattsse merged commit 43ed279 into foundry-rs:master Jun 7, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Jun 7, 2026
@0xKarl98 0xKarl98 deleted the wrapper branch June 7, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants