314 Commits

Author SHA1 Message Date
Amir Bandeali
1885957bd3 Update tests to start at epoch 1 2019-10-21 22:27:06 -07:00
Lawrence Forman
c7ca625408 @0x/contracts-staking: Fix MixinStake unit tests typo. 2019-10-18 10:45:07 -04:00
Lawrence Forman
e46f51339a @0x/contracts-staking: Address review comments. 2019-10-18 10:42:47 -04:00
Lawrence Forman
008938cf5b @0x/contracts-staking: Check order of increase and derease balance operations in MixinStake unit tests. 2019-10-17 14:09:46 +10:00
Lawrence Forman
b793a31cdd @0x/contracts-staking: Create MixinStake unit tests. 2019-10-16 22:53:36 +10: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
ce6c05637f Update cumulative rewards tracking tests 2019-10-13 17:31:55 +09:00
Lawrence Forman
9f6d113fe8
Merge pull request #2255 from 0xProject/fix/3.0-audit/staking/LibFixedMath-arithmetic-overflows
Fix LibFixedMath arithmetic overflows
2019-10-12 07:38:05 +09:00
Greg Hysen
361576814c Removed loadSyncedBalance and loadUnsyncedBalance 2019-10-10 15:51:24 +09:00
Lawrence Forman
22fc0b4337 @0x/contracts-staking: Add another LibFixedMath.add() test. 2019-10-10 09:31:53 +09:00
Lawrence Forman
063d6ff24e @0x/contracts-staking: Add more overflow safeguards to LibFixedMath. 2019-10-10 09:16:01 +09:00
Lawrence Forman
a42f3d189c @0x/contracts-staking: Implement better overflow detection in LibFixedMath. 2019-10-10 09:16:01 +09:00
Amir Bandeali
93edb083fa Remove payable fallback from IStakingProxy, fix linting errors 2019-10-09 17:27:37 +09: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
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
Amir Bandeali
aa198ad15f Add tests for adding/removing an exchange called by owner 2019-09-30 17:42:25 -07: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
Alex Towle
aa7f082d56 @0x:contracts-staking Addressed review comments 2019-09-25 16:48:34 -07:00
Alex Towle
b178d025b5 @0x:contracts-staking Added unit tests for MixinExchangeManager 2019-09-25 15:32:02 -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
Lawrence Forman
f925c35344 @0x/contracts-staking: Always do _withdrawAndSyncDelegatorRewards() before staking operations and always add a CR (if unset) in _withdrawSyncDelegatorRewards()`. 2019-09-25 16:34:06 -04:00
Lawrence Forman
5b77e2c8ac @0x/contracts-staking: Fix stake accounting. 2019-09-25 15:29:22 -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
c1871b5bca Fix xumulative reward tests 2019-09-24 23:01:44 -07:00
Amir Bandeali
4784131dca
Merge pull request #2203 from 0xProject/feat/3.0/consolidate-rich-reverts
Cleanup rich reverts
2019-09-24 18:32:41 -07:00
Amir Bandeali
57f5b12e24 Cleanup rich reverts 2019-09-24 18:13:37 -07:00
Alex Towle
b62486923f @0x:contracts-staking Removed storage assertions from Staking and moved them to a test contract 2019-09-24 18:12:00 -07:00
Alex Towle
a6af3744e2 @0x:contracts-staking Improved the test coverage of MixinStakingPool 2019-09-24 16:49:34 -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
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
a7aa7feff4 Remove getAvailableRewardsBalance public function, make wethReservedForPoolRewards public 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
Amir Bandeali
0bc4b50818 Add codesize tests 2019-09-24 13:36:54 -07:00
Greg Hysen
a012eb0cae Updated changelog and ran prettier 2019-09-24 13:32:20 -07:00
Greg Hysen
08c805a489 Removed explicit dependency for delegator on the next epoch after staking. 2019-09-24 13:32:20 -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