Giter VIP home page Giter VIP logo

yasmuru / opstack-deployer Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 4.0 3.52 MB

This project won the ๐Ÿš€ Optimism โ€” ๐Ÿฅ‰ Best Superchain Dev Tools & Infra prize at the ETHGlobal Superhack 2023 hackathon

Home Page: https://opstack-deployer.vercel.app

Shell 4.77% JavaScript 0.89% Svelte 0.30% Makefile 0.06% Nix 0.02% Solidity 79.82% HTML 0.14% TypeScript 13.46% CSS 0.15% Dockerfile 0.38%

opstack-deployer's Introduction

Launch OP Stack L2 Chain

This project won the ๐Ÿš€ Optimism โ€” ๐Ÿฅ‰ Best Superchain Dev Tools & Infra prize at the ETHGlobal Superhack 2023 hackathon:

Our repository contains deployment scripts that facilitate the seamless setup and launch of the L2 Optimism chain, built on the robust opstack platform. Our aim is to simplify the L2 chain deployment process, allowing developers and users to effortlessly experience the power and potential of the L2 Optimism solution. With our user-friendly scripts, you can quickly configure and deploy the L2 chain.

Visit opstack-deployer.vercel.app: You can start the chain setup by visiting opstack-deployer.vercel.app, where you'll find all the necessary resources and documentation or you can follow the steps in below.

Hardware Requirements: Ensure that you have the following hardware specifications

Linux ubuntu 20.04 LTS
Min. 8GB RAM & 4 Core CPU
Storage 250GB or more

Cloud Service Options: You have the flexibility to use any cloud service provider, such as Digital Ocean, AWS, Google Cloud, etc.,

Follow these simple steps to launch your very own L2 Optimism chain:

Step 1 - Clone the repository

git clone https://github.com/yasmuru/opstack-deployer
// navigate to the deploy script folder
cd opstack-deployer/

Step 2 - Create your environment file

Create a new environment file using nano .env or vim .env, and add the following keys:

CHAIN_NAME="Chain Name"
CHAIN_ID=<Chain_ID>
ETH_RPC_URL="L1 RPC End Point"
ADMIN_PUBLIC_ADDRESS="Admin public address"
ADMIN_PRIVATE_KEY="Admin private key"
SEQUENCER_PUBLIC_ADDRESS="Sequencer public address"
SEQUENCER_PRIVATE_KEY="Sequencer private key"
BATCHER_PUBLIC_ADDRESS="Batcher public address"
BATCHER_PRIVATE_KEY="Batcher private key"
PROPOSER_PUBLIC_ADDRESS="proposer public address"
PROPOSER_PRIVATE_KEY="Properser private key"

Make sure to define the funding requirements for each account::

  • Admin: 2 ETH
  • Proposer: 5 ETH
  • Batcher: 10 ETH

Step 3 - Run opstack script

You have the option to either manually execute the scripts or run them through Docker. Ensure that you have updated the .env file with the correct values and have deposited the necessary amount of ETH.

For Manual,

cd deployer-scripts 
./opstack.sh

For Docker, Make sure you have installed docker and docker-compose.

If docker not installed, for ubuntu

apt install docker.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 
sudo chmod +x /usr/local/bin/docker-compose
docker-compose up --build

L2 Chain Deployed Successfully

Once the script runs successfully you can now see the new chain up and running in the port 8545. You can access it by using the RPC end points as host:8545 along with chain id used earlier while running the script.

After the chain is successfully created, you will receive the L1 bridge proxy address as the output. You can then send a small amount of ETH (0.1 or less) to that bridge proxy address, and it will be bridged to your L2 Chain.

Setup Blockscout Explorer (Optional)

For setting up the explorer for the new l2 chain launched, Please follow setps below

Lets, clone the blockscout explorer

git clone https://github.com/blockscout/blockscout/
cd blocksout/docker-compose/

We can modify the environment variables here,

vim blockscout/docker-compose/envs/common-blockscout.env
or 
nano blockscout/docker-compose/envs/common-blockscout.env

You can refer to the below values in the environment file


ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: "true"
SUBNETWORK: "Blocktheory"
PORT: 4000

Once the environment variables are set. You can run the docker-compose

docker-compose up --build -d

Now, you can access the blocksout explorer in port 4000. You can access it by using the end point as host:4000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.