aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-05 22:46:51 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-05 22:46:51 +0800
commiteb4adcf797cab80b9fa7c08083978be5514df8b9 (patch)
treef09a99d563705004822a09d70a8589663a734819
parent32568ebf09c93dd35bfb751ae1a7a33926f3bab1 (diff)
downloaddexon-sol-tools-eb4adcf797cab80b9fa7c08083978be5514df8b9.tar.gz
dexon-sol-tools-eb4adcf797cab80b9fa7c08083978be5514df8b9.tar.zst
dexon-sol-tools-eb4adcf797cab80b9fa7c08083978be5514df8b9.zip
Introduce a const for 'contract.mustache'
-rw-r--r--packages/typed-contracts/src/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/typed-contracts/src/index.ts b/packages/typed-contracts/src/index.ts
index bbb527574..0a74e1594 100644
--- a/packages/typed-contracts/src/index.ts
+++ b/packages/typed-contracts/src/index.ts
@@ -15,6 +15,7 @@ import {ParamKind} from './types';
import {utils} from './utils';
const ABI_TYPE_METHOD = 'function';
+const MAIN_TEMPLATE_NAME = 'contract.mustache';
const args = yargs
.option('abiGlob', {
@@ -49,7 +50,7 @@ for (const partialTemplateFileName of partialTemplateFileNames) {
Handlebars.registerPartial(namedContent.name, namedContent.content);
}
-const mainTemplate = utils.getNamedContent(`${args.templates}/contract.mustache`);
+const mainTemplate = utils.getNamedContent(`${args.templates}/${MAIN_TEMPLATE_NAME}`);
const template = Handlebars.compile(mainTemplate.content);
const abiFileNames = globSync(args.abiGlob);
if (_.isEmpty(abiFileNames)) {