Skip to content

Commit

Permalink
feat: fix gas optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Feb 22, 2024
1 parent a92176e commit 27bdaf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions evm/src/CatalystVaultVolatile.sol
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ contract CatalystVaultVolatile is CatalystVaultCommon, IntegralsVolatile {
// If the weight has already been reached, skip the mathematics.
if (currentWeight == targetWeight) {
wsum += targetWeight;
unchecked {
++it;
}
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion evm/test/CatalystVault/1Volatile/VolatileOneVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { TestSecurityLimitLiquiditySwap } from "../SecurityLimit.ReceiveLiquidit
import { TestWithdrawEverything } from "../Withdraw/WithdrawEverything.t.sol";
import {Token} from "../../mocks/token.sol";

contract TestVolatileInvariant is TestInvariant, TestLocalswap, TestCrossChainInterfaceOnly, TestLocalswapMinout, TestPoolTokenInterface, TestSetup, TestSetupFinish, TestSetVaultFee, TestSetGovernanceFee, TestSetWeights, TestLocalswapFees, TestSwapWorthlessTokenLocal, TestEscrow, TestWithdrawInvariant, TestWithdrawComparison, TestCompareDepositWithWithdraw, TestWithdrawNothing, TestWithdrawUnbalanced, TestSelfSwap, TestVaultConnections, TestSecurityLimitAssetSwap, TestSecurityLimitLiquiditySwap, TestWithdrawEverything { //,TestEvilRouterExploitVolatile {
contract TestVolatileInvariant is TestInvariant, TestLocalswap, TestCrossChainInterfaceOnly, TestLocalswapMinout, TestPoolTokenInterface, TestSetup, TestSetupFinish, TestSetVaultFee, TestSetGovernanceFee, TestLocalswapFees, TestSwapWorthlessTokenLocal, TestEscrow, TestWithdrawInvariant, TestWithdrawComparison, TestCompareDepositWithWithdraw, TestWithdrawNothing, TestWithdrawUnbalanced, TestSelfSwap, TestVaultConnections, TestSecurityLimitAssetSwap, TestSecurityLimitLiquiditySwap, TestWithdrawEverything, TestSetWeights { // TestEvilRouterExploitVolatile {

address[] _vaults;

Expand Down

0 comments on commit 27bdaf1

Please sign in to comment.