Code Monkey home page Code Monkey logo

compose-evm-simplified's Introduction

Compose EVM

This repo contains all the resources for deploying EVM sidechain on mainnet or testnet.


Deployment

Requirements:

  • docker
  • docker compose v2
  • bc
  • jq
  • pwgen

Setup

  1. Choose which network to run by moving the .env.template.network.sidechain file into a .env.

    To run mainnet EON :

    cp .env.template.mainnet.eon .env

    To run testnet Gobi :

    cp .env.template.testnet.gobi .env
  2. Set up environment variables in the .env

    SCNODE_REST_PASSWORD= # Uncomment and set this variable only if you are willing to set up authentication on the rest api endpoints
  3. Run the following command to initialize and run the stack for the first time:

    ./scripts/init.sh
  4. Run the following command to stop the stack:

    ./scripts/stop.sh
  5. Run the following command to stop the stack and delete the containers:

    ./scripts/shutdown.sh
  6. Run the following command to start the stack after it was stopped:

    ./scripts/startup.sh
  7. Run the following command to destroy the stack, this action will delete your wallet and all the data:

    ./scripts/clean.sh

Usage

The evmapp node RPC interfaces will be available over HTTP at:

  • http://localhost:9545/

    For example:

    curl -sX POST -H 'accept: application/json' -H 'Content-Type: application/json' "http://127.0.0.1:9545/block/best"
    

The Ethereum RPC interface is available at /ethv1:

  • http://localhost:9545/ethv1

    For example:

    curl -sX POST -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' "http://127.0.0.1:9545/ethv1"
    

Notes

The RPC and Websocket ports are only locally exposed (localhost). In order to expose those ports outside the local environment, you can edit lines 26 and 27 of the docker-compose.yml file: Default, only locally exposed:

   - "127.0.0.1:${SCNODE_WS_SERVER_PORT}:${SCNODE_WS_SERVER_PORT}"
   - "127.0.0.1:${SCNODE_REST_PORT}:${SCNODE_REST_PORT}"

Edit in this way in order to expose the ports:

   - "${SCNODE_WS_SERVER_PORT}:${SCNODE_WS_SERVER_PORT}"
   - "${SCNODE_REST_PORT}:${SCNODE_REST_PORT}"

compose-evm-simplified's People

Contributors

ysibirski avatar lander86 avatar otoumas 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.