Skip to content

Commit

Permalink
Merge pull request #952 from ProjectOpenSea/1.2-morecoverage
Browse files Browse the repository at this point in the history
Add conduit fuzz tests for basic orders, LowLevelHelpers test
  • Loading branch information
0age authored Jan 31, 2023
2 parents f822231 + 07301b7 commit 2ba02b7
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 60 deletions.
2 changes: 1 addition & 1 deletion contracts/test/InvalidEthRecipient.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.13;
contract InvalidEthRecipient {
receive() external payable {
revert(
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
);
}
}
34 changes: 20 additions & 14 deletions test/foundry/FulfillBasicOrderTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
uint128 paymentAmount;
bytes32 zoneHash;
uint256 salt;
bool useConduit;
}
struct Context {
ConsiderationInterface consideration;
Expand Down Expand Up @@ -115,6 +116,9 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
basicOrderParameters.considerationAmount = 1;
basicOrderParameters
.totalOriginalAdditionalRecipients = finalAdditionalRecipients;
basicOrderParameters.fulfillerConduitKey = inputs.useConduit
? conduitKeyOne
: bytes32(0);

test(
this.basicEthTo721WithAdditionalRecipients,
Expand Down Expand Up @@ -470,7 +474,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand All @@ -488,7 +492,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
basicOrderParameters.signature = signature;

bytes
memory expectedRevert = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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derTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);

uint256 counter = context.consideration.getCounter(alice);
Expand Down Expand Up @@ -725,8 +729,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
}

function testRevertInvalidTimestamp(
FuzzInputsCommon memory inputs,
uint128 tokenAmount
FuzzInputsCommon memory inputs
) public validateInputs(Context(consideration, inputs, 0)) {
addErc721OfferItem(inputs.tokenId);
addEthConsiderationItem(alice, inputs.paymentAmount);
Expand Down Expand Up @@ -781,8 +784,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
}

function testRevertMissingOriginalConsiderationItems(
FuzzInputsCommon memory inputs,
uint128 tokenAmount
FuzzInputsCommon memory inputs
) public validateInputs(Context(consideration, inputs, 0)) {
addErc721OfferItem(inputs.tokenId);
addEthConsiderationItem(alice, inputs.paymentAmount);
Expand Down Expand Up @@ -862,7 +864,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand Down Expand Up @@ -890,7 +892,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand Down Expand Up @@ -920,7 +922,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand Down Expand Up @@ -949,7 +951,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand Down Expand Up @@ -989,7 +991,7 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
context.args.zone,
context.args.zoneHash,
context.args.salt,
bytes32(0)
context.args.useConduit ? conduitKeyOne : bytes32(0)
);
uint256 counter = context.consideration.getCounter(alice);
baseOrderComponents.counter = counter;
Expand Down Expand Up @@ -1028,7 +1030,9 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
basicOrderParameters.endTime = block.timestamp + 100;
basicOrderParameters.zoneHash = args.zoneHash;
basicOrderParameters.salt = args.salt;
basicOrderParameters.offererConduitKey = bytes32(0);
basicOrderParameters.offererConduitKey = args.useConduit
? conduitKeyOne
: bytes32(0);
basicOrderParameters.fulfillerConduitKey = bytes32(0);
basicOrderParameters.totalOriginalAdditionalRecipients = 0;
// additional recipients should always be empty
Expand All @@ -1053,7 +1057,9 @@ contract FulfillBasicOrderTest is BaseOrderTest, ConsiderationEventsAndErrors {
basicOrderParameters.endTime = block.timestamp + 100;
basicOrderParameters.zoneHash = args.zoneHash;
basicOrderParameters.salt = args.salt;
basicOrderParameters.offererConduitKey = bytes32(0);
basicOrderParameters.offererConduitKey = args.useConduit
? conduitKeyOne
: bytes32(0);
basicOrderParameters.fulfillerConduitKey = bytes32(0);
basicOrderParameters.totalOriginalAdditionalRecipients = 0;
// additional recipients should always be empty
Expand Down
10 changes: 1 addition & 9 deletions test/foundry/offerers/TestPoolOffererImpl.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,6 @@ contract TestPoolOffererImpl is Test {
});
vm.startPrank(seaport);
vm.expectRevert(TestPoolOfferer.InvalidItemType.selector);
(
SpentItem[] memory spentItems,
ReceivedItem[] memory receivedItems
) = test.generateOrder(
address(this),
minimumReceived,
maximumSpent,
""
);
test.generateOrder(address(this), minimumReceived, maximumSpent, "");
}
}
Loading

0 comments on commit 2ba02b7

Please sign in to comment.