EVMAddr (Go) + UTXOAddr (Go) — pure chain-model naming, no eth/lux branding

Renames Go struct field ETHAddr → EVMAddr across types.go, keys.go,
allocations.go, validator_keys.go, config.go, builder/builder.go,
cmd/genesis, cmd/checkkeys. JSON tags stayed evmAddr already (from
v1.12.6). Result: matched pair EVMAddr+UTXOAddr on both Go and JSON
sides.

Kept ParseETHAddress as the input-parsing function name — it describes
what it parses (an Ethereum-format hex address), not the field it
populates (an EVMAddr).

LLM.md updated to state the canonical pair plainly; no rename history.
This commit is contained in:
Hanzo AI
2026-05-22 20:37:30 -07:00
parent 2a829c0af2
commit 8948b4e1cb
9 changed files with 43 additions and 48 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func main() {
}
for i, key := range keys {
ethHex := fmt.Sprintf("%x", key.ETHAddr[:])
ethHex := fmt.Sprintf("%x", key.EVMAddr[:])
match := ""
for addr, label := range genesisETH {
if ethHex == addr {
@@ -44,6 +44,6 @@ func main() {
break
}
}
fmt.Printf("BIP44 index %d: ETH=0x%x NodeID=%s%s\n", i, key.ETHAddr[:], key.NodeID, match)
fmt.Printf("BIP44 index %d: ETH=0x%x NodeID=%s%s\n", i, key.EVMAddr[:], key.NodeID, match)
}
}
+1 -1
View File
@@ -246,7 +246,7 @@ func addBIP44WalletAllocations(config *genesis.Config, networkID uint32, numKeys
balanceHex := fmt.Sprintf("0x%x", balance)
for _, a := range allocs {
// 20-byte ETH addr in checksummed 0x form.
addrHex := fmt.Sprintf("0x%s", a.ETHAddr.Hex())
addrHex := fmt.Sprintf("0x%s", a.EVMAddr.Hex())
alloc[addrHex] = map[string]any{"balance": balanceHex}
}
out, err := json.Marshal(cchain)