Openethereum - second-state/oasis-ssvm-example-runtime GitHub Wiki

How to test openethereum in dev environment

Establish node

  • Fetch openethereum source code
> git clone --recursive https://github.com/openethereum/openethereum.git
  • Reuse substrate-ssvm docker image as our dev environment
> docker run -it --rm \
  --name ssvm \
  -v $(pwd):/root/node \
  -w /root/node \
  secondstate/substrate-ssvm
  • Build openethereum from source
(docker-1) cd openethereum/
(docker-1) cargo build --release --features final
  • Establish node in dev mode and geth supported
(docker-1) ./target/release/openethereum --geth --chain dev

Use geth attach our node

  • Attach to container with second session and install geth
> docker exec -it ssvm bash

(docker-2) add-apt-repository -y ppa:ethereum/ethereum
(docker-2) apt-get update
(docker-2) apt-get install ethereum
  • Use geth attach node
(docker-2) geth attach
  • Test node
(geth-shell) personal.listAccounts
  • Should give a result like
["0x00a329c0648769a73afac7f9381e08fb43dbea72"]
  • Or you can execute JS script as below
(docker-2) geth --exec 'loadScript("./geth_example3.js")' attach