Skip to content

Commit

Permalink
fix example genesis generator
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Oct 4, 2022
1 parent 0071142 commit 3d651f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions network/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"math/big"
"strconv"
"time"

Expand All @@ -20,7 +21,7 @@ var cChainConfig map[string]interface{}

const (
validatorStake = units.MegaAvax
defaultCChainConfigStr = "{\"config\":{\"chainId\":43115,\"homesteadBlock\":0,\"daoForkBlock\":0,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"apricotPhase1BlockTimestamp\":0,\"apricotPhase2BlockTimestamp\":0,\"apricotPhase3BlockTimestamp\":0,\"apricotPhase4BlockTimestamp\":0,\"apricotPhase5BlockTimestamp\":0},\"nonce\":\"0x0\",\"timestamp\":\"0x0\",\"extraData\":\"0x00\",\"gasLimit\":\"0x5f5e100\",\"difficulty\":\"0x0\",\"mixHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"coinbase\":\"0x0000000000000000000000000000000000000000\",\"number\":\"0x0\",\"gasUsed\":\"0x0\",\"parentHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\"}"
defaultCChainConfigStr = "{\"config\":{\"chainId\":43112,\"homesteadBlock\":0,\"daoForkBlock\":0,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"apricotPhase1BlockTimestamp\":0,\"apricotPhase2BlockTimestamp\":0,\"apricotPhase3BlockTimestamp\":0,\"apricotPhase4BlockTimestamp\":0,\"apricotPhase5BlockTimestamp\":0},\"nonce\":\"0x0\",\"timestamp\":\"0x0\",\"extraData\":\"0x00\",\"gasLimit\":\"0x5f5e100\",\"difficulty\":\"0x0\",\"mixHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"coinbase\":\"0x0000000000000000000000000000000000000000\",\"number\":\"0x0\",\"gasUsed\":\"0x0\",\"parentHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\"}"
)

func init() {
Expand All @@ -32,7 +33,7 @@ func init() {
// AddrAndBalance holds both an address and its balance
type AddrAndBalance struct {
Addr ids.ShortID
Balance uint64
Balance *big.Int
}

// Config that defines a network when it is created.
Expand Down Expand Up @@ -151,7 +152,7 @@ func NewAvalancheGoGenesis(
genesis.UnparsedAllocation{
ETHAddr: "0x0000000000000000000000000000000000000000",
AVAXAddr: xChainAddr,
InitialAmount: xChainBal.Balance,
InitialAmount: xChainBal.Balance.Uint64(),
UnlockSchedule: []genesis.LockedAmount{
{
Amount: validatorStake * uint64(len(genesisVdrs)), // Stake
Expand Down

0 comments on commit 3d651f7

Please sign in to comment.