From 57b65726d65378deed6506de1287d9b8e2d2c6ec Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 5 Jun 2018 12:16:25 +0200 Subject: Remove outdated link in ABI-gen README --- packages/abi-gen/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index 4240ba7ba..123be11d9 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -4,8 +4,7 @@ This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) but takes a different approach. You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions. -For an example of the generated [wrapper files](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/src/contract_wrappers/generated) check out 0x.js. -[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/contract_templates) are the templates used to generate those files. +[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/contract_templates) are the templates used to generate the contract wrappers used by 0x.js. ## Installation -- cgit v1.2.3 From cc6338d0482abd2db253b8755109d4aec801e88d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 5 Jun 2018 12:19:28 +0200 Subject: Add `switch-default` tslint rule and add missing default statement --- packages/tslint-config/tslint.json | 1 + packages/website/ts/pages/landing/landing.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 77a1f41cc..ec414fb71 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -7,6 +7,7 @@ "async-suffix": true, "boolean-naming": true, "no-switch-case-fall-through": true, + "switch-default": true, "await-promise": true, "custom-no-magic-numbers": [true, 0, 1, 2, 3, -1], "binary-expression-operand-order": true, diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index 02ecfa117..9d5e54c22 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -349,6 +349,9 @@ export class Landing extends React.Component { case ScreenWidths.Lg: colWidth = isRelayersOnly ? 2 : 2 - i % 2; break; + + default: + throw new Error(`Encountered unknown ScreenWidths value: ${this.state.screenWidth}`); } return (
-- cgit v1.2.3 From 86a6a5b826158fbf3b16081a2ecdbb020140adda Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 5 Jun 2018 12:20:23 +0200 Subject: Replace `-` with `_` in yarn script name so that we are consistent across yarn script names --- packages/0x.js/package.json | 2 +- packages/assert/package.json | 2 +- packages/base-contract/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/contracts/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/json-schemas/package.json | 2 +- packages/metacoin/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sol-cov/package.json | 2 +- packages/sra-report/package.json | 2 +- packages/web3-wrapper/package.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 4de046a07..e8b944498 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -22,7 +22,7 @@ "lint": "tslint --project .", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "clean": "shx rm -rf _bundles lib test_temp scripts src/contract_wrappers/generated", diff --git a/packages/assert/package.json b/packages/assert/package.json index bec4a9137..6f525f504 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -15,7 +15,7 @@ "run_mocha": "mocha lib/test/**/*_test.js --exit", "prepublishOnly": "run-p build", "test": "yarn run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 62e37d80b..81d8442e1 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -12,7 +12,7 @@ "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "test": "yarn run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/connect/package.json b/packages/connect/package.json index fa91bf632..1545fe25f 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -22,7 +22,7 @@ "lint": "tslint --project .", "run_mocha": "mocha lib/test/**/*_test.js --exit", "test": "run-s copy_test_fixtures run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 1cef3d8cf..ca70ad2dd 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -17,7 +17,7 @@ "lint": "tslint --project .", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 8e37a7819..5982d76bf 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -16,7 +16,7 @@ "copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/2.0.0/**/*' ./lib/src/artifacts;", "build": "tsc", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "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/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 997340010..db794dab3 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -11,7 +11,7 @@ "watch": "tsc -w", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test": "yarn run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 75d01a1e9..1439fe471 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -11,7 +11,7 @@ "watch": "tsc -w", "lint": "tslint --project .", "test": "yarn run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 19582327a..5938c59a1 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -14,7 +14,7 @@ "copy_artifacts": "copyfiles './artifacts/**/*' './contracts/**/*' ./lib", "build": "tsc", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "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'", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 5a04c58f7..41c2f8757 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -15,7 +15,7 @@ "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'", "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", + "rebuild_and_test": "run-s build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 44954165d..6dc570c9c 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -18,7 +18,7 @@ "lint": "tslint --project .", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 8d26179b5..968139a86 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -11,7 +11,7 @@ "watch": "tsc -w", "build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' ./lib && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test": "yarn run_mocha", - "rebuild-and-test": "run-s build test", + "rebuild_and_test": "run-s build test", "run_mocha": "mocha lib/test/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index d10d277b9..a159afed7 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -11,7 +11,7 @@ "watch": "tsc -w", "lint": "tslint --project .", "test": "run-s compile_test run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 27bf715a8..a459ec180 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -13,7 +13,7 @@ "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "lint": "tslint --project .", "test": "run-s copy_test_environments copy_test_fixtures run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", "run_mocha": "mocha lib/test/**/*_test.js --exit", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 01f0f3a26..e98b247b4 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -13,7 +13,7 @@ "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", "test": "yarn run_mocha", - "rebuild-and-test": "run-s clean build test", + "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", -- cgit v1.2.3 From 05b9dfbe30c55a67e6d2d63898f52e5fa412fcfb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 5 Jun 2018 12:29:32 +0200 Subject: Mention the gasLimit until in the doc comment --- packages/contract-wrappers/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index 9a463d635..384f032c2 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -158,7 +158,7 @@ export interface MethodOpts { /** * gasPrice: Gas price in Wei to use for a transaction - * gasLimit: The amount of gas to send with a transaction + * gasLimit: The amount of gas to send with a transaction (in Gwei) */ export interface TransactionOpts { gasPrice?: BigNumber; -- cgit v1.2.3