Skip to content

odaceo/ethereum-genesis-block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum :: Genesis Block

License

Description

This project aims to reference the genesis block of the Ethereum blockchain in JSON format for the following networks:

Code

Below the Go code used to dump the MainNet genesis block in JSON format:

package main

import "io/ioutil"
import "github.com/ethereum/go-ethereum/core"

func check(e error) {
    if e != nil {
        panic(e)
    }
}

func main() {
    genesisBlock := core.DefaultGenesisBlock()
    bytes, _ := genesisBlock.MarshalJSON()
    err := ioutil.WriteFile("./mainnet.json", bytes, 0644)
    check(err)
}

Reporting Issues

Issues can be reported at https://github.com/odaceo/ethereum-genesis-block/issues

Source code

The source code is available at https://github.com/odaceo/ethereum-genesis-block

License

All the source code is distributed under ASL 2.0.

Copyright

© 2020 Odaceo. All rights reserved.

Releases

No releases published

Packages

No packages published