Expand description
forge script --session CLI wrapper support.
This module translates forge-specific --session-* flags into the outer
cast wallet session --for invocation and keeps those wrapper details out of the main script
execution flow.
Re-exportsยง
use crate::ScriptArgs;๐use alloy_primitives::Address;๐use clap::Args;๐use eyre::Result;๐use eyre::WrapErr;๐use foundry_cli::opts::TEMPO_SESSION_ID_ENV;๐use foundry_cli::utils::LoadConfig;๐use foundry_config::Config;๐use std::ffi::OsStr;๐use std::ffi::OsString;๐use std::path::Path;๐use std::path::PathBuf;๐use std::process::Command;๐
Structsยง
- Script
Wallet Session Args - Arguments that make
forge scripta thin wrapper aroundcast wallet session --for. - Wallet
Session ๐Command
Constantsยง
Functionsยง
- push_
arg ๐ - push_
opt_ ๐arg - push_
repeated_ ๐args - quote_
arg ๐ - Quotes one argv item for
--forwhile preserving the exact value after shell-style splitting. - quote_
command ๐ - Converts the reconstructed inner argv into the single command string accepted by
cast wallet session --for. - sibling_
binary ๐ - Resolves a sibling Foundry binary first, falling back to
PATHfor source-tree test binaries. - strip_
wallet_ ๐session_ args - Removes
forge script --sessionwrapper flags from the command passed to--for.