-
Notifications
You must be signed in to change notification settings - Fork 63
contract.ERC721CommunityBase
Aleksey Bykhun edited this page Jan 18, 2023
·
1 revision
Inherits: ERC721A, ReentrancyGuard, Ownable, IERC721Community
This contract is licensed under the MIT license.
You're not allowed to remove DEVELOPER() and DEVELOPER_ADDRESS() from contract
uint256 internal constant SALE_STARTS_AT_INFINITY = 2 ** 256 - 1;
uint256 internal constant DEVELOPER_FEE = 500;
uint256 internal constant MAX_PER_MINT_LIMIT = 50;
address internal constant OPENSEA_CONDUIT = 0x1E0049783F008A0085193E00003D00cd54003c71;
uint256 public startTimestamp = SALE_STARTS_AT_INFINITY;
uint256 public reserved;
uint256 public maxSupply;
uint256 public maxPerMint;
uint256 public maxPerWallet;
uint256 public price;
uint256 public royaltyFee;
address public royaltyReceiver;
address public payoutReceiver;
address public uriExtension;
bool public isPayoutChangeLocked;
bool private isOpenSeaProxyActive;
bool private startAtOne;
Additional data for each token that needs to be stored and accessed on-chain
mapping(uint256 => bytes32) public data;
Storing how many tokens each address has minted in public sale
mapping(address => uint256) public mintedBy;
List of connected extensions
INFTExtension[] public extensions;
string public PROVENANCE_HASH = "";
string private CONTRACT_URI = "";
string private BASE_URI;
string private URI_POSTFIX = "";
constructor(
string memory _name,
string memory _symbol,
uint256 _maxSupply,
uint256 _nReserved,
bool _startAtOne,
string memory _uri,
MintConfig memory _config
) ERC721A(_name, _symbol);
function _configure(
uint256 publicPrice,
uint256 maxTokensPerMint,
uint256 maxTokensPerWallet,
uint256 _royaltyFee,
address _payoutReceiver,
bool shouldLockPayoutReceiver,
bool shouldStartSale,
bool shouldUseJsonExtension
) internal;
function _baseURI() internal view override returns (string memory);
function _startTokenId() internal view virtual override returns (uint256);
function contractURI() public view returns (string memory uri);
function tokenURI(uint256 tokenId) public view override returns (string memory);
function startTokenId() public view returns (uint256);
function setBaseURI(string calldata uri) public onlyOwner;
function setContractURI(string calldata uri) public onlyOwner;
function setPostfixURI(string memory postfix) public onlyOwner;
function setPrice(uint256 _price) public onlyOwner;
function reduceMaxSupply(uint256 _maxSupply) public whenSaleNotStarted onlyOwner;
function lockPayoutReceiver() public onlyOwner;
function isExtensionAdded(address _extension) public view returns (bool);
function extensionsLength() public view returns (uint256);
function addExtension(address _extension) public onlyOwner;
function revokeExtension(address _extension) public onlyOwner;
function setExtensionTokenURI(address extension) public onlyOwner;
function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) public onlyOwner;
function _mintConsecutive(uint256 nTokens, address to, bytes32 extraData) internal;
modifier whenSaleStarted();
modifier whenSaleNotStarted();
modifier whenNotPayoutChangeLocked();
modifier onlyExtension();
function mint(uint256 nTokens) external payable nonReentrant whenSaleStarted;
function claim(uint256 nTokens, address to) external nonReentrant onlyOwner;
function mintExternal(uint256 nTokens, address to, bytes32 extraData) external payable onlyExtension nonReentrant;
function updateMaxPerMint(uint256 _maxPerMint) public onlyOwner nonReentrant;
function updateMaxPerWallet(uint256 _maxPerWallet) public onlyOwner nonReentrant;
function updateStartTimestamp(uint256 _startTimestamp) public onlyOwner;
function startSale() public onlyOwner;
function stopSale() public onlyOwner;
function saleStarted() public view returns (bool);
function setProvenanceHash(string memory provenanceHash) public onlyOwner;
function setRoyaltyFee(uint256 _royaltyFee) public onlyOwner;
function setRoyaltyReceiver(address _receiver) public onlyOwner;
function setPayoutReceiver(address _receiver) public onlyOwner whenNotPayoutChangeLocked;
function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount);
function getPayoutReceiver() public view returns (address payable receiver);
function getRoyaltyReceiver() public view returns (address payable receiver);
receive() external payable;
modifier onlyDeveloper();
function _withdraw() private;
function withdraw() public virtual onlyOwner;
function forceWithdrawDeveloper() public virtual onlyDeveloper;
function withdrawToken(IERC20 token) public virtual onlyOwner;
function DEVELOPER() public pure returns (string memory _url);
function DEVELOPER_ADDRESS() public pure returns (address payable _dev);
function supportsInterface(bytes4 interfaceId) public view override returns (bool);
Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. Taken from CryptoCoven: https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code
function isApprovedForAll(address owner, address operator) public view override returns (bool);
event ExtensionAdded(address indexed extensionAddress);
event ExtensionRevoked(address indexed extensionAddress);
event ExtensionURIAdded(address indexed extensionAddress);