mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
21 lines
479 B
Go
21 lines
479 B
Go
// Copyright (C) 2022, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
package testutils
|
|
|
|
import (
|
|
"github.com/luxfi/geth/common"
|
|
"github.com/luxfi/crypto"
|
|
)
|
|
|
|
func GenerateEthAddrs(count int) ([]common.Address, error) {
|
|
addrs := make([]common.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
|
|
}
|