UNPKG

@newos/cli

Version:
25 lines 1.16 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.action = void 0; const NetworkController_1 = __importDefault(require("../../models/network/NetworkController")); async function action(params) { var _a, _b; const controller = new NetworkController_1.default(params.network, params.txParams, params.networkFile); try { controller.logErrorIfContractDeploymentIsInvalid(params.contract, true); } catch (e) { if (!e.message.includes('has changed locally')) { e.message += '\n\nVerification of regular instances is not yet supported.'; } throw e; } await controller.verifyAndPublishContract(params.contract, params.optimizer, (_a = params.optimizerRuns) !== null && _a !== void 0 ? _a : 200, params.remote, (_b = params.apiKey) !== null && _b !== void 0 ? _b : ''); if (!params.dontExitProcess && process.env.NODE_ENV !== 'test') process.exit(0); } exports.action = action; //# sourceMappingURL=action.js.map