Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New staking v3 dev #429

Draft
wants to merge 56 commits into
base: pushContracts-v3.0-dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3e69152
Add separate staking contracts
Zartaj0 Sep 30, 2024
373fbc3
separate interface for interactions
Zartaj0 Sep 30, 2024
4375c5a
minor updates for compatibility
Zartaj0 Sep 30, 2024
d6f5c6c
reverting the changes done for OZ-V5
Zartaj0 Sep 30, 2024
8bd9f10
changes in core/removal of staking
Zartaj0 Sep 30, 2024
d9da740
minor changes in test files
Zartaj0 Sep 30, 2024
0b7e9b1
compilation successful
Zartaj0 Oct 1, 2024
4bd70df
fix errors
Zartaj0 Oct 1, 2024
b2c61c4
Changes in core
Zartaj0 Oct 4, 2024
701e848
changes in staking
Zartaj0 Oct 4, 2024
9ee87cb
test addition
Zartaj0 Oct 4, 2024
6c52596
additional fixes for failing tests
Zartaj0 Oct 4, 2024
cb79c80
fixes
Zartaj0 Oct 6, 2024
9d783fc
updates for claim
Zartaj0 Oct 7, 2024
c188eed
updates
Zartaj0 Oct 7, 2024
5936ac1
fix claim
Zartaj0 Oct 8, 2024
e6d1cb9
fix miss
Zartaj0 Oct 8, 2024
25715ca
fix failing CCR tests
Zartaj0 Oct 8, 2024
1e3f695
tests working
Zartaj0 Oct 8, 2024
24f7217
Foundation can claim
Zartaj0 Oct 14, 2024
4ea9724
refactor: modified the tests structure for separate staking modules
0xNilesh Oct 15, 2024
3a47493
refactor: added share invariants
0xNilesh Oct 15, 2024
ef3988d
Fix epochToTotal Update issue
Zartaj0 Oct 16, 2024
db66d05
walletShare being 0 test pass
Zartaj0 Oct 16, 2024
1cc73fc
test: added invariants for unit tests
0xNilesh Oct 17, 2024
5e692b1
test: added test cases for addWalletShares
0xNilesh Oct 17, 2024
46c3677
test: added test cases for removeWalletShares
0xNilesh Oct 17, 2024
93272fb
test: added wallet staking events
0xNilesh Oct 17, 2024
bd7500e
ci: merge branch 'new-staking-v3-dev' into tests/staking-v3
0xNilesh Oct 17, 2024
afb5b13
test: created test files for decrease and rewards claims
0xNilesh Oct 17, 2024
cc2cefd
test: commenting token staking and wallet staking test
0xNilesh Oct 17, 2024
7955797
Merge pull request #431 from push-protocol/tests/staking-v3
0xNilesh Oct 17, 2024
eaeb479
medium issues and test fixes
Zartaj0 Oct 17, 2024
0fdeba7
add claim test and minor updates
Zartaj0 Oct 17, 2024
73e42d1
fmt and add a test
Zartaj0 Oct 17, 2024
befbca4
tests: Added decreaseWalletShares test cases
0xNilesh Oct 18, 2024
ac59202
Merge pull request #432 from push-protocol/tests/staking-v3
0xNilesh Oct 18, 2024
746cde9
Merge pull request #433 from push-protocol/test/add-claim-tests
0xNilesh Oct 18, 2024
e6f1aaa
test: fixed decrease shares test cases
0xNilesh Oct 18, 2024
fd2b17c
fix: fixed low/informationals in wallet staking
0xNilesh Oct 18, 2024
1d1b4fa
add int func for fees distribute
Zartaj0 Oct 18, 2024
488ca94
Merge branch 'new-staking-v3-dev' of https://github.com/ethereum-push…
Zartaj0 Oct 18, 2024
e133c7f
Decimal Percenatage for Splitting
Zartaj0 Oct 24, 2024
9556398
added getTotalFeePool()
zaryab2000 Oct 29, 2024
aff8290
Remove instances of PROTOCOL_POOL_FEES
Zartaj0 Oct 29, 2024
3d78810
Merge branch 'new-staking-v3-dev' of https://github.com/ethereum-push…
Zartaj0 Oct 29, 2024
6167209
added test for split ppol fees
Zartaj0 Oct 30, 2024
2cbf5cd
mark unused staking variables
Zartaj0 Nov 1, 2024
84120ef
improved natspec and storage
Zartaj0 Nov 1, 2024
fb7e16a
fix decrement of shares
Zartaj0 Nov 5, 2024
7140f32
Merge pull request #435 from push-protocol/fix-reviews-on-staking
0xNilesh Nov 11, 2024
c28cf09
fix: Minor Bug fixes wrt non-EVM audit
Zartaj0 Dec 18, 2024
ce5012e
add security contact
Zartaj0 Dec 18, 2024
33e4b26
fix sec link
zaryab2000 Dec 19, 2024
853dc2a
Merge pull request #440 from push-protocol/439-bug-fixes
zaryab2000 Dec 19, 2024
b7bf880
fix delegatation and add test
Zartaj0 Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions contracts/PushComm/EPNSCommAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ pragma solidity ^0.8.20;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

