Giter Site home page Giter Site logo

local-evm-node's Introduction

Local Node Project

This project use Hardhat to run local Ethereum node.

Docker setup

Requirements

  • Docker
  • Git

If you run it before, please remove the old container with docker rm hardhat

Setup

  1. Clone this repository

  2. Run

docker build -t local-node . &&  docker run -e MAINNET_URL={MAINNET_URL} -p {PORT}:8545 -i -t --name hardhat --rm local-node`

For MAINNET_URL, you can use Infura, Alchemy, or Tenderly. If you want to fork a network other than Ethereum mainnet, simply provide a RPC endpoint to the desired chain. For CHAIN_ID, use your preferred number. The default is 2137, which is our legacy number for the Ethereum mainnet fork. If you want to fork a different network, use a different CHAIN_ID. For the PORT, use the port you want for the local node. We use 8545 in our other repositories. However, if you need to have multiple RPC nodes for multiple networks, use different ports.

Local setup

Please add .env file to the root directory with the following content:

BLOCK_NUMBER=1
MAINNET_URL={YOUR_MAINNET_URL}
CHAIN_ID={YOUR_CHAIN_ID}

MAINNET_URL and CHAIN_ID are explained earlier.

Then run the following commands:

yarn 
yarn run start

local-evm-node's People

Contributors

jakubswierczek avatar marcinciarka avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.