diff --git a/projects/cheatcodes/test/BlastMock.t.sol b/projects/cheatcodes/test/BlastMock.t.sol index 62b6bf8ca..ca1869298 100644 --- a/projects/cheatcodes/test/BlastMock.t.sol +++ b/projects/cheatcodes/test/BlastMock.t.sol @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; // Firstly, we implement a mock emulating the actual precompile behavior contract YieldMock { @@ -38,4 +38,4 @@ contract SomeBlastTest is Test { function testSomething() public { // Now we can interact with Blast contracts without reverts } -} \ No newline at end of file +} diff --git a/projects/cheatcodes/test/EmitContract.t.sol b/projects/cheatcodes/test/EmitContract.t.sol index 9b7439456..7756324d5 100644 --- a/projects/cheatcodes/test/EmitContract.t.sol +++ b/projects/cheatcodes/test/EmitContract.t.sol @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract EmitContractTest is Test { event Transfer(address indexed from, address indexed to, uint256 amount); diff --git a/projects/cheatcodes/test/OwnerUpOnly.t.sol b/projects/cheatcodes/test/OwnerUpOnly.t.sol index 9b43bea18..79cd3dbff 100644 --- a/projects/cheatcodes/test/OwnerUpOnly.t.sol +++ b/projects/cheatcodes/test/OwnerUpOnly.t.sol @@ -3,7 +3,7 @@ // ANCHOR: prelude pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; error Unauthorized(); // ANCHOR_END: prelude diff --git a/projects/fuzz_testing/test/Safe.t.sol b/projects/fuzz_testing/test/Safe.t.sol index c1cd8de9b..a059d39c6 100644 --- a/projects/fuzz_testing/test/Safe.t.sol +++ b/projects/fuzz_testing/test/Safe.t.sol @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract Safe { receive() external payable {} diff --git a/projects/fuzz_testing/test/Safe.t.sol.1 b/projects/fuzz_testing/test/Safe.t.sol.1 index 42cbad3ad..4df224ba6 100644 --- a/projects/fuzz_testing/test/Safe.t.sol.1 +++ b/projects/fuzz_testing/test/Safe.t.sol.1 @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract Safe { receive() external payable {} diff --git a/projects/fuzz_testing/test/Safe.t.sol.2 b/projects/fuzz_testing/test/Safe.t.sol.2 index 0d724b4ab..b6d3b8976 100644 --- a/projects/fuzz_testing/test/Safe.t.sol.2 +++ b/projects/fuzz_testing/test/Safe.t.sol.2 @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract Safe { receive() external payable {} diff --git a/projects/fuzz_testing/test/Safe.t.sol.3 b/projects/fuzz_testing/test/Safe.t.sol.3 index c1cd8de9b..a059d39c6 100644 --- a/projects/fuzz_testing/test/Safe.t.sol.3 +++ b/projects/fuzz_testing/test/Safe.t.sol.3 @@ -2,7 +2,7 @@ // ANCHOR: all pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract Safe { receive() external payable {} diff --git a/projects/test_filters/test/ComplicatedContract.t.sol b/projects/test_filters/test/ComplicatedContract.t.sol index 7e3977ad1..e68a7d85d 100644 --- a/projects/test_filters/test/ComplicatedContract.t.sol +++ b/projects/test_filters/test/ComplicatedContract.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract ComplicatedContractTest is Test { function test_DepositERC20() public pure { diff --git a/projects/test_filters/test/ContractB.t.sol b/projects/test_filters/test/ContractB.t.sol index 2aa12c16e..379f4e135 100644 --- a/projects/test_filters/test/ContractB.t.sol +++ b/projects/test_filters/test/ContractB.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract ContractBTest is Test { function testExample() public { diff --git a/projects/writing_tests/test/Basic.t.sol b/projects/writing_tests/test/Basic.t.sol index 45df22a7a..837da365a 100644 --- a/projects/writing_tests/test/Basic.t.sol +++ b/projects/writing_tests/test/Basic.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.10; // ANCHOR: import -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; // ANCHOR_END: import contract ContractBTest is Test { diff --git a/projects/writing_tests/test/Basic2.t.sol b/projects/writing_tests/test/Basic2.t.sol index dde81d4f1..bf4e78e7e 100644 --- a/projects/writing_tests/test/Basic2.t.sol +++ b/projects/writing_tests/test/Basic2.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.10; // ANCHOR: import -import "forge-std/Test.sol"; +import {Test, stdError} from "forge-std/Test.sol"; // ANCHOR_END: import contract ContractBTest is Test { diff --git a/scripts/gen_output/help.rs b/scripts/gen_output/help.rs index fc63fdac3..c321b6aed 100755 --- a/scripts/gen_output/help.rs +++ b/scripts/gen_output/help.rs @@ -11,8 +11,8 @@ regex = "1" use clap::Parser; use regex::Regex; use std::borrow::Cow; -use std::fs::{self, File}; -use std::io::{self, Write}; +use std::fs; +use std::io; use std::iter::once; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; @@ -46,11 +46,11 @@ macro_rules! regex { #[command(about, long_about = None)] struct Args { /// Root directory - #[arg(long, default_value_t = String::from("."))] - root_dir: String, + #[arg(long, default_value = ".")] + root_dir: PathBuf, /// Indentation for the root SUMMARY.md file - #[arg(long, default_value_t = 2)] + #[arg(long, default_value = "2")] root_indentation: usize, /// Output directory @@ -98,7 +98,7 @@ fn main() -> io::Result<()> { .commands .iter() .rev() // reverse to keep the order (pop) - .map(Cmd::new) + .map(|path| Cmd::new(path, vec![])) .collect(); let mut output = Vec::new(); @@ -106,11 +106,7 @@ fn main() -> io::Result<()> { while let Some(cmd) = todo_iter.pop() { let (new_subcmds, stdout) = get_entry(&cmd)?; if args.verbose && !new_subcmds.is_empty() { - println!( - "Found subcommands for \"{}\": {:?}", - cmd.command_name(), - new_subcmds - ); + println!("Found subcommands for `{cmd}`: {}", new_subcmds.join(", ")); } // Add new subcommands to todo_iter (so that they are processed in the correct order). for subcmd in new_subcmds.into_iter().rev() { @@ -121,10 +117,7 @@ fn main() -> io::Result<()> { .chain(once(subcmd)) .collect(); - todo_iter.push(Cmd { - cmd: cmd.cmd, - subcommands: new_subcmds, - }); + todo_iter.push(Cmd::new(cmd.cmd, new_subcmds)); } output.push((cmd, stdout)); } @@ -147,7 +140,7 @@ fn main() -> io::Result<()> { if args.readme { let path = &out_dir.join("README.md"); if args.verbose { - println!("Writing README.md to \"{}\"", path.to_string_lossy()); + println!("Writing README.md to {}", path.display()); } write_file(path, README)?; } @@ -162,9 +155,9 @@ fn main() -> io::Result<()> { }) .collect(); - let path = Path::new(args.root_dir.as_str()); + let path = &args.root_dir; if args.verbose { - println!("Updating root summary in \"{}\"", path.to_string_lossy()); + println!("Updating root summary in {}", path.display()); } update_root_summary(path, &root_summary)?; } @@ -178,7 +171,7 @@ fn get_entry(cmd: &Cmd) -> io::Result<(Vec, String)> { .args(&cmd.subcommands) .arg("--help") .env("NO_COLOR", "1") - .env("COLUMNS", "100") + .env("COLUMNS", "80") .env("LINES", "10000") .stdout(Stdio::piped()) .output()?; @@ -227,7 +220,7 @@ fn parse_sub_commands(s: &str) -> Vec { fn cmd_markdown(out_dir: &Path, cmd: &Cmd, stdout: &str) -> io::Result<()> { let out = format!("# {}\n\n{}", cmd, help_markdown(cmd, stdout)); - let out_path = out_dir.join(cmd.to_string().replace(" ", "/")); + let out_path = out_dir.join(cmd.md_path()); fs::create_dir_all(out_path.parent().unwrap())?; write_file(&out_path.with_extension("md"), &out)?; @@ -237,12 +230,8 @@ fn cmd_markdown(out_dir: &Path, cmd: &Cmd, stdout: &str) -> io::Result<()> { /// Returns the markdown for a command's help output. fn help_markdown(cmd: &Cmd, stdout: &str) -> String { let (description, s) = parse_description(stdout); - format!( - "{}\n\n```bash\n$ {} --help\n{}\n```", - description, - cmd, - preprocess_help(s.trim()) - ) + let help = preprocess_help(s.trim()); + format!("{description}\n\n```bash\n$ {cmd} --help\n```\n\n```txt\n{help}\n```") } /// Splits the help output into a description and the rest. @@ -258,14 +247,13 @@ fn parse_description(s: &str) -> (&str, &str) { /// Returns the summary for a command and its subcommands. fn cmd_summary(md_root: Option, cmd: &Cmd, indent: usize) -> String { - let cmd_s = cmd.to_string(); - let cmd_path = cmd_s.replace(" ", "/"); + let cmd_path = cmd.md_path(); let full_cmd_path = match md_root { None => cmd_path, Some(md_root) => format!("{}/{}", md_root.to_string_lossy(), cmd_path), }; let indent_string = " ".repeat(indent + (cmd.subcommands.len() * 2)); - format!("{}- [`{}`](./{}.md)\n", indent_string, cmd_s, full_cmd_path) + format!("{indent_string}- [`{cmd}`](./{full_cmd_path}.md)\n") } /// Replaces the CLI_REFERENCE section in the root SUMMARY.md file. @@ -297,8 +285,7 @@ fn update_root_summary(root_dir: &Path, root_summary: &str) -> io::Result<()> { .replace(&original_summary_content, replace_with.as_str()) .to_string(); - let mut root_summary_file = File::create(&summary_file)?; - root_summary_file.write_all(new_root_summary.as_bytes()) + fs::write(&summary_file, &new_root_summary) } /// Preprocesses the help output of a command. @@ -322,15 +309,34 @@ fn preprocess_help(s: &str) -> Cow<'_, str> { s } +/// Command with subcommands. #[derive(Hash, Debug, PartialEq, Eq)] struct Cmd<'a> { - /// path to binary (e.g. ./target/debug/reth) + /// Path to the binary file (e.g. ./target/debug/reth). cmd: &'a Path, - /// subcommands (e.g. [db, stats]) + /// Subcommands (e.g. [db, stats]). subcommands: Vec, } impl<'a> Cmd<'a> { + #[track_caller] + fn new(cmd: &'a Path, subcommands: Vec) -> Self { + let cmd = Self { cmd, subcommands }; + cmd.assert(); + cmd + } + + #[track_caller] + fn assert(&self) { + for subcmd in &self.subcommands { + assert!(!subcmd.is_empty(), "subcommand is empty"); + assert!( + subcmd.chars().all(|c| !c.is_whitespace()), + "subcommand contains invalid characters: {subcmd}" + ); + } + } + fn command_name(&self) -> &str { self.cmd .file_name() @@ -338,20 +344,22 @@ impl<'a> Cmd<'a> { .expect("Expect valid command") } - fn new(cmd: &'a PathBuf) -> Self { - Self { - cmd, - subcommands: Vec::new(), + fn md_path(&self) -> String { + self.join_s("/") + } + + fn join_s(&self, sep: &str) -> String { + let mut joined = self.command_name().to_string(); + for subcmd in &self.subcommands { + joined.push_str(sep); + joined.push_str(subcmd); } + joined } } impl<'a> fmt::Display for Cmd<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.command_name())?; - if !self.subcommands.is_empty() { - write!(f, " {}", self.subcommands.join(" "))?; - } - Ok(()) + self.join_s(" ").fmt(f) } } diff --git a/src/cheatcodes/parse-json.md b/src/cheatcodes/parse-json.md index 698143074..cf66cbeba 100644 --- a/src/cheatcodes/parse-json.md +++ b/src/cheatcodes/parse-json.md @@ -186,7 +186,7 @@ If your JSON object has `hex numbers`, they will be encoded as bytes. The way to ### How to use StdJson -1. Import the library `import "../StdJson.sol";` +1. Import the library `import {stdJson} from "forge-std/StdJson.sol";` 2. Define its usage with `string`: `using stdJson for string;` 3. If you want to parse simple values (numbers, address, etc.) use the helper functions 4. If you want to parse entire JSON objects: diff --git a/src/cheatcodes/parse-toml.md b/src/cheatcodes/parse-toml.md index 205f38e41..2352654c1 100644 --- a/src/cheatcodes/parse-toml.md +++ b/src/cheatcodes/parse-toml.md @@ -217,7 +217,7 @@ for (uint256 i = 0; i < fruitstall.apples.length; i++) { ### How to use StdToml -1. Import the library `import "../StdToml.sol";` +1. Import the library `import {stdToml} from "forge-std/StdToml.sol";` 2. Define its usage with `string`: `using stdToml for string;` 3. If you want to parse simple values (numbers, address, etc.) use the helper functions 4. If you want to parse entire TOML tables: diff --git a/src/config/vscode.md b/src/config/vscode.md index 184b1b027..5e388c879 100644 --- a/src/config/vscode.md +++ b/src/config/vscode.md @@ -86,5 +86,5 @@ Add line to `.vscode/settings.json` file (solidity extension settings): Now all contracts from the OpenZeppelin documentation can be used. ```javascript -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; ``` diff --git a/src/faq.md b/src/faq.md index 48c7f07ae..b26b0ff92 100644 --- a/src/faq.md +++ b/src/faq.md @@ -61,7 +61,7 @@ Alternatively, you can use [Forge Std][forge-std] which comes bundled with `cons you have to import it: ```solidity -import "forge-std/console.sol"; +import {console} from "forge-std/console.sol"; ``` ### How do I run specific tests? diff --git a/src/forge/differential-ffi-testing.md b/src/forge/differential-ffi-testing.md index ad056f2c4..6420e61fb 100644 --- a/src/forge/differential-ffi-testing.md +++ b/src/forge/differential-ffi-testing.md @@ -23,7 +23,7 @@ Below are some examples of how Forge is used for differential testing. [`ffi`](../cheatcodes/ffi.md) allows you to execute an arbitrary shell command and capture the output. Here's a mock example: ```solidity -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract TestContract is Test { @@ -90,7 +90,7 @@ Finally, the test asserts that the both roots are exactly equal. If they are not You may want to use differential testing against another Solidity implementation. In that case, `ffi` is not needed. Instead, the reference implementation is imported directly into the test. ```solidity -import "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; +import {MerkleProof} from "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; //... function testCompatibilityOpenZeppelinProver(bytes32[] memory _data, uint256 node) public { vm.assume(_data.length > 1); diff --git a/src/forge/forge-std.md b/src/forge/forge-std.md index 0413db230..2c0b360ff 100644 --- a/src/forge/forge-std.md +++ b/src/forge/forge-std.md @@ -14,7 +14,7 @@ It provides all the essential functionality you need to get started writing test Simply import `Test.sol` and inherit from `Test` in your test contract: ```solidity -import "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; contract ContractTest is Test { ... ``` @@ -38,17 +38,17 @@ deal(address(dai), alice, 10000e18); To import the `Vm` interface or the `console` library individually: ```solidity -import "forge-std/Vm.sol"; +import {Vm} from "forge-std/Vm.sol"; ``` ```solidity -import "forge-std/console.sol"; +import {console} from "forge-std/console.sol"; ``` **Note:** `console2.sol` contains patches to `console.sol` that allows Forge to decode traces for calls to the console, but it is not compatible with Hardhat. ```solidity -import "forge-std/console2.sol"; +import {console2} from "forge-std/console2.sol"; ``` ### Standard libraries diff --git a/src/projects/dependencies.md b/src/projects/dependencies.md index f0dee0f13..7030cf0cc 100644 --- a/src/projects/dependencies.md +++ b/src/projects/dependencies.md @@ -60,7 +60,7 @@ remappings = [ Now we can import any of the contracts in `src/utils` of the solmate repository like so: ```solidity -import "@solmate-utils/LibString.sol"; +import {LibString} from "@solmate-utils/LibString.sol"; ``` ### Updating dependencies diff --git a/src/projects/soldeer.md b/src/projects/soldeer.md index 0b085c9f3..93f3c6277 100644 --- a/src/projects/soldeer.md +++ b/src/projects/soldeer.md @@ -175,7 +175,7 @@ You are at risk to push sensitive files to the central repository that then can Furthermore, we've implemented a warning that it will be triggered if you try to push a project that contains any `.dot` files/directories. If you want to skip this warning, you can just use ```bash -forge soldeer push my-project~1.0.0 --skip-warnings true +forge soldeer push my-project~1.0.0 --skip-warnings ``` @@ -184,11 +184,11 @@ forge soldeer push my-project~1.0.0 --skip-warnings true In case you want to simulate what would happen if you push a version, you can use the `--dry-run` flag. This will create a zip file that you can inspect before pushing it to the central repository. ```bash -forge soldeer push my-project~1.0.0 --dry-run true +forge soldeer push my-project~1.0.0 --dry-run ``` #### Login Data -By default, Soldeer saves the login token in the `~/.soldeer/.soldeer_login` file. If you want to save that token to another location, you need to set the environment variable `SOLDEER_LOGIN_FILE`. +By default, Soldeer saves the login token in the `~/.soldeer/.soldeer_login` file, which is used to push files to the central repository. If you prefer to save the token in a different location, you can set the environment variable `SOLDEER_LOGIN_FILE`. > **Warning** ⚠️ diff --git a/src/reference/cli/anvil.md b/src/reference/cli/anvil.md index 7645f0e1f..3d53ee192 100644 --- a/src/reference/cli/anvil.md +++ b/src/reference/cli/anvil.md @@ -4,6 +4,9 @@ A fast local Ethereum development node ```bash $ anvil --help +``` + +```txt Usage: anvil [OPTIONS] [COMMAND] Commands: @@ -36,9 +39,11 @@ Options: [default: m/44'/60'/0'/0/] --dump-state - Dump the state and block environment of chain on exit to the given file. + Dump the state and block environment of chain on exit to the given + file. - If the value is a directory, the state will be written to `/state.json`. + If the value is a directory, the state will be written to + `/state.json`. -h, --help Print help (see a summary with '-h') @@ -46,13 +51,15 @@ Options: --hardfork The EVM hardfork to use. - Choose the hardfork by name, e.g. `shanghai`, `paris`, `london`, etc... [default: latest] + Choose the hardfork by name, e.g. `shanghai`, `paris`, `london`, + etc... [default: latest] --init Initialize the genesis block with the given `genesis.json` file --ipc [] - Launch an ipc server at the given path or default path = `/tmp/anvil.ipc` + Launch an ipc server at the given path or default path = + `/tmp/anvil.ipc` [aliases: ipcpath] @@ -60,8 +67,8 @@ Options: Initialize the chain from a previously saved state snapshot -m, --mnemonic - BIP39 mnemonic phrase used for generating accounts. Cannot be used if `mnemonic_random` or - `mnemonic_seed` are used + BIP39 mnemonic phrase used for generating accounts. Cannot be used if + `mnemonic_random` or `mnemonic_seed` are used --max-persisted-states Max number of states to persist on disk. @@ -72,16 +79,16 @@ Options: [aliases: mixed-mining] --mnemonic-random [] - Automatically generates a BIP39 mnemonic phrase, and derives accounts from it. Cannot be - used with other `mnemonic` options. You can specify the number of words you want in the - mnemonic. [default: 12] + Automatically generates a BIP39 mnemonic phrase, and derives accounts + from it. Cannot be used with other `mnemonic` options. You can specify + the number of words you want in the mnemonic. [default: 12] --mnemonic-seed-unsafe - Generates a BIP39 mnemonic phrase from a given seed Cannot be used with other `mnemonic` - options. + Generates a BIP39 mnemonic phrase from a given seed Cannot be used + with other `mnemonic` options. - CAREFUL: This is NOT SAFE and should only be used for testing. Never use the private keys - generated in production. + CAREFUL: This is NOT SAFE and should only be used for testing. Never + use the private keys generated in production. --no-mining Disable auto and interval mining, and mine on demand instead @@ -99,13 +106,15 @@ Options: [default: 8545] --prune-history [] - Don't keep full chain history. If a number argument is specified, at most this number of - states is kept in memory. + Don't keep full chain history. If a number argument is specified, at + most this number of states is kept in memory. - If enabled, no state will be persisted on disk, so `max_persisted_states` will be 0. + If enabled, no state will be persisted on disk, so + `max_persisted_states` will be 0. -s, --state-interval - Interval in seconds at which the state and block environment is to be dumped to disk. + Interval in seconds at which the state and block environment is to be + dumped to disk. See --state and --dump-state @@ -120,8 +129,8 @@ Options: --state This is an alias for both --load-state and --dump-state. - It initializes the chain with the state and block environment stored at the file, if it - exists, and dumps the chain's state on exit. + It initializes the chain with the state and block environment stored + at the file, if it exists, and dumps the chain's state on exit. --timestamp The timestamp of the genesis block @@ -148,11 +157,13 @@ Server options: Disable CORS --no-request-size-limit - Disable the default request body size limit. At time of writing the default limit is 2MB + Disable the default request body size limit. At time of writing the + default limit is 2MB Fork config: --compute-units-per-second - Sets the number of assumed available compute units per second for this provider + Sets the number of assumed available compute units per second for this + provider default value: 330 @@ -160,10 +171,12 @@ Fork config: -f, --fork-url - Fetch state over a remote endpoint instead of starting from an empty state. + Fetch state over a remote endpoint instead of starting from an empty + state. - If you want to fetch state from a specific block number, add a block number like - `http://localhost:8545@1400000` or use the `--fork-block-number` argument. + If you want to fetch state from a specific block number, add a block + number like `http://localhost:8545@1400000` or use the + `--fork-block-number` argument. [aliases: rpc-url] @@ -173,11 +186,12 @@ Fork config: See --fork-url. --fork-chain-id - Specify chain id to skip fetching it from remote endpoint. This enables offline-start - mode. + Specify chain id to skip fetching it from remote endpoint. This + enables offline-start mode. - You still must pass both `--fork-url` and `--fork-block-number`, and already have your - required state cached on disk, anything missing locally would be fetched from the remote. + You still must pass both `--fork-url` and `--fork-block-number`, and + already have your required state cached on disk, anything missing + locally would be fetched from the remote. --fork-header Headers to use for the rpc client, e.g. "User-Agent: test-agent" @@ -219,7 +233,8 @@ Fork config: Default value 5 --timeout - Timeout in ms for requests sent to remote JSON-RPC server in forking mode. + Timeout in ms for requests sent to remote JSON-RPC server in forking + mode. Default value 45000 @@ -233,8 +248,9 @@ Environment config: The chain ID --code-size-limit - EIP-170: Contract code size limit in bytes. Useful to increase this because of tests. To - disable entirely, use `--disable-code-size-limit`. By default, it is 0x6000 (~25kb) + EIP-170: Contract code size limit in bytes. Useful to increase this + because of tests. To disable entirely, use + `--disable-code-size-limit`. By default, it is 0x6000 (~25kb) --disable-block-gas-limit Disable the `call.gas_limit <= block.gas_limit` constraint diff --git a/src/reference/cli/anvil/completions.md b/src/reference/cli/anvil/completions.md index 215058b54..31f5199ef 100644 --- a/src/reference/cli/anvil/completions.md +++ b/src/reference/cli/anvil/completions.md @@ -4,6 +4,9 @@ Generate shell completions script ```bash $ anvil completions --help +``` + +```txt Usage: anvil completions Arguments: diff --git a/src/reference/cli/anvil/generate-fig-spec.md b/src/reference/cli/anvil/generate-fig-spec.md index 098e30a57..c6b2e1888 100644 --- a/src/reference/cli/anvil/generate-fig-spec.md +++ b/src/reference/cli/anvil/generate-fig-spec.md @@ -4,6 +4,9 @@ Generate Fig autocompletion spec ```bash $ anvil generate-fig-spec --help +``` + +```txt Usage: anvil generate-fig-spec Options: diff --git a/src/reference/cli/cast.md b/src/reference/cli/cast.md index 37e3a5767..ea6f69b48 100644 --- a/src/reference/cli/cast.md +++ b/src/reference/cli/cast.md @@ -4,18 +4,25 @@ Perform Ethereum RPC calls from the comfort of your command line ```bash $ cast --help +``` + +```txt Usage: cast Commands: 4byte Get the function signatures for the given selector from https://openchain.xyz [aliases: 4, 4b] - 4byte-decode Decode ABI-encoded calldata using https://openchain.xyz [aliases: 4d, 4bd] - 4byte-event Get the event signature for a given topic 0 from https://openchain.xyz - [aliases: 4e, 4be, topic0-event, t0e] - abi-decode Decode ABI-encoded input or output data [aliases: ad, --abi-decode] - abi-encode ABI encode the given function argument, excluding the selector [aliases: - ae] - access-list Create an access list for a transaction [aliases: ac, acl] + 4byte-decode Decode ABI-encoded calldata using https://openchain.xyz + [aliases: 4d, 4bd] + 4byte-event Get the event signature for a given topic 0 from + https://openchain.xyz [aliases: 4e, 4be, topic0-event, + t0e] + abi-decode Decode ABI-encoded input or output data [aliases: ad, + --abi-decode] + abi-encode ABI encode the given function argument, excluding the + selector [aliases: ae] + access-list Create an access list for a transaction [aliases: ac, + acl] address-zero Prints the zero address [aliases: --address-zero, az] admin Fetch the EIP-1967 admin account [aliases: adm] age Get the timestamp of a block [aliases: a] @@ -24,100 +31,136 @@ Commands: bind Generate a rust binding from a given ABI [aliases: bi] block Get information about a block [aliases: bl] block-number Get the latest block number [aliases: bn] - call Perform a call on an account without publishing a transaction [aliases: c] + call Perform a call on an account without publishing a + transaction [aliases: c] calldata ABI-encode a function with arguments [aliases: cd] - calldata-decode Decode ABI-encoded input data [aliases: --calldata-decode, cdd] + calldata-decode Decode ABI-encoded input data [aliases: + --calldata-decode, cdd] chain Get the symbolic name of the current chain chain-id Get the Ethereum chain ID [aliases: ci, cid] client Get the current client version [aliases: cl] code Get the runtime bytecode of a contract [aliases: co] codehash Get the codehash for an account - codesize Get the runtime bytecode size of a contract [aliases: cs] + codesize Get the runtime bytecode size of a contract [aliases: + cs] completions Generate shell completions script [aliases: com] - compute-address Compute the contract address from a given nonce and deployer address - [aliases: ca] + compute-address Compute the contract address from a given nonce and + deployer address [aliases: ca] concat-hex Concatenate hex strings [aliases: --concat-hex, ch] - create2 Generate a deterministic contract address using CREATE2 [aliases: c2] + create2 Generate a deterministic contract address using CREATE2 + [aliases: c2] decode-eof Decodes EOF container bytes - decode-transaction Decodes a raw signed EIP 2718 typed transaction [aliases: dt, decode-tx] - disassemble Disassembles hex encoded bytecode into individual / human readable opcodes - [aliases: da] + decode-transaction Decodes a raw signed EIP 2718 typed transaction + [aliases: dt, decode-tx] + disassemble Disassembles hex encoded bytecode into individual / + human readable opcodes [aliases: da] estimate Estimate the gas cost of a transaction [aliases: e] - etherscan-source Get the source code of a contract from Etherscan [aliases: et, src] - find-block Get the block number closest to the provided timestamp [aliases: f] - format-bytes32-string Formats a string into bytes32 encoding [aliases: --format-bytes32-string] - from-bin Convert binary data into hex data [aliases: --from-bin, from-binx, fb] - from-fixed-point Convert a fixed point number into an integer [aliases: --from-fix, ff] + etherscan-source Get the source code of a contract from Etherscan + [aliases: et, src] + find-block Get the block number closest to the provided timestamp + [aliases: f] + format-bytes32-string Formats a string into bytes32 encoding [aliases: + --format-bytes32-string] + from-bin Convert binary data into hex data [aliases: --from-bin, + from-binx, fb] + from-fixed-point Convert a fixed point number into an integer [aliases: + --from-fix, ff] from-rlp Decodes RLP hex-encoded data [aliases: --from-rlp] - from-utf8 Convert UTF8 text to hex [aliases: --from-ascii, --from-utf8, from-ascii, - fu, fa] - from-wei Convert wei into an ETH amount [aliases: --from-wei, fw] + from-utf8 Convert UTF8 text to hex [aliases: --from-ascii, + --from-utf8, from-ascii, fu, fa] + from-wei Convert wei into an ETH amount [aliases: --from-wei, + fw] gas-price Get the current gas price [aliases: g] generate-fig-spec Generate Fig autocompletion spec [aliases: fig] - hash-message Hash a message according to EIP-191 [aliases: --hash-message, hm] + hash-message Hash a message according to EIP-191 [aliases: + --hash-message, hm] hash-zero Prints the zero hash [aliases: --hash-zero, hz] - help Print this message or the help of the given subcommand(s) - implementation Fetch the EIP-1967 implementation account [aliases: impl] - index Compute the storage slot for an entry in a mapping [aliases: in] - index-erc7201 Compute storage slots as specified by `ERC-7201: Namespaced Storage Layout` - [aliases: index7201, in7201] - interface Generate a Solidity interface from a given ABI [aliases: i] - keccak Hash arbitrary data using Keccak-256 [aliases: k, keccak256] + help Print this message or the help of the given + subcommand(s) + implementation Fetch the EIP-1967 implementation account [aliases: + impl] + index Compute the storage slot for an entry in a mapping + [aliases: in] + index-erc7201 Compute storage slots as specified by `ERC-7201: + Namespaced Storage Layout` [aliases: index7201, in7201] + interface Generate a Solidity interface from a given ABI + [aliases: i] + keccak Hash arbitrary data using Keccak-256 [aliases: k, + keccak256] logs Get logs by signature or topic [aliases: l] lookup-address Perform an ENS reverse lookup [aliases: la] - max-int Prints the maximum value of the given integer type [aliases: --max-int, - maxi] - max-uint Prints the maximum value of the given integer type [aliases: --max-uint, - maxu] - min-int Prints the minimum value of the given integer type [aliases: --min-int, - mini] + max-int Prints the maximum value of the given integer type + [aliases: --max-int, maxi] + max-uint Prints the maximum value of the given integer type + [aliases: --max-uint, maxu] + min-int Prints the minimum value of the given integer type + [aliases: --min-int, mini] mktx Build and sign a transaction [aliases: m] namehash Calculate the ENS namehash of a name [aliases: na, nh] nonce Get the nonce for an account [aliases: n] - parse-bytes32-address Parses a checksummed address from bytes32 encoding. [aliases: - --parse-bytes32-address] - parse-bytes32-string Parses a string from bytes32 encoding [aliases: --parse-bytes32-string] + parse-bytes32-address Parses a checksummed address from bytes32 encoding. + [aliases: --parse-bytes32-address] + parse-bytes32-string Parses a string from bytes32 encoding [aliases: + --parse-bytes32-string] pretty-calldata Pretty print calldata [aliases: pc] - proof Generate a storage proof for a given storage slot [aliases: pr] + proof Generate a storage proof for a given storage slot + [aliases: pr] publish Publish a raw transaction to the network [aliases: p] - receipt Get the transaction receipt for a transaction [aliases: re] + receipt Get the transaction receipt for a transaction [aliases: + re] resolve-name Perform an ENS lookup [aliases: rn] rpc Perform a raw JSON-RPC request [aliases: rp] - run Runs a published transaction in a local environment and prints the trace - [aliases: r] - selectors Extracts function selectors and arguments from bytecode [aliases: sel] + run Runs a published transaction in a local environment and + prints the trace [aliases: r] + selectors Extracts function selectors and arguments from bytecode + [aliases: sel] send Sign and publish a transaction [aliases: s] shl Perform a left shifting operation shr Perform a right shifting operation sig Get the selector for a function [aliases: si] - sig-event Generate event signatures from event string [aliases: se] - storage Get the raw value of a contract's storage slot [aliases: st] + sig-event Generate event signatures from event string [aliases: + se] + storage Get the raw value of a contract's storage slot + [aliases: st] storage-root Get the storage root for an account [aliases: sr] - to-ascii Convert hex data to an ASCII string [aliases: --to-ascii, tas, 2as] - to-base Converts a number of one base to another [aliases: --to-base, --to-radix, - to-radix, tr, 2r] - to-bytes32 Right-pads hex data to 32 bytes [aliases: --to-bytes32, tb, 2b] - to-check-sum-address Convert an address to a checksummed format (EIP-55) [aliases: - --to-checksum-address, --to-checksum, to-checksum, ta, 2a] - to-dec Converts a number of one base to decimal [aliases: --to-dec, td, 2d] - to-fixed-point Convert an integer into a fixed point number [aliases: --to-fix, tf, 2f] - to-hex Converts a number of one base to another [aliases: --to-hex, th, 2h] - to-hexdata Normalize the input to lowercase, 0x-prefixed hex [aliases: --to-hexdata, - thd, 2hd] - to-int256 Convert a number to a hex-encoded int256 [aliases: --to-int256, ti, 2i] - to-rlp RLP encodes hex data, or an array of hex data [aliases: --to-rlp] - to-uint256 Convert a number to a hex-encoded uint256 [aliases: --to-uint256, tu, 2u] - to-unit Convert an ETH amount into another unit (ether, gwei or wei) [aliases: - --to-unit, tun, 2un] - to-utf8 Convert hex data to a utf-8 string [aliases: --to-utf8, tu8, 2u8] - to-wei Convert an ETH amount to wei [aliases: --to-wei, tw, 2w] + to-ascii Convert hex data to an ASCII string [aliases: + --to-ascii, tas, 2as] + to-base Converts a number of one base to another [aliases: + --to-base, --to-radix, to-radix, tr, 2r] + to-bytes32 Right-pads hex data to 32 bytes [aliases: --to-bytes32, + tb, 2b] + to-check-sum-address Convert an address to a checksummed format (EIP-55) + [aliases: --to-checksum-address, --to-checksum, + to-checksum, ta, 2a] + to-dec Converts a number of one base to decimal [aliases: + --to-dec, td, 2d] + to-fixed-point Convert an integer into a fixed point number [aliases: + --to-fix, tf, 2f] + to-hex Converts a number of one base to another [aliases: + --to-hex, th, 2h] + to-hexdata Normalize the input to lowercase, 0x-prefixed hex + [aliases: --to-hexdata, thd, 2hd] + to-int256 Convert a number to a hex-encoded int256 [aliases: + --to-int256, ti, 2i] + to-rlp RLP encodes hex data, or an array of hex data [aliases: + --to-rlp] + to-uint256 Convert a number to a hex-encoded uint256 [aliases: + --to-uint256, tu, 2u] + to-unit Convert an ETH amount into another unit (ether, gwei or + wei) [aliases: --to-unit, tun, 2un] + to-utf8 Convert hex data to a utf-8 string [aliases: --to-utf8, + tu8, 2u8] + to-wei Convert an ETH amount to wei [aliases: --to-wei, tw, + 2w] tx Get information about a transaction [aliases: t] - upload-signature Upload the given signatures to https://openchain.xyz [aliases: ups] + upload-signature Upload the given signatures to https://openchain.xyz + [aliases: ups] wallet Wallet management utilities [aliases: w] Options: -h, --help Print help -V, --version Print version -Find more information in the book: http://book.getfoundry.sh/reference/cast/cast.html +Find more information in the book: +http://book.getfoundry.sh/reference/cast/cast.html ``` \ No newline at end of file diff --git a/src/reference/cli/cast/4byte-decode.md b/src/reference/cli/cast/4byte-decode.md index 4d3b8a15d..e7e125912 100644 --- a/src/reference/cli/cast/4byte-decode.md +++ b/src/reference/cli/cast/4byte-decode.md @@ -4,6 +4,9 @@ Decode ABI-encoded calldata using https://openchain.xyz ```bash $ cast 4byte-decode --help +``` + +```txt Usage: cast 4byte-decode [OPTIONS] [CALLDATA] Arguments: diff --git a/src/reference/cli/cast/4byte-event.md b/src/reference/cli/cast/4byte-event.md index 69daffa32..31279e1c7 100644 --- a/src/reference/cli/cast/4byte-event.md +++ b/src/reference/cli/cast/4byte-event.md @@ -4,6 +4,9 @@ Get the event signature for a given topic 0 from https://openchain.xyz ```bash $ cast 4byte-event --help +``` + +```txt Usage: cast 4byte-event [TOPIC_0] Arguments: diff --git a/src/reference/cli/cast/4byte.md b/src/reference/cli/cast/4byte.md index 02e091efd..abeba2247 100644 --- a/src/reference/cli/cast/4byte.md +++ b/src/reference/cli/cast/4byte.md @@ -4,6 +4,9 @@ Get the function signatures for the given selector from https://openchain.xyz ```bash $ cast 4byte --help +``` + +```txt Usage: cast 4byte [SELECTOR] Arguments: diff --git a/src/reference/cli/cast/abi-decode.md b/src/reference/cli/cast/abi-decode.md index 67d4fef0a..178956ba4 100644 --- a/src/reference/cli/cast/abi-decode.md +++ b/src/reference/cli/cast/abi-decode.md @@ -4,6 +4,9 @@ Decode ABI-encoded input or output data. ```bash $ cast abi-decode --help +``` + +```txt Usage: cast abi-decode [OPTIONS] Arguments: diff --git a/src/reference/cli/cast/abi-encode.md b/src/reference/cli/cast/abi-encode.md index ef5f940bf..9caf4f8ca 100644 --- a/src/reference/cli/cast/abi-encode.md +++ b/src/reference/cli/cast/abi-encode.md @@ -4,6 +4,9 @@ ABI encode the given function argument, excluding the selector ```bash $ cast abi-encode --help +``` + +```txt Usage: cast abi-encode [OPTIONS] [ARGS]... Arguments: diff --git a/src/reference/cli/cast/access-list.md b/src/reference/cli/cast/access-list.md index 480a9e25d..add2b9acd 100644 --- a/src/reference/cli/cast/access-list.md +++ b/src/reference/cli/cast/access-list.md @@ -4,6 +4,9 @@ Create an access list for a transaction ```bash $ cast access-list --help +``` + +```txt Usage: cast access-list [OPTIONS] [TO] [SIG] [ARGS]... Arguments: @@ -36,8 +39,9 @@ Transaction options: [env: ETH_GAS_LIMIT=] --gas-price - Gas price for legacy transactions, or max fee per gas for EIP1559 transactions, either - specified in wei, or as a string with a unit type. + Gas price for legacy transactions, or max fee per gas for EIP1559 + transactions, either specified in wei, or as a string with a unit + type. Examples: 1ether, 10gwei, 0.01ether @@ -49,8 +53,8 @@ Transaction options: [env: ETH_PRIORITY_GAS_PRICE=] --value - Ether to send in the transaction, either specified in wei, or as a string with a unit - type. + Ether to send in the transaction, either specified in wei, or as a + string with a unit type. Examples: 1ether, 10gwei, 0.01ether @@ -82,17 +86,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -148,7 +155,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/address-zero.md b/src/reference/cli/cast/address-zero.md index 72e93d8d2..c943a8d21 100644 --- a/src/reference/cli/cast/address-zero.md +++ b/src/reference/cli/cast/address-zero.md @@ -4,6 +4,9 @@ Prints the zero address ```bash $ cast address-zero --help +``` + +```txt Usage: cast address-zero Options: diff --git a/src/reference/cli/cast/admin.md b/src/reference/cli/cast/admin.md index 92ba81739..eabe8b1d0 100644 --- a/src/reference/cli/cast/admin.md +++ b/src/reference/cli/cast/admin.md @@ -4,6 +4,9 @@ Fetch the EIP-1967 admin account ```bash $ cast admin --help +``` + +```txt Usage: cast admin [OPTIONS] Arguments: @@ -22,17 +25,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/age.md b/src/reference/cli/cast/age.md index 0a110ec28..8cbbbcddc 100644 --- a/src/reference/cli/cast/age.md +++ b/src/reference/cli/cast/age.md @@ -4,6 +4,9 @@ Get the timestamp of a block ```bash $ cast age --help +``` + +```txt Usage: cast age [OPTIONS] [BLOCK] Arguments: @@ -19,17 +22,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/balance.md b/src/reference/cli/cast/balance.md index 0e3c8c32d..545d15dfc 100644 --- a/src/reference/cli/cast/balance.md +++ b/src/reference/cli/cast/balance.md @@ -4,6 +4,9 @@ Get the balance of an account in wei ```bash $ cast balance --help +``` + +```txt Usage: cast balance [OPTIONS] Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -45,8 +51,8 @@ Options: [env: ETH_RPC_JWT_SECRET=] --erc20 - erc20 address to query, with the method `balanceOf(address) return (uint256)`, alias with - '--erc721' + erc20 address to query, with the method `balanceOf(address) return + (uint256)`, alias with '--erc721' -h, --help Print help (see a summary with '-h') diff --git a/src/reference/cli/cast/base-fee.md b/src/reference/cli/cast/base-fee.md index 55caa0207..f41f6e1e7 100644 --- a/src/reference/cli/cast/base-fee.md +++ b/src/reference/cli/cast/base-fee.md @@ -4,6 +4,9 @@ Get the basefee of a block ```bash $ cast base-fee --help +``` + +```txt Usage: cast base-fee [OPTIONS] [BLOCK] Arguments: @@ -19,17 +22,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/bind.md b/src/reference/cli/cast/bind.md index f1eb3795a..faeb53bd2 100644 --- a/src/reference/cli/cast/bind.md +++ b/src/reference/cli/cast/bind.md @@ -4,6 +4,9 @@ Generate a rust binding from a given ABI ```bash $ cast bind --help +``` + +```txt Usage: cast bind [OPTIONS] Arguments: @@ -19,16 +22,16 @@ Options: --crate-name The name of the Rust crate to generate. - This should be a valid crates.io crate name. However, this is currently not validated by - this command. + This should be a valid crates.io crate name. However, this is + currently not validated by this command. [default: foundry-contracts] --crate-version The version of the Rust crate to generate. - This should be a standard semver version string. However, it is not currently validated by - this command. + This should be a standard semver version string. However, it is not + currently validated by this command. [default: 0.0.1] diff --git a/src/reference/cli/cast/block-number.md b/src/reference/cli/cast/block-number.md index ea5d9ff7d..a2a8c3020 100644 --- a/src/reference/cli/cast/block-number.md +++ b/src/reference/cli/cast/block-number.md @@ -4,11 +4,15 @@ Get the latest block number ```bash $ cast block-number --help +``` + +```txt Usage: cast block-number [OPTIONS] [BLOCK] Arguments: [BLOCK] - The hash or tag to query. If not specified, the latest number is returned + The hash or tag to query. If not specified, the latest number is + returned Options: -r, --rpc-url @@ -17,17 +21,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/block.md b/src/reference/cli/cast/block.md index b7b483ca6..f6c038827 100644 --- a/src/reference/cli/cast/block.md +++ b/src/reference/cli/cast/block.md @@ -4,6 +4,9 @@ Get information about a block ```bash $ cast block --help +``` + +```txt Usage: cast block [OPTIONS] [BLOCK] Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/call.md b/src/reference/cli/cast/call.md index 5c1ed1b3c..856e1d317 100644 --- a/src/reference/cli/cast/call.md +++ b/src/reference/cli/cast/call.md @@ -4,6 +4,9 @@ Perform a call on an account without publishing a transaction ```bash $ cast call --help +``` + +```txt Usage: cast call [OPTIONS] [TO] [SIG] [ARGS]... [COMMAND] Commands: @@ -25,7 +28,8 @@ Options: Data for the transaction --trace - Forks the remote rpc, executes the transaction locally and prints a trace + Forks the remote rpc, executes the transaction locally and prints a + trace --debug Opens an interactive debugger. Can only be used with `--trace` @@ -34,7 +38,8 @@ Options: --labels - Labels to apply to the traces; format: `address:label`. Can only be used with `--trace` + Labels to apply to the traces; format: `address:label`. Can only be + used with `--trace` --evm-version The EVM Version to use. Can only be used with `--trace` @@ -61,8 +66,9 @@ Transaction options: [env: ETH_GAS_LIMIT=] --gas-price - Gas price for legacy transactions, or max fee per gas for EIP1559 transactions, either - specified in wei, or as a string with a unit type. + Gas price for legacy transactions, or max fee per gas for EIP1559 + transactions, either specified in wei, or as a string with a unit + type. Examples: 1ether, 10gwei, 0.01ether @@ -74,8 +80,8 @@ Transaction options: [env: ETH_PRIORITY_GAS_PRICE=] --value - Ether to send in the transaction, either specified in wei, or as a string with a unit - type. + Ether to send in the transaction, either specified in wei, or as a + string with a unit type. Examples: 1ether, 10gwei, 0.01ether @@ -107,17 +113,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -173,7 +182,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/call/--create.md b/src/reference/cli/cast/call/--create.md index 3dc63e29f..efba157d0 100644 --- a/src/reference/cli/cast/call/--create.md +++ b/src/reference/cli/cast/call/--create.md @@ -4,6 +4,9 @@ ignores the address field and simulates creating a contract ```bash $ cast call --create --help +``` + +```txt Usage: cast call --create [OPTIONS] [SIG] [ARGS]... Arguments: diff --git a/src/reference/cli/cast/calldata-decode.md b/src/reference/cli/cast/calldata-decode.md index c01ec14cc..b3f85b838 100644 --- a/src/reference/cli/cast/calldata-decode.md +++ b/src/reference/cli/cast/calldata-decode.md @@ -4,6 +4,9 @@ Decode ABI-encoded input data. ```bash $ cast calldata-decode --help +``` + +```txt Usage: cast calldata-decode [OPTIONS] Arguments: diff --git a/src/reference/cli/cast/calldata.md b/src/reference/cli/cast/calldata.md index f7022e897..e5acb0506 100644 --- a/src/reference/cli/cast/calldata.md +++ b/src/reference/cli/cast/calldata.md @@ -4,10 +4,14 @@ ABI-encode a function with arguments ```bash $ cast calldata --help +``` + +```txt Usage: cast calldata [ARGS]... Arguments: - The function signature in the format `()()` + The function signature in the format + `()()` [ARGS]... The arguments to encode Options: diff --git a/src/reference/cli/cast/chain-id.md b/src/reference/cli/cast/chain-id.md index abe03f1ce..885f3b46b 100644 --- a/src/reference/cli/cast/chain-id.md +++ b/src/reference/cli/cast/chain-id.md @@ -4,6 +4,9 @@ Get the Ethereum chain ID ```bash $ cast chain-id --help +``` + +```txt Usage: cast chain-id [OPTIONS] Options: @@ -13,17 +16,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/chain.md b/src/reference/cli/cast/chain.md index d8589cc2e..405ce7ed8 100644 --- a/src/reference/cli/cast/chain.md +++ b/src/reference/cli/cast/chain.md @@ -4,6 +4,9 @@ Get the symbolic name of the current chain ```bash $ cast chain --help +``` + +```txt Usage: cast chain [OPTIONS] Options: @@ -13,17 +16,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/client.md b/src/reference/cli/cast/client.md index 2fe3985ec..17d208b96 100644 --- a/src/reference/cli/cast/client.md +++ b/src/reference/cli/cast/client.md @@ -4,6 +4,9 @@ Get the current client version ```bash $ cast client --help +``` + +```txt Usage: cast client [OPTIONS] Options: @@ -13,17 +16,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/code.md b/src/reference/cli/cast/code.md index ecbb32b04..e5099c183 100644 --- a/src/reference/cli/cast/code.md +++ b/src/reference/cli/cast/code.md @@ -4,6 +4,9 @@ Get the runtime bytecode of a contract ```bash $ cast code --help +``` + +```txt Usage: cast code [OPTIONS] Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/codehash.md b/src/reference/cli/cast/codehash.md index 658a0f3c3..0b34a2b66 100644 --- a/src/reference/cli/cast/codehash.md +++ b/src/reference/cli/cast/codehash.md @@ -4,6 +4,9 @@ Get the codehash for an account ```bash $ cast codehash --help +``` + +```txt Usage: cast codehash [OPTIONS] [SLOTS]... Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/codesize.md b/src/reference/cli/cast/codesize.md index 40af2a842..36b742e89 100644 --- a/src/reference/cli/cast/codesize.md +++ b/src/reference/cli/cast/codesize.md @@ -4,6 +4,9 @@ Get the runtime bytecode size of a contract ```bash $ cast codesize --help +``` + +```txt Usage: cast codesize [OPTIONS] Arguments: @@ -22,17 +25,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/completions.md b/src/reference/cli/cast/completions.md index b5f8f6e0d..370172d0d 100644 --- a/src/reference/cli/cast/completions.md +++ b/src/reference/cli/cast/completions.md @@ -4,6 +4,9 @@ Generate shell completions script ```bash $ cast completions --help +``` + +```txt Usage: cast completions Arguments: diff --git a/src/reference/cli/cast/compute-address.md b/src/reference/cli/cast/compute-address.md index 1d77a6d7d..2a6e58185 100644 --- a/src/reference/cli/cast/compute-address.md +++ b/src/reference/cli/cast/compute-address.md @@ -4,6 +4,9 @@ Compute the contract address from a given nonce and deployer address ```bash $ cast compute-address --help +``` + +```txt Usage: cast compute-address [OPTIONS] [ADDRESS] Arguments: @@ -20,17 +23,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/concat-hex.md b/src/reference/cli/cast/concat-hex.md index b04168cdb..210904101 100644 --- a/src/reference/cli/cast/concat-hex.md +++ b/src/reference/cli/cast/concat-hex.md @@ -4,6 +4,9 @@ Concatenate hex strings ```bash $ cast concat-hex --help +``` + +```txt Usage: cast concat-hex [DATA]... Arguments: diff --git a/src/reference/cli/cast/create2.md b/src/reference/cli/cast/create2.md index cf419a559..79fa22ad3 100644 --- a/src/reference/cli/cast/create2.md +++ b/src/reference/cli/cast/create2.md @@ -4,6 +4,9 @@ Generate a deterministic contract address using CREATE2 ```bash $ cast create2 --help +``` + +```txt Usage: cast create2 [OPTIONS] Options: @@ -13,15 +16,18 @@ Options: -c, --case-sensitive Case sensitive matching -d, --deployer
Address of the contract deployer [default: 0x4e59b44847b379578588920ca78fbf26c0b4956c] - --salt Salt to be used for the contract deployment. This option separate - from the default salt mining with filters + --salt Salt to be used for the contract deployment. This + option separate from the default salt mining with + filters -i, --init-code Init code of the contract to be deployed --init-code-hash Init code hash of the contract to be deployed - -j, --jobs Number of threads to use. Defaults to and caps at the number of - logical cores - --caller
Address of the caller. Used for the first 20 bytes of the salt - --seed The random number generator's seed, used to initialize the salt - --no-random Don't initialize the salt with a random value, and instead use the - default value of 0 + -j, --jobs Number of threads to use. Defaults to and caps at + the number of logical cores + --caller
Address of the caller. Used for the first 20 + bytes of the salt + --seed The random number generator's seed, used to + initialize the salt + --no-random Don't initialize the salt with a random value, + and instead use the default value of 0 -h, --help Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/decode-eof.md b/src/reference/cli/cast/decode-eof.md index aeae03535..6ab4bd8be 100644 --- a/src/reference/cli/cast/decode-eof.md +++ b/src/reference/cli/cast/decode-eof.md @@ -4,6 +4,9 @@ Decodes EOF container bytes ```bash $ cast decode-eof --help +``` + +```txt Usage: cast decode-eof [EOF] Arguments: diff --git a/src/reference/cli/cast/decode-transaction.md b/src/reference/cli/cast/decode-transaction.md index 7bd3c6a3a..b5ad18f8a 100644 --- a/src/reference/cli/cast/decode-transaction.md +++ b/src/reference/cli/cast/decode-transaction.md @@ -4,6 +4,9 @@ Decodes a raw signed EIP 2718 typed transaction ```bash $ cast decode-transaction --help +``` + +```txt Usage: cast decode-transaction [TX] Arguments: diff --git a/src/reference/cli/cast/disassemble.md b/src/reference/cli/cast/disassemble.md index 589803b02..5ef0e29aa 100644 --- a/src/reference/cli/cast/disassemble.md +++ b/src/reference/cli/cast/disassemble.md @@ -4,6 +4,9 @@ Disassembles hex encoded bytecode into individual / human readable opcodes ```bash $ cast disassemble --help +``` + +```txt Usage: cast disassemble Arguments: diff --git a/src/reference/cli/cast/estimate.md b/src/reference/cli/cast/estimate.md index 274dea5f8..e37990083 100644 --- a/src/reference/cli/cast/estimate.md +++ b/src/reference/cli/cast/estimate.md @@ -4,6 +4,9 @@ Estimate the gas cost of a transaction ```bash $ cast estimate --help +``` + +```txt Usage: cast estimate [OPTIONS] [TO] [SIG] [ARGS]... [COMMAND] Commands: @@ -36,8 +39,9 @@ Transaction options: [env: ETH_GAS_LIMIT=] --gas-price - Gas price for legacy transactions, or max fee per gas for EIP1559 transactions, either - specified in wei, or as a string with a unit type. + Gas price for legacy transactions, or max fee per gas for EIP1559 + transactions, either specified in wei, or as a string with a unit + type. Examples: 1ether, 10gwei, 0.01ether @@ -49,8 +53,8 @@ Transaction options: [env: ETH_PRIORITY_GAS_PRICE=] --value - Ether to send in the transaction, either specified in wei, or as a string with a unit - type. + Ether to send in the transaction, either specified in wei, or as a + string with a unit type. Examples: 1ether, 10gwei, 0.01ether @@ -82,17 +86,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -148,7 +155,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/estimate/--create.md b/src/reference/cli/cast/estimate/--create.md index e55e299ed..3e372ec52 100644 --- a/src/reference/cli/cast/estimate/--create.md +++ b/src/reference/cli/cast/estimate/--create.md @@ -4,6 +4,9 @@ Estimate gas cost to deploy a smart contract ```bash $ cast estimate --create --help +``` + +```txt Usage: cast estimate --create [OPTIONS] [SIG] [ARGS]... Arguments: diff --git a/src/reference/cli/cast/etherscan-source.md b/src/reference/cli/cast/etherscan-source.md index 3f66021d5..1fc289f51 100644 --- a/src/reference/cli/cast/etherscan-source.md +++ b/src/reference/cli/cast/etherscan-source.md @@ -4,15 +4,23 @@ Get the source code of a contract from Etherscan ```bash $ cast etherscan-source --help +``` + +```txt Usage: cast etherscan-source [OPTIONS]
Arguments:
The contract's address Options: - -f, --flatten Whether to flatten the source code - -d The output directory/file to expand source tree into - -e, --etherscan-api-key The Etherscan (or equivalent) API key [env: ETHERSCAN_API_KEY=] - -c, --chain The chain name or EIP-155 chain ID [env: CHAIN=] - -h, --help Print help + -f, --flatten + Whether to flatten the source code + -d + The output directory/file to expand source tree into + -e, --etherscan-api-key + The Etherscan (or equivalent) API key [env: ETHERSCAN_API_KEY=] + -c, --chain + The chain name or EIP-155 chain ID [env: CHAIN=] + -h, --help + Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/find-block.md b/src/reference/cli/cast/find-block.md index bdbba6102..657a6052f 100644 --- a/src/reference/cli/cast/find-block.md +++ b/src/reference/cli/cast/find-block.md @@ -4,6 +4,9 @@ Get the block number closest to the provided timestamp ```bash $ cast find-block --help +``` + +```txt Usage: cast find-block [OPTIONS] Arguments: @@ -17,17 +20,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/format-bytes32-string.md b/src/reference/cli/cast/format-bytes32-string.md index 32fd661b7..4dd8d2ec8 100644 --- a/src/reference/cli/cast/format-bytes32-string.md +++ b/src/reference/cli/cast/format-bytes32-string.md @@ -4,6 +4,9 @@ Formats a string into bytes32 encoding ```bash $ cast format-bytes32-string --help +``` + +```txt Usage: cast format-bytes32-string [STRING] Arguments: diff --git a/src/reference/cli/cast/from-bin.md b/src/reference/cli/cast/from-bin.md index 1b71df449..d0e7b0412 100644 --- a/src/reference/cli/cast/from-bin.md +++ b/src/reference/cli/cast/from-bin.md @@ -4,6 +4,9 @@ Convert binary data into hex data ```bash $ cast from-bin --help +``` + +```txt Usage: cast from-bin Options: diff --git a/src/reference/cli/cast/from-fixed-point.md b/src/reference/cli/cast/from-fixed-point.md index a123c6322..58e214f42 100644 --- a/src/reference/cli/cast/from-fixed-point.md +++ b/src/reference/cli/cast/from-fixed-point.md @@ -4,6 +4,9 @@ Convert a fixed point number into an integer ```bash $ cast from-fixed-point --help +``` + +```txt Usage: cast from-fixed-point [DECIMALS] [VALUE] Arguments: diff --git a/src/reference/cli/cast/from-rlp.md b/src/reference/cli/cast/from-rlp.md index df98574f5..84a37a33b 100644 --- a/src/reference/cli/cast/from-rlp.md +++ b/src/reference/cli/cast/from-rlp.md @@ -4,6 +4,9 @@ Decodes RLP hex-encoded data ```bash $ cast from-rlp --help +``` + +```txt Usage: cast from-rlp [VALUE] Arguments: diff --git a/src/reference/cli/cast/from-utf8.md b/src/reference/cli/cast/from-utf8.md index 579c55d1f..7d10d4a30 100644 --- a/src/reference/cli/cast/from-utf8.md +++ b/src/reference/cli/cast/from-utf8.md @@ -4,6 +4,9 @@ Convert UTF8 text to hex ```bash $ cast from-utf8 --help +``` + +```txt Usage: cast from-utf8 [TEXT] Arguments: diff --git a/src/reference/cli/cast/from-wei.md b/src/reference/cli/cast/from-wei.md index 62481ebf3..d2de25005 100644 --- a/src/reference/cli/cast/from-wei.md +++ b/src/reference/cli/cast/from-wei.md @@ -4,6 +4,9 @@ Convert wei into an ETH amount. ```bash $ cast from-wei --help +``` + +```txt Usage: cast from-wei [VALUE] [UNIT] Arguments: diff --git a/src/reference/cli/cast/gas-price.md b/src/reference/cli/cast/gas-price.md index 15e4df946..cbd30a5d2 100644 --- a/src/reference/cli/cast/gas-price.md +++ b/src/reference/cli/cast/gas-price.md @@ -4,6 +4,9 @@ Get the current gas price ```bash $ cast gas-price --help +``` + +```txt Usage: cast gas-price [OPTIONS] Options: @@ -13,17 +16,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/generate-fig-spec.md b/src/reference/cli/cast/generate-fig-spec.md index c7e49c332..7d2af1eb4 100644 --- a/src/reference/cli/cast/generate-fig-spec.md +++ b/src/reference/cli/cast/generate-fig-spec.md @@ -4,6 +4,9 @@ Generate Fig autocompletion spec ```bash $ cast generate-fig-spec --help +``` + +```txt Usage: cast generate-fig-spec Options: diff --git a/src/reference/cli/cast/hash-message.md b/src/reference/cli/cast/hash-message.md index 537f7d646..8a49aaa6c 100644 --- a/src/reference/cli/cast/hash-message.md +++ b/src/reference/cli/cast/hash-message.md @@ -4,6 +4,9 @@ Hash a message according to EIP-191 ```bash $ cast hash-message --help +``` + +```txt Usage: cast hash-message [MESSAGE] Arguments: diff --git a/src/reference/cli/cast/hash-zero.md b/src/reference/cli/cast/hash-zero.md index 9e82cf2fc..8da54182a 100644 --- a/src/reference/cli/cast/hash-zero.md +++ b/src/reference/cli/cast/hash-zero.md @@ -4,6 +4,9 @@ Prints the zero hash ```bash $ cast hash-zero --help +``` + +```txt Usage: cast hash-zero Options: diff --git a/src/reference/cli/cast/implementation.md b/src/reference/cli/cast/implementation.md index 851cdf978..7252e80af 100644 --- a/src/reference/cli/cast/implementation.md +++ b/src/reference/cli/cast/implementation.md @@ -4,6 +4,9 @@ Fetch the EIP-1967 implementation account ```bash $ cast implementation --help +``` + +```txt Usage: cast implementation [OPTIONS] Arguments: @@ -22,17 +25,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/index-erc7201.md b/src/reference/cli/cast/index-erc7201.md index 38cf8393e..2f8aad68a 100644 --- a/src/reference/cli/cast/index-erc7201.md +++ b/src/reference/cli/cast/index-erc7201.md @@ -4,13 +4,18 @@ Compute storage slots as specified by `ERC-7201: Namespaced Storage Layout` ```bash $ cast index-erc7201 --help +``` + +```txt Usage: cast index-erc7201 [OPTIONS] [ID] Arguments: [ID] The arbitrary identifier Options: - --formula-id The formula ID. Currently the only supported formula is `erc7201` - [default: erc7201] - -h, --help Print help + --formula-id + The formula ID. Currently the only supported formula is `erc7201` + [default: erc7201] + -h, --help + Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/index.md b/src/reference/cli/cast/index.md index 6a346a552..9a62b6ad3 100644 --- a/src/reference/cli/cast/index.md +++ b/src/reference/cli/cast/index.md @@ -4,6 +4,9 @@ Compute the storage slot for an entry in a mapping ```bash $ cast index --help +``` + +```txt Usage: cast index Arguments: diff --git a/src/reference/cli/cast/interface.md b/src/reference/cli/cast/interface.md index 3d8365237..eba88e922 100644 --- a/src/reference/cli/cast/interface.md +++ b/src/reference/cli/cast/interface.md @@ -4,13 +4,17 @@ Generate a Solidity interface from a given ABI. ```bash $ cast interface --help +``` + +```txt Usage: cast interface [OPTIONS] Arguments: - The target contract, which can be one of: - A file path to an ABI JSON file. - A contract - identifier in the form `:` or just ``. - An Ethereum - address, for which the ABI will be fetched from Etherscan + The target contract, which can be one of: - A file path to an ABI JSON + file. - A contract identifier in the form `:` or + just ``. - An Ethereum address, for which the ABI will + be fetched from Etherscan Options: -n, --name @@ -29,7 +33,8 @@ Options: If not specified, the interface will be output to stdout. -j, --json - If specified, the interface will be output as JSON rather than Solidity + If specified, the interface will be output as JSON rather than + Solidity -e, --etherscan-api-key The Etherscan (or equivalent) API key diff --git a/src/reference/cli/cast/keccak.md b/src/reference/cli/cast/keccak.md index 04865a902..b0ad85116 100644 --- a/src/reference/cli/cast/keccak.md +++ b/src/reference/cli/cast/keccak.md @@ -4,6 +4,9 @@ Hash arbitrary data using Keccak-256 ```bash $ cast keccak --help +``` + +```txt Usage: cast keccak [DATA] Arguments: diff --git a/src/reference/cli/cast/logs.md b/src/reference/cli/cast/logs.md index 7056ad75e..10395122c 100644 --- a/src/reference/cli/cast/logs.md +++ b/src/reference/cli/cast/logs.md @@ -4,16 +4,19 @@ Get logs by signature or topic ```bash $ cast logs --help +``` + +```txt Usage: cast logs [OPTIONS] [SIG_OR_TOPIC] [TOPICS_OR_ARGS]... Arguments: [SIG_OR_TOPIC] - The signature of the event to filter logs by which will be converted to the first topic or - a topic to filter on + The signature of the event to filter logs by which will be converted + to the first topic or a topic to filter on [TOPICS_OR_ARGS]... - If used with a signature, the indexed fields of the event to filter by. Otherwise, the - remaining topics of the filter + If used with a signature, the indexed fields of the event to filter + by. Otherwise, the remaining topics of the filter Options: --from-block @@ -30,8 +33,9 @@ Options: The contract address to filter on --subscribe - If the RPC type and endpoints supports `eth_subscribe` stream logs instead of printing and - exiting. Will continue until interrupted or TO_BLOCK is reached + If the RPC type and endpoints supports `eth_subscribe` stream logs + instead of printing and exiting. Will continue until interrupted or + TO_BLOCK is reached -h, --help Print help (see a summary with '-h') @@ -47,17 +51,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -113,7 +120,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/lookup-address.md b/src/reference/cli/cast/lookup-address.md index cd11d6023..b47b80d72 100644 --- a/src/reference/cli/cast/lookup-address.md +++ b/src/reference/cli/cast/lookup-address.md @@ -4,6 +4,9 @@ Perform an ENS reverse lookup ```bash $ cast lookup-address --help +``` + +```txt Usage: cast lookup-address [OPTIONS] [WHO] Arguments: @@ -20,17 +23,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/max-int.md b/src/reference/cli/cast/max-int.md index 5b4c6ed6a..999ff76cb 100644 --- a/src/reference/cli/cast/max-int.md +++ b/src/reference/cli/cast/max-int.md @@ -4,6 +4,9 @@ Prints the maximum value of the given integer type ```bash $ cast max-int --help +``` + +```txt Usage: cast max-int [TYPE] Arguments: diff --git a/src/reference/cli/cast/max-uint.md b/src/reference/cli/cast/max-uint.md index a404ca930..5acf6c801 100644 --- a/src/reference/cli/cast/max-uint.md +++ b/src/reference/cli/cast/max-uint.md @@ -4,10 +4,14 @@ Prints the maximum value of the given integer type ```bash $ cast max-uint --help +``` + +```txt Usage: cast max-uint [TYPE] Arguments: - [TYPE] The unsigned integer type to get the maximum value of [default: uint256] + [TYPE] The unsigned integer type to get the maximum value of [default: + uint256] Options: -h, --help Print help diff --git a/src/reference/cli/cast/min-int.md b/src/reference/cli/cast/min-int.md index 5ebd63793..084eaa959 100644 --- a/src/reference/cli/cast/min-int.md +++ b/src/reference/cli/cast/min-int.md @@ -4,6 +4,9 @@ Prints the minimum value of the given integer type ```bash $ cast min-int --help +``` + +```txt Usage: cast min-int [TYPE] Arguments: diff --git a/src/reference/cli/cast/mktx.md b/src/reference/cli/cast/mktx.md index 035daffaa..17c7a475e 100644 --- a/src/reference/cli/cast/mktx.md +++ b/src/reference/cli/cast/mktx.md @@ -4,6 +4,9 @@ Build and sign a transaction ```bash $ cast mktx --help +``` + +```txt Usage: cast mktx [OPTIONS] [TO] [SIG] [ARGS]... [COMMAND] Commands: @@ -33,8 +36,9 @@ Transaction options: [env: ETH_GAS_LIMIT=] --gas-price - Gas price for legacy transactions, or max fee per gas for EIP1559 transactions, either - specified in wei, or as a string with a unit type. + Gas price for legacy transactions, or max fee per gas for EIP1559 + transactions, either specified in wei, or as a string with a unit + type. Examples: 1ether, 10gwei, 0.01ether @@ -46,8 +50,8 @@ Transaction options: [env: ETH_PRIORITY_GAS_PRICE=] --value - Ether to send in the transaction, either specified in wei, or as a string with a unit - type. + Ether to send in the transaction, either specified in wei, or as a + string with a unit type. Examples: 1ether, 10gwei, 0.01ether @@ -82,17 +86,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -148,7 +155,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/mktx/--create.md b/src/reference/cli/cast/mktx/--create.md index 5d8c920cf..7ad4fc790 100644 --- a/src/reference/cli/cast/mktx/--create.md +++ b/src/reference/cli/cast/mktx/--create.md @@ -4,6 +4,9 @@ Use to deploy raw contract bytecode ```bash $ cast mktx --create --help +``` + +```txt Usage: cast mktx --create [SIG] [ARGS]... Arguments: diff --git a/src/reference/cli/cast/namehash.md b/src/reference/cli/cast/namehash.md index 585da83ea..a897a9ee4 100644 --- a/src/reference/cli/cast/namehash.md +++ b/src/reference/cli/cast/namehash.md @@ -4,6 +4,9 @@ Calculate the ENS namehash of a name ```bash $ cast namehash --help +``` + +```txt Usage: cast namehash [NAME] Arguments: diff --git a/src/reference/cli/cast/nonce.md b/src/reference/cli/cast/nonce.md index 9dc1376cf..053afd45d 100644 --- a/src/reference/cli/cast/nonce.md +++ b/src/reference/cli/cast/nonce.md @@ -4,6 +4,9 @@ Get the nonce for an account ```bash $ cast nonce --help +``` + +```txt Usage: cast nonce [OPTIONS] Arguments: @@ -22,17 +25,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/parse-bytes32-address.md b/src/reference/cli/cast/parse-bytes32-address.md index 2b5393860..4e60e22a5 100644 --- a/src/reference/cli/cast/parse-bytes32-address.md +++ b/src/reference/cli/cast/parse-bytes32-address.md @@ -4,6 +4,9 @@ Parses a checksummed address from bytes32 encoding. ```bash $ cast parse-bytes32-address --help +``` + +```txt Usage: cast parse-bytes32-address [BYTES] Arguments: diff --git a/src/reference/cli/cast/parse-bytes32-string.md b/src/reference/cli/cast/parse-bytes32-string.md index 0e730a260..3c900f4d2 100644 --- a/src/reference/cli/cast/parse-bytes32-string.md +++ b/src/reference/cli/cast/parse-bytes32-string.md @@ -4,6 +4,9 @@ Parses a string from bytes32 encoding ```bash $ cast parse-bytes32-string --help +``` + +```txt Usage: cast parse-bytes32-string [BYTES] Arguments: diff --git a/src/reference/cli/cast/pretty-calldata.md b/src/reference/cli/cast/pretty-calldata.md index 5586e693e..389bb4a89 100644 --- a/src/reference/cli/cast/pretty-calldata.md +++ b/src/reference/cli/cast/pretty-calldata.md @@ -4,6 +4,9 @@ Pretty print calldata. ```bash $ cast pretty-calldata --help +``` + +```txt Usage: cast pretty-calldata [OPTIONS] [CALLDATA] Arguments: diff --git a/src/reference/cli/cast/proof.md b/src/reference/cli/cast/proof.md index 552399360..6259db80a 100644 --- a/src/reference/cli/cast/proof.md +++ b/src/reference/cli/cast/proof.md @@ -4,6 +4,9 @@ Generate a storage proof for a given storage slot ```bash $ cast proof --help +``` + +```txt Usage: cast proof [OPTIONS]
[SLOTS]... Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/publish.md b/src/reference/cli/cast/publish.md index 6308458be..dd82d0a55 100644 --- a/src/reference/cli/cast/publish.md +++ b/src/reference/cli/cast/publish.md @@ -4,6 +4,9 @@ Publish a raw transaction to the network ```bash $ cast publish --help +``` + +```txt Usage: cast publish [OPTIONS] Arguments: @@ -22,17 +25,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/receipt.md b/src/reference/cli/cast/receipt.md index a0867797a..9e9d3c344 100644 --- a/src/reference/cli/cast/receipt.md +++ b/src/reference/cli/cast/receipt.md @@ -4,6 +4,9 @@ Get the transaction receipt for a transaction ```bash $ cast receipt --help +``` + +```txt Usage: cast receipt [OPTIONS] [FIELD] Arguments: @@ -30,17 +33,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/resolve-name.md b/src/reference/cli/cast/resolve-name.md index 125e49a3f..094eae9a8 100644 --- a/src/reference/cli/cast/resolve-name.md +++ b/src/reference/cli/cast/resolve-name.md @@ -4,6 +4,9 @@ Perform an ENS lookup ```bash $ cast resolve-name --help +``` + +```txt Usage: cast resolve-name [OPTIONS] [WHO] Arguments: @@ -20,17 +23,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/rpc.md b/src/reference/cli/cast/rpc.md index 8efceba6f..0c416970d 100644 --- a/src/reference/cli/cast/rpc.md +++ b/src/reference/cli/cast/rpc.md @@ -4,6 +4,9 @@ Perform a raw JSON-RPC request ```bash $ cast rpc --help +``` + +```txt Usage: cast rpc [OPTIONS] [PARAMS]... Arguments: @@ -15,15 +18,15 @@ Arguments: Interpreted as JSON: - cast rpc eth_getBlockByNumber 0x123 false => {"method": "eth_getBlockByNumber", "params": - ["0x123", false] ... } + cast rpc eth_getBlockByNumber 0x123 false => {"method": + "eth_getBlockByNumber", "params": ["0x123", false] ... } Options: -w, --raw Send raw JSON parameters - The first param will be interpreted as a raw JSON array of params. If no params are given, - stdin will be used. For example: + The first param will be interpreted as a raw JSON array of params. If + no params are given, stdin will be used. For example: cast rpc eth_getBlockByNumber '["0x123", false]' --raw => {"method": "eth_getBlockByNumber", "params": ["0x123", false] ... } @@ -34,17 +37,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/run.md b/src/reference/cli/cast/run.md index f12bfc55e..76f6711b5 100644 --- a/src/reference/cli/cast/run.md +++ b/src/reference/cli/cast/run.md @@ -4,6 +4,9 @@ Runs a published transaction in a local environment and prints the trace ```bash $ cast run --help +``` + +```txt Usage: cast run [OPTIONS] Arguments: @@ -39,17 +42,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -64,7 +70,8 @@ Options: Overrides the version specified in the config. --compute-units-per-second - Sets the number of assumed available compute units per second for this provider + Sets the number of assumed available compute units per second for this + provider default value: 330 diff --git a/src/reference/cli/cast/selectors.md b/src/reference/cli/cast/selectors.md index e633d4e4d..11755fd7c 100644 --- a/src/reference/cli/cast/selectors.md +++ b/src/reference/cli/cast/selectors.md @@ -4,13 +4,16 @@ Extracts function selectors and arguments from bytecode ```bash $ cast selectors --help +``` + +```txt Usage: cast selectors [OPTIONS] Arguments: The hex encoded bytecode Options: - -r, --resolve Resolve the function signatures for the extracted selectors using - https://openchain.xyz + -r, --resolve Resolve the function signatures for the extracted selectors + using https://openchain.xyz -h, --help Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/send.md b/src/reference/cli/cast/send.md index 0026d2cd9..dcfb087bd 100644 --- a/src/reference/cli/cast/send.md +++ b/src/reference/cli/cast/send.md @@ -4,6 +4,9 @@ Sign and publish a transaction ```bash $ cast send --help +``` + +```txt Usage: cast send [OPTIONS] [TO] [SIG] [ARGS]... [COMMAND] Commands: @@ -34,7 +37,8 @@ Options: [default: 1] --unlocked - Send via `eth_sendTransaction using the `--from` argument or $ETH_FROM as sender + Send via `eth_sendTransaction using the `--from` argument or $ETH_FROM + as sender --timeout Timeout for sending the transaction @@ -55,8 +59,9 @@ Transaction options: [env: ETH_GAS_LIMIT=] --gas-price - Gas price for legacy transactions, or max fee per gas for EIP1559 transactions, either - specified in wei, or as a string with a unit type. + Gas price for legacy transactions, or max fee per gas for EIP1559 + transactions, either specified in wei, or as a string with a unit + type. Examples: 1ether, 10gwei, 0.01ether @@ -68,8 +73,8 @@ Transaction options: [env: ETH_PRIORITY_GAS_PRICE=] --value - Ether to send in the transaction, either specified in wei, or as a string with a unit - type. + Ether to send in the transaction, either specified in wei, or as a + string with a unit type. Examples: 1ether, 10gwei, 0.01ether @@ -104,17 +109,20 @@ Ethereum options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -170,7 +178,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/send/--create.md b/src/reference/cli/cast/send/--create.md index 39c43547c..ea9d42749 100644 --- a/src/reference/cli/cast/send/--create.md +++ b/src/reference/cli/cast/send/--create.md @@ -4,6 +4,9 @@ Use to deploy raw contract bytecode ```bash $ cast send --create --help +``` + +```txt Usage: cast send --create [SIG] [ARGS]... Arguments: diff --git a/src/reference/cli/cast/shl.md b/src/reference/cli/cast/shl.md index 86e0bc904..db5ae4f91 100644 --- a/src/reference/cli/cast/shl.md +++ b/src/reference/cli/cast/shl.md @@ -4,6 +4,9 @@ Perform a left shifting operation ```bash $ cast shl --help +``` + +```txt Usage: cast shl [OPTIONS] Arguments: diff --git a/src/reference/cli/cast/shr.md b/src/reference/cli/cast/shr.md index 12291b264..26285a829 100644 --- a/src/reference/cli/cast/shr.md +++ b/src/reference/cli/cast/shr.md @@ -4,6 +4,9 @@ Perform a right shifting operation ```bash $ cast shr --help +``` + +```txt Usage: cast shr [OPTIONS] Arguments: diff --git a/src/reference/cli/cast/sig-event.md b/src/reference/cli/cast/sig-event.md index df294349c..954b1decc 100644 --- a/src/reference/cli/cast/sig-event.md +++ b/src/reference/cli/cast/sig-event.md @@ -4,6 +4,9 @@ Generate event signatures from event string ```bash $ cast sig-event --help +``` + +```txt Usage: cast sig-event [EVENT_STRING] Arguments: diff --git a/src/reference/cli/cast/sig.md b/src/reference/cli/cast/sig.md index 9e5fc3986..6bbcd8159 100644 --- a/src/reference/cli/cast/sig.md +++ b/src/reference/cli/cast/sig.md @@ -4,11 +4,15 @@ Get the selector for a function ```bash $ cast sig --help +``` + +```txt Usage: cast sig [SIG] [OPTIMIZE] Arguments: [SIG] The function signature, e.g. transfer(address,uint256) - [OPTIMIZE] Optimize signature to contain provided amount of leading zeroes in selector + [OPTIMIZE] Optimize signature to contain provided amount of leading zeroes in + selector Options: -h, --help Print help diff --git a/src/reference/cli/cast/storage-root.md b/src/reference/cli/cast/storage-root.md index fbf53cb64..0dfce6a93 100644 --- a/src/reference/cli/cast/storage-root.md +++ b/src/reference/cli/cast/storage-root.md @@ -4,6 +4,9 @@ Get the storage root for an account ```bash $ cast storage-root --help +``` + +```txt Usage: cast storage-root [OPTIONS] [SLOTS]... Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/storage.md b/src/reference/cli/cast/storage.md index ef6b20b27..1d931a76b 100644 --- a/src/reference/cli/cast/storage.md +++ b/src/reference/cli/cast/storage.md @@ -4,6 +4,9 @@ Get the raw value of a contract's storage slot ```bash $ cast storage --help +``` + +```txt Usage: cast storage [OPTIONS]
[SLOT] Arguments: @@ -25,17 +28,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -89,7 +95,8 @@ Compiler options: --use Specify the solc version, or a path to a local solc, to build with. - Valid values are in the format `x.y.z`, `solc:x.y.z` or `path/to/solc`. + Valid values are in the format `x.y.z`, `solc:x.y.z` or + `path/to/solc`. --offline Do not access the network. @@ -102,7 +109,8 @@ Compiler options: --no-metadata Do not append any metadata to the bytecode. - This is equivalent to setting `bytecode_hash` to `none` and `cbor_metadata` to `false`. + This is equivalent to setting `bytecode_hash` to `none` and + `cbor_metadata` to `false`. --silent Don't print anything on startup @@ -139,8 +147,8 @@ Project options: --revert-strings Revert string configuration. - Possible values are "default", "strip" (remove), "debug" (Solidity-generated revert - strings) and "verboseDebug" + Possible values are "default", "strip" (remove), "debug" + (Solidity-generated revert strings) and "verboseDebug" --build-info Generate build info files @@ -151,7 +159,8 @@ Project options: --root The project's root path. - By default root of the Git repository, if in one, or the current working directory. + By default root of the Git repository, if in one, or the current + working directory. -C, --contracts The contracts source directory @@ -171,7 +180,8 @@ Project options: --hardhat Use the Hardhat-style project layout. - This is the same as using: `--contracts contracts --lib-paths node_modules`. + This is the same as using: `--contracts contracts --lib-paths + node_modules`. [aliases: hh] diff --git a/src/reference/cli/cast/to-ascii.md b/src/reference/cli/cast/to-ascii.md index 7093666ef..24b0d32dd 100644 --- a/src/reference/cli/cast/to-ascii.md +++ b/src/reference/cli/cast/to-ascii.md @@ -4,6 +4,9 @@ Convert hex data to an ASCII string ```bash $ cast to-ascii --help +``` + +```txt Usage: cast to-ascii [HEXDATA] Arguments: diff --git a/src/reference/cli/cast/to-base.md b/src/reference/cli/cast/to-base.md index 172212e75..fbb8e0ff1 100644 --- a/src/reference/cli/cast/to-base.md +++ b/src/reference/cli/cast/to-base.md @@ -4,6 +4,9 @@ Converts a number of one base to another ```bash $ cast to-base --help +``` + +```txt Usage: cast to-base [OPTIONS] [VALUE] [BASE] Arguments: diff --git a/src/reference/cli/cast/to-bytes32.md b/src/reference/cli/cast/to-bytes32.md index 7e6b7aa54..e7f2fb0be 100644 --- a/src/reference/cli/cast/to-bytes32.md +++ b/src/reference/cli/cast/to-bytes32.md @@ -4,6 +4,9 @@ Right-pads hex data to 32 bytes ```bash $ cast to-bytes32 --help +``` + +```txt Usage: cast to-bytes32 [BYTES] Arguments: diff --git a/src/reference/cli/cast/to-check-sum-address.md b/src/reference/cli/cast/to-check-sum-address.md index d265fefb9..7aa237fe6 100644 --- a/src/reference/cli/cast/to-check-sum-address.md +++ b/src/reference/cli/cast/to-check-sum-address.md @@ -4,6 +4,9 @@ Convert an address to a checksummed format (EIP-55) ```bash $ cast to-check-sum-address --help +``` + +```txt Usage: cast to-check-sum-address [ADDRESS] Arguments: diff --git a/src/reference/cli/cast/to-dec.md b/src/reference/cli/cast/to-dec.md index be1fdb8bf..50a7fdcb2 100644 --- a/src/reference/cli/cast/to-dec.md +++ b/src/reference/cli/cast/to-dec.md @@ -4,6 +4,9 @@ Converts a number of one base to decimal ```bash $ cast to-dec --help +``` + +```txt Usage: cast to-dec [OPTIONS] [VALUE] Arguments: diff --git a/src/reference/cli/cast/to-fixed-point.md b/src/reference/cli/cast/to-fixed-point.md index 94de666c8..36b712ebe 100644 --- a/src/reference/cli/cast/to-fixed-point.md +++ b/src/reference/cli/cast/to-fixed-point.md @@ -4,6 +4,9 @@ Convert an integer into a fixed point number ```bash $ cast to-fixed-point --help +``` + +```txt Usage: cast to-fixed-point [DECIMALS] [VALUE] Arguments: diff --git a/src/reference/cli/cast/to-hex.md b/src/reference/cli/cast/to-hex.md index dcc7c384c..652290764 100644 --- a/src/reference/cli/cast/to-hex.md +++ b/src/reference/cli/cast/to-hex.md @@ -4,6 +4,9 @@ Converts a number of one base to another ```bash $ cast to-hex --help +``` + +```txt Usage: cast to-hex [OPTIONS] [VALUE] Arguments: diff --git a/src/reference/cli/cast/to-hexdata.md b/src/reference/cli/cast/to-hexdata.md index 0ed550e5c..75a602fcc 100644 --- a/src/reference/cli/cast/to-hexdata.md +++ b/src/reference/cli/cast/to-hexdata.md @@ -4,6 +4,9 @@ Normalize the input to lowercase, 0x-prefixed hex. ```bash $ cast to-hexdata --help +``` + +```txt Usage: cast to-hexdata [INPUT] Arguments: diff --git a/src/reference/cli/cast/to-int256.md b/src/reference/cli/cast/to-int256.md index 9226481fa..f953914a7 100644 --- a/src/reference/cli/cast/to-int256.md +++ b/src/reference/cli/cast/to-int256.md @@ -4,6 +4,9 @@ Convert a number to a hex-encoded int256 ```bash $ cast to-int256 --help +``` + +```txt Usage: cast to-int256 [VALUE] Arguments: diff --git a/src/reference/cli/cast/to-rlp.md b/src/reference/cli/cast/to-rlp.md index 14e3f102f..1a3a9568a 100644 --- a/src/reference/cli/cast/to-rlp.md +++ b/src/reference/cli/cast/to-rlp.md @@ -4,14 +4,17 @@ RLP encodes hex data, or an array of hex data. ```bash $ cast to-rlp --help +``` + +```txt Usage: cast to-rlp [VALUE] Arguments: [VALUE] The value to convert. - This is a hex-encoded string, or an array of hex-encoded strings. Can be arbitrarily - recursive. + This is a hex-encoded string, or an array of hex-encoded strings. Can + be arbitrarily recursive. Options: -h, --help diff --git a/src/reference/cli/cast/to-uint256.md b/src/reference/cli/cast/to-uint256.md index add7bdbc3..c7910fac4 100644 --- a/src/reference/cli/cast/to-uint256.md +++ b/src/reference/cli/cast/to-uint256.md @@ -4,6 +4,9 @@ Convert a number to a hex-encoded uint256 ```bash $ cast to-uint256 --help +``` + +```txt Usage: cast to-uint256 [VALUE] Arguments: diff --git a/src/reference/cli/cast/to-unit.md b/src/reference/cli/cast/to-unit.md index e9d192eb7..630658217 100644 --- a/src/reference/cli/cast/to-unit.md +++ b/src/reference/cli/cast/to-unit.md @@ -4,6 +4,9 @@ Convert an ETH amount into another unit (ether, gwei or wei). ```bash $ cast to-unit --help +``` + +```txt Usage: cast to-unit [VALUE] [UNIT] Arguments: diff --git a/src/reference/cli/cast/to-utf8.md b/src/reference/cli/cast/to-utf8.md index a412a386b..9f0a9c632 100644 --- a/src/reference/cli/cast/to-utf8.md +++ b/src/reference/cli/cast/to-utf8.md @@ -4,6 +4,9 @@ Convert hex data to a utf-8 string ```bash $ cast to-utf8 --help +``` + +```txt Usage: cast to-utf8 [HEXDATA] Arguments: diff --git a/src/reference/cli/cast/to-wei.md b/src/reference/cli/cast/to-wei.md index ed53e4f04..9b6c58001 100644 --- a/src/reference/cli/cast/to-wei.md +++ b/src/reference/cli/cast/to-wei.md @@ -4,6 +4,9 @@ Convert an ETH amount to wei. ```bash $ cast to-wei --help +``` + +```txt Usage: cast to-wei [VALUE] [UNIT] Arguments: diff --git a/src/reference/cli/cast/tx.md b/src/reference/cli/cast/tx.md index eb5c3b579..554597686 100644 --- a/src/reference/cli/cast/tx.md +++ b/src/reference/cli/cast/tx.md @@ -4,6 +4,9 @@ Get information about a transaction ```bash $ cast tx --help +``` + +```txt Usage: cast tx [OPTIONS] [FIELD] Arguments: @@ -11,8 +14,8 @@ Arguments: The transaction hash [FIELD] - If specified, only get the given field of the transaction. If "raw", the RLP encoded - transaction will be printed + If specified, only get the given field of the transaction. If "raw", + the RLP encoded transaction will be printed Options: --raw @@ -24,17 +27,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", diff --git a/src/reference/cli/cast/upload-signature.md b/src/reference/cli/cast/upload-signature.md index 4b3ea4132..992f6e531 100644 --- a/src/reference/cli/cast/upload-signature.md +++ b/src/reference/cli/cast/upload-signature.md @@ -4,14 +4,17 @@ Upload the given signatures to https://openchain.xyz. ```bash $ cast upload-signature --help +``` + +```txt Usage: cast upload-signature [SIGNATURES]... Arguments: [SIGNATURES]... The signatures to upload. - Prefix with 'function', 'event', or 'error'. Defaults to function if no prefix given. Can - also take paths to contract artifact JSON. + Prefix with 'function', 'event', or 'error'. Defaults to function if + no prefix given. Can also take paths to contract artifact JSON. Options: -h, --help diff --git a/src/reference/cli/cast/wallet.md b/src/reference/cli/cast/wallet.md index 2fbf2d3d3..3fce1957b 100644 --- a/src/reference/cli/cast/wallet.md +++ b/src/reference/cli/cast/wallet.md @@ -4,6 +4,9 @@ Wallet management utilities ```bash $ cast wallet --help +``` + +```txt Usage: cast wallet Commands: @@ -15,7 +18,8 @@ Commands: sign-auth EIP-7702 sign authorization [aliases: sa] verify Verify the signature of a message [aliases: v] import Import a private key into an encrypted keystore [aliases: i] - list List all the accounts in the keystore default directory [aliases: ls] + list List all the accounts in the keystore default directory + [aliases: ls] private-key Derives private key from mnemonic [aliases: pk] decrypt-keystore Decrypt a keystore file to get the private key [aliases: dk] help Print this message or the help of the given subcommand(s) diff --git a/src/reference/cli/cast/wallet/address.md b/src/reference/cli/cast/wallet/address.md index d50d326c6..6a27f8854 100644 --- a/src/reference/cli/cast/wallet/address.md +++ b/src/reference/cli/cast/wallet/address.md @@ -4,11 +4,15 @@ Convert a private key to an address ```bash $ cast wallet address --help +``` + +```txt Usage: cast wallet address [OPTIONS] [PRIVATE_KEY] Arguments: [PRIVATE_KEY] - If provided, the address will be derived from the specified private key + If provided, the address will be derived from the specified private + key Options: -h, --help @@ -51,7 +55,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/wallet/decrypt-keystore.md b/src/reference/cli/cast/wallet/decrypt-keystore.md index d58125c9e..39f0255de 100644 --- a/src/reference/cli/cast/wallet/decrypt-keystore.md +++ b/src/reference/cli/cast/wallet/decrypt-keystore.md @@ -4,16 +4,22 @@ Decrypt a keystore file to get the private key ```bash $ cast wallet decrypt-keystore --help +``` + +```txt Usage: cast wallet decrypt-keystore [OPTIONS] Arguments: The name for the account in the keystore Options: - -k, --keystore-dir If not provided, keystore will try to be located at the default - keystores directory (~/.foundry/keystores) - --unsafe-password Password for the JSON keystore in cleartext This is unsafe, we - recommend using the default hidden password prompt [env: - CAST_UNSAFE_PASSWORD=] - -h, --help Print help + -k, --keystore-dir + If not provided, keystore will try to be located at the default + keystores directory (~/.foundry/keystores) + --unsafe-password + Password for the JSON keystore in cleartext This is unsafe, we + recommend using the default hidden password prompt [env: + CAST_UNSAFE_PASSWORD=] + -h, --help + Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/wallet/import.md b/src/reference/cli/cast/wallet/import.md index 358d4c913..3c3fff9d1 100644 --- a/src/reference/cli/cast/wallet/import.md +++ b/src/reference/cli/cast/wallet/import.md @@ -4,6 +4,9 @@ Import a private key into an encrypted keystore ```bash $ cast wallet import --help +``` + +```txt Usage: cast wallet import [OPTIONS] Arguments: @@ -12,12 +15,12 @@ Arguments: Options: -k, --keystore-dir - If provided, keystore will be saved here instead of the default keystores directory - (~/.foundry/keystores) + If provided, keystore will be saved here instead of the default + keystores directory (~/.foundry/keystores) --unsafe-password - Password for the JSON keystore in cleartext This is unsafe, we recommend using the default - hidden password prompt + Password for the JSON keystore in cleartext This is unsafe, we + recommend using the default hidden password prompt [env: CAST_UNSAFE_PASSWORD=] diff --git a/src/reference/cli/cast/wallet/list.md b/src/reference/cli/cast/wallet/list.md index ed710a3be..9e2f9d88d 100644 --- a/src/reference/cli/cast/wallet/list.md +++ b/src/reference/cli/cast/wallet/list.md @@ -4,16 +4,25 @@ List all the accounts in the keystore default directory ```bash $ cast wallet list --help +``` + +```txt Usage: cast wallet list [OPTIONS] Options: - --dir [] List all the accounts in the keystore directory. Default keystore - directory is used if no path provided - -l, --ledger List accounts from a Ledger hardware wallet - -t, --trezor List accounts from a Trezor hardware wallet - --aws List accounts from AWS KMS - --all List all configured accounts - -m, --max-senders Max number of addresses to display from hardware wallets - [default: 3] - -h, --help Print help + --dir [] + List all the accounts in the keystore directory. Default keystore + directory is used if no path provided + -l, --ledger + List accounts from a Ledger hardware wallet + -t, --trezor + List accounts from a Trezor hardware wallet + --aws + List accounts from AWS KMS + --all + List all configured accounts + -m, --max-senders + Max number of addresses to display from hardware wallets [default: 3] + -h, --help + Print help ``` \ No newline at end of file diff --git a/src/reference/cli/cast/wallet/new-mnemonic.md b/src/reference/cli/cast/wallet/new-mnemonic.md index 2090a8d92..15a516747 100644 --- a/src/reference/cli/cast/wallet/new-mnemonic.md +++ b/src/reference/cli/cast/wallet/new-mnemonic.md @@ -4,6 +4,9 @@ Generates a random BIP39 mnemonic phrase ```bash $ cast wallet new-mnemonic --help +``` + +```txt Usage: cast wallet new-mnemonic [OPTIONS] Options: diff --git a/src/reference/cli/cast/wallet/new.md b/src/reference/cli/cast/wallet/new.md index 251b12235..9c310ab00 100644 --- a/src/reference/cli/cast/wallet/new.md +++ b/src/reference/cli/cast/wallet/new.md @@ -4,11 +4,15 @@ Create a new random keypair ```bash $ cast wallet new --help +``` + +```txt Usage: cast wallet new [OPTIONS] [PATH] Arguments: [PATH] - If provided, then keypair will be written to an encrypted JSON keystore + If provided, then keypair will be written to an encrypted JSON + keystore Options: -p, --password diff --git a/src/reference/cli/cast/wallet/private-key.md b/src/reference/cli/cast/wallet/private-key.md index 26948cea8..c716c78c0 100644 --- a/src/reference/cli/cast/wallet/private-key.md +++ b/src/reference/cli/cast/wallet/private-key.md @@ -4,15 +4,19 @@ Derives private key from mnemonic ```bash $ cast wallet private-key --help +``` + +```txt Usage: cast wallet private-key [OPTIONS] [MNEMONIC] [MNEMONIC_INDEX_OR_DERIVATION_PATH] Arguments: [MNEMONIC] - If provided, the private key will be derived from the specified menomonic phrase + If provided, the private key will be derived from the specified + menomonic phrase [MNEMONIC_INDEX_OR_DERIVATION_PATH] - If provided, the private key will be derived using the specified mnemonic index (if - integer) or derivation path + If provided, the private key will be derived using the specified + mnemonic index (if integer) or derivation path Options: -v, --verbose @@ -58,7 +62,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/wallet/sign-auth.md b/src/reference/cli/cast/wallet/sign-auth.md index 8a9cbd948..cb8092ce6 100644 --- a/src/reference/cli/cast/wallet/sign-auth.md +++ b/src/reference/cli/cast/wallet/sign-auth.md @@ -4,6 +4,9 @@ EIP-7702 sign authorization ```bash $ cast wallet sign-auth --help +``` + +```txt Usage: cast wallet sign-auth [OPTIONS]
Arguments: @@ -17,17 +20,20 @@ Options: [env: ETH_RPC_URL=] --flashbots - Use the Flashbots RPC URL with fast mode (). + Use the Flashbots RPC URL with fast mode + (). This shares the transaction privately with all registered builders. - See: + See: + --jwt-secret JWT Secret for the RPC endpoint. - The JWT secret will be used to create a JWT for a RPC. For example, the following can be - used to simulate a CL `engine_forkchoiceUpdated` call: + The JWT secret will be used to create a JWT for a RPC. For example, + the following can be used to simulate a CL `engine_forkchoiceUpdated` + call: cast rpc --jwt-secret engine_forkchoiceUpdatedV2 '["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc", @@ -82,7 +88,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/wallet/sign.md b/src/reference/cli/cast/wallet/sign.md index 8eb0261e5..7ef296fcc 100644 --- a/src/reference/cli/cast/wallet/sign.md +++ b/src/reference/cli/cast/wallet/sign.md @@ -4,21 +4,25 @@ Sign a message or typed data ```bash $ cast wallet sign --help +``` + +```txt Usage: cast wallet sign [OPTIONS] Arguments: The message, typed data, or hash to sign. - Messages starting with 0x are expected to be hex encoded, which get decoded before being - signed. + Messages starting with 0x are expected to be hex encoded, which get + decoded before being signed. - The message will be prefixed with the Ethereum Signed Message header and hashed before - signing, unless `--no-hash` is provided. + The message will be prefixed with the Ethereum Signed Message header + and hashed before signing, unless `--no-hash` is provided. - Typed data can be provided as a json string or a file name. Use --data flag to denote the - message is a string of typed data. Use --data --from-file to denote the message is a file - name containing typed data. The data will be combined and hashed using the EIP712 + Typed data can be provided as a json string or a file name. Use --data + flag to denote the message is a string of typed data. Use --data + --from-file to denote the message is a file name containing typed + data. The data will be combined and hashed using the EIP712 specification before signing. The data should be formatted as JSON. Options: @@ -26,10 +30,12 @@ Options: Treat the message as JSON typed data --from-file - Treat the message as a file containing JSON typed data. Requires `--data` + Treat the message as a file containing JSON typed data. Requires + `--data` --no-hash - Treat the message as a raw 32-byte hash and sign it directly without hashing it again + Treat the message as a raw 32-byte hash and sign it directly without + hashing it again -h, --help Print help (see a summary with '-h') @@ -71,7 +77,8 @@ Wallet options - keystore: [env: ETH_KEYSTORE=] --account - Use a keystore from the default keystores folder (~/.foundry/keystores) by its filename + Use a keystore from the default keystores folder + (~/.foundry/keystores) by its filename [env: ETH_KEYSTORE_ACCOUNT=] diff --git a/src/reference/cli/cast/wallet/vanity.md b/src/reference/cli/cast/wallet/vanity.md index 4a0068796..951e6ed68 100644 --- a/src/reference/cli/cast/wallet/vanity.md +++ b/src/reference/cli/cast/wallet/vanity.md @@ -4,6 +4,9 @@ Generate a vanity address ```bash $ cast wallet vanity --help +``` + +```txt Usage: cast wallet vanity [OPTIONS] Options: @@ -14,14 +17,14 @@ Options: Suffix regex pattern or hex string --nonce - Generate a vanity contract address created by the generated keypair with the specified - nonce + Generate a vanity contract address created by the generated keypair + with the specified nonce --save-path Path to save the generated vanity contract address to. - If provided, the generated vanity addresses will appended to a JSON array in the specified - file. + If provided, the generated vanity addresses will appended to a JSON + array in the specified file. -h, --help Print help (see a summary with '-h') diff --git a/src/reference/cli/cast/wallet/verify.md b/src/reference/cli/cast/wallet/verify.md index 1141ecafd..d929079fb 100644 --- a/src/reference/cli/cast/wallet/verify.md +++ b/src/reference/cli/cast/wallet/verify.md @@ -4,6 +4,9 @@ Verify the signature of a message ```bash $ cast wallet verify --help +``` + +```txt Usage: cast wallet verify --address
Arguments: diff --git a/src/reference/cli/chisel.md b/src/reference/cli/chisel.md index 950e55dd3..dd8323b30 100644 --- a/src/reference/cli/chisel.md +++ b/src/reference/cli/chisel.md @@ -4,6 +4,9 @@ Fast, utilitarian, and verbose Solidity REPL ```bash $ chisel --help +``` + +```txt Usage: chisel [OPTIONS] [COMMAND] Commands: @@ -22,16 +25,17 @@ Options: REPL options: --prelude - Path to a directory containing Solidity files to import, or path to a single Solidity - file. + Path to a directory containing Solidity files to import, or path to a + single Solidity file. - These files will be evaluated before the top-level of the REPL, therefore functioning as a - prelude + These files will be evaluated before the top-level of the REPL, + therefore functioning as a prelude --no-vm Disable the default `Vm` import. - The import is disabled by default if the Solc version is less than 0.6.2. + The import is disabled by default if the Solc version is less than + 0.6.2. Cache options: --force @@ -65,7 +69,8 @@ Compiler options: --use Specify the solc version, or a path to a local solc, to build with. - Valid values are in the format `x.y.z`, `solc:x.y.z` or `path/to/solc`. + Valid values are in the format `x.y.z`, `solc:x.y.z` or + `path/to/solc`. --offline Do not access the network. @@ -78,7 +83,8 @@ Compiler options: --no-metadata Do not append any metadata to the bytecode. - This is equivalent to setting `bytecode_hash` to `none` and `cbor_metadata` to `false`. + This is equivalent to setting `bytecode_hash` to `none` and + `cbor_metadata` to `false`. --silent Don't print anything on startup @@ -115,8 +121,8 @@ Project options: --revert-strings Revert string configuration. - Possible values are "default", "strip" (remove), "debug" (Solidity-generated revert - strings) and "verboseDebug" + Possible values are "default", "strip" (remove), "debug" + (Solidity-generated revert strings) and "verboseDebug" --build-info Generate build info files @@ -127,7 +133,8 @@ Project options: --root The project's root path. - By default root of the Git repository, if in one, or the current working directory. + By default root of the Git repository, if in one, or the current + working directory. -C, --contracts The contracts source directory @@ -147,7 +154,8 @@ Project options: --hardhat Use the Hardhat-style project layout. - This is the same as using: `--contracts contracts --lib-paths node_modules`. + This is the same as using: `--contracts contracts --lib-paths + node_modules`. [aliases: hh] @@ -156,9 +164,11 @@ Project options: EVM options: -f, --fork-url - Fetch state over a remote endpoint instead of starting from an empty state. + Fetch state over a remote endpoint instead of starting from an empty + state. - If you want to fetch state from a specific block number, see --fork-block-number. + If you want to fetch state from a specific block number, see + --fork-block-number. [aliases: rpc-url] @@ -196,7 +206,8 @@ EVM options: Enable the FFI cheatcode --always-use-create-2-factory - Use the create 2 factory in all cases including tests and non-broadcasting scripts + Use the create 2 factory in all cases including tests and + non-broadcasting scripts -v, --verbosity... Verbosity of the EVM. @@ -206,12 +217,14 @@ EVM options: Verbosity levels: - 2: Print logs for all tests - 3: Print execution traces for failing tests - - 4: Print execution traces for all tests, and setup traces for failing tests + - 4: Print execution traces for all tests, and setup traces for + failing tests - 5: Print execution and setup traces for all tests Fork config: --compute-units-per-second - Sets the number of assumed available compute units per second for this provider + Sets the number of assumed available compute units per second for this + provider default value: 330 @@ -231,8 +244,8 @@ Executor environment config: The block gas limit --code-size-limit - EIP-170: Contract code size limit in bytes. Useful to increase this because of tests. By - default, it is 0x6000 (~25kb) + EIP-170: Contract code size limit in bytes. Useful to increase this + because of tests. By default, it is 0x6000 (~25kb) --chain The chain name or EIP-155 chain ID @@ -269,8 +282,8 @@ Executor environment config: The block gas limit --memory-limit - The memory limit per EVM execution in bytes. If this limit is exceeded, a `MemoryLimitOOG` - result is thrown. + The memory limit per EVM execution in bytes. If this limit is + exceeded, a `MemoryLimitOOG` result is thrown. The default is 128MiB. @@ -280,9 +293,10 @@ Executor environment config: [aliases: no-gas-limit] --isolate - Whether to enable isolation of calls. In isolation mode all top-level calls are executed - as a separate transaction in a separate EVM context, enabling more precise gas accounting - and transaction state changes + Whether to enable isolation of calls. In isolation mode all top-level + calls are executed as a separate transaction in a separate EVM + context, enabling more precise gas accounting and transaction state + changes --alphanet Whether to enable Alphanet features diff --git a/src/reference/cli/chisel/clear-cache.md b/src/reference/cli/chisel/clear-cache.md index fdbf6698f..04176db1a 100644 --- a/src/reference/cli/chisel/clear-cache.md +++ b/src/reference/cli/chisel/clear-cache.md @@ -4,6 +4,9 @@ Clear all cached chisel sessions from the cache directory ```bash $ chisel clear-cache --help +``` + +```txt Usage: chisel clear-cache Options: diff --git a/src/reference/cli/chisel/list.md b/src/reference/cli/chisel/list.md index 96f22fbb4..4af22e380 100644 --- a/src/reference/cli/chisel/list.md +++ b/src/reference/cli/chisel/list.md @@ -4,6 +4,9 @@ List all cached sessions ```bash $ chisel list --help +``` + +```txt Usage: chisel list Options: diff --git a/src/reference/cli/chisel/load.md b/src/reference/cli/chisel/load.md index 7d1f7202b..83337045d 100644 --- a/src/reference/cli/chisel/load.md +++ b/src/reference/cli/chisel/load.md @@ -4,6 +4,9 @@ Load a cached session ```bash $ chisel load --help +``` + +```txt Usage: chisel load Arguments: diff --git a/src/reference/cli/chisel/view.md b/src/reference/cli/chisel/view.md index 75a09aa81..54d463314 100644 --- a/src/reference/cli/chisel/view.md +++ b/src/reference/cli/chisel/view.md @@ -4,6 +4,9 @@ View the source of a cached session ```bash $ chisel view --help +``` + +```txt Usage: chisel view Arguments: diff --git a/src/reference/cli/forge.md b/src/reference/cli/forge.md index e86e37b02..6dfd58f06 100644 --- a/src/reference/cli/forge.md +++ b/src/reference/cli/forge.md @@ -4,15 +4,19 @@ Build, test, fuzz, debug and deploy Solidity contracts ```bash $ forge --help +``` + +```txt Usage: forge Commands: bind Generate Rust bindings for smart contracts - bind-json Generate bindings for serialization/deserialization of project structs via JSON - cheatcodes + bind-json Generate bindings for serialization/deserialization of + project structs via JSON cheatcodes build Build the project's smart contracts [aliases: b, compile] cache Manage the Foundry cache - clean Remove the build artifacts and cache directories [aliases: cl] + clean Remove the build artifacts and cache directories [aliases: + cl] clone Clone a contract from Etherscan completions Generate shell completions script [aliases: com] config Display the current config [aliases: co] @@ -20,27 +24,34 @@ Commands: create Deploy a smart contract [aliases: c] debug Debugs a single smart contract as a script [aliases: d] doc Generate documentation for the project - eip712 Generate EIP-712 struct encodings for structs from a given file - flatten Flatten a source file and all of its imports into one file [aliases: f] + eip712 Generate EIP-712 struct encodings for structs from a given + file + flatten Flatten a source file and all of its imports into one file + [aliases: f] fmt Format Solidity source files - geiger Detects usage of unsafe cheat codes in a project and its dependencies + geiger Detects usage of unsafe cheat codes in a project and its + dependencies generate Generate scaffold files generate-fig-spec Generate Fig autocompletion spec [aliases: fig] help Print this message or the help of the given subcommand(s) init Create a new Forge project - inspect Get specialized information about a smart contract [aliases: in] + inspect Get specialized information about a smart contract + [aliases: in] install Install one or multiple dependencies [aliases: i] - remappings Get the automatically inferred remappings for the project [aliases: re] + remappings Get the automatically inferred remappings for the project + [aliases: re] remove Remove one or multiple dependencies [aliases: rm] - script Run a smart contract as a script, building transactions that can be sent - onchain + script Run a smart contract as a script, building transactions + that can be sent onchain selectors Function selector utilities [aliases: se] snapshot Create a snapshot of each test's gas usage [aliases: s] soldeer Soldeer dependency manager test Run the project's tests [aliases: t] - tree Display a tree visualization of the project's dependency graph [aliases: tr] + tree Display a tree visualization of the project's dependency + graph [aliases: tr] update Update one or multiple dependencies [aliases: u] - verify-bytecode Verify the deployed bytecode against its source on Etherscan [aliases: vb] + verify-bytecode Verify the deployed bytecode against its source on + Etherscan [aliases: vb] verify-check Check verification status on Etherscan [aliases: vc] verify-contract Verify smart contracts on Etherscan [aliases: v] @@ -48,5 +59,6 @@ Options: -h, --help Print help -V, --version Print version -Find more information in the book: http://book.getfoundry.sh/reference/forge/forge.html +Find more information in the book: +http://book.getfoundry.sh/reference/forge/forge.html ``` \ No newline at end of file diff --git a/src/reference/cli/forge/bind-json.md b/src/reference/cli/forge/bind-json.md index 95891c57b..1d4a2b1a0 100644 --- a/src/reference/cli/forge/bind-json.md +++ b/src/reference/cli/forge/bind-json.md @@ -1,9 +1,12 @@ # forge bind-json -Generate bindings for serialization/deserialization of project structs via JSON cheatcodes +Generate bindings for serialization/deserialization of project structs via JSON ```bash $ forge bind-json --help +``` + +```txt Usage: forge bind-json [OPTIONS] [PATH] Arguments: @@ -46,7 +49,8 @@ Compiler options: --use Specify the solc version, or a path to a local solc, to build with. - Valid values are in the format `x.y.z`, `solc:x.y.z` or `path/to/solc`. + Valid values are in the format `x.y.z`, `solc:x.y.z` or + `path/to/solc`. --offline Do not access the network. @@ -59,7 +63,8 @@ Compiler options: --no-metadata Do not append any metadata to the bytecode. - This is equivalent to setting `bytecode_hash` to `none` and `cbor_metadata` to `false`. + This is equivalent to setting `bytecode_hash` to `none` and + `cbor_metadata` to `false`. --silent Don't print anything on startup @@ -96,8 +101,8 @@ Project options: --revert-strings Revert string configuration. - Possible values are "default", "strip" (remove), "debug" (Solidity-generated revert - strings) and "verboseDebug" + Possible values are "default", "strip" (remove), "debug" + (Solidity-generated revert strings) and "verboseDebug" --build-info Generate build info files @@ -108,7 +113,8 @@ Project options: --root The project's root path. - By default root of the Git repository, if in one, or the current working directory. + By default root of the Git repository, if in one, or the current + working directory. -C, --contracts The contracts source directory @@ -128,7 +134,8 @@ Project options: --hardhat Use the Hardhat-style project layout. - This is the same as using: `--contracts contracts --lib-paths node_modules`. + This is the same as using: `--contracts contracts --lib-paths + node_modules`. [aliases: hh] diff --git a/src/reference/cli/forge/bind.md b/src/reference/cli/forge/bind.md index f0eb84e6e..356e230e9 100644 --- a/src/reference/cli/forge/bind.md +++ b/src/reference/cli/forge/bind.md @@ -4,6 +4,9 @@ Generate Rust bindings for smart contracts ```bash $ forge bind --help +``` + +```txt Usage: forge bind [OPTIONS] Options: @@ -11,7 +14,8 @@ Options: Path to where the contract artifacts are stored --select