9704 Commits

Author SHA1 Message Date
Lawrence Forman
06499f2155 In @0x/contract-wrappers: Update tests 2019-07-23 15:17:56 -07:00
Lawrence Forman
5b1d9396d7 In @0x/order-utils: Rename Exchange RevertError error codes. 2019-07-23 15:17:56 -07:00
Lawrence Forman
633c5d5938 In @0x/utils add encode() method to RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
2e846159a8 In @0x/dev-utils: swap order of equality check in RevertError chai helper from actual.equals(expected) to expected.equals(actual). 2019-07-23 15:17:56 -07:00
Lawrence Forman
53121b1dd4 In @0x/order-utils: add AssetProxyTransferError Exchange RevertError 2019-07-23 15:17:56 -07:00
Lawrence Forman
94a91ed5c8 In @0x/dev-utils: Tweak equality assertion failure actual and expected rendering to be more readable 2019-07-23 15:17:56 -07:00
Lawrence Forman
162a812189 In @0x/typescript-typings: Add types for @0x/dev-utils chai helpers in types/@0x.
In `@0x/dev-utils`: remove global typescript types for chai helpers in lieu of defining them in `@0x/typescript-typings`
2019-07-23 15:17:56 -07:00
Lawrence Forman
1aae68c614 In @0x/dev-utils: Break out RevertError helper code into a separate file from chai_setup.ts.
In `@0x/dev-utils`: Add chai support for ganache and geth transaction reverts.
2019-07-23 15:17:28 -07:00
Lawrence Forman
703a0fde3c In @0x/utils: Add AnyRevertError type that matches with any revert error 2019-07-23 15:17:28 -07:00
Lawrence Forman
abb71cd074 In @0x/order-utils: Rename ExchangeErrors to ExchangeRevertErrors. 2019-07-23 15:17:28 -07:00
Lawrence Forman
e00ac37cb2 In @0x/dev-utils fix the RevertError chai helper's equal override not passing all arguments to previous handler.
In `@0x/dev-utils` add more `RevertError` chai helper tests for backwards compatibility with `rejectedWith`.
In `@0x/dev-utils` instead of overriding `rejectedWith`, add a new method `revertWith`.
In `@0x/dev-utils` clean up the code for the `RevertError` chai helper.
2019-07-23 15:16:49 -07:00
Lawrence Forman
6583ac9ba1 Make @0x/base-contract _throwIfRevertWithReasonCallResult decode and throw RevertErrors.
Remove no longer necessary dependency on `ethers.js` in `@0x/base-contract`.
2019-07-23 15:16:49 -07:00
Lawrence Forman
42963ea77d Use new RevertError nomenclature.
Tweak `RevertError` coercion in chai helper.
Add more `RevertError` chai helper tests.
2019-07-23 15:15:17 -07:00
Lawrence Forman
6231724f49 Rename RichRevertReason to RevertError.
Rename `StandardError` to `StringRevertError`.
Rename `RichRevertAbi` to `RevertErrorAbi`.
Make `RevertError` extend `Error` so it can be thrown.
Add `RevertError` tests.
2019-07-23 15:15:17 -07:00
Lawrence Forman
5b25eb4fbd Fix linter errors. 2019-07-23 15:15:17 -07:00
Lawrence Forman
565cc7b3c8 Ran prettier 2019-07-23 15:15:17 -07:00
Lawrence Forman
71dc2690aa Export StandardError from @0x/utils 2019-07-23 15:15:17 -07:00
Lawrence Forman
3accd48ea8 Remove chai plugin dependencies from @0x/contract-test-utils and @0x/order-utils 2019-07-23 15:15:17 -07:00
Lawrence Forman
ed78bde359 Make the chai helper for rich reverts in dev-utils more robust.
Add rich reverts chai helper tests to `dev-utils`
2019-07-23 15:14:52 -07:00
Lawrence Forman
ff1a3ab307 Add Exchange rich revert types to @0x/order-utils 2019-07-23 15:14:13 -07:00
Lawrence Forman
26643a489b Add RichRevertReason type and utilities to @0x/utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
5955a541a3 In order-utils, inherit chaiSetup from @0x/dev-utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
995669cccd In contract-wrappers, inherit chaiSetup from @0x/dev-utils 2019-07-23 15:13:26 -07:00
Lawrence Forman
9a162e5d5c Add RichRevertAbi to etherem-types 2019-07-23 15:13:26 -07:00
Lawrence Forman
9319f362bb Add chaiSetup function wtih rich revert support to @0x/dev-utils 2019-07-23 15:12:33 -07:00
Lawrence Forman
8305168bc4 Add OrderStatus to @0x/types 2019-07-23 15:12:03 -07:00
Lawrence Forman
c195629a77 Update changelogs. 2019-07-23 15:08:58 -07:00
Lawrence Forman
0b38289703 Ran prettier 2019-07-23 15:08:30 -07:00
Lawrence Forman
2e44bb6085 Fix removing domain and signature fields from order 2019-07-23 15:08:30 -07:00
Lawrence Forman
4aae7348d1 Update fill-scenarios, contract-wrappers, contract-artifacts, abi-gen-wrappers to use new domain schema and Order format. 2019-07-23 15:08:00 -07:00
Lawrence Forman
665942a8c9 Update order-utils package for new Order structure 2019-07-23 15:04:46 -07:00
Lawrence Forman
dc9a26ae8a Update packages/utils tests to conform to new domain schema 2019-07-23 15:04:46 -07:00
Lawrence Forman
55f3322576 Rename eip712domain field in Order and ZeroExTransaction to just domain. 2019-07-23 15:04:46 -07:00
Lawrence Forman
376f068719 Add eip712DomainSchema to json-schemas.
Add required field `domain` to `order` and `zeroExTransaction` schemas.
2019-07-23 15:04:46 -07:00
Lawrence Forman
3688956ee5 Switch eip712 domain field verifyingContract to verifyingContractAddress 2019-07-23 15:04:46 -07:00
Lawrence Forman
2524e7eea3 Update changelogs 2019-07-23 15:04:46 -07:00
Lawrence Forman
32460f00f8 Add chainId to order json-schemas tests. 2019-07-23 14:59:31 -07:00
Lawrence Forman
232a43f34f Update contract-wrappers tests. 2019-07-23 14:59:31 -07:00
Lawrence Forman
94f5a039d2 Update migrations for coordinator and exchange contracts. 2019-07-23 14:59:31 -07:00
Lawrence Forman
7a4ae74727 Add chainId to order JSON schema 2019-07-23 14:59:31 -07:00
Lawrence Forman
1295de4c78 Update generated wrappers for coordinator and exchange. 2019-07-23 14:59:31 -07:00
Lawrence Forman
e51b425200 Unpin coordinator deps.
Update coordinator tests for new tooling.
Remove unecessary `chainId` parameter in `eip712_utils.createCoordinatorApprovalTypeData`
2019-07-23 14:58:00 -07:00
Lawrence Forman
e6aff19a0c Clearer usage of chainId constants in order-utils tests. 2019-07-23 14:58:00 -07:00
Lawrence Forman
bd06c7b343 Remove lingering invalid calls to OrderStateUtils() 2019-07-23 14:58:00 -07:00
Lawrence Forman
f77823ee24 Remove unused chainId variables in signature_utils.ts.
Obey the linter gods.
2019-07-23 14:58:00 -07:00
Lawrence Forman
2d28fde24d Migrate all contract-related tooling and tests to accept a chain ID in domain separators. 2019-07-23 14:58:00 -07:00
Lawrence Forman
4bbaa6b41c Update tooling/types to incorporate chainID in domain separators. 2019-07-23 14:58:00 -07:00
David Sun
10b7d7da3f
Merge pull request #1984 from 0xProject/feature/website/add-vote-faq
Add FAQ link to vote page
2019-07-23 10:28:50 -07:00
David Sun
e69d2bb54a Add FAQ link to vote page 2019-07-23 10:06:39 -07:00
F. Eugene Aumson
ead8099109
Auto-gen Python Exchange wrapper (#1919)
* Rename existing wrapper, to match contract name

* base contract: make member var public

* json_schemas.py: stop storing copies of schemas!

* .gitignore generated erc20_token.py wrapper

* json schemas: allow uppercase digits in address

* existing exchange wrapper: re-order methods

to match method order in Solidity contract, to reduce noise in upcoming
diffs of newly generated code vs. old manually-written code.

* existing exchange wrapper: rename method params

To match contract method param names

* existing exchange wrapper: remove redundant member

* existing exchange wrapper: make signatures bytes

Not strings.

* abi-gen/test-cli: show context on diff failure

* abi-gen-templates/Py: fix broken event interface

Previous changes had removed the `token_address` parameter from all
generated methods, but this instance was missed because there weren't
tests/examples using events for the first contract for which wrappers
were generated (ERC20Token).

* abi-gen: remove unused method parameters

* abi-gen: convert Py method params to snake case

* abi-gen: rewrite Python tuple handling

* python-generated-wrappers: include Exchange

* abi-gen-templates/Py: easy linter fixes

* abi-gen-templates/Py: satisfy docstring linters

* abi-gen-templates/Py: normalize bytes before use

* contract_wrappers.py: replace Exchange w/generated

* contract_wrappers.py: rm manually written Exchange

* contract_wrappers.py/doctest: rename variables

* abi-gen: fix misspelling in docstring

Co-Authored-By: Fabio B <me@fabioberger.com>

* Py docs: error on warning, and test build in CI

* abi-gen: doc Py bytes params as requiring UTF-8

* abi-gen: git mv diff.sh test-cli/

* abi-gen: put Py wrapper in module folder, not file

This leaves space for user-defined additions to the same module, such as
for custom types, as shown herein.

* abi-gen: customizable param validation for Python

* contract_wrappers.py: JSON schema Order validation

* CircleCI Build Artifacts

For abi-gen command-line test output, for generated Python contract
wrappers as output by abi-gen, for generated Python contract wrappers as
reformatted and included in the Python package area, and for the "build"
output folder in each Python package, which includes the generated
documentation.

* CHANGELOG updates for all components

* abi-gen: grammar in comments

Co-Authored-By: Fabio B <me@fabioberger.com>

* abi-gen: CHANGELOG spelling correction

Co-Authored-By: Fabio B <me@fabioberger.com>

* order_utils.py: reverse (chronological) CHANGELOG

* abi-gen-templates: reset CHANGELOG patch version

* CHANGELOGs: use multiple entries where appropriate

* abi-gen: enable devdoc solc output in test-cli

* abi-gen-templates/Py: consolidate return type

* abi-gen/test-cli: non-pure fixture contract method

Added a method to the "dummy" test fixture contract that isn't pure.
All of the other prior method cases were pure.

* abi-gen/Py: fix const methods missing return type

* abi-gen/Py: fix wrong return types on some methods

Specifically, wrapper methods wrapping contract methods that modify
contract state and return no return value.  There was no test case for
this.  Now there is.

* contract_wrappers.py: rm generated code in `clean`

* Parallelize Py monorepo scripts (test, lint, etc)
2019-07-23 12:58:18 -04:00