network: AllocationJSON.ETHAddr → EVMAddr (forward-only)

genesis canonicalized the field to EVMAddr per the EVMAddr/UTXOAddr
naming lock. Following the strip-aliases cascade through the workspace
(crypto v1.19.16, utxo v0.3.3, node v1.27.13, sdk v1.16.62).
This commit is contained in:
Hanzo AI
2026-05-24 07:00:11 -07:00
parent 1c9abaec96
commit 9bffd9d675
+3 -3
View File
@@ -142,7 +142,7 @@ func NewGenesis(
hrp := constants.GetHRP(networkID)
// Format addresses as strings for the JSON config
zeroEthAddr := fmt.Sprintf("0x%s", ids.ShortID{}.Hex())
zeroEVMAddr := fmt.Sprintf("0x%s", ids.ShortID{}.Hex())
genesisVdrStakeAddr, err := address.Format("P", hrp, genesisVdrStakeShortID[:])
if err != nil {
return nil, fmt.Errorf("failed to format genesis validator stake address: %w", err)
@@ -152,7 +152,7 @@ func NewGenesis(
NetworkID: networkID,
Allocations: []genesis.AllocationJSON{
{
ETHAddr: zeroEthAddr, // Zero address as hex string
EVMAddr: zeroEVMAddr, // Zero address as hex string
UTXOAddr: genesisVdrStakeAddr, // Bech32 formatted address
InitialAmount: 0,
UnlockSchedule: []genesis.LockedAmount{ // Provides stake to validators
@@ -178,7 +178,7 @@ func NewGenesis(
config.Allocations = append(
config.Allocations,
genesis.AllocationJSON{
ETHAddr: zeroEthAddr, // Zero address as hex string
EVMAddr: zeroEVMAddr, // Zero address as hex string
UTXOAddr: luxAddr, // Bech32 formatted address
InitialAmount: xChainBal.Balance.Uint64(),
UnlockSchedule: []genesis.LockedAmount{