Refactor consecutive transfer hooks (#3753)
(cherry picked from commit 08d5e4a9b0)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
committed by
Hadrien Croubois
parent
4e18cdc186
commit
3742c16948
@ -38,25 +38,18 @@ contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable
|
||||
function _beforeTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
uint256 firstTokenId,
|
||||
uint256 batchSize
|
||||
) internal virtual override(ERC721, ERC721Enumerable) {
|
||||
super._beforeTokenTransfer(from, to, tokenId);
|
||||
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
|
||||
}
|
||||
|
||||
function _afterTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
uint256 firstTokenId,
|
||||
uint256 batchSize
|
||||
) internal virtual override(ERC721, ERC721Consecutive) {
|
||||
super._afterTokenTransfer(from, to, tokenId);
|
||||
}
|
||||
|
||||
function _beforeConsecutiveTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 first,
|
||||
uint96 size
|
||||
) internal virtual override(ERC721, ERC721Enumerable) {
|
||||
super._beforeConsecutiveTokenTransfer(from, to, first, size);
|
||||
super._afterTokenTransfer(from, to, firstTokenId, batchSize);
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,35 +63,19 @@ contract ERC721ConsecutiveMock is ERC721Burnable, ERC721Consecutive, ERC721Pausa
|
||||
function _beforeTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
uint256 firstTokenId,
|
||||
uint256 batchSize
|
||||
) internal virtual override(ERC721, ERC721Pausable) {
|
||||
super._beforeTokenTransfer(from, to, tokenId);
|
||||
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
|
||||
}
|
||||
|
||||
function _afterTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
uint256 firstTokenId,
|
||||
uint256 batchSize
|
||||
) internal virtual override(ERC721, ERC721Votes, ERC721Consecutive) {
|
||||
super._afterTokenTransfer(from, to, tokenId);
|
||||
}
|
||||
|
||||
function _beforeConsecutiveTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 first,
|
||||
uint96 size
|
||||
) internal virtual override(ERC721, ERC721Pausable) {
|
||||
super._beforeConsecutiveTokenTransfer(from, to, first, size);
|
||||
}
|
||||
|
||||
function _afterConsecutiveTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 first,
|
||||
uint96 size
|
||||
) internal virtual override(ERC721, ERC721Votes) {
|
||||
super._afterConsecutiveTokenTransfer(from, to, first, size);
|
||||
super._afterTokenTransfer(from, to, firstTokenId, batchSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user