mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-10 22:58:08 -05:00
23 lines
556 B
JavaScript
23 lines
556 B
JavaScript
const path = require('path');
|
|
|
|
const addressesPath = '../../addresses.json';
|
|
|
|
const addresses = require(path.join(__dirname, addressesPath));
|
|
const [targetEnv] = process.argv.slice(2);
|
|
|
|
if (!addresses[targetEnv]) {
|
|
console.error(`ERROR: Target environment "${targetEnv}" not found in addresses.json`);
|
|
process.exit(1);
|
|
}
|
|
|
|
const network = addresses[targetEnv].network;
|
|
|
|
if (!network) {
|
|
console.error(
|
|
`ERROR: "network" parameter not found under "${targetEnv}" target environment in addresses.json`
|
|
);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log(network);
|