155 Commits

Author SHA1 Message Date
Alex Towle
4e50b9b479 @0x:contracts-integrations Refactored match_orders_test 2019-11-18 17:56:07 -08:00
Alex Towle
f8b7b8cc28 @0x:contracts-integrations Made an initial refactor of MatchOrderTester 2019-11-18 17:56:07 -08: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
fabioberger
30d54407e6 Fix remaining imports 2019-11-12 10:13:25 +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
fabioberger
86b76a3e75 Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages 2019-11-11 15:10:15 +00:00
Greg Hysen
3a1c464543 Readability improvements to Staking Proxy unit tests + one extra case 2019-11-01 09:59:17 -07:00
Amir Bandeali
f246314b1d Update default alpha from 1/2 to 2/3 2019-10-27 16:53:57 -07:00
Amir Bandeali
33a0c22021 Remove tests related to read-only mode 2019-10-27 11:12:22 -07:00
Greg Hysen
cc7452da8f Replaced protocolFeePaid -> protocolFeeAmount. Changed some wording in comments. 2019-10-24 15:58:18 -07:00
Greg Hysen
6617ad9531 Refactored finalization state.
1. Removes state variables:
   - totalWeightedStakeThisEpoch
   - totalFeesCollectedThisEpoch
   - numActivePoolsThisEpoch

2. No longer indexes by epoch % 2

3. Renamed event StakingPoolActivated → StakingPoolEarnedRewards.

4. Renamed structs:
   - ActivePool → PoolStats. This holds stats for a pool that earned rewards.
   - UnfinalizedState → AggregatedStats. This aggregates stats from the former struct.
2019-10-22 11:02:25 -07:00
Amir Bandeali
1885957bd3 Update tests to start at epoch 1 2019-10-21 22:27:06 -07:00
Lawrence Forman
54a03eacd6 @0x/contracts-staking: Refactor MixinCumulativeRewards and MixinStakingPoolRewards to better encapsulate cumulative rewards.
`@0x/contracts-staking`: Make sure we don't overwrite an existing CR.
`@0x/contracts-staking`: Remove the need to initialize cumulative rewards when creating a pool.
`@0x/contracts-staking`: Just return an empty CR in `_getCumulativeRewardAtEpoch()` if one can't be found.
2019-10-14 12:36:26 +10:00
Amir Bandeali
9e41c648dc Add backstop tests 2019-10-09 17:27:37 +09:00
Amir Bandeali
681e6eab7a Cleanup language used in comments and variable names 2019-10-09 17:15:25 +09:00
Amir Bandeali
701b203c58 Fix tests 2019-10-09 17:15:25 +09:00
Amir Bandeali
aa0a1bb54d Fix tests to no longer utilize active stake 2019-10-09 17:15:25 +09:00
Amir Bandeali
43399a9ad9 Refactor tests to use new getters 2019-10-09 17:15:25 +09:00
Amir Bandeali
2ef546210d Update tests to reflect new withdrawal logic 2019-10-09 17:15:25 +09:00
Amir Bandeali
f8ac986a0f Remove unused struct field 2019-10-09 17:14:28 +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
Amir Bandeali
745da8e363 Fix tests 2019-09-30 17:36:37 -07:00
Amir Bandeali
a5692690dc Fix protocol fees tests 2019-09-30 09:37:57 -07:00
Michael Zhu
6cfc17de35 MixinStakeStorage unit tests 2019-09-27 13:01:20 -07:00
Lawrence Forman
96c8da9fdd
Merge pull request #2207 from 0xProject/fix/3.0/improve-readability
Improve readability, fix `_trySetCumulativeReward` logic
2019-09-25 17:14:06 -04:00
Amir Bandeali
4440075425 Inline _forceSetMostRecentCumulativeRewardEpoch 2019-09-25 11:03:26 -07:00
Michael Zhu
dc06497cae consolidate MixinVaultCore and ZrxVault 2019-09-24 23:04:17 -07:00
Amir Bandeali
6d7bf12ade Make wethAssetProxy and zrxVault deployment constants 2019-09-24 16:19:53 -07:00
Amir Bandeali
0c5f0271c7
Merge pull request #2190 from 0xProject/feat/3.0/consolidate-pool-mixins
Consolidate staking pool mixins
2019-09-24 14:00:28 -07:00
Amir Bandeali
a7aa7feff4 Remove getAvailableRewardsBalance public function, make wethReservedForPoolRewards public 2019-09-24 13:36:54 -07:00
Greg Hysen
5b595dd080 Remove reference counting for cumulative rewards 2019-09-24 13:32:20 -07:00
Amir Bandeali
abb2b46ed3 Remove vaults from variable names and comments 2019-09-23 17:37:04 -07:00
Amir Bandeali
ef645e601c Fix all tests except for reward tests (skipped) 2019-09-23 15:30:55 -07:00
Lawrence Forman
3883297991 @0x/contracts-staking: Remove getTotalBalance() function.
`@0x/contracts-staking`: Fix linter errors.
2019-09-23 14:21:18 -04:00
Lawrence Forman
eac4520406 @0x/contracts-staking: Rebase against 3.0 2019-09-22 13:11:42 -04:00
Lawrence Forman
c72a15b488 @0x/contracts-staking: All tests back up and running. 2019-09-22 12:20:42 -04:00
Lawrence Forman
6a29654d7d @0x/contracts-staking: Updating tests and making the contracts testable. 2019-09-22 12:20:04 -04:00
Lawrence Forman
3ad7728a0e @0x/contracts-staking: Remove IStructs.CumulativeRewardInfo, etc.
`@0x/contracts-staking`: Convert all rewards to WETH.
`@0x/contracts-staking`: Style changes.
`@0x/contracts-staking`: Address misc. review comments.
`@0x/contracts-staking`: Make `LibFractions` scaling a separate step.
2019-09-22 12:17:05 -04:00
Lawrence Forman
86106713dd @0x/contracts-staking: Gag! All tests passing? 2019-09-22 12:13:24 -04:00
Lawrence Forman
b43fa88606 @0x/contracts-staking: All tests but rewards_test working. 2019-09-22 12:13:24 -04:00
Lawrence Forman
d33080cf08 @0x/contracts-staking: Finalizer tests passing. 2019-09-22 12:11:47 -04:00
Lawrence Forman
993f05d5ac @0x/contracts-staking: Fixing tests. 2019-09-22 12:11:47 -04:00
Lawrence Forman
7ef3c12722 @0x/contracts-staking: Well, it almost worked. 2019-09-22 12:10:41 -04:00
Lawrence Forman
d548ddac0d @0x/contracts-staking: Fixing tests. 2019-09-22 12:07:46 -04:00
Amir Bandeali
522994262d Update tests 2019-09-20 16:55:30 -07:00
Michael Zhu
49d223f344 MixinVaultCore unit tests 2019-09-20 16:02:54 -07:00
Michael Zhu
f7462c9f2b keep track of globalStakeByStatus + tests 2019-09-18 10:09:45 -07:00
Greg Hysen
768387fea9 Rebased and addressed PR comments 2019-09-17 17:37:12 -07:00
Greg Hysen
be1a70c461 refactored the staking vault 2019-09-17 17:36:46 -07:00
Amir Bandeali
94738444de Fix build an tests 2019-09-17 09:41:27 -07:00