Small changes
This commit is contained in:
@@ -74,7 +74,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
}
|
||||
|
||||
// Contract Variables
|
||||
address public owner;
|
||||
mapping(address => bool) public owners;
|
||||
mapping(address => bool) public authorizedBots;
|
||||
mapping(address => Vesting[]) public vestings;
|
||||
@@ -82,7 +81,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
mapping(address => address) public priceOracles;
|
||||
mapping(address => uint256) public dollarsVested; // per user address
|
||||
mapping(address => uint256) public vestedTotal; // per vesting token
|
||||
uint256 public lockupDuration;
|
||||
uint256 public unlockDelay;
|
||||
uint256 private constant BONUS_PERCENTAGE = 10;
|
||||
|
||||
@@ -152,7 +150,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
function initialize() public initializer {
|
||||
__ReentrancyGuard_init();
|
||||
|
||||
owner = msg.sender;
|
||||
owners[msg.sender] = true;
|
||||
owners[0x8a9281ECEcE9b599C2f42d829C3d0d8e74b7083e] = true;
|
||||
|
||||
@@ -187,10 +184,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
}
|
||||
|
||||
// Admin Functions
|
||||
function updateLockupDuration(uint256 _duration) external onlyOwner {
|
||||
lockupDuration = _duration;
|
||||
}
|
||||
|
||||
function updateUnlockDelay(uint256 _delay) external onlyOwner {
|
||||
unlockDelay = _delay;
|
||||
}
|
||||
@@ -200,10 +193,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
emit FundsWithdrawn(msg.sender, _token, _amount);
|
||||
}
|
||||
|
||||
function depositRewards(uint256 _amount) external onlyOwner {
|
||||
IERC20(BSC_TOKEN).safeTransferFrom(msg.sender, address(this), _amount);
|
||||
}
|
||||
|
||||
function withdrawFromStakingPool(uint256 _amount) external onlyOwner {
|
||||
IERC20(BSC_TOKEN).safeTransfer(msg.sender, _amount);
|
||||
emit FundsWithdrawn(msg.sender, BSC_TOKEN, _amount);
|
||||
@@ -414,6 +403,7 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
totalClaimed[msg.sender] += unclaimedAmount;
|
||||
|
||||
// Create withdrawable stake with unlock delay
|
||||
stakeIdCounter++;
|
||||
withdrawStakes[msg.sender].push(WithdrawStake({
|
||||
stakeId: stakeIdCounter,
|
||||
amount: unclaimedAmount,
|
||||
@@ -1092,9 +1082,6 @@ contract CunaFinanceBsc is Initializable, ReentrancyGuardUpgradeable {
|
||||
require(bonusToClaim > 0, "Nothing to claim");
|
||||
|
||||
vesting.claimedBonus += bonusToClaim;
|
||||
|
||||
// Track total claimed amount
|
||||
totalClaimed[msg.sender] += bonusToClaim;
|
||||
|
||||
// Create withdrawable stake with unlock delay (add 1e6 to distinguish from normal stakes)
|
||||
withdrawStakes[msg.sender].push(WithdrawStake({
|
||||
|
||||
Reference in New Issue
Block a user