prettier and lint

This commit is contained in:
dextracker 2023-02-23 15:11:52 -05:00
parent 4aaba03847
commit 29b7095a00
4 changed files with 16 additions and 17 deletions

View File

@ -31,7 +31,7 @@ import "./libs/LibNativeOrder.sol";
import "./libs/LibSignature.sol";
/// @dev Feature for interacting with OTC orders.
contract OtcOrdersFeature is IFeature, IOtcOrdersFeature, FixinCommon, FixinEIP712, FixinTokenSpender{
contract OtcOrdersFeature is IFeature, IOtcOrdersFeature, FixinCommon, FixinEIP712, FixinTokenSpender {
using LibSafeMathV06 for uint256;
using LibSafeMathV06 for uint128;

View File

@ -489,7 +489,7 @@ contract MultiplexFeature is
// If `i == 0`, the target is the address which should hold the input
// tokens prior to executing `calls[0]`. Otherwise, it is the address
// that should receive `tokens[i]` upon executing `calls[i-1]`.
function _computeHopTarget(MultiHopSellParams memory params, uint256 i) private returns (address target) {
function _computeHopTarget(MultiHopSellParams memory params, uint256 i) private returns (address target) {
if (i == params.calls.length) {
// The last call should send the output tokens to the
// multi-hop sell recipient.
@ -534,12 +534,11 @@ contract MultiplexFeature is
} else {
target = address(this);
}
} else if(subcall.id == MultiplexSubcall.OTC) {
} else if (subcall.id == MultiplexSubcall.OTC) {
//on the first call we want to pull tokens from the taker, subsequent calls should use the EP balance
if( i == 0) {
target = msg.sender;
}
else {
if (i == 0) {
target = msg.sender;
} else {
target = address(this);
}
} else {

View File

@ -21,7 +21,7 @@ import "../interfaces/IMultiplexFeature.sol";
import "../interfaces/IOtcOrdersFeature.sol";
import "../libs/LibNativeOrder.sol";
abstract contract MultiplexOtc is FixinEIP712{
abstract contract MultiplexOtc is FixinEIP712 {
using LibSafeMathV06 for uint256;
event ExpiredOtcOrder(bytes32 orderHash, address maker, uint64 expiry);

View File

@ -29,9 +29,9 @@ import "src/transformers/bridges/BridgeProtocols.sol";
import "src/features/OtcOrdersFeature.sol";
contract MultiplexRfqtTest is Test, ForkUtils, TestUtils {
using LibERC20TokenV06 for IERC20Token;
using LibERC20TokenV06 for IEtherToken;
function setUp() public {
_setup();
}
@ -67,7 +67,10 @@ contract MultiplexRfqtTest is Test, ForkUtils, TestUtils {
bytes32(0) // sushiswapPairInitCodeHash
);
OtcOrdersFeature otcOrdersFeature = new OtcOrdersFeature(address(addresses.exchangeProxy), tokens.WrappedNativeToken);
OtcOrdersFeature otcOrdersFeature = new OtcOrdersFeature(
address(addresses.exchangeProxy),
tokens.WrappedNativeToken
);
vm.label(address(multiplexFeature), "zeroEx/NewMultiplexFeature");
vm.label(address(otcOrdersFeature), "zeroEx/NewOtcOrdersFeature");
@ -95,7 +98,6 @@ contract MultiplexRfqtTest is Test, ForkUtils, TestUtils {
ContractAddresses memory addresses,
LiquiditySources memory sources
) public onlyForked {
IZERO_EX = IZeroEx(addresses.exchangeProxy);
address[] memory tradeTokens = new address[](3);
@ -139,7 +141,7 @@ contract MultiplexRfqtTest is Test, ForkUtils, TestUtils {
subcalls[1] = subcall2;
uint balanceBefore = tokens.DAI.balanceOf(address(this));
emit log_named_uint("DAI Balance Before",balanceBefore);
emit log_named_uint("DAI Balance Before", balanceBefore);
emit log_string("Multihop Rfqt: WETH->USDC->DAI");
/// @dev Sells `sellAmount` of the input token (`tokens[0]`)
@ -193,8 +195,6 @@ contract MultiplexRfqtTest is Test, ForkUtils, TestUtils {
vm.startPrank(order.maker);
IERC20Token(order.makerToken).approveIfBelow(addresses.exchangeProxy, 2e20);
order.taker = address(0);
order.txOrigin = address(tx.origin);
order.expiryAndNonce = encodeExpiryAndNonce(order.maker, bump);