ERC-721
Overview
Max Total Supply
5,376 BABY
Holders
1,979
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 BABYLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
RichBaby
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/structs/BitMaps.sol'; import 'erc721a/contracts/ERC721A.sol'; import './CryptoPunksInterface.sol'; import './ERC721ARefundable.sol'; /** * :---=====---:. * .-===:.. .:-==-: * ===:. ........... .-==. * .=+:. ..:-===-----===-::. .=+: * =+:. ..:==-: .-=+-:. .=+ * *=:..::+=. =*-:. .:*. .::::-------=. * *-:..:=+ =+:. .:*=:....:::::::.:=*- * *=:..:+- :*-: .:*:::::::::::::.... * -+::::== :*-. :-*:::........... : * #-::::* :-*=: .:* ..* * *-...:+ -: -*-..:+. =-* * .::+ :--==--+*-.::+:..............+-:* * .:::* .==- -==::*. ...==-+: * -:::+: =+::::......:.:+-*..::::::::::-*=-+: * -.-:::*. =+:::::::::::::::#=:::::::::::=+-=+ * :*--:::+- #-:::::::::::::::=+:::::::::-+=-+- * :*=-:::-+: #--::::::::::::::=+:::::::-+=-+= * *=--:::-+=. ++---++=++::::::-#::::::-++-=+. * -*=--::::-==------++*++=::::-#:::-=#=:::::+=-=+=-:. .... * -++=--::::::::::::::::::--+*-=+**-::::=+--+- .:...:----: * -=++=-----::::-----=+***+++=--::::+-:=+ .-= * .--=++++++++++++=-------::::::+-:+- =- * -: .::::::::..:......::...*=-*: := * .= .. .... +=-*: =: * .- +--#- * * = .*-=+.-+: * * -: .........::-+-=+ *. .+ * ::..::::::::::::::::::::++-+= :+ * * + .::::::::::::::::::=+-=+: -+. +. * #-..::::::::::::-===::+- :+- -= * =*============+=-=+=: :==: :-=. * -=+==-----=++=-: .---------- */ contract RichBaby is ERC721ARefundable, EIP712, Ownable { using ECDSA for bytes32; using BitMaps for BitMaps.BitMap; using Strings for uint256; uint256 public immutable collectionSize; uint256 public constant DEV_MINT_MAX = 250; uint256 public constant MINT_MAX_PER_PHASE = 2; uint256 public devMinted; string public baseURI; address private signerAddress; bytes32 public PROVENANCE; CryptoPunksInterface private immutable punksContract; IERC721 private immutable baycContract; BitMaps.BitMap private bred; enum SalePhase { Paused, Breed, AllowList, Public } struct SaleConfig { uint64 startTimestamp; uint64 price; SalePhase phase; } mapping(SalePhase => mapping(address => uint256)) public mintedCount; SaleConfig public saleConfig; struct RefundableMintInfo { address mintAddress; uint64 mintTime; uint16 mintQuantity; } mapping(uint256 => RefundableMintInfo) private refundableMintInfos; struct Parents { uint16 punkTokenId; uint16 baycTokenId; bool isProposerPunk; bool proposerClaimed; bool hasParents; } mapping(uint256 => Parents) public babyParents; event Breed( uint16 indexed _proposerTokenId, bool indexed _isProposerPunk, uint16 indexed _acceptorTokenId, address _acceptor, uint16 _babyTokenId ); event Claim( uint16 indexed _babyTokenId, uint16 indexed _siblingTokenId, address indexed _claimer ); constructor( address punkAddress, address baycAddress, address _signerAddress, uint16 _collectionSize, uint64 _refundPeriod ) ERC721ARefundable(_refundPeriod) ERC721A('Rich Baby', 'BABY') EIP712('Rich Baby', '1') { punksContract = CryptoPunksInterface(punkAddress); baycContract = IERC721(baycAddress); signerAddress = _signerAddress; collectionSize = _collectionSize; } function setSignerAddress(address newSignerAddress) external onlyOwner { signerAddress = newSignerAddress; } modifier isAtSalePhase(SalePhase phase) { unchecked { require( saleConfig.phase == phase && block.timestamp >= saleConfig.startTimestamp, 'Sale phase mismatch.' ); } _; } function checkAndUpdateMintedCount(SalePhase phase, uint256 quantity) private { unchecked { require( mintedCount[phase][msg.sender] + quantity <= MINT_MAX_PER_PHASE, 'Too many babies to adopt.' ); mintedCount[phase][msg.sender] += quantity; } } modifier checkPrice(SalePhase phase, uint256 quantity) { unchecked { require( msg.value == quantity * saleConfig.price, 'Incorrect price.' ); } _; } struct MatingRequest { address proposerAddress; uint16 proposerTokenId; bool isProposerPunk; // proposer is punk or bayc owner uint32 expireAt; } bytes32 private constant MATING_REQUEST_TYPE_HASH = keccak256( 'MatingRequest(address proposerAddress,uint16 proposerTokenId,bool isProposerPunk,uint32 expireAt)' ); function hashRequest(MatingRequest calldata matingRequest) private view returns (bytes32) { bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( MATING_REQUEST_TYPE_HASH, matingRequest.proposerAddress, matingRequest.proposerTokenId, matingRequest.isProposerPunk, matingRequest.expireAt ) ) ); return digest; } function validateMatingRequest( MatingRequest calldata matingRequest, bytes calldata sig ) internal view { require( matingRequest.expireAt >= block.timestamp, 'Mating request expired.' ); require( ECDSA.recover(hashRequest(matingRequest), sig) == matingRequest.proposerAddress, 'Invalid sigature.' ); } function verifyPunkOwnership(uint16 punkId, address holder) internal view { require( punksContract.punkIndexToAddress(punkId) == holder, 'Address does not own this token.' ); } function verifyBaycOwnership(uint16 baycId, address holder) internal view { require( baycContract.ownerOf(baycId) == holder, 'Address does not own this token.' ); } modifier callerIsUser() { require(tx.origin == msg.sender, 'The caller is another contract.'); _; } function punkId2Index(uint16 punkId) internal pure returns (uint16) { unchecked { return punkId * 2; } } function baycId2Index(uint16 baycId) internal pure returns (uint16) { unchecked { return baycId * 2 + 1; } } function punkBred(uint16 punkId) public view returns (bool) { return bred.get(punkId2Index(punkId)); } function baycBred(uint16 baycId) public view returns (bool) { return bred.get(baycId2Index(baycId)); } /* acceptor mint one baby, left another baby for proposer to claim */ function breed( MatingRequest calldata matingRequest, uint16 acceptorTokenId, bytes calldata sig ) external callerIsUser isAtSalePhase(SalePhase.Breed) { validateMatingRequest(matingRequest, sig); uint16 punkId; uint16 baycId; address punkOwnerAddress; address baycOwnerAddress; if (matingRequest.isProposerPunk) { punkId = matingRequest.proposerTokenId; punkOwnerAddress = matingRequest.proposerAddress; baycId = acceptorTokenId; baycOwnerAddress = msg.sender; } else { punkId = acceptorTokenId; punkOwnerAddress = msg.sender; baycId = matingRequest.proposerTokenId; baycOwnerAddress = matingRequest.proposerAddress; } require(!punkBred(punkId), 'Punk already bred a baby.'); require(!baycBred(baycId), 'Bayc already bred a baby.'); bred.set(punkId2Index(punkId)); bred.set(baycId2Index(baycId)); // check ownership verifyPunkOwnership(punkId, punkOwnerAddress); verifyBaycOwnership(baycId, baycOwnerAddress); uint16 babyTokenId = uint16(_currentIndex); babyParents[babyTokenId] = Parents( punkId, baycId, matingRequest.isProposerPunk, false, true ); emit Breed( matingRequest.proposerTokenId, matingRequest.isProposerPunk, acceptorTokenId, msg.sender, babyTokenId ); // mint baby token for acceptor, proposer should claim the twin baby later. _mint(msg.sender, 1, '', false); } /* For proposer to claim the baby. */ function claimBaby(uint16 siblingId) external callerIsUser isAtSalePhase(SalePhase.Breed) { Parents storage parentsInfo = babyParents[siblingId]; require(parentsInfo.hasParents, 'No baby to be claimed.'); if (parentsInfo.isProposerPunk) { verifyPunkOwnership(parentsInfo.punkTokenId, msg.sender); } else { verifyBaycOwnership(parentsInfo.baycTokenId, msg.sender); } require(!parentsInfo.proposerClaimed, 'Baby already claimed.'); parentsInfo.proposerClaimed = true; uint16 babyTokenId = uint16(_currentIndex); babyParents[babyTokenId] = parentsInfo; emit Claim(babyTokenId, siblingId, msg.sender); _mint(msg.sender, 1, '', false); } function allowListAdopt( uint256 quantity, uint256 salt, bytes calldata signature ) external payable callerIsUser isAtSalePhase(SalePhase.AllowList) checkPrice(SalePhase.AllowList, quantity) { checkAndUpdateMintedCount(SalePhase.AllowList, quantity); require( keccak256(abi.encodePacked('allowlist', msg.sender, salt)) .toEthSignedMessageHash() .recover(signature) == signerAddress, 'Invalid signature.' ); unchecked { require( _currentIndex + quantity <= collectionSize, 'Max supply reached.' ); } _mint(msg.sender, quantity, '', false); } function publicAdopt( uint256 quantity, uint256 salt, bytes calldata signature ) external payable callerIsUser isAtSalePhase(SalePhase.Public) checkPrice(SalePhase.Public, quantity) { checkAndUpdateMintedCount(SalePhase.Public, quantity); require( keccak256(abi.encodePacked('public', msg.sender, salt)) .toEthSignedMessageHash() .recover(signature) == signerAddress, 'Invalid signature.' ); unchecked { require( _currentIndex + quantity <= collectionSize, 'Max supply reached.' ); } _mint(msg.sender, quantity, '', false); } function startBreedSale(uint64 startTime) external onlyOwner { saleConfig = SaleConfig(startTime, 0, SalePhase.Breed); } function startAllowlistSale(uint64 price, uint64 startTime) external onlyOwner { saleConfig = SaleConfig(startTime, price, SalePhase.AllowList); } function startPublicSale(uint64 price, uint64 startTime) external onlyOwner { saleConfig = SaleConfig(startTime, price, SalePhase.Public); } function setSaleConfig(SaleConfig calldata _saleConfig) external onlyOwner { saleConfig = _saleConfig; } function devMint(address to, uint256 quantity) external onlyOwner { require( devMinted + quantity <= DEV_MINT_MAX, 'Too many babies to mint.' ); unchecked { devMinted += quantity; } _mint(to, quantity, '', false); } function setProvenance(bytes32 provenance) external onlyOwner { PROVENANCE = provenance; } function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), '.json')) : ''; } function withdraw(address beneficiary) external onlyOwner noWithdrawBeforePossibleRefund { payable(beneficiary).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol) pragma solidity ^0.8.0; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error AuxQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @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 Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. 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; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _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 ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev See {IERC721Enumerable-totalSupply}. * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * 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 See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { if (owner == address(0)) revert AuxQueryForZeroAddress(); return _addressData[owner].aux; } /** * Sets the auxillary 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 { if (owner == address(0)) revert AuxQueryForZeroAddress(); _addressData[owner].aux = aux; } /** * 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) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // 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. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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, tokenId.toString())) : ''; } /** * @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, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @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 override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), 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-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @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 { _transfer(from, to, tokenId); if (to.isContract() && !_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 && !_ownerships[tokenId].burned; } 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. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @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. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) 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 or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @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 _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // 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 { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // 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 { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @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 {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface CryptoPunksInterface { function punkIndexToAddress(uint256 punkIndex) external view returns (address); function getPunk(uint256 punkIndex) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import 'erc721a/contracts/ERC721A.sol'; error RefundCallerNotOwner(); error RefundCallerNotInitialOwner(); error RefundExpired(); error WithdrawInRefundPeriod(); error NoRefundableValue(); error InvalidStartTokenId(); /** * Refundable ERC721 contract based on Azuki's ERC721A protocol. * * Assumes mint prices of each token are same in one batch, * and minimal precision of token price are 1 gwei. * * Assumes max token price less than 2^48-1 = 281474.976710655 ETH. * * Assumes all ETH transferred are used only for minting in one transaction. * * Assume max token quantity of once minting no more than 2^8-1 = 255. * * Tokens become unrefundable after it been transferred. */ abstract contract ERC721ARefundable is ERC721A { uint256 private immutable refundPeriod; uint256 public latestRefundableMintTime; struct Refundability { uint40 mintTime; address mintAddress; uint48 value; // value in gwei, max of 281474.976710655 ETH uint8 quantity; } mapping(uint256 => Refundability) internal refundabilities; constructor(uint64 _refundPeriod) { refundPeriod = _refundPeriod; latestRefundableMintTime = block.timestamp; } function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { if (from == address(0) && msg.value > 0) { // is mint refundabilities[startTokenId] = Refundability( uint40(block.timestamp), to, uint48(msg.value / quantity / 1 gwei), uint8(quantity) ); latestRefundableMintTime = block.timestamp; } } function refund(uint256 tokenId) external { uint256 curr = tokenId; while (true) { Refundability memory refundability = refundabilities[curr]; if (refundability.mintTime == 0) { if (curr <= _startTokenId()) { break; } curr--; continue; } refundWithStartTokenId(tokenId, curr); return; } revert NoRefundableValue(); } function refundWithStartTokenId(uint256 tokenId, uint256 startTokenId) public { if (msg.sender != ownerOf(tokenId)) { revert RefundCallerNotOwner(); } if (tokenId < startTokenId) { revert InvalidStartTokenId(); } Refundability memory refundability = refundabilities[startTokenId]; if ( msg.sender != refundability.mintAddress || refundability.quantity <= tokenId - startTokenId ) { revert RefundCallerNotInitialOwner(); } if (block.timestamp > refundability.mintTime + refundPeriod) { revert RefundExpired(); } _burn(tokenId); payable(msg.sender).transfer(uint256(refundability.value) * 1 gwei); return; } modifier noWithdrawBeforePossibleRefund() { if (block.timestamp < latestRefundableMintTime + refundPeriod) { revert WithdrawInRefundPeriod(); } _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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: UNLICENSED pragma solidity >=0.6.0; import "../contracts/CryptoPunksInterface.sol"; abstract contract XCryptoPunksInterface is CryptoPunksInterface { constructor() {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../contracts/ERC721ARefundable.sol"; contract XERC721ARefundable is ERC721ARefundable { constructor(string memory name_, string memory symbol_, uint64 _refundPeriod) ERC721A(name_, symbol_) ERC721ARefundable(_refundPeriod) {} function x_afterTokenTransfers(address from,address to,uint256 startTokenId,uint256 quantity) external { return super._afterTokenTransfers(from,to,startTokenId,quantity); } function x_startTokenId() external view returns (uint256) { return super._startTokenId(); } function x_totalMinted() external view returns (uint256) { return super._totalMinted(); } function x_numberMinted(address owner) external view returns (uint256) { return super._numberMinted(owner); } function x_numberBurned(address owner) external view returns (uint256) { return super._numberBurned(owner); } function x_getAux(address owner) external view returns (uint64) { return super._getAux(owner); } function x_setAux(address owner,uint64 aux) external { return super._setAux(owner,aux); } function xownershipOf(uint256 tokenId) external view returns (ERC721A.TokenOwnership memory) { return super.ownershipOf(tokenId); } function x_baseURI() external view returns (string memory) { return super._baseURI(); } function x_exists(uint256 tokenId) external view returns (bool) { return super._exists(tokenId); } function x_safeMint(address to,uint256 quantity) external { return super._safeMint(to,quantity); } function x_safeMint(address to,uint256 quantity,bytes calldata _data) external { return super._safeMint(to,quantity,_data); } function x_mint(address to,uint256 quantity,bytes calldata _data,bool safe) external { return super._mint(to,quantity,_data,safe); } function x_burn(uint256 tokenId) external { return super._burn(tokenId); } function x_beforeTokenTransfers(address from,address to,uint256 startTokenId,uint256 quantity) external { return super._beforeTokenTransfers(from,to,startTokenId,quantity); } function x_msgSender() external view returns (address) { return super._msgSender(); } function x_msgData() external view returns (bytes memory) { return super._msgData(); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../contracts/RichBaby.sol"; contract XRichBaby is RichBaby { constructor(address punkAddress, address baycAddress, address _signerAddress, uint16 _collectionSize, uint64 _refundPeriod) RichBaby(punkAddress, baycAddress, _signerAddress, _collectionSize, _refundPeriod) {} function xvalidateMatingRequest(RichBaby.MatingRequest calldata matingRequest,bytes calldata sig) external view { return super.validateMatingRequest(matingRequest,sig); } function xverifyPunkOwnership(uint16 punkId,address holder) external view { return super.verifyPunkOwnership(punkId,holder); } function xverifyBaycOwnership(uint16 baycId,address holder) external view { return super.verifyBaycOwnership(baycId,holder); } function xpunkId2Index(uint16 punkId) external pure returns (uint16) { return super.punkId2Index(punkId); } function xbaycId2Index(uint16 baycId) external pure returns (uint16) { return super.baycId2Index(baycId); } function x_transferOwnership(address newOwner) external { return super._transferOwnership(newOwner); } function x_domainSeparatorV4() external view returns (bytes32) { return super._domainSeparatorV4(); } function x_hashTypedDataV4(bytes32 structHash) external view returns (bytes32) { return super._hashTypedDataV4(structHash); } function x_afterTokenTransfers(address from,address to,uint256 startTokenId,uint256 quantity) external { return super._afterTokenTransfers(from,to,startTokenId,quantity); } function x_startTokenId() external view returns (uint256) { return super._startTokenId(); } function x_totalMinted() external view returns (uint256) { return super._totalMinted(); } function x_numberMinted(address owner) external view returns (uint256) { return super._numberMinted(owner); } function x_numberBurned(address owner) external view returns (uint256) { return super._numberBurned(owner); } function x_getAux(address owner) external view returns (uint64) { return super._getAux(owner); } function x_setAux(address owner,uint64 aux) external { return super._setAux(owner,aux); } function xownershipOf(uint256 tokenId) external view returns (ERC721A.TokenOwnership memory) { return super.ownershipOf(tokenId); } function x_baseURI() external view returns (string memory) { return super._baseURI(); } function x_exists(uint256 tokenId) external view returns (bool) { return super._exists(tokenId); } function x_safeMint(address to,uint256 quantity) external { return super._safeMint(to,quantity); } function x_safeMint(address to,uint256 quantity,bytes calldata _data) external { return super._safeMint(to,quantity,_data); } function x_mint(address to,uint256 quantity,bytes calldata _data,bool safe) external { return super._mint(to,quantity,_data,safe); } function x_burn(uint256 tokenId) external { return super._burn(tokenId); } function x_beforeTokenTransfers(address from,address to,uint256 startTokenId,uint256 quantity) external { return super._beforeTokenTransfers(from,to,startTokenId,quantity); } function x_msgSender() external view returns (address) { return super._msgSender(); } function x_msgData() external view returns (bytes memory) { return super._msgData(); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"punkAddress","type":"address"},{"internalType":"address","name":"baycAddress","type":"address"},{"internalType":"address","name":"_signerAddress","type":"address"},{"internalType":"uint16","name":"_collectionSize","type":"uint16"},{"internalType":"uint64","name":"_refundPeriod","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidStartTokenId","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoRefundableValue","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"RefundCallerNotInitialOwner","type":"error"},{"inputs":[],"name":"RefundCallerNotOwner","type":"error"},{"inputs":[],"name":"RefundExpired","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":"WithdrawInRefundPeriod","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":"uint16","name":"_proposerTokenId","type":"uint16"},{"indexed":true,"internalType":"bool","name":"_isProposerPunk","type":"bool"},{"indexed":true,"internalType":"uint16","name":"_acceptorTokenId","type":"uint16"},{"indexed":false,"internalType":"address","name":"_acceptor","type":"address"},{"indexed":false,"internalType":"uint16","name":"_babyTokenId","type":"uint16"}],"name":"Breed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"_babyTokenId","type":"uint16"},{"indexed":true,"internalType":"uint16","name":"_siblingTokenId","type":"uint16"},{"indexed":true,"internalType":"address","name":"_claimer","type":"address"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEV_MINT_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_MAX_PER_PHASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVENANCE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"allowListAdopt","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"babyParents","outputs":[{"internalType":"uint16","name":"punkTokenId","type":"uint16"},{"internalType":"uint16","name":"baycTokenId","type":"uint16"},{"internalType":"bool","name":"isProposerPunk","type":"bool"},{"internalType":"bool","name":"proposerClaimed","type":"bool"},{"internalType":"bool","name":"hasParents","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"baycId","type":"uint16"}],"name":"baycBred","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"proposerAddress","type":"address"},{"internalType":"uint16","name":"proposerTokenId","type":"uint16"},{"internalType":"bool","name":"isProposerPunk","type":"bool"},{"internalType":"uint32","name":"expireAt","type":"uint32"}],"internalType":"struct RichBaby.MatingRequest","name":"matingRequest","type":"tuple"},{"internalType":"uint16","name":"acceptorTokenId","type":"uint16"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"breed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"siblingId","type":"uint16"}],"name":"claimBaby","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"latestRefundableMintTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum RichBaby.SalePhase","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"mintedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"publicAdopt","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"punkId","type":"uint16"}],"name":"punkBred","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startTokenId","type":"uint256"}],"name":"refundWithStartTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"uint64","name":"price","type":"uint64"},{"internalType":"enum RichBaby.SalePhase","name":"phase","type":"uint8"}],"stateMutability":"view","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":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"provenance","type":"bytes32"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"uint64","name":"price","type":"uint64"},{"internalType":"enum RichBaby.SalePhase","name":"phase","type":"uint8"}],"internalType":"struct RichBaby.SaleConfig","name":"_saleConfig","type":"tuple"}],"name":"setSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSignerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"price","type":"uint64"},{"internalType":"uint64","name":"startTime","type":"uint64"}],"name":"startAllowlistSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"startTime","type":"uint64"}],"name":"startBreedSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"price","type":"uint64"},{"internalType":"uint64","name":"startTime","type":"uint64"}],"name":"startPublicSale","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":"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101c06040523480156200001257600080fd5b5060405162003f8838038062003f88833981016040819052620000359162000314565b6040518060400160405280600981526020016852696368204261627960b81b815250604051806040016040528060018152602001603160f81b815250826040518060400160405280600981526020016852696368204261627960b81b815250604051806040016040528060048152602001634241425960e01b8152508160029080519060200190620000c992919062000251565b508051620000df90600390602084019062000251565b506000805550506001600160401b03166080524260085581516020808401919091208251918301919091206101008290526101208190524660c0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200018b8184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b60a0523060601b60e0526101405250620001b19250620001ab9150503390565b620001ff565b50606093841b6001600160601b0319908116610180529290931b9091166101a052600d80546001600160a01b0319166001600160a01b0390921691909117905561ffff1661016052620003d9565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200025f906200039c565b90600052602060002090601f016020900481019282620002835760008555620002ce565b82601f106200029e57805160ff1916838001178555620002ce565b82800160010185558215620002ce579182015b82811115620002ce578251825591602001919060010190620002b1565b50620002dc929150620002e0565b5090565b5b80821115620002dc5760008155600101620002e1565b80516001600160a01b03811681146200030f57600080fd5b919050565b600080600080600060a086880312156200032d57600080fd5b6200033886620002f7565b94506200034860208701620002f7565b93506200035860408701620002f7565b9250606086015161ffff811681146200037057600080fd5b60808701519092506001600160401b03811681146200038e57600080fd5b809150509295509295909350565b600181811c90821680620003b157607f821691505b60208210811415620003d357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05160601c610100516101205161014051610160516101805160601c6101a05160601c613b1c6200046c6000396000612928015260006128300152600081816104560152610be90152600061303f0152600061308e0152600061306901526000612fc201526000612fec01526000613016015260008181610efe01526113bf0152613b1c6000f3fe6080604052600436106102675760003560e01c806370a0823111610144578063b88d4fde116100b6578063e3d8ed701161007a578063e3d8ed70146107c7578063e985e9c5146107da578063f0b57a6a14610823578063f146094014610843578063f2fde38b14610863578063fd1cb9301461088357600080fd5b8063b88d4fde14610727578063c399854814610747578063c706410a14610767578063c87b56dd14610787578063d041e31d146107a757600080fd5b806395d89b411161010857806395d89b411461068657806397346f511461069b578063a1f1245d146106b1578063a22cb465146106d1578063ac7a3e73146106f1578063adf2131b1461071157600080fd5b806370a08231146105d7578063715018a6146105f757806382921cff1461060c5780638da5cb5b1461062157806390aa0b0f1461063f57600080fd5b8063278ecde1116101dd57806355f804b3116101a157806355f804b31461052c578063627804af1461054c5780636282f4381461056c5780636352211e1461058c5780636373a6b1146105ac5780636c0360eb146105c257600080fd5b8063278ecde11461040457806342842e0e1461042457806345c0f5331461044457806349a4dfd51461047857806351cff8d91461050c57600080fd5b8063095ea7b31161022f578063095ea7b3146103305780630fb6f4bd14610350578063113fcbe21461039657806318160ddd146103ab5780631cd4ad28146103c457806323b872dd146103e457600080fd5b806301ffc9a71461026c578063046dc166146102a157806306fdde03146102c357806307395ce3146102e5578063081812fc146102f8575b600080fd5b34801561027857600080fd5b5061028c61028736600461341a565b6108a3565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004613252565b6108f5565b005b3480156102cf57600080fd5b506102d861094a565b6040516102989190613762565b6102c16102f3366004613577565b6109dc565b34801561030457600080fd5b50610318610313366004613401565b610c76565b6040516001600160a01b039091168152602001610298565b34801561033c57600080fd5b506102c161034b3660046133ba565b610cba565b34801561035c57600080fd5b5061038861036b366004613454565b601060209081526000928352604080842090915290825290205481565b604051908152602001610298565b3480156103a257600080fd5b5061038860fa81565b3480156103b757600080fd5b5060015460005403610388565b3480156103d057600080fd5b506102c16103df3660046135f4565b610d48565b3480156103f057600080fd5b506102c16103ff3660046132c5565b610dfe565b34801561041057600080fd5b506102c161041f366004613401565b610e09565b34801561043057600080fd5b506102c161043f3660046132c5565b610eb7565b34801561045057600080fd5b506103887f000000000000000000000000000000000000000000000000000000000000000081565b34801561048457600080fd5b506104d6610493366004613401565b60136020526000908152604090205461ffff808216916201000081049091169060ff6401000000008204811691600160281b8104821691600160301b9091041685565b6040805161ffff96871681529590941660208601529115159284019290925290151560608301521515608082015260a001610298565b34801561051857600080fd5b506102c1610527366004613252565b610ed2565b34801561053857600080fd5b506102c1610547366004613472565b610f82565b34801561055857600080fd5b506102c16105673660046133ba565b610fbf565b34801561057857600080fd5b506102c1610587366004613522565b61106d565b34801561059857600080fd5b506103186105a7366004613401565b6110a4565b3480156105b857600080fd5b50610388600e5481565b3480156105ce57600080fd5b506102d86110b6565b3480156105e357600080fd5b506103886105f2366004613252565b611144565b34801561060357600080fd5b506102c1611192565b34801561061857600080fd5b50610388600281565b34801561062d57600080fd5b50600a546001600160a01b0316610318565b34801561064b57600080fd5b50601154610677906001600160401b0380821691600160401b810490911690600160801b900460ff1683565b6040516102989392919061380f565b34801561069257600080fd5b506102d86111c8565b3480156106a757600080fd5b5061038860085481565b3480156106bd57600080fd5b506102c16106cc3660046135f4565b6111d7565b3480156106dd57600080fd5b506102c16106ec366004613385565b611229565b3480156106fd57600080fd5b506102c161070c366004613555565b6112bf565b34801561071d57600080fd5b50610388600b5481565b34801561073357600080fd5b506102c1610742366004613306565b611463565b34801561075357600080fd5b506102c16107623660046134ba565b6114ae565b34801561077357600080fd5b506102c161078236600461353a565b611803565b34801561079357600080fd5b506102d86107a2366004613401565b611a7c565b3480156107b357600080fd5b5061028c6107c236600461353a565b611aff565b6102c16107d5366004613577565b611b2e565b3480156107e657600080fd5b5061028c6107f536600461328c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561082f57600080fd5b506102c161083e366004613401565b611c8f565b34801561084f57600080fd5b5061028c61085e36600461353a565b611cbe565b34801561086f57600080fd5b506102c161087e366004613252565b611ccf565b34801561088f57600080fd5b506102c161089e3660046135d7565b611d6a565b60006001600160e01b031982166380ac58cd60e01b14806108d457506001600160e01b03198216635b5e139f60e01b145b806108ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600a546001600160a01b031633146109285760405162461bcd60e51b815260040161091f906137ac565b60405180910390fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b606060028054610959906138f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610985906138f8565b80156109d25780601f106109a7576101008083540402835291602001916109d2565b820191906000526020600020905b8154815290600101906020018083116109b557829003601f168201915b5050505050905090565b3233146109fb5760405162461bcd60e51b815260040161091f90613775565b600380601154600160801b900460ff166003811115610a1c57610a1c613988565b148015610a3457506011546001600160401b03164210155b610a505760405162461bcd60e51b815260040161091f906137e1565b6011546003908690600160401b90046001600160401b031681023414610aab5760405162461bcd60e51b815260206004820152601060248201526f24b731b7b93932b1ba10383934b1b29760811b604482015260640161091f565b610ab6600388611dd9565b600d54604080516020601f88018190048102820181019092528681526001600160a01b0390921691610b9c91889088908190840183828082843760009201919091525050604051657075626c696360d01b60208201526bffffffffffffffffffffffff193360601b166026820152603a81018c9052610b969250605a0190505b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90611ec0565b6001600160a01b031614610be75760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640161091f565b7f000000000000000000000000000000000000000000000000000000000000000087600054011115610c515760405162461bcd60e51b815260206004820152601360248201527226b0bc1039bab838363c903932b0b1b432b21760691b604482015260640161091f565b610c6d3388604051806020016040528060008152506000611ee4565b50505050505050565b6000610c8182612092565b610c9e576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610cc5826110a4565b9050806001600160a01b0316836001600160a01b03161415610cfa5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d1a5750610d1881336107f5565b155b15610d38576040516367d9dca160e11b815260040160405180910390fd5b610d438383836120bd565b505050565b600a546001600160a01b03163314610d725760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b0380841682528416602082015290810160025b905280516011805460208401516001600160401b03908116600160401b026001600160801b031990921693169290921791909117808255604083015190829060ff60801b1916600160801b836003811115610df357610df3613988565b021790555050505050565b610d43838383612119565b805b6000818152600960209081526040918290208251608081018452905464ffffffffff8116808352600160281b82046001600160a01b031693830193909352600160c81b810465ffffffffffff1693820193909352600160f81b90920460ff166060830152610e945760008211610e815750610e9e565b81610e8b816138e1565b92505050610e0b565b610d4383836112bf565b60405163098c3d6960e01b815260040160405180910390fd5b610d4383838360405180602001604052806000815250611463565b600a546001600160a01b03163314610efc5760405162461bcd60e51b815260040161091f906137ac565b7f0000000000000000000000000000000000000000000000000000000000000000600854610f2a9190613853565b421015610f495760405162fd1bd560e01b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f7e573d6000803e3d6000fd5b5050565b600a546001600160a01b03163314610fac5760405162461bcd60e51b815260040161091f906137ac565b8051610f7e90600c9060208401906130dc565b600a546001600160a01b03163314610fe95760405162461bcd60e51b815260040161091f906137ac565b60fa81600b54610ff99190613853565b11156110475760405162461bcd60e51b815260206004820152601860248201527f546f6f206d616e792062616269657320746f206d696e742e0000000000000000604482015260640161091f565b600b80548201905560408051602081019091526000808252610f7e918491849190611ee4565b600a546001600160a01b031633146110975760405162461bcd60e51b815260040161091f906137ac565b806011610d4382826139ca565b60006110af82612320565b5192915050565b600c80546110c3906138f8565b80601f01602080910402602001604051908101604052809291908181526020018280546110ef906138f8565b801561113c5780601f106111115761010080835404028352916020019161113c565b820191906000526020600020905b81548152906001019060200180831161111f57829003601f168201915b505050505081565b60006001600160a01b03821661116d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600a546001600160a01b031633146111bc5760405162461bcd60e51b815260040161091f906137ac565b6111c6600061243a565b565b606060038054610959906138f8565b600a546001600160a01b031633146112015760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b038084168252841660208201529081016003610d96565b6001600160a01b0382163314156112535760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112c8826110a4565b6001600160a01b0316336001600160a01b0316146112f85760405162c65b0f60e41b815260040160405180910390fd5b8082101561131957604051633290cfa160e11b815260040160405180910390fd5b6000818152600960209081526040918290208251608081018452905464ffffffffff81168252600160281b81046001600160a01b0316928201839052600160c81b810465ffffffffffff1693820193909352600160f81b90920460ff16606083015233141580611399575061138e828461389e565b816060015160ff1611155b156113b75760405163d4b04ee560e01b815260040160405180910390fd5b80516113eb907f00000000000000000000000000000000000000000000000000000000000000009064ffffffffff16613853565b42111561140b57604051637e9493f160e01b815260040160405180910390fd5b6114148361248c565b604081015133906108fc906114359065ffffffffffff16633b9aca0061387f565b6040518115909202916000818181858888f1935050505015801561145d573d6000803e3d6000fd5b50505050565b61146e848484612119565b6001600160a01b0383163b15158015611490575061148e84848484612606565b155b1561145d576040516368d2bf6b60e11b815260040160405180910390fd5b3233146114cd5760405162461bcd60e51b815260040161091f90613775565b600180601154600160801b900460ff1660038111156114ee576114ee613988565b14801561150657506011546001600160401b03164210155b6115225760405162461bcd60e51b815260040161091f906137e1565b61152d8584846126fe565b600080808061154260608a0160408b016133e6565b156115735761155760408a0160208b0161353a565b935061156660208a018a613252565b915087925033905061159b565b87935033915061158960408a0160208b0161353a565b925061159860208a018a613252565b90505b6115a484611aff565b156115f15760405162461bcd60e51b815260206004820152601960248201527f50756e6b20616c72656164792062726564206120626162792e00000000000000604482015260640161091f565b6115fa83611cbe565b156116475760405162461bcd60e51b815260206004820152601960248201527f4261796320616c72656164792062726564206120626162792e00000000000000604482015260640161091f565b611678600285025b600881901c60ff9081166000908152600f6020526040902080546001939092169290921b179055565b6116876002840260010161164f565b611691848361280b565b61169b8382612903565b6000546040805160a08101825261ffff80881682528616602082015290818101906116cc9060608e01908e016133e6565b1515815260006020808301829052600160409384015261ffff808616835260138252918390208451815492860151868601516060808901516080909901511515600160301b0266ff00000000000019991515600160281b0265ff000000000019931515640100000000029390931665ffff0000000019948916620100000263ffffffff199098169589169590951796909617929092169290921791909117959095169190911790558b169161178691908d01908d016133e6565b151561179860408d0160208e0161353a565b6040805133815261ffff868116602083015292909216917fa27697ec51ff20ed07c212bfd8d5dcd58c507debcb21a19a4217c9d571eadd11910160405180910390a46117f7336001604051806020016040528060008152506000611ee4565b50505050505050505050565b3233146118225760405162461bcd60e51b815260040161091f90613775565b600180601154600160801b900460ff16600381111561184357611843613988565b14801561185b57506011546001600160401b03164210155b6118775760405162461bcd60e51b815260040161091f906137e1565b61ffff821660009081526013602052604090208054600160301b900460ff166118db5760405162461bcd60e51b81526020600482015260166024820152752737903130b13c903a379031329031b630b4b6b2b21760511b604482015260640161091f565b8054640100000000900460ff16156119025780546118fd9061ffff163361280b565b611918565b80546119189062010000900461ffff1633612903565b8054600160281b900460ff16156119695760405162461bcd60e51b81526020600482015260156024820152742130b13c9030b63932b0b23c9031b630b4b6b2b21760591b604482015260640161091f565b8054600160281b65ff000000000019808316821784556000805461ffff80821680845260136020526040808520805498841661ffff198a16811782558a5463ffffffff19909a161762010000998a9004851690990298909817808955895464ff0000000019821660ff64010000000092839004811615159092029081178b558b5465ffff0000000019909316981697909717908890048716151590970296909617808855885466ff00000000000019909116600160301b918290049096161515029490941790955592519293339390881692917fb20e384879a8a85d03858ec4a8b0cdd1ae96561521e11b182107f78842b1bbbd91a461145d336001604051806020016040528060008152506000611ee4565b6060611a8782612092565b611aa457604051630a14c4b560e41b815260040160405180910390fd5b600c8054611ab1906138f8565b15159050611ace57604051806020016040528060008152506108ef565b600c611ad983612959565b604051602001611aea92919061366a565b60405160208183030381529060405292915050565b60006108ef600283025b60ff600882901c81166000908152600f60205260409020546001919092161b16151590565b323314611b4d5760405162461bcd60e51b815260040161091f90613775565b600280601154600160801b900460ff166003811115611b6e57611b6e613988565b148015611b8657506011546001600160401b03164210155b611ba25760405162461bcd60e51b815260040161091f906137e1565b6011546002908690600160401b90046001600160401b031681023414611bfd5760405162461bcd60e51b815260206004820152601060248201526f24b731b7b93932b1ba10383934b1b29760811b604482015260640161091f565b611c08600288611dd9565b600d54604080516020601f88018190048102820181019092528681526001600160a01b0390921691610b9c9188908890819084018382808284376000920191909152505060405168185b1b1bdddb1a5cdd60ba1b60208201526bffffffffffffffffffffffff193360601b166029820152603d81018c9052610b969250605d019050610b36565b600a546001600160a01b03163314611cb95760405162461bcd60e51b815260040161091f906137ac565b600e55565b60006108ef60028302600101611b09565b600a546001600160a01b03163314611cf95760405162461bcd60e51b815260040161091f906137ac565b6001600160a01b038116611d5e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161091f565b611d678161243a565b50565b600a546001600160a01b03163314611d945760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b03929092168083526000602084015260019290910191909152601180546001600160881b031916909117600160801b179055565b60028160106000856003811115611df257611df2613988565b6003811115611e0357611e03613988565b815260208082019290925260409081016000908120338252909252902054011115611e705760405162461bcd60e51b815260206004820152601960248201527f546f6f206d616e792062616269657320746f2061646f70742e00000000000000604482015260640161091f565b8060106000846003811115611e8757611e87613988565b6003811115611e9857611e98613988565b8152602080820192909252604090810160009081203382529092529020805490910190555050565b6000806000611ecf8585612a56565b91509150611edc81612ac6565b509392505050565b6000546001600160a01b038516611f0d57604051622e076360e81b815260040160405180910390fd5b83611f2b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015611fce57506001600160a01b0387163b15155b15612045575b60405182906001600160a01b03891690600090600080516020613ac7833981519152908290a461200d6000888480600101955088612606565b61202a576040516368d2bf6b60e11b815260040160405180910390fd5b80821415611fd457826000541461204057600080fd5b612079565b5b6040516001830192906001600160a01b03891690600090600080516020613ac7833981519152908290a480821415612046575b50600090815561208b90868387612c81565b5050505050565b60008054821080156108ef575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061212482612320565b80519091506000906001600160a01b0316336001600160a01b031614806121525750815161215290336107f5565b8061216d57503361216284610c76565b6001600160a01b0316145b90508061218d57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146121c25760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166121e957604051633a954ecd60e21b815260040160405180910390fd5b6121f960008484600001516120bd565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166122e3576000548110156122e357825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b0316600080516020613ac783398151915260405160405180910390a461208b8585856001612c81565b60408051606081018252600080825260208201819052918101919091528160005481101561242157600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615159181018290529061241f5780516001600160a01b0316156123b6579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561241a579392505050565b6123b6565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061249782612320565b90506124a960008383600001516120bd565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff1981166001600160401b0391821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b19169390931790559085018083529120549091166125c0576000548110156125c057815160008281526004602090815260409091208054918501516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b0390911690600080516020613ac7833981519152908390a480516125fa906000846001612c81565b50506001805481019055565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061263b903390899088908890600401613725565b602060405180830381600087803b15801561265557600080fd5b505af1925050508015612685575060408051601f3d908101601f1916820190925261268291810190613437565b60015b6126e0573d8080156126b3576040519150601f19603f3d011682016040523d82523d6000602084013e6126b8565b606091505b5080516126d8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b4261270f60808501606086016135b1565b63ffffffff1610156127635760405162461bcd60e51b815260206004820152601760248201527f4d6174696e67207265717565737420657870697265642e000000000000000000604482015260640161091f565b6127706020840184613252565b6001600160a01b03166127c161278585612d7d565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ec092505050565b6001600160a01b031614610d435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21039b4b3b0ba3ab9329760791b604482015260640161091f565b604051630b02f02d60e31b815261ffff831660048201526001600160a01b03808316917f0000000000000000000000000000000000000000000000000000000000000000909116906358178168906024015b60206040518083038186803b15801561287557600080fd5b505afa158015612889573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ad919061326f565b6001600160a01b031614610f7e5760405162461bcd60e51b815260206004820181905260248201527f4164647265737320646f6573206e6f74206f776e207468697320746f6b656e2e604482015260640161091f565b6040516331a9108f60e11b815261ffff831660048201526001600160a01b03808316917f000000000000000000000000000000000000000000000000000000000000000090911690636352211e9060240161285d565b60608161297d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129a757806129918161392d565b91506129a09050600a8361386b565b9150612981565b6000816001600160401b038111156129c1576129c16139b4565b6040519080825280601f01601f1916602001820160405280156129eb576020820181803683370190505b5090505b84156126f657612a0060018361389e565b9150612a0d600a86613948565b612a18906030613853565b60f81b818381518110612a2d57612a2d61399e565b60200101906001600160f81b031916908160001a905350612a4f600a8661386b565b94506129ef565b600080825160411415612a8d5760208301516040840151606085015160001a612a8187828585612e41565b94509450505050612abf565b825160401415612ab75760208301516040840151612aac868383612f2e565b935093505050612abf565b506000905060025b9250929050565b6000816004811115612ada57612ada613988565b1415612ae35750565b6001816004811115612af757612af7613988565b1415612b455760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161091f565b6002816004811115612b5957612b59613988565b1415612ba75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161091f565b6003816004811115612bbb57612bbb613988565b1415612c145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161091f565b6004816004811115612c2857612c28613988565b1415611d675760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161091f565b6001600160a01b038416158015612c985750600034115b1561145d576040805160808101825264ffffffffff421681526001600160a01b0385166020820152908101633b9aca00612cd2843461386b565b612cdc919061386b565b65ffffffffffff908116825260ff93841660209283015260009485526009825260409485902083518154938501519685015160609095015164ffffffffff9091166001600160c81b031990941693909317600160281b6001600160a01b0390971696909602959095176001600160c81b0316600160c81b93909116929092026001600160f81b031691909117600160f81b9190921602179055505042600855565b600080612e3a7f17f2ee6fc979f181d5736722fb0182fddbc48422a55b561d631bf7d08d483947612db16020860186613252565b612dc1604087016020880161353a565b612dd160608801604089016133e6565b612de16080890160608a016135b1565b6040805160208101969096526001600160a01b039094169385019390935261ffff90911660608401521515608083015263ffffffff1660a082015260c00160405160208183030381529060405280519060200120612f67565b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612e785750600090506003612f25565b8460ff16601b14158015612e9057508460ff16601c14155b15612ea15750600090506004612f25565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612ef5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f1e57600060019250925050612f25565b9150600090505b94509492505050565b6000806001600160ff1b03831681612f4b60ff86901c601b613853565b9050612f5987828885612e41565b935093505050935093915050565b60006108ef612f74612fb5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561300e57507f000000000000000000000000000000000000000000000000000000000000000046145b1561303857507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8280546130e8906138f8565b90600052602060002090601f01602090048101928261310a5760008555613150565b82601f1061312357805160ff1916838001178555613150565b82800160010185558215613150579182015b82811115613150578251825591602001919060010190613135565b5061315c929150613160565b5090565b5b8082111561315c5760008155600101613161565b60006001600160401b038084111561318f5761318f6139b4565b604051601f8501601f19908116603f011681019082821181831017156131b7576131b76139b4565b816040528093508581528686860111156131d057600080fd5b858560208301376000602087830101525050509392505050565b803580151581146131fa57600080fd5b919050565b60008083601f84011261321157600080fd5b5081356001600160401b0381111561322857600080fd5b602083019150836020828501011115612abf57600080fd5b803561ffff811681146131fa57600080fd5b60006020828403121561326457600080fd5b8135612e3a81613a79565b60006020828403121561328157600080fd5b8151612e3a81613a79565b6000806040838503121561329f57600080fd5b82356132aa81613a79565b915060208301356132ba81613a79565b809150509250929050565b6000806000606084860312156132da57600080fd5b83356132e581613a79565b925060208401356132f581613a79565b929592945050506040919091013590565b6000806000806080858703121561331c57600080fd5b843561332781613a79565b9350602085013561333781613a79565b92506040850135915060608501356001600160401b0381111561335957600080fd5b8501601f8101871361336a57600080fd5b61337987823560208401613175565b91505092959194509250565b6000806040838503121561339857600080fd5b82356133a381613a79565b91506133b1602084016131ea565b90509250929050565b600080604083850312156133cd57600080fd5b82356133d881613a79565b946020939093013593505050565b6000602082840312156133f857600080fd5b612e3a826131ea565b60006020828403121561341357600080fd5b5035919050565b60006020828403121561342c57600080fd5b8135612e3a81613a8e565b60006020828403121561344957600080fd5b8151612e3a81613a8e565b6000806040838503121561346757600080fd5b82356132aa81613aa4565b60006020828403121561348457600080fd5b81356001600160401b0381111561349a57600080fd5b8201601f810184136134ab57600080fd5b6126f684823560208401613175565b60008060008084860360c08112156134d157600080fd5b60808112156134df57600080fd5b508493506134ef60808601613240565b925060a08501356001600160401b0381111561350a57600080fd5b613516878288016131ff565b95989497509550505050565b60006060828403121561353457600080fd5b50919050565b60006020828403121561354c57600080fd5b612e3a82613240565b6000806040838503121561356857600080fd5b50508035926020909101359150565b6000806000806060858703121561358d57600080fd5b843593506020850135925060408501356001600160401b0381111561350a57600080fd5b6000602082840312156135c357600080fd5b813563ffffffff81168114612e3a57600080fd5b6000602082840312156135e957600080fd5b8135612e3a81613ab1565b6000806040838503121561360757600080fd5b823561361281613ab1565b915060208301356132ba81613ab1565b6000815180845261363a8160208601602086016138b5565b601f01601f19169290920160200192915050565b600081516136608185602086016138b5565b9290920192915050565b600080845481600182811c91508083168061368657607f831692505b60208084108214156136a657634e487b7160e01b86526022600452602486fd5b8180156136ba57600181146136cb576136f8565b60ff198616895284890196506136f8565b60008b81526020902060005b868110156136f05781548b8201529085019083016136d7565b505084890196505b50505050505061371c61370b828661364e565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375890830184613622565b9695505050505050565b602081526000612e3a6020830184613622565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527329b0b63290383430b9b29036b4b9b6b0ba31b41760611b604082015260600190565b6001600160401b03848116825283166020820152606081016004831061384557634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b600082198211156138665761386661395c565b500190565b60008261387a5761387a613972565b500490565b60008160001904831182151516156138995761389961395c565b500290565b6000828210156138b0576138b061395c565b500390565b60005b838110156138d05781810151838201526020016138b8565b8381111561145d5750506000910152565b6000816138f0576138f061395c565b506000190190565b600181811c9082168061390c57607f821691505b6020821081141561353457634e487b7160e01b600052602260045260246000fd5b60006000198214156139415761394161395c565b5060010190565b60008261395757613957613972565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b81356139d581613ab1565b6001600160401b03811690508154816001600160401b031982161783556020840135613a0081613ab1565b6fffffffffffffffff0000000000000000604091821b166001600160801b0319831684178117855590850135613a3581613aa4565b60048110613a5357634e487b7160e01b600052602160045260246000fd5b6001600160881b0319929092169092179190911760809190911b60ff60801b1617905550565b6001600160a01b0381168114611d6757600080fd5b6001600160e01b031981168114611d6757600080fd5b60048110611d6757600080fd5b6001600160401b0381168114611d6757600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122007c754e2700559b9033e91b77991e4bbbc436192922fcab4abc15297df84c3a464736f6c63430008070033000000000000000000000000b47e3cd837ddf8e4c57f05d70ab865de6e193bbb000000000000000000000000bc4ca0eda7647a8ab7c2061c2e118a18a936f13d000000000000000000000000c985e28945e5d34953a427161094664193bb81a000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000093a80
Deployed Bytecode
0x6080604052600436106102675760003560e01c806370a0823111610144578063b88d4fde116100b6578063e3d8ed701161007a578063e3d8ed70146107c7578063e985e9c5146107da578063f0b57a6a14610823578063f146094014610843578063f2fde38b14610863578063fd1cb9301461088357600080fd5b8063b88d4fde14610727578063c399854814610747578063c706410a14610767578063c87b56dd14610787578063d041e31d146107a757600080fd5b806395d89b411161010857806395d89b411461068657806397346f511461069b578063a1f1245d146106b1578063a22cb465146106d1578063ac7a3e73146106f1578063adf2131b1461071157600080fd5b806370a08231146105d7578063715018a6146105f757806382921cff1461060c5780638da5cb5b1461062157806390aa0b0f1461063f57600080fd5b8063278ecde1116101dd57806355f804b3116101a157806355f804b31461052c578063627804af1461054c5780636282f4381461056c5780636352211e1461058c5780636373a6b1146105ac5780636c0360eb146105c257600080fd5b8063278ecde11461040457806342842e0e1461042457806345c0f5331461044457806349a4dfd51461047857806351cff8d91461050c57600080fd5b8063095ea7b31161022f578063095ea7b3146103305780630fb6f4bd14610350578063113fcbe21461039657806318160ddd146103ab5780631cd4ad28146103c457806323b872dd146103e457600080fd5b806301ffc9a71461026c578063046dc166146102a157806306fdde03146102c357806307395ce3146102e5578063081812fc146102f8575b600080fd5b34801561027857600080fd5b5061028c61028736600461341a565b6108a3565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004613252565b6108f5565b005b3480156102cf57600080fd5b506102d861094a565b6040516102989190613762565b6102c16102f3366004613577565b6109dc565b34801561030457600080fd5b50610318610313366004613401565b610c76565b6040516001600160a01b039091168152602001610298565b34801561033c57600080fd5b506102c161034b3660046133ba565b610cba565b34801561035c57600080fd5b5061038861036b366004613454565b601060209081526000928352604080842090915290825290205481565b604051908152602001610298565b3480156103a257600080fd5b5061038860fa81565b3480156103b757600080fd5b5060015460005403610388565b3480156103d057600080fd5b506102c16103df3660046135f4565b610d48565b3480156103f057600080fd5b506102c16103ff3660046132c5565b610dfe565b34801561041057600080fd5b506102c161041f366004613401565b610e09565b34801561043057600080fd5b506102c161043f3660046132c5565b610eb7565b34801561045057600080fd5b506103887f000000000000000000000000000000000000000000000000000000000000271081565b34801561048457600080fd5b506104d6610493366004613401565b60136020526000908152604090205461ffff808216916201000081049091169060ff6401000000008204811691600160281b8104821691600160301b9091041685565b6040805161ffff96871681529590941660208601529115159284019290925290151560608301521515608082015260a001610298565b34801561051857600080fd5b506102c1610527366004613252565b610ed2565b34801561053857600080fd5b506102c1610547366004613472565b610f82565b34801561055857600080fd5b506102c16105673660046133ba565b610fbf565b34801561057857600080fd5b506102c1610587366004613522565b61106d565b34801561059857600080fd5b506103186105a7366004613401565b6110a4565b3480156105b857600080fd5b50610388600e5481565b3480156105ce57600080fd5b506102d86110b6565b3480156105e357600080fd5b506103886105f2366004613252565b611144565b34801561060357600080fd5b506102c1611192565b34801561061857600080fd5b50610388600281565b34801561062d57600080fd5b50600a546001600160a01b0316610318565b34801561064b57600080fd5b50601154610677906001600160401b0380821691600160401b810490911690600160801b900460ff1683565b6040516102989392919061380f565b34801561069257600080fd5b506102d86111c8565b3480156106a757600080fd5b5061038860085481565b3480156106bd57600080fd5b506102c16106cc3660046135f4565b6111d7565b3480156106dd57600080fd5b506102c16106ec366004613385565b611229565b3480156106fd57600080fd5b506102c161070c366004613555565b6112bf565b34801561071d57600080fd5b50610388600b5481565b34801561073357600080fd5b506102c1610742366004613306565b611463565b34801561075357600080fd5b506102c16107623660046134ba565b6114ae565b34801561077357600080fd5b506102c161078236600461353a565b611803565b34801561079357600080fd5b506102d86107a2366004613401565b611a7c565b3480156107b357600080fd5b5061028c6107c236600461353a565b611aff565b6102c16107d5366004613577565b611b2e565b3480156107e657600080fd5b5061028c6107f536600461328c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561082f57600080fd5b506102c161083e366004613401565b611c8f565b34801561084f57600080fd5b5061028c61085e36600461353a565b611cbe565b34801561086f57600080fd5b506102c161087e366004613252565b611ccf565b34801561088f57600080fd5b506102c161089e3660046135d7565b611d6a565b60006001600160e01b031982166380ac58cd60e01b14806108d457506001600160e01b03198216635b5e139f60e01b145b806108ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600a546001600160a01b031633146109285760405162461bcd60e51b815260040161091f906137ac565b60405180910390fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b606060028054610959906138f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610985906138f8565b80156109d25780601f106109a7576101008083540402835291602001916109d2565b820191906000526020600020905b8154815290600101906020018083116109b557829003601f168201915b5050505050905090565b3233146109fb5760405162461bcd60e51b815260040161091f90613775565b600380601154600160801b900460ff166003811115610a1c57610a1c613988565b148015610a3457506011546001600160401b03164210155b610a505760405162461bcd60e51b815260040161091f906137e1565b6011546003908690600160401b90046001600160401b031681023414610aab5760405162461bcd60e51b815260206004820152601060248201526f24b731b7b93932b1ba10383934b1b29760811b604482015260640161091f565b610ab6600388611dd9565b600d54604080516020601f88018190048102820181019092528681526001600160a01b0390921691610b9c91889088908190840183828082843760009201919091525050604051657075626c696360d01b60208201526bffffffffffffffffffffffff193360601b166026820152603a81018c9052610b969250605a0190505b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90611ec0565b6001600160a01b031614610be75760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21039b4b3b730ba3ab9329760711b604482015260640161091f565b7f000000000000000000000000000000000000000000000000000000000000271087600054011115610c515760405162461bcd60e51b815260206004820152601360248201527226b0bc1039bab838363c903932b0b1b432b21760691b604482015260640161091f565b610c6d3388604051806020016040528060008152506000611ee4565b50505050505050565b6000610c8182612092565b610c9e576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610cc5826110a4565b9050806001600160a01b0316836001600160a01b03161415610cfa5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d1a5750610d1881336107f5565b155b15610d38576040516367d9dca160e11b815260040160405180910390fd5b610d438383836120bd565b505050565b600a546001600160a01b03163314610d725760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b0380841682528416602082015290810160025b905280516011805460208401516001600160401b03908116600160401b026001600160801b031990921693169290921791909117808255604083015190829060ff60801b1916600160801b836003811115610df357610df3613988565b021790555050505050565b610d43838383612119565b805b6000818152600960209081526040918290208251608081018452905464ffffffffff8116808352600160281b82046001600160a01b031693830193909352600160c81b810465ffffffffffff1693820193909352600160f81b90920460ff166060830152610e945760008211610e815750610e9e565b81610e8b816138e1565b92505050610e0b565b610d4383836112bf565b60405163098c3d6960e01b815260040160405180910390fd5b610d4383838360405180602001604052806000815250611463565b600a546001600160a01b03163314610efc5760405162461bcd60e51b815260040161091f906137ac565b7f0000000000000000000000000000000000000000000000000000000000093a80600854610f2a9190613853565b421015610f495760405162fd1bd560e01b815260040160405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f7e573d6000803e3d6000fd5b5050565b600a546001600160a01b03163314610fac5760405162461bcd60e51b815260040161091f906137ac565b8051610f7e90600c9060208401906130dc565b600a546001600160a01b03163314610fe95760405162461bcd60e51b815260040161091f906137ac565b60fa81600b54610ff99190613853565b11156110475760405162461bcd60e51b815260206004820152601860248201527f546f6f206d616e792062616269657320746f206d696e742e0000000000000000604482015260640161091f565b600b80548201905560408051602081019091526000808252610f7e918491849190611ee4565b600a546001600160a01b031633146110975760405162461bcd60e51b815260040161091f906137ac565b806011610d4382826139ca565b60006110af82612320565b5192915050565b600c80546110c3906138f8565b80601f01602080910402602001604051908101604052809291908181526020018280546110ef906138f8565b801561113c5780601f106111115761010080835404028352916020019161113c565b820191906000526020600020905b81548152906001019060200180831161111f57829003601f168201915b505050505081565b60006001600160a01b03821661116d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600a546001600160a01b031633146111bc5760405162461bcd60e51b815260040161091f906137ac565b6111c6600061243a565b565b606060038054610959906138f8565b600a546001600160a01b031633146112015760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b038084168252841660208201529081016003610d96565b6001600160a01b0382163314156112535760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112c8826110a4565b6001600160a01b0316336001600160a01b0316146112f85760405162c65b0f60e41b815260040160405180910390fd5b8082101561131957604051633290cfa160e11b815260040160405180910390fd5b6000818152600960209081526040918290208251608081018452905464ffffffffff81168252600160281b81046001600160a01b0316928201839052600160c81b810465ffffffffffff1693820193909352600160f81b90920460ff16606083015233141580611399575061138e828461389e565b816060015160ff1611155b156113b75760405163d4b04ee560e01b815260040160405180910390fd5b80516113eb907f0000000000000000000000000000000000000000000000000000000000093a809064ffffffffff16613853565b42111561140b57604051637e9493f160e01b815260040160405180910390fd5b6114148361248c565b604081015133906108fc906114359065ffffffffffff16633b9aca0061387f565b6040518115909202916000818181858888f1935050505015801561145d573d6000803e3d6000fd5b50505050565b61146e848484612119565b6001600160a01b0383163b15158015611490575061148e84848484612606565b155b1561145d576040516368d2bf6b60e11b815260040160405180910390fd5b3233146114cd5760405162461bcd60e51b815260040161091f90613775565b600180601154600160801b900460ff1660038111156114ee576114ee613988565b14801561150657506011546001600160401b03164210155b6115225760405162461bcd60e51b815260040161091f906137e1565b61152d8584846126fe565b600080808061154260608a0160408b016133e6565b156115735761155760408a0160208b0161353a565b935061156660208a018a613252565b915087925033905061159b565b87935033915061158960408a0160208b0161353a565b925061159860208a018a613252565b90505b6115a484611aff565b156115f15760405162461bcd60e51b815260206004820152601960248201527f50756e6b20616c72656164792062726564206120626162792e00000000000000604482015260640161091f565b6115fa83611cbe565b156116475760405162461bcd60e51b815260206004820152601960248201527f4261796320616c72656164792062726564206120626162792e00000000000000604482015260640161091f565b611678600285025b600881901c60ff9081166000908152600f6020526040902080546001939092169290921b179055565b6116876002840260010161164f565b611691848361280b565b61169b8382612903565b6000546040805160a08101825261ffff80881682528616602082015290818101906116cc9060608e01908e016133e6565b1515815260006020808301829052600160409384015261ffff808616835260138252918390208451815492860151868601516060808901516080909901511515600160301b0266ff00000000000019991515600160281b0265ff000000000019931515640100000000029390931665ffff0000000019948916620100000263ffffffff199098169589169590951796909617929092169290921791909117959095169190911790558b169161178691908d01908d016133e6565b151561179860408d0160208e0161353a565b6040805133815261ffff868116602083015292909216917fa27697ec51ff20ed07c212bfd8d5dcd58c507debcb21a19a4217c9d571eadd11910160405180910390a46117f7336001604051806020016040528060008152506000611ee4565b50505050505050505050565b3233146118225760405162461bcd60e51b815260040161091f90613775565b600180601154600160801b900460ff16600381111561184357611843613988565b14801561185b57506011546001600160401b03164210155b6118775760405162461bcd60e51b815260040161091f906137e1565b61ffff821660009081526013602052604090208054600160301b900460ff166118db5760405162461bcd60e51b81526020600482015260166024820152752737903130b13c903a379031329031b630b4b6b2b21760511b604482015260640161091f565b8054640100000000900460ff16156119025780546118fd9061ffff163361280b565b611918565b80546119189062010000900461ffff1633612903565b8054600160281b900460ff16156119695760405162461bcd60e51b81526020600482015260156024820152742130b13c9030b63932b0b23c9031b630b4b6b2b21760591b604482015260640161091f565b8054600160281b65ff000000000019808316821784556000805461ffff80821680845260136020526040808520805498841661ffff198a16811782558a5463ffffffff19909a161762010000998a9004851690990298909817808955895464ff0000000019821660ff64010000000092839004811615159092029081178b558b5465ffff0000000019909316981697909717908890048716151590970296909617808855885466ff00000000000019909116600160301b918290049096161515029490941790955592519293339390881692917fb20e384879a8a85d03858ec4a8b0cdd1ae96561521e11b182107f78842b1bbbd91a461145d336001604051806020016040528060008152506000611ee4565b6060611a8782612092565b611aa457604051630a14c4b560e41b815260040160405180910390fd5b600c8054611ab1906138f8565b15159050611ace57604051806020016040528060008152506108ef565b600c611ad983612959565b604051602001611aea92919061366a565b60405160208183030381529060405292915050565b60006108ef600283025b60ff600882901c81166000908152600f60205260409020546001919092161b16151590565b323314611b4d5760405162461bcd60e51b815260040161091f90613775565b600280601154600160801b900460ff166003811115611b6e57611b6e613988565b148015611b8657506011546001600160401b03164210155b611ba25760405162461bcd60e51b815260040161091f906137e1565b6011546002908690600160401b90046001600160401b031681023414611bfd5760405162461bcd60e51b815260206004820152601060248201526f24b731b7b93932b1ba10383934b1b29760811b604482015260640161091f565b611c08600288611dd9565b600d54604080516020601f88018190048102820181019092528681526001600160a01b0390921691610b9c9188908890819084018382808284376000920191909152505060405168185b1b1bdddb1a5cdd60ba1b60208201526bffffffffffffffffffffffff193360601b166029820152603d81018c9052610b969250605d019050610b36565b600a546001600160a01b03163314611cb95760405162461bcd60e51b815260040161091f906137ac565b600e55565b60006108ef60028302600101611b09565b600a546001600160a01b03163314611cf95760405162461bcd60e51b815260040161091f906137ac565b6001600160a01b038116611d5e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161091f565b611d678161243a565b50565b600a546001600160a01b03163314611d945760405162461bcd60e51b815260040161091f906137ac565b604080516060810182526001600160401b03929092168083526000602084015260019290910191909152601180546001600160881b031916909117600160801b179055565b60028160106000856003811115611df257611df2613988565b6003811115611e0357611e03613988565b815260208082019290925260409081016000908120338252909252902054011115611e705760405162461bcd60e51b815260206004820152601960248201527f546f6f206d616e792062616269657320746f2061646f70742e00000000000000604482015260640161091f565b8060106000846003811115611e8757611e87613988565b6003811115611e9857611e98613988565b8152602080820192909252604090810160009081203382529092529020805490910190555050565b6000806000611ecf8585612a56565b91509150611edc81612ac6565b509392505050565b6000546001600160a01b038516611f0d57604051622e076360e81b815260040160405180910390fd5b83611f2b5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015611fce57506001600160a01b0387163b15155b15612045575b60405182906001600160a01b03891690600090600080516020613ac7833981519152908290a461200d6000888480600101955088612606565b61202a576040516368d2bf6b60e11b815260040160405180910390fd5b80821415611fd457826000541461204057600080fd5b612079565b5b6040516001830192906001600160a01b03891690600090600080516020613ac7833981519152908290a480821415612046575b50600090815561208b90868387612c81565b5050505050565b60008054821080156108ef575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061212482612320565b80519091506000906001600160a01b0316336001600160a01b031614806121525750815161215290336107f5565b8061216d57503361216284610c76565b6001600160a01b0316145b90508061218d57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146121c25760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166121e957604051633a954ecd60e21b815260040160405180910390fd5b6121f960008484600001516120bd565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166122e3576000548110156122e357825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b0316600080516020613ac783398151915260405160405180910390a461208b8585856001612c81565b60408051606081018252600080825260208201819052918101919091528160005481101561242157600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615159181018290529061241f5780516001600160a01b0316156123b6579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff161515928101929092521561241a579392505050565b6123b6565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061249782612320565b90506124a960008383600001516120bd565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff1981166001600160401b0391821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b19169390931790559085018083529120549091166125c0576000548110156125c057815160008281526004602090815260409091208054918501516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b0390911690600080516020613ac7833981519152908390a480516125fa906000846001612c81565b50506001805481019055565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061263b903390899088908890600401613725565b602060405180830381600087803b15801561265557600080fd5b505af1925050508015612685575060408051601f3d908101601f1916820190925261268291810190613437565b60015b6126e0573d8080156126b3576040519150601f19603f3d011682016040523d82523d6000602084013e6126b8565b606091505b5080516126d8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b4261270f60808501606086016135b1565b63ffffffff1610156127635760405162461bcd60e51b815260206004820152601760248201527f4d6174696e67207265717565737420657870697265642e000000000000000000604482015260640161091f565b6127706020840184613252565b6001600160a01b03166127c161278585612d7d565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ec092505050565b6001600160a01b031614610d435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21039b4b3b0ba3ab9329760791b604482015260640161091f565b604051630b02f02d60e31b815261ffff831660048201526001600160a01b03808316917f000000000000000000000000b47e3cd837ddf8e4c57f05d70ab865de6e193bbb909116906358178168906024015b60206040518083038186803b15801561287557600080fd5b505afa158015612889573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ad919061326f565b6001600160a01b031614610f7e5760405162461bcd60e51b815260206004820181905260248201527f4164647265737320646f6573206e6f74206f776e207468697320746f6b656e2e604482015260640161091f565b6040516331a9108f60e11b815261ffff831660048201526001600160a01b03808316917f000000000000000000000000bc4ca0eda7647a8ab7c2061c2e118a18a936f13d90911690636352211e9060240161285d565b60608161297d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129a757806129918161392d565b91506129a09050600a8361386b565b9150612981565b6000816001600160401b038111156129c1576129c16139b4565b6040519080825280601f01601f1916602001820160405280156129eb576020820181803683370190505b5090505b84156126f657612a0060018361389e565b9150612a0d600a86613948565b612a18906030613853565b60f81b818381518110612a2d57612a2d61399e565b60200101906001600160f81b031916908160001a905350612a4f600a8661386b565b94506129ef565b600080825160411415612a8d5760208301516040840151606085015160001a612a8187828585612e41565b94509450505050612abf565b825160401415612ab75760208301516040840151612aac868383612f2e565b935093505050612abf565b506000905060025b9250929050565b6000816004811115612ada57612ada613988565b1415612ae35750565b6001816004811115612af757612af7613988565b1415612b455760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161091f565b6002816004811115612b5957612b59613988565b1415612ba75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161091f565b6003816004811115612bbb57612bbb613988565b1415612c145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161091f565b6004816004811115612c2857612c28613988565b1415611d675760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161091f565b6001600160a01b038416158015612c985750600034115b1561145d576040805160808101825264ffffffffff421681526001600160a01b0385166020820152908101633b9aca00612cd2843461386b565b612cdc919061386b565b65ffffffffffff908116825260ff93841660209283015260009485526009825260409485902083518154938501519685015160609095015164ffffffffff9091166001600160c81b031990941693909317600160281b6001600160a01b0390971696909602959095176001600160c81b0316600160c81b93909116929092026001600160f81b031691909117600160f81b9190921602179055505042600855565b600080612e3a7f17f2ee6fc979f181d5736722fb0182fddbc48422a55b561d631bf7d08d483947612db16020860186613252565b612dc1604087016020880161353a565b612dd160608801604089016133e6565b612de16080890160608a016135b1565b6040805160208101969096526001600160a01b039094169385019390935261ffff90911660608401521515608083015263ffffffff1660a082015260c00160405160208183030381529060405280519060200120612f67565b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612e785750600090506003612f25565b8460ff16601b14158015612e9057508460ff16601c14155b15612ea15750600090506004612f25565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612ef5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f1e57600060019250925050612f25565b9150600090505b94509492505050565b6000806001600160ff1b03831681612f4b60ff86901c601b613853565b9050612f5987828885612e41565b935093505050935093915050565b60006108ef612f74612fb5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000306001600160a01b037f00000000000000000000000078fd3fa3ce045f59eb8c4dc7c21906295a8e3ab41614801561300e57507f000000000000000000000000000000000000000000000000000000000000000146145b1561303857507fbd78be999afd352793cb48cfc22c9c9eec194b306777c17181657839662c1cc390565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fba2a4cb769bdd056d911c9ad91e9f92f3cd84e151d956ae5c5d225fed581a339828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8280546130e8906138f8565b90600052602060002090601f01602090048101928261310a5760008555613150565b82601f1061312357805160ff1916838001178555613150565b82800160010185558215613150579182015b82811115613150578251825591602001919060010190613135565b5061315c929150613160565b5090565b5b8082111561315c5760008155600101613161565b60006001600160401b038084111561318f5761318f6139b4565b604051601f8501601f19908116603f011681019082821181831017156131b7576131b76139b4565b816040528093508581528686860111156131d057600080fd5b858560208301376000602087830101525050509392505050565b803580151581146131fa57600080fd5b919050565b60008083601f84011261321157600080fd5b5081356001600160401b0381111561322857600080fd5b602083019150836020828501011115612abf57600080fd5b803561ffff811681146131fa57600080fd5b60006020828403121561326457600080fd5b8135612e3a81613a79565b60006020828403121561328157600080fd5b8151612e3a81613a79565b6000806040838503121561329f57600080fd5b82356132aa81613a79565b915060208301356132ba81613a79565b809150509250929050565b6000806000606084860312156132da57600080fd5b83356132e581613a79565b925060208401356132f581613a79565b929592945050506040919091013590565b6000806000806080858703121561331c57600080fd5b843561332781613a79565b9350602085013561333781613a79565b92506040850135915060608501356001600160401b0381111561335957600080fd5b8501601f8101871361336a57600080fd5b61337987823560208401613175565b91505092959194509250565b6000806040838503121561339857600080fd5b82356133a381613a79565b91506133b1602084016131ea565b90509250929050565b600080604083850312156133cd57600080fd5b82356133d881613a79565b946020939093013593505050565b6000602082840312156133f857600080fd5b612e3a826131ea565b60006020828403121561341357600080fd5b5035919050565b60006020828403121561342c57600080fd5b8135612e3a81613a8e565b60006020828403121561344957600080fd5b8151612e3a81613a8e565b6000806040838503121561346757600080fd5b82356132aa81613aa4565b60006020828403121561348457600080fd5b81356001600160401b0381111561349a57600080fd5b8201601f810184136134ab57600080fd5b6126f684823560208401613175565b60008060008084860360c08112156134d157600080fd5b60808112156134df57600080fd5b508493506134ef60808601613240565b925060a08501356001600160401b0381111561350a57600080fd5b613516878288016131ff565b95989497509550505050565b60006060828403121561353457600080fd5b50919050565b60006020828403121561354c57600080fd5b612e3a82613240565b6000806040838503121561356857600080fd5b50508035926020909101359150565b6000806000806060858703121561358d57600080fd5b843593506020850135925060408501356001600160401b0381111561350a57600080fd5b6000602082840312156135c357600080fd5b813563ffffffff81168114612e3a57600080fd5b6000602082840312156135e957600080fd5b8135612e3a81613ab1565b6000806040838503121561360757600080fd5b823561361281613ab1565b915060208301356132ba81613ab1565b6000815180845261363a8160208601602086016138b5565b601f01601f19169290920160200192915050565b600081516136608185602086016138b5565b9290920192915050565b600080845481600182811c91508083168061368657607f831692505b60208084108214156136a657634e487b7160e01b86526022600452602486fd5b8180156136ba57600181146136cb576136f8565b60ff198616895284890196506136f8565b60008b81526020902060005b868110156136f05781548b8201529085019083016136d7565b505084890196505b50505050505061371c61370b828661364e565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375890830184613622565b9695505050505050565b602081526000612e3a6020830184613622565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527329b0b63290383430b9b29036b4b9b6b0ba31b41760611b604082015260600190565b6001600160401b03848116825283166020820152606081016004831061384557634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b600082198211156138665761386661395c565b500190565b60008261387a5761387a613972565b500490565b60008160001904831182151516156138995761389961395c565b500290565b6000828210156138b0576138b061395c565b500390565b60005b838110156138d05781810151838201526020016138b8565b8381111561145d5750506000910152565b6000816138f0576138f061395c565b506000190190565b600181811c9082168061390c57607f821691505b6020821081141561353457634e487b7160e01b600052602260045260246000fd5b60006000198214156139415761394161395c565b5060010190565b60008261395757613957613972565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b81356139d581613ab1565b6001600160401b03811690508154816001600160401b031982161783556020840135613a0081613ab1565b6fffffffffffffffff0000000000000000604091821b166001600160801b0319831684178117855590850135613a3581613aa4565b60048110613a5357634e487b7160e01b600052602160045260246000fd5b6001600160881b0319929092169092179190911760809190911b60ff60801b1617905550565b6001600160a01b0381168114611d6757600080fd5b6001600160e01b031981168114611d6757600080fd5b60048110611d6757600080fd5b6001600160401b0381168114611d6757600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122007c754e2700559b9033e91b77991e4bbbc436192922fcab4abc15297df84c3a464736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b47e3cd837ddf8e4c57f05d70ab865de6e193bbb000000000000000000000000bc4ca0eda7647a8ab7c2061c2e118a18a936f13d000000000000000000000000c985e28945e5d34953a427161094664193bb81a000000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000093a80
-----Decoded View---------------
Arg [0] : punkAddress (address): 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB
Arg [1] : baycAddress (address): 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
Arg [2] : _signerAddress (address): 0xc985E28945e5D34953A427161094664193Bb81a0
Arg [3] : _collectionSize (uint16): 10000
Arg [4] : _refundPeriod (uint64): 604800
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000b47e3cd837ddf8e4c57f05d70ab865de6e193bbb
Arg [1] : 000000000000000000000000bc4ca0eda7647a8ab7c2061c2e118a18a936f13d
Arg [2] : 000000000000000000000000c985e28945e5d34953a427161094664193bb81a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [4] : 0000000000000000000000000000000000000000000000000000000000093a80
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.