Skip to content

Commit 6ffa9a5

Browse files
committed
fix post merge error
1 parent 21279a9 commit 6ffa9a5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

contracts/token/ERC721/extensions/ERC721Consecutive.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,16 @@ abstract contract ERC721Consecutive is IERC2309, ERC721 {
9090
require(to != address(0), "ERC721Consecutive: mint to the zero address");
9191
require(batchSize <= _maxBatchSize(), "ERC721Consecutive: batch too large");
9292

93-
if (batchSize > 1) {
94-
if (to != address(0)) {
95-
_balances[to] += batchSize;
96-
}
97-
}
93+
// hook before
94+
_beforeTokenTransfer(address(0), to, first, batchSize);
9895

9996
// push an ownership checkpoint & emit event
10097
uint96 last = first + batchSize - 1;
10198
_sequentialOwnership.push(last, uint160(to));
10299
emit ConsecutiveTransfer(first, last, address(0), to);
103100

101+
// hook after
102+
_afterTokenTransfer(address(0), to, first, batchSize);
104103
}
105104

106105
return first;
@@ -141,4 +140,4 @@ abstract contract ERC721Consecutive is IERC2309, ERC721 {
141140
(bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint();
142141
return exists ? latestId + 1 : 0;
143142
}
144-
}
143+
}

0 commit comments

Comments
 (0)