/Optimism-starter-kit

The Optimistic Ethereum starter kit.

Primary LanguageCSSMIT LicenseMIT

๐Ÿ— Scaffold-ETH - Optimism Starter Kit

๐Ÿงซ Prototype frontend experiences to build on Optimistic Ethereum (https://www.optimism.io)

Learn more here

Grafana public dashboard

๐Ÿ„โ€โ™‚๏ธ Quick Start

Manual setup

Prerequisites: Node plus Yarn and Git

Installation

git clone -b optimism-starter-kit https://github.com/austintgriffith/scaffold-eth.git optimism-starter-kit

cd optimism-starter-kit

yarn install

yarn start

๐Ÿ‘‰ Visit your frontend at http://localhost:3000

The following requires Docker & Docker Compose

Creating a node

Download the docker images.

Clone the Optimism monorepo.

in a second terminal window:

git clone https://github.com/ethereum-optimism/optimism.git

Starting the node

This process downloads the images from the Docker hub, and depending on the hardware it can take up to ten minutes.

cd optimism/ops
docker-compose -f docker-compose-nobuild.yml up -t 3600

You might get a timeout at first. If that is the case, just run the docker-compose command again.

Make changes to hardhat.config.js in packages/hardhat/test to deploy on the network you want.

Here, it was set to "localOptimism"by default.

Screen Shot 2021-11-17 at 05 09 05

All of the default hardhat accounts are funded with ETH on both L1 and L2. Therefore, you have to add the mnemonic:

'test test test test test test test test test test test junk'

in a third terminal window, ๐Ÿ›ฐ deploy your contract:

cd optimism-starter-kit
yarn deploy

๐Ÿ” Edit your smart contract YourContract.sol in packages/hardhat/contracts

๐Ÿ“ Edit your frontend App.jsx in packages/react-app/src

๐Ÿ’ผ Edit your deployment scripts in packages/hardhat/deploy

๐Ÿ“ฑ Open http://localhost:3000 to see the app

Deploy to a real network

Once you're app is ready, you can deploy it to a testnet such as Optimistic Kovan. Edit hardhat.config.js to add your account mnemonic to kovanOptimism.

Screen Shot 2021-11-17 at 12 38 31

Same procedure for deploying on Optimism mainnet.

Screen Shot 2021-11-17 at 12 49 10

Need some ETH accross multiple testnets?

Screen Shot 2021-11-17 at 12 54 17

Use Paradigm faucet to get you set up.

Screen Shot 2021-11-17 at 12 53 31

๐Ÿ“š Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

๐Ÿ”ญ Learning Solidity

๐Ÿ“• Read the docs: https://docs.soliditylang.org

๐Ÿ“š Go through each topic from solidity by example editing YourContract.sol in ๐Ÿ— scaffold-eth

๐Ÿ“ง Learn the Solidity globals and units

๐Ÿ›  Buidl

Check out all the active branches, open issues, and join/fund the ๐Ÿฐ BuidlGuidl!

๐Ÿ’ฌ Support Chat

Join the telegram support chat ๐Ÿ’ฌ to ask questions and find others building with ๐Ÿ— scaffold-eth!


๐Ÿ™ Please check out our Gitcoin grant too!