Skip to content

Commit

Permalink
fix: remove bundle related stuff
Browse files Browse the repository at this point in the history
It was readded during rebase
  • Loading branch information
adjisb committed Oct 3, 2023
1 parent fdf613f commit d7254db
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@ import {ITransferExecutor} from "./interfaces/ITransferExecutor.sol";
/// @title abstract contract for TransferExecutor
/// @notice contains transfer functions for any assets as well as ERC20 tokens
abstract contract TransferExecutor is Initializable, ITransferExecutor {
/// @notice limit of assets for each type of bundles
uint256 public constant MAX_BUNDLE_LIMIT = 20;

// Bundle Structs
struct ERC20Details {
IERC20Upgradeable token;
uint256 value;
}

struct ERC721Details {
IERC721Upgradeable token;
uint256 id;
uint256 value;
}

struct ERC1155Details {
IERC1155Upgradeable token;
uint256 id;
uint256 value;
// bytes data;
}

/// @notice function should be able to transfer any supported Asset
/// @param asset Asset to be transferred
/// @param from account holding the asset
Expand All @@ -44,17 +22,14 @@ abstract contract TransferExecutor is Initializable, ITransferExecutor {
//not using transfer proxy when transferring from this contract
(address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));
require(asset.value == 1, "erc721 value error");

erc721safeTransferFrom(IERC721Upgradeable(token), from, to, tokenId);
} else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC20_ASSET_CLASS) {
//not using transfer proxy when transferring from this contract
address token = abi.decode(asset.assetType.data, (address));

SafeERC20Upgradeable.safeTransferFrom(IERC20Upgradeable(token), from, to, asset.value);
} else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS) {
//not using transfer proxy when transferring from this contract
(address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));

erc1155safeTransferFrom(IERC1155Upgradeable(token), from, to, tokenId, asset.value, "");
}
}
Expand Down

1 comment on commit d7254db

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

82.09%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   AssetMatcher.sol100%100%100%100%
   Exchange.sol80.82%71.88%88.24%87.50%101, 180, 66, 82, 92, 92, 92, 92–93, 93, 93–94
   ExchangeCore.sol86.17%65.63%100%96.08%116, 140–141, 141, 141, 144, 205, 207, 211, 232–233, 250, 76
   OrderValidator.sol71.70%58.33%100%79.17%38, 67–68, 68, 68, 72, 83–84, 89, 91, 91, 91, 91–92, 94
   WhiteList.sol97.73%93.75%100%100%57
packages/marketplace/contracts/exchange/libraries
   LibFill.sol60.87%33.33%75%69.23%32–33, 58, 68–69, 69, 69–70
   LibMath.sol27.50%18.75%50%30%100–103, 17–18, 33–34, 50, 50, 50–51, 72, 72, 72–73, 75, 88, 88, 88–89, 93, 93, 93, 93, 93, 97
packages/marketplace/contracts/interfaces
   IAssetMatcher.sol100%100%100%100%
   IOrderValidator.sol100%100%100%100%
   IRoyaltiesProvider.sol100%100%100%100%
   IWhiteList.sol100%100%100%100%
packages/marketplace/contracts/lib-asset
   LibAsset.sol100%100%100%100%
packages/marketplace/contracts/lib-bp
   BpLibrary.sol100%100%100%100%
packages/marketplace/contracts/lib-order
   LibOrder.sol73.33%50%100%100%64, 64, 66, 66
packages/marketplace/contracts/lib-part
   LibPart.sol0%100%0%0%21
packages/marketplace/contracts/royalties
   IERC2981.sol100%100%100%100%
   LibRoyalties2981.sol78.57%50%100%88.89%19–20, 23
packages/marketplace/contracts/royalties-registry
   IMultiRoyaltyRecipients.sol100%100%100%100%
   RoyaltiesRegistry.sol79.20%79.41%100%75%166–167, 170–171, 212, 216, 232–233, 236–244, 247, 247, 247–248, 250, 256, 259, 276, 60
packages/marketplace/contracts/transfer-manager
   TransferExecutor.sol90.48%75%100%100%24, 30
   TransferManager.sol82.91%72.41%100%87.50%110, 114–115, 203, 210–211, 211, 211–212, 216, 256, 273, 277–279, 279, 279–281, 286–287, 310, 314–315, 62, 82–83
packages/marketplace/contracts/transfer-manager/interfaces
   IRoyaltyUGC.sol100%100%100%100%
   ITransferExecutor.sol100%100%100%100%
   ITransferManager.sol100%100%100%100%
packages/marketplace/contracts/transfer-manager/lib
   LibDeal.sol100%100%100%100%
   LibFeeSide.sol44.44%37.50%100%44.44%21, 24, 24, 24–25, 27, 27, 27–28, 30

Please sign in to comment.