Skip to content

feat(script): expose tempo wallet session wrapper#15112

Merged
0xKarl98 merged 10 commits into
foundry-rs:masterfrom
0xKarl98:script_wrapper
Jun 9, 2026
Merged

feat(script): expose tempo wallet session wrapper#15112
0xKarl98 merged 10 commits into
foundry-rs:masterfrom
0xKarl98:script_wrapper

Conversation

@0xKarl98

@0xKarl98 0xKarl98 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Step closer to OSS-162 :
"Also expose forge script --session ... as a thin wrapper that does this implicitly."

Exposing forge script --session as a thin wrapper around cast wallet session --for .

The wrapper creates a temporary scoped access key, runs the reconstructed forge script command with it, and lets cast revoke the session on exit.

It also forwards the required session policy, root signer, RPC, and transport options to the outer cast wallet session process,
strips wrapper-only flags from the inner script command, and clears inherited Tempo/access-key signer environment variables to avoid stale signer resolution.

@0xKarl98 0xKarl98 requested a review from stevencartavia as a code owner June 9, 2026 06:16
@0xKarl98 0xKarl98 changed the title Script wrapper feat(script): expose tempo wallet session wrapper Jun 9, 2026
@0xKarl98 0xKarl98 marked this pull request as draft June 9, 2026 06:47
@0xKarl98 0xKarl98 marked this pull request as ready for review June 9, 2026 07:15
Comment thread crates/script/src/lib.rs Outdated
Comment on lines +752 to +754
/// Arguments that make `forge script` a thin wrapper around `cast wallet session --for`.
#[derive(Clone, Debug, Default, Args)]
pub struct ScriptWalletSessionArgs {

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.

This file (crates/script/src/lib.rs) is already huge and quite messy, let's extract these tempo things ?

@0xKarl98 0xKarl98 Jun 9, 2026

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 extracted into crates/script/src/wallet_session.rs

mattsse
mattsse previously approved these changes Jun 9, 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

@0xKarl98 0xKarl98 enabled auto-merge (squash) June 9, 2026 08:22
@0xKarl98 0xKarl98 merged commit 376e505 into foundry-rs:master Jun 9, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Jun 9, 2026
@0xKarl98 0xKarl98 deleted the script_wrapper branch June 9, 2026 11:11
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