41 Commits

Author SHA1 Message Date
Jacob Evans
ad8caa2b51
Remove moved RevertErrors 2019-11-27 11:52:14 +11:00
F. Eugene Aumson
f11d8a5bd8
@0x/order-utils refactors for v3: orderParsingUtils, signatureUtils, orderHashUtils, RevertErrors, transactionHashUtils (#2321)
* move orderParsingUtils from order-utils to connect

* Remove many functions from signatureUtils

Removed from the exported object, that is.  All of them are used in
other existing code, so they were all moved to be as local to their
usage as possible.

* remove orderHashUtils.isValidOrderHash()

* Move all *RevertErrors from order-utils...

...into their respective @0x/contracts- packages.

* Refactor @0x/order-utils' orderHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed getOrderHash()
method in DevUtils.

* Move all *RevertErrors from @0x/utils...

...into their respective @0x/contracts- packages.

* rm transactionHashUtils.isValidTransactionHash()

* DevUtils.sol: Fail yarn test if too big to deploy

* Refactor @0x/order-utils transactionHashUtils away

- Move existing routines into @0x/contracts-test-utils

- Migrate non-contract-test callers to a newly-exposed
getTransactionHash() method in DevUtils.

* Consolidate `Removed export...` CHANGELOG entries

* Rm EthBalanceChecker from devutils wrapper exports

* Stop importing from '.' or '.../src'

* fix builds

* fix prettier; dangling promise

* increase max bundle size
2019-11-14 17:14:24 -05:00
Xianny
f0d7d10fe7
update abi-gen with new method interfaces (#2325)
* update abi-gen with new method interfaces

* wip: get all packages to build

* wip: get all packages to build

* Fix two contract wrapper calls

* Export necessary types part of the contract wrapper public interfaces

* Revive and fix wrapper_unit_tests

* Remove duplicate type

* Fix lib_exchange_rich_error_decoder tests

* Fix remaining test failures in contracts-* packages

* Prettier fixes

* remove transactionHelper

* lint and update changelogs

* Fix prettier

* Revert changes to reference docs

* Add back changelog already published and add revert changelog entry

* Add missing CHANGELOG entries

* Add missing comma

* Update mesh-rpc-client dep

* Update Mesh RPC logic in @0x/orderbook to v6.0.1-beta

* Align package versions
2019-11-14 11:22:29 -05:00
Amir Bandeali
d90810d127 Add tests for setting operator share to 100% 2019-11-12 22:42:55 -08:00
fabioberger
fc824b8d06 Fix prettier issues 2019-11-12 11:35:34 +00:00
fabioberger
6324a92ec5 Refactor contracts-* exports so none in test dir so npmignore works as intended 2019-11-11 21:49:29 +00:00
Greg Hysen
b3c7ccec57 Changed nextPoolId to lastPoolId 2019-10-08 10:43:18 +09:00
Greg Hysen
a0f5a8b64b Simplify Makers Interactions with Staking Pools.
- No longer an upper limit on how many makers can be in a pool.
- No longer a handshake for a maker to join a pool.
- No longer any special powers given to makers.
- Pool Id starts at 1 and increments by 1.
2019-10-08 06:00:24 +09:00
Alex Towle
a6af3744e2 @0x:contracts-staking Improved the test coverage of MixinStakingPool 2019-09-24 16:49:34 -07:00
Amir Bandeali
1acd8d9577 Make _poolJoinedByMakerAddress internal 2019-09-24 13:36:54 -07:00
Amir Bandeali
8aa302f6fc Update OnlyCallableByPoolOperatorOrMakerError params and address PR feedback 2019-09-24 13:36:54 -07:00
Amir Bandeali
50b02a4a55 Add more pool tests 2019-09-24 13:36:54 -07:00
Amir Bandeali
7f1afb57b0 Consolidate MixinStakingPool, MixinStakingPoolMakers, and MixinStakingPoolModifiers 2019-09-24 13:36:54 -07:00
Greg Hysen
768387fea9 Rebased and addressed PR comments 2019-09-17 17:37:12 -07:00
Amir Bandeali
fd4141e1f3 Fix build 2019-09-16 22:50:11 -07:00
Lawrence Forman
f45ee486e9 @0x/contracts-staking: Rebase against 3.0 AGAIN AGAIN AGAIN AGAIN AGAIN 2019-09-10 00:45:20 -04:00
Lawrence Forman
2ed39cd18d @0x/contracts-staking: Rename Tuned event to ParamsChanged.
`@0x/contracts-staking`: Merge `exchange_fees` unit tests into `protocol_fees` unit tests.
`@0x/contracts-staking`: Remove `ProtocolFeeActor` and any use of it.
`@0x/contracts-staking`: Remove unused constants.
`@0x/contracts-staking`: Move WETH assertion constructor into `MixinDeploymentConstants`.
`@0x/contracts-staking`: Add more unit tests.
2019-09-10 00:32:43 -04:00
Lawrence Forman
89bd42de04 @0x/contracts-staking: Fix linter errors. 2019-09-10 00:32:43 -04:00
Lawrence Forman
51b460d432 @0x/contracts-staking: Rebase against 3.0 2019-09-10 00:32:43 -04:00
Lawrence Forman
0cc94bcf19 @0x/contracts-staking: Add maximumMakersInPool hyper parameter.
`@0x/contracts-staking`: Add assertions against `maximumMakersInPool` and `rewardDelegatedStakeWeight`.
`@0x/contracts-staking`: Rebase against 3.0 (again).
2019-09-10 00:31:24 -04:00
Michael Zhu
6f1f226ed0 Use storage pointer to update Pool structs, test decreaseStakingPoolOperatorShare where newOperatorShare == oldOperatorShare 2019-09-09 17:11:00 -07:00
Michael Zhu
1d6406bbd6 move operator from staking logic to vault, allow operator to decrease operatorShare 2019-09-09 16:29:19 -07:00
Michael Zhu
6d83b2676e rip staking_wrapper.ts, use wrapped staking proxy pattern instead 2019-09-09 15:47:15 -07:00
Alex Towle
2fdd4e9760 @0x:contracts-staking Addressed some review comments 2019-09-09 10:25:19 -07:00
Michael Zhu
86a28f0d19 New logic for makers joining pools 2019-09-06 16:09:35 -07:00
Lawrence Forman
9bbbaadcf8 @0x/conracts-staking: Fix idiotic linter error. 2019-09-04 20:18:55 -04:00
Lawrence Forman
19f44fac1e @0x/contracts-staking: Reformulate cobb-douglas to be more efficient.
`@0x/contracts-staking`: Remove some unecessary asserts.
`@0x/contracts-staking`: Fix some broken test assertions.
`@0x/contracts-staking`: Generate better random values in tests.
`@0x/contracts-staking`: Rename `PPM_ONE` constant to `PPM_DENOMINATOR`.
`@0x/contracts-staking`: Minor solidity code improvements.
`@0x/contracts-staking`: Use more constants from `@0x/contracts-test-utils` in tests.
2019-09-04 20:18:55 -04:00
Lawrence Forman
8d5e28f099 @0x/contracts-staking: Change the way operator stake is computed.
`@0x/contracts-staking`: Denominate pool operator shares in parts-per-million.
`@0x/contracts-staking`: Update tests for new stake computation and higher precision math.
`@0x/contracts-staking`: Add `setCobbDouglasAlpha()` function.
2019-09-04 20:18:55 -04:00
Michael Zhu
6827ebfb78 blockchainTests.only -> blockchainTests 2019-08-26 15:58:31 -07:00
Michael Zhu
2c15b3f9bd remove staking RevertReasons from TS types, ExchangeAlreadyRegisteredError -> ExchangeAddressAlreadyRegisteredError 2019-08-26 15:49:09 -07:00
Michael Zhu
0d5e037081 use mocha extensions in staking tests 2019-08-26 15:49:09 -07:00
Michael Zhu
dbda3a04b2 update tests to use RichErrors 2019-08-26 15:49:09 -07:00
Greg Hysen
cd14d1ef0f ran prettier 2019-08-21 13:04:19 -07:00
Greg Hysen
44c44a2b9c Some renaming pool -> staking pool for readability 2019-08-21 13:04:18 -07:00
Greg Hysen
ab3246cc71 Cleaned up staking pool mixin 2019-08-21 13:04:17 -07:00
Greg Hysen
5147b6e699 fixing linter errors 2019-08-21 13:04:16 -07:00
Greg Hysen
9294bf40a7 Ran yarn fix 2019-08-21 13:04:16 -07:00
Greg Hysen
a02f96c913 ran prettier 2019-08-21 13:04:16 -07:00
Greg Hysen
8a2df9cd1f Working on simulation to make it easier to follow the end-to-end tests. Mostly working. 2019-08-21 13:04:16 -07:00
Greg Hysen
74d9891e06 actors for maker / pool operator + comprehensive test cases 2019-08-21 13:04:16 -07:00
Greg Hysen
e0ff859e0d Separated test files out for readability 2019-08-21 13:04:15 -07:00