Skip to content

Commit

Permalink
feat: fix the last compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed May 15, 2024
1 parent 37b7ade commit ca42640
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion evm/test/CatalystRouter/GasProfiling/localswap.gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract TestRouterLocalswapProfile is TestCommon {
}

function test_profile_localswap() external {
(address fromVault, address toVault) = pool1();
(address fromVault, ) = pool1();
address fromAsset = ICatalystV1Vault(fromVault)._tokenIndexing(0);
address toAsset = ICatalystV1Vault(fromVault)._tokenIndexing(1);

Expand Down
3 changes: 0 additions & 3 deletions evm/test/CatalystVault/SecurityLimit.ReceiveLiquidity.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ abstract contract TestSecurityLimitLiquiditySwap is TestCommon, AVaultInterfaces
true
);

uint256 target_token_index = 0;
address target_token = ICatalystV1Vault(vault)._tokenIndexing(target_token_index);

bytes memory fake_payload = constructSendLiquidity(vault, vault, toAccount, units);

fake_payload = addGARPContext(keccak256(fake_payload), address(CCI), address(CCI), fake_payload);
Expand Down
2 changes: 1 addition & 1 deletion evm/test/CatalystVault/Withdraw/WithdrawNothing.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function queryWeightsSum(ICatalystV1Vault vault) view returns (uint256 weightsSu
}
}

function getEvenWithdrawRatios(uint256 assetCount) returns (uint256[] memory) {
function getEvenWithdrawRatios(uint256 assetCount) view returns (uint256[] memory) {

uint256[] memory ratios = new uint256[](assetCount);

Expand Down
16 changes: 7 additions & 9 deletions evm/test/CatalystVault/Withdraw/WithdrawUnbalanced.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ import { AVaultInterfaces } from "test/CatalystVault/AVaultInterfaces.t.sol";
import { TestInvariant } from "test/CatalystVault/Invariant.t.sol";


function queryAssetCount(ICatalystV1Vault vault) view returns (uint256) {
uint256 tokenCount = 0;
for (uint256 i; true; i++) {
function queryAssetCount(ICatalystV1Vault vault) view returns (uint256 tokenCount) {
for (uint256 i; true; ++i) {
address token = vault._tokenIndexing(i);
if (token == address(0)) return tokenCount;
else tokenCount += 1;
tokenCount += 1;
}
}

function queryWeightsSum(ICatalystV1Vault vault) view returns (uint256) {
uint256 weightsSum = 0;
for (uint256 i; true; i++) {
function queryWeightsSum(ICatalystV1Vault vault) view returns (uint256 weightsSum) {
for (uint256 i; true; ++i) {
uint256 weight = vault._weight(vault._tokenIndexing(i));
if (weight == 0) return weightsSum;
else weightsSum += weight;
weightsSum += weight;
}
}

Expand Down Expand Up @@ -67,7 +65,7 @@ abstract contract TestWithdrawUnbalanced is TestCommon, AVaultInterfaces {
function calculateExpectedEqualWithdrawal(
ICatalystV1Vault vault,
uint256 withdrawAmount
) private returns (uint256[] memory) {
) view private returns (uint256[] memory) {

uint256 totalSupply = Token(address(vault)).totalSupply();
uint256[] memory vaultBalances = queryVaultBalances(vault);
Expand Down

0 comments on commit ca42640

Please sign in to comment.