Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing override specifier #18

Closed
ElasticBottle opened this issue Jul 31, 2022 · 3 comments
Closed

Missing override specifier #18

ElasticBottle opened this issue Jul 31, 2022 · 3 comments

Comments

@ElasticBottle
Copy link

ElasticBottle commented Jul 31, 2022

Trying to use the ERC4907AUpgradeable contract with the ERC721A contract and I'm getting a

TypeError: Overriding function is missing "override" specifier.
  --> erc721a-upgradeable/contracts/extensions/ERC4907AUpgradeable.sol:61:5:
   |
61 |     function userOf(uint256 tokenId) public view virtual returns (address) {
   |     ^ (Relevant source part starts here and spans across multiple lines).
Note: Overridden function is here:
  --> erc721a-upgradeable/contracts/extensions/IERC4907AUpgradeable.sol:42:5:
   |
42 |     function userOf(uint256 tokenId) external view returns (address);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


TypeError: Overriding function is missing "override" specifier.
  --> erc721a-upgradeable/contracts/extensions/ERC4907AUpgradeable.sol:79:5:
   |
79 |     function userExpires(uint256 tokenId) public view virtual returns (uint256) {
   |     ^ (Relevant source part starts here and spans across multiple lines).
Note: Overridden function is here:
  --> erc721a-upgradeable/contracts/extensions/IERC4907AUpgradeable.sol:47:5:
   |
47 |     function userExpires(uint256 tokenId) external view returns (uint256);

Also, likely unrelated, but I'm required to override the supportsInterface function, but am getting a

TypeError: Invalid contract specified in override list: "IERC721AUpgradeable".
  --> contracts/myContract.sol:72:9:
   |
72 |         override(
   |         ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: 
  --> erc721a-upgradeable/contracts/IERC721AUpgradeable.sol:10:1:
   |
10 | interface IERC721AUpgradeable {
   | ^ (Relevant source part starts here and spans across multiple lines).

On pragma solidity ^0.8.4;

Here's my inheritance list:

contract CurdRouletteTableNft is
    ERC721AUpgradeable,
    Initializable,
    AccessControlUpgradeable,
    ERC721ABurnableUpgradeable,
    ERC721AQueryableUpgradeable,
    ERC4907AUpgradeable,
    UUPSUpgradeable

Happy to make necessary change and post a PR for review

@Vectorized
Copy link
Collaborator

For now, add in the overrides into the files (if you are using hardhat, they are inside node_modules/erc721a).

Then see if it can compile.

@ElasticBottle
Copy link
Author

Yeap, they compile just fine 👍🏼

@ElasticBottle
Copy link
Author

Sweet, saw the update, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants