Account

Geth accounts are accounts that can send transactions on the Gesia blockchain. This chapter explains how to create externally owned accounts (EOAs) that users directly control and how to check their balances.

Creating an Account

First, create a password file for the account:

$ echo 'Enter your password' > password

Next, run the following docker-compose file to create the account.

docker-compose-geth-new-account.yml

version: '3'
services:
  init:
    image: ethereum/client-go
    command: account new --password="/root/.ethereum/password"
    volumes:
      - ./node:/root/.ethereum

After creating the file, execute it with the following command:

docker-compose -f docker-compose-geth-new-account.yml up

To check the account balance, connect to the geth console and execute the following command.

eth.getBalance('your_address')

Last updated