Skip to content

Commit

Permalink
Merge pull request #1159 from thesandboxgame/feat/marketplace-package…
Browse files Browse the repository at this point in the history
…-match

test: matching orders
  • Loading branch information
capedcrusader21 authored Sep 26, 2023
2 parents e66bddc + 57c8e60 commit 718bd7c
Show file tree
Hide file tree
Showing 8 changed files with 1,178 additions and 239 deletions.
3 changes: 3 additions & 0 deletions packages/marketplace/contracts/lib-asset/LibAsset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ library LibAsset {
bytes4 public constant ERC20_ASSET_CLASS = bytes4(keccak256("ERC20"));
bytes4 public constant ERC721_ASSET_CLASS = bytes4(keccak256("ERC721"));
bytes4 public constant ERC1155_ASSET_CLASS = bytes4(keccak256("ERC1155"));
// TODO: Unused ?
bytes4 public constant ERC721_TSB_CLASS = bytes4(keccak256("ERC721_TSB"));
// TODO: Unused ?
bytes4 public constant ERC1155_TSB_CLASS = bytes4(keccak256("ERC1155_TSB"));
// TODO: rename to BUNDLE_ASSET_CLASS ?
bytes4 public constant BUNDLE = bytes4(keccak256("BUNDLE"));

bytes32 internal constant ASSET_TYPE_TYPEHASH = keccak256("AssetType(bytes4 assetClass,bytes data)");
Expand Down
Loading

1 comment on commit 718bd7c

@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

29.09%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   AssetMatcher.sol67.12%60%100%69.23%49–50, 50, 50–51, 53, 56, 59, 62, 65, 67–68, 68, 68–69, 71, 73–74, 74, 74–75, 77, 80–81
   Exchange.sol83.33%83.33%75%87.50%33, 56
   ExchangeCore.sol46.35%31.40%72.73%52%129–132, 144, 146, 159, 159, 159, 161, 173, 184–186, 192, 194, 206, 218–219, 251–252, 252, 252, 252, 252, 254–255, 255, 255, 255, 255, 297, 297, 297–298, 298, 298–299, 299, 299, 301–302, 302, 302–303, 303, 303–304, 304, 304–305, 307–308, 308, 308–309, 309, 309–310, 336–337, 339–340, 396, 405–407, 407, 407–409, 409, 409–410, 410–412, 412, 412, 414, 416, 416, 416, 418, 429, 432–433, 437–438, 441, 469, 471–473, 479–481, 496–497, 512, 514, 530–531, 531, 531–532, 534–535, 537, 544, 544, 544–545, 547, 547, 547–548, 550, 73
   ExchangeMeta.sol0%0%0%0%33, 33–36, 42, 52, 56, 61, 61–62, 62, 62, 64
   OrderValidator.sol77.14%64.71%100%86.21%108–109, 114, 116, 116, 116, 116–117, 119, 37, 80, 87–88, 88, 88, 98
   WhiteList.sol97.62%93.75%100%100%50
packages/marketplace/contracts/exchange/libraries
   LibDirectTransfer.sol100%100%100%100%
   LibFill.sol55%33.33%66.67%63.64%48–49, 61, 71–72, 72, 72–73
   LibOrderDataGeneric.sol21.67%22.22%40%18.92%18–28, 30–31, 33, 46, 48, 48, 48–49, 51–52, 55, 55, 55–56, 58, 61, 61, 61–62, 64, 67, 71, 73, 73, 73–75, 78, 87, 87, 87–89
packages/marketplace/contracts/exchange/mocks
   ERC1155LazyMintTest.sol100%100%100%100%
   ERC721LazyMintTest.sol100%100%100%100%
   ExchangeSimple.sol0%0%0%0%15, 15–17, 27, 31
   ExchangeSimple1.sol0%100%0%0%9
   ExchangeTestImports.sol100%100%100%100%
   LibFillTest.sol0%100%0%0%17
   LibOrderTest.sol0%100%0%0%13, 17, 21, 25, 35, 47
   MockTrustedForwarder.sol0%0%0%0%14, 17–18, 18, 18–19
   OrderValidatorTest.sol0%0%0%0%13, 8, 8–9
   RaribleTestHelper.sol0%100%0%0%11, 15, 19, 23, 33
   SimpleTransferManager.sol0%100%0%0%13–16
   TestAssetMatcher.sol0%0%0%0%12, 12, 12–15, 15, 15–16, 19
   TestERC1155WithRoyaltyV2981.sol100%100%100%100%
   TestERC1271.sol0%0%0%0%24, 28, 28, 28
   TestERC20.sol100%100%100%100%
   TestERC721.sol100%100%100%100%
   TestERC721WithRoyaltyV2981.sol100%100%100%100%
   TestERC721WithRoyaltyV2981Multi.sol100%100%100%100%
   TestMinimalForwarder.sol0%0%0%0%12–15, 15, 15–16
   TestRoyaltiesRegistry.sol18%16.67%25%17.86%21–23, 23, 23–24, 24, 24–26, 28, 28, 28–29, 33, 38–39, 42–46, 50, 62–65, 65, 65–66, 66, 66–68, 70, 70, 70–71
   TransferManagerTest.sol0%0%0%0%107, 110–111, 115–116, 119, 126–127, 129, 21, 21–23, 35, 46–47, 72, 72, 72, 78, 81–83, 83, 83–85, 85, 85–86, 86–88, 88, 88, 90, 92, 92, 92, 94
packages/marketplace/contracts/exchange/mocks/tokens
   ERC2981.sol0%0%0%0%106, 38, 38, 38, 45, 47, 47, 47–48, 51, 53, 62, 74, 74, 74–75, 75, 75, 77, 84, 96, 96, 96–97, 97, 97, 99
   MintableERC1155.sol0%100%0%0%10, 14
   MintableERC1155WithRoyalties.sol0%0%0%0%13, 17, 21, 25, 9, 9, 9
   MintableERC20.sol0%100%0%0%10
   MintableERC721.sol0%100%0%0%10
   MintableERC721WithRoyalties.sol0%0%0%0%13,

Please sign in to comment.