Skip to content

Commit

Permalink
fix: lint in Truster Forwarder Mock
Browse files Browse the repository at this point in the history
  • Loading branch information
capedcrusader21 committed Sep 22, 2023
1 parent 97d60df commit d4508d3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/marketplace/contracts/test/TrustedForwarderMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pragma solidity 0.8.21;

contract TrustedForwarderMock {

struct ForwardRequest {
address from;
address to;
Expand All @@ -13,13 +12,10 @@ contract TrustedForwarderMock {
bytes data;
}

function execute(ForwardRequest calldata req, bytes calldata)
public
payable
returns (bool, bytes memory)
{
(bool success, bytes memory returndata) =
req.to.call{gas : req.gas, value : req.value}(abi.encodePacked(req.data, req.from));
function execute(ForwardRequest calldata req, bytes calldata) public payable returns (bool, bytes memory) {
(bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}(
abi.encodePacked(req.data, req.from)
);
assert(gasleft() > req.gas / 63);
return (success, returndata);
}
Expand Down

1 comment on commit d4508d3

@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

7.39%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   AssetMatcher.sol56.16%46.67%100%58.97%49–50, 50, 50–51, 53, 55–56, 56, 56–57, 59, 61–62, 62, 62–63, 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.sol13.73%11.63%22.73%13.60%129–132, 144, 146, 159, 159, 159, 161, 173, 184–186, 192, 194, 206, 218–219, 234–235, 249–251, 251, 251–252, 252, 252, 252, 252, 254, 254, 254–255, 255, 255, 255, 255, 263, 265, 271, 294–295, 297, 297, 297, 297, 297–298, 298, 298–299, 299, 299, 301, 301, 301–302, 302, 302–303, 303, 303–304, 304, 304–305, 307, 307–308, 308, 308–309, 309, 309–310, 332–333, 335–336, 336, 336–337, 339, 339, 339–340, 343–344, 346, 372–373, 396, 396, 396, 402, 405–407, 407, 407–409, 409, 409–410, 410–412, 412, 412, 414, 416, 416, 416, 418, 429, 432–433, 437–438, 441, 458–460, 469, 469, 469, 471, 471, 471–472, 472, 472–473, 475, 479, 479, 479–480, 480, 480–481, 483, 487, 489, 496, 496, 496–497, 499, 511–512, 512, 512–514, 514, 514, 523–524, 530–531, 531, 531–532, 534–535, 537, 544, 544, 544–545, 547, 547, 547–548, 550, 73, 73–75, 77
   ExchangeMeta.sol0%0%0%0%33, 33–36, 42, 52, 56, 61, 61–62, 62, 62, 64
   OrderValidator.sol5.71%2.94%14.29%6.90%108, 108, 108–109, 114, 114, 114–116, 116, 116, 116–117, 119, 37, 44, 44–45, 45, 45–46, 46, 46–47, 49, 55, 63–64, 66, 74, 74, 74–76, 79, 79, 79–80, 80, 80–81, 81, 81, 84, 84, 84–85, 87, 87, 87–88, 88, 88, 95, 95, 95–96, 98, 98, 98
   WhiteList.sol21.43%6.25%12.50%38.89%100, 100–101, 106, 106–107, 50, 65, 65–69, 71, 76, 76–77, 82, 82–83, 88, 88–89, 94, 94–95
packages/marketplace/contracts/exchange/libraries
   LibDirectTransfer.sol100%100%100%100%
   LibFill.sol0%0%0%0%37, 42, 48, 48, 48–49, 51, 60–61, 61, 61–62, 71–72, 72, 72–73
   LibOrderDataGeneric.sol0%0%0%0%18, 18, 18–24, 24–28, 30, 30–31, 33, 33, 33–34, 39–42, 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,

Please sign in to comment.