Skip to content

Commit a2d4781

Browse files
committed
forge fmt
1 parent 861e453 commit a2d4781

File tree

9 files changed

+29
-38
lines changed

9 files changed

+29
-38
lines changed

src/builder/PaycallWrapper.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ library PaycallWrapper {
2929
scriptAddress: CodeJarHelper.getCodeAddress(paycallSource),
3030
scriptCalldata: abi.encodeWithSelector(
3131
Paycall.run.selector, operation.scriptAddress, operation.scriptCalldata, maxPaymentCost
32-
),
32+
),
3333
scriptSources: scriptSources,
3434
expiry: operation.expiry
3535
});

src/builder/PriceFeeds.sol

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,8 @@ library PriceFeeds {
248248
reverse[1] = false;
249249
return (path, reverse);
250250
} else if (
251-
Strings
252-
// e.g. IN/ABC and ABC/OUT -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, false]
253-
.stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].baseSymbol)
251+
// e.g. IN/ABC and ABC/OUT -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, false]
252+
Strings.stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].baseSymbol)
254253
) {
255254
address[] memory path = new address[](2);
256255
bool[] memory reverse = new bool[](2);
@@ -260,9 +259,8 @@ library PriceFeeds {
260259
reverse[1] = false;
261260
return (path, reverse);
262261
} else if (
263-
Strings
264-
// e.g. ABC/IN and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[true, true]
265-
.stringEqIgnoreCase(inputAssetPriceFeeds[i].baseSymbol, outputAssetPriceFeeds[j].quoteSymbol)
262+
// e.g. ABC/IN and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[true, true]
263+
Strings.stringEqIgnoreCase(inputAssetPriceFeeds[i].baseSymbol, outputAssetPriceFeeds[j].quoteSymbol)
266264
) {
267265
address[] memory path = new address[](2);
268266
bool[] memory reverse = new bool[](2);
@@ -272,9 +270,10 @@ library PriceFeeds {
272270
reverse[1] = true;
273271
return (path, reverse);
274272
} else if (
275-
Strings
276-
// e.g. IN/ABC and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, true]
277-
.stringEqIgnoreCase(inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].quoteSymbol)
273+
// e.g. IN/ABC and OUT/ABC -> We want IN/ABC and ABC/OUT, which equates to reverse=[false, true]
274+
Strings.stringEqIgnoreCase(
275+
inputAssetPriceFeeds[i].quoteSymbol, outputAssetPriceFeeds[j].quoteSymbol
276+
)
278277
) {
279278
address[] memory path = new address[](2);
280279
bool[] memory reverse = new bool[](2);

src/builder/QuotecallWrapper.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ library QuotecallWrapper {
3030
scriptAddress: CodeJarHelper.getCodeAddress(quotecallSource),
3131
scriptCalldata: abi.encodeWithSelector(
3232
Quotecall.run.selector, operation.scriptAddress, operation.scriptCalldata, quotedAmount
33-
),
33+
),
3434
scriptSources: scriptSources,
3535
expiry: operation.expiry
3636
});

src/builder/actions/Actions.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ library Actions {
666666
scriptAddress: CodeJarHelper.getCodeAddress(scriptSources[0]),
667667
scriptCalldata: CCTP.encodeBridgeUSDC(
668668
bridge.srcChainId, bridge.destinationChainId, bridge.amount, bridge.recipient, srcUSDCPositions.asset
669-
),
669+
),
670670
scriptSources: scriptSources,
671671
expiry: bridge.blockTimestamp + BRIDGE_EXPIRY_BUFFER
672672
});
@@ -1187,7 +1187,7 @@ library Actions {
11871187
morpho: MorphoInfo.getMorphoAddress(borrowInput.chainId),
11881188
morphoMarketId: MorphoInfo.marketId(
11891189
MorphoInfo.getMarketParams(borrowInput.chainId, borrowInput.collateralAssetSymbol, borrowInput.assetSymbol)
1190-
)
1190+
)
11911191
});
11921192
Action memory action = Actions.Action({
11931193
chainId: borrowInput.chainId,
@@ -1257,7 +1257,7 @@ library Actions {
12571257
morpho: MorphoInfo.getMorphoAddress(repayInput.chainId),
12581258
morphoMarketId: MorphoInfo.marketId(
12591259
MorphoInfo.getMarketParams(repayInput.chainId, repayInput.collateralAssetSymbol, repayInput.assetSymbol)
1260-
)
1260+
)
12611261
});
12621262

