-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When implementing the OperatorFilterer.sol on a base ERC721A the compiler ran into an issue referencing the override of the IERC721A interface. My solution was to remove the reference to IERC721A in the OperatorFilterer methods considering in later solidity versions overriding interfaces is not necessary for functions that override a single interface function.
Issue
The implemented setApprovalForAll function:
function setApprovalForAll(address operator, bool approved)
public
override(IERC721A,ERC721A)
onlyAllowedOperatorApproval(operator)
{
super.setApprovalForAll(operator, approved);
}Error received:
TypeError: Invalid contract specified in override list: "IERC721A".
--> contracts/721AToken.sol:169:9:
|
169 | override(IERC721A, ERC721A)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: This contract:
--> erc721a/contracts/IERC721A.sol:10:1:
|
10 | interface IERC721A {
| ^ (Relevant source part starts here and spans across multiple lines).
My Solution
Implement OperatorFilterer methods without overriding the ERC721 Interface
function setApprovalForAll(address operator, bool approved)
public
override(ERC721A)
onlyAllowedOperatorApproval(operator)
{
super.setApprovalForAll(operator, approved);
}If this fix goes against the grain please let me know, or if there is a better proposed solution that I could implement.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels