Loading...
Loading...
Foundry development workflow for Solidity smart contracts. Use when building, testing, or deploying with Foundry (forge, cast, anvil). Covers project setup, foundry.toml configuration, testing patterns, fuzz testing, invariant testing, fork testing, cheatcodes, deployment scripts, and debugging. Triggers on tasks involving forge build, forge test, forge script, cast, anvil, or Foundry-based Solidity development.
npx skill4agent add whackur/solidity-agent-toolkit solidity-foundry-developmentforge initforge install <author>/<repo>foundry.tomlremappings.txt@openzeppelin/=lib/openzeppelin-contracts/contracts/forge-std/Test.solsetUp()test_XxxtestFuzz_XxxtestFail_Xxxvm.expectReverttestFuzzvm.assume()bound(uint256 x, uint256 min, uint256 max)targetContract(address)handlervm.createFork(url)vm.selectFork(id)vm.rollFork(blockNumber)| Cheatcode | Description |
|---|---|
| Sets |
| Sets |
| Sets the balance of an address. |
| Expects the next call to revert with a specific error. |
| Expects the next call to emit a specific event. |
| Sets the block timestamp. |
| Sets the block number. |
| Generates an ECDSA signature. |
| Labels an address for better trace readability. |
| Starts recording all storage reads and writes. |
| Returns the creation bytecode of a contract. |
forge scriptforge script script/Deploy.s.sol --rpc-url $RPC_URLforge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcast --verify--verify--etherscan-api-key-v-vv-vvv-vvvv-vvvvvforge debugconsole.logforge-std/console.solfoundry.toml[profile.via_ir]
via_ir = true
test = 'src'
out = 'via_ir-out'
[profile.deterministic]
block_number = 17722462
block_timestamp = 1689711647
bytecode_hash = 'none'
cbor_metadata = falsesolidity-agent-toolkitcompile_contractrun_testsrun_single_testgas_snapshotdry_run_deploy