diff --git a/src/builder/PaycallWrapper.sol b/src/builder/PaycallWrapper.sol index ff84c05..dab86bf 100644 --- a/src/builder/PaycallWrapper.sol +++ b/src/builder/PaycallWrapper.sol @@ -29,7 +29,7 @@ library PaycallWrapper { scriptAddress: CodeJarHelper.getCodeAddress(paycallSource), scriptCalldata: abi.encodeWithSelector( Paycall.run.selector, operation.scriptAddress, operation.scriptCalldata, maxPaymentCost - ), + ), scriptSources: scriptSources, expiry: operation.expiry }); diff --git a/src/builder/PriceFeeds.sol b/src/builder/PriceFeeds.sol index 54b8b14..42ef17e 100644 --- a/src/builder/PriceFeeds.sol +++ b/src/builder/PriceFeeds.sol @@ -248,9 +248,8 @@ library PriceFeeds { reverse[1] = false; return (path, reverse); } else if ( - Strings - // e.g. IN/ABC and ABC/OUT -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, false] - .stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].baseSymbol) + // e.g. IN/ABC and ABC/OUT -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, false] + Strings.stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].baseSymbol) ) { address[] memory path = new address[](2); bool[] memory reverse = new bool[](2); @@ -260,9 +259,8 @@ library PriceFeeds { reverse[1] = false; return (path, reverse); } else if ( - Strings - // e.g. ABC/IN and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[true, true] - .stringEqIgnoreCase(inputAssetPriceFeeds[i].baseSymbol, outputAssetPriceFeeds[j].quoteSymbol) + // e.g. ABC/IN and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[true, true] + Strings.stringEqIgnoreCase(inputAssetPriceFeeds[i].baseSymbol, outputAssetPriceFeeds[j].quoteSymbol) ) { address[] memory path = new address[](2); bool[] memory reverse = new bool[](2); @@ -272,9 +270,10 @@ library PriceFeeds { reverse[1] = true; return (path, reverse); } else if ( - Strings - // e.g. IN/ABC and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, true] - .stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].quoteSymbol) + // e.g. IN/ABC and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, true] + Strings.stringEqIgnoreCase( + inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].quoteSymbol + ) ) { address[] memory path = new address[](2); bool[] memory reverse = new bool[](2); diff --git a/src/builder/QuotecallWrapper.sol b/src/builder/QuotecallWrapper.sol index 7453e22..fb78370 100644 --- a/src/builder/QuotecallWrapper.sol +++ b/src/builder/QuotecallWrapper.sol @@ -30,7 +30,7 @@ library QuotecallWrapper { scriptAddress: CodeJarHelper.getCodeAddress(quotecallSource), scriptCalldata: abi.encodeWithSelector( Quotecall.run.selector, operation.scriptAddress, operation.scriptCalldata, quotedAmount - ), + ), scriptSources: scriptSources, expiry: operation.expiry }); diff --git a/src/builder/actions/Actions.sol b/src/builder/actions/Actions.sol index 0b86f10..e877a68 100644 --- a/src/builder/actions/Actions.sol +++ b/src/builder/actions/Actions.sol @@ -666,7 +666,7 @@ library Actions { scriptAddress: CodeJarHelper.getCodeAddress(scriptSources[0]), scriptCalldata: CCTP.encodeBridgeUSDC( bridge.srcChainId, bridge.destinationChainId, bridge.amount, bridge.recipient, srcUSDCPositions.asset - ), + ), scriptSources: scriptSources, expiry: bridge.blockTimestamp + BRIDGE_EXPIRY_BUFFER }); @@ -1187,7 +1187,7 @@ library Actions { morpho: MorphoInfo.getMorphoAddress(borrowInput.chainId), morphoMarketId: MorphoInfo.marketId( MorphoInfo.getMarketParams(borrowInput.chainId, borrowInput.collateralAssetSymbol, borrowInput.assetSymbol) - ) + ) }); Action memory action = Actions.Action({ chainId: borrowInput.chainId, @@ -1257,7 +1257,7 @@ library Actions { morpho: MorphoInfo.getMorphoAddress(repayInput.chainId), morphoMarketId: MorphoInfo.marketId( MorphoInfo.getMarketParams(repayInput.chainId, repayInput.collateralAssetSymbol, repayInput.assetSymbol) - ) + ) }); Action memory action = Actions.Action({ @@ -1492,7 +1492,7 @@ library Actions { scriptAddress: CodeJarHelper.getCodeAddress(type(WrapperActions).creationCode), scriptCalldata: TokenWrapper.encodeActionToWrapOrUnwrap( wrapOrUnwrap.chainId, wrapOrUnwrap.assetSymbol, wrapOrUnwrap.amount - ), + ), scriptSources: scriptSources, expiry: wrapOrUnwrap.blockTimestamp + STANDARD_EXPIRY_BUFFER }); diff --git a/src/builder/actions/SwapActionsBuilder.sol b/src/builder/actions/SwapActionsBuilder.sol index 6c54dd2..792fbb9 100644 --- a/src/builder/actions/SwapActionsBuilder.sol +++ b/src/builder/actions/SwapActionsBuilder.sol @@ -69,7 +69,7 @@ contract SwapActionsBuilder is QuarkBuilderBase { sellToken: swapIntent.sellToken, sellAssetSymbol: Accounts.findAssetPositions( swapIntent.sellToken, swapIntent.chainId, chainAccountsList - ).symbol, + ).symbol, sellAmount: swapIntent.sellAmount, buyToken: swapIntent.buyToken, buyAssetSymbol: Accounts.findAssetPositions(swapIntent.buyToken, swapIntent.chainId, chainAccountsList) diff --git a/src/builder/console.sol b/src/builder/console.sol index f8a215a..4a4962a 100644 --- a/src/builder/console.sol +++ b/src/builder/console.sol @@ -3,29 +3,21 @@ pragma solidity >=0.4.22 <0.9.0; library console { - address constant CONSOLE_ADDRESS = - 0x000000000000000000636F6e736F6c652e6c6f67; + address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { - pop( - staticcall( - gas(), - consoleAddress, - add(payload, 32), - mload(payload), - 0, - 0 - ) - ) + pop(staticcall(gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0)) } } - function _castToPure( - function(bytes memory) internal view fnIn - ) internal pure returns (function(bytes memory) pure fnOut) { + function _castToPure(function(bytes memory) internal view fnIn) + internal + pure + returns (function(bytes memory) pure fnOut) + { assembly { fnOut := fnIn } diff --git a/test/Multicall.t.sol b/test/Multicall.t.sol index 0b1c1ae..52fa027 100644 --- a/test/Multicall.t.sol +++ b/test/Multicall.t.sol @@ -537,7 +537,7 @@ contract MulticallTest is Test { path: abi.encodePacked(USDC, uint24(500), WETH) // Path: USDC - 0.05% -> WETH }) ) - ), + ), new bytes[](0) ) ), diff --git a/test/UniswapFlashLoan.t.sol b/test/UniswapFlashLoan.t.sol index 072eac7..ab8cc5c 100644 --- a/test/UniswapFlashLoan.t.sol +++ b/test/UniswapFlashLoan.t.sol @@ -277,7 +277,7 @@ contract UniswapFlashLoanTest is Test { callContract: ethcallAddress, callData: abi.encodeWithSelector( Ethcall.run.selector, USDC, abi.encodeCall(IERC20.transfer, (address(1), 1000e6)), 0 - ) + ) }); QuarkWallet.QuarkOperation memory op = new QuarkOperationHelper().newBasicOpWithCalldata( @@ -312,7 +312,7 @@ contract UniswapFlashLoanTest is Test { callContract: ethcallAddress, callData: abi.encodeWithSelector( Ethcall.run.selector, USDC, abi.encodeCall(IERC20.approve, (comet, 1000e6)), 0 - ) + ) }) ), ScriptType.ScriptAddress diff --git a/test/builder/lib/QuarkBuilderTest.sol b/test/builder/lib/QuarkBuilderTest.sol index 73609d5..9ede337 100644 --- a/test/builder/lib/QuarkBuilderTest.sol +++ b/test/builder/lib/QuarkBuilderTest.sol @@ -450,17 +450,17 @@ contract QuarkBuilderTest { chainPortfolios[i].account, chainPortfolios[i].assetSymbols, chainPortfolios[i].assetBalances - ), + ), // cometPositions: cometPositionsFor cometPositions: cometPositionsForCometPorfolios( chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].cometPortfolios - ), + ), morphoPositions: morphoPositionsForMorphoPortfolios( chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].morphoPortfolios - ), + ), morphoVaultPositions: morphoVaultPositionsForMorphoVaultPortfolios( chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].morphoVaultPortfolios - ) + ) }); }