Open Olive-l opened 1 year ago
btw, if I removed the ERC721EnumerableUpgradeable, everything works fine
You can remove the import of IERC721Upgradeable
from the IERC721EnumerableUpgradeable
file, which is imported in ERC721Enumerable
; instead of that import IERC165Upgradeable
from @openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol
in IERC721EnumerableUpgradeable
. This will help you solve your issue.
I am using the example upgradeable contact, and modify some code to add the ERC721EnumerableUpgradeable, like as blow:
abstract contract ExampleERC721Upgradeable is ERC721Upgradeable, DefaultOperatorFiltererUpgradeable, OwnableUpgradeable, ERC721EnumerableUpgradeable
and I override the functions of ERC721EnumerableUpgradeable accordingly. Then I will get the error message:The detail error message is :
Note: This contract: --> @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol:11:1: | 11 | interface IERC721Upgradeable is IERC165Upgradeable { | ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: --> @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol:11:1: | 11 | interface IERC721Upgradeable is IERC165Upgradeable { | ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: --> @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol:11:1: | 11 | interface IERC721Upgradeable is IERC165Upgradeable { | ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: --> @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol:11:1: | 11 | interface IERC721Upgradeable is IERC165Upgradeable { | ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: --> @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol:11:1: | 11 | interface IERC721Upgradeable is IERC165Upgradeable { | ^ (Relevant source part starts here and spans across multiple lines).
TypeError: Wrong argument count for modifier invocation: 0 arguments given but expected 1. --> contracts/TEST.sol:50:81: | 50 | function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `
Could somebody help me fix this? thx in advance!