@dethcrypto/eth-sdk
Version:
🛠Generate type-safe, lightweight SDK for your Ethereum smart contracts
20 lines • 690 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateTypes = void 0;
const path_1 = require("path");
const typechain_1 = require("typechain");
async function generateTypes(abisRoot, outputPath, typechainFlags) {
const cwd = process.cwd();
const files = (0, typechain_1.glob)(cwd, [(0, path_1.join)(abisRoot, '/**/*.json')]);
await (0, typechain_1.runTypeChain)({
cwd,
allFiles: files,
filesToProcess: files,
target: 'ethers-v5',
outDir: outputPath,
inputDir: abisRoot,
flags: typechainFlags,
});
}
exports.generateTypes = generateTypes;
//# sourceMappingURL=generateTypes.js.map