This is a Optimism + MUD project built with ❤ for hackers.
MUD is a full-stack Dapp development framework. Think of it as the Ruby-on-Rails or NEXT.js of Dapp development.
It comes with the following features:
- Automatic indexer generation with MUD storage
- Automatic frontend SDK generation to the mud store
- Uniquely gas efficient storage
- An amazing cli with great code generation tools
This starter is a great choice for any of the following groups:
- Hackers hacking on Optimism
- Hackers interested in trying out an opinionated full stack framework
MUD2 is in alpha. Looking for a more traditional starterkit? Check out Optimism Starter.
MUD takes care of all the plumbing of building blockchain-based applications so you can focus on your application logic. In the MUD builders' own words:
MUD is a framework for ambitious Ethereum applications. It compresses the complexity of building EVM apps with a tightly integrated software stack.
Go take a deep dive at mud.dev! You'll be as excited as we are.
You will need to install Foundry to build your smart contracts.
-
Run the following command:
curl -L https://foundry.paradigm.xyz | bash
-
Source your environment as requested by Foundry.
-
Run
foundryup
.
Pnpm is the package manager MUD uses. It's usage is very similar to NPM but speed is much faster
npm install pnpm --global
-
Clone/fork the optimism-mud-starter repo
git clone https://github.com/ethereum-optimism/optimism-mud-starter.git
-
Install the necessary node packages:
cd optimism-mud-starter pnpm install
-
Initialize the mud project
pnpm initialize
If you get errors during this step, you might need to update your Foundry to the latest version.
-
Start dev server
pnpm dev
- Open localhost:3000 in your browser.
See below for general usage instructions or FAQ for answers to general questions such as:
MUD is in Alpha so make sure to check out the official MUD documentation for latest usage instructions.
MUD has a vibrant community ready to help. Join the discord to share your MUD project or ask any questions.
-
Register for Etherscan on Optimism. This account is different from your normal Etherscan account.
-
Go to the API keys page and click Add to create a new API key.
-
You can now add the etherscan key to your foundry.toml
Looking to use burner wallets? Prefer hardhat? Prefer NEXT.js? Check out these amazing alternatives:
- optimism starter - A more traditional wagmi/viem based starterkit
- create mud - This starterkit uses the react template. MUD offers a vanillajs version too
- create wagmi cli - A flexible cli with many templates (this starterkit was started from vite-react-cli-foundry)
- scaffold-eth - The new 2nd version of a popular NEXT.js based starter including hardhat, burner wallets, great documentation, and an active telegram for support
- MUD Documentation – learn about wagmi Hooks and API.
- Foundry Documentation – learn more about the Foundry stack (Anvil, Forge, etc).
- Vite Documentation – learn about Vite features and API.