Skip to content

carmarsha/compose-evm-simplified

 
 

Repository files navigation

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}"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%