Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
chore: change ' to "
Browse files Browse the repository at this point in the history
  • Loading branch information
GalloDaSballo committed Jul 13, 2022
1 parent b9db83c commit 045c35c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/CowSwapSeller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ contract CowSwapSeller is ReentrancyGuard {
function _doCowswapOrder(Data calldata orderData, bytes memory orderUid) internal nonReentrant {
require(msg.sender == manager);

require(checkCowswapOrder(orderData, orderUid), '!cowLowerPrice');
require(checkCowswapOrder(orderData, orderUid), "!cowLowerPrice");

// Because swap is looking good, check we have the amount, then give allowance to the Cowswap Router
orderData.sellToken.safeApprove(RELAYER, 0); // Set to 0 just in case
Expand Down
2 changes: 1 addition & 1 deletion contracts/OnChainPricingMainnet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ contract OnChainPricingMainnet {
/// @dev query with the address of the token0 & token1 & the fee tier
/// @return the uniswap v3 pool address
function _getUniV3PoolAddress(address token0, address token1, uint24 fee) internal pure returns (address) {
bytes32 addr = keccak256(abi.encodePacked(hex'ff', UNIV3_FACTORY, keccak256(abi.encode(token0, token1, fee)), UNIV3_POOL_INIT_CODE_HASH));
bytes32 addr = keccak256(abi.encodePacked(hex"ff", UNIV3_FACTORY, keccak256(abi.encode(token0, token1, fee)), UNIV3_POOL_INIT_CODE_HASH));
return address(uint160(uint256(addr)));
}

Expand Down
12 changes: 6 additions & 6 deletions contracts/OnChainSwapMainnet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ contract OnChainSwapMainnet {
/// @dev execute on-chain swap based on optimal quote
/// @return output amount after swap execution
function doOptimalSwap(address tokenIn, address tokenOut, uint256 amountIn) external returns(uint256){
require(pricer != address(0), '!pricer');
require(pricer != address(0), "!pricer");
Quote memory _optimalQuote = OnChainPricing(pricer).findOptimalSwap(tokenIn, tokenOut, amountIn);
return doOptimalSwapWithQuote(tokenIn, tokenOut, amountIn, _optimalQuote);
}
Expand Down Expand Up @@ -111,7 +111,7 @@ contract OnChainSwapMainnet {
IERC20(tokenIn).safeApprove(UNIV3_ROUTER, 0);
IERC20(tokenIn).safeApprove(UNIV3_ROUTER, amountIn);

require(_checkTokenTransfer(tokenIn, amountIn), '!AMT');
require(_checkTokenTransfer(tokenIn, amountIn), "!AMT");

ExactInputParams memory params = ExactInputParams({
path: abiEncodePackedPath,
Expand Down Expand Up @@ -141,7 +141,7 @@ contract OnChainSwapMainnet {
IERC20(path[0]).safeApprove(router, 0);
IERC20(path[0]).safeApprove(router, amountIn);

require(_checkTokenTransfer(path[0], amountIn), '!AMT');
require(_checkTokenTransfer(path[0], amountIn), "!AMT");

uint256[] memory _amountsOut = IUniswapRouterV2(router).swapExactTokensForTokens(amountIn, expectedOut, path, receiver, block.timestamp);
return _amountsOut[_amountsOut.length - 1];
Expand All @@ -152,7 +152,7 @@ contract OnChainSwapMainnet {
IERC20(tokenIn).safeApprove(CURVE_ROUTER, 0);
IERC20(tokenIn).safeApprove(CURVE_ROUTER, amountIn);

require(_checkTokenTransfer(tokenIn, amountIn), '!AMT');
require(_checkTokenTransfer(tokenIn, amountIn), "!AMT");

return ICurveRouter(CURVE_ROUTER).exchange(pool, tokenIn, tokenOut, amountIn, expectedOut, receiver);
}
Expand All @@ -162,7 +162,7 @@ contract OnChainSwapMainnet {
IERC20(tokenIn).safeApprove(BALANCERV2_VAULT, 0);
IERC20(tokenIn).safeApprove(BALANCERV2_VAULT, amountIn);

require(_checkTokenTransfer(tokenIn, amountIn), '!AMT');
require(_checkTokenTransfer(tokenIn, amountIn), "!AMT");

SingleSwap memory singleSwap = SingleSwap(poolID, SwapKind.GIVEN_IN, tokenIn, tokenOut, amountIn, "");
FundManagement memory funds = FundManagement(address(this), false, receiver, false);
Expand All @@ -176,7 +176,7 @@ contract OnChainSwapMainnet {
IERC20(tokenIn).safeApprove(BALANCERV2_VAULT, 0);
IERC20(tokenIn).safeApprove(BALANCERV2_VAULT, amountIn);

require(_checkTokenTransfer(tokenIn, amountIn), '!AMT');
require(_checkTokenTransfer(tokenIn, amountIn), "!AMT");

address[] memory assets = new address[](3);
assets[0] = tokenIn;
Expand Down

0 comments on commit 045c35c

Please sign in to comment.