Im modifying the puppeth genesis wizard file for my own use case. I want to be able to assign a pre-set amount in Wei to a few chosen addresses..

Im having some trouble figuring out how to format the number for these users, i would like to assign 50000000000000000000000000 but keep getting a lot of errors with numbers being too big etc.. anyone know a work around ? the original function looks like this

genesis.Alloc[*addy] = core.GenesisAccount{ Balance: new(big.Int).Lsh(big.NewInt(1), 256-7), // 2^256 / 128 (allow many pre-funds without balance overflows) }

2 Answers 2


Here's an example of setting a big int:

package main

import (

func main() {
    value := new(big.Int)
    value.SetString("50000000000000000000000000", 10)
    fmt.Println(value) // 50000000000000000000000000

    // your example generates the incorrect value
    fmt.Println(new(big.Int).Lsh(big.NewInt(1), 256-7)) // 904625697166532776746648320380374280103671755200316906558262375061821325312

puppeth generates static balances for all accounts, based on the logic. In order to achieve your needs, you need to change genesis file manually after puppeth generation

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.