aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-02-06 07:37:02 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-02-07 09:26:13 +0800
commit6cda67df101feab64abf43eeb4c6263ed103528c (patch)
tree5676cadc7926f5f258f05724ba17147730338c1b
parent897515c00207a11f7a45932d3c526a5eaf961635 (diff)
downloaddexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar.gz
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar.bz2
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar.lz
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar.xz
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.tar.zst
dexon-sol-tools-6cda67df101feab64abf43eeb4c6263ed103528c.zip
Update compile command and run prettier
-rw-r--r--packages/abi-gen/src/index.ts7
-rw-r--r--packages/contracts/package.json2
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts
index 85cc67daf..b6aaa03ca 100644
--- a/packages/abi-gen/src/index.ts
+++ b/packages/abi-gen/src/index.ts
@@ -47,7 +47,6 @@ const args = yargs
describe: 'ID of the network where contract ABIs are nested in artifacts',
type: 'number',
default: DEFAULT_NETWORK_ID,
-
})
.example(
"$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'",
@@ -96,11 +95,11 @@ for (const abiFileName of abiFileNames) {
const parsedContent = JSON.parse(namedContent.content);
let ABI;
if (_.isArray(parsedContent)) {
- ABI = parsedContent; // ABI file
+ ABI = parsedContent; // ABI file
} else if (!_.isUndefined(parsedContent.abi)) {
- ABI = parsedContent.abi; // Truffle artifact
+ ABI = parsedContent.abi; // Truffle artifact
} else if (!_.isUndefined(parsedContent.networks) && !_.isUndefined(parsedContent.networks[args.networkId])) {
- ABI = parsedContent.networks[args.networkId]; // 0x contracts package artifact
+ ABI = parsedContent.networks[args.networkId]; // 0x contracts package artifact
}
if (_.isUndefined(ABI)) {
utils.log(`${chalk.red(`ABI not found in ${abiFileName}.`)}`);
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 712b220ec..4bdbf3f41 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -15,7 +15,7 @@
"test": "run-s compile build run_mocha",
"run_mocha": "mocha 'lib/test/**/*.js' --timeout 10000 --bail --exit",
"compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846",
- "compile": "node ../deployer/lib/src/cli.js compile",
+ "compile": "node ../deployer/lib/src/cli.js compile --contracts-dir src/contracts --artifacts-dir src/artifacts",
"clean": "rm -rf ./lib",
"generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template contract_templates/contract.handlebars --partials 'contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated",
"migrate": "node ../deployer/lib/src/cli.js migrate",