Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Foundry is the modern toolchain — fast, written in Rust, no Node.js. Three commands: forge, cast, anvil. forge compiles and tests. cast talks to chains. anvil is a local chain that starts in a fraction of a second. Installing Foundry is a one-line curl | sh via foundryup. Once you've compiled one contract, you've cleared the biggest onboarding hurdle in smart contract development.
Foundry's forge init scaffolds a project with a src/, test/, and script/ layout and a foundry.toml config in under a second. Unlike Hardhat, it has no Node.js dependency — the compiler is bundled in Rust, so forge build is consistently 5–10× faster on large codebases.
# 1. Install foundryup (manages forge/cast/anvil versions)
curl -L https://foundry.paradigm.xyz | bash
foundryup
# 2. Create a project
forge init hello-solidity
cd hello-solidity
# 3. Replace src/Counter.sol with a hello contract
cat > src/Hello.sol <<'EOF'
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Hello {
string public greeting;
constructor(string memory initial) {
greeting = initial;
}
function setGreeting(string memory g) external {
greeting = g;
}
}
EOF
# 4. Compile
forge build
# You should see:
# Compiler run successful!
# Compiled 2 files with 0.8.20 in 1.2sfoundryup. Verify with forge --version, cast --version, anvil --version.forge init hello-solidity. Explore the generated directory — src/, test/, script/, foundry.toml.Hello contract above. Run forge build.out/Hello.sol/Hello.json. Look at the bytecode.object field — that's the hex you'd deploy.Hello.sol and re-run forge build. Notice how incremental compilation is nearly instant.