Skip to content

Commit

Permalink
update command output (#1293)
Browse files Browse the repository at this point in the history
Co-authored-by: mattsse <[email protected]>
  • Loading branch information
github-actions[bot] and mattsse authored Sep 15, 2024
1 parent 34cb6e1 commit cafde78
Show file tree
Hide file tree
Showing 25 changed files with 168 additions and 37 deletions.
2 changes: 2 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
- [`cast chain-id`](./reference/cli/cast/chain-id.md)
- [`cast client`](./reference/cli/cast/client.md)
- [`cast code`](./reference/cli/cast/code.md)
- [`cast codehash`](./reference/cli/cast/codehash.md)
- [`cast codesize`](./reference/cli/cast/codesize.md)
- [`cast completions`](./reference/cli/cast/completions.md)
- [`cast compute-address`](./reference/cli/cast/compute-address.md)
Expand Down Expand Up @@ -206,6 +207,7 @@
- [`cast sig`](./reference/cli/cast/sig.md)
- [`cast sig-event`](./reference/cli/cast/sig-event.md)
- [`cast storage`](./reference/cli/cast/storage.md)
- [`cast storage-root`](./reference/cli/cast/storage-root.md)
- [`cast to-ascii`](./reference/cli/cast/to-ascii.md)
- [`cast to-base`](./reference/cli/cast/to-base.md)
- [`cast to-bytes32`](./reference/cli/cast/to-bytes32.md)
Expand Down
2 changes: 1 addition & 1 deletion src/output/cast/cast-call

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/cheatcodes/forge-test-cheatcodes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/cheatcodes/forge-test-cheatcodes-expectrevert

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/cheatcodes/forge-test-cheatcodes-tracing

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/cheatcodes/forge-test-simple

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/output/deps/forge-install

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/output/foundry-template/forge-build

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/foundry-template/forge-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/output/fuzz_testing/forge-test-fail-fuzz

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/output/fuzz_testing/forge-test-no-fuzz

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/output/fuzz_testing/forge-test-success-fuzz

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/output/hello_foundry/forge-build

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/hello_foundry/forge-init

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/output/hello_foundry/forge-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/output/nft_tutorial/forge-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/test_filters/forge-test-match-contract-and-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/output/test_filters/forge-test-match-path

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/reference/cli/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
- [`cast chain-id`](./cast/chain-id.md)
- [`cast client`](./cast/client.md)
- [`cast code`](./cast/code.md)
- [`cast codehash`](./cast/codehash.md)
- [`cast codesize`](./cast/codesize.md)
- [`cast completions`](./cast/completions.md)
- [`cast compute-address`](./cast/compute-address.md)
Expand Down Expand Up @@ -122,6 +123,7 @@
- [`cast sig`](./cast/sig.md)
- [`cast sig-event`](./cast/sig-event.md)
- [`cast storage`](./cast/storage.md)
- [`cast storage-root`](./cast/storage-root.md)
- [`cast to-ascii`](./cast/to-ascii.md)
- [`cast to-base`](./cast/to-base.md)
- [`cast to-bytes32`](./cast/to-bytes32.md)
Expand Down
2 changes: 2 additions & 0 deletions src/reference/cli/cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Commands:
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]
completions Generate shell completions script [aliases: com]
compute-address Compute the contract address from a given nonce and deployer address
Expand Down Expand Up @@ -91,6 +92,7 @@ Commands:
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]
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]
Expand Down
49 changes: 49 additions & 0 deletions src/reference/cli/cast/codehash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# cast codehash

Get the codehash for an account

```bash
$ cast codehash --help
Usage: cast codehash [OPTIONS] <WHO> [SLOTS]...

Arguments:
<WHO>
The address to get the codehash for

[SLOTS]...
The storage slot numbers (hex or decimal)

Options:
-B, --block <BLOCK>
The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

-r, --rpc-url <URL>
The RPC endpoint

[env: ETH_RPC_URL=]

--flashbots
Use the Flashbots RPC URL with fast mode (<https://rpc.flashbots.net/fast>).

This shares the transaction privately with all registered builders.

See: <https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions>

--jwt-secret <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:

cast rpc --jwt-secret <JWT_SECRET> engine_forkchoiceUpdatedV2
'["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc",
"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc",
"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc"]'

[env: ETH_RPC_JWT_SECRET=]

-h, --help
Print help (see a summary with '-h')
```
49 changes: 49 additions & 0 deletions src/reference/cli/cast/storage-root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# cast storage-root

Get the storage root for an account

```bash
$ cast storage-root --help
Usage: cast storage-root [OPTIONS] <WHO> [SLOTS]...

Arguments:
<WHO>
The address to get the storage root for

[SLOTS]...
The storage slot numbers (hex or decimal)

Options:
-B, --block <BLOCK>
The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

-r, --rpc-url <URL>
The RPC endpoint

[env: ETH_RPC_URL=]

--flashbots
Use the Flashbots RPC URL with fast mode (<https://rpc.flashbots.net/fast>).

This shares the transaction privately with all registered builders.

See: <https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions>

--jwt-secret <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:

cast rpc --jwt-secret <JWT_SECRET> engine_forkchoiceUpdatedV2
'["0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc",
"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc",
"0x6bb38c26db65749ab6e472080a3d20a2f35776494e72016d1e339593f21c59bc"]'

[env: ETH_RPC_JWT_SECRET=]

-h, --help
Print help (see a summary with '-h')
```
9 changes: 9 additions & 0 deletions src/reference/cli/forge/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Test options:

For more fine-grained control of which fuzz case is run, see forge run.

--flamegraph
Generate a flamegraph for a single test. Implies `--decode-internal`

--flamechart
Generate a flamechart for a single test. Implies `--decode-internal`

--decode-internal [<TEST_FUNCTION>]
Whether to identify internal functions in traces.

Expand Down Expand Up @@ -104,6 +110,9 @@ Display options:
--json
Output test results in JSON format
--junit
Output test results as JUnit XML report
-l, --list
List tests instead of running them
Expand Down
Loading

0 comments on commit cafde78

Please sign in to comment.