locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
23 lines (22 loc) • 987 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
require("ts-node");
const config_1 = require("../../config");
const initLocklift_1 = require("../steps/initLocklift");
const program = new commander_1.Command();
program
.name("code")
.description("Print contract code")
.requiredOption("-c --contract <contract>", "Contract name")
.option("-b, --build <build>", "Path to the build folder", "build")
.addOption(new commander_1.Option("--config <config>", "Path to the config file")
.default(() => (0, config_1.loadConfig)("locklift.config.ts"))
.argParser(config => () => (0, config_1.loadConfig)(config)))
.action(async (options) => {
const config = options.config();
const locklift = await (0, initLocklift_1.initLockliftStep)(config, options);
const { code } = locklift.factory.getContractArtifacts(options.contract);
console.log(code);
});
exports.default = program;