From 50767e2b7f9b16102ba761087a22742fb858c5bd Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 29 Sep 2023 16:13:09 +0200 Subject: [PATCH 1/5] wip removing native --- .../contracts/exchange/AssetMatcher.sol | 6 ++- .../contracts/exchange/Exchange.sol | 16 +----- .../contracts/exchange/ExchangeCore.sol | 52 +++---------------- .../contracts/mocks/SimpleTransferManager.sol | 4 +- .../transfer-manager/TransferManager.sol | 10 ++-- .../interfaces/ITransferManager.sol | 2 +- .../test/exchange/ExchangeSettings.test.ts | 21 -------- packages/marketplace/test/fixtures.ts | 2 - 8 files changed, 17 insertions(+), 96 deletions(-) diff --git a/packages/marketplace/contracts/exchange/AssetMatcher.sol b/packages/marketplace/contracts/exchange/AssetMatcher.sol index 58e51513f1..ee81099fda 100644 --- a/packages/marketplace/contracts/exchange/AssetMatcher.sol +++ b/packages/marketplace/contracts/exchange/AssetMatcher.sol @@ -46,12 +46,14 @@ contract AssetMatcher is Ownable, IAssetMatcher { ) private view returns (LibAsset.AssetType memory) { bytes4 classLeft = leftAssetType.assetClass; bytes4 classRight = rightAssetType.assetClass; - if (classLeft == LibAsset.ETH_ASSET_CLASS) { + require(classLeft != LibAsset.ETH_ASSET_CLASS, "maker cannot transfer native token"); + require(classRight != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); + /* if (classLeft == LibAsset.ETH_ASSET_CLASS) { if (classRight == LibAsset.ETH_ASSET_CLASS) { return leftAssetType; } return LibAsset.AssetType(0, EMPTY); - } + } */ if (classLeft == LibAsset.ERC20_ASSET_CLASS) { if (classRight == LibAsset.ERC20_ASSET_CLASS) { return simpleMatch(leftAssetType, rightAssetType); diff --git a/packages/marketplace/contracts/exchange/Exchange.sol b/packages/marketplace/contracts/exchange/Exchange.sol index 4f36889266..df3f8b23d0 100644 --- a/packages/marketplace/contracts/exchange/Exchange.sol +++ b/packages/marketplace/contracts/exchange/Exchange.sol @@ -36,8 +36,6 @@ contract Exchange is Initializable, AccessControlUpgradeable, ExchangeCore, Tran /// @param newRoyaltiesProvider registry for the different types of royalties /// @param orderValidatorAddress new OrderValidator contract address /// @param newAssetMatcher new AssetMatcher contract address - /// @param newNativeOrder bool to indicate of the contract accepts or doesn't native tokens, i.e. ETH or Matic - /// @param newMetaNative same as =nativeOrder but for metaTransactions // solhint-disable-next-line func-name-mixedcase function __Exchange_init( address admin, @@ -47,9 +45,7 @@ contract Exchange is Initializable, AccessControlUpgradeable, ExchangeCore, Tran address newDefaultFeeReceiver, IRoyaltiesProvider newRoyaltiesProvider, IOrderValidator orderValidatorAddress, - IAssetMatcher newAssetMatcher, - bool newNativeOrder, - bool newMetaNative + IAssetMatcher newAssetMatcher ) external initializer { __ERC2771Handler_init(newTrustedForwarder); __AccessControl_init(); @@ -59,7 +55,7 @@ contract Exchange is Initializable, AccessControlUpgradeable, ExchangeCore, Tran newDefaultFeeReceiver, newRoyaltiesProvider ); - __ExchangeCoreInitialize(newNativeOrder, newMetaNative, orderValidatorAddress, newAssetMatcher); + __ExchangeCoreInitialize(orderValidatorAddress, newAssetMatcher); _grantRole(DEFAULT_ADMIN_ROLE, admin); } @@ -140,14 +136,6 @@ contract Exchange is Initializable, AccessControlUpgradeable, ExchangeCore, Tran _setOrderValidatorContract(contractAddress); } - /// @notice update permissions for native orders - /// @param newNativeOrder for orders with native token - /// @param newMetaNative for meta orders with native token - /// @dev setter for permissions for native token exchange - function updateNative(bool newNativeOrder, bool newMetaNative) external onlyRole(DEFAULT_ADMIN_ROLE) { - _updateNative(newNativeOrder, newMetaNative); - } - /// @notice Change the address of the trusted forwarder for meta-transactions /// @param newTrustedForwarder The new trustedForwarder function setTrustedForwarder(address newTrustedForwarder) external virtual onlyRole(DEFAULT_ADMIN_ROLE) { diff --git a/packages/marketplace/contracts/exchange/ExchangeCore.sol b/packages/marketplace/contracts/exchange/ExchangeCore.sol index d799ac7b28..0d832f2b55 100644 --- a/packages/marketplace/contracts/exchange/ExchangeCore.sol +++ b/packages/marketplace/contracts/exchange/ExchangeCore.sol @@ -28,14 +28,6 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana uint256 private constant UINT256_MAX = type(uint256).max; - /// @notice boolean to indicate if native tokens are accepted for meta transactions - /// @return true if native tokens are accepted for meta tx, false otherwise - bool public nativeMeta; - - /// @notice boolean to indicate if native tokens are accepted - /// @return true if native tokens are accepted, false otherwise - bool public nativeOrder; - /// @notice stores the fills for orders /// @return order fill mapping(bytes32 => uint256) public fills; @@ -64,22 +56,16 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana ); event AssetMatcherSet(IAssetMatcher indexed contractAddress); event OrderValidatorSet(IOrderValidator indexed contractAddress); - event NativeUpdated(bool nativeOrder, bool metaNative); /// @notice initializer for ExchangeCore - /// @param newNativeOrder for orders with native token - /// @param newMetaNative for meta orders with native token /// @param newOrderValidatorAddress new OrderValidator contract address /// @param newAssetMatcher new AssetMatcher contract address /// @dev initialize permissions for native token exchange // solhint-disable-next-line func-name-mixedcase function __ExchangeCoreInitialize( - bool newNativeOrder, - bool newMetaNative, IOrderValidator newOrderValidatorAddress, IAssetMatcher newAssetMatcher ) internal { - _updateNative(newMetaNative, newNativeOrder); _setOrderValidatorContract(newOrderValidatorAddress); _setAssetMatcherContract(newAssetMatcher); } @@ -101,16 +87,6 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana emit OrderValidatorSet(contractAddress); } - /// @notice update permissions for native orders - /// @param newNativeOrder for orders with native token - /// @param newMetaNative for meta orders with native token - /// @dev setter for permissions for native token exchange - function _updateNative(bool newNativeOrder, bool newMetaNative) internal { - nativeMeta = newMetaNative; - nativeOrder = newNativeOrder; - emit NativeUpdated(newNativeOrder, newMetaNative); - } - /// @notice cancel order /// @param order to be canceled /// @param orderHash used as a checksum to avoid mistakes in the values of order @@ -238,7 +214,7 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana LibFill.FillResult memory newFill ) = _parseOrdersSetFillEmitMatch(from, orderLeft, orderRight); - (uint256 totalMakeValue, uint256 totalTakeValue) = doTransfers( + doTransfers( LibDeal.DealSide({ asset: LibAsset.Asset({assetType: makeMatch, value: newFill.leftValue}), payouts: leftOrderData.payouts, @@ -252,28 +228,12 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana LibFeeSide.getFeeSide(makeMatch.assetClass, takeMatch.assetClass) ); - uint256 takeBuyAmount = newFill.rightValue; - uint256 makeBuyAmount = newFill.leftValue; + // TODO: this force me to pass from, do we want it ? + // answer it was cut out with native orders - // TODO: this force me to pass from, do we want it ? - if (((from != msg.sender) && !nativeMeta) || ((from == msg.sender) && !nativeOrder)) { - require(makeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "maker cannot transfer native token"); - require(takeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); - } - if (makeMatch.assetClass == LibAsset.ETH_ASSET_CLASS) { - require(takeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); - require(makeBuyAmount >= totalMakeValue, "not enough eth"); - if (makeBuyAmount > totalMakeValue) { - // TODO: from ? - payable(msg.sender).transferEth(makeBuyAmount - totalMakeValue); - } - } else if (takeMatch.assetClass == LibAsset.ETH_ASSET_CLASS) { - require(takeBuyAmount >= totalTakeValue, "not enough eth"); - if (takeBuyAmount > totalTakeValue) { - // TODO: from ? - payable(msg.sender).transferEth(takeBuyAmount - totalTakeValue); - } - } + // TODO: keep this here or verify in asset matcher? + require(makeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "maker cannot transfer native token"); + require(takeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); } /// @notice parse orders with LibOrderDataGeneric parse() to get the order data, then create a new fill with setFillEmitMatch() diff --git a/packages/marketplace/contracts/mocks/SimpleTransferManager.sol b/packages/marketplace/contracts/mocks/SimpleTransferManager.sol index 227945d680..1e46d36005 100644 --- a/packages/marketplace/contracts/mocks/SimpleTransferManager.sol +++ b/packages/marketplace/contracts/mocks/SimpleTransferManager.sol @@ -9,11 +9,9 @@ abstract contract SimpleTransferManager is ITransferManager { LibDeal.DealSide memory left, LibDeal.DealSide memory right, LibFeeSide.FeeSide /* feeSide */ - ) internal override returns (uint256 totalMakeValue, uint256 totalTakeValue) { + ) internal override { transfer(left.asset, left.from, right.from); transfer(right.asset, right.from, left.from); - totalMakeValue = left.asset.value; - totalTakeValue = right.asset.value; } uint256[50] private __gap; diff --git a/packages/marketplace/contracts/transfer-manager/TransferManager.sol b/packages/marketplace/contracts/transfer-manager/TransferManager.sol index cbcfb36d20..88b7f7ab48 100644 --- a/packages/marketplace/contracts/transfer-manager/TransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/TransferManager.sol @@ -100,20 +100,16 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { /// @notice executes transfers for 2 matched orders /// @param left DealSide from the left order (see LibDeal.sol) /// @param right DealSide from the right order (see LibDeal.sol) - /// @return totalLeftValue - total amount for the left order - /// @return totalRightValue - total amount for the right order function doTransfers( LibDeal.DealSide memory left, LibDeal.DealSide memory right, LibFeeSide.FeeSide feeSide - ) internal override returns (uint256 totalLeftValue, uint256 totalRightValue) { - totalLeftValue = left.asset.value; - totalRightValue = right.asset.value; + ) internal override { if (feeSide == LibFeeSide.FeeSide.LEFT) { - totalLeftValue = doTransfersWithRoyalties(left, right); + doTransfersWithRoyalties(left, right); transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts); } else if (feeSide == LibFeeSide.FeeSide.RIGHT) { - totalRightValue = doTransfersWithRoyalties(right, left); + doTransfersWithRoyalties(right, left); transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts); } else { transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts); diff --git a/packages/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol b/packages/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol index c7c1a2888c..5fad64c692 100644 --- a/packages/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol @@ -11,5 +11,5 @@ abstract contract ITransferManager is ITransferExecutor { LibDeal.DealSide memory left, LibDeal.DealSide memory right, LibFeeSide.FeeSide feeSide - ) internal virtual returns (uint256 totalMakeValue, uint256 totalTakeValue); + ) internal virtual; } diff --git a/packages/marketplace/test/exchange/ExchangeSettings.test.ts b/packages/marketplace/test/exchange/ExchangeSettings.test.ts index 998c87681c..9a9014afef 100644 --- a/packages/marketplace/test/exchange/ExchangeSettings.test.ts +++ b/packages/marketplace/test/exchange/ExchangeSettings.test.ts @@ -26,8 +26,6 @@ describe('Exchange.sol settings', function () { expect(await ExchangeContractAsAdmin.orderValidator()).to.be.equal( await OrderValidatorAsDeployer.getAddress() ); - expect(await ExchangeContractAsAdmin.nativeMeta()).to.be.equal(true); - expect(await ExchangeContractAsAdmin.nativeOrder()).to.be.equal(true); expect(await ExchangeContractAsAdmin.getTrustedForwarder()).to.be.equal( await TrustedForwarder.getAddress() ); @@ -49,25 +47,6 @@ describe('Exchange.sol settings', function () { 'setOrderValidatorContract', 'OrderValidatorSet' ); - it('should update native order', async function () { - const {ExchangeContractAsAdmin} = await loadFixture(deployFixtures); - expect(await ExchangeContractAsAdmin.nativeMeta()).to.be.equal(true); - expect(await ExchangeContractAsAdmin.nativeOrder()).to.be.equal(true); - await expect(ExchangeContractAsAdmin.updateNative(false, false)) - .to.emit(ExchangeContractAsAdmin, 'NativeUpdated') - .withArgs(false, false); - expect(await ExchangeContractAsAdmin.nativeMeta()).to.be.equal(false); - expect(await ExchangeContractAsAdmin.nativeOrder()).to.be.equal(false); - }); - it('should not update native order if caller is not owner', async function () { - const {DEFAULT_ADMIN_ROLE, ExchangeContractAsUser, user} = - await loadFixture(deployFixtures); - await expect( - ExchangeContractAsUser.updateNative(false, false) - ).to.be.revertedWith( - `AccessControl: account ${user.address.toLowerCase()} is missing role ${DEFAULT_ADMIN_ROLE}` - ); - }); it('should not set trusted forwarder if caller is not owner', async function () { const {DEFAULT_ADMIN_ROLE, ExchangeContractAsUser, user} = await loadFixture(deployFixtures); diff --git a/packages/marketplace/test/fixtures.ts b/packages/marketplace/test/fixtures.ts index 461ff33ac7..454a26661c 100644 --- a/packages/marketplace/test/fixtures.ts +++ b/packages/marketplace/test/fixtures.ts @@ -43,8 +43,6 @@ async function deploy() { await RoyaltyRegistry.getAddress(), await OrderValidatorAsDeployer.getAddress(), await assetMatcherAsDeployer.getAddress(), - true, - true, ], { initializer: '__Exchange_init', From 756b9f1bf9bea3faa4a3dbe16bffcf67ae426e58 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 29 Sep 2023 16:35:01 +0200 Subject: [PATCH 2/5] last changes --- .../marketplace/contracts/exchange/AssetMatcher.sol | 6 ------ .../marketplace/contracts/exchange/ExchangeCore.sol | 4 ---- .../contracts/transfer-manager/TransferManager.sol | 10 ++++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/marketplace/contracts/exchange/AssetMatcher.sol b/packages/marketplace/contracts/exchange/AssetMatcher.sol index ee81099fda..a02c19e1c5 100644 --- a/packages/marketplace/contracts/exchange/AssetMatcher.sol +++ b/packages/marketplace/contracts/exchange/AssetMatcher.sol @@ -48,12 +48,6 @@ contract AssetMatcher is Ownable, IAssetMatcher { bytes4 classRight = rightAssetType.assetClass; require(classLeft != LibAsset.ETH_ASSET_CLASS, "maker cannot transfer native token"); require(classRight != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); - /* if (classLeft == LibAsset.ETH_ASSET_CLASS) { - if (classRight == LibAsset.ETH_ASSET_CLASS) { - return leftAssetType; - } - return LibAsset.AssetType(0, EMPTY); - } */ if (classLeft == LibAsset.ERC20_ASSET_CLASS) { if (classRight == LibAsset.ERC20_ASSET_CLASS) { return simpleMatch(leftAssetType, rightAssetType); diff --git a/packages/marketplace/contracts/exchange/ExchangeCore.sol b/packages/marketplace/contracts/exchange/ExchangeCore.sol index 0d832f2b55..9188374459 100644 --- a/packages/marketplace/contracts/exchange/ExchangeCore.sol +++ b/packages/marketplace/contracts/exchange/ExchangeCore.sol @@ -230,10 +230,6 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana // TODO: this force me to pass from, do we want it ? // answer it was cut out with native orders - - // TODO: keep this here or verify in asset matcher? - require(makeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "maker cannot transfer native token"); - require(takeMatch.assetClass != LibAsset.ETH_ASSET_CLASS, "taker cannot transfer native token"); } /// @notice parse orders with LibOrderDataGeneric parse() to get the order data, then create a new fill with setFillEmitMatch() diff --git a/packages/marketplace/contracts/transfer-manager/TransferManager.sol b/packages/marketplace/contracts/transfer-manager/TransferManager.sol index 88b7f7ab48..3b2e9b172d 100644 --- a/packages/marketplace/contracts/transfer-manager/TransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/TransferManager.sol @@ -120,12 +120,22 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { /// @notice executes the fee-side transfers (payment + fees) /// @param paymentSide DealSide of the fee-side order /// @param nftSide DealSide of the nft-side order +<<<<<<< HEAD /// @return totalAmount of fee-side asset function doTransfersWithRoyalties( LibDeal.DealSide memory paymentSide, LibDeal.DealSide memory nftSide ) internal returns (uint256 totalAmount) { uint256 rest = paymentSide.asset.value; +======= + /// @param maxFeesBasePoint max fee for the sell-order (used and is > 0 for V3 orders only) + function doTransfersWithFees( + LibDeal.DealSide memory paymentSide, + LibDeal.DealSide memory nftSide, + uint256 maxFeesBasePoint + ) internal { + uint256 rest = calculateTotalAmount(paymentSide.asset.value, paymentSide.originFees, maxFeesBasePoint); +>>>>>>> last changes rest = transferRoyalties( paymentSide.asset.assetType, From 049625dbbd619791c550ac60a0dc1783d0b8a346 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 29 Sep 2023 16:46:21 +0200 Subject: [PATCH 3/5] format fix --- packages/marketplace/contracts/exchange/ExchangeCore.sol | 2 +- .../contracts/transfer-manager/TransferManager.sol | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/marketplace/contracts/exchange/ExchangeCore.sol b/packages/marketplace/contracts/exchange/ExchangeCore.sol index 9188374459..ca9e6cb5d2 100644 --- a/packages/marketplace/contracts/exchange/ExchangeCore.sol +++ b/packages/marketplace/contracts/exchange/ExchangeCore.sol @@ -228,7 +228,7 @@ abstract contract ExchangeCore is Initializable, TransferExecutor, ITransferMana LibFeeSide.getFeeSide(makeMatch.assetClass, takeMatch.assetClass) ); - // TODO: this force me to pass from, do we want it ? + // TODO: this force me to pass from, do we want it ? // answer it was cut out with native orders } diff --git a/packages/marketplace/contracts/transfer-manager/TransferManager.sol b/packages/marketplace/contracts/transfer-manager/TransferManager.sol index 3b2e9b172d..6d60293257 100644 --- a/packages/marketplace/contracts/transfer-manager/TransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/TransferManager.sol @@ -105,8 +105,13 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { LibDeal.DealSide memory right, LibFeeSide.FeeSide feeSide ) internal override { +<<<<<<< HEAD if (feeSide == LibFeeSide.FeeSide.LEFT) { doTransfersWithRoyalties(left, right); +======= + if (dealData.feeSide == LibFeeSide.FeeSide.LEFT) { + doTransfersWithFees(left, right, dealData.maxFeesBasePoint); +>>>>>>> format fix transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts); } else if (feeSide == LibFeeSide.FeeSide.RIGHT) { doTransfersWithRoyalties(right, left); From a4775defc741c0c6eac0c09cf83419abf30680ab Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 29 Sep 2023 17:35:22 +0200 Subject: [PATCH 4/5] rebased --- .../transfer-manager/TransferManager.sol | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/marketplace/contracts/transfer-manager/TransferManager.sol b/packages/marketplace/contracts/transfer-manager/TransferManager.sol index 6d60293257..95539851e4 100644 --- a/packages/marketplace/contracts/transfer-manager/TransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/TransferManager.sol @@ -105,13 +105,8 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { LibDeal.DealSide memory right, LibFeeSide.FeeSide feeSide ) internal override { -<<<<<<< HEAD if (feeSide == LibFeeSide.FeeSide.LEFT) { doTransfersWithRoyalties(left, right); -======= - if (dealData.feeSide == LibFeeSide.FeeSide.LEFT) { - doTransfersWithFees(left, right, dealData.maxFeesBasePoint); ->>>>>>> format fix transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts); } else if (feeSide == LibFeeSide.FeeSide.RIGHT) { doTransfersWithRoyalties(right, left); @@ -125,22 +120,11 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { /// @notice executes the fee-side transfers (payment + fees) /// @param paymentSide DealSide of the fee-side order /// @param nftSide DealSide of the nft-side order -<<<<<<< HEAD - /// @return totalAmount of fee-side asset function doTransfersWithRoyalties( LibDeal.DealSide memory paymentSide, LibDeal.DealSide memory nftSide - ) internal returns (uint256 totalAmount) { - uint256 rest = paymentSide.asset.value; -======= - /// @param maxFeesBasePoint max fee for the sell-order (used and is > 0 for V3 orders only) - function doTransfersWithFees( - LibDeal.DealSide memory paymentSide, - LibDeal.DealSide memory nftSide, - uint256 maxFeesBasePoint ) internal { - uint256 rest = calculateTotalAmount(paymentSide.asset.value, paymentSide.originFees, maxFeesBasePoint); ->>>>>>> last changes + uint256 rest = paymentSide.asset.value; rest = transferRoyalties( paymentSide.asset.assetType, From 9693d201a3a7bd050ba141d276eca01b46fb5ee9 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 29 Sep 2023 17:37:55 +0200 Subject: [PATCH 5/5] format fix --- .../contracts/transfer-manager/TransferManager.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/marketplace/contracts/transfer-manager/TransferManager.sol b/packages/marketplace/contracts/transfer-manager/TransferManager.sol index 95539851e4..f742187167 100644 --- a/packages/marketplace/contracts/transfer-manager/TransferManager.sol +++ b/packages/marketplace/contracts/transfer-manager/TransferManager.sol @@ -120,10 +120,7 @@ abstract contract TransferManager is ERC165Upgradeable, ITransferManager { /// @notice executes the fee-side transfers (payment + fees) /// @param paymentSide DealSide of the fee-side order /// @param nftSide DealSide of the nft-side order - function doTransfersWithRoyalties( - LibDeal.DealSide memory paymentSide, - LibDeal.DealSide memory nftSide - ) internal { + function doTransfersWithRoyalties(LibDeal.DealSide memory paymentSide, LibDeal.DealSide memory nftSide) internal { uint256 rest = paymentSide.asset.value; rest = transferRoyalties(