diff --git a/src/ERC721ACH.sol b/src/ERC721ACH.sol index a95b534..cbae07a 100644 --- a/src/ERC721ACH.sol +++ b/src/ERC721ACH.sol @@ -55,6 +55,7 @@ contract ERC721ACH is ERC721AC, IERC721ACH { uint256 startTokenId, uint256 quantity ) internal virtual override { + super._beforeTokenTransfers(from, to, startTokenId, quantity); IBeforeTokenTransfersHook beforeTokenTransfersHook = IBeforeTokenTransfersHook(hooks[HookType.BeforeTokenTransfers]); if ( address(beforeTokenTransfersHook) != address(0) && @@ -66,9 +67,7 @@ contract ERC721ACH is ERC721AC, IERC721ACH { startTokenId, quantity ); - } else { - super._beforeTokenTransfers(from, to, startTokenId, quantity); - } + } } /// TODO @@ -78,6 +77,8 @@ contract ERC721ACH is ERC721AC, IERC721ACH { uint256 startTokenId, uint256 quantity ) internal virtual override { + + super._afterTokenTransfers(from, to, startTokenId, quantity); IAfterTokenTransfersHook afterTokenTransfersHook = IAfterTokenTransfersHook(hooks[HookType.AfterTokenTransfers]); if ( address(afterTokenTransfersHook) != address(0) && @@ -89,9 +90,7 @@ contract ERC721ACH is ERC721AC, IERC721ACH { startTokenId, quantity ); - } else { - super._afterTokenTransfers(from, to, startTokenId, quantity); - } + } } diff --git a/test/utils/ERC721ACHMock.sol b/test/utils/ERC721ACHMock.sol index bfc6fe6..09984f3 100644 --- a/test/utils/ERC721ACHMock.sol +++ b/test/utils/ERC721ACHMock.sol @@ -7,6 +7,8 @@ contract ERC721ACHMock is ERC721ACH { bool public hooksEnabled; address public owner; + error Access_OnlyOwner(); + constructor(address _owner) ERC721ACH("ERC-721ACH Mock", "MOCK") { owner = _owner; }