ERC-1155
Overview
Max Total Supply
259 NF3
Holders
134
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Basketball
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.10; // SPDX-License-Identifier: UNLICENSED import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../roles/MinterRole.sol"; contract Basketball is IERC2981, ERC165Storage, Ownable, IERC1155MetadataURI, ERC1155, MinterRole, ReentrancyGuard { using Strings for uint256; using SafeMath for uint256; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; // merkle tree root bytes32 public gcfRoot; bytes32 public communityRoot; string public name; string public symbol; /// @dev royalty percent of 2nd sale. ex: 1 = 1%. uint256 public constant royaltyPercent = 5; /// @dev royalty percent of 2nd sale. ex: 1 = 1%. address public immutable royalty; /// @dev total mint supply uint256 public totalsupply; /// @dev max mint supply uint256 public maxsupply; /// @dev reserve count mapping mapping(address => uint) public reserveCount; event claimedFromThreePoint(uint256 indexed gameId, address indexed beneficiary); struct GameInfo { uint totalCount; uint claimedCount; bytes32 rootkey; } /// @dev mapping for game info mapping(uint => GameInfo) public gameInfo; /// @dev mapping for minted of GCF whiltelist minting mapping(address => bool) mintedForGCF; /// @dev mapping for minted of community whiltelist minting mapping(address => bool) mintedForCommunity; /// @dev mapping for minted of 3 point score mapping(address => mapping(uint => bool)) mintedForGame; /// @dev max mint count per transaction uint256 public maxMintCount; /// @dev drop phase uint256 public dropPhase; ///@dev mint price uint256 public mintprice; //Token URI prefix string public tokenURIPrefix; /** * @dev Constructor Function * @param _name name of the token ex: Rarible * @param _symbol symbol of the token ex: RARI * @param _tokenURIPrefix token URI Prefix */ constructor(string memory _name, string memory _symbol, string memory _tokenURIPrefix, address _royalty, bytes32 _gcfRoot, bytes32 _communityRoot) ERC1155(_tokenURIPrefix) { name = _name; symbol = _symbol; tokenURIPrefix = _tokenURIPrefix; royalty = _royalty; gcfRoot = _gcfRoot; communityRoot = _communityRoot; dropPhase = 0; totalsupply = 0; maxsupply = 20000; mintprice = 0.07 ether; maxMintCount = 3; addAdmin(_msgSender()); addMinter(_msgSender()); _registerInterface(_INTERFACE_ID_ERC2981); } /** * @dev Creates a new token type and assings _initialSupply to minter * @param _beneficiary address where mint to * @param _id token Id * @param _supply mint supply */ function safeMint(address _beneficiary, uint256 _id, uint256 _supply) internal { require(_supply != 0, "Supply should be positive"); _mint(_beneficiary, _id, _supply, ""); } /** * @dev burn token with id and value * @param _owner address where mint to * @param _id token Id which will burn * @param _value token count which will burn */ function burn(address _owner, uint256 _id, uint256 _value) external { require(_owner == msg.sender || isApprovedForAll(_owner, msg.sender) == true, "Need operator approval for 3rd party burns."); _burn(_owner, _id, _value); } /** * @dev Internal function to set the token URI prefix. * @param _tokenURIPrefix string URI prefix to assign */ function _setTokenURIPrefix(string memory _tokenURIPrefix) internal { tokenURIPrefix = _tokenURIPrefix; } /** * @dev function which return token URI * @param _id token Id */ function uri(uint256 _id) override(ERC1155, IERC1155MetadataURI) virtual public view returns (string memory) { return bytes(tokenURIPrefix).length > 0 ? string(abi.encodePacked(tokenURIPrefix, _id.toString())) : ""; } /** * @dev mint function. */ function mint(uint256 _count, bytes32[] calldata _merkleProof) external payable nonReentrant { require(dropPhase > 0, "not the drop period"); require(maxsupply >= (totalsupply + _count), "overflow maxsupply"); require(_count <= maxMintCount, "too many count for one transaction"); if(dropPhase == 1) { require(mintedForGCF[msg.sender] == false, "have already minted to this address"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _count)); require(MerkleProof.verify(_merkleProof, gcfRoot, leaf), "Invalid Proof"); safeMint(msg.sender, 1, _count); mintedForGCF[msg.sender] = true; totalsupply+=_count; } else if(dropPhase == 2) { require(mintedForCommunity[msg.sender] == false, "have already minted to this address"); require(msg.value >= (mintprice * _count), "mintprice is not enough"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _count)); require(MerkleProof.verify(_merkleProof, communityRoot, leaf), "Invalid Proof"); safeMint(msg.sender, 1, _count); mintedForCommunity[msg.sender] = true; totalsupply+=_count; } else if(dropPhase == 3) { if(reserveCount[msg.sender] == 0) require(msg.value >= (mintprice * _count), "mintprice is not enough"); else require(reserveCount[msg.sender] >= _count, "not enough reserved token"); safeMint(msg.sender, 1, _count); totalsupply += _count; if(reserveCount[msg.sender] >= _count) reserveCount[msg.sender] -= _count; } else {} } function claimFromThreePoint(uint256 _gameId, bytes32[] calldata _merkleProof, address _beneficiary) public nonReentrant { require(gameInfo[_gameId].totalCount > gameInfo[_gameId].claimedCount, "have already minted all NFTs"); require(mintedForGame[_beneficiary][_gameId] == false, "have already minted to this address"); bytes32 leaf = keccak256(abi.encodePacked(_beneficiary)); require(MerkleProof.verify(_merkleProof, gameInfo[_gameId].rootkey, leaf), "Invalid Proof"); safeMint(_beneficiary, 1, 1); mintedForGame[_beneficiary][_gameId] = true; gameInfo[_gameId].claimedCount++; emit claimedFromThreePoint(_gameId, _beneficiary); } function setDropPhase(uint256 _dropPhase) external onlyOwner { require(_dropPhase <= 3, "dropPhase shold be not greater than 3"); dropPhase = _dropPhase; } function setMintPrice(uint256 _mintprice) external onlyOwner { require(_mintprice > 0, "mint price shold be not 0"); mintprice = _mintprice; } function setMintCount(uint256 _maxMintCount) external onlyOwner { require(_maxMintCount > 0, "max mint count should be not 0"); maxMintCount = _maxMintCount; } /** * @dev set maxsupply function */ function setMaxSupply(uint256 _maxsupply) external onlyAdmin { maxsupply = _maxsupply; } /** * @dev set gcfRoot function */ function setGCFRoot(bytes32 _gcfRoot) external onlyAdmin { gcfRoot = _gcfRoot; } /** * @dev set communityRoot function */ function setCommunityRoot(bytes32 _communityRoot) external onlyAdmin { communityRoot = _communityRoot; } /** * @dev set game root key */ function setGameRootKey(uint256 _gameId, bytes32 _rootkey, uint _totalCount) external onlyAdmin { GameInfo memory ri; ri.rootkey = _rootkey; ri.totalCount = _totalCount; ri.claimedCount = 0; gameInfo[_gameId] = ri; } /** * @dev reserve function for reserve mint. */ function reserve(uint256 _count) external payable { require(_count <= maxMintCount, "too many count for one transaction"); require(msg.value >= (mintprice * _count), "mintprice is not enough"); reserveCount[msg.sender] += _count; } /** * @dev withdraw all ethers to owner. */ function withdraw() public payable onlyOwner { address payable ownerAddress = payable(msg.sender); ownerAddress.transfer(address(this).balance); } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override(IERC2981) returns (address receiver, uint256 royaltyAmount) { receiver = royalty; royaltyAmount = salePrice.mul(royaltyPercent).div(100); } function supportsInterface(bytes4 interfaceId) public view override(IERC165, ERC165Storage, ERC1155, AccessControl) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } }
pragma solidity ^0.8.10; // SPDX-License-Identifier: UNLICENSED import "@openzeppelin/contracts/access/AccessControl.sol"; contract MinterRole is AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); modifier onlyAdmin() { require(isAdmin(_msgSender()), "Ownable: caller is not the admin"); _; } modifier onlyMinter() { require(isMinter(_msgSender()), "Ownable: caller is not the minter"); _; } constructor() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } function addMinter(address _account) public onlyAdmin { _setupRole(MINTER_ROLE, _account); } function removeMinter(address _account) public onlyAdmin { revokeRole(MINTER_ROLE, _account); } function addAdmin(address _account) public onlyAdmin { _setupRole(DEFAULT_ADMIN_ROLE , _account); } function removeAdmin(address _account) public onlyAdmin { revokeRole(DEFAULT_ADMIN_ROLE , _account); } function isMinter(address _account) internal virtual view returns(bool) { return hasRole(MINTER_ROLE, _account); } function isAdmin(address _account) internal virtual view returns(bool) { return hasRole(DEFAULT_ADMIN_ROLE , _account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 substraction 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: 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 v4.4.1 (utils/introspection/ERC165Storage.sol) pragma solidity ^0.8.0; import "./ERC165.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Storage is ERC165 { /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees 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. */ 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 Returns the rebuilt hash obtained by traversing a Merklee 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
// 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.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 1500 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_tokenURIPrefix","type":"string"},{"internalType":"address","name":"_royalty","type":"address"},{"internalType":"bytes32","name":"_gcfRoot","type":"bytes32"},{"internalType":"bytes32","name":"_communityRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"claimedFromThreePoint","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"claimFromThreePoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dropPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gameInfo","outputs":[{"internalType":"uint256","name":"totalCount","type":"uint256"},{"internalType":"uint256","name":"claimedCount","type":"uint256"},{"internalType":"bytes32","name":"rootkey","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gcfRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxsupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintprice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"address","name":"_account","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercent","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","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":"uint256","name":"amount","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":"bytes32","name":"_communityRoot","type":"bytes32"}],"name":"setCommunityRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dropPhase","type":"uint256"}],"name":"setDropPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_gcfRoot","type":"bytes32"}],"name":"setGCFRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"bytes32","name":"_rootkey","type":"bytes32"},{"internalType":"uint256","name":"_totalCount","type":"uint256"}],"name":"setGameRootKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxsupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintCount","type":"uint256"}],"name":"setMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintprice","type":"uint256"}],"name":"setMintPrice","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":"tokenURIPrefix","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b506040516200441d3803806200441d833981016040819052620000349162000516565b8362000040336200010b565b6200004b816200015d565b506200005960003362000176565b6001600655855162000073906009906020890190620003a3565b5084516200008990600a906020880190620003a3565b5083516200009f906015906020870190620003a3565b506001600160a01b0383166080526007829055600881905560006013819055600b55614e20600c5566f8b0a10e4700006014556003601255620000e23362000182565b620000ed33620001f4565b620000ff63152a902d60e11b6200027e565b50505050505062000619565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b805162000172906004906020840190620003a3565b5050565b620001728282620002ff565b336000908152600080516020620043fd833981519152602052604090205460ff16620001e45760405162461bcd60e51b81526020600482018190526024820152600080516020620043dd83398151915260448201526064015b60405180910390fd5b620001f160008262000176565b50565b336000908152600080516020620043fd833981519152602052604090205460ff16620002525760405162461bcd60e51b81526020600482018190526024820152600080516020620043dd8339815191526044820152606401620001db565b620001f17f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68262000176565b6001600160e01b03198082169003620002da5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401620001db565b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620001725760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200035f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620003b190620005dd565b90600052602060002090601f016020900481019282620003d5576000855562000420565b82601f10620003f057805160ff191683800117855562000420565b8280016001018555821562000420579182015b828111156200042057825182559160200191906001019062000403565b506200042e92915062000432565b5090565b5b808211156200042e576000815560010162000433565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200047157600080fd5b81516001600160401b03808211156200048e576200048e62000449565b604051601f8301601f19908116603f01168101908282118183101715620004b957620004b962000449565b81604052838152602092508683858801011115620004d657600080fd5b600091505b83821015620004fa5785820183015181830184015290820190620004db565b838211156200050c5760008385830101525b9695505050505050565b60008060008060008060c087890312156200053057600080fd5b86516001600160401b03808211156200054857600080fd5b620005568a838b016200045f565b975060208901519150808211156200056d57600080fd5b6200057b8a838b016200045f565b965060408901519150808211156200059257600080fd5b50620005a189828a016200045f565b606089015190955090506001600160a01b0381168114620005c157600080fd5b809350506080870151915060a087015190509295509295509295565b600181811c90821680620005f257607f821691505b6020821081036200061357634e487b7160e01b600052602260045260246000fd5b50919050565b608051613da16200063c6000396000818161042b0152610c240152613da16000f3fe60806040526004361061031d5760003560e01c8063819b25ba116101a5578063a6f81668116100ec578063dfbda40a11610095578063f2fde38b1161006f578063f2fde38b14610951578063f4a0a52814610971578063f5298aca14610991578063fc4c8118146109b157600080fd5b8063dfbda40a146108c8578063e985e9c5146108e8578063f242432a1461093157600080fd5b8063d5391393116100c6578063d539139314610847578063d547741f1461087b578063d8028c4b1461089b57600080fd5b8063a6f81668146107c8578063ba41b0c61461081f578063c0ac99831461083257600080fd5b806395d89b411161014e5780639f67756d116101285780639f67756d1461077e578063a217fddf14610793578063a22cb465146107a857600080fd5b806395d89b4114610729578063983b2d561461073e5780639c76b14b1461075e57600080fd5b80638d28b00e1161017f5780638d28b00e146106a55780638da5cb5b146106c557806391d14854146106e357600080fd5b8063819b25ba1461066657806388eab67614610679578063894a5aef1461068f57600080fd5b80633345d34a1161026957806358caac5c11610212578063715018a6116101ec578063715018a61461061b57806372dd529b1461063057806374cc36421461064657600080fd5b806358caac5c146105c55780636f8b44b0146105db57806370480275146105fb57600080fd5b80634b6406d1116102435780634b6406d1146105625780634e1273f41461057857806357e984fe146105a557600080fd5b80633345d34a1461051a57806336568abe1461053a5780633ccfd60b1461055a57600080fd5b806329ee566c116102cb5780632f2ff15d116102a55780632f2ff15d146104c45780633092afd5146104e457806332c60eef1461050457600080fd5b806329ee566c146104195780632a55205a146104655780632eb2c2d6146104a457600080fd5b80630e89341c116102fc5780630e89341c146103a75780631785f53c146103c7578063248a9ca3146103e957600080fd5b8062fdd58e1461032257806301ffc9a71461035557806306fdde0314610385575b600080fd5b34801561032e57600080fd5b5061034261033d366004613309565b6109c7565b6040519081526020015b60405180910390f35b34801561036157600080fd5b50610375610370366004613349565b610a72565b604051901515815260200161034c565b34801561039157600080fd5b5061039a610ad3565b60405161034c91906133c2565b3480156103b357600080fd5b5061039a6103c23660046133d5565b610b61565b3480156103d357600080fd5b506103e76103e23660046133ee565b610bbf565b005b3480156103f557600080fd5b506103426104043660046133d5565b60009081526005602052604090206001015490565b34801561042557600080fd5b5061044d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161034c565b34801561047157600080fd5b50610485610480366004613409565b610c22565b604080516001600160a01b03909316835260208301919091520161034c565b3480156104b057600080fd5b506103e76104bf366004613577565b610c64565b3480156104d057600080fd5b506103e76104df366004613621565b610d06565b3480156104f057600080fd5b506103e76104ff3660046133ee565b610d31565b34801561051057600080fd5b5061034260125481565b34801561052657600080fd5b506103e76105353660046133d5565b610db0565b34801561054657600080fd5b506103e7610555366004613621565b610e5f565b6103e7610eeb565b34801561056e57600080fd5b50610342600c5481565b34801561058457600080fd5b50610598610593366004613644565b610f73565b60405161034c919061374a565b3480156105b157600080fd5b506103e76105c03660046133d5565b6110b1565b3480156105d157600080fd5b5061034260075481565b3480156105e757600080fd5b506103e76105f63660046133d5565b61110b565b34801561060757600080fd5b506103e76106163660046133ee565b611165565b34801561062757600080fd5b506103e76111c5565b34801561063c57600080fd5b50610342600b5481565b34801561065257600080fd5b506103e76106613660046137a9565b61122b565b6103e76106743660046133d5565b6114c0565b34801561068557600080fd5b5061034260145481565b34801561069b57600080fd5b5061034260085481565b3480156106b157600080fd5b506103e76106c0366004613807565b6115a1565b3480156106d157600080fd5b506001546001600160a01b031661044d565b3480156106ef57600080fd5b506103756106fe366004613621565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561073557600080fd5b5061039a611630565b34801561074a57600080fd5b506103e76107593660046133ee565b61163d565b34801561076a57600080fd5b506103e76107793660046133d5565b6116bc565b34801561078a57600080fd5b50610342600581565b34801561079f57600080fd5b50610342600081565b3480156107b457600080fd5b506103e76107c3366004613833565b611716565b3480156107d457600080fd5b506108046107e33660046133d5565b600e6020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161034c565b6103e761082d36600461386f565b611721565b34801561083e57600080fd5b5061039a611d0b565b34801561085357600080fd5b506103427f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561088757600080fd5b506103e7610896366004613621565b611d18565b3480156108a757600080fd5b506103426108b63660046133ee565b600d6020526000908152604090205481565b3480156108d457600080fd5b506103e76108e33660046133d5565b611d3e565b3480156108f457600080fd5b506103756109033660046138bb565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b34801561093d57600080fd5b506103e761094c3660046138e5565b611e14565b34801561095d57600080fd5b506103e761096c3660046133ee565b611eaf565b34801561097d57600080fd5b506103e761098c3660046133d5565b611f8e565b34801561099d57600080fd5b506103e76109ac36600461394a565b61203d565b3480156109bd57600080fd5b5061034260135481565b60006001600160a01b038316610a4a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526002602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610aa357506001600160e01b031982166303a24d0760e21b145b80610abe57506001600160e01b03198216637965db0b60e01b145b80610acd5750610acd826120f9565b92915050565b60098054610ae09061397d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c9061397d565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b505050505081565b6060600060158054610b729061397d565b905011610b8e5760405180602001604052806000815250610acd565b6015610b998361211e565b604051602001610baa9291906139d3565b60405160208183030381529060405292915050565b610bc833612227565b610c145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f600082611d18565b50565b7f00000000000000000000000000000000000000000000000000000000000000006000610c5b6064610c55856005612267565b9061227a565b90509250929050565b6001600160a01b038516331480610c805750610c808533610903565b610cf25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610a41565b610cff8585858585612286565b5050505050565b600082815260056020526040902060010154610d22813361250f565b610d2c838361258f565b505050565b610d3a33612227565b610d865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682611d18565b6001546001600160a01b03163314610e0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b60008111610e5a5760405162461bcd60e51b815260206004820152601e60248201527f6d6178206d696e7420636f756e742073686f756c64206265206e6f74203000006044820152606401610a41565b601255565b6001600160a01b0381163314610edd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a41565b610ee78282612631565b5050565b6001546001600160a01b03163314610f455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b604051339081904780156108fc02916000818181858888f19350505050158015610ee7573d6000803e3d6000fd5b60608151835114610fec5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610a41565b6000835167ffffffffffffffff8111156110085761100861342b565b604051908082528060200260200182016040528015611031578160200160208202803683370190505b50905060005b84518110156110a95761107c85828151811061105557611055613a79565b602002602001015185838151811061106f5761106f613a79565b60200260200101516109c7565b82828151811061108e5761108e613a79565b60209081029190910101526110a281613aa5565b9050611037565b509392505050565b6110ba33612227565b6111065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600755565b61111433612227565b6111605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600c55565b61116e33612227565b6111ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f6000826126b4565b6001546001600160a01b0316331461121f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b61122960006126be565b565b60026006540361127d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a41565b60026006556000848152600e6020526040902060018101549054116112e45760405162461bcd60e51b815260206004820152601c60248201527f6861766520616c7265616479206d696e74656420616c6c204e465473000000006044820152606401610a41565b6001600160a01b038116600090815260116020908152604080832087845290915290205460ff16156113645760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034016040516020818303038152906040528051906020012090506113ec84848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600e602052604090206002015492508591506127289050565b6114285760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b6114348260018061273e565b6001600160a01b03821660009081526011602090815260408083208884528252808320805460ff19166001908117909155600e90925282200180549161147983613aa5565b90915550506040516001600160a01b0383169086907f874ce4476621a88a8358c99e2aebd2e177158190da82d6e9e1eaba6188c0e59590600090a350506001600655505050565b60125481111561151d5760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610a41565b8060145461152b9190613abe565b34101561157a5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b336000908152600d602052604081208054839290611599908490613add565b909155505050565b6115aa33612227565b6115f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b6040805160608101825260006020808301828152838501968752948352958152600e90955293209251835551600183015551600290910155565b600a8054610ae09061397d565b61164633612227565b6116925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826126b4565b6116c533612227565b6117115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600855565b610ee73383836127a9565b6002600654036117735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a41565b60026006556013546117c75760405162461bcd60e51b815260206004820152601360248201527f6e6f74207468652064726f7020706572696f64000000000000000000000000006044820152606401610a41565b82600b546117d59190613add565b600c5410156118265760405162461bcd60e51b815260206004820152601260248201527f6f766572666c6f77206d6178737570706c7900000000000000000000000000006044820152606401610a41565b6012548311156118835760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610a41565b6013546001036119fa57336000908152600f602052604090205460ff16156118f95760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b6040516bffffffffffffffffffffffff193360601b1660208201526034810184905260009060540160405160208183030381529060405280519060200120905061197a838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506007549150849050612728565b6119b65760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b6119c23360018661273e565b336000908152600f60205260408120805460ff19166001179055600b80548692906119ee908490613add565b90915550611d01915050565b601354600203611bc2573360009081526010602052604090205460ff1615611a705760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b82601454611a7e9190613abe565b341015611acd5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611b4e838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050612728565b611b8a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b611b963360018661273e565b336000908152601060205260408120805460ff19166001179055600b80548692906119ee908490613add565b601354600303611d0157336000908152600d60205260408120549003611c445782601454611bf09190613abe565b341015611c3f5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b611ca3565b336000908152600d6020526040902054831115611ca35760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820726573657276656420746f6b656e000000000000006044820152606401610a41565b611caf3360018561273e565b82600b6000828254611cc19190613add565b9091555050336000908152600d60205260409020548311611d0157336000908152600d602052604081208054859290611cfb908490613af5565b90915550505b5050600160065550565b60158054610ae09061397d565b600082815260056020526040902060010154611d34813361250f565b610d2c8383612631565b6001546001600160a01b03163314611d985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b6003811115611e0f5760405162461bcd60e51b815260206004820152602560248201527f64726f7050686173652073686f6c64206265206e6f742067726561746572207460448201527f68616e20330000000000000000000000000000000000000000000000000000006064820152608401610a41565b601355565b6001600160a01b038516331480611e305750611e308533610903565b611ea25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610a41565b610cff858585858561289d565b6001546001600160a01b03163314611f095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b6001600160a01b038116611f855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a41565b610c1f816126be565b6001546001600160a01b03163314611fe85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b600081116120385760405162461bcd60e51b815260206004820152601960248201527f6d696e742070726963652073686f6c64206265206e6f742030000000000000006044820152606401610a41565b601455565b6001600160a01b03831633148061207c57506001600160a01b038316600090815260036020908152604080832033845290915290205460ff1615156001145b6120ee5760405162461bcd60e51b815260206004820152602b60248201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060448201527f61727479206275726e732e0000000000000000000000000000000000000000006064820152608401610a41565b610d2c838383612a5b565b60006001600160e01b03198216637965db0b60e01b1480610acd5750610acd82612bf2565b6060816000036121455750506040805180820190915260018152600360fc1b602082015290565b8160005b811561216f578061215981613aa5565b91506121689050600a83613b22565b9150612149565b60008167ffffffffffffffff81111561218a5761218a61342b565b6040519080825280601f01601f1916602001820160405280156121b4576020820181803683370190505b5090505b841561221f576121c9600183613af5565b91506121d6600a86613b36565b6121e1906030613add565b60f81b8183815181106121f6576121f6613a79565b60200101906001600160f81b031916908160001a905350612218600a86613b22565b94506121b8565b949350505050565b6001600160a01b03811660009081527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc602052604081205460ff16610acd565b60006122738284613abe565b9392505050565b60006122738284613b22565b81518351146122fd5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610a41565b6001600160a01b0384166123615760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a41565b3360005b84518110156124a157600085828151811061238257612382613a79565b6020026020010151905060008583815181106123a0576123a0613a79565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156124475760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610a41565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612486908490613add565b925050819055505050508061249a90613aa5565b9050612365565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516124f1929190613b4a565b60405180910390a4612507818787878787612c32565b505050505050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16610ee75761254d816001600160a01b03166014612dec565b612558836020612dec565b604051602001612569929190613b6f565b60408051601f198184030181529082905262461bcd60e51b8252610a41916004016133c2565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16610ee75760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125ed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff1615610ee75760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610ee7828261258f565b600180546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826127358584612fb1565b14949350505050565b8060000361278e5760405162461bcd60e51b815260206004820152601960248201527f537570706c792073686f756c6420626520706f736974697665000000000000006044820152606401610a41565b610d2c8383836040518060200160405280600081525061301d565b816001600160a01b0316836001600160a01b0316036128305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610a41565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166129015760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a41565b3361291a8187876129118861313c565b610cff8861313c565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156129b35760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610a41565b60008581526002602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906129f2908490613add565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a52828888888888613187565b50505050505050565b6001600160a01b038316612abd5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610a41565b33612aed81856000612ace8761313c565b612ad78761313c565b5050604080516020810190915260009052505050565b60008381526002602090815260408083206001600160a01b038816845290915290205482811015612b855760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610a41565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b1480612c2357506001600160e01b031982166303a24d0760e21b145b80610acd5750610acd82613298565b6001600160a01b0384163b156125075760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612c769089908990889088908890600401613bf0565b6020604051808303816000875af1925050508015612cb1575060408051601f3d908101601f19168201909252612cae91810190613c4e565b60015b612d6657612cbd613c6b565b806308c379a003612cf65750612cd1613c87565b80612cdc5750612cf8565b8060405162461bcd60e51b8152600401610a4191906133c2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610a41565b6001600160e01b0319811663bc197c8160e01b14612a525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610a41565b60606000612dfb836002613abe565b612e06906002613add565b67ffffffffffffffff811115612e1e57612e1e61342b565b6040519080825280601f01601f191660200182016040528015612e48576020820181803683370190505b509050600360fc1b81600081518110612e6357612e63613a79565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612eae57612eae613a79565b60200101906001600160f81b031916908160001a9053506000612ed2846002613abe565b612edd906001613add565b90505b6001811115612f62577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612f1e57612f1e613a79565b1a60f81b828281518110612f3457612f34613a79565b60200101906001600160f81b031916908160001a90535060049490941c93612f5b81613d11565b9050612ee0565b5083156122735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a41565b600081815b84518110156110a9576000858281518110612fd357612fd3613a79565b60200260200101519050808311612ff9576000838152602082905260409020925061300a565b600081815260208490526040902092505b508061301581613aa5565b915050612fb6565b6001600160a01b0384166130995760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610a41565b336130aa816000876129118861313c565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906130dc908490613add565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610cff81600087878787613187565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061317657613176613a79565b602090810291909101015292915050565b6001600160a01b0384163b156125075760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906131cb9089908990889088908890600401613d28565b6020604051808303816000875af1925050508015613206575060408051601f3d908101601f1916820190925261320391810190613c4e565b60015b61321257612cbd613c6b565b6001600160e01b0319811663f23a6e6160e01b14612a525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610a41565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610acd5750506001600160e01b03191660009081526020819052604090205460ff1690565b80356001600160a01b038116811461330457600080fd5b919050565b6000806040838503121561331c57600080fd5b613325836132ed565b946020939093013593505050565b6001600160e01b031981168114610c1f57600080fd5b60006020828403121561335b57600080fd5b813561227381613333565b60005b83811015613381578181015183820152602001613369565b83811115613390576000848401525b50505050565b600081518084526133ae816020860160208601613366565b601f01601f19169290920160200192915050565b6020815260006122736020830184613396565b6000602082840312156133e757600080fd5b5035919050565b60006020828403121561340057600080fd5b612273826132ed565b6000806040838503121561341c57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156134675761346761342b565b6040525050565b600067ffffffffffffffff8211156134885761348861342b565b5060051b60200190565b600082601f8301126134a357600080fd5b813560206134b08261346e565b6040516134bd8282613441565b83815260059390931b85018201928281019150868411156134dd57600080fd5b8286015b848110156134f857803583529183019183016134e1565b509695505050505050565b600082601f83011261351457600080fd5b813567ffffffffffffffff81111561352e5761352e61342b565b604051613545601f8301601f191660200182613441565b81815284602083860101111561355a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561358f57600080fd5b613598866132ed565b94506135a6602087016132ed565b9350604086013567ffffffffffffffff808211156135c357600080fd5b6135cf89838a01613492565b945060608801359150808211156135e557600080fd5b6135f189838a01613492565b9350608088013591508082111561360757600080fd5b5061361488828901613503565b9150509295509295909350565b6000806040838503121561363457600080fd5b82359150610c5b602084016132ed565b6000806040838503121561365757600080fd5b823567ffffffffffffffff8082111561366f57600080fd5b818501915085601f83011261368357600080fd5b813560206136908261346e565b60405161369d8282613441565b83815260059390931b85018201928281019150898411156136bd57600080fd5b948201945b838610156136e2576136d3866132ed565b825294820194908201906136c2565b965050860135925050808211156136f857600080fd5b5061370585828601613492565b9150509250929050565b600081518084526020808501945080840160005b8381101561373f57815187529582019590820190600101613723565b509495945050505050565b602081526000612273602083018461370f565b60008083601f84011261376f57600080fd5b50813567ffffffffffffffff81111561378757600080fd5b6020830191508360208260051b85010111156137a257600080fd5b9250929050565b600080600080606085870312156137bf57600080fd5b84359350602085013567ffffffffffffffff8111156137dd57600080fd5b6137e98782880161375d565b90945092506137fc9050604086016132ed565b905092959194509250565b60008060006060848603121561381c57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561384657600080fd5b61384f836132ed565b91506020830135801515811461386457600080fd5b809150509250929050565b60008060006040848603121561388457600080fd5b83359250602084013567ffffffffffffffff8111156138a257600080fd5b6138ae8682870161375d565b9497909650939450505050565b600080604083850312156138ce57600080fd5b6138d7836132ed565b9150610c5b602084016132ed565b600080600080600060a086880312156138fd57600080fd5b613906866132ed565b9450613914602087016132ed565b93506040860135925060608601359150608086013567ffffffffffffffff81111561393e57600080fd5b61361488828901613503565b60008060006060848603121561395f57600080fd5b613968846132ed565b95602085013595506040909401359392505050565b600181811c9082168061399157607f821691505b6020821081036139b157634e487b7160e01b600052602260045260246000fd5b50919050565b600081516139c9818560208601613366565b9290920192915050565b600080845481600182811c9150808316806139ef57607f831692505b60208084108203613a0e57634e487b7160e01b86526022600452602486fd5b818015613a225760018114613a3357613a60565b60ff19861689528489019650613a60565b60008b81526020902060005b86811015613a585781548b820152908501908301613a3f565b505084890196505b505050505050613a7081856139b7565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613ab757613ab7613a8f565b5060010190565b6000816000190483118215151615613ad857613ad8613a8f565b500290565b60008219821115613af057613af0613a8f565b500190565b600082821015613b0757613b07613a8f565b500390565b634e487b7160e01b600052601260045260246000fd5b600082613b3157613b31613b0c565b500490565b600082613b4557613b45613b0c565b500690565b604081526000613b5d604083018561370f565b8281036020840152613a70818561370f565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613ba7816017850160208801613366565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613be4816028840160208801613366565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152613c1c60a083018661370f565b8281036060840152613c2e818661370f565b90508281036080840152613c428185613396565b98975050505050505050565b600060208284031215613c6057600080fd5b815161227381613333565b600060033d1115613c845760046000803e5060005160e01c5b90565b600060443d1015613c955790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715613cc557505050505090565b8285019150815181811115613cdd5750505050505090565b843d8701016020828501011115613cf75750505050505090565b613d0660208286010187613441565b509095945050505050565b600081613d2057613d20613a8f565b506000190190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613d6060a0830184613396565b97965050505050505056fea26469706673582212202dfda8621aa4d6a777c188098c8e1af7de4812a5b76e52ef5b289d88496da60264736f6c634300080d00334f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000bbf1abfa6a5cee3103f6ea44341c014631a11af7934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4000000000000000000000000000000000000000000000000000000000000000e4e4633204261736b657462616c6c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e46330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a68747470733a2f2f6261636b656e642e6c756e616d61726b65742e696f2f6170692f6d657461646174612f6261736b657462616c6c2f6765742f000000000000
Deployed Bytecode
0x60806040526004361061031d5760003560e01c8063819b25ba116101a5578063a6f81668116100ec578063dfbda40a11610095578063f2fde38b1161006f578063f2fde38b14610951578063f4a0a52814610971578063f5298aca14610991578063fc4c8118146109b157600080fd5b8063dfbda40a146108c8578063e985e9c5146108e8578063f242432a1461093157600080fd5b8063d5391393116100c6578063d539139314610847578063d547741f1461087b578063d8028c4b1461089b57600080fd5b8063a6f81668146107c8578063ba41b0c61461081f578063c0ac99831461083257600080fd5b806395d89b411161014e5780639f67756d116101285780639f67756d1461077e578063a217fddf14610793578063a22cb465146107a857600080fd5b806395d89b4114610729578063983b2d561461073e5780639c76b14b1461075e57600080fd5b80638d28b00e1161017f5780638d28b00e146106a55780638da5cb5b146106c557806391d14854146106e357600080fd5b8063819b25ba1461066657806388eab67614610679578063894a5aef1461068f57600080fd5b80633345d34a1161026957806358caac5c11610212578063715018a6116101ec578063715018a61461061b57806372dd529b1461063057806374cc36421461064657600080fd5b806358caac5c146105c55780636f8b44b0146105db57806370480275146105fb57600080fd5b80634b6406d1116102435780634b6406d1146105625780634e1273f41461057857806357e984fe146105a557600080fd5b80633345d34a1461051a57806336568abe1461053a5780633ccfd60b1461055a57600080fd5b806329ee566c116102cb5780632f2ff15d116102a55780632f2ff15d146104c45780633092afd5146104e457806332c60eef1461050457600080fd5b806329ee566c146104195780632a55205a146104655780632eb2c2d6146104a457600080fd5b80630e89341c116102fc5780630e89341c146103a75780631785f53c146103c7578063248a9ca3146103e957600080fd5b8062fdd58e1461032257806301ffc9a71461035557806306fdde0314610385575b600080fd5b34801561032e57600080fd5b5061034261033d366004613309565b6109c7565b6040519081526020015b60405180910390f35b34801561036157600080fd5b50610375610370366004613349565b610a72565b604051901515815260200161034c565b34801561039157600080fd5b5061039a610ad3565b60405161034c91906133c2565b3480156103b357600080fd5b5061039a6103c23660046133d5565b610b61565b3480156103d357600080fd5b506103e76103e23660046133ee565b610bbf565b005b3480156103f557600080fd5b506103426104043660046133d5565b60009081526005602052604090206001015490565b34801561042557600080fd5b5061044d7f000000000000000000000000bbf1abfa6a5cee3103f6ea44341c014631a11af781565b6040516001600160a01b03909116815260200161034c565b34801561047157600080fd5b50610485610480366004613409565b610c22565b604080516001600160a01b03909316835260208301919091520161034c565b3480156104b057600080fd5b506103e76104bf366004613577565b610c64565b3480156104d057600080fd5b506103e76104df366004613621565b610d06565b3480156104f057600080fd5b506103e76104ff3660046133ee565b610d31565b34801561051057600080fd5b5061034260125481565b34801561052657600080fd5b506103e76105353660046133d5565b610db0565b34801561054657600080fd5b506103e7610555366004613621565b610e5f565b6103e7610eeb565b34801561056e57600080fd5b50610342600c5481565b34801561058457600080fd5b50610598610593366004613644565b610f73565b60405161034c919061374a565b3480156105b157600080fd5b506103e76105c03660046133d5565b6110b1565b3480156105d157600080fd5b5061034260075481565b3480156105e757600080fd5b506103e76105f63660046133d5565b61110b565b34801561060757600080fd5b506103e76106163660046133ee565b611165565b34801561062757600080fd5b506103e76111c5565b34801561063c57600080fd5b50610342600b5481565b34801561065257600080fd5b506103e76106613660046137a9565b61122b565b6103e76106743660046133d5565b6114c0565b34801561068557600080fd5b5061034260145481565b34801561069b57600080fd5b5061034260085481565b3480156106b157600080fd5b506103e76106c0366004613807565b6115a1565b3480156106d157600080fd5b506001546001600160a01b031661044d565b3480156106ef57600080fd5b506103756106fe366004613621565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561073557600080fd5b5061039a611630565b34801561074a57600080fd5b506103e76107593660046133ee565b61163d565b34801561076a57600080fd5b506103e76107793660046133d5565b6116bc565b34801561078a57600080fd5b50610342600581565b34801561079f57600080fd5b50610342600081565b3480156107b457600080fd5b506103e76107c3366004613833565b611716565b3480156107d457600080fd5b506108046107e33660046133d5565b600e6020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161034c565b6103e761082d36600461386f565b611721565b34801561083e57600080fd5b5061039a611d0b565b34801561085357600080fd5b506103427f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561088757600080fd5b506103e7610896366004613621565b611d18565b3480156108a757600080fd5b506103426108b63660046133ee565b600d6020526000908152604090205481565b3480156108d457600080fd5b506103e76108e33660046133d5565b611d3e565b3480156108f457600080fd5b506103756109033660046138bb565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b34801561093d57600080fd5b506103e761094c3660046138e5565b611e14565b34801561095d57600080fd5b506103e761096c3660046133ee565b611eaf565b34801561097d57600080fd5b506103e761098c3660046133d5565b611f8e565b34801561099d57600080fd5b506103e76109ac36600461394a565b61203d565b3480156109bd57600080fd5b5061034260135481565b60006001600160a01b038316610a4a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526002602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610aa357506001600160e01b031982166303a24d0760e21b145b80610abe57506001600160e01b03198216637965db0b60e01b145b80610acd5750610acd826120f9565b92915050565b60098054610ae09061397d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c9061397d565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b505050505081565b6060600060158054610b729061397d565b905011610b8e5760405180602001604052806000815250610acd565b6015610b998361211e565b604051602001610baa9291906139d3565b60405160208183030381529060405292915050565b610bc833612227565b610c145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f600082611d18565b50565b7f000000000000000000000000bbf1abfa6a5cee3103f6ea44341c014631a11af76000610c5b6064610c55856005612267565b9061227a565b90509250929050565b6001600160a01b038516331480610c805750610c808533610903565b610cf25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610a41565b610cff8585858585612286565b5050505050565b600082815260056020526040902060010154610d22813361250f565b610d2c838361258f565b505050565b610d3a33612227565b610d865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682611d18565b6001546001600160a01b03163314610e0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b60008111610e5a5760405162461bcd60e51b815260206004820152601e60248201527f6d6178206d696e7420636f756e742073686f756c64206265206e6f74203000006044820152606401610a41565b601255565b6001600160a01b0381163314610edd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a41565b610ee78282612631565b5050565b6001546001600160a01b03163314610f455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b604051339081904780156108fc02916000818181858888f19350505050158015610ee7573d6000803e3d6000fd5b60608151835114610fec5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610a41565b6000835167ffffffffffffffff8111156110085761100861342b565b604051908082528060200260200182016040528015611031578160200160208202803683370190505b50905060005b84518110156110a95761107c85828151811061105557611055613a79565b602002602001015185838151811061106f5761106f613a79565b60200260200101516109c7565b82828151811061108e5761108e613a79565b60209081029190910101526110a281613aa5565b9050611037565b509392505050565b6110ba33612227565b6111065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600755565b61111433612227565b6111605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600c55565b61116e33612227565b6111ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f6000826126b4565b6001546001600160a01b0316331461121f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b61122960006126be565b565b60026006540361127d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a41565b60026006556000848152600e6020526040902060018101549054116112e45760405162461bcd60e51b815260206004820152601c60248201527f6861766520616c7265616479206d696e74656420616c6c204e465473000000006044820152606401610a41565b6001600160a01b038116600090815260116020908152604080832087845290915290205460ff16156113645760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034016040516020818303038152906040528051906020012090506113ec84848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600e602052604090206002015492508591506127289050565b6114285760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b6114348260018061273e565b6001600160a01b03821660009081526011602090815260408083208884528252808320805460ff19166001908117909155600e90925282200180549161147983613aa5565b90915550506040516001600160a01b0383169086907f874ce4476621a88a8358c99e2aebd2e177158190da82d6e9e1eaba6188c0e59590600090a350506001600655505050565b60125481111561151d5760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610a41565b8060145461152b9190613abe565b34101561157a5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b336000908152600d602052604081208054839290611599908490613add565b909155505050565b6115aa33612227565b6115f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b6040805160608101825260006020808301828152838501968752948352958152600e90955293209251835551600183015551600290910155565b600a8054610ae09061397d565b61164633612227565b6116925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b610c1f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826126b4565b6116c533612227565b6117115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610a41565b600855565b610ee73383836127a9565b6002600654036117735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a41565b60026006556013546117c75760405162461bcd60e51b815260206004820152601360248201527f6e6f74207468652064726f7020706572696f64000000000000000000000000006044820152606401610a41565b82600b546117d59190613add565b600c5410156118265760405162461bcd60e51b815260206004820152601260248201527f6f766572666c6f77206d6178737570706c7900000000000000000000000000006044820152606401610a41565b6012548311156118835760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610a41565b6013546001036119fa57336000908152600f602052604090205460ff16156118f95760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b6040516bffffffffffffffffffffffff193360601b1660208201526034810184905260009060540160405160208183030381529060405280519060200120905061197a838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506007549150849050612728565b6119b65760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b6119c23360018661273e565b336000908152600f60205260408120805460ff19166001179055600b80548692906119ee908490613add565b90915550611d01915050565b601354600203611bc2573360009081526010602052604090205460ff1615611a705760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610a41565b82601454611a7e9190613abe565b341015611acd5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611b4e838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050612728565b611b8a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610a41565b611b963360018661273e565b336000908152601060205260408120805460ff19166001179055600b80548692906119ee908490613add565b601354600303611d0157336000908152600d60205260408120549003611c445782601454611bf09190613abe565b341015611c3f5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610a41565b611ca3565b336000908152600d6020526040902054831115611ca35760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820726573657276656420746f6b656e000000000000006044820152606401610a41565b611caf3360018561273e565b82600b6000828254611cc19190613add565b9091555050336000908152600d60205260409020548311611d0157336000908152600d602052604081208054859290611cfb908490613af5565b90915550505b5050600160065550565b60158054610ae09061397d565b600082815260056020526040902060010154611d34813361250f565b610d2c8383612631565b6001546001600160a01b03163314611d985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b6003811115611e0f5760405162461bcd60e51b815260206004820152602560248201527f64726f7050686173652073686f6c64206265206e6f742067726561746572207460448201527f68616e20330000000000000000000000000000000000000000000000000000006064820152608401610a41565b601355565b6001600160a01b038516331480611e305750611e308533610903565b611ea25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610a41565b610cff858585858561289d565b6001546001600160a01b03163314611f095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b6001600160a01b038116611f855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a41565b610c1f816126be565b6001546001600160a01b03163314611fe85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a41565b600081116120385760405162461bcd60e51b815260206004820152601960248201527f6d696e742070726963652073686f6c64206265206e6f742030000000000000006044820152606401610a41565b601455565b6001600160a01b03831633148061207c57506001600160a01b038316600090815260036020908152604080832033845290915290205460ff1615156001145b6120ee5760405162461bcd60e51b815260206004820152602b60248201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060448201527f61727479206275726e732e0000000000000000000000000000000000000000006064820152608401610a41565b610d2c838383612a5b565b60006001600160e01b03198216637965db0b60e01b1480610acd5750610acd82612bf2565b6060816000036121455750506040805180820190915260018152600360fc1b602082015290565b8160005b811561216f578061215981613aa5565b91506121689050600a83613b22565b9150612149565b60008167ffffffffffffffff81111561218a5761218a61342b565b6040519080825280601f01601f1916602001820160405280156121b4576020820181803683370190505b5090505b841561221f576121c9600183613af5565b91506121d6600a86613b36565b6121e1906030613add565b60f81b8183815181106121f6576121f6613a79565b60200101906001600160f81b031916908160001a905350612218600a86613b22565b94506121b8565b949350505050565b6001600160a01b03811660009081527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc602052604081205460ff16610acd565b60006122738284613abe565b9392505050565b60006122738284613b22565b81518351146122fd5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610a41565b6001600160a01b0384166123615760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a41565b3360005b84518110156124a157600085828151811061238257612382613a79565b6020026020010151905060008583815181106123a0576123a0613a79565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156124475760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610a41565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612486908490613add565b925050819055505050508061249a90613aa5565b9050612365565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516124f1929190613b4a565b60405180910390a4612507818787878787612c32565b505050505050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16610ee75761254d816001600160a01b03166014612dec565b612558836020612dec565b604051602001612569929190613b6f565b60408051601f198184030181529082905262461bcd60e51b8252610a41916004016133c2565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16610ee75760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125ed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff1615610ee75760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610ee7828261258f565b600180546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826127358584612fb1565b14949350505050565b8060000361278e5760405162461bcd60e51b815260206004820152601960248201527f537570706c792073686f756c6420626520706f736974697665000000000000006044820152606401610a41565b610d2c8383836040518060200160405280600081525061301d565b816001600160a01b0316836001600160a01b0316036128305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610a41565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166129015760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610a41565b3361291a8187876129118861313c565b610cff8861313c565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156129b35760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610a41565b60008581526002602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906129f2908490613add565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a52828888888888613187565b50505050505050565b6001600160a01b038316612abd5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610a41565b33612aed81856000612ace8761313c565b612ad78761313c565b5050604080516020810190915260009052505050565b60008381526002602090815260408083206001600160a01b038816845290915290205482811015612b855760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610a41565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b1480612c2357506001600160e01b031982166303a24d0760e21b145b80610acd5750610acd82613298565b6001600160a01b0384163b156125075760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612c769089908990889088908890600401613bf0565b6020604051808303816000875af1925050508015612cb1575060408051601f3d908101601f19168201909252612cae91810190613c4e565b60015b612d6657612cbd613c6b565b806308c379a003612cf65750612cd1613c87565b80612cdc5750612cf8565b8060405162461bcd60e51b8152600401610a4191906133c2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610a41565b6001600160e01b0319811663bc197c8160e01b14612a525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610a41565b60606000612dfb836002613abe565b612e06906002613add565b67ffffffffffffffff811115612e1e57612e1e61342b565b6040519080825280601f01601f191660200182016040528015612e48576020820181803683370190505b509050600360fc1b81600081518110612e6357612e63613a79565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612eae57612eae613a79565b60200101906001600160f81b031916908160001a9053506000612ed2846002613abe565b612edd906001613add565b90505b6001811115612f62577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612f1e57612f1e613a79565b1a60f81b828281518110612f3457612f34613a79565b60200101906001600160f81b031916908160001a90535060049490941c93612f5b81613d11565b9050612ee0565b5083156122735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a41565b600081815b84518110156110a9576000858281518110612fd357612fd3613a79565b60200260200101519050808311612ff9576000838152602082905260409020925061300a565b600081815260208490526040902092505b508061301581613aa5565b915050612fb6565b6001600160a01b0384166130995760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610a41565b336130aa816000876129118861313c565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906130dc908490613add565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610cff81600087878787613187565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061317657613176613a79565b602090810291909101015292915050565b6001600160a01b0384163b156125075760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906131cb9089908990889088908890600401613d28565b6020604051808303816000875af1925050508015613206575060408051601f3d908101601f1916820190925261320391810190613c4e565b60015b61321257612cbd613c6b565b6001600160e01b0319811663f23a6e6160e01b14612a525760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610a41565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610acd5750506001600160e01b03191660009081526020819052604090205460ff1690565b80356001600160a01b038116811461330457600080fd5b919050565b6000806040838503121561331c57600080fd5b613325836132ed565b946020939093013593505050565b6001600160e01b031981168114610c1f57600080fd5b60006020828403121561335b57600080fd5b813561227381613333565b60005b83811015613381578181015183820152602001613369565b83811115613390576000848401525b50505050565b600081518084526133ae816020860160208601613366565b601f01601f19169290920160200192915050565b6020815260006122736020830184613396565b6000602082840312156133e757600080fd5b5035919050565b60006020828403121561340057600080fd5b612273826132ed565b6000806040838503121561341c57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156134675761346761342b565b6040525050565b600067ffffffffffffffff8211156134885761348861342b565b5060051b60200190565b600082601f8301126134a357600080fd5b813560206134b08261346e565b6040516134bd8282613441565b83815260059390931b85018201928281019150868411156134dd57600080fd5b8286015b848110156134f857803583529183019183016134e1565b509695505050505050565b600082601f83011261351457600080fd5b813567ffffffffffffffff81111561352e5761352e61342b565b604051613545601f8301601f191660200182613441565b81815284602083860101111561355a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561358f57600080fd5b613598866132ed565b94506135a6602087016132ed565b9350604086013567ffffffffffffffff808211156135c357600080fd5b6135cf89838a01613492565b945060608801359150808211156135e557600080fd5b6135f189838a01613492565b9350608088013591508082111561360757600080fd5b5061361488828901613503565b9150509295509295909350565b6000806040838503121561363457600080fd5b82359150610c5b602084016132ed565b6000806040838503121561365757600080fd5b823567ffffffffffffffff8082111561366f57600080fd5b818501915085601f83011261368357600080fd5b813560206136908261346e565b60405161369d8282613441565b83815260059390931b85018201928281019150898411156136bd57600080fd5b948201945b838610156136e2576136d3866132ed565b825294820194908201906136c2565b965050860135925050808211156136f857600080fd5b5061370585828601613492565b9150509250929050565b600081518084526020808501945080840160005b8381101561373f57815187529582019590820190600101613723565b509495945050505050565b602081526000612273602083018461370f565b60008083601f84011261376f57600080fd5b50813567ffffffffffffffff81111561378757600080fd5b6020830191508360208260051b85010111156137a257600080fd5b9250929050565b600080600080606085870312156137bf57600080fd5b84359350602085013567ffffffffffffffff8111156137dd57600080fd5b6137e98782880161375d565b90945092506137fc9050604086016132ed565b905092959194509250565b60008060006060848603121561381c57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561384657600080fd5b61384f836132ed565b91506020830135801515811461386457600080fd5b809150509250929050565b60008060006040848603121561388457600080fd5b83359250602084013567ffffffffffffffff8111156138a257600080fd5b6138ae8682870161375d565b9497909650939450505050565b600080604083850312156138ce57600080fd5b6138d7836132ed565b9150610c5b602084016132ed565b600080600080600060a086880312156138fd57600080fd5b613906866132ed565b9450613914602087016132ed565b93506040860135925060608601359150608086013567ffffffffffffffff81111561393e57600080fd5b61361488828901613503565b60008060006060848603121561395f57600080fd5b613968846132ed565b95602085013595506040909401359392505050565b600181811c9082168061399157607f821691505b6020821081036139b157634e487b7160e01b600052602260045260246000fd5b50919050565b600081516139c9818560208601613366565b9290920192915050565b600080845481600182811c9150808316806139ef57607f831692505b60208084108203613a0e57634e487b7160e01b86526022600452602486fd5b818015613a225760018114613a3357613a60565b60ff19861689528489019650613a60565b60008b81526020902060005b86811015613a585781548b820152908501908301613a3f565b505084890196505b505050505050613a7081856139b7565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613ab757613ab7613a8f565b5060010190565b6000816000190483118215151615613ad857613ad8613a8f565b500290565b60008219821115613af057613af0613a8f565b500190565b600082821015613b0757613b07613a8f565b500390565b634e487b7160e01b600052601260045260246000fd5b600082613b3157613b31613b0c565b500490565b600082613b4557613b45613b0c565b500690565b604081526000613b5d604083018561370f565b8281036020840152613a70818561370f565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613ba7816017850160208801613366565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613be4816028840160208801613366565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152613c1c60a083018661370f565b8281036060840152613c2e818661370f565b90508281036080840152613c428185613396565b98975050505050505050565b600060208284031215613c6057600080fd5b815161227381613333565b600060033d1115613c845760046000803e5060005160e01c5b90565b600060443d1015613c955790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715613cc557505050505090565b8285019150815181811115613cdd5750505050505090565b843d8701016020828501011115613cf75750505050505090565b613d0660208286010187613441565b509095945050505050565b600081613d2057613d20613a8f565b506000190190565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613d6060a0830184613396565b97965050505050505056fea26469706673582212202dfda8621aa4d6a777c188098c8e1af7de4812a5b76e52ef5b289d88496da60264736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000bbf1abfa6a5cee3103f6ea44341c014631a11af7934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4000000000000000000000000000000000000000000000000000000000000000e4e4633204261736b657462616c6c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e46330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a68747470733a2f2f6261636b656e642e6c756e616d61726b65742e696f2f6170692f6d657461646174612f6261736b657462616c6c2f6765742f000000000000
-----Decoded View---------------
Arg [0] : _name (string): NF3 Basketball
Arg [1] : _symbol (string): NF3
Arg [2] : _tokenURIPrefix (string): https://backend.lunamarket.io/api/metadata/basketball/get/
Arg [3] : _royalty (address): 0xBbF1abFA6a5Cee3103f6ea44341c014631A11AF7
Arg [4] : _gcfRoot (bytes32): 0x934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4
Arg [5] : _communityRoot (bytes32): 0x934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000bbf1abfa6a5cee3103f6ea44341c014631a11af7
Arg [4] : 934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4
Arg [5] : 934310ad1564de862b6730c66a0079694eb63aedf147ae412efe8ec15a2657d4
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [7] : 4e4633204261736b657462616c6c000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 4e46330000000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000003a
Arg [11] : 68747470733a2f2f6261636b656e642e6c756e616d61726b65742e696f2f6170
Arg [12] : 692f6d657461646174612f6261736b657462616c6c2f6765742f000000000000
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.