Environment Setup
Remix IDE
Remix runs entirely in your browser. No terminal, no downloads, no package managers.
Open Remix
Go to remix.ethereum.org. You will see a file explorer on the left, an editor in the middle, and plugins on the right.
Default Workspace
Remix creates a default workspace with sample contracts.
Required Plugins
Make sure these plugins are active (they are usually on by default):
- Solidity compiler , compiles your contracts.
- Deploy & Run Transactions , deploys to a local VM or live network.
Choose Your Environment
In the Deploy & Run Transactions plugin, pick an environment:
Remix VM (Cancun)Injected Provider
Foundry
Foundry is a blazing fast toolkit for Ethereum development. But you need to use linux, if you are on windows, download a linux environment like WSL.
Install Foundry
Open your terminal and run:
curl -L https://foundry.paradigm.xyz | bashThen restart your terminal and run the installer:
foundryupVerify everything is working:
forge --version
cast --version
anvil --versionProject Setup
Create a new directory for this class and initialize a Foundry project:
mkdir amm-class && cd amm-class
forge initYou should now see this folder structure:
amm-class/
├── foundry.toml
├── script/
├── src/
└── test/src/, where your Solidity contracts live.test/, where your tests live.script/, where deployment scripts live.foundry.toml, project configuration.
Install OpenZeppelin
We will use OpenZeppelin's battle-tested ERC20 implementation. Install it via Foundry:
forge install OpenZeppelin/openzeppelin-contractsFoundry will download the library into lib/openzeppelin-contracts/. The default remappings should let you import it as:
import "openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";Start a Local Node
Anvil is Foundry's local Ethereum node. It gives you a private blockchain running on your machine with pre-funded accounts.
Open a new terminal in your project folder and run:
anvilYou will see a list of private keys and RPC endpoint http://127.0.0.1:8545. Keep this terminal open for the rest of the class.
VS Code Extension (Optional)
If you use VS Code, install the Solidity extension by Juan Blanco for syntax highlighting and auto-completion.