From eeca2a59df9ad1a17052e50dd1906c9288294ed2 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 12 Dec 2024 15:52:31 +0100 Subject: [PATCH 1/7] start adding new docs --- CONTRIBUTING.md | 2 +- src/SUMMARY.md | 8 ++-- src/anvil/README.md | 89 ++++++++++++++++++++++++++++++++++++++++---- src/cast/README.md | 7 +++- src/chisel/README.md | 51 ++++++++++++++++++++----- src/forge/README.md | 63 ++++++++++++++++++++++++++++++- 6 files changed, 197 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69e81d269..e5d8ba341 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ As a small change in the Foundry CLIs can have a large impact on the book, most Each output file has three anchors you can use: -**Display the command *and* the output** +**Display the command _and_ the output** ```handlebars {{#include ../output/abc/xyz:all}} diff --git a/src/SUMMARY.md b/src/SUMMARY.md index fef28e450..d86581a3d 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -18,7 +18,7 @@ # Forge Overview -- [Overview of Forge](forge/README.md) +- [Forge](forge/README.md) - [Tests](./forge/tests.md) - [Writing Tests](./forge/writing-tests.md) - [Cheatcodes](./forge/cheatcodes.md) @@ -45,15 +45,15 @@ # Cast Overview -- [Overview of Cast](./cast/README.md) +- [Cast](./cast/README.md) # Anvil Overview -- [Overview of Anvil](./anvil/README.md) +- [Anvil](./anvil/README.md) # Chisel Overview -- [Overview of Chisel](./chisel/README.md) +- [Chisel](./chisel/README.md) # Configuration diff --git a/src/anvil/README.md b/src/anvil/README.md index 2c9f8b251..13b81129b 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -1,14 +1,90 @@ -## Overview of Anvil +## Anvil -Anvil is a local testnet node shipped with Foundry. You can use it for testing your contracts from frontends or for interacting over RPC. +Anvil is a fast local Ethereum development node. -Anvil is part of the Foundry suite and is installed alongside `forge`, `cast`, and `chisel`. If you haven't installed Foundry yet, see [Foundry installation](../getting-started/installation.md). +Anvil is part of the Foundry suite and is installed alongside `forge`, `cast` and `chisel`. If you haven't installed Foundry +yet, see [Foundry installation](../getting-started/installation.md). -> Note: If you have an older version of Foundry installed, you'll need to re-install `foundryup` in order for Anvil to be downloaded. +### Getting Started -### How to use Anvil +To use Anvil, simply type `anvil`. To fork against a live Ethereum network run `anvil --fork-url `. -To use Anvil, simply type `anvil`. You should see a list of accounts and private keys available for use, as well as the address and port that the node is listening on. +Let's fork Ethereum mainnet at the latest block: + +```console +$ anvil --fork-url https://eth.merkle.io + + + _ _ + (_) | | + __ _ _ __ __ __ _ | | + / _` | | '_ \ \ \ / / | | | | + | (_| | | | | | \ V / | | | | + \__,_| |_| |_| \_/ |_| |_| + + 0.2.0 (c4fcf12 2024-12-12T00:23:45.094165202Z) + https://github.com/foundry-rs/foundry + +Available Accounts +================== + +(0) 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000.000000000000000000 ETH) +(1) 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000.000000000000000000 ETH) +(2) 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000.000000000000000000 ETH) +(3) 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000.000000000000000000 ETH) +(4) 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000.000000000000000000 ETH) +(5) 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000.000000000000000000 ETH) +(6) 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (10000.000000000000000000 ETH) +(7) 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (10000.000000000000000000 ETH) +(8) 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (10000.000000000000000000 ETH) +(9) 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 (10000.000000000000000000 ETH) + +Private Keys +================== + +(0) 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 +(1) 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d +(2) 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a +(3) 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 +(4) 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a +(5) 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba +(6) 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e +(7) 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 +(8) 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 +(9) 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 + +Wallet +================== +Mnemonic: test test test test test test test test test test test junk +Derivation path: m/44'/60'/0'/0/ + + +Fork +================== +Endpoint: https://eth.merkle.io +Block number: 21387064 +Block hash: 0x904aee789b82ac0412448bc2ea9bb3774d10c2dae4a0e5b7f6451ac2ecd0787a +Chain ID: 1 + +Base Fee +================== + +26049293674 + +Gas Limit +================== + +30000000 + +Genesis Timestamp +================== + +1734014216 + +Listening on 127.0.0.1:8545 +``` + +### Features Anvil is highly configurable. You can run `anvil -h` to see all the configuration options. @@ -28,4 +104,3 @@ anvil -p, --port > πŸ“š **Reference** > > See the [`anvil` Reference](../reference/anvil/) for in depth information on Anvil and its capabilities. - diff --git a/src/cast/README.md b/src/cast/README.md index 09c683a75..d0cca3569 100644 --- a/src/cast/README.md +++ b/src/cast/README.md @@ -2,6 +2,11 @@ Cast is Foundry's command-line tool for performing Ethereum RPC calls. You can make smart contract calls, send transactions, or retrieve any type of chain data - all from your command-line! +The `cast` binary can be used both within and outside of a Foundry project. + +Cast is part of the Foundry suite and is installed alongside `forge`, `chisel`, and `anvil`. If you haven't installed Foundry +yet, see [Foundry installation](../getting-started/installation.md). + ### How to use Cast To use Cast, run the [`cast`](../reference/cast/cast.md) command followed by a subcommand: @@ -33,5 +38,5 @@ $ cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12f
> πŸ“š **Reference** -> +> > See the [`cast` Reference](../reference/cast/) for a complete overview of all the available subcommands. diff --git a/src/chisel/README.md b/src/chisel/README.md index af6e175be..7709c26c0 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -1,23 +1,56 @@ ## Overview of Chisel -Chisel is an advanced Solidity REPL shipped with Foundry. It can be used to quickly test the behavior of Solidity snippets -on a local or forked network. +Chisel is a fast, utilitarian, and verbose Solidity REPL. + +The `chisel` binary can be used both within and outside of a Foundry project. +If the binary is executed in a Foundry project root, Chisel will inherit the project's configuration options. Chisel is part of the Foundry suite and is installed alongside `forge`, `cast`, and `anvil`. If you haven't installed Foundry -yet, see [Foundry installation](../getting-started/installation.md). +yet, see [Foundry installation](../getting-started/installation.md). + +### Getting Started + +To use Chisel, simply type `chisel`. + +```sh +chisel +``` + +From here, start writing Solidity code! Chisel will offer verbose feedback on each input. -> Note: If you have an older version of Foundry installed, you'll need to re-install `foundryup` in order for Chisel to be downloaded. +Create a variable `a` and query it: -### How to use Chisel +```console +➜ uint256 a = 123; +➜ a +Type: uint256 +β”œ Hex: 0x7b +β”œ Hex (full word): 0x000000000000000000000000000000000000000000000000000000000000007b +β”” Decimal: 123 +``` -To use Chisel, simply type `chisel`. From there, start writing Solidity code! Chisel will offer verbose feedback on each input. +Finally, run `!source` to see `a` was applied: -Chisel can be used both within and outside of a foundry project. If the binary is executed in a Foundry project root, Chisel will -inherit the project's configuration options. +```solidity +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.28; + +import {Vm} from "forge-std/Vm.sol"; + +contract REPL { + Vm internal constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + + /// @notice REPL contract entry point + function run() public { + uint256 a = 123; + } +} +``` To see available commands, type `!help` within the REPL. +### Reference + > πŸ“š **Reference** > > See the [`chisel` Reference](../reference/chisel/) for in depth information on Chisel and its capabilities. - diff --git a/src/forge/README.md b/src/forge/README.md index 40561bb1a..10395b021 100644 --- a/src/forge/README.md +++ b/src/forge/README.md @@ -1,3 +1,64 @@ -## Overview of Forge +## Forge Forge is a command-line tool that ships with Foundry. Forge tests, builds, and deploys your smart contracts. + +Forge is part of the Foundry suite and is installed alongside `cast`, `chisel`, and `anvil`. If you haven't installed Foundry +yet, see [Foundry installation](../getting-started/installation.md). + +### Getting Started + +The best way to understand Forge is to simply try it (in less than 30 seconds!). + +First, let's initialize a new `counter` example repository: + +```sh +$ forge init counter +``` + +Next `cd` into `counter` and build : + +```sh +$ forge build +``` + +```console +[⠊] Compiling... +[β ”] Compiling 27 files with Solc 0.8.28 +[β ’] Solc 0.8.28 finished in 452.13ms +Compiler run successful! +``` + +Let's [test](https://book.getfoundry.sh/forge/tests#tests) our contracts: + +```sh +$ forge test +``` + +```console +[⠊] Compiling... +No files changed, compilation skipped + +Ran 2 tests for test/Counter.t.sol:CounterTest +[PASS] testFuzz_SetNumber(uint256) (runs: 256, ΞΌ: 31121, ~: 31277) +[PASS] test_Increment() (gas: 31293) +Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 5.35ms (4.86ms CPU time) + +Ran 1 test suite in 5.91ms (5.35ms CPU time): 2 tests passed, 0 failed, 0 skipped (2 total tests) +``` + +Finally, let's run our deployment script: + +```sh +$ forge script script/Counter.s.sol +``` + +```console +[⠊] Compiling... +No files changed, compilation skipped +Script ran successfully. +Gas used: 109037 + +If you wish to simulate on-chain transactions pass a RPC URL. +``` + +### Features From 3f459432c817f7c0cb9bfd496ecb9944be8ec647 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 12 Dec 2024 15:58:27 +0100 Subject: [PATCH 2/7] update refs --- src/anvil/README.md | 4 +++- src/cast/README.md | 4 ++-- src/chisel/README.md | 6 +++--- src/forge/README.md | 6 ++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/anvil/README.md b/src/anvil/README.md index 13b81129b..cedc01777 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -101,6 +101,8 @@ anvil --hardfork anvil -p, --port ``` +
+ > πŸ“š **Reference** > -> See the [`anvil` Reference](../reference/anvil/) for in depth information on Anvil and its capabilities. +> See the [`anvil` Reference](../reference/anvil/README.md) for in depth information on Anvil and its capabilities. diff --git a/src/cast/README.md b/src/cast/README.md index d0cca3569..e48e35915 100644 --- a/src/cast/README.md +++ b/src/cast/README.md @@ -1,4 +1,4 @@ -## Overview of Cast +## Cast Cast is Foundry's command-line tool for performing Ethereum RPC calls. You can make smart contract calls, send transactions, or retrieve any type of chain data - all from your command-line! @@ -39,4 +39,4 @@ $ cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12f > πŸ“š **Reference** > -> See the [`cast` Reference](../reference/cast/) for a complete overview of all the available subcommands. +> See the [`cast` Reference](../reference/cast/README.md) for a complete overview of all the available subcommands. diff --git a/src/chisel/README.md b/src/chisel/README.md index 7709c26c0..4f79741ef 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -1,4 +1,4 @@ -## Overview of Chisel +## Chisel Chisel is a fast, utilitarian, and verbose Solidity REPL. @@ -49,8 +49,8 @@ contract REPL { To see available commands, type `!help` within the REPL. -### Reference +
> πŸ“š **Reference** > -> See the [`chisel` Reference](../reference/chisel/) for in depth information on Chisel and its capabilities. +> See the [`chisel` Reference](../reference/chisel/README.md) for in depth information on Chisel and its capabilities. diff --git a/src/forge/README.md b/src/forge/README.md index 10395b021..2be7a83c7 100644 --- a/src/forge/README.md +++ b/src/forge/README.md @@ -62,3 +62,9 @@ If you wish to simulate on-chain transactions pass a RPC URL. ``` ### Features + +
+ +> πŸ“š **Reference** +> +> See the [`forge` Reference](../reference/forge/README.md) for a complete overview of all the available subcommands. From 9a0a2461a304c1afdc31cdd9bc8c433b49d06f76 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 12 Dec 2024 16:04:25 +0100 Subject: [PATCH 3/7] clean up --- src/anvil/README.md | 2 +- src/cast/README.md | 40 +++++++++++++++++++++++++++------------- src/chisel/README.md | 2 +- src/forge/README.md | 2 +- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/anvil/README.md b/src/anvil/README.md index cedc01777..68331ac0b 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -5,7 +5,7 @@ Anvil is a fast local Ethereum development node. Anvil is part of the Foundry suite and is installed alongside `forge`, `cast` and `chisel`. If you haven't installed Foundry yet, see [Foundry installation](../getting-started/installation.md). -### Getting Started +### Getting started To use Anvil, simply type `anvil`. To fork against a live Ethereum network run `anvil --fork-url `. diff --git a/src/cast/README.md b/src/cast/README.md index e48e35915..7ce585648 100644 --- a/src/cast/README.md +++ b/src/cast/README.md @@ -1,38 +1,52 @@ ## Cast -Cast is Foundry's command-line tool for performing Ethereum RPC calls. You can make smart contract calls, send transactions, or retrieve any type of chain data - all from your command-line! +Cast is a Swiss Army knife for interacting with Ethereum applications from the command line. You can make smart contract calls, send transactions, or retrieve any type of chain data - all from your command-line! The `cast` binary can be used both within and outside of a Foundry project. Cast is part of the Foundry suite and is installed alongside `forge`, `chisel`, and `anvil`. If you haven't installed Foundry yet, see [Foundry installation](../getting-started/installation.md). -### How to use Cast +### Getting started -To use Cast, run the [`cast`](../reference/cast/cast.md) command followed by a subcommand: +Here are a few examples of what you can do: -```bash -$ cast +**Check the latest block on Ethereum Mainnet**: + +```sh +cast block-number --rpc-url https://eth.merkle.io +``` + +**Check the Ether balance of `vitalik.eth`** + +```sh +cast balance vitalik.eth --ether --rpc-url https://eth.merkle.io +``` + +**Replay and trace a transaction** + +```sh +cast run 0x9c32042f5e997e27e67f82583839548eb19dc78c4769ad6218657c17f2a5ed31 --rpc-url https://eth.merkle.io ``` -#### Examples +Optionally, pass `--etherscan-api-key ` to decode transaction traces using verified source maps, providing more detailed and human-readable information. -Let's use `cast` to retrieve the total supply of the DAI token: +**Retrieve the total supply of the DAI token** -```bash +```sh {{#include ../output/cast/cast-call:all}} ``` -`cast` also provides many convenient subcommands, such as for decoding calldata: +**Decode calldata** -```bash +```sh {{#include ../output/cast/cast-4byte-decode:all}} ``` -You can also use `cast` to send arbitrary messages. Here's an example of sending a message between two Anvil accounts. +**Send messages between two Anvil accounts** -```bash -$ cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc $(cast from-utf8 "hello world") --rpc-url http://127.0.0.1:8545/ +```sh +cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc $(cast from-utf8 "hello world") --rpc-url http://127.0.0.1:8545/ ```
diff --git a/src/chisel/README.md b/src/chisel/README.md index 4f79741ef..2c3673feb 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -8,7 +8,7 @@ If the binary is executed in a Foundry project root, Chisel will inherit the pro Chisel is part of the Foundry suite and is installed alongside `forge`, `cast`, and `anvil`. If you haven't installed Foundry yet, see [Foundry installation](../getting-started/installation.md). -### Getting Started +### Getting started To use Chisel, simply type `chisel`. diff --git a/src/forge/README.md b/src/forge/README.md index 2be7a83c7..a7e16510e 100644 --- a/src/forge/README.md +++ b/src/forge/README.md @@ -5,7 +5,7 @@ Forge is a command-line tool that ships with Foundry. Forge tests, builds, and d Forge is part of the Foundry suite and is installed alongside `cast`, `chisel`, and `anvil`. If you haven't installed Foundry yet, see [Foundry installation](../getting-started/installation.md). -### Getting Started +### Getting started The best way to understand Forge is to simply try it (in less than 30 seconds!). From 6444d646d23875fccc9e9f5417f5070955e80ef2 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 12 Dec 2024 16:05:39 +0100 Subject: [PATCH 4/7] note --- src/anvil/README.md | 15 +-------------- src/cast/README.md | 4 ++++ src/chisel/README.md | 4 ++++ src/forge/README.md | 2 ++ 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/anvil/README.md b/src/anvil/README.md index 68331ac0b..5e088b05e 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -86,20 +86,7 @@ Listening on 127.0.0.1:8545 ### Features -Anvil is highly configurable. You can run `anvil -h` to see all the configuration options. - -Some basic options are: - -```bash -# Number of dev accounts to generate and configure. [default: 10] -anvil -a, --accounts - -# The EVM hardfork to use. [default: latest] -anvil --hardfork - -# Port number to listen on. [default: 8545] -anvil -p, --port -``` +TODO: add comprehensive list of features
diff --git a/src/cast/README.md b/src/cast/README.md index 7ce585648..135011333 100644 --- a/src/cast/README.md +++ b/src/cast/README.md @@ -49,6 +49,10 @@ Optionally, pass `--etherscan-api-key ` to decode transaction traces us cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc $(cast from-utf8 "hello world") --rpc-url http://127.0.0.1:8545/ ``` +### Features + +TODO: add comprehensive list of features +
> πŸ“š **Reference** diff --git a/src/chisel/README.md b/src/chisel/README.md index 2c3673feb..58376c1ef 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -49,6 +49,10 @@ contract REPL { To see available commands, type `!help` within the REPL. +### Features + +TODO: add comprehensive list of features +
> πŸ“š **Reference** diff --git a/src/forge/README.md b/src/forge/README.md index a7e16510e..25140acab 100644 --- a/src/forge/README.md +++ b/src/forge/README.md @@ -63,6 +63,8 @@ If you wish to simulate on-chain transactions pass a RPC URL. ### Features +TODO: add comprehensive list of features +
> πŸ“š **Reference** From c1ec23a9fc4b18ed604cc4842ae841364aed5e6c Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 9 Jan 2025 16:45:58 +0100 Subject: [PATCH 5/7] add anvil overview --- src/anvil/README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/anvil/README.md b/src/anvil/README.md index 5e088b05e..08ac7561b 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -86,7 +86,45 @@ Listening on 127.0.0.1:8545 ### Features -TODO: add comprehensive list of features +#### Configuration + +Anvil is highly configurable, allowing you to: + +- **Mining Modes**: Choose automatic mining (default), interval mining (`--block-time `), or on-demand mining (`--no-mining`). +- **Accounts and Balances**: Set the number of accounts (`--accounts`) and their Ether balance (`--balance`). +- **Genesis Initialization**: Start with a custom genesis file (`--init `), defining parameters like `chainId`, `gasLimit`, and preallocated accounts. +- **EVM Hardforks**: Simulate specific Ethereum hardforks (e.g., `shanghai`, `paris`) using `--hardfork`. +- **Transport Layers**: Supports HTTP and WebSocket connections on port 8545 (customizable via `--port`). +- **Chain State**: Save/load states with `--state`, `--dump-state`, or `--load-state` for persistence. + +#### Forking + +Anvil can fork live Ethereum or EVM-compatible networks: + +- **State Replication**: Use `--fork-url` to replicate a network’s state at a specific block (`--fork-block-number`) or transaction (`--fork-transaction-hash`). +- **Offline Testing**: Combine `--fork-chain-id` with cached state for offline scenarios. +- **Caching and Rate Limits**: Disable caching with `--no-storage-caching` or manage RPC requests using `--compute-units-per-second` or `--no-rate-limit`. + +#### State Management + +Flexible state management options include: + +- **Snapshots**: Save and reload chain states with `--state`, `--dump-state`, and `--load-state`. + - `--state` 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. +- **Historical States**: Preserve or prune states with `--preserve-historical-states` or `--prune-history`. Set the number of persisted states using `--max-persisted-states`. +- **Intervals**: Control state dump intervals with `--state-interval`. + +#### RPC Methods + +Supports standard Ethereum RPC methods (`eth_getBlockByNumber`, `eth_sendTransaction`, etc.), Anvil-specific methods (`anvil_impersonateAccount`, `anvil_setBalance`, etc.), and tracing/debugging (`debug_traceTransaction`, `evm_snapshot`, etc.). + +#### Default CREATE2 Deployer + +Includes a CREATE2 deployer proxy (`0x4e59b44847b379578588920ca78fbf26c0b4956c`), allowing CREATE2 testing without forking. + +#### Genesis Configuration + +Customize network initialization using a `genesis.json` file to set `chainId`, `gasLimit`, preallocated accounts, and other parameters.
From 730381af6f4b8d74f718437b8d467ab51c99b387 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 9 Jan 2025 17:01:08 +0100 Subject: [PATCH 6/7] fix list --- src/anvil/README.md | 44 +------------------------------------------- src/cast/README.md | 6 +----- src/chisel/README.md | 8 +------- src/forge/README.md | 6 +----- 4 files changed, 4 insertions(+), 60 deletions(-) diff --git a/src/anvil/README.md b/src/anvil/README.md index 08ac7561b..11374ce90 100644 --- a/src/anvil/README.md +++ b/src/anvil/README.md @@ -84,50 +84,8 @@ Genesis Timestamp Listening on 127.0.0.1:8545 ``` -### Features - -#### Configuration - -Anvil is highly configurable, allowing you to: - -- **Mining Modes**: Choose automatic mining (default), interval mining (`--block-time `), or on-demand mining (`--no-mining`). -- **Accounts and Balances**: Set the number of accounts (`--accounts`) and their Ether balance (`--balance`). -- **Genesis Initialization**: Start with a custom genesis file (`--init `), defining parameters like `chainId`, `gasLimit`, and preallocated accounts. -- **EVM Hardforks**: Simulate specific Ethereum hardforks (e.g., `shanghai`, `paris`) using `--hardfork`. -- **Transport Layers**: Supports HTTP and WebSocket connections on port 8545 (customizable via `--port`). -- **Chain State**: Save/load states with `--state`, `--dump-state`, or `--load-state` for persistence. - -#### Forking - -Anvil can fork live Ethereum or EVM-compatible networks: - -- **State Replication**: Use `--fork-url` to replicate a network’s state at a specific block (`--fork-block-number`) or transaction (`--fork-transaction-hash`). -- **Offline Testing**: Combine `--fork-chain-id` with cached state for offline scenarios. -- **Caching and Rate Limits**: Disable caching with `--no-storage-caching` or manage RPC requests using `--compute-units-per-second` or `--no-rate-limit`. - -#### State Management - -Flexible state management options include: - -- **Snapshots**: Save and reload chain states with `--state`, `--dump-state`, and `--load-state`. - - `--state` 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. -- **Historical States**: Preserve or prune states with `--preserve-historical-states` or `--prune-history`. Set the number of persisted states using `--max-persisted-states`. -- **Intervals**: Control state dump intervals with `--state-interval`. - -#### RPC Methods - -Supports standard Ethereum RPC methods (`eth_getBlockByNumber`, `eth_sendTransaction`, etc.), Anvil-specific methods (`anvil_impersonateAccount`, `anvil_setBalance`, etc.), and tracing/debugging (`debug_traceTransaction`, `evm_snapshot`, etc.). - -#### Default CREATE2 Deployer - -Includes a CREATE2 deployer proxy (`0x4e59b44847b379578588920ca78fbf26c0b4956c`), allowing CREATE2 testing without forking. - -#### Genesis Configuration - -Customize network initialization using a `genesis.json` file to set `chainId`, `gasLimit`, preallocated accounts, and other parameters. -
> πŸ“š **Reference** > -> See the [`anvil` Reference](../reference/anvil/README.md) for in depth information on Anvil and its capabilities. +> See the [`anvil` Reference](../reference/anvil/) for in depth information on Anvil and its capabilities. diff --git a/src/cast/README.md b/src/cast/README.md index 135011333..109a0e5a9 100644 --- a/src/cast/README.md +++ b/src/cast/README.md @@ -49,12 +49,8 @@ Optionally, pass `--etherscan-api-key ` to decode transaction traces us cast send --private-key 0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc $(cast from-utf8 "hello world") --rpc-url http://127.0.0.1:8545/ ``` -### Features - -TODO: add comprehensive list of features -
> πŸ“š **Reference** > -> See the [`cast` Reference](../reference/cast/README.md) for a complete overview of all the available subcommands. +> See the [`cast` Reference](../reference/cast/) for a complete overview of all the available subcommands. diff --git a/src/chisel/README.md b/src/chisel/README.md index 58376c1ef..8644da122 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -49,12 +49,6 @@ contract REPL { To see available commands, type `!help` within the REPL. -### Features - -TODO: add comprehensive list of features - -
- > πŸ“š **Reference** > -> See the [`chisel` Reference](../reference/chisel/README.md) for in depth information on Chisel and its capabilities. +> See the [`chisel` Reference](../reference/chisel/) for in depth information on Chisel and its capabilities. diff --git a/src/forge/README.md b/src/forge/README.md index 25140acab..dea8e200c 100644 --- a/src/forge/README.md +++ b/src/forge/README.md @@ -61,12 +61,8 @@ Gas used: 109037 If you wish to simulate on-chain transactions pass a RPC URL. ``` -### Features - -TODO: add comprehensive list of features -
> πŸ“š **Reference** > -> See the [`forge` Reference](../reference/forge/README.md) for a complete overview of all the available subcommands. +> See the [`forge` Reference](../reference/forge/) for a complete overview of all the available subcommands. From 18232443952e36772a95e410e0773afc754a2ce8 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 9 Jan 2025 17:12:22 +0100 Subject: [PATCH 7/7] fix spacing --- src/chisel/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chisel/README.md b/src/chisel/README.md index 8644da122..c1e909485 100644 --- a/src/chisel/README.md +++ b/src/chisel/README.md @@ -49,6 +49,8 @@ contract REPL { To see available commands, type `!help` within the REPL. +
+ > πŸ“š **Reference** > > See the [`chisel` Reference](../reference/chisel/) for in depth information on Chisel and its capabilities.