diff --git a/genesis.json b/genesis.json index ca3619f1..b7a23206 100644 --- a/genesis.json +++ b/genesis.json @@ -1,8 +1,8 @@ { "allocations": [ { - "ethAddr": "0xf4b5be7a6deA583dA4CddCDa4D9B3afd51684b6e", - "luxAddr": "P-lux1x7rtxtkh6538hqdwp624tryu33853phfl8sy85", + "evmAddr": "0xf4b5be7a6deA583dA4CddCDa4D9B3afd51684b6e", + "utxoAddr": "P-lux1x7rtxtkh6538hqdwp624tryu33853phfl8sy85", "initialAmount": 0, "unlockSchedule": [ { @@ -408,8 +408,8 @@ ] }, { - "ethAddr": "0x202335dd1c21C9B90277F8BcA78Db98db0bBc293", - "luxAddr": "P-lux184tuwjk0np3n4mm2d7d7y0f397ksmzy0uk2ufy", + "evmAddr": "0x202335dd1c21C9B90277F8BcA78Db98db0bBc293", + "utxoAddr": "P-lux184tuwjk0np3n4mm2d7d7y0f397ksmzy0uk2ufy", "initialAmount": 0, "unlockSchedule": [ { @@ -815,8 +815,8 @@ ] }, { - "ethAddr": "0xf6e9EaE8211e4a4532a480100068783D9Cb75c3b", - "luxAddr": "P-lux14pfm4k9k3mx30yf2kpd9cvfcs7mzkkn6yuujpd", + "evmAddr": "0xf6e9EaE8211e4a4532a480100068783D9Cb75c3b", + "utxoAddr": "P-lux14pfm4k9k3mx30yf2kpd9cvfcs7mzkkn6yuujpd", "initialAmount": 0, "unlockSchedule": [ { @@ -1222,8 +1222,8 @@ ] }, { - "ethAddr": "0x32712D64011E135A24Bb13B5934b53B6d6790812", - "luxAddr": "P-lux15953qfaga3w5txjmr0fl4clu37kak0ah4gjprr", + "evmAddr": "0x32712D64011E135A24Bb13B5934b53B6d6790812", + "utxoAddr": "P-lux15953qfaga3w5txjmr0fl4clu37kak0ah4gjprr", "initialAmount": 0, "unlockSchedule": [ { @@ -1629,8 +1629,8 @@ ] }, { - "ethAddr": "0x5CB26690fE4f5b60808BF8f1be7D11094789862b", - "luxAddr": "P-lux1jx9p2hxfemcgdlylth05zj20klsn4t06zddpv7", + "evmAddr": "0x5CB26690fE4f5b60808BF8f1be7D11094789862b", + "utxoAddr": "P-lux1jx9p2hxfemcgdlylth05zj20klsn4t06zddpv7", "initialAmount": 0, "unlockSchedule": [ { @@ -2036,8 +2036,8 @@ ] }, { - "ethAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", - "luxAddr": "P-lux1c7wevm4667l4umtzh93r25wpxlpsadkhka6gv6", + "evmAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", + "utxoAddr": "P-lux1c7wevm4667l4umtzh93r25wpxlpsadkhka6gv6", "initialAmount": 0, "unlockSchedule": [ { @@ -2047,8 +2047,8 @@ ] }, { - "ethAddr": "0x17F7c3C6D56C41F32a7DAF65dB0743A7D6cb74A6", - "luxAddr": "P-lux1642mv829lx2rzdydtdmyeakvm0g0yz5gmteuze", + "evmAddr": "0x17F7c3C6D56C41F32a7DAF65dB0743A7D6cb74A6", + "utxoAddr": "P-lux1642mv829lx2rzdydtdmyeakvm0g0yz5gmteuze", "initialAmount": 1000000000000000, "unlockSchedule": [ { @@ -2454,8 +2454,8 @@ ] }, { - "ethAddr": "0x775438812D358fD1e090Cf04962F1f8F34DafbaC", - "luxAddr": "P-lux1zjx8c7mjmy4sm366308myet7luklngke3gkl7c", + "evmAddr": "0x775438812D358fD1e090Cf04962F1f8F34DafbaC", + "utxoAddr": "P-lux1zjx8c7mjmy4sm366308myet7luklngke3gkl7c", "initialAmount": 1000000000000000, "unlockSchedule": [ { @@ -2861,8 +2861,8 @@ ] }, { - "ethAddr": "0x8078fC2bD0DF7A5943BA1a81d0Ae9572089A24d1", - "luxAddr": "P-lux15f7cwhu3d6pyvtuzylmk9lnywfgseq5qde8eef", + "evmAddr": "0x8078fC2bD0DF7A5943BA1a81d0Ae9572089A24d1", + "utxoAddr": "P-lux15f7cwhu3d6pyvtuzylmk9lnywfgseq5qde8eef", "initialAmount": 1000000000000000, "unlockSchedule": [ { @@ -3268,8 +3268,8 @@ ] }, { - "ethAddr": "0xe3c9c6B304B875f0BE94481ce1F1f634ceee0338", - "luxAddr": "P-lux1n63raxw20q6n0z2rsyk6ucrk89r29jwx6v0639", + "evmAddr": "0xe3c9c6B304B875f0BE94481ce1F1f634ceee0338", + "utxoAddr": "P-lux1n63raxw20q6n0z2rsyk6ucrk89r29jwx6v0639", "initialAmount": 1000000000000000, "unlockSchedule": [ { @@ -3675,8 +3675,8 @@ ] }, { - "ethAddr": "0xc18f7344B235903e796F52e8c0e5b21247d3Faa4", - "luxAddr": "P-lux1zsq3a0h08kqzk6eegpspv8lslygrt30pwplevk", + "evmAddr": "0xc18f7344B235903e796F52e8c0e5b21247d3Faa4", + "utxoAddr": "P-lux1zsq3a0h08kqzk6eegpspv8lslygrt30pwplevk", "initialAmount": 1000000000000000, "unlockSchedule": [ { @@ -4082,14 +4082,14 @@ ] }, { - "ethAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", - "luxAddr": "X-lux1jqg73zp9r2c98daarnd4nrd5l80dj3c5eha5fl", + "evmAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", + "utxoAddr": "X-lux1jqg73zp9r2c98daarnd4nrd5l80dj3c5eha5fl", "initialAmount": 1000000000000000, "unlockSchedule": [] }, { - "ethAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", - "luxAddr": "P-lux1jqg73zp9r2c98daarnd4nrd5l80dj3c5eha5fl", + "evmAddr": "0x9011E888251AB053B7bD1cdB598Db4f9DEd94714", + "utxoAddr": "P-lux1jqg73zp9r2c98daarnd4nrd5l80dj3c5eha5fl", "initialAmount": 0, "unlockSchedule": [ { diff --git a/local/genesis_config.go b/local/genesis_config.go index e72d83c1..58fad1b0 100644 --- a/local/genesis_config.go +++ b/local/genesis_config.go @@ -222,15 +222,15 @@ func NewConfigForNetwork(binaryPath string, numNodes uint32, networkID uint32) ( fmt.Printf("🔑 Setting X+P allocations for mnemonic: X=%s, P=%s (1B each)\n", xLuxAddr, pLuxAddr) // X-chain allocation newAllocations = append(newAllocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": xLuxAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": xLuxAddr, "initialAmount": GigaLux, "unlockSchedule": []interface{}{}, }) // P-chain allocation newAllocations = append(newAllocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": pLuxAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": pLuxAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, @@ -254,14 +254,14 @@ func NewConfigForNetwork(binaryPath string, numNodes uint32, networkID uint32) ( fmt.Printf("🔑 Adding X+P allocations for PRIVATE_KEY: X=%s, P=%s (1B each)\n", xLuxAddr, pLuxAddr) ethAddr := "0x" + hex.EncodeToString(addr[:]) newAllocations = append(newAllocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": xLuxAddr, + "evmAddr": ethAddr, + "utxoAddr": xLuxAddr, "initialAmount": GigaLux, "unlockSchedule": []interface{}{}, }) newAllocations = append(newAllocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": pLuxAddr, + "evmAddr": ethAddr, + "utxoAddr": pLuxAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, @@ -745,8 +745,8 @@ func NewConfigWithPreExistingKeys(binaryPath string, networkID uint32, keysDir s } allocations = append(allocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": xChainAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": xChainAddr, "initialAmount": oneGigaLux, "unlockSchedule": []interface{}{}, }) @@ -759,8 +759,8 @@ func NewConfigWithPreExistingKeys(binaryPath string, networkID uint32, keysDir s } } allocations = append(allocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": pChainAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": pChainAddr, "initialAmount": uint64(0), "unlockSchedule": pchainUnlockSchedule, }) @@ -772,8 +772,8 @@ func NewConfigWithPreExistingKeys(binaryPath string, networkID uint32, keysDir s if mnemonic := getMnemonic(); mnemonic != "" { fmt.Printf("🔑 Mnemonic set, adding mnemonic allocation to genesis\n") allocations = append(allocations, map[string]interface{}{ - "ethAddr": "0x0406d56943a38ad8398a738527f27e2cf01731a8", - "luxAddr": "P-lux1qsrd262r5w9dswv2wwzj0un79ncpwvdgkpqzqu", + "evmAddr": "0x0406d56943a38ad8398a738527f27e2cf01731a8", + "utxoAddr": "P-lux1qsrd262r5w9dswv2wwzj0un79ncpwvdgkpqzqu", "initialAmount": 0, "unlockSchedule": []map[string]interface{}{ {"amount": uint64(100000000000000), "locktime": uint64(0)}, @@ -796,14 +796,14 @@ func NewConfigWithPreExistingKeys(binaryPath string, networkID uint32, keysDir s ethAddr := "0x" + hex.EncodeToString(pChainAddr[:]) fmt.Printf("🔑 Adding PRIVATE_KEY allocations: X=%s, P=%s (1B each)\n", xLuxAddr, pLuxAddr) allocations = append(allocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": xLuxAddr, + "evmAddr": ethAddr, + "utxoAddr": xLuxAddr, "initialAmount": GigaLux, "unlockSchedule": []interface{}{}, }) allocations = append(allocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": pLuxAddr, + "evmAddr": ethAddr, + "utxoAddr": pLuxAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, @@ -1019,14 +1019,14 @@ func NewConfigFromMnemonic(binaryPath string, networkID uint32, numNodes uint32) initialStakers[i] = staker allocations = append(allocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": xChainAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": xChainAddr, "initialAmount": GigaLux, // 1B LUX (1e15 nLUX) "unlockSchedule": []interface{}{}, }) allocations = append(allocations, map[string]interface{}{ - "ethAddr": vk.CChainAddrHex(), - "luxAddr": pChainAddr, + "evmAddr": vk.CChainAddrHex(), + "utxoAddr": pChainAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, // 1B LUX (1e15 nLUX) @@ -1048,14 +1048,14 @@ func NewConfigFromMnemonic(binaryPath string, networkID uint32, numNodes uint32) } allocations = append(allocations, map[string]interface{}{ - "ethAddr": walletKey.CChainAddrHex(), - "luxAddr": walletXAddr, + "evmAddr": walletKey.CChainAddrHex(), + "utxoAddr": walletXAddr, "initialAmount": GigaLux, // 1B LUX (1e15 nLUX) "unlockSchedule": []interface{}{}, }) allocations = append(allocations, map[string]interface{}{ - "ethAddr": walletKey.CChainAddrHex(), - "luxAddr": walletPAddr, + "evmAddr": walletKey.CChainAddrHex(), + "utxoAddr": walletPAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, // 1B LUX (1e15 nLUX) @@ -1080,14 +1080,14 @@ func NewConfigFromMnemonic(binaryPath string, networkID uint32, numNodes uint32) fmt.Printf("🔑 Adding PRIVATE_KEY allocations: X=%s P=%s (1B each)\n", privKeyXAddr, privKeyPAddr) ethAddr := "0x" + hex.EncodeToString(privKeyAddr[:]) allocations = append(allocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": privKeyXAddr, + "evmAddr": ethAddr, + "utxoAddr": privKeyXAddr, "initialAmount": GigaLux, "unlockSchedule": []interface{}{}, }) allocations = append(allocations, map[string]interface{}{ - "ethAddr": ethAddr, - "luxAddr": privKeyPAddr, + "evmAddr": ethAddr, + "utxoAddr": privKeyPAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ {"amount": GigaLux, "locktime": uint64(0)}, diff --git a/local/keys.go b/local/keys.go index 663657d7..f3adc50c 100644 --- a/local/keys.go +++ b/local/keys.go @@ -141,8 +141,8 @@ func GenerateValidatorAllocations(numValidators uint32, hrp string) ([]map[strin } allocations[i] = map[string]interface{}{ - "ethAddr": key.EthAddr, - "luxAddr": luxAddr, + "evmAddr": key.EthAddr, + "utxoAddr": luxAddr, "initialAmount": uint64(0), "unlockSchedule": []map[string]interface{}{ { diff --git a/local/network.go b/local/network.go index 87a07f86..c0e334fc 100644 --- a/local/network.go +++ b/local/network.go @@ -203,8 +203,8 @@ func init() { if err == nil { fmt.Printf("🔑 Adding default network allocation for PRIVATE_KEY address: %s\n", luxAddr) privKeyAlloc := map[string]interface{}{ - "ethAddr": "0x" + hex.EncodeToString(pChainAddr[:]), - "luxAddr": luxAddr, + "evmAddr": "0x" + hex.EncodeToString(pChainAddr[:]), + "utxoAddr": luxAddr, "initialAmount": float64(0), "unlockSchedule": []interface{}{ map[string]interface{}{ @@ -494,16 +494,16 @@ func NewDefaultConfigNNodes(binaryPath string, numNodes uint32) (network.Config, // Add X-chain allocation allocations = append(allocations, map[string]interface{}{ - "luxAddr": xLuxAddr, - "ethAddr": "0x0000000000000000000000000000000000000000", + "utxoAddr": xLuxAddr, + "evmAddr": "0x0000000000000000000000000000000000000000", "initialAmount": 2_000_000_000_000_000_000, // 2B LUX "unlockSchedule": []interface{}{}, }) // Add P-chain allocation with unlockSchedule (builder only reads P-chain amounts from unlockSchedule) allocations = append(allocations, map[string]interface{}{ - "luxAddr": pLuxAddr, - "ethAddr": "0x0000000000000000000000000000000000000000", + "utxoAddr": pLuxAddr, + "evmAddr": "0x0000000000000000000000000000000000000000", "initialAmount": 0, // Not used for P-chain - amounts come from unlockSchedule "unlockSchedule": []interface{}{ map[string]interface{}{ diff --git a/utils/utils_test.go b/utils/utils_test.go index c8d9b7ff..c8c7fc6d 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -13,8 +13,8 @@ var genesis = []byte( "networkID": 1337, "allocations": [ { - "ethAddr": "0xb3d82b1367d362de99ab59a658165aff520cbd4d", - "luxAddr": "X-custom1g65uqn6t77p656w64023nh8nd9updzmxwd59gh", + "evmAddr": "0xb3d82b1367d362de99ab59a658165aff520cbd4d", + "utxoAddr": "X-custom1g65uqn6t77p656w64023nh8nd9updzmxwd59gh", "initialAmount": 0, "unlockSchedule": [ {