2019-06-07 14:19:12 +03:00
|
|
|
require('../env')
|
2019-05-06 14:12:53 +03:00
|
|
|
const { privateKeyToAddress } = require('../src/utils/utils')
|
|
|
|
const { EXIT_CODES } = require('../src/utils/constants')
|
|
|
|
|
|
|
|
const privateKey = process.env.VALIDATOR_ADDRESS_PRIVATE_KEY
|
|
|
|
|
|
|
|
if (!privateKey) {
|
|
|
|
console.error('Environment variable VALIDATOR_ADDRESS_PRIVATE_KEY is not set')
|
|
|
|
process.exit(EXIT_CODES.GENERAL_ERROR)
|
|
|
|
}
|
|
|
|
|
|
|
|
const address = privateKeyToAddress(privateKey)
|
|
|
|
|
|
|
|
console.log(address)
|