aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-07 02:17:13 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-07 02:17:13 +0800
commit58603e2a5a06f6bccfb5b6d2d12732ee6f0e69da (patch)
tree76d90e84e57cf65d7bbb1159cbdf73c3537b493e /packages
parentd97184880ceac6215ce50916a29f4cb01bbfc63f (diff)
parent49049b8c126c779d68934eaceb6835ebf3a24a49 (diff)
downloaddexon-sol-tools-58603e2a5a06f6bccfb5b6d2d12732ee6f0e69da.tar.gz
dexon-sol-tools-58603e2a5a06f6bccfb5b6d2d12732ee6f0e69da.tar.zst
dexon-sol-tools-58603e2a5a06f6bccfb5b6d2d12732ee6f0e69da.zip
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/package.json3
-rw-r--r--packages/abi-gen/src/utils.ts2
-rw-r--r--packages/contract-wrappers/package.json1
-rw-r--r--packages/contract_templates/contract.handlebars4
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars2
-rw-r--r--packages/contracts/package.json3
-rw-r--r--packages/fill-scenarios/package.json2
-rw-r--r--packages/metacoin/package.json2
-rw-r--r--packages/migrations/package.json4
-rw-r--r--packages/order-utils/package.json2
-rw-r--r--packages/order-watcher/package.json3
11 files changed, 12 insertions, 16 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 478cd69c1..d18960b5d 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -20,7 +20,7 @@
"build:all": "run-p build:umd:prod build:commonjs; exit 0;",
"pre_build": "run-s generate_contract_wrappers copy_artifacts",
"copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers",
"lint": "tslint --project . --exclude **/src/contract_wrappers/generated/**/*",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
@@ -91,7 +91,6 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
- "prettier": "^1.11.1",
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts
index a46209dad..66390174c 100644
--- a/packages/abi-gen/src/utils.ts
+++ b/packages/abi-gen/src/utils.ts
@@ -56,7 +56,7 @@ export const utils = {
const componentType = `${component.name}: ${componentValueType}`;
return componentType;
});
- const tsType = `{${componentsType}}`;
+ const tsType = `{${componentsType.join(';')}}`;
return tsType;
}
throw new Error(`Unknown Solidity type found: ${solType}`);
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index de50fa305..71c2ee780 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -69,7 +69,6 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
- "prettier": "^1.11.1",
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars
index 31dbc15cb..9e77b711d 100644
--- a/packages/contract_templates/contract.handlebars
+++ b/packages/contract_templates/contract.handlebars
@@ -2,7 +2,7 @@
* This file is auto-generated using abi-gen. Don't edit directly.
* Templates can be found at https://github.com/0xProject/0x-monorepo/tree/development/packages/contract_templates.
*/
-// tslint:disable:no-consecutive-blank-lines ordered-imports
+// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace
// tslint:disable-next-line:no-unused-variable
import { BaseContract } from '@0xproject/base-contract';
import { ContractArtifact } from '@0xproject/sol-compiler';
@@ -83,7 +83,7 @@ export class {{contractName}}Contract extends BaseContract {
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
- super("{{contractName}}", abi, address, provider, txDefaults);
+ super('{{contractName}}', abi, address, provider, txDefaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index 99fda80e1..5d14b1823 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -18,7 +18,7 @@ async callAsync(
data: encodedData,
},
self._web3Wrapper.getContractDefaults(),
- )
+ );
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
let resultArray = ethersFunction.parse(rawCallResult);
const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs;
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 2cd87431c..3f9160fa7 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -22,7 +22,7 @@
"compile": "sol-compiler",
"clean": "shx rm -rf lib src/contract_wrappers/generated",
"generate_contract_wrappers":
- "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
+ "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers",
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
@@ -61,7 +61,6 @@
"make-promises-safe": "^1.1.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
- "prettier": "^1.11.1",
"shx": "^0.2.2",
"solc": "^0.4.24",
"tslint": "5.8.0",
diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json
index 27ab83636..d0c2b8000 100644
--- a/packages/fill-scenarios/package.json
+++ b/packages/fill-scenarios/package.json
@@ -9,7 +9,7 @@
"build": "yarn pre_build && tsc",
"pre_build": "run-s update_artifacts generate_contract_wrappers",
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json lib/artifacts; done;",
- "generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|ERC20Token|DummyERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|ERC20Token|DummyERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts src/generated_contract_wrappers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
index ff8cea62c..35e54314a 100644
--- a/packages/metacoin/package.json
+++ b/packages/metacoin/package.json
@@ -18,7 +18,7 @@
"rebuild_and_test": "run-s build test",
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit",
- "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers && prettier --write 'src/contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 3279533de..605cabee3 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -20,9 +20,9 @@
"script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0",
"generate_contract_wrappers": "run-p generate_contract_wrappers:*",
"generate_contract_wrappers:v1":
- "abi-gen --abis ${npm_package_config_abis_v1} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/v1/contract_wrappers --backend ethers && prettier --write 'src/v1/contract_wrappers/**.ts'",
+ "abi-gen --abis ${npm_package_config_abis_v1} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/v1/contract_wrappers --backend ethers",
"generate_contract_wrappers:v2":
- "abi-gen --abis ${npm_package_config_abis_v2} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/v2/contract_wrappers --backend ethers && prettier --write 'src/v2/contract_wrappers/**.ts'",
+ "abi-gen --abis ${npm_package_config_abis_v2} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/v2/contract_wrappers --backend ethers",
"compile:v1": "sol-compiler --artifacts-dir artifacts/1.0.0 --contracts Exchange_v1,DummyERC20Token,ZRXToken,WETH9,TokenTransferProxy_v1,MultiSigWallet,MultiSigWalletWithTimeLock,MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress,TokenRegistry",
"compile:v2": "sol-compiler --artifacts-dir artifacts/2.0.0 --contracts ERC20Token,DummyERC20Token,ERC721Token,DummyERC721Token,ERC20Proxy,ERC721Proxy,Exchange,MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress,ZRXToken,WETH9,IWallet,IValidator"
},
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index 95de69bf7..3a97b99e3 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -13,7 +13,7 @@
"pre_build": "run-s update_artifacts generate_contract_wrappers",
"transpile": "tsc",
"copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json lib/src/artifacts; done;",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index c329a50be..b67df2e4c 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -15,8 +15,8 @@
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"pre_build": "run-s update_test_artifacts update_compact_artifacts generate_contract_wrappers",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
@@ -70,7 +70,6 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
- "prettier": "^1.11.1",
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",