-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #435 from push-protocol/fix-reviews-on-staking
Fix reviews on staking
- Loading branch information
Showing
8 changed files
with
190 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,45 @@ | ||
pragma solidity ^0.8.20; | ||
|
||
import { StakingTypes, GenericTypes } from "../libraries/DataTypes.sol"; | ||
import { StakingTypes } from "../libraries/DataTypes.sol"; | ||
|
||
contract PushStakingStorage { | ||
/** | ||
* Staking V2 state variables * | ||
*/ | ||
mapping(address => uint256) public usersRewardsClaimed; | ||
|
||
//State variables for Stakers | ||
uint256 public genesisEpoch; // Block number at which Stakig starts | ||
uint256 lastEpochInitialized; // The last EPOCH ID initialized with the respective epoch rewards | ||
uint256 lastTotalStakeEpochInitialized; // The last EPOCH ID initialized with the respective total staked weight | ||
uint256 public previouslySetEpochRewards; // Amount of rewards set in last initialized epoch | ||
uint256 public totalStakedAmount; // Total token weight staked in Protocol at any given time | ||
|
||
// State variables for Share holders | ||
uint256 walletLastEpochInitialized; // todo new variable | ||
uint256 walletLastTotalStakeEpochInitialized;//todo new variable | ||
uint256 public totalStakedAmount; // Total token weight staked in Protocol at any given time | ||
uint256 public previouslySetEpochRewards; // Amount of rewards set in last initialized epoch | ||
uint256 public walletPreviouslySetEpochRewards; //todo new variable | ||
uint256 public constant epochDuration = 21 * 7156; // 21 * number of blocks per day(7156) ~ 20 day approx | ||
uint256 public WALLET_TOTAL_SHARES; //Total Shares | ||
|
||
uint256 public constant epochDuration = 21 * 7156; // 21 * number of blocks per day(7156) ~ 20 day approx | ||
address public pushChannelAdmin; | ||
address public PUSH_TOKEN_ADDRESS; | ||
address public governance; | ||
address public core; | ||
address public FOUNDATION; | ||
|
||
//Mappings for Stakers | ||
///@notice stores total rewards claimed by a user | ||
mapping(address => uint256) public usersRewardsClaimed; | ||
/// @notice Stores all the individual epoch rewards for stakers | ||
mapping(uint256 => uint256) public epochRewardsForStakers; | ||
/// @notice Stores all the individual epoch rewards for Wallet share holders | ||
mapping(uint256 => uint256) public epochRewardsForWallets; | ||
/// @notice Stores User's Fees Details | ||
mapping(address => StakingTypes.UserFeesInfo) public userFeesInfo; | ||
///@notice stores Wallet share details for a given address | ||
mapping(address => StakingTypes.WalletShareInfo) public walletShareInfo; | ||
/// @notice Stores the total staked weight at a specific epoch. | ||
mapping(uint256 => uint256) public epochToTotalStakedWeight; | ||
|
||
//Mappings for Share Holders | ||
///@notice stores total reward claimed by a wallet | ||
mapping(address => uint256) public walletRewardsClaimed; | ||
/// @notice Stores all the individual epoch rewards for Wallet share holders | ||
mapping(uint256 => uint256) public epochRewardsForWallets; | ||
///@notice stores Wallet share details for a given address | ||
mapping(address => StakingTypes.WalletShareInfo) public walletShareInfo; | ||
///@notice stores the total shares in a specific epoch | ||
mapping(uint256 => uint256) public epochToTotalShares; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.