logoAcademy

Creating Genesis Block with precompileConfig

Learn how to create a genesis block with precompileConfig.

In order to create a new Blockchain from our customized EVM, we have to define a Genesis block just as we did in out section earlier.

To incorporate the CalculatorPlus precompile as part of the genesis block, we need to create a new genesis file and include a key for the CalculatorPlus precompile in the configuration JSON. This key, in particular, is the configKey that we specified in the module.go file of the Calculator precompile in the previous section.

Copy over Calculator.json into a new file called CalculatorPlus.json and add the necessary key-pair value to the config.

Updated:

On this page

No Headings
Edit on Github