diff --git a/core/genesis.go b/core/genesis.go index 113c4b35c..1dcaf764e 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -128,6 +128,13 @@ func NewGenesisSpec(netType nodeconfig.NetworkType, shardID uint32) *Genesis { contractDeployerFunds, big.NewInt(denominations.One), ) genesisAlloc[contractDeployerAddress] = GenesisAccount{Balance: contractDeployerFunds} + + // Localnet only testing account + if netType == nodeconfig.Localnet { + // PK: 1f84c95ac16e6a50f08d44c7bde7aff8742212fda6e4321fde48bf83bef266dc + testAddress := common.HexToAddress("0xA5241513DA9F4463F1d4874b548dFBAC29D91f34") + genesisAlloc[testAddress] = GenesisAccount{Balance: contractDeployerFunds} + } } return &Genesis{ diff --git a/rosetta/services/block.go b/rosetta/services/block.go index 5ca490dee..c2329b779 100644 --- a/rosetta/services/block.go +++ b/rosetta/services/block.go @@ -1079,5 +1079,8 @@ func getGenesisSpec(shardID uint32) *core.Genesis { if shard.Schedule.GetNetworkID() == shardingconfig.MainNet { return core.NewGenesisSpec(nodeconfig.Mainnet, shardID) } + if shard.Schedule.GetNetworkID() == shardingconfig.LocalNet { + return core.NewGenesisSpec(nodeconfig.Localnet, shardID) + } return core.NewGenesisSpec(nodeconfig.Testnet, shardID) }