Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,812 PTT
Holders
171
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 PTTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PccTierTwo
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; import "solmate/tokens/ERC721.sol"; import "openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; import "openzeppelin-contracts/contracts/utils/Strings.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "./PccTierTwoItem.sol"; import "./MintUpdater.sol"; contract PccTierTwo is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 constant NUMBER_OF_TICKETS = 6; uint256 constant MAX_NUMBER_PER_TYPE = 3000; uint256 constant MAX_MINT = 30; uint256[MAX_NUMBER_PER_TYPE][NUMBER_OF_TICKETS] private Ids; uint256[2000] private finalIds; uint256[NUMBER_OF_TICKETS] public CurrentSupplyByType; uint256 public totalSupply; uint256 public CurrentSupplyFinalSubcollection; address public TicketContract; address public FinalMintContract; string public BaseUri; ITierTwoMintUpdater public tokenContract; constructor() ERC721("PCC Tier Two", "PTT") { } function mintTeamTierTwo() external onlyOwner{ uint256 remaining = MAX_NUMBER_PER_TYPE - CurrentSupplyByType[0]; for (uint256 index; index < 3; ) { --remaining; _safeMint( 0x112E62d5906F9239D9fabAb7D0237A328F128e22, index ); tokenContract.updateTierTwoMintingTime(index); Ids[0][index] = Ids[0][remaining] == 0 ? remaining : Ids[0][remaining]; unchecked { ++CurrentSupplyByType[0]; ++totalSupply; ++index; } } } function mint( uint256 _ticketId, uint256 _quantity, address _to ) public { require(msg.sender == TicketContract, "not authorised"); require(_quantity <= MAX_MINT, "cannot exceed max mint"); require(CurrentSupplyByType[_ticketId] + _quantity <= MAX_NUMBER_PER_TYPE, "cannot exceed maximum"); uint256 remaining = MAX_NUMBER_PER_TYPE - CurrentSupplyByType[_ticketId]; for (uint256 i; i < _quantity; ) { --remaining; uint256 index = getRandomNumber(remaining, uint256(block.number)); uint256 id = ((Ids[_ticketId][index] == 0) ? index : Ids[_ticketId][index]) + (MAX_NUMBER_PER_TYPE * _ticketId); _safeMint( _to, id ); tokenContract.updateTierTwoMintingTime(id); Ids[_ticketId][index] = Ids[_ticketId][remaining] == 0 ? remaining : Ids[_ticketId][remaining]; unchecked { ++CurrentSupplyByType[_ticketId]; ++totalSupply; ++i; } } } function finalSubcollectionMint( uint256 _quantity, address _to ) public { require(msg.sender == FinalMintContract, "not authorised"); require(_quantity <= MAX_MINT, "cannot exceed max mint"); require(CurrentSupplyFinalSubcollection + _quantity <= 2000, "cannot exceed maximum"); uint256 remaining = 2000 - CurrentSupplyFinalSubcollection; for (uint256 i; i < _quantity; ) { --remaining; uint256 index = getRandomNumber(remaining, uint256(block.number)); _safeMint( _to, ((finalIds[index] == 0) ? index : finalIds[index]) + 18000 ); finalIds[index] = finalIds[remaining] == 0 ? remaining : finalIds[remaining]; unchecked { ++CurrentSupplyFinalSubcollection; ++totalSupply; ++i; } } } function getRandomNumber(uint256 maxValue, uint256 salt) private view returns (uint256) { if (maxValue == 0) return 0; uint256 seed = uint256( keccak256( abi.encodePacked( block.difficulty + (( uint256( keccak256(abi.encodePacked(tx.origin, msg.sig)) ) ) / (block.timestamp)) + block.number + salt ) ) ); return seed.mod(maxValue); } function tokenURI(uint256 id) public view override returns (string memory) { require(_ownerOf[id] != address(0), "not minted"); return string(abi.encodePacked(BaseUri, id.toString())); } function setFinalSubcollectionMintAddress(address _addr) external onlyOwner { FinalMintContract = _addr; } function setUri(string calldata _baseUri) external onlyOwner { BaseUri = _baseUri; } function setTicketContract(address _ticket) external onlyOwner{ TicketContract = _ticket; } function setTokenContract(address _token) public onlyOwner{ tokenContract = ITierTwoMintUpdater(_token); } function withdrawTokens(IERC20 token) public onlyOwner { require(address(token) != address(0)); uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); } modifier onlyTicketContract() { require(msg.sender == TicketContract, "not authorised address"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @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); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 IERC165 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Minimalist and gas efficient standard ERC1155 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts ); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); event URI(string value, uint256 indexed id); /*////////////////////////////////////////////////////////////// ERC1155 STORAGE //////////////////////////////////////////////////////////////*/ mapping(address => mapping(uint256 => uint256)) public balanceOf; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// METADATA LOGIC //////////////////////////////////////////////////////////////*/ function uri(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC1155 LOGIC //////////////////////////////////////////////////////////////*/ function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) public virtual { require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); balanceOf[from][id] -= amount; balanceOf[to][id] += amount; emit TransferSingle(msg.sender, from, to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual { require(ids.length == amounts.length, "LENGTH_MISMATCH"); require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); // Storing these outside the loop saves ~15 gas per iteration. uint256 id; uint256 amount; for (uint256 i = 0; i < ids.length; ) { id = ids[i]; amount = amounts[i]; balanceOf[from][id] -= amount; balanceOf[to][id] += amount; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) public view virtual returns (uint256[] memory balances) { require(owners.length == ids.length, "LENGTH_MISMATCH"); balances = new uint256[](owners.length); // Unchecked because the only math done is incrementing // the array index counter which cannot possibly overflow. unchecked { for (uint256 i = 0; i < owners.length; ++i) { balances[i] = balanceOf[owners[i]][ids[i]]; } } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { balanceOf[to][id] += amount; emit TransferSingle(msg.sender, address(0), to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function _batchMint( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[to][ids[i]] += amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, address(0), to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function _batchBurn( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[from][ids[i]] -= amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, address(0), ids, amounts); } function _burn( address from, uint256 id, uint256 amount ) internal virtual { balanceOf[from][id] -= amount; emit TransferSingle(msg.sender, from, address(0), id, amount); } } /// @notice A generic interface for a contract which properly accepts ERC1155 tokens. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155TokenReceiver { function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol) abstract contract ERC721 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 indexed id); event Approval(address indexed owner, address indexed spender, uint256 indexed id); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /*////////////////////////////////////////////////////////////// METADATA STORAGE/LOGIC //////////////////////////////////////////////////////////////*/ string public name; string public symbol; function tokenURI(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC721 BALANCE/OWNER STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) internal _ownerOf; mapping(address => uint256) internal _balanceOf; function ownerOf(uint256 id) public view virtual returns (address owner) { require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); } function balanceOf(address owner) public view virtual returns (uint256) { require(owner != address(0), "ZERO_ADDRESS"); return _balanceOf[owner]; } /*////////////////////////////////////////////////////////////// ERC721 APPROVAL STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) public getApproved; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; } /*////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 id) public virtual { address owner = _ownerOf[id]; require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); getApproved[id] = spender; emit Approval(owner, spender, id); } function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function transferFrom( address from, address to, uint256 id ) public virtual { require(from == _ownerOf[id], "WRONG_FROM"); require(to != address(0), "INVALID_RECIPIENT"); require( msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id], "NOT_AUTHORIZED" ); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. unchecked { _balanceOf[from]--; _balanceOf[to]++; } _ownerOf[id] = to; delete getApproved[id]; emit Transfer(from, to, id); } function safeTransferFrom( address from, address to, uint256 id ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 id) internal virtual { require(to != address(0), "INVALID_RECIPIENT"); require(_ownerOf[id] == address(0), "ALREADY_MINTED"); // Counter overflow is incredibly unrealistic. unchecked { _balanceOf[to]++; } _ownerOf[id] = to; emit Transfer(address(0), to, id); } function _burn(uint256 id) internal virtual { address owner = _ownerOf[id]; require(owner != address(0), "NOT_MINTED"); // Ownership check above ensures no underflow. unchecked { _balanceOf[owner]--; } delete _ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); } /*////////////////////////////////////////////////////////////// INTERNAL SAFE MINT LOGIC //////////////////////////////////////////////////////////////*/ function _safeMint(address to, uint256 id) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function _safeMint( address to, uint256 id, bytes memory data ) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } } /// @notice A generic interface for a contract which properly accepts ERC721 tokens. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol) abstract contract ERC721TokenReceiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721TokenReceiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; contract ExclusivesYieldMap { uint256[] public YIELD_MAP = [ 127689209163621340800975369692887101994514425976037930576731308074077257728, 6753153917220401196899736694153029318930711892062416711752429375504, 8143398124117396899987774834844922863974330482361793009967084270027538472960, 904846606982687445547887032273189160859675851540267250047031488062456627200, 221341162137358637457934410757978275112249602007170343361381244113780800, 1766847066449606368897757431762078670333126734602310857023130828808421377, 14488145931195919154652211730312669894721622402245540684164609667634818973696, 107839786674879660962284295149278626613731412961974160436439994662976, 855714193558978439600180920575387457109609170093290301725354295296, 107841432223488566448886464657249700657495345086125706239647338725376, 42435387414890550099181881421510309192222220764397156893696321252516442624, 904653735511092325205405702522746983442865158853724658543027888974473461824, 53933083088045683062968712886885842090668581084422208199274109337608, 8141852561846376966633364494578066340832735700825023457147381546746577682433, 7237009034947508087999372842444878193351586692892858927190258174099139330050, 1809251825692212629736148548004775327449081419426083295371710407222461726720, 42404437501432180058531776494431691926741654233591182749010509113426445312, 14163678425198499775079031680960538338078575496093723048039448098369437696, 113299129636810209322791409486204458102728459423630940986290520940334813713, 906861863088205211094597746465241253180168885996822765039538221723869777920, 14588863116477154331764461313260546006573195324256945577023454839394036355592, 30257310852239479033653781943308815454419542226881113133482467444473987136, 26353791772251548151867970195806678612595411784355624021865267208, 7237009890923735787562481262902339512443458934001442233980709118408403190336, 251913741659111010848457020105384818928415929242265780952450868143226880, 10063960881820201593675291886165623334308687336540197642300748756910973386768, 7351850636542857659901632359859819723445084295634860096310858908355042508801, 1809251833380016350089876474113563869124297516159721017250839217992007422978, 951104854286571783208133907009074371232312303136073372744624177216, 14356064602972600589748753907742128318739053374838267391099376786586206272, 7238803483205057291789354599244276030967730650142414209554458908525837942786, 224306771080334774167065072968001954953696202454525699444820666472235016, 113078212146022285371799082393245919705963271557061666824257666410510091265, 14700168064353879710598725997397176632414730459792095013297043515395312451648, 15406906404987710370678569893662259257989112169811933387866230488841072934912, 466530931455402736694290967607979784713001307600537720088663197527134175232, 906395995104510267405146335308482677385440270153399930823313892608533610496, 7585780026693951011482627432448869271820260484043928587553141161984, 6740012377796368092512590431295524108232846806650884555150377091584, 113078232365779811345067185773594749929150852809930468810917583206563717128, 906451262997003458014082321514027972232888594543177317347691244013257491073, 113519923912011595008512198883679820430683831855976137610662321283951230976, 7238772431979525598438887302793835152656041262399837108196878931751516504066, 118379184804620357792205379675498758854940509597182637391989759956098224128, 1794454066620592157951083256470526566762981605162225958026251593932865608, 14474011155508671486791512291545797300541743934179547279151429563876777132544, 113079090029286086210336889245199195099549637127375276628487137132764234248, 34563494177444330947274478893706677544627277771697322024963795847249920, 904626142007301553581652972237627498579873114720395349012578344521825517568, 14488591148913612073061307345770174297937538647232319597193655577988573462528, 3457823787866344712686117832039218792975529736246459513907316273512448, 1809282506111519445429699406957582417154249943304742438650319701142223192065, 55268734837207824145625580455255387568304346831893000537489779153993729, 904847099093865596522140236962995496036376488637811700395123008875496742976, 127433844575320241592428800946479265618683713055309463557170681707162244169, 9046256971691861529435617292951362444633158331217486644900811458644174438400, 141375372167664336373990955765518093842425620077422766175527094373941510280, 842528519930702968132587061673755889989271988690100710659506831872, 113305969985885275312580760415007944698097287198703669553034562204634186752, 1766847064778385117286005609999271580063413208369541046665640420935991872, 13494782874591857290810104294732169541585520292341407105998479458304, 7237005584282925287850080220409917625866194770839212719101591292290376176648, 1991153821074889879648559879757476930928063262872123503706621672647917568, 3561301430880806704632065855709544429574547346876693474557063173228470336, 3561793239282898180129956422570005972210051656801055502201999514264437256, 918981437407644722812439118464180761162935733758462115229503352478330257408, 904680911453449683263202305584476759212635064755296398543971614037555355649, 14476026464610977421774095971673611407465069238645853752591083284445765042177, 7240539273252127955906133936318951131543738422584407175125987038040869306377, 17668908760084434842213282868721737307911909751941415813573777397886779400, 221718603039365295081533249583754996873794408800998779671592037546725440, 14134938383219375486164444238479109723859805214341124516282178528323076104, 7237033615676796050638573064237669191610500533620517567464614144233818816576, 16129387965600301035811000112710144018440539041619528541699708798364057672, 14359952734426553198912187632495361369158910179570702581256668441603211776, 1259789995531782590154412715662325340653412082130742869699133419322689749504, 9046257403052474941938603303641840649587120260274892449652214385456886153281, 15901631270802851204552820941873458526156516555833692983023826853411422792, 3451715674992821333700795175505918826028676663227588154392269698371584, 1019471242722455121785783966193669719829701652335502260261384737706884472897, 116611913122343696702287879134720683711343087729323246864159392157348659201, 14474038769234299205080122666462799806694047821797400711566218246399882952832, 842498383664910525231275040345923083389172625665506952342633743872, 27607011920923242148788330674807481805009270601750753872695180134481921, 27622150360433682032463218364699410653018529705344201403741426247798784, 1017704394591389388828597773976732888748944250441704161613089220516405837833, 14809541114165170860870095719723875792871240101783780657509466176, 904629148039731883037256170128553661599509525106111692529594151263887425536, 906392604891602550858704988087731411260025424846305311767502371557367353856, 1766900984671724920440093735242524140592919450540546860778944999971356744, 14474038761650194412083483414727729989458634441604697908963498258282961698816, 127240757619941108308408961178450997360559305308259232856947489146367377408, 7237009574354980202408023435265650670642126926145009597285851302741133000704, 1019470817158775096598357196589097987842228210222704486240458982891511124032, 7254674156032154336217058350043602349772460699659836735598086491076904878664, 904625697298224563374329659623520538978022168948990626535023634548114104449, 14474011154664550189184155117350792680795144919866412405937101540740586545665, 10352621374592446859686861356000752357132795677755290852952342110666752, 1766860546423736939957667382745409558746572509807994482938555604991738384, 906392611736721971665073928643624589532943524841735976169328406107405942785, 3450993295630485490545996418370363455588296746857931148839633171779593, 1987702947875682371167700873324666625949945547007673112433848320178257920, 1017707361029666607827641434929577056827015183098958030876992422803293864448, 118386147105738135448168900540292710969639135357391453087087635893487435840, 7265503326099145387412455242527196694404064649625661436141073700463210397696, 14135207995850083549211386303615913891561671596781362991568365487225044993, 248469717074484361122817141759026500163695769888095257742737053434511872, 8256511280540672661225559411097223470381662237496123455253228054799622078464, 14475778001729714992780821879469884102266619167805629333807862650756472537666, 113078272805696999930766039027606061227608684993350363740153609103494611521, 14359090016130341039250983986311775663286255439760245485124354682698891337, 120152502151276925763349302054185068409437481943491329738316521882802716688, 445654671558703322041850078082278151053253327410107833138026457161793600, 113299068884579529034482442756143511200239602510821331384521101519943401537, 7237005578280098551568211806181589330883481559192745478211019140041269051392, 1017704018945736411658888247275988221725379335841022243163919229243357397120, 906392545929677552302913899681359060986451221064839408926391696429670465600, 66902235595922171653472526251057195641733120 ]; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; interface ILandMintUpdater { function updateLandMintingTime(uint256 _id) external; } interface ITierTwoMintUpdater { function updateTierTwoMintingTime(uint256 _id) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; import "solmate/tokens/ERC721.sol"; import "openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; import "openzeppelin-contracts/contracts/utils/Strings.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "./PccTierTwoItem.sol"; import "openzeppelin-contracts/contracts/utils/Strings.sol"; import "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; import "./MintUpdater.sol"; contract PccLand is ERC721, Ownable { using Strings for uint256; mapping(address => mapping(uint256 => bool)) public HasClaimed; uint256 public constant MAX_SUPPLY = 9856; uint256 public constant MAX_MINT = 20; uint256 public CurrentMaxSupply = 500; uint256 public MintPrice = 0.09 ether; string public BaseUri; uint256 public totalSupply; bytes32 public MerkleRoot; bool public PublicMintingOpen; uint256 public currentPhase; ILandMintUpdater public tokenContract; constructor()ERC721("Country Club Land", "PCCL") { } function claimLand(bytes32[] memory _proofs, uint256 _quantity) public payable canMint(_proofs, _quantity) { require(totalSupply + _quantity < CurrentMaxSupply, "too many minted"); if(msg.value == 0 && !HasClaimed[msg.sender][currentPhase]){ HasClaimed[msg.sender][currentPhase] = true; } for(uint256 i; i < _quantity; ){ _mint(msg.sender, totalSupply); tokenContract.updateLandMintingTime(totalSupply); unchecked { ++i; ++totalSupply; } } } modifier canMint(bytes32[] memory _proofs, uint256 _qty) { if(PublicMintingOpen){ require(msg.value == MintPrice * _qty, "incorrect ether"); require(_qty <= MAX_MINT, "too many"); } else{ require(msg.value == 0, "free"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _qty)); require( MerkleProof.verify(_proofs, MerkleRoot, leaf), "not authorised" ); require(!HasClaimed[msg.sender][currentPhase], "already claimed from this wallet"); } _; } function setMintPrice(uint256 _priceInWei) public onlyOwner { MintPrice = _priceInWei; } function setMerkleRoot(bytes32 _root) public onlyOwner { MerkleRoot = _root; } function setBaseUri(string calldata _uri) public onlyOwner { BaseUri = _uri; } function setTokenContract(address _token) public onlyOwner{ tokenContract = ILandMintUpdater(_token); } function setPublicMintingOpen(bool _mintingOpen) public onlyOwner { PublicMintingOpen = _mintingOpen; } function incrementPhase() public onlyOwner { unchecked{ ++currentPhase; } } function withdraw() public onlyOwner { payable(msg.sender).transfer(address(this).balance); } function setTempMaxSupply(uint256 _supply) public onlyOwner { require(_supply > totalSupply, "cannot set supply to less than current supply"); require(_supply <= MAX_SUPPLY, "cannot set supply to higher than max supply"); CurrentMaxSupply = _supply; } function tokenURI(uint256 id) public view override returns (string memory) { require(_ownerOf[id] != address(0), "not minted"); return string(abi.encodePacked(BaseUri, id.toString())); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; import "solmate/tokens/ERC1155.sol"; import "src/PccToken.sol"; import "src/PccTierTwo.sol"; import "openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "./PccTierTwo.sol"; import "openzeppelin-contracts/contracts/utils/Strings.sol"; contract PccTierTwoItem is ERC1155, Ownable { using Strings for uint256; PccToken public TokenContract; PccTierTwo public TierTwo; string public symbol = "PTTI"; string public name = "PCC Tier Two Item"; uint256[6] public ItemPrice; string public BaseUri; bool[6] public IsForSale; constructor(PccTierTwo _tierTwo) { TierTwo = _tierTwo; } function purchaseTierTwo(uint256 _ticketId, uint256 _quantity) public { require( balanceOf[msg.sender][_ticketId] >= _quantity, "not enough tickets" ); require(IsForSale[_ticketId], "not for sale currently"); _burn(msg.sender, _ticketId, _quantity); TierTwo.mint(_ticketId, _quantity, msg.sender); } function purchaseTicket(uint256 _ticketId, uint256 _quantity) public { uint256 price = ItemPrice[_ticketId]; require(price > 0, "sale not open for this item"); TokenContract.payForTierTwoItem(msg.sender, price * _quantity); _mint(msg.sender, _ticketId, _quantity, ""); } function uri(uint256 id) public view override returns (string memory) { return string(abi.encodePacked(BaseUri, id.toString())); } function setPricePerTicket(uint256 _ticketId, uint256 _price) external onlyOwner { ItemPrice[_ticketId] = _price * 1 ether; } function setTokenContract(PccToken _token) external onlyOwner { TokenContract = _token; } function setUri(string calldata _baseUri) external onlyOwner { BaseUri = _baseUri; } function setIsForSale(bool _isForSale, uint256 _ticketId) external onlyOwner { IsForSale[_ticketId] = _isForSale; } function withdrawTokens(IERC20 token) public onlyOwner { require(address(token) != address(0)); uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; import "solmate/tokens/ERC20.sol"; import "openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; import "./ExclusivesYieldMap.sol"; import "./PccTierTwoItem.sol"; import "./PccLand.sol"; import "./MintUpdater.sol"; import "./PccTierTwo.sol"; struct TokenBucket { uint256 AvailableCurrently; uint256 DailyYield; uint256 MaxYield; uint256 CurrentYield; uint256 LastClaimTimestamp; } contract PccToken is ERC20, Ownable, ExclusivesYieldMap, ILandMintUpdater { uint256 public constant SECOND_RATE_FOR_ONE_PER_DAY = 11574074074074; uint256 public packedNumbers; PccTierTwoItem public TierTwoItem; IERC721 public TierTwo; bytes32 public MerkleRoot; event AddedClaimBucket( string indexed _name, uint256 _dailyYield, uint256 _maxYield ); mapping(string => TokenBucket) public TokenClaimBuckets; mapping(address => bool) public ClaimedAirdrop; uint256[5] public EXCLUSIVES_DAILY_YIELD = [ 5 * SECOND_RATE_FOR_ONE_PER_DAY, 10 * SECOND_RATE_FOR_ONE_PER_DAY, 25 * SECOND_RATE_FOR_ONE_PER_DAY, 50 * SECOND_RATE_FOR_ONE_PER_DAY, 100 * SECOND_RATE_FOR_ONE_PER_DAY ]; IERC721 immutable public EXCLUSIVES_CONTRACT; IERC721 immutable public landContract; uint256 public EXCLUSIVES_START_TIME; uint256 private constant MAX_VALUE_3_BIT_INT = 7; uint256 contractCount; mapping(uint256 => uint256) public test; mapping(IERC721 => uint256) public NftContracts; mapping(IERC721 => mapping(uint256 => uint256)) public LastClaimedTimes; mapping(IERC721 => uint256) public FirstClaimTime; constructor(PccLand _land, PccTierTwoItem _ticket, PccTierTwo _tierTwo, IERC721 _nft1, IERC721 _nft2, IERC721 _nft3) ERC20("YARN", "PCC Yarn", 18) { TierTwoItem = _ticket; EXCLUSIVES_CONTRACT = IERC721(0x9e8a92F833c0ae4842574cE9cC0ef4c7300Ddb12); landContract = IERC721(address(_land)); TierTwo = IERC721(address(_tierTwo)); EXCLUSIVES_START_TIME = block.timestamp; FirstClaimTime[ _nft1 ] = block.timestamp; //PCC FirstClaimTime[ _nft2 ] = block.timestamp; //kittens FirstClaimTime[ _nft3 ] = block.timestamp; //grandmas addNewContract(IERC721(address(_tierTwo)), 5); addNewContract(landContract, 5); addTokenBucket( "employee", 7847312 ether, //start number 12960 ether, //daily yield 78803313 ether); //max tokens addTokenBucket( "team", 16176000 ether, //start number 51840 ether, //daily yield 300000000 ether); //max tokens addNewContract(IERC721(address(_nft1)), 10); addNewContract(IERC721(address(_nft2)), 1); addNewContract(IERC721(address(_nft3)), 1); } function updateLandMintingTime(uint256 _id) external { require(address(landContract) == msg.sender, "not authorised"); LastClaimedTimes[landContract][_id] = block.timestamp; } function updateTierTwoMintingTime(uint256 _id) external { require(address(TierTwo) == msg.sender, "not authorised"); LastClaimedTimes[TierTwo][_id] = block.timestamp; } function payForTierTwoItem(address _sender, uint256 _amount) public { address tierTwoAddress = address(TierTwoItem); require(msg.sender == tierTwoAddress, "not authorised"); require(balanceOf[_sender] >= _amount, "insufficient balance"); balanceOf[_sender] -= _amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[tierTwoAddress] += _amount; } emit Transfer(_sender, tierTwoAddress, _amount); } function burn(address _from, uint256 _quantity) public onlyTicketContract { _burn(_from, _quantity); } function addTokenBucket( string memory _name, uint256 _startNumber, uint256 _dailyYield, uint256 _maxYield ) private { TokenBucket memory bucket = TokenBucket( _startNumber, _dailyYield, _maxYield, 0, uint80(block.timestamp) ); TokenClaimBuckets[_name] = bucket; emit AddedClaimBucket(_name, _dailyYield, _maxYield); } function addNewContract(IERC721 _contract, uint256 _yield) private { require(NftContracts[_contract] == 0, "duplicate contract"); require(_yield < 11 && _yield > 0, "yield out of range"); unchecked { ++contractCount; } NftContracts[_contract] = _yield * SECOND_RATE_FOR_ONE_PER_DAY; } function claimCommunitityAirdrop( bytes32[] calldata _merkleProof, uint256 _amount ) public { bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount)); require( MerkleProof.verify(_merkleProof, MerkleRoot, leaf), "not authorised" ); require(!ClaimedAirdrop[msg.sender], "already claimed airdrop"); ClaimedAirdrop[msg.sender] = true; _mint(msg.sender, _amount * 1 ether); } function setMerkleRoot(bytes32 _root) public onlyOwner { MerkleRoot = _root; } function claimTokens(IERC721[] calldata _contracts, uint256[] calldata _ids) public { uint256 contractsLength = _contracts.length; require(contractsLength == _ids.length, "invalid array lengths"); uint256 amountToMint; for (uint256 i; i < contractsLength; ) { amountToMint += getYield(_contracts[i], _ids[i], msg.sender); LastClaimedTimes[_contracts[i]][_ids[i]] = block.timestamp; unchecked { ++i; } } _mint(msg.sender, amountToMint); require(totalSupply < 2000000000 ether, "reached max cap"); } function currentTokenToClaim( address _owner, IERC721[] calldata _contracts, uint256[] calldata _ids ) external view returns (uint256) { uint256 contractsLength = _contracts.length; require(contractsLength == _ids.length, "invalid array lengths"); uint256 amountToClaim; for (uint256 i; i < contractsLength; ) { unchecked { amountToClaim += getYield(_contracts[i], _ids[i], _owner); ++i; } } return amountToClaim; } function availableFromBucket(string calldata _name) public view returns (uint256) { TokenBucket memory bucket = TokenClaimBuckets[_name]; require(bucket.LastClaimTimestamp > 0, "bucket does not exist"); uint256 amountToMint = bucket.AvailableCurrently; amountToMint += (block.timestamp - bucket.LastClaimTimestamp) * (bucket.DailyYield / 86400) ; if (bucket.CurrentYield + (amountToMint) > bucket.MaxYield) { return bucket.MaxYield - bucket.CurrentYield; } return amountToMint; } function bucketMint(string calldata _name, uint256 _amount) public onlyOwner { TokenBucket memory bucket = TokenClaimBuckets[_name]; require(bucket.LastClaimTimestamp > 0, "bucket does not exist"); uint256 amountToMint = bucket.AvailableCurrently; uint256 timeSinceLastClaim = (block.timestamp - bucket.LastClaimTimestamp); amountToMint += (timeSinceLastClaim * (bucket.DailyYield / 86400)); bucket.CurrentYield += _amount; require( bucket.CurrentYield <= bucket.MaxYield && amountToMint >= _amount, "cannot mint this many from this bucket" ); _mint(msg.sender, _amount); bucket.AvailableCurrently = amountToMint - _amount; bucket.LastClaimTimestamp = uint80(block.timestamp); TokenClaimBuckets[_name] = bucket; } function getYield( IERC721 _contract, uint256 _id, address _operator ) private view returns (uint256) { address owner = _contract.ownerOf(_id); require( owner == _operator || _contract.isApprovedForAll(owner, _operator), "not eligible" ); if (_contract == EXCLUSIVES_CONTRACT) { return getExclusivesYield(_id); } else { return getNftYield(_contract, _id); } } function getExclusivesYield(uint256 _id) public view returns (uint256) { uint256 lastClaim = ( LastClaimedTimes[EXCLUSIVES_CONTRACT][_id] == 0 ? EXCLUSIVES_START_TIME : LastClaimedTimes[EXCLUSIVES_CONTRACT][_id] ); return (block.timestamp - lastClaim) * EXCLUSIVES_DAILY_YIELD[getExclusivesDailyYield(_id)]; } function getNftYield(IERC721 _nft, uint256 _id) public view returns (uint256) { uint256 lastClaim = ( LastClaimedTimes[_nft][_id] == 0 ? FirstClaimTime[_nft] == 0 ? block.timestamp - (5 days - 1) : FirstClaimTime[_nft] : LastClaimedTimes[_nft][_id] ); return (block.timestamp - lastClaim) * NftContracts[_nft]; } function getExclusivesDailyYield(uint256 _id) public view returns (uint256) { return unpackNumber(YIELD_MAP[_id / 85], _id % 85); } function unpackNumber(uint256 _packedNumbers, uint256 _position) private pure returns (uint256) { unchecked { uint256 number = (_packedNumbers >> (_position * 3)) & MAX_VALUE_3_BIT_INT; return number; } } modifier onlyTicketContract() { require(address(TierTwoItem) == msg.sender, "only ticket contract"); _; } }
{ "remappings": [ "ds-test/=lib/solmate/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BaseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"CurrentSupplyByType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CurrentSupplyFinalSubcollection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FinalMintContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TicketContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","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":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"finalSubcollectionMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ticketId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintTeamTierTwo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","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":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","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":"address","name":"_addr","type":"address"}],"name":"setFinalSubcollectionMintAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ticket","type":"address"}],"name":"setTicketContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"}],"name":"setUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract ITierTwoMintUpdater","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280600c81526020016b50434320546965722054776f60a01b8152506040518060400160405280600381526020016214151560ea1b815250816000908162000064919062000191565b50600162000073828262000191565b505050620000906200008a6200009660201b60201c565b6200009a565b6200025d565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200011757607f821691505b6020821081036200013857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200018c57600081815260208120601f850160051c81016020861015620001675750805b601f850160051c820191505b81811015620001885782815560010162000173565b5050505b505050565b81516001600160401b03811115620001ad57620001ad620000ec565b620001c581620001be845462000102565b846200013e565b602080601f831160018114620001fd5760008415620001e45750858301515b600019600386901b1c1916600185901b17855562000188565b600085815260208120601f198616915b828110156200022e578886015182559484019460019091019084016200020d565b50858210156200024d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611edc806200026d6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063715018a61161010f578063bc319d25116100a2578063e7d3fe6b11610071578063e7d3fe6b1461040e578063e985e9c514610421578063f2fde38b1461044f578063fab583f21461046257600080fd5b8063bc319d25146103cb578063c0caa772146103de578063c87b56dd146103f1578063dc1ab6331461040457600080fd5b8063a22cb465116100de578063a22cb4651461037e578063b20d45e514610391578063b88d4fde146103a5578063bbcd5bbe146103b857600080fd5b8063715018a61461034a5780638da5cb5b1461035257806395d89b41146103635780639b642de11461036b57600080fd5b80632abd2be61161018757806355a373d61161015657806355a373d6146103085780635e4b175d1461031c5780636352211e1461032457806370a082311461033757600080fd5b80632abd2be6146102bb57806339d3edce146102ce57806342842e0e146102e257806349df728c146102f557600080fd5b8063095ea7b3116101c3578063095ea7b3146102685780630ff73b351461027d57806318160ddd1461029e57806323b872dd146102a857600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f836600461181c565b61046a565b60405190151581526020015b60405180910390f35b61021a6104bc565b604051610209919061185d565b610250610235366004611890565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61027b6102763660046118be565b61054a565b005b61029061028b366004611890565b610631565b604051908152602001610209565b610290614e2d5481565b61027b6102b63660046118ea565b610649565b61027b6102c936600461192b565b610810565b614e2f54610250906001600160a01b031681565b61027b6102f03660046118ea565b6109fa565b61027b61030336600461195b565b610acf565b614e3254610250906001600160a01b031681565b61027b610bc9565b610250610332366004611890565b610cff565b61029061034536600461195b565b610d56565b61027b610db9565b6006546001600160a01b0316610250565b61021a610dcd565b61027b6103793660046119c1565b610dda565b61027b61038c366004611a11565b610df0565b614e3054610250906001600160a01b031681565b61027b6103b3366004611a3f565b610e5c565b61027b6103c636600461195b565b610f21565b61027b6103d936600461195b565b610f4c565b61027b6103ec36600461195b565b610f77565b61021a6103ff366004611890565b610fa2565b610290614e2e5481565b61027b61041c366004611ab2565b611029565b6101fd61042f366004611aeb565b600560209081526000928352604080842090915290825290205460ff1681565b61027b61045d36600461195b565b61131f565b61021a611398565b60006301ffc9a760e01b6001600160e01b03198316148061049b57506380ac58cd60e01b6001600160e01b03198316145b806104b65750635b5e139f60e01b6001600160e01b03198316145b92915050565b600080546104c990611b19565b80601f01602080910402602001604051908101604052809291908181526020018280546104f590611b19565b80156105425780601f1061051757610100808354040283529160200191610542565b820191906000526020600020905b81548152906001019060200180831161052557829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061059357506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6105d55760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b614e27816006811061064257600080fd5b0154905081565b6000818152600260205260409020546001600160a01b0384811691161461069f5760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016105cc565b6001600160a01b0382166106e95760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105cc565b336001600160a01b038416148061072357506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b8061074457506000818152600460205260409020546001600160a01b031633145b6107815760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016105cc565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b614e30546001600160a01b0316331461085c5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5cd95960921b60448201526064016105cc565b601e8211156108a65760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd08195e18d95959081b585e081b5a5b9d60521b60448201526064016105cc565b6107d082614e2e546108b89190611b69565b11156108fe5760405162461bcd60e51b815260206004820152601560248201527463616e6e6f7420657863656564206d6178696d756d60581b60448201526064016105cc565b6000614e2e546107d06109119190611b7c565b905060005b838110156109f45761092782611b8f565b9150600061093583436113a6565b905061098684614657836107d0811061095057610950611ba6565b01541561097357614657836107d0811061096c5761096c611ba6565b0154610975565b825b61098190614650611b69565b61146f565b614657836107d0811061099b5761099b611ba6565b0154156109be57614657836107d081106109b7576109b7611ba6565b01546109c0565b825b614657826107d081106109d5576109d5611ba6565b015550614e2e80546001908101909155614e2d80548201905501610916565b50505050565b610a05838383610649565b6001600160a01b0382163b1580610aae5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611bbc565b6001600160e01b031916145b610aca5760405162461bcd60e51b81526004016105cc90611bd9565b505050565b610ad761153b565b6001600160a01b038116610aea57600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b559190611c03565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190611c1c565b610bd161153b565b614e2754600090610be490610bb8611b7c565b905060005b6003811015610cfb57610bfb82611b8f565b9150610c1b73112e62d5906f9239d9fabab7d0237a328f128e228261146f565b614e325460405163243cf20f60e21b8152600481018390526001600160a01b03909116906390f3c83c90602401600060405180830381600087803b158015610c6257600080fd5b505af1158015610c76573d6000803e3d6000fd5b505050506007600060068110610c8e57610c8e611ba6565b610bb8020182610bb88110610ca557610ca5611ba6565b015415610cc757600782610bb88110610cc057610cc0611ba6565b0154610cc9565b815b600782610bb88110610cdd57610cdd611ba6565b0155614e2780546001908101909155614e2d80548201905501610be9565b5050565b6000818152600260205260409020546001600160a01b031680610d515760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016105cc565b919050565b60006001600160a01b038216610d9d5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016105cc565b506001600160a01b031660009081526003602052604090205490565b610dc161153b565b610dcb6000611595565b565b600180546104c990611b19565b610de261153b565b614e31610aca828483611c9d565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e67858585610649565b6001600160a01b0384163b1580610efe5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610eaf9033908a90899089908990600401611d5d565b6020604051808303816000875af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611bbc565b6001600160e01b031916145b610f1a5760405162461bcd60e51b81526004016105cc90611bd9565b5050505050565b610f2961153b565b614e3280546001600160a01b0319166001600160a01b0392909216919091179055565b610f5461153b565b614e3080546001600160a01b0319166001600160a01b0392909216919091179055565b610f7f61153b565b614e2f80546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546060906001600160a01b0316610ff65760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081b5a5b9d195960b21b60448201526064016105cc565b614e31611002836115e7565b604051602001611013929190611db1565b6040516020818303038152906040529050919050565b614e2f546001600160a01b031633146110755760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5cd95960921b60448201526064016105cc565b601e8211156110bf5760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd08195e18d95959081b585e081b5a5b9d60521b60448201526064016105cc565b610bb882614e2785600681106110d7576110d7611ba6565b01546110e39190611b69565b11156111295760405162461bcd60e51b815260206004820152601560248201527463616e6e6f7420657863656564206d6178696d756d60581b60448201526064016105cc565b6000614e27846006811061113f5761113f611ba6565b015461114d90610bb8611b7c565b905060005b83811015610f1a5761116382611b8f565b9150600061117183436113a6565b9050600061118187610bb8611e38565b6007886006811061119457611194611ba6565b610bb8020183610bb881106111ab576111ab611ba6565b0154156111e357600788600681106111c5576111c5611ba6565b610bb8020183610bb881106111dc576111dc611ba6565b01546111e5565b825b6111ef9190611b69565b90506111fb858261146f565b614e325460405163243cf20f60e21b8152600481018390526001600160a01b03909116906390f3c83c90602401600060405180830381600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506007876006811061126d5761126d611ba6565b610bb8020184610bb8811061128457611284611ba6565b0154156112bc576007876006811061129e5761129e611ba6565b610bb8020184610bb881106112b5576112b5611ba6565b01546112be565b835b600788600681106112d1576112d1611ba6565b610bb8020183610bb881106112e8576112e8611ba6565b0155614e2787600681106112fe576112fe611ba6565b0180546001908101909155614e2d8054820190559290920191506111529050565b61132761153b565b6001600160a01b03811661138c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cc565b61139581611595565b50565b614e3180546104c990611b19565b6000826000036113b8575060006104b6565b6040513260601b6bffffffffffffffffffffffff19166020820152600080356001600160e01b0319166034830152908390439042906038016040516020818303038152906040528051906020012060001c6114139190611e65565b61141d9044611b69565b6114279190611b69565b6114319190611b69565b60405160200161144391815260200190565b60408051601f198184030181529190528051602090910120905061146781856116e8565b949350505050565b61147982826116fb565b6001600160a01b0382163b158061151f5750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af11580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115139190611bbc565b6001600160e01b031916145b610cfb5760405162461bcd60e51b81526004016105cc90611bd9565b6006546001600160a01b03163314610dcb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cc565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608160000361160e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611638578061162281611e79565b91506116319050600a83611e65565b9150611612565b60008167ffffffffffffffff81111561165357611653611c39565b6040519080825280601f01601f19166020018201604052801561167d576020820181803683370190505b5090505b841561146757611692600183611b7c565b915061169f600a86611e92565b6116aa906030611b69565b60f81b8183815181106116bf576116bf611ba6565b60200101906001600160f81b031916908160001a9053506116e1600a86611e65565b9450611681565b60006116f48284611e92565b9392505050565b6001600160a01b0382166117455760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105cc565b6000818152600260205260409020546001600160a01b03161561179b5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016105cc565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461139557600080fd5b60006020828403121561182e57600080fd5b81356116f481611806565b60005b8381101561185457818101518382015260200161183c565b50506000910152565b602081526000825180602084015261187c816040850160208701611839565b601f01601f19169190910160400192915050565b6000602082840312156118a257600080fd5b5035919050565b6001600160a01b038116811461139557600080fd5b600080604083850312156118d157600080fd5b82356118dc816118a9565b946020939093013593505050565b6000806000606084860312156118ff57600080fd5b833561190a816118a9565b9250602084013561191a816118a9565b929592945050506040919091013590565b6000806040838503121561193e57600080fd5b823591506020830135611950816118a9565b809150509250929050565b60006020828403121561196d57600080fd5b81356116f4816118a9565b60008083601f84011261198a57600080fd5b50813567ffffffffffffffff8111156119a257600080fd5b6020830191508360208285010111156119ba57600080fd5b9250929050565b600080602083850312156119d457600080fd5b823567ffffffffffffffff8111156119eb57600080fd5b6119f785828601611978565b90969095509350505050565b801515811461139557600080fd5b60008060408385031215611a2457600080fd5b8235611a2f816118a9565b9150602083013561195081611a03565b600080600080600060808688031215611a5757600080fd5b8535611a62816118a9565b94506020860135611a72816118a9565b935060408601359250606086013567ffffffffffffffff811115611a9557600080fd5b611aa188828901611978565b969995985093965092949392505050565b600080600060608486031215611ac757600080fd5b83359250602084013591506040840135611ae0816118a9565b809150509250925092565b60008060408385031215611afe57600080fd5b8235611b09816118a9565b91506020830135611950816118a9565b600181811c90821680611b2d57607f821691505b602082108103611b4d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b6576104b6611b53565b818103818111156104b6576104b6611b53565b600081611b9e57611b9e611b53565b506000190190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611bce57600080fd5b81516116f481611806565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b600060208284031215611c1557600080fd5b5051919050565b600060208284031215611c2e57600080fd5b81516116f481611a03565b634e487b7160e01b600052604160045260246000fd5b601f821115610aca57600081815260208120601f850160051c81016020861015611c765750805b601f850160051c820191505b81811015611c9557828155600101611c82565b505050505050565b67ffffffffffffffff831115611cb557611cb5611c39565b611cc983611cc38354611b19565b83611c4f565b6000601f841160018114611cfd5760008515611ce55750838201355b600019600387901b1c1916600186901b178355610f1a565b600083815260209020601f19861690835b82811015611d2e5786850135825560209485019460019092019101611d0e565b5086821015611d4b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000808454611dbf81611b19565b60018281168015611dd75760018114611dec57611e1b565b60ff1984168752821515830287019450611e1b565b8860005260208060002060005b85811015611e125781548a820152908401908201611df9565b50505082870194505b505050508351611e2f818360208801611839565b01949350505050565b80820281158282048414176104b6576104b6611b53565b634e487b7160e01b600052601260045260246000fd5b600082611e7457611e74611e4f565b500490565b600060018201611e8b57611e8b611b53565b5060010190565b600082611ea157611ea1611e4f565b50069056fea264697066735822122060fe983f2c2efc67ae9d7225425ed1507e4b50cc2b003c942704219f9c991fa064736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063715018a61161010f578063bc319d25116100a2578063e7d3fe6b11610071578063e7d3fe6b1461040e578063e985e9c514610421578063f2fde38b1461044f578063fab583f21461046257600080fd5b8063bc319d25146103cb578063c0caa772146103de578063c87b56dd146103f1578063dc1ab6331461040457600080fd5b8063a22cb465116100de578063a22cb4651461037e578063b20d45e514610391578063b88d4fde146103a5578063bbcd5bbe146103b857600080fd5b8063715018a61461034a5780638da5cb5b1461035257806395d89b41146103635780639b642de11461036b57600080fd5b80632abd2be61161018757806355a373d61161015657806355a373d6146103085780635e4b175d1461031c5780636352211e1461032457806370a082311461033757600080fd5b80632abd2be6146102bb57806339d3edce146102ce57806342842e0e146102e257806349df728c146102f557600080fd5b8063095ea7b3116101c3578063095ea7b3146102685780630ff73b351461027d57806318160ddd1461029e57806323b872dd146102a857600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f836600461181c565b61046a565b60405190151581526020015b60405180910390f35b61021a6104bc565b604051610209919061185d565b610250610235366004611890565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61027b6102763660046118be565b61054a565b005b61029061028b366004611890565b610631565b604051908152602001610209565b610290614e2d5481565b61027b6102b63660046118ea565b610649565b61027b6102c936600461192b565b610810565b614e2f54610250906001600160a01b031681565b61027b6102f03660046118ea565b6109fa565b61027b61030336600461195b565b610acf565b614e3254610250906001600160a01b031681565b61027b610bc9565b610250610332366004611890565b610cff565b61029061034536600461195b565b610d56565b61027b610db9565b6006546001600160a01b0316610250565b61021a610dcd565b61027b6103793660046119c1565b610dda565b61027b61038c366004611a11565b610df0565b614e3054610250906001600160a01b031681565b61027b6103b3366004611a3f565b610e5c565b61027b6103c636600461195b565b610f21565b61027b6103d936600461195b565b610f4c565b61027b6103ec36600461195b565b610f77565b61021a6103ff366004611890565b610fa2565b610290614e2e5481565b61027b61041c366004611ab2565b611029565b6101fd61042f366004611aeb565b600560209081526000928352604080842090915290825290205460ff1681565b61027b61045d36600461195b565b61131f565b61021a611398565b60006301ffc9a760e01b6001600160e01b03198316148061049b57506380ac58cd60e01b6001600160e01b03198316145b806104b65750635b5e139f60e01b6001600160e01b03198316145b92915050565b600080546104c990611b19565b80601f01602080910402602001604051908101604052809291908181526020018280546104f590611b19565b80156105425780601f1061051757610100808354040283529160200191610542565b820191906000526020600020905b81548152906001019060200180831161052557829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061059357506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6105d55760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b614e27816006811061064257600080fd5b0154905081565b6000818152600260205260409020546001600160a01b0384811691161461069f5760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b60448201526064016105cc565b6001600160a01b0382166106e95760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105cc565b336001600160a01b038416148061072357506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b8061074457506000818152600460205260409020546001600160a01b031633145b6107815760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064016105cc565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b614e30546001600160a01b0316331461085c5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5cd95960921b60448201526064016105cc565b601e8211156108a65760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd08195e18d95959081b585e081b5a5b9d60521b60448201526064016105cc565b6107d082614e2e546108b89190611b69565b11156108fe5760405162461bcd60e51b815260206004820152601560248201527463616e6e6f7420657863656564206d6178696d756d60581b60448201526064016105cc565b6000614e2e546107d06109119190611b7c565b905060005b838110156109f45761092782611b8f565b9150600061093583436113a6565b905061098684614657836107d0811061095057610950611ba6565b01541561097357614657836107d0811061096c5761096c611ba6565b0154610975565b825b61098190614650611b69565b61146f565b614657836107d0811061099b5761099b611ba6565b0154156109be57614657836107d081106109b7576109b7611ba6565b01546109c0565b825b614657826107d081106109d5576109d5611ba6565b015550614e2e80546001908101909155614e2d80548201905501610916565b50505050565b610a05838383610649565b6001600160a01b0382163b1580610aae5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611bbc565b6001600160e01b031916145b610aca5760405162461bcd60e51b81526004016105cc90611bd9565b505050565b610ad761153b565b6001600160a01b038116610aea57600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b559190611c03565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190611c1c565b610bd161153b565b614e2754600090610be490610bb8611b7c565b905060005b6003811015610cfb57610bfb82611b8f565b9150610c1b73112e62d5906f9239d9fabab7d0237a328f128e228261146f565b614e325460405163243cf20f60e21b8152600481018390526001600160a01b03909116906390f3c83c90602401600060405180830381600087803b158015610c6257600080fd5b505af1158015610c76573d6000803e3d6000fd5b505050506007600060068110610c8e57610c8e611ba6565b610bb8020182610bb88110610ca557610ca5611ba6565b015415610cc757600782610bb88110610cc057610cc0611ba6565b0154610cc9565b815b600782610bb88110610cdd57610cdd611ba6565b0155614e2780546001908101909155614e2d80548201905501610be9565b5050565b6000818152600260205260409020546001600160a01b031680610d515760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b60448201526064016105cc565b919050565b60006001600160a01b038216610d9d5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b60448201526064016105cc565b506001600160a01b031660009081526003602052604090205490565b610dc161153b565b610dcb6000611595565b565b600180546104c990611b19565b610de261153b565b614e31610aca828483611c9d565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e67858585610649565b6001600160a01b0384163b1580610efe5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610eaf9033908a90899089908990600401611d5d565b6020604051808303816000875af1158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190611bbc565b6001600160e01b031916145b610f1a5760405162461bcd60e51b81526004016105cc90611bd9565b5050505050565b610f2961153b565b614e3280546001600160a01b0319166001600160a01b0392909216919091179055565b610f5461153b565b614e3080546001600160a01b0319166001600160a01b0392909216919091179055565b610f7f61153b565b614e2f80546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546060906001600160a01b0316610ff65760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081b5a5b9d195960b21b60448201526064016105cc565b614e31611002836115e7565b604051602001611013929190611db1565b6040516020818303038152906040529050919050565b614e2f546001600160a01b031633146110755760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5cd95960921b60448201526064016105cc565b601e8211156110bf5760405162461bcd60e51b815260206004820152601660248201527518d85b9b9bdd08195e18d95959081b585e081b5a5b9d60521b60448201526064016105cc565b610bb882614e2785600681106110d7576110d7611ba6565b01546110e39190611b69565b11156111295760405162461bcd60e51b815260206004820152601560248201527463616e6e6f7420657863656564206d6178696d756d60581b60448201526064016105cc565b6000614e27846006811061113f5761113f611ba6565b015461114d90610bb8611b7c565b905060005b83811015610f1a5761116382611b8f565b9150600061117183436113a6565b9050600061118187610bb8611e38565b6007886006811061119457611194611ba6565b610bb8020183610bb881106111ab576111ab611ba6565b0154156111e357600788600681106111c5576111c5611ba6565b610bb8020183610bb881106111dc576111dc611ba6565b01546111e5565b825b6111ef9190611b69565b90506111fb858261146f565b614e325460405163243cf20f60e21b8152600481018390526001600160a01b03909116906390f3c83c90602401600060405180830381600087803b15801561124257600080fd5b505af1158015611256573d6000803e3d6000fd5b505050506007876006811061126d5761126d611ba6565b610bb8020184610bb8811061128457611284611ba6565b0154156112bc576007876006811061129e5761129e611ba6565b610bb8020184610bb881106112b5576112b5611ba6565b01546112be565b835b600788600681106112d1576112d1611ba6565b610bb8020183610bb881106112e8576112e8611ba6565b0155614e2787600681106112fe576112fe611ba6565b0180546001908101909155614e2d8054820190559290920191506111529050565b61132761153b565b6001600160a01b03811661138c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cc565b61139581611595565b50565b614e3180546104c990611b19565b6000826000036113b8575060006104b6565b6040513260601b6bffffffffffffffffffffffff19166020820152600080356001600160e01b0319166034830152908390439042906038016040516020818303038152906040528051906020012060001c6114139190611e65565b61141d9044611b69565b6114279190611b69565b6114319190611b69565b60405160200161144391815260200190565b60408051601f198184030181529190528051602090910120905061146781856116e8565b949350505050565b61147982826116fb565b6001600160a01b0382163b158061151f5750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af11580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115139190611bbc565b6001600160e01b031916145b610cfb5760405162461bcd60e51b81526004016105cc90611bd9565b6006546001600160a01b03163314610dcb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cc565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608160000361160e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611638578061162281611e79565b91506116319050600a83611e65565b9150611612565b60008167ffffffffffffffff81111561165357611653611c39565b6040519080825280601f01601f19166020018201604052801561167d576020820181803683370190505b5090505b841561146757611692600183611b7c565b915061169f600a86611e92565b6116aa906030611b69565b60f81b8183815181106116bf576116bf611ba6565b60200101906001600160f81b031916908160001a9053506116e1600a86611e65565b9450611681565b60006116f48284611e92565b9392505050565b6001600160a01b0382166117455760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b60448201526064016105cc565b6000818152600260205260409020546001600160a01b03161561179b5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b60448201526064016105cc565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461139557600080fd5b60006020828403121561182e57600080fd5b81356116f481611806565b60005b8381101561185457818101518382015260200161183c565b50506000910152565b602081526000825180602084015261187c816040850160208701611839565b601f01601f19169190910160400192915050565b6000602082840312156118a257600080fd5b5035919050565b6001600160a01b038116811461139557600080fd5b600080604083850312156118d157600080fd5b82356118dc816118a9565b946020939093013593505050565b6000806000606084860312156118ff57600080fd5b833561190a816118a9565b9250602084013561191a816118a9565b929592945050506040919091013590565b6000806040838503121561193e57600080fd5b823591506020830135611950816118a9565b809150509250929050565b60006020828403121561196d57600080fd5b81356116f4816118a9565b60008083601f84011261198a57600080fd5b50813567ffffffffffffffff8111156119a257600080fd5b6020830191508360208285010111156119ba57600080fd5b9250929050565b600080602083850312156119d457600080fd5b823567ffffffffffffffff8111156119eb57600080fd5b6119f785828601611978565b90969095509350505050565b801515811461139557600080fd5b60008060408385031215611a2457600080fd5b8235611a2f816118a9565b9150602083013561195081611a03565b600080600080600060808688031215611a5757600080fd5b8535611a62816118a9565b94506020860135611a72816118a9565b935060408601359250606086013567ffffffffffffffff811115611a9557600080fd5b611aa188828901611978565b969995985093965092949392505050565b600080600060608486031215611ac757600080fd5b83359250602084013591506040840135611ae0816118a9565b809150509250925092565b60008060408385031215611afe57600080fd5b8235611b09816118a9565b91506020830135611950816118a9565b600181811c90821680611b2d57607f821691505b602082108103611b4d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104b6576104b6611b53565b818103818111156104b6576104b6611b53565b600081611b9e57611b9e611b53565b506000190190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611bce57600080fd5b81516116f481611806565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b600060208284031215611c1557600080fd5b5051919050565b600060208284031215611c2e57600080fd5b81516116f481611a03565b634e487b7160e01b600052604160045260246000fd5b601f821115610aca57600081815260208120601f850160051c81016020861015611c765750805b601f850160051c820191505b81811015611c9557828155600101611c82565b505050505050565b67ffffffffffffffff831115611cb557611cb5611c39565b611cc983611cc38354611b19565b83611c4f565b6000601f841160018114611cfd5760008515611ce55750838201355b600019600387901b1c1916600186901b178355610f1a565b600083815260209020601f19861690835b82811015611d2e5786850135825560209485019460019092019101611d0e565b5086821015611d4b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000808454611dbf81611b19565b60018281168015611dd75760018114611dec57611e1b565b60ff1984168752821515830287019450611e1b565b8860005260208060002060005b85811015611e125781548a820152908401908201611df9565b50505082870194505b505050508351611e2f818360208801611839565b01949350505050565b80820281158282048414176104b6576104b6611b53565b634e487b7160e01b600052601260045260246000fd5b600082611e7457611e74611e4f565b500490565b600060018201611e8b57611e8b611b53565b5060010190565b600082611ea157611ea1611e4f565b50069056fea264697066735822122060fe983f2c2efc67ae9d7225425ed1507e4b50cc2b003c942704219f9c991fa064736f6c63430008110033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.