12631263
Action memory action = Actions.Action({
@@ -1492,7 +1492,7 @@ library Actions {
14921492
scriptAddress: CodeJarHelper.getCodeAddress(type(WrapperActions).creationCode),
14931493
scriptCalldata: TokenWrapper.encodeActionToWrapOrUnwrap(
14941494
wrapOrUnwrap.chainId, wrapOrUnwrap.assetSymbol, wrapOrUnwrap.amount
1495-
),
1495+
),
14961496
scriptSources: scriptSources,
14971497
expiry: wrapOrUnwrap.blockTimestamp + STANDARD_EXPIRY_BUFFER
14981498
});

src/builder/actions/SwapActionsBuilder.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ contract SwapActionsBuilder is QuarkBuilderBase {
6969
sellToken: swapIntent.sellToken,
7070
sellAssetSymbol: Accounts.findAssetPositions(
7171
swapIntent.sellToken, swapIntent.chainId, chainAccountsList
72-
).symbol,
72+
).symbol,
7373
sellAmount: swapIntent.sellAmount,
7474
buyToken: swapIntent.buyToken,
7575
buyAssetSymbol: Accounts.findAssetPositions(swapIntent.buyToken, swapIntent.chainId, chainAccountsList)

src/builder/console.sol

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,21 @@
33
pragma solidity >=0.4.22 <0.9.0;
44

55
library console {
6-
address constant CONSOLE_ADDRESS =
7-
0x000000000000000000636F6e736F6c652e6c6f67;
6+
address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67;
87

98
function _sendLogPayloadImplementation(bytes memory payload) internal view {
109
address consoleAddress = CONSOLE_ADDRESS;
1110
/// @solidity memory-safe-assembly
1211
assembly {
13-
pop(
14-
staticcall(
15-
gas(),
16-
consoleAddress,
17-
add(payload, 32),
18-
mload(payload),
19-
0,
20-
0
21-
)
22-
)
12+
pop(staticcall(gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0))
2313
}
2414
}
2515

26-
function _castToPure(
27-
function(bytes memory) internal view fnIn
28-
) internal pure returns (function(bytes memory) pure fnOut) {
16+
function _castToPure(function(bytes memory) internal view fnIn)
17+
internal
18+
pure
19+
returns (function(bytes memory) pure fnOut)
20+
{
2921
assembly {
3022
fnOut := fnIn
3123
}

test/Multicall.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ contract MulticallTest is Test {
537537
path: abi.encodePacked(USDC, uint24(500), WETH) // Path: USDC - 0.05% -> WETH
538538
})
539539
)
540-
),
540+
),
541541
new bytes[](0)
542542
)
543543
),

test/UniswapFlashLoan.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ contract UniswapFlashLoanTest is Test {
277277
callContract: ethcallAddress,
278278
callData: abi.encodeWithSelector(
279279
Ethcall.run.selector, USDC, abi.encodeCall(IERC20.transfer, (address(1), 1000e6)), 0
280-
)
280+
)
281281
});
282282

283283
QuarkWallet.QuarkOperation memory op = new QuarkOperationHelper().newBasicOpWithCalldata(
@@ -312,7 +312,7 @@ contract UniswapFlashLoanTest is Test {
312312
callContract: ethcallAddress,
313313
callData: abi.encodeWithSelector(
314314
Ethcall.run.selector, USDC, abi.encodeCall(IERC20.approve, (comet, 1000e6)), 0
315-
)
315+
)
316316
})
317317
),
318318
ScriptType.ScriptAddress

test/builder/lib/QuarkBuilderTest.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,17 +450,17 @@ contract QuarkBuilderTest {
450450
chainPortfolios[i].account,
451451
chainPortfolios[i].assetSymbols,
452452
chainPortfolios[i].assetBalances
453-
),
453+
),
454454
// cometPositions: cometPositionsFor
455455
cometPositions: cometPositionsForCometPorfolios(
456456
chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].cometPortfolios
457-
),
457+
),
458458
morphoPositions: morphoPositionsForMorphoPortfolios(
459459
chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].morphoPortfolios
460-
),
460+
),
461461
morphoVaultPositions: morphoVaultPositionsForMorphoVaultPortfolios(
462462
chainPortfolios[i].chainId, chainPortfolios[i].account, chainPortfolios[i].morphoVaultPortfolios
463-
)
463+
)
464464
});
465465
}
466466

0 commit comments

Comments
 (0)