@notice Extension of ERC721C that adds basic royalties support.
@dev These contracts are intended for example use and are not intended for production deployments as-is.
*/
contract ERC721CWithBasicRoyalties is OwnableBasic, ERC721C, BasicRoyalties {
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721C, ERC2981) returns (bool) {
return super.supportsInterface(interfaceId);
}
function mint(address to, uint256 tokenId) external {
_mint(to, tokenId);
}
function safeMint(address to, uint256 tokenId) external {
_safeMint(to, tokenId);
}
function burn(uint256 tokenId) external {
_burn(tokenId);
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public {
_requireCallerIsContractOwner();
_setDefaultRoyalty(receiver, feeNumerator);
}
function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public {
_requireCallerIsContractOwner();
_setTokenRoyalty(tokenId, receiver, feeNumerator);
}
} `
I get the Errors:
` TypeError: Function has override specified but does not override anything.
--> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:25:45:
|
25 | uint256 batchSize) internal virtual override {
| ^^^^^^^^
TypeError: Function has override specified but does not override anything.
--> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:39:45:
|
39 | uint256 batchSize) internal virtual override {
| ^^^^^^^^
TypeError: Function has override specified but does not override anything.
--> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:64:45:
|
64 | uint256 batchSize) internal virtual override {
| ^^^^^^^^
TypeError: Function has override specified but does not override anything.
--> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:78:45:
|
78 | uint256 batchSize) internal virtual override {
| ^^^^^^^^
TypeError: No arguments passed to the base constructor. Specify the arguments or mark "MyERC721C" as abstract.
--> contracts/ERC721C.sol:12:1:
12
contract MyERC721C is OwnableBasic, ERC721C, BasicRoyalties {
^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> @openzeppelin/contracts/access/Ownable.sol:38:16:
38
constructor(address initialOwner) {
^^^^^^^^^^^^^^^^^^^^^^
Error HH600: Compilation failed `
which seems to stem from a missing constructor of the OwnableBasic inheritance.
I am using solidity: "0.8.24", in my hardhat config
okay i just managed to deploy the ERC721C with hardhat
using "@openzeppelin/contracts": "^4.8.3"
apparently the version 5 brought breaking changes...
good to know
Hey there when I try to deploy the ERC721CWithBasicRoyalties using hardhat I get the Error
` // SPDX-License-Identifier: MIT pragma solidity ^0.8.4;
import "../../access/OwnableBasic.sol"; import "../../erc721c/ERC721C.sol"; import "../../programmable-royalties/BasicRoyalties.sol";
/**
@dev These contracts are intended for example use and are not intended for production deployments as-is. */ contract ERC721CWithBasicRoyalties is OwnableBasic, ERC721C, BasicRoyalties {
constructor( address royaltyReceiver, uint96 royaltyFeeNumerator, string memory name, string memory symbol) ERC721OpenZeppelin(name, symbol) BasicRoyalties(royaltyReceiver, royaltyFeeNumerator) { }
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721C, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); }
function mint(address to, uint256 tokenId) external { _mint(to, tokenId); }
function safeMint(address to, uint256 tokenId) external { _safeMint(to, tokenId); }
function burn(uint256 tokenId) external { _burn(tokenId); }
function setDefaultRoyalty(address receiver, uint96 feeNumerator) public { _requireCallerIsContractOwner(); _setDefaultRoyalty(receiver, feeNumerator); }
function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public { _requireCallerIsContractOwner(); _setTokenRoyalty(tokenId, receiver, feeNumerator); } } `
I get the Errors:
` TypeError: Function has override specified but does not override anything. --> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:25:45: | 25 | uint256 batchSize) internal virtual override { | ^^^^^^^^
TypeError: Function has override specified but does not override anything. --> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:39:45: | 39 | uint256 batchSize) internal virtual override { | ^^^^^^^^
TypeError: Function has override specified but does not override anything. --> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:64:45: | 64 | uint256 batchSize) internal virtual override { | ^^^^^^^^
TypeError: Function has override specified but does not override anything. --> @limitbreak/creator-token-contracts/contracts/erc721c/ERC721C.sol:78:45: | 78 | uint256 batchSize) internal virtual override { | ^^^^^^^^
Error HH600: Compilation failed `
which seems to stem from a missing constructor of the OwnableBasic inheritance.
I am using solidity: "0.8.24", in my hardhat config