Skip to content

Commit

Permalink
revert on zero-amount 1155 transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Mar 12, 2024
1 parent 1a0a475 commit 725a9cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/BasicOrderFulfiller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,9 @@ contract BasicOrderFulfiller is OrderValidator {

// Determine if the transfer is to be performed via a conduit.
if (conduitKey != bytes32(0)) {
// Ensure that the amount is non-zero.
_assertNonZeroAmount(amount);

// Use free memory pointer as calldata offset for the conduit call.
uint256 callDataOffset;

Expand Down Expand Up @@ -1245,6 +1248,9 @@ contract BasicOrderFulfiller is OrderValidator {
// Perform transfer to caller via the token contract directly.
_performERC721Transfer(token, from, msg.sender, identifier);
} else {
// Ensure that the amount is non-zero.
_assertNonZeroAmount(amount);

// Perform transfer to caller via the token contract directly.
_performERC1155Transfer(
token,
Expand Down

0 comments on commit 725a9cd

Please sign in to comment.