mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
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:
+3
-3
@@ -142,7 +142,7 @@ func NewGenesis(
|
|||||||
hrp := constants.GetHRP(networkID)
|
hrp := constants.GetHRP(networkID)
|
||||||
|
|
||||||
// Format addresses as strings for the JSON config
|
// 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[:])
|
genesisVdrStakeAddr, err := address.Format("P", hrp, genesisVdrStakeShortID[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to format genesis validator stake address: %w", err)
|
return nil, fmt.Errorf("failed to format genesis validator stake address: %w", err)
|
||||||
@@ -152,7 +152,7 @@ func NewGenesis(
|
|||||||
NetworkID: networkID,
|
NetworkID: networkID,
|
||||||
Allocations: []genesis.AllocationJSON{
|
Allocations: []genesis.AllocationJSON{
|
||||||
{
|
{
|
||||||
ETHAddr: zeroEthAddr, // Zero address as hex string
|
EVMAddr: zeroEVMAddr, // Zero address as hex string
|
||||||
UTXOAddr: genesisVdrStakeAddr, // Bech32 formatted address
|
UTXOAddr: genesisVdrStakeAddr, // Bech32 formatted address
|
||||||
InitialAmount: 0,
|
InitialAmount: 0,
|
||||||
UnlockSchedule: []genesis.LockedAmount{ // Provides stake to validators
|
UnlockSchedule: []genesis.LockedAmount{ // Provides stake to validators
|
||||||
@@ -178,7 +178,7 @@ func NewGenesis(
|
|||||||
config.Allocations = append(
|
config.Allocations = append(
|
||||||
config.Allocations,
|
config.Allocations,
|
||||||
genesis.AllocationJSON{
|
genesis.AllocationJSON{
|
||||||
ETHAddr: zeroEthAddr, // Zero address as hex string
|
EVMAddr: zeroEVMAddr, // Zero address as hex string
|
||||||
UTXOAddr: luxAddr, // Bech32 formatted address
|
UTXOAddr: luxAddr, // Bech32 formatted address
|
||||||
InitialAmount: xChainBal.Balance.Uint64(),
|
InitialAmount: xChainBal.Balance.Uint64(),
|
||||||
UnlockSchedule: []genesis.LockedAmount{
|
UnlockSchedule: []genesis.LockedAmount{
|
||||||
|
|||||||
Reference in New Issue
Block a user