Small changes

This commit is contained in:
2025-09-12 20:18:27 +02:00
parent 91d97bdf17
commit 25e6149917
2 changed files with 3 additions and 29 deletions

File diff suppressed because one or more lines are too long

View File

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