ERC-721
Overview
Max Total Supply
36 C21I
Holders
36
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 C21ILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Capsule21Invitation
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity >=0.8.0 <0.9.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "./sstore2/SSTORE2.sol"; import "./utils/DynamicBuffer.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IReverseRegistrar { function setName(string memory name) external returns (bytes32); } interface RendererContract { struct Invitation { uint24 id; uint24[10] gradientColors; bool isRadialGradient; uint24 textColor; uint8 fontSize; uint16 linearGradientAngleDeg; address textPointer; address descriptionPointer; uint32 eventTime; uint32 mintStart; uint24 mintDuration; uint24 editionSize; } struct ExtraTokenInfo { uint24 invitationId; uint24 editionNumber; address to; address from; } function addressToEnsName(address _address) external view returns (string memory); function tokenImage( uint tokenId, Invitation memory invitation, ExtraTokenInfo memory tokenInfo ) external view returns (string memory); } contract Capsule21Invitation is ERC721A, ERC2981, AccessControl { using Address for address; using Strings for uint160; using Strings for uint32; using Strings for uint24; RendererContract public renderingContract; address public contractImagePointer; string constant contractDescription = "Invitations to Capsule 21 sponsored events."; string constant contractExternalURL = "https://www.capsule21.com/collections/capsule-21-invitations"; bytes32 public constant INVITE_SENDER_ROLE = keccak256("INVITE_SENDER_ROLE"); address constant pivAddress = 0xf98537696e2Cf486F8F32604B2Ca2CDa120DBBa8; address constant doveAddress = 0x5FD2E3ba05C862E62a34B9F63c45C0DF622Ac112; address constant middleAddress = 0xC2172a6315c1D7f6855768F843c420EbB36eDa97; uint24 public nextInvitationId = 1; function _startTokenId() internal view virtual override returns (uint256) { return 1; } mapping(uint24 => RendererContract.Invitation) public invitationIdToInvitation; mapping(uint64 => RendererContract.ExtraTokenInfo) public tokenIdToExtraInfo; mapping(address => mapping(uint24 => bool)) public addressToInvitationsMinted; function setRenderingContract(address newContract) public onlyRole(DEFAULT_ADMIN_ROLE) { renderingContract = RendererContract(newContract); } function setContractImageData(string memory contractImageData) public onlyRole(DEFAULT_ADMIN_ROLE) { contractImagePointer = SSTORE2.write(bytes(contractImageData)); } function grantInviteSenderRole(address newAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { _grantRole(INVITE_SENDER_ROLE, newAddress); } function addReverseENSRecord(string memory name) public onlyRole(DEFAULT_ADMIN_ROLE) { IReverseRegistrar(0x084b1c3C81545d370f3634392De611CaaBFf8148).setName(name); } constructor( address _renderingContract, string memory contractImageData ) ERC721A("Capsule 21 Invitations", "C21I") { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(DEFAULT_ADMIN_ROLE, doveAddress); _grantRole(DEFAULT_ADMIN_ROLE, middleAddress); _grantRole(DEFAULT_ADMIN_ROLE, pivAddress); grantInviteSenderRole(msg.sender); grantInviteSenderRole(doveAddress); grantInviteSenderRole(middleAddress); grantInviteSenderRole(pivAddress); setRenderingContract(_renderingContract); setContractImageData(contractImageData); addReverseENSRecord("capsule21.eth"); _setDefaultRoyalty(address(this), 1_000); // 10% } function getInvitationForToken(uint64 tokenId) public view returns (RendererContract.Invitation memory) { require(_exists(tokenId), "Token doesn't exist"); RendererContract.ExtraTokenInfo memory extraTokenInfo = getExtraTokenInfo(tokenId); uint24 invitationId = extraTokenInfo.invitationId; require(invitationExists(invitationId), "Invitation does not exist."); return invitationIdToInvitation[invitationId]; } function getInvitationById(uint24 invitationId) public view returns (RendererContract.Invitation memory) { require(invitationExists(invitationId), "Invitation does not exist."); return invitationIdToInvitation[invitationId]; } function invitationExists(uint24 invitationId) public view returns (bool) { return invitationIdToInvitation[invitationId].id > 0; } function getExtraTokenInfo(uint64 tokenId) public view returns (RendererContract.ExtraTokenInfo memory) { require(_exists(tokenId), "Token doesn't exist"); return tokenIdToExtraInfo[tokenId]; } fallback (bytes calldata _inputText) external payable returns (bytes memory _output) {} receive () external payable {} function createInvitation( string calldata text, uint24 textColor, bool isRadialGradient, uint8 fontSize, uint16 linearGradientAngleDeg, uint24[10] calldata gradientColors, uint32 eventTime, string calldata description ) external onlyRole(DEFAULT_ADMIN_ROLE) { RendererContract.Invitation storage newInvitation = invitationIdToInvitation[nextInvitationId]; require(eventTime > 0, "Need a start time"); require(bytes(text).length > 0, "Need text"); require(bytes(description).length > 0, "Need description"); newInvitation.id = nextInvitationId; newInvitation.textPointer = SSTORE2.write(bytes(text)); newInvitation.descriptionPointer = SSTORE2.write(bytes(description)); newInvitation.textColor = textColor; newInvitation.isRadialGradient = isRadialGradient; newInvitation.fontSize = fontSize; newInvitation.linearGradientAngleDeg = linearGradientAngleDeg; newInvitation.gradientColors = gradientColors; newInvitation.eventTime = eventTime; unchecked { ++nextInvitationId; } } function startMint(uint24 invitationId, uint32 mintStartTime, uint24 mintDuration) onlyRole(DEFAULT_ADMIN_ROLE) external { require(invitationExists(invitationId), "Invitation does not exist."); RendererContract.Invitation storage invitation = invitationIdToInvitation[invitationId]; require(invitation.mintStart == 0, "Mint already started."); invitation.mintStart = mintStartTime > uint32(block.timestamp) ? mintStartTime : uint32(block.timestamp); invitation.mintDuration = mintDuration; } function invitationMintEndTime(uint24 invitationId) public view returns (uint) { require(invitationExists(invitationId), "Invitation does not exist."); RendererContract.Invitation memory invitation = invitationIdToInvitation[invitationId]; return invitation.mintStart + invitation.mintDuration; } function requestInvitation(uint24 invitationId) external returns (uint) { require(msg.sender == tx.origin, "Contracts cannot mint"); return internalMint(invitationId, address(this), msg.sender); } function sendInvitation(uint24 invitationId, address[] memory tos) external onlyRole(INVITE_SENDER_ROLE) { for (uint i; i < tos.length; ++i) { internalMint(invitationId, msg.sender, tos[i]); } } function internalMint(uint24 invitationId, address from, address to) private returns (uint) { require(invitationExists(invitationId), "Invitation does not exist."); RendererContract.Invitation storage invitation = invitationIdToInvitation[invitationId]; require(!addressToInvitationsMinted[to][invitationId], "Only on mint per invite per address"); require(block.timestamp >= invitation.mintStart, "Mint hasn't started"); require(block.timestamp <= invitationMintEndTime(invitationId), "Mint is over"); uint64 aboutToMintId = uint64(_nextTokenId()); _mint(to, 1); invitation.editionSize++; RendererContract.ExtraTokenInfo storage extraTokenInfo = tokenIdToExtraInfo[aboutToMintId]; extraTokenInfo.to = to; extraTokenInfo.from = from; extraTokenInfo.invitationId = invitationId; extraTokenInfo.editionNumber = invitation.editionSize; addressToInvitationsMinted[to][invitationId] = true; return aboutToMintId; } function tokenImage(uint64 tokenId) public view returns (string memory) { require(_exists(tokenId), "doesn't exist"); RendererContract.ExtraTokenInfo memory extraTokenInfo = tokenIdToExtraInfo[tokenId]; return renderingContract.tokenImage(tokenId, getInvitationForToken(tokenId), extraTokenInfo); } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { require(_exists(tokenId), "doesn't exist"); return constructTokenURI(uint64(tokenId)); } function constructTokenURI(uint64 tokenId) private view returns (string memory) { RendererContract.ExtraTokenInfo memory extraTokenInfo = tokenIdToExtraInfo[tokenId]; RendererContract.Invitation memory invitation = getInvitationForToken(tokenId); bytes memory svg = bytes(tokenImage(tokenId)); string memory title = string.concat( "Capsule 21 Invitation #", invitation.id.toString(), " (", extraTokenInfo.editionNumber.toString(), " of ", invitation.editionSize.toString(), ")" ); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{', '"name":"', title, '",' '"description":', SSTORE2.read(invitation.descriptionPointer), ',' '"image_data":"', svg, '",' '"external_url":"', contractExternalURL, '",' '"attributes": [', '{', '"trait_type": "From",', '"value": "', renderingContract.addressToEnsName(extraTokenInfo.from), '"', '},' '{', '"trait_type": "To",', '"value": "', renderingContract.addressToEnsName(extraTokenInfo.to), '"', '},' '{', '"trait_type": "Event Time",', '"display_type": "date",', '"value": ', invitation.eventTime.toString(), '', '}' ']' '}' ) ) ) ) ); } function contractURI() public view returns (string memory) { return string( abi.encodePacked( 'data:application/json;base64,', Base64.encode( bytes( abi.encodePacked( '{', '"name":"', name(), '",' '"description":"', contractDescription, '",' '"image":"data:image/svg+xml;base64,', Base64.encode(SSTORE2.read(contractImagePointer)), '",' '"external_link":"', contractExternalURL, '"' '}' ) ) ) ) ); } function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) { uint balance = address(this).balance; require(balance > 0, "Nothing to withdraw"); uint middleShare = balance / 3; uint doveShare = balance / 3; uint pivShare = balance - middleShare - doveShare; Address.sendValue(payable(pivAddress), pivShare); Address.sendValue(payable(doveAddress), doveShare); Address.sendValue(payable(middleAddress), middleShare); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981, AccessControl) returns (bool) { // Supports the following `interfaceId`s: // - IERC165: 0x01ffc9a7 // - IERC721: 0x80ac58cd // - IERC721Metadata: 0x5b5e139f // - IERC2981: 0x2a55205a return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, * including the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at `_startTokenId()` * (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with `_mintERC2309`. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to `_mintERC2309` // is required to cause an overflow, which is unrealistic. uint256 private constant MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to `_startTokenId()` unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes of the XOR of // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165 // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)` return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); _packedAddressData[owner] = packed; } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & BITMASK_BURNED == 0) { // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP); ownership.burned = packed & BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> BITPOS_EXTRA_DATA); } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, BITMASK_ADDRESS) // `owner | (block.timestamp << BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << BITPOS_NEXT_INITIALIZED`. result := shl(BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 tokenId = startTokenId; uint256 end = startTokenId + quantity; do { emit Transfer(address(0), to, tokenId++); } while (tokenId < end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { // Compute the slot. mstore(0x00, tokenId) mstore(0x20, tokenApprovalsPtr.slot) approvedAddressSlot := keccak256(0x00, 0x40) // Load the slot's value from storage. approvedAddress := sload(approvedAddressSlot) } } /** * @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`. */ function _isOwnerOrApproved( address approvedAddress, address from, address msgSender ) private pure returns (bool result) { assembly { // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from := and(from, BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, BITMASK_ADDRESS) // `msgSender == from || msgSender == approvedAddress`. result := or(eq(msgSender, from), eq(msgSender, approvedAddress)) } } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (BITMASK_BURNED | BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << BITPOS_EXTRA_DATA; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. * This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. * This includes minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./utils/Bytecode.sol"; /** @title A key-value storage with auto-generated keys for storing chunks of data with a lower write & read cost. @author Agustin Aguilar <[email protected]> Readme: https://github.com/0xsequence/sstore2#readme */ library SSTORE2 { error WriteError(); /** @notice Stores `_data` and returns `pointer` as key for later retrieval @dev The pointer is a contract address with `_data` as code @param _data to be written @return pointer Pointer to the written `_data` */ function write(bytes memory _data) internal returns (address pointer) { // Append 00 to _data so contract can't be called // Build init code bytes memory code = Bytecode.creationCodeFor( abi.encodePacked( hex'00', _data ) ); // Deploy contract using create assembly { pointer := create(0, add(code, 32), mload(code)) } // Address MUST be non-zero if (pointer == address(0)) revert WriteError(); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @return data read from `_pointer` contract */ function read(address _pointer) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @param _end index before which to end extraction @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start, uint256 _end) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, _end + 1); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0; /// @title DynamicBuffer /// @author David Huber (@cxkoda) and Simon Fremaux (@dievardump). See also /// https://raw.githubusercontent.com/dievardump/solidity-dynamic-buffer /// @notice This library is used to allocate a big amount of container memory // which will be subsequently filled without needing to reallocate /// memory. /// @dev First, allocate memory. /// Then use `buffer.appendUnchecked(theBytes)` or `appendSafe()` if /// bounds checking is required. library DynamicBuffer { /// @notice Allocates container space for the DynamicBuffer /// @param capacity The intended max amount of bytes in the buffer /// @return buffer The memory location of the buffer /// @dev Allocates `capacity + 0x60` bytes of space /// The buffer array starts at the first container data position, /// (i.e. `buffer = container + 0x20`) function allocate(uint256 capacity) internal pure returns (bytes memory buffer) { assembly { // Get next-free memory address let container := mload(0x40) // Allocate memory by setting a new next-free address { // Add 2 x 32 bytes in size for the two length fields // Add 32 bytes safety space for 32B chunked copy let size := add(capacity, 0x60) let newNextFree := add(container, size) mstore(0x40, newNextFree) } // Set the correct container length { let length := add(capacity, 0x40) mstore(container, length) } // The buffer starts at idx 1 in the container (0 is length) buffer := add(container, 0x20) // Init content with length 0 mstore(buffer, 0) } return buffer; } /// @notice Appends data to buffer, and update buffer length /// @param buffer the buffer to append the data to /// @param data the data to append /// @dev Does not perform out-of-bound checks (container capacity) /// for efficiency. function appendUnchecked(bytes memory buffer, bytes memory data) internal pure { assembly { let length := mload(data) for { data := add(data, 0x20) let dataEnd := add(data, length) let copyTo := add(buffer, add(mload(buffer), 0x20)) } lt(data, dataEnd) { data := add(data, 0x20) copyTo := add(copyTo, 0x20) } { // Copy 32B chunks from data to buffer. // This may read over data array boundaries and copy invalid // bytes, which doesn't matter in the end since we will // later set the correct buffer length, and have allocated an // additional word to avoid buffer overflow. mstore(copyTo, mload(data)) } // Update buffer length mstore(buffer, add(mload(buffer), length)) } } /// @notice Appends data to buffer, and update buffer length /// @param buffer the buffer to append the data to /// @param data the data to append /// @dev Performs out-of-bound checks and calls `appendUnchecked`. function appendSafe(bytes memory buffer, bytes memory data) internal pure { uint256 capacity; uint256 length; assembly { capacity := sub(mload(sub(buffer, 0x20)), 0x40) length := mload(buffer) } require( length + data.length <= capacity, "DynamicBuffer: Appending out of bounds." ); appendUnchecked(buffer, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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); _; } /** * @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 `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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`. * * May emit a {RoleRevoked} event. */ 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. * * May emit a {RoleGranted} event. * * [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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set through `_extraData`. uint24 extraData; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // 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); // ============================== // IERC721 // ============================== /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // IERC721Metadata // ============================== /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================== // IERC2309 // ============================== /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`, * as defined in the ERC2309 standard. See `_mintERC2309` for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/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 paid 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 (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 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 pragma solidity ^0.8.0; library Bytecode { error InvalidCodeAtRange(uint256 _size, uint256 _start, uint256 _end); /** @notice Generate a creation code that results on a contract with `_code` as bytecode @param _code The returning value of the resulting `creationCode` @return creationCode (constructor) for new contract */ function creationCodeFor(bytes memory _code) internal pure returns (bytes memory) { /* 0x00 0x63 0x63XXXXXX PUSH4 _code.length size 0x01 0x80 0x80 DUP1 size size 0x02 0x60 0x600e PUSH1 14 14 size size 0x03 0x60 0x6000 PUSH1 00 0 14 size size 0x04 0x39 0x39 CODECOPY size 0x05 0x60 0x6000 PUSH1 00 0 size 0x06 0xf3 0xf3 RETURN <CODE> */ return abi.encodePacked( hex"63", uint32(_code.length), hex"80_60_0E_60_00_39_60_00_F3", _code ); } /** @notice Returns the size of the code on a given address @param _addr Address that may or may not contain code @return size of the code on the given `_addr` */ function codeSize(address _addr) internal view returns (uint256 size) { assembly { size := extcodesize(_addr) } } /** @notice Returns the code of a given address @dev It will fail if `_end < _start` @param _addr Address that may or may not contain code @param _start number of bytes of code to skip on read @param _end index before which to end extraction @return oCode read from `_addr` deployed bytecode Forked from: https://gist.github.com/KardanovIR/fe98661df9338c842b4a30306d507fbd */ function codeAt(address _addr, uint256 _start, uint256 _end) internal view returns (bytes memory oCode) { uint256 csize = codeSize(_addr); if (csize == 0) return bytes(""); if (_start > csize) return bytes(""); if (_end < _start) revert InvalidCodeAtRange(csize, _start, _end); unchecked { uint256 reqSize = _end - _start; uint256 maxSize = csize - _start; uint256 size = maxSize < reqSize ? maxSize : reqSize; assembly { // allocate output byte array - this could also be done without assembly // by using o_code = new bytes(size) oCode := mload(0x40) // new "memory end" including padding mstore(0x40, add(oCode, and(add(add(size, 0x20), 0x1f), not(0x1f)))) // store length in memory mstore(oCode, size) // actually retrieve the code, this needs assembly extcodecopy(_addr, add(oCode, 0x20), _start, size) } } } }
// 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 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; } }
{ "optimizer": { "enabled": true, "runs": 200, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_renderingContract","type":"address"},{"internalType":"string","name":"contractImageData","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"InvalidCodeAtRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"WriteError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INVITE_SENDER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"addReverseENSRecord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint24","name":"","type":"uint24"}],"name":"addressToInvitationsMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractImagePointer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"text","type":"string"},{"internalType":"uint24","name":"textColor","type":"uint24"},{"internalType":"bool","name":"isRadialGradient","type":"bool"},{"internalType":"uint8","name":"fontSize","type":"uint8"},{"internalType":"uint16","name":"linearGradientAngleDeg","type":"uint16"},{"internalType":"uint24[10]","name":"gradientColors","type":"uint24[10]"},{"internalType":"uint32","name":"eventTime","type":"uint32"},{"internalType":"string","name":"description","type":"string"}],"name":"createInvitation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"getExtraTokenInfo","outputs":[{"components":[{"internalType":"uint24","name":"invitationId","type":"uint24"},{"internalType":"uint24","name":"editionNumber","type":"uint24"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"from","type":"address"}],"internalType":"struct RendererContract.ExtraTokenInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"}],"name":"getInvitationById","outputs":[{"components":[{"internalType":"uint24","name":"id","type":"uint24"},{"internalType":"uint24[10]","name":"gradientColors","type":"uint24[10]"},{"internalType":"bool","name":"isRadialGradient","type":"bool"},{"internalType":"uint24","name":"textColor","type":"uint24"},{"internalType":"uint8","name":"fontSize","type":"uint8"},{"internalType":"uint16","name":"linearGradientAngleDeg","type":"uint16"},{"internalType":"address","name":"textPointer","type":"address"},{"internalType":"address","name":"descriptionPointer","type":"address"},{"internalType":"uint32","name":"eventTime","type":"uint32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint24","name":"mintDuration","type":"uint24"},{"internalType":"uint24","name":"editionSize","type":"uint24"}],"internalType":"struct RendererContract.Invitation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"getInvitationForToken","outputs":[{"components":[{"internalType":"uint24","name":"id","type":"uint24"},{"internalType":"uint24[10]","name":"gradientColors","type":"uint24[10]"},{"internalType":"bool","name":"isRadialGradient","type":"bool"},{"internalType":"uint24","name":"textColor","type":"uint24"},{"internalType":"uint8","name":"fontSize","type":"uint8"},{"internalType":"uint16","name":"linearGradientAngleDeg","type":"uint16"},{"internalType":"address","name":"textPointer","type":"address"},{"internalType":"address","name":"descriptionPointer","type":"address"},{"internalType":"uint32","name":"eventTime","type":"uint32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint24","name":"mintDuration","type":"uint24"},{"internalType":"uint24","name":"editionSize","type":"uint24"}],"internalType":"struct RendererContract.Invitation","name":"","type":"tuple"}],"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":"address","name":"newAddress","type":"address"}],"name":"grantInviteSenderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"}],"name":"invitationExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"","type":"uint24"}],"name":"invitationIdToInvitation","outputs":[{"internalType":"uint24","name":"id","type":"uint24"},{"internalType":"bool","name":"isRadialGradient","type":"bool"},{"internalType":"uint24","name":"textColor","type":"uint24"},{"internalType":"uint8","name":"fontSize","type":"uint8"},{"internalType":"uint16","name":"linearGradientAngleDeg","type":"uint16"},{"internalType":"address","name":"textPointer","type":"address"},{"internalType":"address","name":"descriptionPointer","type":"address"},{"internalType":"uint32","name":"eventTime","type":"uint32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint24","name":"mintDuration","type":"uint24"},{"internalType":"uint24","name":"editionSize","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"}],"name":"invitationMintEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextInvitationId","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderingContract","outputs":[{"internalType":"contract RendererContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"}],"name":"requestInvitation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"},{"internalType":"address[]","name":"tos","type":"address[]"}],"name":"sendInvitation","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":"string","name":"contractImageData","type":"string"}],"name":"setContractImageData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContract","type":"address"}],"name":"setRenderingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"},{"internalType":"uint32","name":"mintStartTime","type":"uint32"},{"internalType":"uint24","name":"mintDuration","type":"uint24"}],"name":"startMint","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":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"tokenIdToExtraInfo","outputs":[{"internalType":"uint24","name":"invitationId","type":"uint24"},{"internalType":"uint24","name":"editionNumber","type":"uint24"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"from","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"tokenImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600c805462ffffff60a01b1916600160a01b1790553480156200002657600080fd5b5060405162005216380380620052168339810160408190526200004991620008c3565b6040518060400160405280601681526020017f43617073756c6520323120496e7669746174696f6e7300000000000000000000815250604051806040016040528060048152602001634332314960e01b8152508160029081620000ad919062000a10565b506003620000bc828262000a10565b505060016000908155620000d2915033620001f8565b620000f36000735fd2e3ba05c862e62a34b9f63c45c0df622ac112620001f8565b62000114600073c2172a6315c1d7f6855768f843c420ebb36eda97620001f8565b62000135600073f98537696e2cf486f8f32604b2ca2cda120dbba8620001f8565b620001403362000283565b6200015f735fd2e3ba05c862e62a34b9f63c45c0df622ac11262000283565b6200017e73c2172a6315c1d7f6855768f843c420ebb36eda9762000283565b6200019d73f98537696e2cf486f8f32604b2ca2cda120dbba862000283565b620001a882620002bc565b620001b381620002ec565b60408051808201909152600d81526c0c6c2e0e6ead8ca64625ccae8d609b1b6020820152620001e29062000333565b620001f0306103e8620003c4565b505062000dda565b6200020482826200045d565b6200027f576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200023e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000290816200048a565b6200027f7f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a83620001f8565b6000620002c9816200048a565b50600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000620002f9816200048a565b6200030f826200049960201b62001cab1760201c565b600c80546001600160a01b0319166001600160a01b03929092169190911790555050565b600062000340816200048a565b60405163c47f002760e01b815273084b1c3c81545d370f3634392de611caabff81489063c47f0027906200037990859060040162000b15565b6020604051808303816000875af115801562000399573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003bf919062000b3c565b505050565b6127106001600160601b0382161115620003fb5760405162461bcd60e51b8152600401620003f29062000b61565b60405180910390fd5b6001600160a01b038216620004245760405162461bcd60e51b8152600401620003f29062000be7565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6000828152600a602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b6200049681336200050e565b50565b600080620004d383604051602001620004b3919062000c2b565b6040516020818303038152906040526200059160201b62001d101760201c565b90508051602082016000f091506001600160a01b038216620005085760405163046a55db60e11b815260040160405180910390fd5b50919050565b6200051a82826200045d565b6200027f5762000540816001600160a01b03166014620005bf60201b62001d3c1760201c565b6200055683602062001d3c620005bf821b17811c565b6040516020016200056992919062000c46565b60408051601f198184030181529082905262461bcd60e51b8252620003f29160040162000b15565b6060815182604051602001620005a992919062000cd9565b6040516020818303038152906040529050919050565b60606000620005d083600262000d28565b620005dd90600262000d4a565b6001600160401b03811115620005f757620005f762000786565b6040519080825280601f01601f19166020018201604052801562000622576020820181803683370190505b509050600360fc1b8160008151811062000640576200064062000d65565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000672576200067262000d65565b60200101906001600160f81b031916908160001a90535060006200069884600262000d28565b620006a590600162000d4a565b90505b600181111562000727576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620006dd57620006dd62000d65565b1a60f81b828281518110620006f657620006f662000d65565b60200101906001600160f81b031916908160001a90535060049490941c936200071f8162000d7b565b9050620006a8565b508315620007495760405162461bcd60e51b8152600401620003f29062000dc8565b9392505050565b60006001600160a01b03821662000484565b6200076d8162000750565b81146200049657600080fd5b8051620004848162000762565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715620007c457620007c462000786565b6040525050565b6000620007d760405190565b9050620007e582826200079c565b919050565b60006001600160401b0382111562000806576200080662000786565b601f19601f83011660200192915050565b60005b83811015620008345781810151838201526020016200081a565b8381111562000844576000848401525b50505050565b6000620008616200085b84620007ea565b620007cb565b9050828152602081018484840111156200087e576200087e600080fd5b6200088b84828562000817565b509392505050565b600082601f830112620008a957620008a9600080fd5b8151620008bb8482602086016200084a565b949350505050565b60008060408385031215620008db57620008db600080fd5b6000620008e9858562000779565b92505060208301516001600160401b038111156200090a576200090a600080fd5b620009188582860162000893565b9150509250929050565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200094d57607f821691505b60208210810362000508576200050862000922565b600062000484620009708381565b90565b6200097e8362000962565b81546008840282811b60001990911b908116901990911617825550505050565b6000620003bf81848462000973565b818110156200027f57620009c36000826200099e565b600101620009ad565b601f821115620003bf576000818152602090206020601f85010481016020851015620009f55750805b62000a096020601f860104830182620009ad565b5050505050565b81516001600160401b0381111562000a2c5762000a2c62000786565b62000a38825462000938565b62000a45828285620009cc565b6020601f83116001811462000a7c576000841562000a635750858201515b600019600886021c198116600286021786555062000ad8565b600085815260208120601f198616915b8281101562000aae578885015182556020948501946001909201910162000a8c565b8683101562000acb5784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b600062000aeb825190565b80845260208401935062000b0481856020860162000817565b601f01601f19169290920192915050565b6020808252810162000749818462000ae0565b806200076d565b8051620004848162000b28565b60006020828403121562000b535762000b53600080fd5b6000620008bb848462000b2f565b602080825281016200048481602a81527f455243323938313a20726f79616c7479206665652077696c6c206578636565646020820152692073616c65507269636560b01b604082015260600190565b601981526000602082017f455243323938313a20696e76616c696420726563656976657200000000000000815291505b5060200190565b60208082528101620004848162000bb0565b60008082525b5060010190565b600062000c11825190565b62000c2181856020860162000817565b9290920192915050565b600062000c388262000bf9565b915062000749828462000c06565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152601701600062000c7a828562000c06565b7001034b99036b4b9b9b4b733903937b6329607d1b81529150601182015b9150620008bb828462000c06565b606360f81b8152600062000bff565b6000620004848260e01b90565b62000cd363ffffffff821662000cb5565b82525050565b600062000ce68262000ca6565b915062000cf4828562000cc2565b6880600e6000396000f360b81b6004830190815291600d0162000c98565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161562000d455762000d4562000d12565b500290565b6000821982111562000d605762000d6062000d12565b500190565b634e487b7160e01b600052603260045260246000fd5b60008162000d8d5762000d8d62000d12565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e749101908152600062000be0565b60208082528101620004848162000d95565b61442c8062000dea6000396000f3fe60806040526004361061026b5760003560e01c80637c30274711610144578063b88d4fde116100b6578063dfb5259c1161007a578063dfb5259c1461082b578063e8a3d4851461084b578063e985e9c514610860578063f2a24e19146108a9578063f390b27a14610967578063fc31973a1461098757610272565b8063b88d4fde1461076e578063c7fecbcc1461078e578063c87b56dd146107bb578063d547741f146107db578063dc923e51146107fb57610272565b806391d148541161010857806391d148541461067957806395d89b4114610699578063962cafe5146106ae578063a217fddf14610719578063a22cb4651461072e578063b7f1d0721461074e57610272565b80637c302747146105cc5780637fc9cfff146105ec578063816b3c4f1461060c5780638997929b1461062c578063910379041461065957610272565b80632f2ff15d116101dd57806353e61f54116101a157806353e61f54146104f15780636352211e1461051157806370a082311461053157806370f70f1914610551578063712c7261146105715780637be5955d1461059157610272565b80632f2ff15d1461044857806336568abe146104685780633ccfd60b1461048857806342842e0e1461049d578063441fbcf6146104bd57610272565b806318160ddd1161022f57806318160ddd1461034d57806321dbe43d1461037357806323aaabbe1461039357806323b872dd146103ca578063248a9ca3146103ea5780632a55205a1461041a57610272565b806301384ec61461027957806301ffc9a7146102af57806306fdde03146102dc578063081812fc146102fe578063095ea7b31461032b57610272565b3661027257005b6060516080f35b34801561028557600080fd5b50610299610294366004612c44565b6109a7565b6040516102a69190612de4565b60405180910390f35b3480156102bb57600080fd5b506102cf6102ca366004612e0e565b610b23565b6040516102a69190612e2f565b3480156102e857600080fd5b506102f1610b43565b6040516102a69190612e9b565b34801561030a57600080fd5b5061031e610319366004612ebd565b610bd5565b6040516102a69190612ede565b34801561033757600080fd5b5061034b610346366004612f00565b610c19565b005b34801561035957600080fd5b5060015460005403600019015b6040516102a69190612f43565b34801561037f57600080fd5b5061034b61038e366004613056565b610cb9565b34801561039f57600080fd5b506102cf6103ae366004612c44565b62ffffff9081166000908152600d602052604090205416151590565b3480156103d657600080fd5b5061034b6103e53660046130a3565b610d2a565b3480156103f657600080fd5b50610366610405366004612ebd565b6000908152600a602052604090206001015490565b34801561042657600080fd5b5061043a6104353660046130f3565b610ec3565b6040516102a6929190613115565b34801561045457600080fd5b5061034b610463366004613130565b610f71565b34801561047457600080fd5b5061034b610483366004613130565b610f9b565b34801561049457600080fd5b5061034b610fd1565b3480156104a957600080fd5b5061034b6104b83660046130a3565b611092565b3480156104c957600080fd5b506103667f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a81565b3480156104fd57600080fd5b5061036661050c366004612c44565b6110ad565b34801561051d57600080fd5b5061031e61052c366004612ebd565b61123a565b34801561053d57600080fd5b5061036661054c366004613163565b611245565b34801561055d57600080fd5b5061034b61056c36600461319b565b611293565b34801561057d57600080fd5b5061034b61058c366004613277565b61137a565b34801561059d57600080fd5b506102cf6105ac3660046132b1565b600f60209081526000928352604080842090915290825290205460ff1681565b3480156105d857600080fd5b506103666105e7366004612c44565b6113b2565b3480156105f857600080fd5b506102996106073660046132fe565b6113de565b34801561061857600080fd5b5061034b610627366004613163565b61159a565b34801561063857600080fd5b5061064c6106473660046132fe565b6115cf565b6040516102a69190613369565b34801561066557600080fd5b5061034b610674366004613412565b611685565b34801561068557600080fd5b506102cf610694366004613130565b6118d5565b3480156106a557600080fd5b506102f1611900565b3480156106ba57600080fd5b506107096106c93660046132fe565b600e602052600090815260409020805460019091015462ffffff8083169263010000008104909116916001600160a01b03600160301b9092048216911684565b6040516102a69493929190613503565b34801561072557600080fd5b50610366600081565b34801561073a57600080fd5b5061034b610749366004613541565b61190f565b34801561075a57600080fd5b5061034b610769366004613163565b6119a7565b34801561077a57600080fd5b5061034b610789366004613574565b6119d5565b34801561079a57600080fd5b50600b546107ae906001600160a01b031681565b6040516102a69190613634565b3480156107c757600080fd5b506102f16107d6366004612ebd565b611a19565b3480156107e757600080fd5b5061034b6107f6366004613130565b611a49565b34801561080757600080fd5b50600c5461081e90600160a01b900462ffffff1681565b6040516102a69190613642565b34801561083757600080fd5b5061034b610846366004613277565b611a6e565b34801561085757600080fd5b506102f1611af3565b34801561086c57600080fd5b506102cf61087b366004613650565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108b557600080fd5b506109506108c4366004612c44565b600d60205260009081526040902080546002820154600383015460049093015462ffffff9283169360ff80841694610100850481169464010000000081049092169361ffff600160281b840416936001600160a01b03600160381b90940484169381169263ffffffff600160a01b8304811693600160c01b840490911692600160e01b9004821691168b565b6040516102a69b9a99989796959493929190613672565b34801561097357600080fd5b50600c5461031e906001600160a01b031681565b34801561099357600080fd5b506102f16109a23660046132fe565b611b9b565b6109af612ae6565b62ffffff8083166000908152600d6020526040902054166109eb5760405162461bcd60e51b81526004016109e29061374d565b60405180910390fd5b62ffffff8281166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905290939285019290916001850191600a91908390855b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411610a335790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b90910481166101208301526004909201549091166101409091015292915050565b6000610b2e82611ea7565b80610b3d5750610b3d82611ef5565b92915050565b606060028054610b5290613773565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7e90613773565b8015610bcb5780601f10610ba057610100808354040283529160200191610bcb565b820191906000526020600020905b815481529060010190602001808311610bae57829003601f168201915b5050505050905090565b6000610be082611f2a565b610bfd576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610c248261123a565b9050336001600160a01b03821614610c5d57610c40813361087b565b610c5d576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a610ce381611f5f565b60005b8251811015610d2457610d138433858481518110610d0657610d06613799565b6020026020010151611f6c565b50610d1d816137c5565b9050610ce6565b50505050565b6000610d3582612157565b9050836001600160a01b0316816001600160a01b031614610d685760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610db557610d98863361087b565b610db557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610ddc57604051633a954ecd60e21b815260040160405180910390fd5b8015610de757600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610e7957600184016000818152600460205260408120549003610e77576000548114610e775760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610f385750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f57906001600160601b0316876137df565b610f619190613814565b91519350909150505b9250929050565b6000828152600a6020526040902060010154610f8c81611f5f565b610f9683836121c6565b505050565b6001600160a01b0381163314610fc35760405162461bcd60e51b81526004016109e290613877565b610fcd828261224c565b5050565b6000610fdc81611f5f565b4780610ffa5760405162461bcd60e51b81526004016109e2906138b1565b6000611007600383613814565b90506000611016600384613814565b905060008161102584866138c1565b61102f91906138c1565b905061104f73f98537696e2cf486f8f32604b2ca2cda120dbba8826122b3565b61106d735fd2e3ba05c862e62a34b9f63c45c0df622ac112836122b3565b61108b73c2172a6315c1d7f6855768f843c420ebb36eda97846122b3565b5050505050565b610f96838383604051806020016040528060008152506119d5565b62ffffff8082166000908152600d60205260408120549091166110e25760405162461bcd60e51b81526004016109e29061374d565b62ffffff8281166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905293949390928401916001840190600a908288855b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116111295790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b909104811661012080840191909152600490930154811661014092830152908301519183015192935061122d929116906138d8565b63ffffffff169392505050565b6000610b3d82612157565b60006001600160a01b03821661126e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600061129e81611f5f565b62ffffff8085166000908152600d6020526040902054166112d15760405162461bcd60e51b81526004016109e29061374d565b62ffffff84166000908152600d602052604090206003810154600160c01b900463ffffffff16156113145760405162461bcd60e51b81526004016109e290613933565b4263ffffffff168463ffffffff161161132d574261132f565b835b6003909101805462ffffff909416600160e01b0262ffffff60e01b1963ffffffff93909316600160c01b029290921666ffffffffffffff60c01b199094169390931717909155505050565b600061138581611f5f565b61138e82611cab565b600c80546001600160a01b0319166001600160a01b03929092169190911790555050565b60003332146113d35760405162461bcd60e51b81526004016109e29061396f565b610b3d823033611f6c565b6113e6612ae6565b6113f8826001600160401b0316611f2a565b6114145760405162461bcd60e51b81526004016109e2906139a9565b600061141f836115cf565b80519091506114448162ffffff9081166000908152600d602052604090205416151590565b6114605760405162461bcd60e51b81526004016109e29061374d565b62ffffff8181166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905290939285019290916001850191600a91908390855b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116114a85790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b909104811661012083015260049092015490911661014090910152949350505050565b60006115a581611f5f565b610fcd7f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a836121c6565b604080516080810182526000808252602082018190529181018290526060810191909152611605826001600160401b0316611f2a565b6116215760405162461bcd60e51b81526004016109e2906139a9565b506001600160401b03166000908152600e60209081526040918290208251608081018452815462ffffff80821683526301000000820416938201939093526001600160a01b03600160301b9093048316938101939093526001015416606082015290565b600061169081611f5f565b600c54600160a01b900462ffffff166000908152600d6020526040902063ffffffff85166116d05760405162461bcd60e51b81526004016109e2906139e1565b8a6116ed5760405162461bcd60e51b81526004016109e290613a11565b8261170a5760405162461bcd60e51b81526004016109e290613a48565b600c548154600160a01b90910462ffffff1662ffffff19909116178155604080516020601f8e018190048102820181019092528c8152611764918e908e9081908401838280828437600092019190915250611cab92505050565b8160020160076101000a8154816001600160a01b0302191690836001600160a01b031602179055506117cb84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cab92505050565b8160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160020160016101000a81548162ffffff021916908362ffffff160217905550888160020160006101000a81548160ff021916908315150217905550878160020160046101000a81548160ff021916908360ff160217905550868160020160056101000a81548161ffff021916908361ffff160217905550858160010190600a61187f929190612b55565b50600301805463ffffffff60a01b1916600160a01b63ffffffff9690961686021790555050600c805462ffffff60a01b1981169084900462ffffff90811660010116909302929092179091555050505050505050565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060038054610b5290613773565b336001600160a01b038316036119385760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061199b908590612e2f565b60405180910390a35050565b60006119b281611f5f565b50600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6119e0848484610d2a565b6001600160a01b0383163b15610d24576119fc8484848461234f565b610d24576040516368d2bf6b60e11b815260040160405180910390fd5b6060611a2482611f2a565b611a405760405162461bcd60e51b81526004016109e290613a7c565b610b3d8261243b565b6000828152600a6020526040902060010154611a6481611f5f565b610f96838361224c565b6000611a7981611f5f565b60405163c47f002760e01b815273084b1c3c81545d370f3634392de611caabff81489063c47f002790611ab0908590600401612e9b565b6020604051808303816000875af1158015611acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613a97565b6060611b77611b00610b43565b6040518060600160405280602b8152602001614390602b9139600c54611b3790611b32906001600160a01b0316612684565b612694565b6040518060600160405280603c81526020016143bb603c9139604051602001611b639493929190613b2c565b604051602081830303815290604052612694565b604051602001611b879190613bdb565b604051602081830303815290604052905090565b6060611baf826001600160401b0316611f2a565b611bcb5760405162461bcd60e51b81526004016109e290613a7c565b6001600160401b0382166000908152600e60209081526040918290208251608081018452815462ffffff80821683526301000000820416938201939093526001600160a01b03600160301b9093048316938101939093526001015481166060830152600b541663b027689e84611c40816113de565b846040518463ffffffff1660e01b8152600401611c5f93929190613c2f565b600060405180830381865afa158015611c7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ca49190810190613cb1565b9392505050565b600080611cd683604051602001611cc29190613cf5565b604051602081830303815290604052611d10565b90508051602082016000f091506001600160a01b038216611d0a5760405163046a55db60e11b815260040160405180910390fd5b50919050565b6060815182604051602001611d26929190613d42565b6040516020818303038152906040529050919050565b60606000611d4b8360026137df565b611d56906002613d74565b6001600160401b03811115611d6d57611d6d612f51565b6040519080825280601f01601f191660200182016040528015611d97576020820181803683370190505b509050600360fc1b81600081518110611db257611db2613799565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611de157611de1613799565b60200101906001600160f81b031916908160001a9053506000611e058460026137df565b611e10906001613d74565b90505b6001811115611e88576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e4457611e44613799565b1a60f81b828281518110611e5a57611e5a613799565b60200101906001600160f81b031916908160001a90535060049490941c93611e8181613d87565b9050611e13565b508315611ca45760405162461bcd60e51b81526004016109e290613dd0565b60006301ffc9a760e01b6001600160e01b031983161480611ed857506380ac58cd60e01b6001600160e01b03198316145b80610b3d5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610b3d57506301ffc9a760e01b6001600160e01b0319831614610b3d565b600081600111158015611f3e575060005482105b8015610b3d575050600090815260046020526040902054600160e01b161590565b611f6981336127f8565b50565b62ffffff8084166000908152600d6020526040812054909116611fa15760405162461bcd60e51b81526004016109e29061374d565b62ffffff84166000818152600d602090815260408083206001600160a01b0387168452600f83528184209484529390915290205460ff1615611ff55760405162461bcd60e51b81526004016109e290613e20565b6003810154600160c01b900463ffffffff164210156120265760405162461bcd60e51b81526004016109e290613e5a565b61202f856110ad565b42111561204e5760405162461bcd60e51b81526004016109e290613e8d565b60005461205c84600161285c565b60048201805462ffffff1690600061207383613e9d565b82546101009290920a62ffffff8181021990931691831602179091556001600160401b03929092166000818152600e602090815260408083208054600182810180546001600160a01b0319166001600160a01b039e8f1617905565ffffff000001600160d01b03198216600160301b9c909d169b8c0262ffffff1981169d909d179d89169d8e178355600499909901546001600160d01b031990911665ffffffffffff19909c169b909b178c179a90961663010000000299909917909455958652600f8352868620978652969091525092909120805460ff19169092179091555090565b600081806001116121ad576000548110156121ad5760008181526004602052604081205490600160e01b821690036121ab575b80600003611ca457506000190160008181526004602052604090205461218a565b505b604051636f96cda160e11b815260040160405180910390fd5b6121d082826118d5565b610fcd576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122083390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61225682826118d5565b15610fcd576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b804710156122d35760405162461bcd60e51b81526004016109e290613eeb565b6000826001600160a01b0316826040516122ec90613efb565b60006040518083038185875af1925050503d8060008114612329576040519150601f19603f3d011682016040523d82523d6000602084013e61232e565b606091505b5050905080610f965760405162461bcd60e51b81526004016109e290613f60565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612384903390899088908890600401613f70565b6020604051808303816000875af19250505080156123bf575060408051601f3d908101601f191682019092526123bc91810190613fb5565b60015b61241d573d8080156123ed576040519150601f19603f3d011682016040523d82523d6000602084013e6123f2565b606091505b508051600003612415576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6001600160401b0381166000908152600e602090815260408083208151608081018352815462ffffff8082168352630100000082041694820194909452600160301b9093046001600160a01b03908116928401929092526001015416606080830191909152916124aa846113de565b905060006124b785611b9b565b905060006124cd836000015162ffffff1661293c565b6124df856020015162ffffff1661293c565b6124f285610160015162ffffff1661293c565b60405160200161250493929190613fd6565b604051602081830303815290604052905061265a816125268560e00151612684565b846040518060600160405280603c81526020016143bb603c9139600b5460608a0151604051637df0201160e11b81526001600160a01b039092169163fbe040229161257391600401612ede565b600060405180830381865afa158015612590573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125b89190810190613cb1565b600b546040808c01519051637df0201160e11b81526001600160a01b039092169163fbe04022916125eb91600401612ede565b600060405180830381865afa158015612608573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526126309190810190613cb1565b6126448a610100015163ffffffff1661293c565b604051602001611b6397969594939291906140fd565b60405160200161266a9190613bdb565b604051602081830303815290604052945050505050919050565b6060610b3d826001600019612a3c565b606081516000036126b357505060408051602081019091526000815290565b600060405180606001604052806040815260200161435060409139905060006003845160026126e29190613d74565b6126ec9190613814565b6126f79060046137df565b90506000612706826020613d74565b6001600160401b0381111561271d5761271d612f51565b6040519080825280601f01601f191660200182016040528015612747576020820181803683370190505b509050818152600183018586518101602084015b818310156127b3576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161275b565b6003895106600181146127cd57600281146127de576127ea565b613d3d60f01b6001198301526127ea565b603d60f81b6000198301525b509398975050505050505050565b61280282826118d5565b610fcd5761281a816001600160a01b03166014611d3c565b612825836020611d3c565b6040516020016128369291906142f1565b60408051601f198184030181529082905262461bcd60e51b82526109e291600401612e9b565b6000546001600160a01b03831661288557604051622e076360e81b815260040160405180910390fd5b816000036128a65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106128f05760005550505050565b6060816000036129635750506040805180820190915260018152600360fc1b602082015290565b8160005b811561298d5780612977816137c5565b91506129869050600a83613814565b9150612967565b6000816001600160401b038111156129a7576129a7612f51565b6040519080825280601f01601f1916602001820160405280156129d1576020820181803683370190505b5090505b8415612433576129e66001836138c1565b91506129f3600a86614313565b6129fe906030613d74565b60f81b818381518110612a1357612a13613799565b60200101906001600160f81b031916908160001a905350612a35600a86613814565b94506129d5565b6060833b6000819003612a5f575050604080516020810190915260008152611ca4565b80841115612a7d575050604080516020810190915260008152611ca4565b83831015612aa45780848460405163162544fd60e11b81526004016109e293929190614327565b8383038482036000828210612ab95782612abb565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b604051806101800160405280600062ffffff168152602001612b06612bf3565b815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b600183019183908215612be35791602002820160005b83821115612bb257833562ffffff1683826101000a81548162ffffff021916908362ffffff1602179055509260200192600301602081600201049283019260010302612b6b565b8015612be15782816101000a81549062ffffff0219169055600301602081600201049283019260010302612bb2565b505b50612bef929150612c12565b5090565b604051806101400160405280600a906020820280368337509192915050565b5b80821115612bef5760008155600101612c13565b62ffffff81165b8114611f6957600080fd5b8035610b3d81612c27565b600060208284031215612c5957612c59600080fd5b60006124338484612c39565b62ffffff81165b82525050565b6000612c7e8383612c65565b505060200190565b600a818060005b83811015610ebb578151612ca18782612c72565b965060208301925050600101612c8d565b801515612c6c565b60ff8116612c6c565b61ffff8116612c6c565b60006001600160a01b038216610b3d565b612c6c81612ccd565b63ffffffff8116612c6c565b80516102a0830190612d058482612c65565b506020820151612d186020850182612c86565b506040820151612d2c610160850182612cb2565b506060820151612d40610180850182612c65565b506080820151612d546101a0850182612cba565b5060a0820151612d686101c0850182612cc3565b5060c0820151612d7c6101e0850182612cde565b5060e0820151612d90610200850182612cde565b50610100820151612da5610220850182612ce7565b50610120820151612dba610240850182612ce7565b50610140820151612dcf610260850182612c65565b50610160820151610d24610280850182612c65565b6102a08101610b3d8284612cf3565b6001600160e01b03198116612c2e565b8035610b3d81612df3565b600060208284031215612e2357612e23600080fd5b60006124338484612e03565b60208101610b3d8284612cb2565b60005b83811015612e58578181015183820152602001612e40565b83811115610d245750506000910152565b6000612e73825190565b808452602084019350612e8a818560208601612e3d565b601f01601f19169290920192915050565b60208082528101611ca48184612e69565b80612c2e565b8035610b3d81612eac565b600060208284031215612ed257612ed2600080fd5b60006124338484612eb2565b60208101610b3d8284612cde565b612c2e81612ccd565b8035610b3d81612eec565b60008060408385031215612f1657612f16600080fd5b6000612f228585612ef5565b9250506020612f3385828601612eb2565b9150509250929050565b80612c6c565b60208101610b3d8284612f3d565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715612f8c57612f8c612f51565b6040525050565b6000612f9e60405190565b9050612faa8282612f67565b919050565b60006001600160401b03821115612fc857612fc8612f51565b5060209081020190565b6000612fe5612fe084612faf565b612f93565b8381529050602080820190840283018581111561300457613004600080fd5b835b8181101561302857806130198882612ef5565b84525060209283019201613006565b5050509392505050565b600082601f83011261304657613046600080fd5b8135612433848260208601612fd2565b6000806040838503121561306c5761306c600080fd5b60006130788585612c39565b92505060208301356001600160401b0381111561309757613097600080fd5b612f3385828601613032565b6000806000606084860312156130bb576130bb600080fd5b60006130c78686612ef5565b93505060206130d886828701612ef5565b92505060406130e986828701612eb2565b9150509250925092565b6000806040838503121561310957613109600080fd5b6000612f228585612eb2565b604081016131238285612cde565b611ca46020830184612f3d565b6000806040838503121561314657613146600080fd5b60006131528585612eb2565b9250506020612f3385828601612ef5565b60006020828403121561317857613178600080fd5b60006124338484612ef5565b63ffffffff8116612c2e565b8035610b3d81613184565b6000806000606084860312156131b3576131b3600080fd5b60006131bf8686612c39565b93505060206131d086828701613190565b92505060406130e986828701612c39565b60006001600160401b038211156131fa576131fa612f51565b601f19601f83011660200192915050565b82818337506000910152565b6000613225612fe0846131e1565b90508281526020810184848401111561324057613240600080fd5b61324b84828561320b565b509392505050565b600082601f83011261326757613267600080fd5b8135612433848260208601613217565b60006020828403121561328c5761328c600080fd5b81356001600160401b038111156132a5576132a5600080fd5b61243384828501613253565b600080604083850312156132c7576132c7600080fd5b60006132d38585612ef5565b9250506020612f3385828601612c39565b6001600160401b038116612c2e565b8035610b3d816132e4565b60006020828403121561331357613313600080fd5b600061243384846132f3565b805160808301906133308482612c65565b5060208201516133436020850182612c65565b5060408201516133566040850182612cde565b506060820151610d246060850182612cde565b60808101610b3d828461331f565b60008083601f84011261338c5761338c600080fd5b5081356001600160401b038111156133a6576133a6600080fd5b602083019150836001820283011115610f6a57610f6a600080fd5b801515612c2e565b8035610b3d816133c1565b60ff8116612c2e565b8035610b3d816133d4565b61ffff8116612c2e565b8035610b3d816133e8565b806101408101831015610b3d57610b3d600080fd5b6000806000806000806000806000806102208b8d03121561343557613435600080fd5b8a356001600160401b0381111561344e5761344e600080fd5b61345a8d828e01613377565b9a509a5050602061346d8d828e01612c39565b985050604061347e8d828e016133c9565b975050606061348f8d828e016133dd565b96505060806134a08d828e016133f2565b95505060a06134b18d828e016133fd565b9450506101e06134c38d828e01613190565b9350506102008b01356001600160401b038111156134e3576134e3600080fd5b6134ef8d828e01613377565b92509250509295989b9194979a5092959850565b608081016135118287612c65565b61351e6020830186612c65565b61352b6040830185612cde565b6135386060830184612cde565b95945050505050565b6000806040838503121561355757613557600080fd5b60006135638585612ef5565b9250506020612f33858286016133c9565b6000806000806080858703121561358d5761358d600080fd5b60006135998787612ef5565b94505060206135aa87828801612ef5565b93505060406135bb87828801612eb2565b92505060608501356001600160401b038111156135da576135da600080fd5b6135e687828801613253565b91505092959194509250565b6000610b3d6001600160a01b038316613609565b90565b6001600160a01b031690565b6000610b3d826135f2565b6000610b3d82613615565b612c6c81613620565b60208101610b3d828461362b565b60208101610b3d8284612c65565b6000806040838503121561366657613666600080fd5b60006131528585612ef5565b6101608101613681828e612c65565b61368e602083018d612cb2565b61369b604083018c612c65565b6136a8606083018b612cba565b6136b5608083018a612cc3565b6136c260a0830189612cde565b6136cf60c0830188612cde565b6136dc60e0830187612ce7565b6136ea610100830186612ce7565b6136f8610120830185612c65565b613706610140830184612c65565b9c9b505050505050505050505050565b601a81526000602082017f496e7669746174696f6e20646f6573206e6f742065786973742e000000000000815291505b5060200190565b60208082528101610b3d81613716565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061378757607f821691505b602082108103611d0a57611d0a61375d565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982036137d8576137d86137af565b5060010190565b60008160001904831182151516156137f9576137f96137af565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613823576138236137fe565b500490565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581526e103937b632b9903337b91039b2b63360891b602082015291505b5060400190565b60208082528101610b3d81613828565b60138152600060208201724e6f7468696e6720746f20776974686472617760681b81529150613746565b60208082528101610b3d81613887565b6000828210156138d3576138d36137af565b500390565b600063ffffffff8216915063ffffffff831692508263ffffffff03821115613902576139026137af565b500190565b601581526000602082017426b4b73a1030b63932b0b23c9039ba30b93a32b21760591b81529150613746565b60208082528101610b3d81613907565b601581526000602082017410dbdb9d1c9858dd1cc818d85b9b9bdd081b5a5b9d605a1b81529150613746565b60208082528101610b3d81613943565b6013815260006020820172151bdad95b88191bd95cdb89dd08195e1a5cdd606a1b81529150613746565b60208082528101610b3d8161397f565b60118152600060208201704e65656420612073746172742074696d6560781b81529150613746565b60208082528101610b3d816139b9565b600981526000602082016813995959081d195e1d60ba1b81529150613746565b60208082528101610b3d816139f1565b601081526000602082016f2732b2b2103232b9b1b934b83a34b7b760811b81529150613746565b60208082528101610b3d81613a21565b600d81526000602082016c191bd95cdb89dd08195e1a5cdd609a1b81529150613746565b60208082528101610b3d81613a58565b8051610b3d81612eac565b600060208284031215613aac57613aac600080fd5b60006124338484613a8c565b607b60f81b815260006137d8565b6000613ad0825190565b613ade818560208601612e3d565b9290920192915050565b701116113232b9b1b934b83a34b7b7111d1160791b815260005b5060110190565b7211161132bc3a32b93730b62fb634b735911d1160691b815260005b5060130190565b6000613b3782613ab8565b67113730b6b2911d1160c11b81526008019150613b548287613ac6565b9150613b5f82613ae8565b9150613b6b8286613ac6565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b62618152641cd94d8d0b60da1b60208201526025019150613bab8285613ac6565b9150613bb682613b09565b9150613bc28284613ac6565b61227d60f01b81529150600282015b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000601d82015b9150611ca48284613ac6565b6000610b3d6136066001600160401b03841681565b612c6c81613c11565b6103408101613c3e8286613c26565b613c4b6020830185612cf3565b6124336102c083018461331f565b6000613c67612fe0846131e1565b905082815260208101848484011115613c8257613c82600080fd5b61324b848285612e3d565b600082601f830112613ca157613ca1600080fd5b8151612433848260208601613c59565b600060208284031215613cc657613cc6600080fd5b81516001600160401b03811115613cdf57613cdf600080fd5b61243384828501613c8d565b60008082526137d8565b6000613c0582613ceb565b606360f81b815260006137d8565b6000610b3d8260e01b90565b612c6c63ffffffff8216613d0e565b6880600e6000396000f360b81b815260005b5060090190565b6000613d4d82613d00565b9150613d598285613d1a565b600482019150613d6882613d29565b91506124338284613ac6565b60008219821115613902576139026137af565b600081613d9657613d966137af565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e7491019081526000613746565b60208082528101610b3d81613d9e565b602381526000602082017f4f6e6c79206f6e206d696e742070657220696e7669746520706572206164647281526265737360e81b60208201529150613870565b60208082528101610b3d81613de0565b6013815260006020820172135a5b9d081a185cdb89dd081cdd185c9d1959606a1b81529150613746565b60208082528101610b3d81613e30565b600c81526000602082016b26b4b73a1034b99037bb32b960a11b81529150613746565b60208082528101610b3d81613e6a565b62ffffff16600062fffffe1982016137d8576137d86137af565b601d81526000602082017f416464726573733a20696e73756666696369656e742062616c616e636500000081529150613746565b60208082528101610b3d81613eb7565b6000610b3d82613606565b603a81526000602082017f416464726573733a20756e61626c6520746f2073656e642076616c75652c207281527f6563697069656e74206d6179206861766520726576657274656400000000000060208201529150613870565b60208082528101610b3d81613f06565b60808101613f7e8287612cde565b613f8b6020830186612cde565b613f986040830185612f3d565b8181036060830152613bd18184612e69565b8051610b3d81612df3565b600060208284031215613fca57613fca600080fd5b60006124338484613faa565b7f43617073756c6520323120496e7669746174696f6e2023000000000000000000815260170160006140088286613ac6565b61040560f31b8152600201915061401f8285613ac6565b6301037b3160e51b815260040191506140388284613ac6565b602960f81b815260010195945050505050565b70222c2261747472696275746573223a205b60781b81526000613b02565b601160f91b815260006137d8565b627d2c7b60e81b815260005b5060030190565b72089d1c985a5d17dd1e5c19488e8808951bc88b606a1b81526000613b25565b7f22646973706c61795f74797065223a202264617465222c000000000000000000815260005b5060170190565b680113b30b63ab2911d160bd1b81526000613d3b565b627d5d7d60e81b81526000614083565b600061410882613ab8565b67113730b6b2911d1160c11b81526008019150614125828a613ac6565b6f1116113232b9b1b934b83a34b7b7111d60811b8152601001915061414a8289613ac6565b6e161134b6b0b3b2afb230ba30911d1160891b8152600f01915061416e8288613ac6565b7111161132bc3a32b93730b62fbab936111d1160711b815260120191506141958287613ac6565b91506141a08261404b565b91506141ab82613ab8565b74089d1c985a5d17dd1e5c19488e8808919c9bdb488b605a1b815269113b30b63ab2911d101160b11b6015820152601f0191506141e88286613ac6565b91506141f382614069565b91506141fe82614077565b91506142098261408a565b69113b30b63ab2911d101160b11b8152600a0191506142288285613ac6565b915061423382614069565b915061423e82614077565b7f2274726169745f74797065223a20224576656e742054696d65222c00000000008152601b01915061426f826140aa565b915061427a826140d7565b91506142868284613ac6565b915061429182613606565b915061429c826140ed565b9998505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260006140d0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526000613b02565b60006142fc826142a9565b91506143088285613ac6565b9150613d68826142d3565b600082614322576143226137fe565b500690565b606081016143358286612f3d565b6143426020830185612f3d565b6124336040830184612f3d56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f496e7669746174696f6e7320746f2043617073756c652032312073706f6e736f726564206576656e74732e68747470733a2f2f7777772e63617073756c6532312e636f6d2f636f6c6c656374696f6e732f63617073756c652d32312d696e7669746174696f6e73a2646970667358221220712597f48f8565f96b3f807261259a884fe8e8c319f63798ff1f3022b121a42164736f6c634300080f0033000000000000000000000000fb5948a47f7a435bde99e690903b63b80d499240000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001573c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222077696474683d223830306d6d22206865696768743d223830306d6d222076696577426f783d223020302038303020383030222076657273696f6e3d22312e31223e3c70617468207472616e73666f726d3d227363616c65282d31203129222066696c6c3d222364626231383022207374726f6b653d222330303022207374726f6b652d77696474683d22302220646973706c61793d22696e6c696e652220643d224d2d3739372e3520322e35482d322e35563739372e35482d3739372e357a222f3e3c706174682066696c6c3d222330303022207374726f6b653d222330303022207374726f6b652d77696474683d22302220646973706c61793d22696e6c696e652220643d224d3131352e39203132332e34483638372e39563639352e34483131352e397a222f3e3c2f7376673e000000000000000000
Deployed Bytecode
0x60806040526004361061026b5760003560e01c80637c30274711610144578063b88d4fde116100b6578063dfb5259c1161007a578063dfb5259c1461082b578063e8a3d4851461084b578063e985e9c514610860578063f2a24e19146108a9578063f390b27a14610967578063fc31973a1461098757610272565b8063b88d4fde1461076e578063c7fecbcc1461078e578063c87b56dd146107bb578063d547741f146107db578063dc923e51146107fb57610272565b806391d148541161010857806391d148541461067957806395d89b4114610699578063962cafe5146106ae578063a217fddf14610719578063a22cb4651461072e578063b7f1d0721461074e57610272565b80637c302747146105cc5780637fc9cfff146105ec578063816b3c4f1461060c5780638997929b1461062c578063910379041461065957610272565b80632f2ff15d116101dd57806353e61f54116101a157806353e61f54146104f15780636352211e1461051157806370a082311461053157806370f70f1914610551578063712c7261146105715780637be5955d1461059157610272565b80632f2ff15d1461044857806336568abe146104685780633ccfd60b1461048857806342842e0e1461049d578063441fbcf6146104bd57610272565b806318160ddd1161022f57806318160ddd1461034d57806321dbe43d1461037357806323aaabbe1461039357806323b872dd146103ca578063248a9ca3146103ea5780632a55205a1461041a57610272565b806301384ec61461027957806301ffc9a7146102af57806306fdde03146102dc578063081812fc146102fe578063095ea7b31461032b57610272565b3661027257005b6060516080f35b34801561028557600080fd5b50610299610294366004612c44565b6109a7565b6040516102a69190612de4565b60405180910390f35b3480156102bb57600080fd5b506102cf6102ca366004612e0e565b610b23565b6040516102a69190612e2f565b3480156102e857600080fd5b506102f1610b43565b6040516102a69190612e9b565b34801561030a57600080fd5b5061031e610319366004612ebd565b610bd5565b6040516102a69190612ede565b34801561033757600080fd5b5061034b610346366004612f00565b610c19565b005b34801561035957600080fd5b5060015460005403600019015b6040516102a69190612f43565b34801561037f57600080fd5b5061034b61038e366004613056565b610cb9565b34801561039f57600080fd5b506102cf6103ae366004612c44565b62ffffff9081166000908152600d602052604090205416151590565b3480156103d657600080fd5b5061034b6103e53660046130a3565b610d2a565b3480156103f657600080fd5b50610366610405366004612ebd565b6000908152600a602052604090206001015490565b34801561042657600080fd5b5061043a6104353660046130f3565b610ec3565b6040516102a6929190613115565b34801561045457600080fd5b5061034b610463366004613130565b610f71565b34801561047457600080fd5b5061034b610483366004613130565b610f9b565b34801561049457600080fd5b5061034b610fd1565b3480156104a957600080fd5b5061034b6104b83660046130a3565b611092565b3480156104c957600080fd5b506103667f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a81565b3480156104fd57600080fd5b5061036661050c366004612c44565b6110ad565b34801561051d57600080fd5b5061031e61052c366004612ebd565b61123a565b34801561053d57600080fd5b5061036661054c366004613163565b611245565b34801561055d57600080fd5b5061034b61056c36600461319b565b611293565b34801561057d57600080fd5b5061034b61058c366004613277565b61137a565b34801561059d57600080fd5b506102cf6105ac3660046132b1565b600f60209081526000928352604080842090915290825290205460ff1681565b3480156105d857600080fd5b506103666105e7366004612c44565b6113b2565b3480156105f857600080fd5b506102996106073660046132fe565b6113de565b34801561061857600080fd5b5061034b610627366004613163565b61159a565b34801561063857600080fd5b5061064c6106473660046132fe565b6115cf565b6040516102a69190613369565b34801561066557600080fd5b5061034b610674366004613412565b611685565b34801561068557600080fd5b506102cf610694366004613130565b6118d5565b3480156106a557600080fd5b506102f1611900565b3480156106ba57600080fd5b506107096106c93660046132fe565b600e602052600090815260409020805460019091015462ffffff8083169263010000008104909116916001600160a01b03600160301b9092048216911684565b6040516102a69493929190613503565b34801561072557600080fd5b50610366600081565b34801561073a57600080fd5b5061034b610749366004613541565b61190f565b34801561075a57600080fd5b5061034b610769366004613163565b6119a7565b34801561077a57600080fd5b5061034b610789366004613574565b6119d5565b34801561079a57600080fd5b50600b546107ae906001600160a01b031681565b6040516102a69190613634565b3480156107c757600080fd5b506102f16107d6366004612ebd565b611a19565b3480156107e757600080fd5b5061034b6107f6366004613130565b611a49565b34801561080757600080fd5b50600c5461081e90600160a01b900462ffffff1681565b6040516102a69190613642565b34801561083757600080fd5b5061034b610846366004613277565b611a6e565b34801561085757600080fd5b506102f1611af3565b34801561086c57600080fd5b506102cf61087b366004613650565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108b557600080fd5b506109506108c4366004612c44565b600d60205260009081526040902080546002820154600383015460049093015462ffffff9283169360ff80841694610100850481169464010000000081049092169361ffff600160281b840416936001600160a01b03600160381b90940484169381169263ffffffff600160a01b8304811693600160c01b840490911692600160e01b9004821691168b565b6040516102a69b9a99989796959493929190613672565b34801561097357600080fd5b50600c5461031e906001600160a01b031681565b34801561099357600080fd5b506102f16109a23660046132fe565b611b9b565b6109af612ae6565b62ffffff8083166000908152600d6020526040902054166109eb5760405162461bcd60e51b81526004016109e29061374d565b60405180910390fd5b62ffffff8281166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905290939285019290916001850191600a91908390855b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411610a335790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b90910481166101208301526004909201549091166101409091015292915050565b6000610b2e82611ea7565b80610b3d5750610b3d82611ef5565b92915050565b606060028054610b5290613773565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7e90613773565b8015610bcb5780601f10610ba057610100808354040283529160200191610bcb565b820191906000526020600020905b815481529060010190602001808311610bae57829003601f168201915b5050505050905090565b6000610be082611f2a565b610bfd576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610c248261123a565b9050336001600160a01b03821614610c5d57610c40813361087b565b610c5d576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a610ce381611f5f565b60005b8251811015610d2457610d138433858481518110610d0657610d06613799565b6020026020010151611f6c565b50610d1d816137c5565b9050610ce6565b50505050565b6000610d3582612157565b9050836001600160a01b0316816001600160a01b031614610d685760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610db557610d98863361087b565b610db557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610ddc57604051633a954ecd60e21b815260040160405180910390fd5b8015610de757600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610e7957600184016000818152600460205260408120549003610e77576000548114610e775760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610f385750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f57906001600160601b0316876137df565b610f619190613814565b91519350909150505b9250929050565b6000828152600a6020526040902060010154610f8c81611f5f565b610f9683836121c6565b505050565b6001600160a01b0381163314610fc35760405162461bcd60e51b81526004016109e290613877565b610fcd828261224c565b5050565b6000610fdc81611f5f565b4780610ffa5760405162461bcd60e51b81526004016109e2906138b1565b6000611007600383613814565b90506000611016600384613814565b905060008161102584866138c1565b61102f91906138c1565b905061104f73f98537696e2cf486f8f32604b2ca2cda120dbba8826122b3565b61106d735fd2e3ba05c862e62a34b9f63c45c0df622ac112836122b3565b61108b73c2172a6315c1d7f6855768f843c420ebb36eda97846122b3565b5050505050565b610f96838383604051806020016040528060008152506119d5565b62ffffff8082166000908152600d60205260408120549091166110e25760405162461bcd60e51b81526004016109e29061374d565b62ffffff8281166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905293949390928401916001840190600a908288855b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116111295790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b909104811661012080840191909152600490930154811661014092830152908301519183015192935061122d929116906138d8565b63ffffffff169392505050565b6000610b3d82612157565b60006001600160a01b03821661126e576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600061129e81611f5f565b62ffffff8085166000908152600d6020526040902054166112d15760405162461bcd60e51b81526004016109e29061374d565b62ffffff84166000908152600d602052604090206003810154600160c01b900463ffffffff16156113145760405162461bcd60e51b81526004016109e290613933565b4263ffffffff168463ffffffff161161132d574261132f565b835b6003909101805462ffffff909416600160e01b0262ffffff60e01b1963ffffffff93909316600160c01b029290921666ffffffffffffff60c01b199094169390931717909155505050565b600061138581611f5f565b61138e82611cab565b600c80546001600160a01b0319166001600160a01b03929092169190911790555050565b60003332146113d35760405162461bcd60e51b81526004016109e29061396f565b610b3d823033611f6c565b6113e6612ae6565b6113f8826001600160401b0316611f2a565b6114145760405162461bcd60e51b81526004016109e2906139a9565b600061141f836115cf565b80519091506114448162ffffff9081166000908152600d602052604090205416151590565b6114605760405162461bcd60e51b81526004016109e29061374d565b62ffffff8181166000908152600d6020908152604080832081516101808101835281549095168552815161014081019283905290939285019290916001850191600a91908390855b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116114a85790505050509183525050600282015460ff8082161515602084015262ffffff610100808404821660408601526401000000008404909216606085015261ffff600160281b84041660808501526001600160a01b03600160381b909304831660a0850152600385015492831660c085015263ffffffff600160a01b8404811660e0860152600160c01b84041691840191909152600160e01b909104811661012083015260049092015490911661014090910152949350505050565b60006115a581611f5f565b610fcd7f401b71074bd0bf90dc6e81f23972dbce0b5e8b447025adf040d0dabd7e8c946a836121c6565b604080516080810182526000808252602082018190529181018290526060810191909152611605826001600160401b0316611f2a565b6116215760405162461bcd60e51b81526004016109e2906139a9565b506001600160401b03166000908152600e60209081526040918290208251608081018452815462ffffff80821683526301000000820416938201939093526001600160a01b03600160301b9093048316938101939093526001015416606082015290565b600061169081611f5f565b600c54600160a01b900462ffffff166000908152600d6020526040902063ffffffff85166116d05760405162461bcd60e51b81526004016109e2906139e1565b8a6116ed5760405162461bcd60e51b81526004016109e290613a11565b8261170a5760405162461bcd60e51b81526004016109e290613a48565b600c548154600160a01b90910462ffffff1662ffffff19909116178155604080516020601f8e018190048102820181019092528c8152611764918e908e9081908401838280828437600092019190915250611cab92505050565b8160020160076101000a8154816001600160a01b0302191690836001600160a01b031602179055506117cb84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cab92505050565b8160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160020160016101000a81548162ffffff021916908362ffffff160217905550888160020160006101000a81548160ff021916908315150217905550878160020160046101000a81548160ff021916908360ff160217905550868160020160056101000a81548161ffff021916908361ffff160217905550858160010190600a61187f929190612b55565b50600301805463ffffffff60a01b1916600160a01b63ffffffff9690961686021790555050600c805462ffffff60a01b1981169084900462ffffff90811660010116909302929092179091555050505050505050565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060038054610b5290613773565b336001600160a01b038316036119385760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061199b908590612e2f565b60405180910390a35050565b60006119b281611f5f565b50600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6119e0848484610d2a565b6001600160a01b0383163b15610d24576119fc8484848461234f565b610d24576040516368d2bf6b60e11b815260040160405180910390fd5b6060611a2482611f2a565b611a405760405162461bcd60e51b81526004016109e290613a7c565b610b3d8261243b565b6000828152600a6020526040902060010154611a6481611f5f565b610f96838361224c565b6000611a7981611f5f565b60405163c47f002760e01b815273084b1c3c81545d370f3634392de611caabff81489063c47f002790611ab0908590600401612e9b565b6020604051808303816000875af1158015611acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613a97565b6060611b77611b00610b43565b6040518060600160405280602b8152602001614390602b9139600c54611b3790611b32906001600160a01b0316612684565b612694565b6040518060600160405280603c81526020016143bb603c9139604051602001611b639493929190613b2c565b604051602081830303815290604052612694565b604051602001611b879190613bdb565b604051602081830303815290604052905090565b6060611baf826001600160401b0316611f2a565b611bcb5760405162461bcd60e51b81526004016109e290613a7c565b6001600160401b0382166000908152600e60209081526040918290208251608081018452815462ffffff80821683526301000000820416938201939093526001600160a01b03600160301b9093048316938101939093526001015481166060830152600b541663b027689e84611c40816113de565b846040518463ffffffff1660e01b8152600401611c5f93929190613c2f565b600060405180830381865afa158015611c7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ca49190810190613cb1565b9392505050565b600080611cd683604051602001611cc29190613cf5565b604051602081830303815290604052611d10565b90508051602082016000f091506001600160a01b038216611d0a5760405163046a55db60e11b815260040160405180910390fd5b50919050565b6060815182604051602001611d26929190613d42565b6040516020818303038152906040529050919050565b60606000611d4b8360026137df565b611d56906002613d74565b6001600160401b03811115611d6d57611d6d612f51565b6040519080825280601f01601f191660200182016040528015611d97576020820181803683370190505b509050600360fc1b81600081518110611db257611db2613799565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611de157611de1613799565b60200101906001600160f81b031916908160001a9053506000611e058460026137df565b611e10906001613d74565b90505b6001811115611e88576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e4457611e44613799565b1a60f81b828281518110611e5a57611e5a613799565b60200101906001600160f81b031916908160001a90535060049490941c93611e8181613d87565b9050611e13565b508315611ca45760405162461bcd60e51b81526004016109e290613dd0565b60006301ffc9a760e01b6001600160e01b031983161480611ed857506380ac58cd60e01b6001600160e01b03198316145b80610b3d5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610b3d57506301ffc9a760e01b6001600160e01b0319831614610b3d565b600081600111158015611f3e575060005482105b8015610b3d575050600090815260046020526040902054600160e01b161590565b611f6981336127f8565b50565b62ffffff8084166000908152600d6020526040812054909116611fa15760405162461bcd60e51b81526004016109e29061374d565b62ffffff84166000818152600d602090815260408083206001600160a01b0387168452600f83528184209484529390915290205460ff1615611ff55760405162461bcd60e51b81526004016109e290613e20565b6003810154600160c01b900463ffffffff164210156120265760405162461bcd60e51b81526004016109e290613e5a565b61202f856110ad565b42111561204e5760405162461bcd60e51b81526004016109e290613e8d565b60005461205c84600161285c565b60048201805462ffffff1690600061207383613e9d565b82546101009290920a62ffffff8181021990931691831602179091556001600160401b03929092166000818152600e602090815260408083208054600182810180546001600160a01b0319166001600160a01b039e8f1617905565ffffff000001600160d01b03198216600160301b9c909d169b8c0262ffffff1981169d909d179d89169d8e178355600499909901546001600160d01b031990911665ffffffffffff19909c169b909b178c179a90961663010000000299909917909455958652600f8352868620978652969091525092909120805460ff19169092179091555090565b600081806001116121ad576000548110156121ad5760008181526004602052604081205490600160e01b821690036121ab575b80600003611ca457506000190160008181526004602052604090205461218a565b505b604051636f96cda160e11b815260040160405180910390fd5b6121d082826118d5565b610fcd576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122083390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61225682826118d5565b15610fcd576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b804710156122d35760405162461bcd60e51b81526004016109e290613eeb565b6000826001600160a01b0316826040516122ec90613efb565b60006040518083038185875af1925050503d8060008114612329576040519150601f19603f3d011682016040523d82523d6000602084013e61232e565b606091505b5050905080610f965760405162461bcd60e51b81526004016109e290613f60565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612384903390899088908890600401613f70565b6020604051808303816000875af19250505080156123bf575060408051601f3d908101601f191682019092526123bc91810190613fb5565b60015b61241d573d8080156123ed576040519150601f19603f3d011682016040523d82523d6000602084013e6123f2565b606091505b508051600003612415576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6001600160401b0381166000908152600e602090815260408083208151608081018352815462ffffff8082168352630100000082041694820194909452600160301b9093046001600160a01b03908116928401929092526001015416606080830191909152916124aa846113de565b905060006124b785611b9b565b905060006124cd836000015162ffffff1661293c565b6124df856020015162ffffff1661293c565b6124f285610160015162ffffff1661293c565b60405160200161250493929190613fd6565b604051602081830303815290604052905061265a816125268560e00151612684565b846040518060600160405280603c81526020016143bb603c9139600b5460608a0151604051637df0201160e11b81526001600160a01b039092169163fbe040229161257391600401612ede565b600060405180830381865afa158015612590573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125b89190810190613cb1565b600b546040808c01519051637df0201160e11b81526001600160a01b039092169163fbe04022916125eb91600401612ede565b600060405180830381865afa158015612608573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526126309190810190613cb1565b6126448a610100015163ffffffff1661293c565b604051602001611b6397969594939291906140fd565b60405160200161266a9190613bdb565b604051602081830303815290604052945050505050919050565b6060610b3d826001600019612a3c565b606081516000036126b357505060408051602081019091526000815290565b600060405180606001604052806040815260200161435060409139905060006003845160026126e29190613d74565b6126ec9190613814565b6126f79060046137df565b90506000612706826020613d74565b6001600160401b0381111561271d5761271d612f51565b6040519080825280601f01601f191660200182016040528015612747576020820181803683370190505b509050818152600183018586518101602084015b818310156127b3576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161275b565b6003895106600181146127cd57600281146127de576127ea565b613d3d60f01b6001198301526127ea565b603d60f81b6000198301525b509398975050505050505050565b61280282826118d5565b610fcd5761281a816001600160a01b03166014611d3c565b612825836020611d3c565b6040516020016128369291906142f1565b60408051601f198184030181529082905262461bcd60e51b82526109e291600401612e9b565b6000546001600160a01b03831661288557604051622e076360e81b815260040160405180910390fd5b816000036128a65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106128f05760005550505050565b6060816000036129635750506040805180820190915260018152600360fc1b602082015290565b8160005b811561298d5780612977816137c5565b91506129869050600a83613814565b9150612967565b6000816001600160401b038111156129a7576129a7612f51565b6040519080825280601f01601f1916602001820160405280156129d1576020820181803683370190505b5090505b8415612433576129e66001836138c1565b91506129f3600a86614313565b6129fe906030613d74565b60f81b818381518110612a1357612a13613799565b60200101906001600160f81b031916908160001a905350612a35600a86613814565b94506129d5565b6060833b6000819003612a5f575050604080516020810190915260008152611ca4565b80841115612a7d575050604080516020810190915260008152611ca4565b83831015612aa45780848460405163162544fd60e11b81526004016109e293929190614327565b8383038482036000828210612ab95782612abb565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b604051806101800160405280600062ffffff168152602001612b06612bf3565b815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b600183019183908215612be35791602002820160005b83821115612bb257833562ffffff1683826101000a81548162ffffff021916908362ffffff1602179055509260200192600301602081600201049283019260010302612b6b565b8015612be15782816101000a81549062ffffff0219169055600301602081600201049283019260010302612bb2565b505b50612bef929150612c12565b5090565b604051806101400160405280600a906020820280368337509192915050565b5b80821115612bef5760008155600101612c13565b62ffffff81165b8114611f6957600080fd5b8035610b3d81612c27565b600060208284031215612c5957612c59600080fd5b60006124338484612c39565b62ffffff81165b82525050565b6000612c7e8383612c65565b505060200190565b600a818060005b83811015610ebb578151612ca18782612c72565b965060208301925050600101612c8d565b801515612c6c565b60ff8116612c6c565b61ffff8116612c6c565b60006001600160a01b038216610b3d565b612c6c81612ccd565b63ffffffff8116612c6c565b80516102a0830190612d058482612c65565b506020820151612d186020850182612c86565b506040820151612d2c610160850182612cb2565b506060820151612d40610180850182612c65565b506080820151612d546101a0850182612cba565b5060a0820151612d686101c0850182612cc3565b5060c0820151612d7c6101e0850182612cde565b5060e0820151612d90610200850182612cde565b50610100820151612da5610220850182612ce7565b50610120820151612dba610240850182612ce7565b50610140820151612dcf610260850182612c65565b50610160820151610d24610280850182612c65565b6102a08101610b3d8284612cf3565b6001600160e01b03198116612c2e565b8035610b3d81612df3565b600060208284031215612e2357612e23600080fd5b60006124338484612e03565b60208101610b3d8284612cb2565b60005b83811015612e58578181015183820152602001612e40565b83811115610d245750506000910152565b6000612e73825190565b808452602084019350612e8a818560208601612e3d565b601f01601f19169290920192915050565b60208082528101611ca48184612e69565b80612c2e565b8035610b3d81612eac565b600060208284031215612ed257612ed2600080fd5b60006124338484612eb2565b60208101610b3d8284612cde565b612c2e81612ccd565b8035610b3d81612eec565b60008060408385031215612f1657612f16600080fd5b6000612f228585612ef5565b9250506020612f3385828601612eb2565b9150509250929050565b80612c6c565b60208101610b3d8284612f3d565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715612f8c57612f8c612f51565b6040525050565b6000612f9e60405190565b9050612faa8282612f67565b919050565b60006001600160401b03821115612fc857612fc8612f51565b5060209081020190565b6000612fe5612fe084612faf565b612f93565b8381529050602080820190840283018581111561300457613004600080fd5b835b8181101561302857806130198882612ef5565b84525060209283019201613006565b5050509392505050565b600082601f83011261304657613046600080fd5b8135612433848260208601612fd2565b6000806040838503121561306c5761306c600080fd5b60006130788585612c39565b92505060208301356001600160401b0381111561309757613097600080fd5b612f3385828601613032565b6000806000606084860312156130bb576130bb600080fd5b60006130c78686612ef5565b93505060206130d886828701612ef5565b92505060406130e986828701612eb2565b9150509250925092565b6000806040838503121561310957613109600080fd5b6000612f228585612eb2565b604081016131238285612cde565b611ca46020830184612f3d565b6000806040838503121561314657613146600080fd5b60006131528585612eb2565b9250506020612f3385828601612ef5565b60006020828403121561317857613178600080fd5b60006124338484612ef5565b63ffffffff8116612c2e565b8035610b3d81613184565b6000806000606084860312156131b3576131b3600080fd5b60006131bf8686612c39565b93505060206131d086828701613190565b92505060406130e986828701612c39565b60006001600160401b038211156131fa576131fa612f51565b601f19601f83011660200192915050565b82818337506000910152565b6000613225612fe0846131e1565b90508281526020810184848401111561324057613240600080fd5b61324b84828561320b565b509392505050565b600082601f83011261326757613267600080fd5b8135612433848260208601613217565b60006020828403121561328c5761328c600080fd5b81356001600160401b038111156132a5576132a5600080fd5b61243384828501613253565b600080604083850312156132c7576132c7600080fd5b60006132d38585612ef5565b9250506020612f3385828601612c39565b6001600160401b038116612c2e565b8035610b3d816132e4565b60006020828403121561331357613313600080fd5b600061243384846132f3565b805160808301906133308482612c65565b5060208201516133436020850182612c65565b5060408201516133566040850182612cde565b506060820151610d246060850182612cde565b60808101610b3d828461331f565b60008083601f84011261338c5761338c600080fd5b5081356001600160401b038111156133a6576133a6600080fd5b602083019150836001820283011115610f6a57610f6a600080fd5b801515612c2e565b8035610b3d816133c1565b60ff8116612c2e565b8035610b3d816133d4565b61ffff8116612c2e565b8035610b3d816133e8565b806101408101831015610b3d57610b3d600080fd5b6000806000806000806000806000806102208b8d03121561343557613435600080fd5b8a356001600160401b0381111561344e5761344e600080fd5b61345a8d828e01613377565b9a509a5050602061346d8d828e01612c39565b985050604061347e8d828e016133c9565b975050606061348f8d828e016133dd565b96505060806134a08d828e016133f2565b95505060a06134b18d828e016133fd565b9450506101e06134c38d828e01613190565b9350506102008b01356001600160401b038111156134e3576134e3600080fd5b6134ef8d828e01613377565b92509250509295989b9194979a5092959850565b608081016135118287612c65565b61351e6020830186612c65565b61352b6040830185612cde565b6135386060830184612cde565b95945050505050565b6000806040838503121561355757613557600080fd5b60006135638585612ef5565b9250506020612f33858286016133c9565b6000806000806080858703121561358d5761358d600080fd5b60006135998787612ef5565b94505060206135aa87828801612ef5565b93505060406135bb87828801612eb2565b92505060608501356001600160401b038111156135da576135da600080fd5b6135e687828801613253565b91505092959194509250565b6000610b3d6001600160a01b038316613609565b90565b6001600160a01b031690565b6000610b3d826135f2565b6000610b3d82613615565b612c6c81613620565b60208101610b3d828461362b565b60208101610b3d8284612c65565b6000806040838503121561366657613666600080fd5b60006131528585612ef5565b6101608101613681828e612c65565b61368e602083018d612cb2565b61369b604083018c612c65565b6136a8606083018b612cba565b6136b5608083018a612cc3565b6136c260a0830189612cde565b6136cf60c0830188612cde565b6136dc60e0830187612ce7565b6136ea610100830186612ce7565b6136f8610120830185612c65565b613706610140830184612c65565b9c9b505050505050505050505050565b601a81526000602082017f496e7669746174696f6e20646f6573206e6f742065786973742e000000000000815291505b5060200190565b60208082528101610b3d81613716565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061378757607f821691505b602082108103611d0a57611d0a61375d565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982036137d8576137d86137af565b5060010190565b60008160001904831182151516156137f9576137f96137af565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613823576138236137fe565b500490565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581526e103937b632b9903337b91039b2b63360891b602082015291505b5060400190565b60208082528101610b3d81613828565b60138152600060208201724e6f7468696e6720746f20776974686472617760681b81529150613746565b60208082528101610b3d81613887565b6000828210156138d3576138d36137af565b500390565b600063ffffffff8216915063ffffffff831692508263ffffffff03821115613902576139026137af565b500190565b601581526000602082017426b4b73a1030b63932b0b23c9039ba30b93a32b21760591b81529150613746565b60208082528101610b3d81613907565b601581526000602082017410dbdb9d1c9858dd1cc818d85b9b9bdd081b5a5b9d605a1b81529150613746565b60208082528101610b3d81613943565b6013815260006020820172151bdad95b88191bd95cdb89dd08195e1a5cdd606a1b81529150613746565b60208082528101610b3d8161397f565b60118152600060208201704e65656420612073746172742074696d6560781b81529150613746565b60208082528101610b3d816139b9565b600981526000602082016813995959081d195e1d60ba1b81529150613746565b60208082528101610b3d816139f1565b601081526000602082016f2732b2b2103232b9b1b934b83a34b7b760811b81529150613746565b60208082528101610b3d81613a21565b600d81526000602082016c191bd95cdb89dd08195e1a5cdd609a1b81529150613746565b60208082528101610b3d81613a58565b8051610b3d81612eac565b600060208284031215613aac57613aac600080fd5b60006124338484613a8c565b607b60f81b815260006137d8565b6000613ad0825190565b613ade818560208601612e3d565b9290920192915050565b701116113232b9b1b934b83a34b7b7111d1160791b815260005b5060110190565b7211161132bc3a32b93730b62fb634b735911d1160691b815260005b5060130190565b6000613b3782613ab8565b67113730b6b2911d1160c11b81526008019150613b548287613ac6565b9150613b5f82613ae8565b9150613b6b8286613ac6565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b62618152641cd94d8d0b60da1b60208201526025019150613bab8285613ac6565b9150613bb682613b09565b9150613bc28284613ac6565b61227d60f01b81529150600282015b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000601d82015b9150611ca48284613ac6565b6000610b3d6136066001600160401b03841681565b612c6c81613c11565b6103408101613c3e8286613c26565b613c4b6020830185612cf3565b6124336102c083018461331f565b6000613c67612fe0846131e1565b905082815260208101848484011115613c8257613c82600080fd5b61324b848285612e3d565b600082601f830112613ca157613ca1600080fd5b8151612433848260208601613c59565b600060208284031215613cc657613cc6600080fd5b81516001600160401b03811115613cdf57613cdf600080fd5b61243384828501613c8d565b60008082526137d8565b6000613c0582613ceb565b606360f81b815260006137d8565b6000610b3d8260e01b90565b612c6c63ffffffff8216613d0e565b6880600e6000396000f360b81b815260005b5060090190565b6000613d4d82613d00565b9150613d598285613d1a565b600482019150613d6882613d29565b91506124338284613ac6565b60008219821115613902576139026137af565b600081613d9657613d966137af565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e7491019081526000613746565b60208082528101610b3d81613d9e565b602381526000602082017f4f6e6c79206f6e206d696e742070657220696e7669746520706572206164647281526265737360e81b60208201529150613870565b60208082528101610b3d81613de0565b6013815260006020820172135a5b9d081a185cdb89dd081cdd185c9d1959606a1b81529150613746565b60208082528101610b3d81613e30565b600c81526000602082016b26b4b73a1034b99037bb32b960a11b81529150613746565b60208082528101610b3d81613e6a565b62ffffff16600062fffffe1982016137d8576137d86137af565b601d81526000602082017f416464726573733a20696e73756666696369656e742062616c616e636500000081529150613746565b60208082528101610b3d81613eb7565b6000610b3d82613606565b603a81526000602082017f416464726573733a20756e61626c6520746f2073656e642076616c75652c207281527f6563697069656e74206d6179206861766520726576657274656400000000000060208201529150613870565b60208082528101610b3d81613f06565b60808101613f7e8287612cde565b613f8b6020830186612cde565b613f986040830185612f3d565b8181036060830152613bd18184612e69565b8051610b3d81612df3565b600060208284031215613fca57613fca600080fd5b60006124338484613faa565b7f43617073756c6520323120496e7669746174696f6e2023000000000000000000815260170160006140088286613ac6565b61040560f31b8152600201915061401f8285613ac6565b6301037b3160e51b815260040191506140388284613ac6565b602960f81b815260010195945050505050565b70222c2261747472696275746573223a205b60781b81526000613b02565b601160f91b815260006137d8565b627d2c7b60e81b815260005b5060030190565b72089d1c985a5d17dd1e5c19488e8808951bc88b606a1b81526000613b25565b7f22646973706c61795f74797065223a202264617465222c000000000000000000815260005b5060170190565b680113b30b63ab2911d160bd1b81526000613d3b565b627d5d7d60e81b81526000614083565b600061410882613ab8565b67113730b6b2911d1160c11b81526008019150614125828a613ac6565b6f1116113232b9b1b934b83a34b7b7111d60811b8152601001915061414a8289613ac6565b6e161134b6b0b3b2afb230ba30911d1160891b8152600f01915061416e8288613ac6565b7111161132bc3a32b93730b62fbab936111d1160711b815260120191506141958287613ac6565b91506141a08261404b565b91506141ab82613ab8565b74089d1c985a5d17dd1e5c19488e8808919c9bdb488b605a1b815269113b30b63ab2911d101160b11b6015820152601f0191506141e88286613ac6565b91506141f382614069565b91506141fe82614077565b91506142098261408a565b69113b30b63ab2911d101160b11b8152600a0191506142288285613ac6565b915061423382614069565b915061423e82614077565b7f2274726169745f74797065223a20224576656e742054696d65222c00000000008152601b01915061426f826140aa565b915061427a826140d7565b91506142868284613ac6565b915061429182613606565b915061429c826140ed565b9998505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260006140d0565b7001034b99036b4b9b9b4b733903937b6329607d1b81526000613b02565b60006142fc826142a9565b91506143088285613ac6565b9150613d68826142d3565b600082614322576143226137fe565b500690565b606081016143358286612f3d565b6143426020830185612f3d565b6124336040830184612f3d56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f496e7669746174696f6e7320746f2043617073756c652032312073706f6e736f726564206576656e74732e68747470733a2f2f7777772e63617073756c6532312e636f6d2f636f6c6c656374696f6e732f63617073756c652d32312d696e7669746174696f6e73a2646970667358221220712597f48f8565f96b3f807261259a884fe8e8c319f63798ff1f3022b121a42164736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fb5948a47f7a435bde99e690903b63b80d499240000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001573c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222077696474683d223830306d6d22206865696768743d223830306d6d222076696577426f783d223020302038303020383030222076657273696f6e3d22312e31223e3c70617468207472616e73666f726d3d227363616c65282d31203129222066696c6c3d222364626231383022207374726f6b653d222330303022207374726f6b652d77696474683d22302220646973706c61793d22696e6c696e652220643d224d2d3739372e3520322e35482d322e35563739372e35482d3739372e357a222f3e3c706174682066696c6c3d222330303022207374726f6b653d222330303022207374726f6b652d77696474683d22302220646973706c61793d22696e6c696e652220643d224d3131352e39203132332e34483638372e39563639352e34483131352e397a222f3e3c2f7376673e000000000000000000
-----Decoded View---------------
Arg [0] : _renderingContract (address): 0xfB5948A47F7a435bdE99E690903b63B80D499240
Arg [1] : contractImageData (string): <svg xmlns="http://www.w3.org/2000/svg" width="800mm" height="800mm" viewBox="0 0 800 800" version="1.1"><path transform="scale(-1 1)" fill="#dbb180" stroke="#000" stroke-width="0" display="inline" d="M-797.5 2.5H-2.5V797.5H-797.5z"/><path fill="#000" stroke="#000" stroke-width="0" display="inline" d="M115.9 123.4H687.9V695.4H115.9z"/></svg>
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 000000000000000000000000fb5948a47f7a435bde99e690903b63b80d499240
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000157
Arg [3] : 3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f3230
Arg [4] : 30302f737667222077696474683d223830306d6d22206865696768743d223830
Arg [5] : 306d6d222076696577426f783d22302030203830302038303022207665727369
Arg [6] : 6f6e3d22312e31223e3c70617468207472616e73666f726d3d227363616c6528
Arg [7] : 2d31203129222066696c6c3d222364626231383022207374726f6b653d222330
Arg [8] : 303022207374726f6b652d77696474683d22302220646973706c61793d22696e
Arg [9] : 6c696e652220643d224d2d3739372e3520322e35482d322e35563739372e3548
Arg [10] : 2d3739372e357a222f3e3c706174682066696c6c3d222330303022207374726f
Arg [11] : 6b653d222330303022207374726f6b652d77696474683d22302220646973706c
Arg [12] : 61793d22696e6c696e652220643d224d3131352e39203132332e34483638372e
Arg [13] : 39563639352e34483131352e397a222f3e3c2f7376673e000000000000000000
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.