UNPKG

@simbachain/hardhat

Version:
33 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = require("hardhat/config"); const web3_suites_1 = require("@simbachain/web3-suites"); /** * pull contractX from your org on simbachain.com and sync it with contractX in your project * @param hre * @param designID */ const pull = async (hre, designID, contractName, pullSourceCode = true, pullSolFiles = false) => { web3_suites_1.SimbaConfig.log.debug(`:: ENTER :`); if (designID) { await web3_suites_1.pullContractFromDesignId(designID); web3_suites_1.SimbaConfig.log.debug(`:: EXIT :`); return; } if (contractName) { if (pullSolFiles && pullSourceCode) { await web3_suites_1.pullMostRecentFromContractName(contractName); web3_suites_1.SimbaConfig.log.debug(`:: EXIT :`); return; } } await syncContract(designID); web3_suites_1.SimbaConfig.log.debug(`:: EXIT :`); }; config_1.task("pull", "pull contract from Blocks and sync in your local project") .setAction(async (taskArgs, hre) => { const { designID } = taskArgs; await pull(hre, designID); }); exports.default = pull; //# sourceMappingURL=synccontract.js.map