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 ?


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, privacy policy and cookie policy

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