Hey guys! I'm unable to verify my smart contract unfortunately.
Could you please point me to what I might be doing wrong?
Network: Goerli
Contract Address: 0x738fef1663705af5ff1a7dc260527d109f784715
Compiler: 0.8.17
Optimization: Yes
//SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./opensea-operator-filterer/DefaultOperatorFilterer.sol";
contract TheLastChance is DefaultOperatorFilterer, Ownable, ERC721Enumerable {
constructor() ERC721("TheLastChance", "TLC") {}
uint256 public maxSupply = 999;
uint256 minted;
string public baseURI;
string public baseExtension = ".json";
bool public paused = false;
mapping(uint256 => address) public tokenOwner;
mapping(address => uint256) public tokenBalance;
function mint(uint256 _tokenID) public payable {
require(msg.value >= 0.005 ether, "Insufficient payment.");
require(minted < maxSupply, "Max Supply is 999.");
require(_tokenID < maxSupply, "Your character ID should be between 0-998.");
require(!_exists(_tokenID), "Another user has claimed this character.");
require(!paused, "The Last Chance is not live, please wait.");
minted++;
_safeMint(msg.sender, _tokenID);
}
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = string(abi.encodePacked(_newBaseURI));
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
_exists(tokenId);
return
bytes(baseURI).length > 0
? string(
abi.encodePacked(
baseURI,
Strings.toString(tokenId),
".json"
)
)
: "";
}
function setApprovalForAll(address operator, bool approved)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
super.setApprovalForAll(operator, approved);
}
function approve(address operator, uint256 tokenId)
public
override(ERC721, IERC721)
onlyAllowedOperatorApproval(operator)
{
super.approve(operator, tokenId);
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
super.transferFrom(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
super.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public override(ERC721, IERC721) onlyAllowedOperator(from) {
super.safeTransferFrom(from, to, tokenId, data);
}
function withdraw() external onlyOwner {
(bool success, ) = payable(msg.sender).call{
value: address(this).balance
}("");
require(success, "Transfer failed.");
}
function setPaused(bool _state) public onlyOwner {
paused = _state;
}
}
This is how I configured it to make the verification, but I keep getting an error.
See below the error I get now:
Compiler debug log:
Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])
For troubleshooting, you can try compiling your source code with the Remix - Solidity IDE and check for exceptions
Compiler Warning(s):
ParserError: Source "lib/Constants.sol" not found: File import callback not supported
--> DefaultOperatorFilterer.sol:5:1:
|
5 | import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "extensions/IERC721Metadata.sol" not found: File import callback not supported
--> ERC721.sol:8:1:
|
8 | import "./extensions/IERC721Metadata.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/Address.sol" not found: File import callback not supported
--> ERC721.sol:9:1:
|
9 | import "../../utils/Address.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/Context.sol" not found: File import callback not supported
--> ERC721.sol:10:1:
|
10 | import "../../utils/Context.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/Strings.sol" not found: File import callback not supported
--> ERC721.sol:11:1:
|
11 | import "../../utils/Strings.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/introspection/ERC165.sol" not found: File import callback not supported
--> ERC721.sol:12:1:
|
12 | import "../../utils/introspection/ERC165.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/introspection/IERC165.sol" not found: File import callback not supported
--> IERC721.sol:6:1:
|
6 | import "../../utils/introspection/IERC165.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "lib/Constants.sol" not found: File import callback not supported
--> OperatorFilterer.sol:5:1:
|
5 | import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "utils/Context.sol" not found: File import callback not supported
--> Ownable.sol:6:1:
|
6 | import "../utils/Context.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "math/Math.sol" not found: File import callback not supported
--> Strings.sol:6:1:
|
6 | import "./math/Math.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol" not found: File import callback not supported
--> TheLastChance.sol:4:1:
|
4 | import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported
--> TheLastChance.sol:5:1:
|
5 | import "@openzeppelin/contracts/access/Ownable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "opensea-operator-filterer/DefaultOperatorFilterer.sol" not found: File import callback not supported
--> TheLastChance.sol:6:1:
|
6 | import "./opensea-operator-filterer/DefaultOperatorFilterer.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^