Coder Social home page Coder Social logo

wangliusen / blast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blast-io/blast

1.0 1.0 0.0 35.15 MB

Shell 0.36% JavaScript 10.07% Ruby 1.12% Python 0.33% C 3.08% Java 0.14% Go 74.01% Assembly 0.81% Rust 0.04% Julia 0.07% TypeScript 9.29% Nix 0.01% Makefile 0.15% HTML 0.06% Handlebars 0.01% NSIS 0.11% HCL 0.02% M4 0.12% Dockerfile 0.07% Sage 0.14%

blast's Introduction

Blast

This repo contains Blast's fork of optimism and op-geth. If you're interested in self hosting a Blast node for either mainnet or testnet, check out the docs here.

Running Blast locally (against a local L1)

Prereqs

docker, git, go1.20, node, pnpm, foundry, make, yarn, direnv, jq

Steps

  1. Build the blast-geth docker image
docker build blast-geth -f blast-geth/Dockerfile -t blast-geth
  1. Compile the smart contracts & start the devnet
export BLAST_ROOT=$(realpath blast-optimism)

# Compile the smart contracts & deploy them to the L1
cd blast-optimism/packages/contracts-bedrock
pnpm clean  
pnpm install
pnpm build

# If you're on a mac, you might need rosetta instructions, ONLY IF NEEDED FOR M1/M2:
# /usr/sbin/softwareupdate --install-rosetta --agree-to-license`

cd $BLAST_ROOT

# Install geth
make install-geth

# Make sure geth is in your PATH, if it's not, you can set it using
# export PATH="${PATH}:${GOPATH}/bin:${HOME}/go/bin"

make cannon-prestate

# Run the devnet in docker
# L1 RPC: http://localhost:8545
# L2 RPC: http://localhost:9545
make devnet-up

# To stop devnet run command
make devnet-down

L1 faucet address

This is the private key for the devnet L1 faucet: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

This is the corresponding address: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266

Using the L2

  1. Send some ETH from the L1 faucet to your wallet on the L1
  2. Find the Blast bridge address using the command below:
cd $BLAST_ROOT
cat ./packages/contracts-bedrock/deployments/devnetL1/L1BlastBridgeProxy.json | grep -m 1 '"address": '
  1. Send L1 ETH from your wallet to bridge address above
  2. Wait for the tx to get confirmed
  3. Your wallet should now have ETH on the L2

blast's People

Contributors

blast-io-bot avatar

Stargazers

 avatar

Watchers

 avatar

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.