298 Commits

Author SHA1 Message Date
Francesco Agosti
66eef758c6
Merge pull request #1047 from 0xProject/feature/re-add-no-unused-variables
Re-add no-unused-variable tslint rule
2018-08-30 15:38:21 -07:00
Greg Hysen
5802713801
Merge pull request #1046 from 0xProject/fix/contracts/roundingFeeTestsMatchOrders
Test cases for rounding fees in matchOrders
2018-08-30 14:27:01 -07:00
fragosti
80b7a7842c run prettier 2018-08-30 13:47:33 -07:00
fragosti
1d5ef4d0ca Fix unused vars for react-shared and website 2018-08-30 13:28:07 -07:00
Greg Hysen
0be2219beb Test cases for rounding fees in matchOrders 2018-08-30 12:23:11 -07:00
Amir Bandeali
afa2dd7374 Add test for fillOrder and dispatchTransferFrom where maker == taker 2018-08-30 09:26:44 -07:00
Amir Bandeali
d80701c277 Fix geth tests 2018-08-29 15:35:09 -07:00
Amir Bandeali
f225f9e7c8 Making rounding consistent in calculateFillResults 2018-08-28 13:25:05 -07:00
Amir Bandeali
14fdb71a71
safeGetPartialAmount (#1035)
* Added Test "Should transfer correct amounts when left order is fully filled and values pass isRoundingErrorCeil but fail isRoundingErrorFloor"

* Added RoundingError exception to reference function for getPartialAmount

* Added RoundingError exception to reference function for getPartialAmount

* Added isRoundingErrorCeil to getPartialAmountCeil reference funtion

* Computed new values  for "Should give right maker a better buy price when correct price is not integral" that does not have a rounding error

* Almost all tests for match orders are passing after adding isRoundingErrorCeil check

* WIP commit: Added rounding error checks to getPartialAmount

* WIP commit: Added rounding error checks to getPartialAmount

* Use safe versions of getPartialAmount

* Update Exchange internals tests

* Run linter

* Found new values for "Should transfer correct amounts when right order fill amount deviates from amount derived by `Exchange.fillOrder`"

* Fixed merge conflicts

* Run all tests

* Cleaned up some comments on match Orders tests

* Fix tests for geth
2018-08-28 13:00:49 -07:00
Alex Browne
ff4f86f1d6
fix(contracts): Use correct error message for division by zero 2018-08-27 11:19:25 -07:00
Greg Hysen
287830d6e0 Run all tests 2018-08-24 18:20:26 -07:00
Greg Hysen
c7a7ae7e18 Give right maker better price when correct value is not integral 2018-08-24 18:20:26 -07:00
Greg Hysen
f8e565bc06 Tests for matchOrders edge cases 2018-08-24 18:20:25 -07:00
Greg Hysen
1e6b83719a Renaming verify -> assert in order matching 2018-08-24 18:20:25 -07:00
Greg Hysen
9a5ec8d030 Added function signature comments 2018-08-24 18:20:25 -07:00
Greg Hysen
70863cca08 Ran prettier and linter 2018-08-24 18:20:25 -07:00
Greg Hysen
5a1dce15be Updated all existing match order tests to use new format 2018-08-24 18:19:43 -07:00
Greg Hysen
f697814849 First balance test with intentional values 2018-08-24 18:18:30 -07:00
Greg Hysen
ca5c9e77c0 Ironing out the new set of test cases for order matchubng 2018-08-24 18:17:27 -07:00
Greg Hysen
0ecdf1e213 All existing tests pass. 2018-08-24 18:17:26 -07:00
Amir Bandeali
a09ee90739 Add tests for matchOrders 2018-08-24 17:30:56 -07:00
Amir Bandeali
7d5a23969d Add reentrancy tests for fillOrder and wrapper functions 2018-08-24 17:30:56 -07: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
Amir Bandeali
cc1fac9bbe Fix linting errors 2018-08-24 17:02:42 -07:00
Remco Bloemen
80291caf7c Append -Floor to getPartialAmount and isRoundingError 2018-08-24 16:16:44 -07:00
Greg Hysen
a27112cbef SignatureType.Trezor -> SignatureType.EthSign in Signature Validator tests 2018-08-24 14:40:00 -07:00
Greg Hysen
bb4d449e92 Test case for Trezor Model T signature 2018-08-24 14:40:00 -07:00
Greg Hysen
241534a63d Fixed trezor personal message in client+contracts; added a test using message signed by Trezor One (firmware v1.6.2) 2018-08-24 14:40:00 -07:00
Amir Bandeali
1932aff35c Remove Trezor SignatureType 2018-08-24 14:40:00 -07:00
Amir Bandeali
8ce4f9c784 Remove SignatureType.Caller 2018-08-24 14:39:08 -07:00
Remco Bloemen
7f78d7da9d Add tests 2018-08-24 14:09:51 -07:00
Remco Bloemen
4219af1430 Add DIVISION_BY_ZERO to getPartialAmount for consistency 2018-08-24 14:09:51 -07:00
Remco Bloemen
c109d1f545 Remove .only 2018-08-24 14:09:51 -07:00
Remco Bloemen
3dad6ee55e Add tests for getPartialAmountCeil 2018-08-24 14:09:51 -07:00
Amir Bandeali
6a9669a409 Rethrow Wallet and Validator errors 2018-08-24 14:06:46 -07:00
Remco Bloemen
4159e45aff Update tests 2018-08-24 13:45:10 -07:00
Amir Bandeali
070eff6f3a Rename TestStaticCall => TestStaticCallReceiver 2018-08-24 13:32:04 -07:00
Amir Bandeali
0a1ae2c311 Remove pragma experimental v0.5.0 and use staticcall is assembly 2018-08-24 13:19:07 -07:00
Amir Bandeali
c5f8b9c2d2 Add pragma experimental v0.5.0 to SignatureValidator and add tests 2018-08-24 13:19:07 -07:00
Fabio Berger
b7c119b2aa Fix many linter errors that showed up upon upgrading tsutil 2018-08-22 18:52:17 +01:00
Fabio Berger
0248add542 Merge development branch 2018-08-22 11:41:42 +01:00
Amir Bandeali
633e6c38c8 Fix linting errors 2018-08-16 17:31:21 -07:00
Amir Bandeali
4dd59a370d Add tests for ERC20 token with no return values 2018-08-16 17:31:21 -07:00
Fabio Berger
0337b5a401 Merge development 2018-08-16 15:10:12 -07: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
2f2582a0da Merge development 2018-08-14 14:21:47 -07:00
Jacob Evans
ca4905c343
Rename from SignerProviderType.EthSign to SignerType.Default 2018-08-11 18:27:21 +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
Alex Browne
6e2e658162
Update TypeScript to version 2.9.2 2018-08-08 11:27:38 -07:00