128 Commits

Author SHA1 Message Date
Leonid Logvinov
c3afc13dd6
Upgrade bignumber.js version 2019-01-15 16:25:24 +01:00
Amir Bandeali
24564b986d Minimize unnecessary type assertions 2019-01-07 10:31:11 -08:00
Amir Bandeali
a91bc415ed Fix linting errors 2019-01-07 10:31:11 -08:00
Amir Bandeali
5720589515 Add tests for recursive MAP decoding 2019-01-07 10:31:11 -08:00
Amir Bandeali
eeb07d76fc Fix transferFrom to work with MAP 2019-01-07 10:31:11 -08:00
Amir Bandeali
8549252a2c Fix decoding and add tests 2019-01-07 10:31:11 -08:00
kao
f14603ca4d Implement prefer-template tslint rule 2018-12-07 17:06:52 -08:00
Fabio Berger
857a35d4f7 Fix validateOrderFillableOrThrowAsync method so it also checks order signature, cancelled, cancelledUpTo, and throws helpful error messages 2018-11-09 00:45:48 +01:00
F. Eugene Aumson
af91a56a55
feat(order_utils.py): ERC721 asset data codec (#1186) 2018-10-26 15:13:42 -04:00
F. Eugene Aumson
1f0c7f8fbe
feat(order_utils.py): ERC20 asset data encoding and decoding
In addition to the ERC20 codec, also:

Stopped ignoring type errors on 3rd party imports, by including
interface stubs for them;
Removed the unimplemented signature-utils module, which was just a
stand-in when the python project support was first put in place.

https://github.com/0xProject/0x-monorepo/pull/1144
2018-10-23 12:08:16 -04:00
Jacob Evans
9f924e459c
chore: change package org from 0xproject to 0x 2018-10-18 22:27:31 +11:00
Alex Browne
57d9fcf9e5 update order-utils to use new artifacts and abi-gen wrappers packages 2018-10-15 13:36:59 -07:00
Jacob Evans
9e8031d5e3
Throw and handle errors from Providers.
In web3 wrapper when a response contains an error field we throw this rather than return response.result which is often undefined.
In Signature Utils we handle the error thrown when a user rejects the signing dialogue to prevent double signing.
Exposed the ZeroExTransaction JSON schema.
In Website only use the MetamaskSubprovider if we can detect the provider is Metamask
2018-10-09 19:01:36 +11:00
Jacob Evans
75d274f330
Return SignedOrder from signing utils.
Create a helper back in EIP712Utils for code cleanup.
Moved constants in order-utils into the constants object
2018-10-05 17:12:17 +10:00
Jacob Evans
07926ded6e
Introduce Metamask Subprovider.
MM has a number of inconsistencies with other providers when implementing the JSON RPC interface. This subprovider wraps those nuances so they do not leak into the rest of our code
2018-10-05 12:00:41 +10:00
Jacob Evans
adcfaa2e80
Expose eth_signTypedData functionality for order signing 2018-10-05 11:59:24 +10:00
Fabio Berger
9eecf3683b Add transactionHash to OrderState and emit it from OrderWatcher subscription 2018-09-25 16:10:13 +01:00
Amir Bandeali
74ce893f52
Merge pull request #1003 from 0xProject/feature/contracts/roundup
[contracts] Add getPartialAmountCeil and isRoundingErrorCeil
2018-08-24 17:29:09 -07:00
Remco Bloemen
80291caf7c Append -Floor to getPartialAmount and isRoundingError 2018-08-24 16:16:44 -07:00
Amir Bandeali
0629a7d143 Remove remaining Trezor references 2018-08-24 14:40:00 -07:00
Amir Bandeali
1932aff35c Remove Trezor SignatureType 2018-08-24 14:40:00 -07:00
Brandon Millman
57c104119c Merge branch 'development' into feature/forwarder-helper/init
* development: (187 commits)
  Remove trailing slash
  Fix linter
  Stop nesting interfaces and add necessary type exports
  Remove duplicate type and remove nested interface
  Add support for rending the Tuple type
  Add missing keyu
  Remove excessive timestamp
  Improve doc commebnt
  Remove docs catch-all endpoint
  Fix comments
  Look for all TS mapped types
  Add catch and exit with non-zero
  Remove superfluous dep
  Fix CHANGELOG entry
  Fix double assignment
  Upgrade Typedoc to 0.12.0, which works with TS 3.x
  Fix prettier issues
  Enable dry run of release publishing and handle git tags existing
  update yarn.lock
  Missing/superfluous type exports from connect
  ...
2018-08-23 10:58:33 -07:00
Brandon Millman
e8a1950a74 Add ForwarderHelperImplConfig 2018-08-22 15:39:03 -07:00
Fabio Berger
0337b5a401 Merge development 2018-08-16 15:10:12 -07:00
Jacob Evans
88c99396a2
Rename OrderAlreadyCancelledOrFilled -> OrderCancelled.
Remove try catch of throwing errors in favour of returning the Errors in a OrderValidationResult
2018-08-16 11:12:35 +10:00
Jacob Evans
622509c508
[Order-utils] Order is valid when maker amount is very small
Previously our min fillable calculation would throw a rounding error
when encountering a valid order (with a small maker amount). This was
inconsistent with the on-chain logic which allowed this order to be
filled.
2018-08-15 13:06:32 +10:00
Fabio Berger
1d9408a8e0 Fix additional merge conflicts 2018-08-14 14:39:59 -07:00
Fabio Berger
2f2582a0da Merge development 2018-08-14 14:21:47 -07:00
Brandon Millman
9c3d10d5be Merge branch 'development' into refactor/order-utils/market-utils-api
* development:
  feat: Upgrade TypeScript to 3.0.1
  Add defaults for networkId and pagination
  Update sortingUtils to support Order and SignedOrder
  Change rateUtils to use Order
  Updated CHANGELOG
  Fix lint errors
  Update tests for optional feeRate
  Make feeRate optional with a default of 0
  Add tests for sortingUtils
  Implement sorting utils
  Add tests for rateUtils
  Implement rate utils
2018-08-14 13:48:21 -07:00
Brandon Millman
3afe405bbe
Merge pull request #953 from 0xProject/feature/order-utils/order-sorting-utils
[order-utils] Add rate and sorting utilities
2018-08-14 13:45:04 -07:00
Brandon Millman
66745c5260 Remove remaining amounts that are now defaults in tests 2018-08-13 21:31:22 -07:00
Brandon Millman
c10c4cec1d Update marketUtils api 2018-08-13 21:31:22 -07:00
Jacob Evans
ca4905c343
Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +10:00
Brandon Millman
b86210332f Fix lint errors 2018-08-09 19:12:42 -04:00
Brandon Millman
af52598d32 Update tests for optional feeRate 2018-08-09 19:12:42 -04:00
Brandon Millman
cbe639866e Make feeRate optional with a default of 0 2018-08-09 19:12:42 -04:00
Brandon Millman
fcd57d2743 Add tests for sortingUtils 2018-08-09 19:12:42 -04:00
Brandon Millman
a1860b076d Add tests for rateUtils 2018-08-09 19:12:42 -04:00
Jacob Evans
9dd6ba7825
Update jsdoc 2018-08-09 12:02:17 +10:00
Jacob Evans
45e9fbe8f9
Introduce SignerProviderType
This allows the developer to indicate the nuanced signer provider. Some have different implementations (trezor, ledger) and others have different implementations (metamask). Breaking the abstraction of eth_sign. EthSign assumes a spec compliant implementation and can be used as a default
2018-08-09 12:02:12 +10:00
Alex Browne
6a5965d73b
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates 2018-08-08 14:27:30 -07:00
Brandon Millman
7d0bec9b2a Add some test cases that stress slippageBufferAmount param 2018-08-05 20:54:29 -04:00
Brandon Millman
8382161f75 Add tests for findFeeOrdersThatCoverFeesForTargetOrders 2018-08-05 20:48:56 -04:00
Brandon Millman
bc5f8e52de Change orderStates param name to remaingFillableMakerAssetAmounts 2018-08-05 18:33:52 -04:00
Brandon Millman
09c0fc94fc Implement first round of tests for findOrdersThatCoverMakerAssetFillAmount 2018-08-05 18:33:52 -04:00
Fabio Berger
9337d207a1 Stop exporting constants from order-utils 2018-08-03 19:41:55 +02:00
Fabio Berger
d85ce6ac75 Make signature_util into an object literal so related functions are rendered together in the docs 2018-08-03 17:15:14 +02:00
Fabio Berger
e2fb49a8f8
Merge pull request #884 from 0xProject/export-more-0x.js
Export missing V2 pieces from 0x.js
2018-07-18 15:18:54 +02:00
Fabio Berger
f8dbf57582 Rename assetProxyUtils to assetDataUtils 2018-07-17 15:26:55 +02:00
Leonid Logvinov
bf8ac3b9e6
Fix tslint issues 2018-07-17 12:59:02 +02:00