From 7c4bbb59bb6afed99a28965680181ba466e45846 Mon Sep 17 00:00:00 2001 From: hudsonhrh Date: Thu, 6 Mar 2025 16:31:13 -0600 Subject: [PATCH] updated ragequit logic no shares --- scripts/DeployHamzaVault.s.sol | 2 +- src/CustomBaal.sol | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/DeployHamzaVault.s.sol b/scripts/DeployHamzaVault.s.sol index a356ee4..fde09a5 100644 --- a/scripts/DeployHamzaVault.s.sol +++ b/scripts/DeployHamzaVault.s.sol @@ -38,7 +38,7 @@ contract DeployHamzaVault is Script { using stdJson for string; // (A) Deployed BaalSummoner on Sepolia - address constant BAAL_SUMMONER = 0x65CA4517569D468D786Cb9fAE6c78aED2F244985; + address constant BAAL_SUMMONER = 0xDf9493E0AB228F6b807F5100EfC34B8E031ef8bf; // Key addresses & params address public OWNER_ONE; diff --git a/src/CustomBaal.sol b/src/CustomBaal.sol index 8ccb6de..2da76a2 100644 --- a/src/CustomBaal.sol +++ b/src/CustomBaal.sol @@ -654,8 +654,8 @@ contract CustomBaal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, Ba if (communityVault != address(0)) { uint256 vaultLootBalance = lootToken.balanceOf(communityVault); uint256 vaultSharesBalance = sharesToken.balanceOf(communityVault); - adjustedTotalSupply = _totalSupply > (vaultLootBalance + vaultSharesBalance) - ? _totalSupply - (vaultLootBalance + vaultSharesBalance) + adjustedTotalSupply = _totalSupply > (vaultLootBalance) + ? _totalSupply - (vaultLootBalance) : 1; // Avoid division by zero } @@ -1018,7 +1018,7 @@ contract CustomBaal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, Ba /// @notice Helper to check total supply of loot and shares function totalSupply() public view returns (uint256) { - return totalLoot() + totalShares(); + return totalLoot(); } /***************