ERC-721
Overview
Max Total Supply
1,850 DADDY-O
Holders
713
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 DADDY-OLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Dads
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* ▄▄▄██ ████████████████▄▄▄▄ ▄█████████ █████████▀▀▀▀█████████▄ ▀████████ ▐███████▌ ▀████████▄ ▐███████ ▐███████▌ █████████▄ ▐███████ ▐███████▌ ▀████████▌ ▄▄▄▄ ▄▄▄ ▐███████ ▄▄▄▄ ▐███████▌ █████████▌ ▄█████▀▀█████▄▄ ▄█████▀▀███████████ ▄█████▀▀██████▄ ▐███████▌ █████████ ▐██████ ▐██████▄ ▄█████▌ ▀████████ ▄██████ ▐██████ ▐███████▌ █████████ ▐█████ ███████▌ ███████ ████████ ▐███████▌ ▀█████ ▐███████▌ ▐████████ ▄▄▄▄ ▐███████ ▐███████ ▐███████ ██████████▄▄ ▐███████▌ ▐███████▌ ▄███████▀█████████ ████████ ▐███████ ██████████████▄▄ ▐███████▌ ███████▌ ▄███████ ▐███████▌ ▐███████ ▐███████ ▀▀█████████████ ▐███████▌ ▄██████▀ ████████ ████████ ████████ ▐███████ ████▄ ▀▀███████▌ ▐████████▄ ▄██████▀ ████████ ████████ ███████▌ ▐███████ ███████ ▐██████▌ ▄██████████████████████▀ ▀███████▄ ▄█████████▄ ▀███████▄ ▄█████████ ▀██████▄ ██████▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀████▀▀▀ ▀▀▀▀▀▀▀▀ ▀▀▀████▀▀ ▀▀▀▀▀▀▀▀ ▀▀▀▀████▀▀▀▀ */ import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "./GenericCollection.sol"; contract Dads is ERC721A, ERC2981, Ownable { using Strings for uint256; error ContractMintDisallowedError(); error ExceedsMaxSupplyError(); error IncorrectAmountError(); error InsufficientListSpotsError(); error InvalidProofError(); error PerWalletMaximumExceededError(); error PublicSaleClosedError(); error SaleStateClosedError(); string public PROVENANCE_HASH; uint256 constant MAX_SUPPLY = 6000; uint256 constant MAX_PUBLIC_PER_WALLET = 2; enum SaleState { Closed, DadList, RaffleList, Public } SaleState public saleState = SaleState.Closed; uint256 public price = 0.09 ether; GenericCollection public fountCardCollection; uint256 constant FOUNT_CARD_ID = 1; bytes32 private dadListMerkleRoot; bytes32 private raffleMerkleRoot; mapping(address => uint256) private _dadListSpotsUsed; mapping(address => uint256) private _raffleSpotsUsed; mapping(address => uint256) private _publicMintsUsed; mapping(address => bool) private _fountCardMinted; bool private _restrictPublicMint = true; string public baseURI; string private _contractURI; constructor( address payable royaltiesReceiver, string memory initialBaseURI, string memory initialContractURI, address fountCardAddr ) ERC721A("Dads", "DADDY-O") { setRoyaltyInfo(royaltiesReceiver, 600); baseURI = initialBaseURI; _contractURI = initialContractURI; fountCardCollection = GenericCollection(fountCardAddr); } // Accessors function setProvenanceHash(string calldata hash) public onlyOwner { PROVENANCE_HASH = hash; } function setSaleState(SaleState _saleState) public onlyOwner { saleState = _saleState; } function setDadListMerkleRoot(bytes32 root) public onlyOwner { dadListMerkleRoot = root; } function dadListSpotsUsed(address addr) public view returns (uint256) { return _dadListSpotsUsed[addr]; } function setRaffleMerkleRoot(bytes32 root) public onlyOwner { raffleMerkleRoot = root; } function raffleSpotsUsed(address addr) public view returns (uint256) { return _raffleSpotsUsed[addr]; } function setRestrictPublic(bool restrict) public onlyOwner { _restrictPublicMint = restrict; } // Metadata function setBaseURI(string calldata uri) public onlyOwner { baseURI = uri; } function setContractURI(string calldata uri) public onlyOwner { _contractURI = uri; } function _baseURI() internal view override returns (string memory) { return baseURI; } function contractURI() public view returns (string memory) { return _contractURI; } // Minting function mintDadList( uint256 amount, bytes32[] calldata merkleProof, uint256 maxAmount, bool mintFountCard ) public payable onlySaleState(SaleState.DadList) mustMatchPrice(amount) onlyVerified(dadListMerkleRoot, merkleProof, maxAmount) requireSupply(amount) { if (amount > maxAmount - dadListSpotsUsed(msg.sender)) revert InsufficientListSpotsError(); _dadListSpotsUsed[msg.sender] += amount; _mint(msg.sender, amount); if (mintFountCard && !_fountCardMinted[msg.sender]) { _fountCardMinted[msg.sender] = true; fountCardCollection.mint(FOUNT_CARD_ID, 1, msg.sender); } } function mintRaffleList( uint256 amount, bytes32[] calldata merkleProof, uint256 maxAmount ) public payable onlySaleState(SaleState.RaffleList) mustMatchPrice(amount) onlyVerified(raffleMerkleRoot, merkleProof, maxAmount) requireSupply(amount) { if (amount > maxAmount - raffleSpotsUsed(msg.sender)) revert InsufficientListSpotsError(); _raffleSpotsUsed[msg.sender] += amount; _mint(msg.sender, amount); } function mintPublic(uint256 amount) public payable mustMatchPrice(amount) onlySaleState(SaleState.Public) requireSupply(amount) { if (_restrictPublicMint && (amount + _publicMintsUsed[msg.sender] > MAX_PUBLIC_PER_WALLET)) revert PerWalletMaximumExceededError(); if (msg.sender != tx.origin) revert ContractMintDisallowedError(); _publicMintsUsed[msg.sender] += amount; _mint(msg.sender, amount); } function ownerMint(address to, uint256 amount) public onlyOwner requireSupply(amount) { _mint(to, amount); } // Misc function withdraw(address payable receiver) public onlyOwner { receiver.transfer(address(this).balance); } // Modifiers modifier onlySaleState(SaleState requiredState) { if (saleState != requiredState) revert SaleStateClosedError(); _; } modifier mustMatchPrice(uint256 amount) { if (msg.value != price * amount) revert IncorrectAmountError(); _; } modifier onlyVerified( bytes32 root, bytes32[] calldata proof, uint256 maxAmount ) { if (!_verify(root, proof, msg.sender, maxAmount)) revert InvalidProofError(); _; } modifier requireSupply(uint256 amount) { if (totalSupply() + amount > MAX_SUPPLY) revert ExceedsMaxSupplyError(); _; } // Private function _verify( bytes32 root, bytes32[] calldata proof, address sender, uint256 maxAmount ) private pure returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(sender, maxAmount.toString())); return MerkleProof.verify(proof, root, leaf); } // ERC721A function _startTokenId() internal view virtual override returns (uint256) { return 1; } // IERC2981 function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyOwner { _setDefaultRoyalty(receiver, numerator); } // ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, * including the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at `_startTokenId()` * (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with `_mintERC2309`. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to `_mintERC2309` // is required to cause an overflow, which is unrealistic. uint256 private constant MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to `_startTokenId()` unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes of the XOR of // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165 // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)` return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); _packedAddressData[owner] = packed; } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & BITMASK_BURNED == 0) { // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP); ownership.burned = packed & BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> BITPOS_EXTRA_DATA); } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, BITMASK_ADDRESS) // `owner | (block.timestamp << BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << BITPOS_NEXT_INITIALIZED`. result := shl(BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 tokenId = startTokenId; uint256 end = startTokenId + quantity; do { emit Transfer(address(0), to, tokenId++); } while (tokenId < end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { // Compute the slot. mstore(0x00, tokenId) mstore(0x20, tokenApprovalsPtr.slot) approvedAddressSlot := keccak256(0x00, 0x40) // Load the slot's value from storage. approvedAddress := sload(approvedAddressSlot) } } /** * @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`. */ function _isOwnerOrApproved( address approvedAddress, address from, address msgSender ) private pure returns (bool result) { assembly { // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from := and(from, BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, BITMASK_ADDRESS) // `msgSender == from || msgSender == approvedAddress`. result := or(eq(msgSender, from), eq(msgSender, approvedAddress)) } } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (BITMASK_BURNED | BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << BITPOS_EXTRA_DATA; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. * This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. * This includes minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* ▄▄▄██ ████████████████▄▄▄▄ ▄█████████ █████████▀▀▀▀█████████▄ ▀████████ ▐███████▌ ▀████████▄ ▐███████ ▐███████▌ █████████▄ ▐███████ ▐███████▌ ▀████████▌ ▄▄▄▄ ▄▄▄ ▐███████ ▄▄▄▄ ▐███████▌ █████████▌ ▄█████▀▀█████▄▄ ▄█████▀▀███████████ ▄█████▀▀██████▄ ▐███████▌ █████████ ▐██████ ▐██████▄ ▄█████▌ ▀████████ ▄██████ ▐██████ ▐███████▌ █████████ ▐█████ ███████▌ ███████ ████████ ▐███████▌ ▀█████ ▐███████▌ ▐████████ ▄▄▄▄ ▐███████ ▐███████ ▐███████ ██████████▄▄ ▐███████▌ ▐███████▌ ▄███████▀█████████ ████████ ▐███████ ██████████████▄▄ ▐███████▌ ███████▌ ▄███████ ▐███████▌ ▐███████ ▐███████ ▀▀█████████████ ▐███████▌ ▄██████▀ ████████ ████████ ████████ ▐███████ ████▄ ▀▀███████▌ ▐████████▄ ▄██████▀ ████████ ████████ ███████▌ ▐███████ ███████ ▐██████▌ ▄██████████████████████▀ ▀███████▄ ▄█████████▄ ▀███████▄ ▄█████████ ▀██████▄ ██████▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀████▀▀▀ ▀▀▀▀▀▀▀▀ ▀▀▀████▀▀ ▀▀▀▀▀▀▀▀ ▀▀▀▀████▀▀▀▀ */ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract GenericCollection is ERC1155, AccessControl, ERC2981 { string public name; string public symbol; string private _uri; bytes32 public constant MINTWORTHY = keccak256("MINTWORTHY"); mapping(uint256 => string) private _customURIs; string private _contractURI; constructor( string memory name_, string memory symbol_, string memory initialBaseURI, string memory initialContractURI, address payable royaltiesReceiver, uint96 royaltiesNumerator ) ERC1155("") { name = name_; symbol = symbol_; _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(MINTWORTHY, _msgSender()); setBaseURI(initialBaseURI); setContractURI(initialContractURI); setRoyaltyInfo(royaltiesReceiver, royaltiesNumerator); } // Minting function mint( uint256 id, uint256 amount, address destination ) public onlyRole(MINTWORTHY) { _mint(destination, id, amount, ""); } function mint( uint256 id, uint256 amount, address destination, string memory tokenUri ) public onlyRole(MINTWORTHY) { setCustomUri(id, tokenUri); _mint(destination, id, amount, ""); } // Metadata function setBaseURI(string memory baseURI) public onlyRole(DEFAULT_ADMIN_ROLE) { _uri = baseURI; } function setCustomUri(uint256 id, string memory tokenUri) public onlyRole(MINTWORTHY) { _customURIs[id] = tokenUri; } function uri(uint256 id) public view virtual override returns (string memory) { string memory customURI = _customURIs[id]; if (keccak256(bytes(customURI)) != keccak256(bytes(""))) { return customURI; } return _uri; } function contractURI() public view returns (string memory) { return _contractURI; } function setContractURI(string memory contractURI_) public onlyRole(DEFAULT_ADMIN_ROLE) { _contractURI = contractURI_; } // IERC2981 function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyRole(DEFAULT_ADMIN_ROLE) { _setDefaultRoyalty(receiver, numerator); } // ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981, AccessControl) returns (bool) { return ERC1155.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.1.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set through `_extraData`. uint24 extraData; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // IERC165 // ============================== /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================== // IERC721 // ============================== /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // IERC721Metadata // ============================== /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================== // IERC2309 // ============================== /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`, * as defined in the ERC2309 standard. See `_mintERC2309` for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (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 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
{ "optimizer": { "enabled": false, "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 payable","name":"royaltiesReceiver","type":"address"},{"internalType":"string","name":"initialBaseURI","type":"string"},{"internalType":"string","name":"initialContractURI","type":"string"},{"internalType":"address","name":"fountCardAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ContractMintDisallowedError","type":"error"},{"inputs":[],"name":"ExceedsMaxSupplyError","type":"error"},{"inputs":[],"name":"IncorrectAmountError","type":"error"},{"inputs":[],"name":"InsufficientListSpotsError","type":"error"},{"inputs":[],"name":"InvalidProofError","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PerWalletMaximumExceededError","type":"error"},{"inputs":[],"name":"PublicSaleClosedError","type":"error"},{"inputs":[],"name":"SaleStateClosedError","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"dadListSpotsUsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fountCardCollection","outputs":[{"internalType":"contract GenericCollection","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bool","name":"mintFountCard","type":"bool"}],"name":"mintDadList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"mintRaffleList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"raffleSpotsUsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum Dads.SaleState","name":"","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":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setDadListMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"hash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setRaffleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"restrict","type":"bool"}],"name":"setRestrictPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint96","name":"numerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Dads.SaleState","name":"_saleState","type":"uint8"}],"name":"setSaleState","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 payable","name":"receiver","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600c60006101000a81548160ff021916908360038111156200002d576200002c620005f7565b5b021790555067013fbe85edc90000600d556001601560006101000a81548160ff0219169083151502179055503480156200006657600080fd5b50604051620051a0380380620051a083398181016040528101906200008c91906200086d565b6040518060400160405280600481526020017f44616473000000000000000000000000000000000000000000000000000000008152506040518060400160405280600781526020017f44414444592d4f0000000000000000000000000000000000000000000000000081525081600290805190602001906200011092919062000547565b5080600390805190602001906200012992919062000547565b506200013a620001f360201b60201c565b60008190555050506200016262000156620001fc60201b60201c565b6200020460201b60201c565b6200017684610258620002ca60201b60201c565b82601690805190602001906200018e92919062000547565b508160179080519060200190620001a792919062000547565b5080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000b0f565b60006001905090565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620002da620001fc60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620003006200036f60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff161462000359576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000350906200097e565b60405180910390fd5b6200036b82826200039960201b60201c565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b620003a96200053d60201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200040a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004019062000a16565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200047d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004749062000a88565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000612710905090565b828054620005559062000ad9565b90600052602060002090601f016020900481019282620005795760008555620005c5565b82601f106200059457805160ff1916838001178555620005c5565b82800160010185558215620005c5579182015b82811115620005c4578251825591602001919060010190620005a7565b5b509050620005d49190620005d8565b5090565b5b80821115620005f3576000816000905550600101620005d9565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000667826200063a565b9050919050565b62000679816200065a565b81146200068557600080fd5b50565b60008151905062000699816200066e565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006f482620006a9565b810181811067ffffffffffffffff82111715620007165762000715620006ba565b5b80604052505050565b60006200072b62000626565b9050620007398282620006e9565b919050565b600067ffffffffffffffff8211156200075c576200075b620006ba565b5b6200076782620006a9565b9050602081019050919050565b60005b838110156200079457808201518184015260208101905062000777565b83811115620007a4576000848401525b50505050565b6000620007c1620007bb846200073e565b6200071f565b905082815260208101848484011115620007e057620007df620006a4565b5b620007ed84828562000774565b509392505050565b600082601f8301126200080d576200080c6200069f565b5b81516200081f848260208601620007aa565b91505092915050565b600062000835826200063a565b9050919050565b620008478162000828565b81146200085357600080fd5b50565b60008151905062000867816200083c565b92915050565b600080600080608085870312156200088a576200088962000630565b5b60006200089a8782880162000688565b945050602085015167ffffffffffffffff811115620008be57620008bd62000635565b5b620008cc87828801620007f5565b935050604085015167ffffffffffffffff811115620008f057620008ef62000635565b5b620008fe87828801620007f5565b9250506060620009118782880162000856565b91505092959194509250565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000620009666020836200091d565b915062000973826200092e565b602082019050919050565b60006020820190508181036000830152620009998162000957565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000620009fe602a836200091d565b915062000a0b82620009a0565b604082019050919050565b6000602082019050818103600083015262000a3181620009ef565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000a706019836200091d565b915062000a7d8262000a38565b602082019050919050565b6000602082019050818103600083015262000aa38162000a61565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000af257607f821691505b6020821081141562000b095762000b0862000aaa565b5b50919050565b6146818062000b1f6000396000f3fe6080604052600436106102305760003560e01c80636c0360eb1161012e578063c7a559de116100ab578063e985e9c51161006f578063e985e9c51461082e578063efd0cbf91461086b578063f00951cf14610887578063f2fde38b146108b0578063ff1b6556146108d957610230565b8063c7a559de14610763578063c87b56dd1461078e578063ccca9a99146107cb578063d8d9f4bf146107e7578063e8a3d4851461080357610230565b806395d89b41116100f257806395d89b4114610692578063a035b1fe146106bd578063a22cb465146106e8578063b88d4fde14610711578063c0f728ad1461073a57610230565b80636c0360eb146105bf57806370a08231146105ea578063715018a6146106275780638da5cb5b1461063e578063938e3d7b1461066957610230565b80632a55205a116101bc57806351cff8d91161018057806351cff8d9146104dc57806355f804b3146105055780635a67de071461052e578063603f4d52146105575780636352211e1461058257610230565b80632a55205a146103d25780633743abac1461041057806342842e0e1461044d578063484b973c146104765780634d9eb46f1461049f57610230565b8063081812fc11610203578063081812fc146102ef578063095ea7b31461032c578063109695231461035557806318160ddd1461037e57806323b872dd146103a957610230565b806301ffc9a71461023557806302fa7c471461027257806304eb87f61461029b57806306fdde03146102c4575b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190613511565b610904565b6040516102699190613559565b60405180910390f35b34801561027e57600080fd5b5061029960048036038101906102949190613616565b610926565b005b3480156102a757600080fd5b506102c260048036038101906102bd9190613682565b6109b0565b005b3480156102d057600080fd5b506102d9610a49565b6040516102e69190613748565b60405180910390f35b3480156102fb57600080fd5b50610316600480360381019061031191906137a0565b610adb565b60405161032391906137ee565b60405180910390f35b34801561033857600080fd5b50610353600480360381019061034e9190613835565b610b57565b005b34801561036157600080fd5b5061037c600480360381019061037791906138da565b610c98565b005b34801561038a57600080fd5b50610393610d2a565b6040516103a09190613936565b60405180910390f35b3480156103b557600080fd5b506103d060048036038101906103cb9190613951565b610d41565b005b3480156103de57600080fd5b506103f960048036038101906103f491906139a4565b611066565b6040516104079291906139e4565b60405180910390f35b34801561041c57600080fd5b5061043760048036038101906104329190613a0d565b611251565b6040516104449190613936565b60405180910390f35b34801561045957600080fd5b50610474600480360381019061046f9190613951565b61129a565b005b34801561048257600080fd5b5061049d60048036038101906104989190613835565b6112ba565b005b3480156104ab57600080fd5b506104c660048036038101906104c19190613a0d565b611394565b6040516104d39190613936565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe9190613a3a565b6113dd565b005b34801561051157600080fd5b5061052c600480360381019061052791906138da565b6114a3565b005b34801561053a57600080fd5b5061055560048036038101906105509190613a8c565b611535565b005b34801561056357600080fd5b5061056c6115de565b6040516105799190613b30565b60405180910390f35b34801561058e57600080fd5b506105a960048036038101906105a491906137a0565b6115f1565b6040516105b691906137ee565b60405180910390f35b3480156105cb57600080fd5b506105d4611603565b6040516105e19190613748565b60405180910390f35b3480156105f657600080fd5b50610611600480360381019061060c9190613a0d565b611691565b60405161061e9190613936565b60405180910390f35b34801561063357600080fd5b5061063c61174a565b005b34801561064a57600080fd5b506106536117d2565b60405161066091906137ee565b60405180910390f35b34801561067557600080fd5b50610690600480360381019061068b91906138da565b6117fc565b005b34801561069e57600080fd5b506106a761188e565b6040516106b49190613748565b60405180910390f35b3480156106c957600080fd5b506106d2611920565b6040516106df9190613936565b60405180910390f35b3480156106f457600080fd5b5061070f600480360381019061070a9190613b4b565b611926565b005b34801561071d57600080fd5b5061073860048036038101906107339190613cbb565b611a9e565b005b34801561074657600080fd5b50610761600480360381019061075c9190613d74565b611b11565b005b34801561076f57600080fd5b50610778611b97565b6040516107859190613e00565b60405180910390f35b34801561079a57600080fd5b506107b560048036038101906107b091906137a0565b611bbd565b6040516107c29190613748565b60405180910390f35b6107e560048036038101906107e09190613e71565b611c5c565b005b61080160048036038101906107fc9190613ef9565b611fab565b005b34801561080f57600080fd5b506108186121b2565b6040516108259190613748565b60405180910390f35b34801561083a57600080fd5b5061085560048036038101906108509190613f6d565b612244565b6040516108629190613559565b60405180910390f35b610885600480360381019061088091906137a0565b6122d8565b005b34801561089357600080fd5b506108ae60048036038101906108a99190613d74565b612544565b005b3480156108bc57600080fd5b506108d760048036038101906108d29190613a0d565b6125ca565b005b3480156108e557600080fd5b506108ee6126c2565b6040516108fb9190613748565b60405180910390f35b600061090f82612750565b8061091f575061091e826127e2565b5b9050919050565b61092e61285c565b73ffffffffffffffffffffffffffffffffffffffff1661094c6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146109a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099990613ff9565b60405180910390fd5b6109ac8282612864565b5050565b6109b861285c565b73ffffffffffffffffffffffffffffffffffffffff166109d66117d2565b73ffffffffffffffffffffffffffffffffffffffff1614610a2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2390613ff9565b60405180910390fd5b80601560006101000a81548160ff02191690831515021790555050565b606060028054610a5890614048565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8490614048565b8015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b5050505050905090565b6000610ae6826129fa565b610b1c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b62826115f1565b90508073ffffffffffffffffffffffffffffffffffffffff16610b83612a59565b73ffffffffffffffffffffffffffffffffffffffff1614610be657610baf81610baa612a59565b612244565b610be5576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610ca061285c565b73ffffffffffffffffffffffffffffffffffffffff16610cbe6117d2565b73ffffffffffffffffffffffffffffffffffffffff1614610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b90613ff9565b60405180910390fd5b8181600b9190610d25929190613402565b505050565b6000610d34612a61565b6001546000540303905090565b6000610d4c82612a6a565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610db3576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610dbf84612b38565b91509150610dd58187610dd0612a59565b612b5a565b610e2157610dea86610de5612a59565b612244565b610e20576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610e88576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e958686866001612b9e565b8015610ea057600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610f6e85610f4a888887612ba4565b7c020000000000000000000000000000000000000000000000000000000017612bcc565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610ff6576000600185019050600060046000838152602001908152602001600020541415610ff4576000548114610ff3578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461105e8686866001612bf7565b505050505050565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614156111fc5760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000611206612bfd565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff168661123291906140a9565b61123c9190614132565b90508160000151819350935050509250929050565b6000601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112b583838360405180602001604052806000815250611a9e565b505050565b6112c261285c565b73ffffffffffffffffffffffffffffffffffffffff166112e06117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132d90613ff9565b60405180910390fd5b8061177081611343610d2a565b61134d9190614163565b1115611385576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61138f8383612c07565b505050565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6113e561285c565b73ffffffffffffffffffffffffffffffffffffffff166114036117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145090613ff9565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561149f573d6000803e3d6000fd5b5050565b6114ab61285c565b73ffffffffffffffffffffffffffffffffffffffff166114c96117d2565b73ffffffffffffffffffffffffffffffffffffffff161461151f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151690613ff9565b60405180910390fd5b818160169190611530929190613402565b505050565b61153d61285c565b73ffffffffffffffffffffffffffffffffffffffff1661155b6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146115b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a890613ff9565b60405180910390fd5b80600c60006101000a81548160ff021916908360038111156115d6576115d5613ab9565b5b021790555050565b600c60009054906101000a900460ff1681565b60006115fc82612a6a565b9050919050565b6016805461161090614048565b80601f016020809104026020016040519081016040528092919081815260200182805461163c90614048565b80156116895780601f1061165e57610100808354040283529160200191611689565b820191906000526020600020905b81548152906001019060200180831161166c57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116f9576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61175261285c565b73ffffffffffffffffffffffffffffffffffffffff166117706117d2565b73ffffffffffffffffffffffffffffffffffffffff16146117c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117bd90613ff9565b60405180910390fd5b6117d06000612ddb565b565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61180461285c565b73ffffffffffffffffffffffffffffffffffffffff166118226117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186f90613ff9565b60405180910390fd5b818160179190611889929190613402565b505050565b60606003805461189d90614048565b80601f01602080910402602001604051908101604052809291908181526020018280546118c990614048565b80156119165780601f106118eb57610100808354040283529160200191611916565b820191906000526020600020905b8154815290600101906020018083116118f957829003601f168201915b5050505050905090565b600d5481565b61192e612a59565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611993576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006119a0612a59565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611a4d612a59565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611a929190613559565b60405180910390a35050565b611aa9848484610d41565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611b0b57611ad484848484612ea1565b611b0a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b611b1961285c565b73ffffffffffffffffffffffffffffffffffffffff16611b376117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8490613ff9565b60405180910390fd5b8060108190555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060611bc8826129fa565b611bfe576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c08613001565b9050600081511415611c295760405180602001604052806000815250611c54565b80611c3384613093565b604051602001611c449291906141f5565b6040516020818303038152906040525b915050919050565b6001806003811115611c7157611c70613ab9565b5b600c60009054906101000a900460ff166003811115611c9357611c92613ab9565b5b14611cca576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8580600d54611cd991906140a9565b3414611d11576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54868686611d2484848433856130ed565b611d5a576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a61177081611d67610d2a565b611d719190614163565b1115611da9576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611db233611394565b89611dbd9190614219565b8c1115611df6576040517fa6501e5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8b601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e459190614163565b92505081905550611e56338d612c07565b878015611ead5750601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611f9d576001601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7d3fe6b600180336040518463ffffffff1660e01b8152600401611f6a93929190614288565b600060405180830381600087803b158015611f8457600080fd5b505af1158015611f98573d6000803e3d6000fd5b505050505b505050505050505050505050565b6002806003811115611fc057611fbf613ab9565b5b600c60009054906101000a900460ff166003811115611fe257611fe1613ab9565b5b14612019576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8480600d5461202891906140a9565b3414612060576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60105485858561207384848433856130ed565b6120a9576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b89611770816120b6610d2a565b6120c09190614163565b11156120f8576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61210133611251565b8861210c9190614219565b8b1115612145576040517fa6501e5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121949190614163565b925050819055506121a5338c612c07565b5050505050505050505050565b6060601780546121c190614048565b80601f01602080910402602001604051908101604052809291908181526020018280546121ed90614048565b801561223a5780601f1061220f5761010080835404028352916020019161223a565b820191906000526020600020905b81548152906001019060200180831161221d57829003601f168201915b5050505050905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b8080600d546122e791906140a9565b341461231f576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380600381111561233457612333613ab9565b5b600c60009054906101000a900460ff16600381111561235657612355613ab9565b5b1461238d576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826117708161239a610d2a565b6123a49190614163565b11156123dc576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601560009054906101000a900460ff16801561244257506002601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054856124409190614163565b115b15612479576040517fe653a5c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124de576040517fb3098a7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461252d9190614163565b9250508190555061253e3385612c07565b50505050565b61254c61285c565b73ffffffffffffffffffffffffffffffffffffffff1661256a6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146125c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b790613ff9565b60405180910390fd5b80600f8190555050565b6125d261285c565b73ffffffffffffffffffffffffffffffffffffffff166125f06117d2565b73ffffffffffffffffffffffffffffffffffffffff1614612646576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263d90613ff9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ad90614331565b60405180910390fd5b6126bf81612ddb565b50565b600b80546126cf90614048565b80601f01602080910402602001604051908101604052809291908181526020018280546126fb90614048565b80156127485780601f1061271d57610100808354040283529160200191612748565b820191906000526020600020905b81548152906001019060200180831161272b57829003601f168201915b505050505081565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806127ab57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806127db5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061285557506128548261317b565b5b9050919050565b600033905090565b61286c612bfd565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156128ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c1906143c3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561293a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129319061442f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612a05612a61565b11158015612a14575060005482105b8015612a52575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b60008082905080612a79612a61565b11612b0157600054811015612b005760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612afe575b6000811415612af4576004600083600190039350838152602001908152602001600020549050612ac9565b8092505050612b33565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000806000600690508360005280602052604060002092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612bbb8686846131e5565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000612710905090565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c74576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415612caf576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612cbc6000848385612b9e565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612d3383612d246000866000612ba4565b612d2d856131ee565b17612bcc565b60046000838152602001908152602001600020819055506000819050600083830190505b818060010192508573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4808210612d5757806000819055505050612dd66000848385612bf7565b505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ec7612a59565b8786866040518563ffffffff1660e01b8152600401612ee994939291906144a4565b602060405180830381600087803b158015612f0357600080fd5b505af1925050508015612f3457506040513d601f19601f82011682018060405250810190612f319190614505565b60015b612fae573d8060008114612f64576040519150601f19603f3d011682016040523d82523d6000602084013e612f69565b606091505b50600081511415612fa6576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606016805461301090614048565b80601f016020809104026020016040519081016040528092919081815260200182805461303c90614048565b80156130895780601f1061305e57610100808354040283529160200191613089565b820191906000526020600020905b81548152906001019060200180831161306c57829003601f168201915b5050505050905090565b60606080604051019050806040528082600183039250600a81066030018353600a810490505b80156130d957600183039250600a81066030018353600a810490506130b9565b508181036020830392508083525050919050565b600080836130fa846131fe565b60405160200161310b92919061457a565b60405160208183030381529060405280519060200120905061316f868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050888361335f565b91505095945050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60009392505050565b60006001821460e11b9050919050565b60606000821415613246576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061335a565b600082905060005b60008214613278578080613261906145a2565b915050600a826132719190614132565b915061324e565b60008167ffffffffffffffff81111561329457613293613b90565b5b6040519080825280601f01601f1916602001820160405280156132c65781602001600182028036833780820191505090505b5090505b60008514613353576001826132df9190614219565b9150600a856132ee91906145eb565b60306132fa9190614163565b60f81b8183815181106133105761330f61461c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561334c9190614132565b94506132ca565b8093505050505b919050565b60008261336c8584613376565b1490509392505050565b60008082905060005b84518110156133e057600085828151811061339d5761339c61461c565b5b602002602001015190508083116133bf576133b883826133eb565b92506133cc565b6133c981846133eb565b92505b5080806133d8906145a2565b91505061337f565b508091505092915050565b600082600052816020526040600020905092915050565b82805461340e90614048565b90600052602060002090601f0160209004810192826134305760008555613477565b82601f1061344957803560ff1916838001178555613477565b82800160010185558215613477579182015b8281111561347657823582559160200191906001019061345b565b5b5090506134849190613488565b5090565b5b808211156134a1576000816000905550600101613489565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6134ee816134b9565b81146134f957600080fd5b50565b60008135905061350b816134e5565b92915050565b600060208284031215613527576135266134af565b5b6000613535848285016134fc565b91505092915050565b60008115159050919050565b6135538161353e565b82525050565b600060208201905061356e600083018461354a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061359f82613574565b9050919050565b6135af81613594565b81146135ba57600080fd5b50565b6000813590506135cc816135a6565b92915050565b60006bffffffffffffffffffffffff82169050919050565b6135f3816135d2565b81146135fe57600080fd5b50565b600081359050613610816135ea565b92915050565b6000806040838503121561362d5761362c6134af565b5b600061363b858286016135bd565b925050602061364c85828601613601565b9150509250929050565b61365f8161353e565b811461366a57600080fd5b50565b60008135905061367c81613656565b92915050565b600060208284031215613698576136976134af565b5b60006136a68482850161366d565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156136e95780820151818401526020810190506136ce565b838111156136f8576000848401525b50505050565b6000601f19601f8301169050919050565b600061371a826136af565b61372481856136ba565b93506137348185602086016136cb565b61373d816136fe565b840191505092915050565b60006020820190508181036000830152613762818461370f565b905092915050565b6000819050919050565b61377d8161376a565b811461378857600080fd5b50565b60008135905061379a81613774565b92915050565b6000602082840312156137b6576137b56134af565b5b60006137c48482850161378b565b91505092915050565b60006137d882613574565b9050919050565b6137e8816137cd565b82525050565b600060208201905061380360008301846137df565b92915050565b613812816137cd565b811461381d57600080fd5b50565b60008135905061382f81613809565b92915050565b6000806040838503121561384c5761384b6134af565b5b600061385a85828601613820565b925050602061386b8582860161378b565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261389a57613899613875565b5b8235905067ffffffffffffffff8111156138b7576138b661387a565b5b6020830191508360018202830111156138d3576138d261387f565b5b9250929050565b600080602083850312156138f1576138f06134af565b5b600083013567ffffffffffffffff81111561390f5761390e6134b4565b5b61391b85828601613884565b92509250509250929050565b6139308161376a565b82525050565b600060208201905061394b6000830184613927565b92915050565b60008060006060848603121561396a576139696134af565b5b600061397886828701613820565b935050602061398986828701613820565b925050604061399a8682870161378b565b9150509250925092565b600080604083850312156139bb576139ba6134af565b5b60006139c98582860161378b565b92505060206139da8582860161378b565b9150509250929050565b60006040820190506139f960008301856137df565b613a066020830184613927565b9392505050565b600060208284031215613a2357613a226134af565b5b6000613a3184828501613820565b91505092915050565b600060208284031215613a5057613a4f6134af565b5b6000613a5e848285016135bd565b91505092915050565b60048110613a7457600080fd5b50565b600081359050613a8681613a67565b92915050565b600060208284031215613aa257613aa16134af565b5b6000613ab084828501613a77565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110613af957613af8613ab9565b5b50565b6000819050613b0a82613ae8565b919050565b6000613b1a82613afc565b9050919050565b613b2a81613b0f565b82525050565b6000602082019050613b456000830184613b21565b92915050565b60008060408385031215613b6257613b616134af565b5b6000613b7085828601613820565b9250506020613b818582860161366d565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613bc8826136fe565b810181811067ffffffffffffffff82111715613be757613be6613b90565b5b80604052505050565b6000613bfa6134a5565b9050613c068282613bbf565b919050565b600067ffffffffffffffff821115613c2657613c25613b90565b5b613c2f826136fe565b9050602081019050919050565b82818337600083830152505050565b6000613c5e613c5984613c0b565b613bf0565b905082815260208101848484011115613c7a57613c79613b8b565b5b613c85848285613c3c565b509392505050565b600082601f830112613ca257613ca1613875565b5b8135613cb2848260208601613c4b565b91505092915050565b60008060008060808587031215613cd557613cd46134af565b5b6000613ce387828801613820565b9450506020613cf487828801613820565b9350506040613d058782880161378b565b925050606085013567ffffffffffffffff811115613d2657613d256134b4565b5b613d3287828801613c8d565b91505092959194509250565b6000819050919050565b613d5181613d3e565b8114613d5c57600080fd5b50565b600081359050613d6e81613d48565b92915050565b600060208284031215613d8a57613d896134af565b5b6000613d9884828501613d5f565b91505092915050565b6000819050919050565b6000613dc6613dc1613dbc84613574565b613da1565b613574565b9050919050565b6000613dd882613dab565b9050919050565b6000613dea82613dcd565b9050919050565b613dfa81613ddf565b82525050565b6000602082019050613e156000830184613df1565b92915050565b60008083601f840112613e3157613e30613875565b5b8235905067ffffffffffffffff811115613e4e57613e4d61387a565b5b602083019150836020820283011115613e6a57613e6961387f565b5b9250929050565b600080600080600060808688031215613e8d57613e8c6134af565b5b6000613e9b8882890161378b565b955050602086013567ffffffffffffffff811115613ebc57613ebb6134b4565b5b613ec888828901613e1b565b94509450506040613edb8882890161378b565b9250506060613eec8882890161366d565b9150509295509295909350565b60008060008060608587031215613f1357613f126134af565b5b6000613f218782880161378b565b945050602085013567ffffffffffffffff811115613f4257613f416134b4565b5b613f4e87828801613e1b565b93509350506040613f618782880161378b565b91505092959194509250565b60008060408385031215613f8457613f836134af565b5b6000613f9285828601613820565b9250506020613fa385828601613820565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613fe36020836136ba565b9150613fee82613fad565b602082019050919050565b6000602082019050818103600083015261401281613fd6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061406057607f821691505b6020821081141561407457614073614019565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006140b48261376a565b91506140bf8361376a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156140f8576140f761407a565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061413d8261376a565b91506141488361376a565b92508261415857614157614103565b5b828204905092915050565b600061416e8261376a565b91506141798361376a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156141ae576141ad61407a565b5b828201905092915050565b600081905092915050565b60006141cf826136af565b6141d981856141b9565b93506141e98185602086016136cb565b80840191505092915050565b600061420182856141c4565b915061420d82846141c4565b91508190509392505050565b60006142248261376a565b915061422f8361376a565b9250828210156142425761424161407a565b5b828203905092915050565b6000819050919050565b600061427261426d6142688461424d565b613da1565b61376a565b9050919050565b61428281614257565b82525050565b600060608201905061429d6000830186613927565b6142aa6020830185614279565b6142b760408301846137df565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061431b6026836136ba565b9150614326826142bf565b604082019050919050565b6000602082019050818103600083015261434a8161430e565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b60006143ad602a836136ba565b91506143b882614351565b604082019050919050565b600060208201905081810360008301526143dc816143a0565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b60006144196019836136ba565b9150614424826143e3565b602082019050919050565b600060208201905081810360008301526144488161440c565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006144768261444f565b614480818561445a565b93506144908185602086016136cb565b614499816136fe565b840191505092915050565b60006080820190506144b960008301876137df565b6144c660208301866137df565b6144d36040830185613927565b81810360608301526144e5818461446b565b905095945050505050565b6000815190506144ff816134e5565b92915050565b60006020828403121561451b5761451a6134af565b5b6000614529848285016144f0565b91505092915050565b60008160601b9050919050565b600061454a82614532565b9050919050565b600061455c8261453f565b9050919050565b61457461456f826137cd565b614551565b82525050565b60006145868285614563565b60148201915061459682846141c4565b91508190509392505050565b60006145ad8261376a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156145e0576145df61407a565b5b600182019050919050565b60006145f68261376a565b91506146018361376a565b92508261461157614610614103565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220b6815b97f099d2ce91913ec472c4f746c13173be81538a56090d878e164bd02264736f6c63430008090033000000000000000000000000ed0e270a2c69c3c7b21142f44c70bfbfcda8c0c3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000016f444f2d9e696834c1c9b536dc3896e1b545213000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f646164732e6172742f6170692f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000002268747470733a2f2f646164732e6172742f6170692f6d657461646174612f44616473000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102305760003560e01c80636c0360eb1161012e578063c7a559de116100ab578063e985e9c51161006f578063e985e9c51461082e578063efd0cbf91461086b578063f00951cf14610887578063f2fde38b146108b0578063ff1b6556146108d957610230565b8063c7a559de14610763578063c87b56dd1461078e578063ccca9a99146107cb578063d8d9f4bf146107e7578063e8a3d4851461080357610230565b806395d89b41116100f257806395d89b4114610692578063a035b1fe146106bd578063a22cb465146106e8578063b88d4fde14610711578063c0f728ad1461073a57610230565b80636c0360eb146105bf57806370a08231146105ea578063715018a6146106275780638da5cb5b1461063e578063938e3d7b1461066957610230565b80632a55205a116101bc57806351cff8d91161018057806351cff8d9146104dc57806355f804b3146105055780635a67de071461052e578063603f4d52146105575780636352211e1461058257610230565b80632a55205a146103d25780633743abac1461041057806342842e0e1461044d578063484b973c146104765780634d9eb46f1461049f57610230565b8063081812fc11610203578063081812fc146102ef578063095ea7b31461032c578063109695231461035557806318160ddd1461037e57806323b872dd146103a957610230565b806301ffc9a71461023557806302fa7c471461027257806304eb87f61461029b57806306fdde03146102c4575b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190613511565b610904565b6040516102699190613559565b60405180910390f35b34801561027e57600080fd5b5061029960048036038101906102949190613616565b610926565b005b3480156102a757600080fd5b506102c260048036038101906102bd9190613682565b6109b0565b005b3480156102d057600080fd5b506102d9610a49565b6040516102e69190613748565b60405180910390f35b3480156102fb57600080fd5b50610316600480360381019061031191906137a0565b610adb565b60405161032391906137ee565b60405180910390f35b34801561033857600080fd5b50610353600480360381019061034e9190613835565b610b57565b005b34801561036157600080fd5b5061037c600480360381019061037791906138da565b610c98565b005b34801561038a57600080fd5b50610393610d2a565b6040516103a09190613936565b60405180910390f35b3480156103b557600080fd5b506103d060048036038101906103cb9190613951565b610d41565b005b3480156103de57600080fd5b506103f960048036038101906103f491906139a4565b611066565b6040516104079291906139e4565b60405180910390f35b34801561041c57600080fd5b5061043760048036038101906104329190613a0d565b611251565b6040516104449190613936565b60405180910390f35b34801561045957600080fd5b50610474600480360381019061046f9190613951565b61129a565b005b34801561048257600080fd5b5061049d60048036038101906104989190613835565b6112ba565b005b3480156104ab57600080fd5b506104c660048036038101906104c19190613a0d565b611394565b6040516104d39190613936565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe9190613a3a565b6113dd565b005b34801561051157600080fd5b5061052c600480360381019061052791906138da565b6114a3565b005b34801561053a57600080fd5b5061055560048036038101906105509190613a8c565b611535565b005b34801561056357600080fd5b5061056c6115de565b6040516105799190613b30565b60405180910390f35b34801561058e57600080fd5b506105a960048036038101906105a491906137a0565b6115f1565b6040516105b691906137ee565b60405180910390f35b3480156105cb57600080fd5b506105d4611603565b6040516105e19190613748565b60405180910390f35b3480156105f657600080fd5b50610611600480360381019061060c9190613a0d565b611691565b60405161061e9190613936565b60405180910390f35b34801561063357600080fd5b5061063c61174a565b005b34801561064a57600080fd5b506106536117d2565b60405161066091906137ee565b60405180910390f35b34801561067557600080fd5b50610690600480360381019061068b91906138da565b6117fc565b005b34801561069e57600080fd5b506106a761188e565b6040516106b49190613748565b60405180910390f35b3480156106c957600080fd5b506106d2611920565b6040516106df9190613936565b60405180910390f35b3480156106f457600080fd5b5061070f600480360381019061070a9190613b4b565b611926565b005b34801561071d57600080fd5b5061073860048036038101906107339190613cbb565b611a9e565b005b34801561074657600080fd5b50610761600480360381019061075c9190613d74565b611b11565b005b34801561076f57600080fd5b50610778611b97565b6040516107859190613e00565b60405180910390f35b34801561079a57600080fd5b506107b560048036038101906107b091906137a0565b611bbd565b6040516107c29190613748565b60405180910390f35b6107e560048036038101906107e09190613e71565b611c5c565b005b61080160048036038101906107fc9190613ef9565b611fab565b005b34801561080f57600080fd5b506108186121b2565b6040516108259190613748565b60405180910390f35b34801561083a57600080fd5b5061085560048036038101906108509190613f6d565b612244565b6040516108629190613559565b60405180910390f35b610885600480360381019061088091906137a0565b6122d8565b005b34801561089357600080fd5b506108ae60048036038101906108a99190613d74565b612544565b005b3480156108bc57600080fd5b506108d760048036038101906108d29190613a0d565b6125ca565b005b3480156108e557600080fd5b506108ee6126c2565b6040516108fb9190613748565b60405180910390f35b600061090f82612750565b8061091f575061091e826127e2565b5b9050919050565b61092e61285c565b73ffffffffffffffffffffffffffffffffffffffff1661094c6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146109a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099990613ff9565b60405180910390fd5b6109ac8282612864565b5050565b6109b861285c565b73ffffffffffffffffffffffffffffffffffffffff166109d66117d2565b73ffffffffffffffffffffffffffffffffffffffff1614610a2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2390613ff9565b60405180910390fd5b80601560006101000a81548160ff02191690831515021790555050565b606060028054610a5890614048565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8490614048565b8015610ad15780601f10610aa657610100808354040283529160200191610ad1565b820191906000526020600020905b815481529060010190602001808311610ab457829003601f168201915b5050505050905090565b6000610ae6826129fa565b610b1c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b62826115f1565b90508073ffffffffffffffffffffffffffffffffffffffff16610b83612a59565b73ffffffffffffffffffffffffffffffffffffffff1614610be657610baf81610baa612a59565b612244565b610be5576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610ca061285c565b73ffffffffffffffffffffffffffffffffffffffff16610cbe6117d2565b73ffffffffffffffffffffffffffffffffffffffff1614610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b90613ff9565b60405180910390fd5b8181600b9190610d25929190613402565b505050565b6000610d34612a61565b6001546000540303905090565b6000610d4c82612a6a565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610db3576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610dbf84612b38565b91509150610dd58187610dd0612a59565b612b5a565b610e2157610dea86610de5612a59565b612244565b610e20576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610e88576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e958686866001612b9e565b8015610ea057600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610f6e85610f4a888887612ba4565b7c020000000000000000000000000000000000000000000000000000000017612bcc565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610ff6576000600185019050600060046000838152602001908152602001600020541415610ff4576000548114610ff3578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461105e8686866001612bf7565b505050505050565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614156111fc5760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000611206612bfd565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff168661123291906140a9565b61123c9190614132565b90508160000151819350935050509250929050565b6000601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112b583838360405180602001604052806000815250611a9e565b505050565b6112c261285c565b73ffffffffffffffffffffffffffffffffffffffff166112e06117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132d90613ff9565b60405180910390fd5b8061177081611343610d2a565b61134d9190614163565b1115611385576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61138f8383612c07565b505050565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6113e561285c565b73ffffffffffffffffffffffffffffffffffffffff166114036117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145090613ff9565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561149f573d6000803e3d6000fd5b5050565b6114ab61285c565b73ffffffffffffffffffffffffffffffffffffffff166114c96117d2565b73ffffffffffffffffffffffffffffffffffffffff161461151f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151690613ff9565b60405180910390fd5b818160169190611530929190613402565b505050565b61153d61285c565b73ffffffffffffffffffffffffffffffffffffffff1661155b6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146115b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a890613ff9565b60405180910390fd5b80600c60006101000a81548160ff021916908360038111156115d6576115d5613ab9565b5b021790555050565b600c60009054906101000a900460ff1681565b60006115fc82612a6a565b9050919050565b6016805461161090614048565b80601f016020809104026020016040519081016040528092919081815260200182805461163c90614048565b80156116895780601f1061165e57610100808354040283529160200191611689565b820191906000526020600020905b81548152906001019060200180831161166c57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116f9576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61175261285c565b73ffffffffffffffffffffffffffffffffffffffff166117706117d2565b73ffffffffffffffffffffffffffffffffffffffff16146117c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117bd90613ff9565b60405180910390fd5b6117d06000612ddb565b565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61180461285c565b73ffffffffffffffffffffffffffffffffffffffff166118226117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186f90613ff9565b60405180910390fd5b818160179190611889929190613402565b505050565b60606003805461189d90614048565b80601f01602080910402602001604051908101604052809291908181526020018280546118c990614048565b80156119165780601f106118eb57610100808354040283529160200191611916565b820191906000526020600020905b8154815290600101906020018083116118f957829003601f168201915b5050505050905090565b600d5481565b61192e612a59565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611993576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006119a0612a59565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611a4d612a59565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611a929190613559565b60405180910390a35050565b611aa9848484610d41565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611b0b57611ad484848484612ea1565b611b0a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b611b1961285c565b73ffffffffffffffffffffffffffffffffffffffff16611b376117d2565b73ffffffffffffffffffffffffffffffffffffffff1614611b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8490613ff9565b60405180910390fd5b8060108190555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060611bc8826129fa565b611bfe576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c08613001565b9050600081511415611c295760405180602001604052806000815250611c54565b80611c3384613093565b604051602001611c449291906141f5565b6040516020818303038152906040525b915050919050565b6001806003811115611c7157611c70613ab9565b5b600c60009054906101000a900460ff166003811115611c9357611c92613ab9565b5b14611cca576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8580600d54611cd991906140a9565b3414611d11576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54868686611d2484848433856130ed565b611d5a576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a61177081611d67610d2a565b611d719190614163565b1115611da9576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611db233611394565b89611dbd9190614219565b8c1115611df6576040517fa6501e5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8b601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e459190614163565b92505081905550611e56338d612c07565b878015611ead5750601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611f9d576001601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7d3fe6b600180336040518463ffffffff1660e01b8152600401611f6a93929190614288565b600060405180830381600087803b158015611f8457600080fd5b505af1158015611f98573d6000803e3d6000fd5b505050505b505050505050505050505050565b6002806003811115611fc057611fbf613ab9565b5b600c60009054906101000a900460ff166003811115611fe257611fe1613ab9565b5b14612019576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8480600d5461202891906140a9565b3414612060576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60105485858561207384848433856130ed565b6120a9576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b89611770816120b6610d2a565b6120c09190614163565b11156120f8576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61210133611251565b8861210c9190614219565b8b1115612145576040517fa6501e5e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121949190614163565b925050819055506121a5338c612c07565b5050505050505050505050565b6060601780546121c190614048565b80601f01602080910402602001604051908101604052809291908181526020018280546121ed90614048565b801561223a5780601f1061220f5761010080835404028352916020019161223a565b820191906000526020600020905b81548152906001019060200180831161221d57829003601f168201915b5050505050905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b8080600d546122e791906140a9565b341461231f576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380600381111561233457612333613ab9565b5b600c60009054906101000a900460ff16600381111561235657612355613ab9565b5b1461238d576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826117708161239a610d2a565b6123a49190614163565b11156123dc576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601560009054906101000a900460ff16801561244257506002601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054856124409190614163565b115b15612479576040517fe653a5c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124de576040517fb3098a7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461252d9190614163565b9250508190555061253e3385612c07565b50505050565b61254c61285c565b73ffffffffffffffffffffffffffffffffffffffff1661256a6117d2565b73ffffffffffffffffffffffffffffffffffffffff16146125c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b790613ff9565b60405180910390fd5b80600f8190555050565b6125d261285c565b73ffffffffffffffffffffffffffffffffffffffff166125f06117d2565b73ffffffffffffffffffffffffffffffffffffffff1614612646576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263d90613ff9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ad90614331565b60405180910390fd5b6126bf81612ddb565b50565b600b80546126cf90614048565b80601f01602080910402602001604051908101604052809291908181526020018280546126fb90614048565b80156127485780601f1061271d57610100808354040283529160200191612748565b820191906000526020600020905b81548152906001019060200180831161272b57829003601f168201915b505050505081565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806127ab57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806127db5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061285557506128548261317b565b5b9050919050565b600033905090565b61286c612bfd565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156128ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c1906143c3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561293a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129319061442f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612a05612a61565b11158015612a14575060005482105b8015612a52575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b60008082905080612a79612a61565b11612b0157600054811015612b005760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612afe575b6000811415612af4576004600083600190039350838152602001908152602001600020549050612ac9565b8092505050612b33565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000806000600690508360005280602052604060002092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612bbb8686846131e5565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000612710905090565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c74576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415612caf576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612cbc6000848385612b9e565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612d3383612d246000866000612ba4565b612d2d856131ee565b17612bcc565b60046000838152602001908152602001600020819055506000819050600083830190505b818060010192508573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4808210612d5757806000819055505050612dd66000848385612bf7565b505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ec7612a59565b8786866040518563ffffffff1660e01b8152600401612ee994939291906144a4565b602060405180830381600087803b158015612f0357600080fd5b505af1925050508015612f3457506040513d601f19601f82011682018060405250810190612f319190614505565b60015b612fae573d8060008114612f64576040519150601f19603f3d011682016040523d82523d6000602084013e612f69565b606091505b50600081511415612fa6576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606016805461301090614048565b80601f016020809104026020016040519081016040528092919081815260200182805461303c90614048565b80156130895780601f1061305e57610100808354040283529160200191613089565b820191906000526020600020905b81548152906001019060200180831161306c57829003601f168201915b5050505050905090565b60606080604051019050806040528082600183039250600a81066030018353600a810490505b80156130d957600183039250600a81066030018353600a810490506130b9565b508181036020830392508083525050919050565b600080836130fa846131fe565b60405160200161310b92919061457a565b60405160208183030381529060405280519060200120905061316f868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050888361335f565b91505095945050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60009392505050565b60006001821460e11b9050919050565b60606000821415613246576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061335a565b600082905060005b60008214613278578080613261906145a2565b915050600a826132719190614132565b915061324e565b60008167ffffffffffffffff81111561329457613293613b90565b5b6040519080825280601f01601f1916602001820160405280156132c65781602001600182028036833780820191505090505b5090505b60008514613353576001826132df9190614219565b9150600a856132ee91906145eb565b60306132fa9190614163565b60f81b8183815181106133105761330f61461c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561334c9190614132565b94506132ca565b8093505050505b919050565b60008261336c8584613376565b1490509392505050565b60008082905060005b84518110156133e057600085828151811061339d5761339c61461c565b5b602002602001015190508083116133bf576133b883826133eb565b92506133cc565b6133c981846133eb565b92505b5080806133d8906145a2565b91505061337f565b508091505092915050565b600082600052816020526040600020905092915050565b82805461340e90614048565b90600052602060002090601f0160209004810192826134305760008555613477565b82601f1061344957803560ff1916838001178555613477565b82800160010185558215613477579182015b8281111561347657823582559160200191906001019061345b565b5b5090506134849190613488565b5090565b5b808211156134a1576000816000905550600101613489565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6134ee816134b9565b81146134f957600080fd5b50565b60008135905061350b816134e5565b92915050565b600060208284031215613527576135266134af565b5b6000613535848285016134fc565b91505092915050565b60008115159050919050565b6135538161353e565b82525050565b600060208201905061356e600083018461354a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061359f82613574565b9050919050565b6135af81613594565b81146135ba57600080fd5b50565b6000813590506135cc816135a6565b92915050565b60006bffffffffffffffffffffffff82169050919050565b6135f3816135d2565b81146135fe57600080fd5b50565b600081359050613610816135ea565b92915050565b6000806040838503121561362d5761362c6134af565b5b600061363b858286016135bd565b925050602061364c85828601613601565b9150509250929050565b61365f8161353e565b811461366a57600080fd5b50565b60008135905061367c81613656565b92915050565b600060208284031215613698576136976134af565b5b60006136a68482850161366d565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156136e95780820151818401526020810190506136ce565b838111156136f8576000848401525b50505050565b6000601f19601f8301169050919050565b600061371a826136af565b61372481856136ba565b93506137348185602086016136cb565b61373d816136fe565b840191505092915050565b60006020820190508181036000830152613762818461370f565b905092915050565b6000819050919050565b61377d8161376a565b811461378857600080fd5b50565b60008135905061379a81613774565b92915050565b6000602082840312156137b6576137b56134af565b5b60006137c48482850161378b565b91505092915050565b60006137d882613574565b9050919050565b6137e8816137cd565b82525050565b600060208201905061380360008301846137df565b92915050565b613812816137cd565b811461381d57600080fd5b50565b60008135905061382f81613809565b92915050565b6000806040838503121561384c5761384b6134af565b5b600061385a85828601613820565b925050602061386b8582860161378b565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261389a57613899613875565b5b8235905067ffffffffffffffff8111156138b7576138b661387a565b5b6020830191508360018202830111156138d3576138d261387f565b5b9250929050565b600080602083850312156138f1576138f06134af565b5b600083013567ffffffffffffffff81111561390f5761390e6134b4565b5b61391b85828601613884565b92509250509250929050565b6139308161376a565b82525050565b600060208201905061394b6000830184613927565b92915050565b60008060006060848603121561396a576139696134af565b5b600061397886828701613820565b935050602061398986828701613820565b925050604061399a8682870161378b565b9150509250925092565b600080604083850312156139bb576139ba6134af565b5b60006139c98582860161378b565b92505060206139da8582860161378b565b9150509250929050565b60006040820190506139f960008301856137df565b613a066020830184613927565b9392505050565b600060208284031215613a2357613a226134af565b5b6000613a3184828501613820565b91505092915050565b600060208284031215613a5057613a4f6134af565b5b6000613a5e848285016135bd565b91505092915050565b60048110613a7457600080fd5b50565b600081359050613a8681613a67565b92915050565b600060208284031215613aa257613aa16134af565b5b6000613ab084828501613a77565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110613af957613af8613ab9565b5b50565b6000819050613b0a82613ae8565b919050565b6000613b1a82613afc565b9050919050565b613b2a81613b0f565b82525050565b6000602082019050613b456000830184613b21565b92915050565b60008060408385031215613b6257613b616134af565b5b6000613b7085828601613820565b9250506020613b818582860161366d565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613bc8826136fe565b810181811067ffffffffffffffff82111715613be757613be6613b90565b5b80604052505050565b6000613bfa6134a5565b9050613c068282613bbf565b919050565b600067ffffffffffffffff821115613c2657613c25613b90565b5b613c2f826136fe565b9050602081019050919050565b82818337600083830152505050565b6000613c5e613c5984613c0b565b613bf0565b905082815260208101848484011115613c7a57613c79613b8b565b5b613c85848285613c3c565b509392505050565b600082601f830112613ca257613ca1613875565b5b8135613cb2848260208601613c4b565b91505092915050565b60008060008060808587031215613cd557613cd46134af565b5b6000613ce387828801613820565b9450506020613cf487828801613820565b9350506040613d058782880161378b565b925050606085013567ffffffffffffffff811115613d2657613d256134b4565b5b613d3287828801613c8d565b91505092959194509250565b6000819050919050565b613d5181613d3e565b8114613d5c57600080fd5b50565b600081359050613d6e81613d48565b92915050565b600060208284031215613d8a57613d896134af565b5b6000613d9884828501613d5f565b91505092915050565b6000819050919050565b6000613dc6613dc1613dbc84613574565b613da1565b613574565b9050919050565b6000613dd882613dab565b9050919050565b6000613dea82613dcd565b9050919050565b613dfa81613ddf565b82525050565b6000602082019050613e156000830184613df1565b92915050565b60008083601f840112613e3157613e30613875565b5b8235905067ffffffffffffffff811115613e4e57613e4d61387a565b5b602083019150836020820283011115613e6a57613e6961387f565b5b9250929050565b600080600080600060808688031215613e8d57613e8c6134af565b5b6000613e9b8882890161378b565b955050602086013567ffffffffffffffff811115613ebc57613ebb6134b4565b5b613ec888828901613e1b565b94509450506040613edb8882890161378b565b9250506060613eec8882890161366d565b9150509295509295909350565b60008060008060608587031215613f1357613f126134af565b5b6000613f218782880161378b565b945050602085013567ffffffffffffffff811115613f4257613f416134b4565b5b613f4e87828801613e1b565b93509350506040613f618782880161378b565b91505092959194509250565b60008060408385031215613f8457613f836134af565b5b6000613f9285828601613820565b9250506020613fa385828601613820565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613fe36020836136ba565b9150613fee82613fad565b602082019050919050565b6000602082019050818103600083015261401281613fd6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061406057607f821691505b6020821081141561407457614073614019565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006140b48261376a565b91506140bf8361376a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156140f8576140f761407a565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061413d8261376a565b91506141488361376a565b92508261415857614157614103565b5b828204905092915050565b600061416e8261376a565b91506141798361376a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156141ae576141ad61407a565b5b828201905092915050565b600081905092915050565b60006141cf826136af565b6141d981856141b9565b93506141e98185602086016136cb565b80840191505092915050565b600061420182856141c4565b915061420d82846141c4565b91508190509392505050565b60006142248261376a565b915061422f8361376a565b9250828210156142425761424161407a565b5b828203905092915050565b6000819050919050565b600061427261426d6142688461424d565b613da1565b61376a565b9050919050565b61428281614257565b82525050565b600060608201905061429d6000830186613927565b6142aa6020830185614279565b6142b760408301846137df565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061431b6026836136ba565b9150614326826142bf565b604082019050919050565b6000602082019050818103600083015261434a8161430e565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b60006143ad602a836136ba565b91506143b882614351565b604082019050919050565b600060208201905081810360008301526143dc816143a0565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b60006144196019836136ba565b9150614424826143e3565b602082019050919050565b600060208201905081810360008301526144488161440c565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006144768261444f565b614480818561445a565b93506144908185602086016136cb565b614499816136fe565b840191505092915050565b60006080820190506144b960008301876137df565b6144c660208301866137df565b6144d36040830185613927565b81810360608301526144e5818461446b565b905095945050505050565b6000815190506144ff816134e5565b92915050565b60006020828403121561451b5761451a6134af565b5b6000614529848285016144f0565b91505092915050565b60008160601b9050919050565b600061454a82614532565b9050919050565b600061455c8261453f565b9050919050565b61457461456f826137cd565b614551565b82525050565b60006145868285614563565b60148201915061459682846141c4565b91508190509392505050565b60006145ad8261376a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156145e0576145df61407a565b5b600182019050919050565b60006145f68261376a565b91506146018361376a565b92508261461157614610614103565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220b6815b97f099d2ce91913ec472c4f746c13173be81538a56090d878e164bd02264736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ed0e270a2c69c3c7b21142f44c70bfbfcda8c0c3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000016f444f2d9e696834c1c9b536dc3896e1b545213000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f646164732e6172742f6170692f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000002268747470733a2f2f646164732e6172742f6170692f6d657461646174612f44616473000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : royaltiesReceiver (address): 0xED0E270a2C69C3C7B21142f44c70bFbfCdA8C0C3
Arg [1] : initialBaseURI (string): https://dads.art/api/metadata/
Arg [2] : initialContractURI (string): https://dads.art/api/metadata/Dads
Arg [3] : fountCardAddr (address): 0x16F444F2d9E696834C1c9b536Dc3896E1B545213
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000ed0e270a2c69c3c7b21142f44c70bfbfcda8c0c3
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 00000000000000000000000016f444f2d9e696834c1c9b536dc3896e1b545213
Arg [4] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [5] : 68747470733a2f2f646164732e6172742f6170692f6d657461646174612f0000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [7] : 68747470733a2f2f646164732e6172742f6170692f6d657461646174612f4461
Arg [8] : 6473000000000000000000000000000000000000000000000000000000000000
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.