ETH Price: $2,499.84 (-0.55%)

Contract

0x5C50c2FF0507bde531A9BcD451A9BD7601871C7c
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
Age
From
To
Set Approval For...210586472024-10-27 18:06:11121 days ago1730052371IN
0x5C50c2FF...601871C7c
0 ETH0.000339916.96469414
Reveal193400252024-03-01 11:27:35361 days ago1709292455IN
0x5C50c2FF...601871C7c
0 ETH0.0025270851.17726989

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
Age
From
To
193399582024-03-01 11:14:11361 days ago1709291651
 Contract Creation
0 ETH
Loading...
Loading

Minimal Proxy Contract for 0x4e457a371e1c109dbf6d5c38327117f0c8835e05

Contract Name:
NFTDropCollection

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1337000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 44 : NFTDropCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "../interfaces/internal/INFTDropCollectionInitializer.sol";
import "../mixins/collections/CollectionRoyalties.sol";
import "../mixins/collections/ERC4906.sol";
import "../mixins/collections/LazyMintedCollection.sol";
import "../mixins/collections/NFTCollectionType.sol";
import "../mixins/collections/RevealableCollection.sol";
import "../mixins/collections/SequentialMintCollection.sol";
import "../mixins/collections/SharedPaymentCollection.sol";
import "../mixins/collections/SharedURICollection.sol";
import "../mixins/collections/SupplyLock.sol";
import "../mixins/collections/TokenLimitedCollection.sol";
import "../mixins/roles/AdminRole.sol";
import "../mixins/roles/MinterRole.sol";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 2 of 44 : AccessControlUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 3 of 44 : IAccessControlUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControlUpgradeable {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 4 of 44 : Initializable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 5 of 44 : ERC721Upgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
using AddressUpgradeable for address;
using StringsUpgradeable for uint256;
// Token name
string private _name;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 6 of 44 : ERC721BurnableUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC721Upgradeable.sol";
import "../../../utils/ContextUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be burned (destroyed).
*/
abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {
function __ERC721Burnable_init() internal onlyInitializing {
}
function __ERC721Burnable_init_unchained() internal onlyInitializing {
}
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 7 of 44 : IERC721MetadataUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721Upgradeable.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 8 of 44 : IERC721ReceiverUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721ReceiverUpgradeable {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 9 of 44 : IERC721Upgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165Upgradeable.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721Upgradeable is IERC165Upgradeable {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 10 of 44 : AddressUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 11 of 44 : ContextUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 12 of 44 : ERC165Upgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal onlyInitializing {
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 13 of 44 : IERC165Upgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165Upgradeable {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 14 of 44 : MathUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 15 of 44 : SignedMathUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMathUpgradeable {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 16 of 44 : StringsUpgradeable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/MathUpgradeable.sol";
import "./math/SignedMathUpgradeable.sol";
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = MathUpgradeable.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 17 of 44 : Math.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 18 of 44 : SignedMath.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 19 of 44 : ShortStrings.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.8;
import "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 20 of 44 : StorageSlot.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 21 of 44 : Strings.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 22 of 44 : INFTCollectionType.sol
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @title Declares the type of the collection contract.
* @dev This interface is declared as an ERC-165 interface.
* @author reggieag
*/
interface INFTCollectionType {
function getNFTCollectionType() external view returns (string memory collectionType);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 23 of 44 : INFTDropCollectionInitializer.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @title Declares the interface for initializing an NFTDropCollection contract.
* @author batu-inal & HardlyDifficult
*/
interface INFTDropCollectionInitializer {
function initialize(
address payable _creator,
string calldata _name,
string calldata _symbol,
string calldata _baseURI,
bool isRevealed,
uint32 _maxTokenId,
address _approvedMinter,
address payable _paymentAddress
) external;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 24 of 44 : INFTLazyMintedCollectionMintCountTo.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @title The required interface for collections to support minting from the NFTDropMarket.
* @dev This interface must be registered as a ERC165 supported interface.
* @author batu-inal & HardlyDifficult
*/
interface INFTLazyMintedCollectionMintCountTo {
function mintCountTo(uint16 count, address to) external returns (uint256 firstTokenId);
/**
* @notice Get the number of tokens which can still be minted.
* @return count The max number of additional NFTs that can be minted by this collection.
*/
function numberOfTokensAvailableToMint() external view returns (uint256 count);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 25 of 44 : INFTSupplyLock.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @title Allows an approved minter to lock down supply changes for a limited period of time.
* @dev This is used to help ensure minting access and token supply are not manipulated during an active minting period.
* @author HardlyDifficult
*/
interface INFTSupplyLock {
/**
* @notice Request a supply lock for a limited period of time.
* @param expiration The date/time when the lock expires, in seconds since the Unix epoch.
* @dev The caller must already be an approved minter.
* If a lock has already been requested, it may be cleared by the lock holder by passing 0 for the expiration.
*/
function minterAcquireSupplyLock(uint256 expiration) external;
/**
* @notice Get the current supply lock holder and expiration, if applicable.
* @return supplyLockHolder The address of with lock access, or the zero address if supply is not locked.
* @return supplyLockExpiration The date/time when the lock expires, in seconds since the Unix epoch. Returns 0 if a
* lock has not been requested or if it has already expired.
*/
function getSupplyLock() external view returns (address supplyLockHolder, uint256 supplyLockExpiration);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 26 of 44 : IGetFees.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @notice An interface for communicating fees to 3rd party marketplaces.
* @dev Originally implemented in mainnet contract 0x44d6e8933f8271abcf253c72f9ed7e0e4c0323b3
*/
interface IGetFees {
/**
* @notice Get the recipient addresses to which creator royalties should be sent.
* @dev The expected royalty amounts are communicated with `getFeeBps`.
* @param tokenId The ID of the NFT to get royalties for.
* @return recipients An array of addresses to which royalties should be sent.
*/
function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory recipients);
/**
* @notice Get the creator royalty amounts to be sent to each recipient, in basis points.
* @dev The expected recipients are communicated with `getFeeRecipients`.
* @param tokenId The ID of the NFT to get royalties for.
* @return royaltiesInBasisPoints The array of fees to be sent to each recipient, in basis points.
*/
function getFeeBps(uint256 tokenId) external view returns (uint256[] memory royaltiesInBasisPoints);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 27 of 44 : IGetRoyalties.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
interface IGetRoyalties {
/**
* @notice Get the creator royalties to be sent.
* @dev The data is the same as when calling `getFeeRecipients` and `getFeeBps` separately.
* @param tokenId The ID of the NFT to get royalties for.
* @return recipients An array of addresses to which royalties should be sent.
* @return royaltiesInBasisPoints The array of fees to be sent to each recipient, in basis points.
*/
function getRoyalties(
uint256 tokenId
) external view returns (address payable[] memory recipients, uint256[] memory royaltiesInBasisPoints);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 28 of 44 : IRoyaltyInfo.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @notice Interface for EIP-2981: NFT Royalty Standard.
* For more see: https://eips.ethereum.org/EIPS/eip-2981.
*/
interface IRoyaltyInfo {
/**
* @notice Get the creator royalties to be sent.
* @param tokenId The ID of the NFT to get royalties for.
* @param salePrice The total price of the sale.
* @return receiver The address to which royalties should be sent.
* @return royaltyAmount The total amount that should be sent to the `receiver`.
*/
function royaltyInfo(
uint256 tokenId,
uint256 salePrice
) external view returns (address receiver, uint256 royaltyAmount);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 29 of 44 : ITokenCreator.sol
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
interface ITokenCreator {
/**
* @notice Returns the creator of this NFT collection.
* @param tokenId The ID of the NFT to get the creator payment address for.
* @return creator The creator of this collection.
*/
function tokenCreator(uint256 tokenId) external view returns (address payable creator);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 30 of 44 : TimeLibrary.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/**
* @title Helpers for working with time.
* @author batu-inal & HardlyDifficult
*/
library TimeLibrary {
/**
* @notice Checks if the given timestamp is in the past.
* @dev This helper ensures a consistent interpretation of expiry across the codebase.
* This is different than `hasBeenReached` in that it will return false if the expiry is now.
*/
function hasExpired(uint256 expiry) internal view returns (bool) {
return expiry < block.timestamp;
}
/**
* @notice Checks if the given timestamp is now or in the past.
* @dev This helper ensures a consistent interpretation of expiry across the codebase.
* This is different from `hasExpired` in that it will return true if the timestamp is now.
*/
function hasBeenReached(uint256 timestamp) internal view returns (bool) {
return timestamp <= block.timestamp;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 31 of 44 : CollectionRoyalties.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "../../interfaces/standards/royalties/IGetFees.sol";
import "../../interfaces/standards/royalties/IGetRoyalties.sol";
import "../../interfaces/standards/royalties/IRoyaltyInfo.sol";
import "../../interfaces/standards/royalties/ITokenCreator.sol";
import "../shared/Constants.sol";
/**
* @title Defines various royalty APIs for broad marketplace support.
* @author batu-inal & HardlyDifficult
*/
abstract contract CollectionRoyalties is IGetRoyalties, IGetFees, IRoyaltyInfo, ITokenCreator, ERC165Upgradeable {
/**
* @inheritdoc IGetFees
*/
function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory recipients) {
recipients = new address payable[](1);
recipients[0] = getTokenCreatorPaymentAddress(tokenId);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 32 of 44 : ERC4906.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
/**
* @title ERC-4906: Metadata Update Event
* @dev See https://eips.ethereum.org/EIPS/eip-4906
*/
contract ERC4906 is ERC165Upgradeable {
/**
* @notice This event emits when the metadata of a token is changed.
* So that the third-party platforms such as NFT market could
* timely update the images and related attributes of the NFT.
* @param tokenId The ID of the NFT whose metadata is changed.
*/
event MetadataUpdate(uint256 tokenId);
/**
* @notice This event emits when the metadata of a range of tokens is changed.
* So that the third-party platforms such as NFT market could
* timely update the images and related attributes of the NFTs.
* @param fromTokenId The ID of the first NFT whose metadata is changed.
* @param toTokenId The ID of the last NFT whose metadata is changed.
*/
event BatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 33 of 44 : LazyMintedCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "../../interfaces/internal/INFTLazyMintedCollectionMintCountTo.sol";
import "../roles/MinterRole.sol";
import "./SequentialMintCollection.sol";
error LazyMintedCollection_Mint_Count_Must_Be_Greater_Than_Zero();
/**
* @title Common functions for collections in which all tokens are defined at the time of collection creation.
* @dev This implements the INFTLazyMintedCollectionMintCountTo ERC-165 interface.
* @author HardlyDifficult
*/
abstract contract LazyMintedCollection is INFTLazyMintedCollectionMintCountTo, MinterRole, SequentialMintCollection {
function _initializeLazyMintedCollection(address payable _creator, address _approvedMinter) internal {
// Initialize access control
AdminRole._initializeAdminRole(_creator);
if (_approvedMinter != address(0)) {
MinterRole._initializeMinterRole(_approvedMinter);
}
}
/**
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 34 of 44 : NFTCollectionType.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts/utils/ShortStrings.sol";
import "../../interfaces/internal/INFTCollectionType.sol";
/**
* @title A mixin to add the NFTCollectionType interface to a contract.
* @author HardlyDifficult & reggieag
*/
abstract contract NFTCollectionType is INFTCollectionType, ERC165Upgradeable {
using ShortStrings for string;
using ShortStrings for ShortString;
ShortString private immutable _collectionTypeName;
constructor(string memory collectionTypeName) {
_collectionTypeName = collectionTypeName.toShortString();
}
/**
* @notice Returns a name of the type of collection this contract represents.
* @return collectionType The collection type.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 35 of 44 : RevealableCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "../roles/AdminRole.sol";
import "./ERC4906.sol";
import "./SharedURICollection.sol";
error RevealableCollection_Already_Revealed();
/**
* @title Allow a collection to specify pre-reveal content which can later be revealed.
* @dev Once the content has been revealed, it is immutable.
* @author HardlyDifficult.
*/
abstract contract RevealableCollection is ERC4906, AdminRole, SharedURICollection {
/// @notice Whether the collection is revealed or not.
bool private $isRevealed;
/**
* @notice Emitted when the collection is revealed.
* @param baseURI The base URI for the collection.
* @param isRevealed Whether the collection is revealed.
*/
event URIUpdated(string baseURI, bool isRevealed);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 36 of 44 : SequentialMintCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "../../interfaces/standards/royalties/ITokenCreator.sol";
error SequentialMintCollection_Caller_Is_Not_Owner(address owner);
error SequentialMintCollection_Minted_NFTs_Must_Be_Burned_First(uint256 totalSupply);
/**
* @title Extends the OZ ERC721 implementation for collections which mint sequential token IDs.
* @author batu-inal & HardlyDifficult
*/
abstract contract SequentialMintCollection is ITokenCreator, ERC721BurnableUpgradeable {
/****** Slot 0 (after inheritance) ******/
/**
* @notice The creator/owner of this NFT collection.
* @dev This is the default royalty recipient if a different `paymentAddress` was not provided.
* @return The collection's creator/owner address.
*/
address payable public owner;
/**
* @notice The tokenId of the most recently created NFT.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 37 of 44 : SharedPaymentCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "./CollectionRoyalties.sol";
import "./SequentialMintCollection.sol";
/**
* @title Offers single payment address definition for all items in a given collection.
* @author HardlyDifficult
*/
abstract contract SharedPaymentCollection is SequentialMintCollection, CollectionRoyalties {
/**
* @notice The address to pay the proceeds/royalties for the collection.
* @dev If this is set to address(0) then the proceeds go to the creator.
*/
address payable private paymentAddress;
function _initializeSharedPaymentCollection(address payable _paymentAddress) internal {
// Initialize royalties
if (_paymentAddress != address(0)) {
// If no payment address was defined, `.owner` will be returned in getTokenCreatorPaymentAddress() below.
paymentAddress = _paymentAddress;
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 38 of 44 : SharedURICollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
error SharedURICollection_URI_Not_Set();
/**
* @title Implements a URI for a collection which is shared by all tokens.
* @author HardlyDifficult
*/
abstract contract SharedURICollection is ERC721Upgradeable {
string private $baseURI;
/**
* @notice Set the base URI to be used for all tokens.
* @param uri The base URI to use.
*/
function _setBaseURI(string calldata uri) internal {
if (bytes(uri).length == 0) {
revert SharedURICollection_URI_Not_Set();
}
$baseURI = uri;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 39 of 44 : SupplyLock.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "../../interfaces/internal/INFTSupplyLock.sol";
import "../../libraries/TimeLibrary.sol";
import "../roles/MinterRole.sol";
import "../shared/Constants.sol";
/// @param supplyLockExpiration The time at which supply is no longer locked.
error SupplyLock_Action_Disallowed_While_Supply_Is_Locked(uint256 supplyLockExpiration);
/// @param supplyLockHolder The address of the account holding the supply lock.
/// @param supplyLockExpiration The time at which supply is no longer restricted.
error SupplyLock_Caller_Is_Not_Supply_Lock_Holder(address supplyLockHolder, uint256 supplyLockExpiration);
error SupplyLock_Existing_Lock_Has_Already_Expired();
error SupplyLock_Expiration_Time_In_The_Past();
error SupplyLock_Expiration_Time_Too_Far_In_The_Future(uint256 maxExpiration);
/**
* @title Allow collections to support restricting supply modifications to a single minter for a period of time.
* @notice This is used to prevent supply changes during a sale - impacting mints by other users as well as preventing
* changes to the max supply.
* @dev The supply lock holder may have their minter role revoked, however they still maintain access until the
* previously specified expiration.
* @author HardlyDifficult
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 40 of 44 : TokenLimitedCollection.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "./SequentialMintCollection.sol";
error TokenLimitedCollection_Max_Token_Id_May_Not_Be_Cleared(uint256 currentMaxTokenId);
error TokenLimitedCollection_Max_Token_Id_May_Not_Increase(uint256 currentMaxTokenId);
error TokenLimitedCollection_Max_Token_Id_Must_Be_Greater_Than_Current_Minted_Count(uint256 currentMintedCount);
error TokenLimitedCollection_Max_Token_Id_Must_Not_Be_Zero();
/**
* @title Defines an upper limit on the number of tokens which may be minted by this collection.
* @author HardlyDifficult
*/
abstract contract TokenLimitedCollection is SequentialMintCollection {
/**
* @notice The max tokenId which can be minted.
* @dev This max may be less than the final `totalSupply` if 1 or more tokens were burned.
* @return The max tokenId which can be minted.
*/
uint32 public maxTokenId;
/**
* @notice Emitted when the max tokenId supported by this collection is updated.
* @param maxTokenId The new max tokenId. All NFTs in this collection will have a tokenId less than
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 41 of 44 : AdminRole.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
error AdminRole_Caller_Does_Not_Have_Admin_Role();
/**
* @title Defines a role for admin accounts.
* @dev Wraps the default admin role from OpenZeppelin's AccessControl for easy integration.
* @author batu-inal & HardlyDifficult
*/
abstract contract AdminRole is AccessControlUpgradeable {
modifier onlyAdmin() {
if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {
revert AdminRole_Caller_Does_Not_Have_Admin_Role();
}
_;
}
function _initializeAdminRole(address admin) internal {
// Grant the role to a specified account
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 42 of 44 : MinterRole.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "./AdminRole.sol";
error MinterRole_Caller_Does_Not_Have_Minter_Or_Admin_Role();
/**
* @title Defines a role for minter accounts.
* @dev Wraps a role from OpenZeppelin's AccessControl for easy integration.
* @author batu-inal & HardlyDifficult
*/
abstract contract MinterRole is AccessControlUpgradeable, AdminRole {
/**
* @notice The `role` type used for approve minters.
* @return `keccak256("MINTER_ROLE")`
*/
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
/**
* @notice Ensures that the sender has permissions to mint.
* @dev Restrictions may be extended in derived contracts via overriding `_requireCanMint`.
*/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 43 of 44 : Constants.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
/// Constant values shared across mixins.
/**
* @dev 100% in basis points.
*/
uint256 constant BASIS_POINTS = 10_000;
/**
* @dev The default admin role defined by OZ ACL modules.
*/
bytes32 constant DEFAULT_ADMIN_ROLE = 0x00;
////////////////////////////////////////////////////////////////
// Royalties & Take Rates
////////////////////////////////////////////////////////////////
/**
* @dev The max take rate an exhibition can have.
*/
uint256 constant MAX_EXHIBITION_TAKE_RATE = 5_000;
/**
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 44 of 44 : ContractFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
error ContractFactory_Only_Callable_By_Factory_Contract(address contractFactory);
error ContractFactory_Factory_Is_Not_A_Contract();
/**
* @title Stores a reference to the factory which is used to create contract proxies.
* @author batu-inal & HardlyDifficult
*/
abstract contract ContractFactory {
using AddressUpgradeable for address;
/**
* @notice The address of the factory which was used to create this contract.
* @return The factory contract address.
*/
address public immutable contractFactory;
modifier onlyContractFactory() {
if (msg.sender != contractFactory) {
revert ContractFactory_Only_Callable_By_Factory_Contract(contractFactory);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"optimizer": {
"enabled": true,
"runs": 1337000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Contract ABI

[{"inputs":[{"internalType":"address","name":"_contractFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdminRole_Caller_Does_Not_Have_Admin_Role","type":"error"},{"inputs":[],"name":"ContractFactory_Factory_Is_Not_A_Contract","type":"error"},{"inputs":[{"internalType":"address","name":"contractFactory","type":"address"}],"name":"ContractFactory_Only_Callable_By_Factory_Contract","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"LazyMintedCollection_Mint_Count_Must_Be_Greater_Than_Zero","type":"error"},{"inputs":[],"name":"MinterRole_Caller_Does_Not_Have_Minter_Or_Admin_Role","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"NFTDropCollection_Exceeds_Max_Token_Id","type":"error"},{"inputs":[],"name":"RevealableCollection_Already_Revealed","type":"error"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"SequentialMintCollection_Minted_NFTs_Must_Be_Burned_First","type":"error"},{"inputs":[],"name":"SharedURICollection_URI_Not_Set","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[{"internalType":"uint256","name":"supplyLockExpiration","type":"uint256"}],"name":"SupplyLock_Action_Disallowed_While_Supply_Is_Locked","type":"error"},{"inputs":[{"internalType":"address","name":"supplyLockHolder","type":"address"},{"internalType":"uint256","name":"supplyLockExpiration","type":"uint256"}],"name":"SupplyLock_Caller_Is_Not_Supply_Lock_Holder","type":"error"},{"inputs":[],"name":"SupplyLock_Existing_Lock_Has_Already_Expired","type":"error"},{"inputs":[],"name":"SupplyLock_Expiration_Time_In_The_Past","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxExpiration","type":"uint256"}],"name":"SupplyLock_Expiration_Time_Too_Far_In_The_Future","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMaxTokenId","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_May_Not_Be_Cleared","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMaxTokenId","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_May_Not_Increase","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMintedCount","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_Must_Be_Greater_Than_Current_Minted_Count","type":"error"},{"inputs":[],"name":"TokenLimitedCollection_Max_Token_Id_Must_Not_Be_Zero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"MaxTokenIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"supplyLock","type":"address"},{"indexed":false,"internalType":"uint256","name":"supplyLockExpiration","type":"uint256"}],"name":"MinterAcquireSupplyLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"SelfDestruct","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"},{"indexed":false,"internalType":"bool","name":"isRevealed","type":"bool"}],"name":"URIUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"royaltiesInBasisPoints","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNFTCollectionType","outputs":[{"internalType":"string","name":"collectionType","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"royaltiesInBasisPoints","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSupplyLock","outputs":[{"internalType":"address","name":"supplyLockHolder","type":"address"},{"internalType":"uint256","name":"supplyLockExpiration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getTokenCreatorPaymentAddress","outputs":[{"internalType":"address payable","name":"creatorPaymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_creator","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"bool","name":"_isRevealed","type":"bool"},{"internalType":"uint32","name":"_maxTokenId","type":"uint32"},{"internalType":"address","name":"_approvedMinter","type":"address"},{"internalType":"address payable","name":"_paymentAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"approved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"approved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"revealed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTokenId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"},{"internalType":"address","name":"to","type":"address"}],"name":"mintCountTo","outputs":[{"internalType":"uint256","name":"firstTokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"expiration","type":"uint256"}],"name":"minterAcquireSupplyLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfTokensAvailableToMint","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selfDestruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"isSupported","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenCreator","outputs":[{"internalType":"address payable","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_maxTokenId","type":"uint32"}],"name":"updateMaxTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"updatePreRevealContent","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Block Age Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Age Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Age Amount
View All Withdrawals

Transaction Hash Block Age Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.