contract EPNSCommAdmin is ProxyAdmin {
constructor(address _pushChannelAdmin) public ProxyAdmin() { }
}
contract EPNSCommAdmin is ProxyAdmin {}
4 changes: 1 addition & 3 deletions contracts/PushCore/EPNSCoreAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ pragma solidity ^0.8.20;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

contract EPNSCoreAdmin is ProxyAdmin {
constructor(address _pushChannelAdmin) public ProxyAdmin() { }
}
contract EPNSCoreAdmin is ProxyAdmin {}
8 changes: 4 additions & 4 deletions contracts/PushCore/PushCoreStorageV1_5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contract PushCoreStorageV1_5 {

address public pushChannelAdmin;
address public governance;
address public daiAddress;
address public STAKING_CONTRACT; //TODO Re-Using Dai's address slot
address public aDaiAddress;
address public WETH_ADDRESS;
address public pushCommunicator;
Expand All @@ -33,14 +33,14 @@ contract PushCoreStorageV1_5 {
uint256 public channelsCount;

/// @notice Helper Variables for FSRatio Calculation | GROUPS = CHANNELS -> NOT IN USE
uint256 public groupNormalizedWeight;
uint256 public groupHistoricalZ;
uint256 public HOLDER_FEE_POOL;//TODO Re-Using groupNormalizedWeight slot
uint256 public WALLET_FEE_POOL; //TODO Re-Using groupHistoricalZ slot
uint256 public groupLastUpdate;
uint256 public groupFairShareCount;

/// @notice Necessary variables for Keeping track of Funds and Fees
uint256 public CHANNEL_POOL_FUNDS;
uint256 public PROTOCOL_POOL_FEES;
uint256 public PROTOCOL_POOL_FEES; //unused storage
uint256 public ADD_CHANNEL_MIN_FEES;
uint256 public FEE_AMOUNT;
uint256 public MIN_POOL_CONTRIBUTION;
Expand Down
5 changes: 3 additions & 2 deletions contracts/PushCore/PushCoreStorageV2.sol
Zartaj0 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.8.20;

import { CoreTypes, StakingTypes } from "../libraries/DataTypes.sol";
import { CoreTypes, StakingTypes, GenericTypes } from "../libraries/DataTypes.sol";

contract PushCoreStorageV2 {
/* *** V2 State variables *** */
Expand All @@ -27,7 +27,7 @@ contract PushCoreStorageV2 {
/// @notice Stores all the individual epoch rewards
mapping(uint256 => uint256) public epochRewards;
/// @notice Stores User's Fees Details
mapping(address => StakingTypes.UserFessInfo) public userFeesInfo;
mapping(address => StakingTypes.UserFeesInfo) public userFeesInfo;
/// @notice Stores the total staked weight at a specific epoch.
mapping(uint256 => uint256) public epochToTotalStakedWeight;

Expand All @@ -47,4 +47,5 @@ contract PushCoreStorageV2 {

mapping(bytes32 => CoreTypes.Channel) public channelInfo;
mapping(bytes32 => uint256) public channelUpdateCounter;
GenericTypes.Percentage public SPLIT_PERCENTAGE_FOR_HOLDER;
}
Loading