2

In genesis.json file I have this balance :

 "bd7a14e103ffa97ec5fd96d9975adb1b52756ef3": {
      "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
    }

the hex number is the balance but does the value of ether or wei ?

1 Answer 1

4

Everything is in wei.

For a source that supports this assertion specifically for genesis files, have a look in genesis.go.

// GenesisBlockForTesting creates and writes a block in which addr has the given wei balance.
func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big.Int) *types.Block {
    g := Genesis{Alloc: GenesisAlloc{addr: {Balance: balance}}}
    return g.MustCommit(db)
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.