mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
Forward-only completion of the strip-aliases work in lockstep with:
crypto v1.19.16, utxo v0.3.3, node v1.27.13, sdk v1.16.63,
netrunner v1.18.6, coreth v1.22.5.
Canonical surface across the workspace is EVMAddress / EVMKeychain /
GetByEVM / EVMAddresses — no KeccakAddress, no EthAddress, no
EthKeychain. \"EVM-runtime account address\" IS the data model;
Keccak256(secp256k1 pubkey) is HOW.
Touched:
cmd/keycmd/derive.go ValidatorKeyInfo drops KeccakAddress
+ EthAddress JSON aliases; only
evm_address remains
internal/testutils/addresses.go
drop GenerateKeccakAddrs +
GenerateEthAddrs aliases; only
GenerateEVMAddrs remains
cmd/rpccmd/transfer.go kcAdapter.EthAddresses() → .EVMAddresses();
WalletConfig.EthKeychain → .EVMKeychain
pkg/chain/local.go emptyEthKeychain → emptyEVMKeychain;
ethKc → evmKc (4 sites); EthKeychain
field → EVMKeychain
pkg/chain/public.go ethKc → evmKc, EthKeychain → EVMKeychain
pkg/vm/createEvm_test.go GenerateEthAddrs → GenerateEVMAddrs
tests/e2e/utils/helpers.go EthKeychain: nil → EVMKeychain: nil (3x)
cmd/networkcmd/status.go status.String() → %+v (ZAP-native rpcpb
has no String() method)
pkg/chain/local.go deployBlockchainsInfo.String() → %+v;
resp.GetClusterInfo() → resp.ClusterInfo
(ZAP-native field access)
Deps:
sdk v1.16.61 → v1.16.63
netrunner v1.18.5-pre → v1.18.6
coreth v1.21.48 → v1.22.5
utxo v0.3.1 → v0.3.3
crypto v1.19.13 → v1.19.16
node v1.26.25-pre → v1.27.2 (indirect)
26 lines
784 B
Go
26 lines
784 B
Go
// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// Package testutils provides test utilities for the CLI.
|
|
package testutils
|
|
|
|
import (
|
|
"github.com/luxfi/crypto"
|
|
)
|
|
|
|
// GenerateEVMAddrs returns `count` test 20-byte EVM-runtime account
|
|
// addresses. The internal derivation hashes a fresh secp256k1 pubkey
|
|
// with Keccak256 (that's HOW); the values ARE EVM-runtime account
|
|
// addresses consumed by every EVM-compatible chain (that's WHAT).
|
|
func GenerateEVMAddrs(count int) ([]crypto.Address, error) {
|
|
addrs := make([]crypto.Address, count)
|
|
for i := 0; i < count; i++ {
|
|
pk, err := crypto.GenerateKey()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
addrs[i] = crypto.PubkeyToAddress(pk.PublicKey)
|
|
}
|
|
return addrs, nil
|
|
}
|