Skip to content

Commit

Permalink
Revert if offer item is ETH
Browse files Browse the repository at this point in the history
  • Loading branch information
d1ll0n committed Jun 8, 2022
1 parent 3e12ddd commit ff862bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/lib/OrderFulfiller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ contract OrderFulfiller is
for (uint256 i = 0; i < orderParameters.offer.length; ++i) {
// Retrieve the offer item.
OfferItem memory offerItem = orderParameters.offer[i];
// Offer items for the native token can not be received
// outside of a match order function.
if (offerItem.itemType == ItemType.NATIVE) {
revert InvalidNativeOfferItem();
}
// Declare a nested scope to minimize stack depth.
{
// Apply fill fraction to get offer item amount to transfer.
Expand Down

0 comments on commit ff862bd

Please sign in to comment.