mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-27 05:54:08 +00:00
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:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user