prettier and lint
This commit is contained in:
parent
4aaba03847
commit
29b7095a00
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
if (i == 0) {
|
||||
target = msg.sender;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
target = address(this);
|
||||
}
|
||||
} else {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user