You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This inheritance method will cause the contract to not support the ERC721 standard, and the 4.0.0 version does not support this inheritance method, and the previous version is OK.
contract Contract is
ERC721A,
AccessControl
{
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(AccessControl, ERC721A)
returns (bool)
{
return
super.supportsInterface(interfaceId);
}
}
I found that the latest version modifies the following code
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes of the XOR of
// all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
// e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
If it is modified to this way, there is no problem
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(AccessControl, ERC721A)
returns (bool)
{
return
super.supportsInterface(interfaceId) ||
ERC721A.supportsInterface(interfaceId);
}
The text was updated successfully, but these errors were encountered:
This inheritance method will cause the contract to not support the ERC721 standard, and the 4.0.0 version does not support this inheritance method, and the previous version is OK.
I found that the latest version modifies the following code
If it is modified to this way, there is no problem
The text was updated successfully, but these errors were encountered: