477 Commits

Author SHA1 Message Date
Amir Bandeali
1a409c3731 Initialize currentEpoch at 1 instead of 0 2019-10-21 22:27:06 -07:00
Amir Bandeali
7b7c64fc6a Add assertion function that checks if pool was finalized last epoch 2019-10-21 22:27:06 -07:00
Lawrence Forman
d0884dcb4d
Merge pull request #2267 from 0xProject/feat/3.0/staking/MixinStake-unit-tests
Create MixinStake unit tests
2019-10-18 11:41:18 -04: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
Amir Bandeali
caf6329bb3 Merge branch '3.0' into feat/3.0/testnet-migrations 2019-10-17 17:13:12 -07: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
Xianny
0e90b0e7d0
Make wrappers small again (#2243)
* introduce --debug option to abi-gen and remove debug functions from @0x/abi-gen-wrappers
* make evmExecAsync protected; ignore deployedBytecode in doc comment
* trim deployedBytecode so it's undefined unless a contract has pure functions
* remove validateAndSendTransactionAsync
* Create `AwaitTransactionSuccessOpts` and `SendTransactionOpts` types 
* Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback` from `@0x/base-contract`
2019-10-16 09:38:34 -07:00
Lawrence Forman
b793a31cdd @0x/contracts-staking: Create MixinStake unit tests. 2019-10-16 22:53:36 +10:00
Lawrence Forman
a6603d6bd6 @0x/contracts-staking: Fix typo in MixinCumulativeRewards 2019-10-14 15:19:34 +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
9d9fe882b6 Remove unnecessary payable keywords 2019-10-14 09:58:31 +09:00
Amir Bandeali
9a5752fff9 Remove unused param in Pool struct 2019-10-14 09:45:37 +09:00
Amir Bandeali
c21932d149 Remove _creditRewardsToPool and remove return values from finalizePool 2019-10-13 17:31:55 +09:00
Amir Bandeali
ce6c05637f Update cumulative rewards tracking tests 2019-10-13 17:31:55 +09:00
Amir Bandeali
b0699fc238 Always set cumulative rewards when _withdrawAndSyncDelegatorRewards is called 2019-10-13 17:31:55 +09:00
Amir Bandeali
8bf7c4cf48 Remove unnecessary assert 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
Amir Bandeali
7e58385a78 Separate immutable contracts, only inherit as needed 2019-10-10 15:00:35 +09:00
Lawrence Forman
a22ba8647c Update changelogs 2019-10-10 09:41:57 +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
a7ef54dbff Implement ZrxVaultBackstop 2019-10-09 17:27:37 +09:00
Amir Bandeali
414084a7ad Track state of read-only mode in stakingProxy 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
cbd0ca4b60 Make currentEpoch uint64 type, change INACTIVE => UNDELEGATED, and make global balances state a mapping from uin8 => StoredBalance 2019-10-09 17:15:25 +09:00
Amir Bandeali
1626566f93 Change getBalanceOfVault => getBalanceOfZrxVault 2019-10-09 17:15:25 +09:00
Amir Bandeali
ac75053f69 Remove unused rich revert 2019-10-09 17:15:25 +09:00
Amir Bandeali
13afc65b54 Do not store global inactive state 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
2e36c7ef83 Remove ACTIVE state 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
7b379f3933 Simplify withdrawal flow and storage layout 2019-10-09 17:15:25 +09:00
Amir Bandeali
f8ac986a0f Remove unused struct field 2019-10-09 17:14:28 +09:00
Greg Hysz
7ac7f45c4a
Merge pull request #2250 from 0xProject/cleanup/staking/simplifyMakers
Simplify Makers Interactions with Staking Pools
2019-10-08 11:25:07 +09:00
Greg Hysen
b3c7ccec57 Changed nextPoolId to lastPoolId 2019-10-08 10:43:18 +09:00
Lawrence Forman
d3dcf7fb0c
Merge pull request #2247 from 0xProject/fix/3.0-audit/staking/shadowed-variable
fix `_computeUnfinalizedDelegatorReward()` shadowed variable and function mutability
2019-10-07 18:50:32 -05: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
Lawrence Forman
6825eb442b @0x/contracts-staking: Fix shadowed variable in MixinStakingPoolRewards._computeUnfinalizedDelegatorReward() and make the function pure. 2019-10-05 17:22:46 -05:00
Amir Bandeali
6be5552944 fix static tests 2019-10-04 17:17:07 -07:00
Alex Towle
3c6957095d @0x:contracts-integrations Addressed review feedback 2019-10-04 15:42:36 -07:00
Amir Bandeali
ac1063dd68 Merge branch '3.0' into feat/3.0/testnet-migrations 2019-10-03 23:04:07 -07:00
Jacob Evans
c60d1e50c5
Publish
- @0x/contracts-asset-proxy@2.3.0-beta.0
 - @0x/contracts-coordinator@2.1.0-beta.0
 - @0x/contracts-dev-utils@0.1.0-beta.0
 - @0x/contracts-erc1155@1.2.0-beta.0
 - @0x/contracts-erc20@2.3.0-beta.0
 - @0x/contracts-erc721@2.2.0-beta.0
 - @0x/contracts-exchange-forwarder@3.1.0-beta.0
 - @0x/contracts-exchange-libs@3.1.0-beta.0
 - @0x/contracts-exchange@2.2.0-beta.0
 - @0x/contracts-extensions@4.1.0-beta.0
 - @0x/contracts-multisig@3.2.0-beta.0
 - @0x/contracts-staking@1.1.0-beta.0
 - @0x/contracts-test-utils@3.2.0-beta.0
 - @0x/contracts-utils@3.3.0-beta.0
 - 0x.js@7.1.0-beta.0
 - @0x/abi-gen-wrappers@5.4.0-beta.0
 - @0x/abi-gen@4.3.0-beta.0
 - @0x/assert@2.2.0-beta.0
 - @0x/asset-buyer@6.2.0-beta.0
 - @0x/asset-swapper@2.1.0-beta.0
 - @0x/base-contract@5.5.0-beta.0
 - @0x/connect@5.1.0-beta.0
 - @0x/contract-addresses@3.3.0-beta.0
 - @0x/contract-artifacts@2.3.0-beta.0
 - @0x/contract-wrappers@12.2.0-beta.0
 - @0x/contracts-gen@1.1.0-beta.0
 - @0x/dev-utils@2.4.0-beta.0
 - ethereum-types@2.2.0-beta.0
 - @0x/instant@1.0.32
 - @0x/json-schemas@4.1.0-beta.0
 - @0x/migrations@4.4.0-beta.0
 - @0x/monorepo-scripts@1.0.38
 - @0x/order-utils@8.5.0-beta.0
 - @0x/orderbook@0.1.0-beta.0
 - @0x/sol-compiler@3.2.0-beta.0
 - @0x/sol-coverage@3.1.0-beta.0
 - @0x/sol-doc@2.1.0-beta.0
 - @0x/sol-profiler@3.2.0-beta.0
 - @0x/sol-resolver@2.1.0-beta.0
 - @0x/sol-trace@2.1.0-beta.0
 - @0x/sol-tracing-utils@6.1.0-beta.0
 - @0x/sra-spec@2.1.0-beta.0
 - @0x/subproviders@5.1.0-beta.0
 - @0x/testnet-faucets@1.0.88
 - @0x/types@2.5.0-beta.0
 - @0x/typescript-typings@4.4.0-beta.0
 - @0x/utils@4.6.0-beta.0
 - @0x/web3-wrapper@6.1.0-beta.0
2019-10-03 14:10:22 -07:00
Jacob Evans
501f5ad3de
Updated CHANGELOGS & MD docs 2019-10-03 14:10:00 -07:00