Skip to content

Commit

Permalink
fix: develop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTimepunk committed Jun 10, 2024
1 parent 21c47f0 commit 40220a5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/crosschain-liquidity/1inch/OneInchValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ contract OneInchValidator {
}
/// @dev decodes the generic router call
else if (selector == IAggregationRouterV6.swap.selector) {
(, IAggregationRouterV6.SwapDescription memory swapDescription, bytes memory extCallData) =
(, IAggregationRouterV6.SwapDescription memory swapDescription,) =
abi.decode(_parseCallData(txData_), (IAggregationExecutor, IAggregationRouterV6.SwapDescription, bytes));

fromToken = address(swapDescription.srcToken);
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/DeBridgeMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract DeBridgeMock is Test {
payable
returns (bytes32)
{
(address from, uint256 fromChainId, uint256 toChainId) = abi.decode(_metadata, (address, uint256, uint256));
(, uint256 fromChainId, uint256 toChainId) = abi.decode(_metadata, (address, uint256, uint256));

// vm.selectFork(fromChainId);
// MockERC20(_orderCreation.giveTokenAddress).transferFrom(from, address(this), _orderCreation.giveAmount);
Expand Down
6 changes: 2 additions & 4 deletions test/unit/crosschain-data/extensions/CoreStateRegistry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,7 @@ contract CoreStateRegistryTest is ProtocolActions {

assertEq(realEstimate, defaultEstimate);

uint256 defaultEstimateNativeSrc =
PaymentHelper(getContract(AVAX, "PaymentHelper")).estimateAckCostDefaultNativeSource(false, ambIds_, ETH);
PaymentHelper(getContract(AVAX, "PaymentHelper")).estimateAckCostDefaultNativeSource(false, ambIds_, ETH);
}

function test_estimateWithNativeTokenPriceAsZero() public {
Expand Down Expand Up @@ -731,8 +730,7 @@ contract CoreStateRegistryTest is ProtocolActions {

assertLe(realEstimate, defaultEstimate);

uint256 defaultEstimateNativeSrc =
PaymentHelper(getContract(AVAX, "PaymentHelper")).estimateAckCostDefaultNativeSource(true, ambIds_, ETH);
PaymentHelper(getContract(AVAX, "PaymentHelper")).estimateAckCostDefaultNativeSource(true, ambIds_, ETH);
}

/*///////////////////////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions test/unit/libraries/ArrayCastLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ contract ArrayCastLibTest is Test {
arrayCastLib = new ArrayCastLibUser();
}

function test_castLiqRequestToArray() external {
function test_castLiqRequestToArray() public view {
LiqRequest memory req = LiqRequest("", address(0), address(0), 1, 1, 1 wei);

LiqRequest[] memory castedReq = arrayCastLib.castLiqRequestToArray(req);
assertEq(castedReq.length, 1);
}

function test_castBoolToArray() external {
function test_castBoolToArray() public view {
bool value = true;
bool[] memory castedValue = arrayCastLib.castBoolToArray(value);
assertEq(castedValue.length, 1);
}

function test_castToMultiVaultData() external {
function test_castToMultiVaultData() public view {
InitSingleVaultData memory data = InitSingleVaultData(
1, 1, 1e18, 1e18, 100, LiqRequest(bytes(""), address(0), address(0), 1, 1, 0), true, true, address(0), ""
);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/libraries/DataLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract DataLibTest is Test {
dataLib = new DataLibUser();
}

function test_packSuperform() external {
function test_packSuperform() public view {
/// generates the exp superform id with shift
uint256 superformId = _legacySuperformPackWithShift();

Expand Down
2 changes: 1 addition & 1 deletion test/unit/libraries/ProofLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract ProofLibTest is Test {
proofLib = new ProofLibUser();
}

function test_castLiqRequestToArray() external {
function test_castLiqRequestToArray() public view {
AMBMessage memory message = AMBMessage(1, "");

bytes memory msgBytes = abi.encode(message);
Expand Down

0 comments on commit 40220a5

Please sign in to comment.