ERC-721
Overview
Max Total Supply
5,049 TASTYBONES
Holders
3,079
Market
Volume (24H)
0.0441 ETH
Min Price (24H)
$36.56 @ 0.011100 ETH
Max Price (24H)
$65.87 @ 0.020000 ETH
Other Info
Token Contract
Balance
6 TASTYBONESLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TastyBones
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // .e$$$$e. // e$$$$$$$$$$e // $$$$$$$$$$$$$$ // d$$$$$$$$$$$$$$b // $$$$$$$$$$$$$$$$ // 4$$$$$$$$$$$$$$$$F // 4$$$$$$$$$$$$$$$$F // $$$" "$$$$" "$$$ // $$F 4$$F 4$$ // '$F 4$$F 4$" // $$ $$$$ $P // 4$$$$$"^$$$$$% // $$$$F 4$$$$ // "$$$ee$$$" // . *$$$$F4 // $ .$ // "$$$$$$" // ^$$$$ // "" import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./approving-bone.sol"; import "./ERC721A.sol"; contract TastyBones is Ownable, ERC721A, ReentrancyGuard { string public baseURI; uint256 public teamTBones = 50; uint256 public constant price = 0.069 ether; uint8 public maxFreeBoneMint = 1; uint8 public maxFreeMint = 2; uint8 public maxPresaleMint = 2; uint8 public maxRaffleMint = 1; uint8 public maxMintPerAccount = 2; uint256 public maxFreeMintSupply = 500; uint256 public maxPresaleSupply = 4000; uint256 public maxRaffleSupply = 500; uint256 public maxTastyBones = 5049; bool public isRaffleActive = false; bool public isPresaleActive = false; bool public isFreeActive = false; uint256 public mintedFreeMint = 0; uint256 public mintedPresale = 0; // free mint mapping (uint256 => bool) public mintedTBforFreeMintBone; mapping (address => uint256) public mintedTBforFreeMintAddress; // presale mint mapping (address => uint256) public mintedTBforPresale; // raffle mint mapping (address => bool) public mintedTBforRaffle; mapping(address => uint256) addressBlockBought; bytes32 private freeMintBoneMerkleRoot; bytes32 private freeMintListMerkleRoot; bytes32 private presaleMerkleRoot; bytes32 private raffleMerkleRoot; ApprovingBone public approvingBoneContract; constructor( address boneContractAddress, bytes32 boneRoot, bytes32 freeRoot, bytes32 presaleRoot, bytes32 raffleRoot ) ERC721A("Tasty Bones", "TASTYBONES", 50, 5049) { freeMintBoneMerkleRoot = boneRoot; freeMintListMerkleRoot = freeRoot; presaleMerkleRoot = presaleRoot; raffleMerkleRoot = raffleRoot; approvingBoneContract = ApprovingBone(boneContractAddress); } modifier isSecured(uint8 mintType) { require(addressBlockBought[msg.sender] < block.timestamp, "CANNOT_MINT_ON_THE_SAME_BLOCK"); require(tx.origin == msg.sender,"CONTRACTS_NOT_ALLOWED_TO_MINT"); if(mintType == 1) { require(isFreeActive, "FREE_MINT_IS_NOT_YET_ACTIVE"); } if(mintType == 2) { require(isPresaleActive, "PRESALE_MINT_IS_NOT_YET_ACTIVE"); } if(mintType == 3) { require(isRaffleActive, "RAFFLE_MINT_IS_NOT_YET_ACTIVE"); } _; } /** * Free mint function */ function mintFreeWithBone( uint256 boneTokenId, bytes32[] calldata boneProof) external isSecured(1) { uint256 boneCount = approvingBoneContract.balanceOf(msg.sender); bool bonesOfOwner = findBonesOfOwner(msg.sender, boneTokenId, boneCount); require(mintedFreeMint + 1 <= maxFreeMintSupply, "EXCEEDS_FREE_MINT_SUPPLY" ); require(mintedTBforFreeMintAddress[msg.sender] + 1 <= maxMintPerAccount,"ALREADY_MINTED_MAX_2"); require(mintedTBforPresale[msg.sender] + 1 <= maxMintPerAccount, "EXCEEDS_MAX_PRESALE_MINT" ); require(totalSupply() + 1 <= maxTastyBones, "EXCEEDS_MAX_SUPPLY" ); require(MerkleProof.verify(boneProof, freeMintBoneMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "YOU_ARE_NOT_WHITELISTED_TO_MINT_FREE_WBONE"); require(bonesOfOwner,"USER_DO_NOT_OWN_A_BONE"); require(boneCount > 0, "NO_BONE_PASS"); require(!mintedTBforFreeMintBone[boneTokenId], "BONE_ALREADY_USED_FOR_MINTING"); mintedTBforFreeMintAddress[msg.sender] += 1; addressBlockBought[msg.sender] = block.timestamp; mintedTBforFreeMintBone[boneTokenId] = true; mintedFreeMint += 1; _safeMint(msg.sender, 1); } /** * Free mint function */ function mintFreeWL( uint256 numberOfTokens, bytes32[] calldata freeMintProof, uint256 maxMint ) external isSecured(1) { require(mintedFreeMint + numberOfTokens <= maxFreeMintSupply, "EXCEEDS_FREE_MINT_SUPPLY" ); require(mintedTBforFreeMintAddress[msg.sender] + numberOfTokens <= maxMint,"CANNOT_MINT_MORE_THAN_ALLOWED"); require(mintedTBforFreeMintAddress[msg.sender] + numberOfTokens <= maxMintPerAccount,"ALREADY_MINTED_MAX_2"); require(mintedTBforPresale[msg.sender] + numberOfTokens <= maxMintPerAccount, "EXCEEDS_MAX_PRESALE_MINT" ); require(totalSupply() + numberOfTokens <= maxTastyBones, "EXCEEDS_MAX_SUPPLY" ); require(MerkleProof.verify(freeMintProof, freeMintListMerkleRoot, keccak256(abi.encodePacked(msg.sender, maxMint))), "YOU_ARE_NOT_WHITELISTED_TO_MINT_FREE"); mintedTBforFreeMintAddress[msg.sender] += numberOfTokens; addressBlockBought[msg.sender] = block.timestamp; mintedFreeMint += numberOfTokens; _safeMint(msg.sender, numberOfTokens); } /** * Presale mint function */ function mintPresale(uint256 numberOfTokens, bytes32[] calldata proof) external payable isSecured(2) { require(msg.value == price * numberOfTokens, "INSUFFICIENT_PAYMENT"); require(mintedTBforFreeMintAddress[msg.sender] + numberOfTokens <= maxMintPerAccount, "NOT_ALLOWED_TO_MINT_MORE_THAN_2" ); require(mintedTBforPresale[msg.sender] + numberOfTokens <= maxMintPerAccount, "EXCEEDS_MAX_PRESALE_MINT" ); require(mintedPresale + numberOfTokens <= maxPresaleSupply, "EXCEEDS_MAX_PRESALE_SUPPLY" ); require(totalSupply() + numberOfTokens <= maxTastyBones, "EXCEEDS_MAX_SUPPLY" ); require(MerkleProof.verify(proof, presaleMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "INVALID_WHITELIST_PROOF"); addressBlockBought[msg.sender] = block.timestamp; mintedTBforPresale[msg.sender] += numberOfTokens; mintedPresale += numberOfTokens; _safeMint( msg.sender, numberOfTokens); } /** * Raffle Mint Function */ function mintRaffle(bytes32[] calldata proof) external payable isSecured(3) { require(msg.value == price * maxRaffleMint, "MAX_MINT_REACHED"); require(totalSupply() + maxRaffleMint <= maxTastyBones, "EXCEEDS_MAX_SUPPLY" ); require(!mintedTBforRaffle[msg.sender], "EXCEEDS_MAX_RAFFLE_MINT" ); require(mintedTBforFreeMintAddress[msg.sender] < 1, "NOT_ALLOWED_TO_MINT_MORE_THAN_2" ); require(mintedTBforPresale[msg.sender] < 1, "NOT_ALLOWED_TO_MINT_MORE_THAN_2" ); require(MerkleProof.verify(proof, raffleMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "INVALID_WHITELIST_PROOF"); addressBlockBought[msg.sender] = block.timestamp; mintedTBforRaffle[msg.sender] = true; _safeMint(msg.sender, maxRaffleMint); } /** * Mint Tasty Bones for the Team */ function mintTBForTeam(uint256 numberOfTokens) external onlyOwner { require(teamTBones > 0, "NFTS_FOR_THE_TEAM_HAS_BEEN_MINTED"); require(numberOfTokens <= teamTBones, "EXCEEDS_MAX_MINT_FOR_TEAM"); teamTBones -= numberOfTokens; _safeMint(msg.sender, numberOfTokens); } function findBonesOfOwner(address _owner, uint256 tokenId, uint256 tokenCount) internal view returns(bool) { for(uint256 i; i < tokenCount; i++){ uint256 tokensId = approvingBoneContract.tokenOfOwnerByIndex(_owner, i); if(tokensId == tokenId) { return true; } } return false; } /** * Returns Tasty Bones of the Caller */ function tokenIdOfOwner(address _owner) external view returns(uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for(uint256 i; i < tokenCount; i++){ tokensId[i] = tokenOfOwnerByIndex(_owner, i); } return tokensId; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } // SETTER FUNCTIONS function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } function setFreeBoneMerkleRoot(bytes32 freeMintRoot) external onlyOwner { freeMintBoneMerkleRoot = freeMintRoot; } function setFreeWlMerkleRoot(bytes32 freeWLMintRoot) external onlyOwner { freeMintListMerkleRoot = freeWLMintRoot; } function setPresaleMerkleRoot(bytes32 presaleRoot) external onlyOwner { presaleMerkleRoot = presaleRoot; } function setRaffleMerkleRoot(bytes32 raffleRoot) external onlyOwner { raffleMerkleRoot = raffleRoot; } function setMaxFreeBoneMint(uint8 _maxBoneMint) external onlyOwner { maxFreeBoneMint = _maxBoneMint; } function setMaxFreeMint(uint8 _maxFreeMint) external onlyOwner { maxFreeMint = _maxFreeMint; } function setMaxPresaleMint(uint8 _maxPresaleMint) external onlyOwner { maxPresaleMint = _maxPresaleMint; } function setMaxRaffleMint(uint8 _maxRaffleMint) external onlyOwner { maxRaffleMint = _maxRaffleMint; } function setMaxFreeMintSupply(uint256 _maxFreeMintSupply) external onlyOwner { maxFreeMintSupply = _maxFreeMintSupply; } function setMaxPresaleMintSupply(uint256 _maxPresaleMintSupply) external onlyOwner { maxPresaleSupply = _maxPresaleMintSupply; } function setMaxRaffleMintSupply(uint256 _maxRaffleMintSupply) external onlyOwner { maxRaffleSupply = _maxRaffleMintSupply; } // TOGGLES function toggleRaffleMintActive() external onlyOwner { isRaffleActive = !isRaffleActive; } function togglePresaleActive() external onlyOwner { isPresaleActive = !isPresaleActive; } function toggleFreeMintActive() external onlyOwner { isFreeActive = !isFreeActive; } function approvingBoneContractAddress() external view returns (address) { return address(approvingBoneContract); } /** * Withdraw Ether */ function withdraw() external onlyOwner { uint256 balance = address(this).balance; require(balance > 0, "No balance to withdraw"); (bool success, ) = payable(msg.sender).call{value: balance}(""); require(success, "Failed to withdraw payment"); } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // 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; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @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) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @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`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a 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 _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private 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 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 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 pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { 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 = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128. * * Does not support burning tokens to address(0). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex = 0; uint256 internal immutable collectionSize; uint256 internal immutable maxBatchSize; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev * `maxBatchSize` refers to how much a minter can mint at a time. * `collectionSize_` refers to how many tokens are in the collection. */ constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { require( collectionSize_ > 0, "ERC721A: collection must have a nonzero supply" ); require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero"); _name = name_; _symbol = symbol_; maxBatchSize = maxBatchSize_; collectionSize = collectionSize_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), "ERC721A: global index out of bounds"); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), "ERC721A: owner index out of bounds"); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx = 0; address currOwnershipAddr = address(0); for (uint256 i = 0; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } revert("ERC721A: unable to get token of owner by index"); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721A: balance query for the zero address"); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require( owner != address(0), "ERC721A: number minted query for the zero address" ); return uint256(_addressData[owner].numberMinted); } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { require(_exists(tokenId), "ERC721A: owner query for nonexistent token"); uint256 lowestTokenToCheck; if (tokenId >= maxBatchSize) { lowestTokenToCheck = tokenId - maxBatchSize + 1; } for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } revert("ERC721A: unable to determine the owner of token"); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); require(to != owner, "ERC721A: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721A: approve caller is not owner nor approved for all" ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), "ERC721A: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), "ERC721A: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721A: transfer to non ERC721Receiver implementer" ); } /** * @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 tokenId < currentIndex; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - there must be `quantity` tokens remaining unminted in the total collection. * - `to` cannot be the zero address. * - `quantity` cannot be larger than the max batch size. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = currentIndex; require(to != address(0), "ERC721A: mint to the zero address"); // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering. require(!_exists(startTokenId), "ERC721A: token already minted"); require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high"); _beforeTokenTransfers(address(0), to, startTokenId, quantity); AddressData memory addressData = _addressData[to]; _addressData[to] = AddressData( addressData.balance + uint128(quantity), addressData.numberMinted + uint128(quantity) ); _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp)); uint256 updatedIndex = startTokenId; for (uint256 i = 0; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); require( _checkOnERC721Received(address(0), to, updatedIndex, _data), "ERC721A: transfer to non ERC721Receiver implementer" ); updatedIndex++; } currentIndex = updatedIndex; _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require( isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved" ); require( prevOwnership.addr == from, "ERC721A: transfer from incorrect owner" ); require(to != address(0), "ERC721A: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp)); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId] = TokenOwnership( prevOwnership.addr, prevOwnership.startTimestamp ); } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } uint256 public nextOwnerToExplicitlySet = 0; /** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet; require(quantity > 0, "quantity must be nonzero"); uint256 endIndex = oldNextOwnerToSet + quantity - 1; if (endIndex > collectionSize - 1) { endIndex = collectionSize - 1; } // We know if the last one in the group exists, all in the group exist, due to serial ordering. require(_exists(endIndex), "not enough minted yet for this cleanup"); for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) { if (_ownerships[i].addr == address(0)) { TokenOwnership memory ownership = ownershipOf(i); _ownerships[i] = TokenOwnership( ownership.addr, ownership.startTimestamp ); } } nextOwnerToExplicitlySet = endIndex + 1; } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a 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 _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721A: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * 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`. */ 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. * * 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` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract ApprovingBone is ERC721Enumerable, Ownable { using SafeMath for uint256; string public baseURI; uint256 public maxBones = 450; bool public boneMintActive = true; mapping (address => bool) public earlyAccessAddresses; mapping(address => uint256) addressBlockBought; address public creator; constructor(address owner) ERC721("Approving Bone", "ACBONE") { transferOwnership(owner); // setBaseURI for metadata setBaseURI('https://bone-api.approvingcorgis.com/api/token/'); creator = msg.sender; } /** * mint Bones */ function mintBone() public { uint256 supply = totalSupply(); require(addressBlockBought[msg.sender] < block.timestamp, "Not allowed to Mint on the same Block"); require(!Address.isContract(msg.sender),"Contracts are not allowed to mint"); require(boneMintActive, "Minting Approving Bone Is Not Yet Active"); require(isAddressReserved(msg.sender), "You need to be whitelisted"); require(supply <= maxBones, "Exceeds maximum Corgis supply" ); addressBlockBought[msg.sender] = block.timestamp; _safeMint( msg.sender, supply + 1 ); delete earlyAccessAddresses[msg.sender]; } /** * mint Bones */ function mintSpecialBones(uint256 _numberOfTokens) public onlyOwner { uint256 supply = totalSupply(); require(supply <= maxBones, "Exceeds maximum Bones supply" ); for(uint256 i; i < _numberOfTokens; i++){ _safeMint( msg.sender, supply + i ); } } /** * Returns Bones of the Caller */ function bonesOfOwner(address _owner) public view returns(uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for(uint256 i; i < tokenCount; i++){ tokensId[i] = tokenOfOwnerByIndex(_owner, i); } return tokensId; } function isAddressReserved(address _ogAddress) internal view returns(bool) { return earlyAccessAddresses[_ogAddress]; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function setBaseURI(string memory newBaseURI) public onlyOwner { baseURI = newBaseURI; } function toggleBoneMintActive() public onlyOwner { boneMintActive = !boneMintActive; } function changeMaxBones(uint256 _maxBones) public onlyOwner { maxBones = _maxBones; } function addReservationAddress(address _ogAddress) public onlyOwner { earlyAccessAddresses[_ogAddress] = true; } function addMultipleAddresses(address[] memory _ogAddress) public onlyOwner { for (uint256 i = 0; i < _ogAddress.length; i++) { earlyAccessAddresses[_ogAddress[i]] = true; } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"boneContractAddress","type":"address"},{"internalType":"bytes32","name":"boneRoot","type":"bytes32"},{"internalType":"bytes32","name":"freeRoot","type":"bytes32"},{"internalType":"bytes32","name":"presaleRoot","type":"bytes32"},{"internalType":"bytes32","name":"raffleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approvingBoneContract","outputs":[{"internalType":"contract ApprovingBone","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvingBoneContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFreeActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRaffleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFreeBoneMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFreeMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFreeMintSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerAccount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPresaleMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPresaleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRaffleMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRaffleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTastyBones","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes32[]","name":"freeMintProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxMint","type":"uint256"}],"name":"mintFreeWL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boneTokenId","type":"uint256"},{"internalType":"bytes32[]","name":"boneProof","type":"bytes32[]"}],"name":"mintFreeWithBone","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintRaffle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintTBForTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedFreeMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedPresale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedTBforFreeMintAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedTBforFreeMintBone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedTBforPresale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedTBforRaffle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"freeMintRoot","type":"bytes32"}],"name":"setFreeBoneMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"freeWLMintRoot","type":"bytes32"}],"name":"setFreeWlMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxBoneMint","type":"uint8"}],"name":"setMaxFreeBoneMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxFreeMint","type":"uint8"}],"name":"setMaxFreeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFreeMintSupply","type":"uint256"}],"name":"setMaxFreeMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxPresaleMint","type":"uint8"}],"name":"setMaxPresaleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPresaleMintSupply","type":"uint256"}],"name":"setMaxPresaleMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxRaffleMint","type":"uint8"}],"name":"setMaxRaffleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxRaffleMintSupply","type":"uint256"}],"name":"setMaxRaffleMintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"presaleRoot","type":"bytes32"}],"name":"setPresaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"raffleRoot","type":"bytes32"}],"name":"setRaffleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamTBones","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleFreeMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePresaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleRaffleMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokenIdOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040526000600181905560088190556032600b55600c805464ffffffffff19166402010202011790556101f4600d819055610fa0600e55600f556113b96010556011805462ffffff1916905560128190556013553480156200006257600080fd5b506040516200434838038062004348833981016040819052620000859162000328565b6040518060400160405280600b81526020016a546173747920426f6e657360a81b8152506040518060400160405280600a8152602001695441535459424f4e455360b01b81525060326113b9620000eb620000e56200022e60201b60201c565b62000232565b60008111620001585760405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b60008211620001ba5760405162461bcd60e51b815260206004820152602760248201527f455243373231413a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b60648201526084016200014f565b8351620001cf90600290602087019062000282565b508251620001e590600390602086019062000282565b5060a09190915260805250506001600955601993909355601a91909155601b55601c55601d80546001600160a01b0319166001600160a01b0392909216919091179055620003bc565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000290906200037f565b90600052602060002090601f016020900481019282620002b45760008555620002ff565b82601f10620002cf57805160ff1916838001178555620002ff565b82800160010185558215620002ff579182015b82811115620002ff578251825591602001919060010190620002e2565b506200030d92915062000311565b5090565b5b808211156200030d576000815560010162000312565b600080600080600060a086880312156200034157600080fd5b85516001600160a01b03811681146200035957600080fd5b602087015160408801516060890151608090990151929a91995097965090945092505050565b600181811c908216806200039457607f821691505b60208210811415620003b657634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051613f5b620003ed60003960008181612f5201528181612f7c0152613391015260005050613f5b6000f3fe6080604052600436106103cd5760003560e01c80636352211e116101fd578063bc01197311610118578063da87741b116100ab578063e3f03a5a1161007a578063e3f03a5a14610b1f578063e985e9c514610b39578063eaff7b2d14610b82578063eb07b95314610b98578063f2fde38b14610bb857600080fd5b8063da87741b14610aa9578063dca1454714610ad6578063df573ca514610ae9578063e357a51f14610aff57600080fd5b8063c87b56dd116100e7578063c87b56dd14610a3e578063cc7eee1e14610a5e578063d2a9a1a814610a7e578063d7224ba014610a9357600080fd5b8063bc011973146109ce578063c0f728ad146109e4578063c10b8e4414610a04578063c344164614610a2457600080fd5b806391d8301611610190578063a591252d1161015f578063a591252d1461094f578063ab06bdb01461096e578063b45762781461098e578063b88d4fde146109ae57600080fd5b806391d83016146108cf57806395d89b41146108ff578063a035b1fe14610914578063a22cb4651461092f57600080fd5b8063715018a6116101cc578063715018a614610867578063716e83ca1461087c57806389b0649b1461089c5780638da5cb5b146108b157600080fd5b80636352211e146107f25780636aeeaedd146108125780636c0360eb1461083257806370a082311461084757600080fd5b806323b872dd116102ed57806342842e0e1161028057806355f804b31161024f57806355f804b31461077357806357b8dc041461079357806360d938dc146107b357806362f85a77146107d257600080fd5b806342842e0e146106fe578063440c9a4a1461071e5780634f6ccce71461073e5780635533b18d1461075e57600080fd5b80632f745c59116102bc5780632f745c59146106885780632f9eeefc146106a85780633a1c5834146106c85780633ccfd60b146106e957600080fd5b806323b872dd14610605578063257d1bd11461062557806328d7b276146106525780632f71a9e31461067257600080fd5b80630c0a6b5e11610365578063189006221161033457806318900622146105895780631c3e88f6146105b957806321bdb26e146105d957806322d59d54146105ef57600080fd5b80630c0a6b5e1461050e5780630d4a1ac7146105215780630f7d3b431461054157806318160ddd1461057457600080fd5b806306fdde03116103a157806306fdde031461047a57806307e309781461049c578063081812fc146104ce578063095ea7b3146104ee57600080fd5b8062d08060146103d257806301ffc9a714610412578063021f7867146104425780630387805814610458575b600080fd5b3480156103de57600080fd5b506103ff6103ed36600461365a565b60156020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561041e57600080fd5b5061043261042d36600461368b565b610bd8565b6040519015158152602001610409565b34801561044e57600080fd5b506103ff60125481565b34801561046457600080fd5b506104786104733660046136a8565b610c45565b005b34801561048657600080fd5b5061048f610c7d565b6040516104099190613719565b3480156104a857600080fd5b50601d546001600160a01b03165b6040516001600160a01b039091168152602001610409565b3480156104da57600080fd5b506104b66104e93660046136a8565b610d0f565b3480156104fa57600080fd5b5061047861050936600461372c565b610d9a565b61047861051c3660046137a1565b610eb2565b34801561052d57600080fd5b5061047861053c3660046137ec565b611223565b34801561054d57600080fd5b50600c54610562906301000000900460ff1681565b60405160ff9091168152602001610409565b34801561058057600080fd5b506001546103ff565b34801561059557600080fd5b506104326105a43660046136a8565b60146020526000908152604090205460ff1681565b3480156105c557600080fd5b506104786105d43660046136a8565b61126d565b3480156105e557600080fd5b506103ff600e5481565b3480156105fb57600080fd5b506103ff600d5481565b34801561061157600080fd5b5061047861062036600461380f565b61129c565b34801561063157600080fd5b506103ff61064036600461365a565b60166020526000908152604090205481565b34801561065e57600080fd5b5061047861066d3660046136a8565b6112a7565b34801561067e57600080fd5b506103ff600b5481565b34801561069457600080fd5b506103ff6106a336600461372c565b6112d6565b3480156106b457600080fd5b506104786106c33660046137a1565b61144e565b3480156106d457600080fd5b50600c5461056290600160201b900460ff1681565b3480156106f557600080fd5b5061047861190d565b34801561070a57600080fd5b5061047861071936600461380f565b611a1a565b34801561072a57600080fd5b506104786107393660046136a8565b611a35565b34801561074a57600080fd5b506103ff6107593660046136a8565b611a64565b34801561076a57600080fd5b50610478611acd565b34801561077f57600080fd5b5061047861078e3660046138d6565b611b16565b34801561079f57600080fd5b506104786107ae3660046136a8565b611b53565b3480156107bf57600080fd5b5060115461043290610100900460ff1681565b3480156107de57600080fd5b506104786107ed36600461391e565b611b82565b3480156107fe57600080fd5b506104b661080d3660046136a8565b611f30565b34801561081e57600080fd5b5061047861082d3660046137ec565b611f42565b34801561083e57600080fd5b5061048f611f82565b34801561085357600080fd5b506103ff61086236600461365a565b612010565b34801561087357600080fd5b506104786120a1565b34801561088857600080fd5b506104786108973660046137ec565b6120d7565b3480156108a857600080fd5b5061047861211f565b3480156108bd57600080fd5b506000546001600160a01b03166104b6565b3480156108db57600080fd5b506104326108ea36600461365a565b60176020526000908152604090205460ff1681565b34801561090b57600080fd5b5061048f612166565b34801561092057600080fd5b506103ff66f523226980800081565b34801561093b57600080fd5b5061047861094a366004613970565b612175565b34801561095b57600080fd5b50600c5461056290610100900460ff1681565b34801561097a57600080fd5b506104786109893660046136a8565b61223a565b34801561099a57600080fd5b50600c546105629062010000900460ff1681565b3480156109ba57600080fd5b506104786109c93660046139ac565b612337565b3480156109da57600080fd5b506103ff60135481565b3480156109f057600080fd5b506104786109ff3660046136a8565b61236a565b348015610a1057600080fd5b50610478610a1f3660046137ec565b612399565b348015610a3057600080fd5b506011546104329060ff1681565b348015610a4a57600080fd5b5061048f610a593660046136a8565b6123df565b348015610a6a57600080fd5b506011546104329062010000900460ff1681565b348015610a8a57600080fd5b506104786124ac565b348015610a9f57600080fd5b506103ff60085481565b348015610ab557600080fd5b50610ac9610ac436600461365a565b6124ea565b6040516104099190613a27565b610478610ae4366004613a6b565b61258b565b348015610af557600080fd5b506103ff600f5481565b348015610b0b57600080fd5b50610478610b1a3660046136a8565b6128ad565b348015610b2b57600080fd5b50600c546105629060ff1681565b348015610b4557600080fd5b50610432610b54366004613aac565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b8e57600080fd5b506103ff60105481565b348015610ba457600080fd5b50601d546104b6906001600160a01b031681565b348015610bc457600080fd5b50610478610bd336600461365a565b6128dc565b60006001600160e01b031982166380ac58cd60e01b1480610c0957506001600160e01b03198216635b5e139f60e01b145b80610c2457506001600160e01b0319821663780e9d6360e01b145b80610c3f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610c785760405162461bcd60e51b8152600401610c6f90613adf565b60405180910390fd5b600f55565b606060028054610c8c90613b14565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb890613b14565b8015610d055780601f10610cda57610100808354040283529160200191610d05565b820191906000526020600020905b815481529060010190602001808311610ce857829003601f168201915b5050505050905090565b6000610d1c826001541190565b610d7e5760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610c6f565b506000908152600660205260409020546001600160a01b031690565b6000610da582611f30565b9050806001600160a01b0316836001600160a01b03161415610e145760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610c6f565b336001600160a01b0382161480610e305750610e308133610b54565b610ea25760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610c6f565b610ead838383612974565b505050565b336000908152601860205260409020546002904211610ee35760405162461bcd60e51b8152600401610c6f90613b4f565b323314610f025760405162461bcd60e51b8152600401610c6f90613b86565b8060ff1660011415610f365760115462010000900460ff16610f365760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff1660021415610f6957601154610100900460ff16610f695760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff1660031415610f975760115460ff16610f975760405162461bcd60e51b8152600401610c6f90613c2b565b610fa88466f5232269808000613c78565b3414610fed5760405162461bcd60e51b8152602060048201526014602482015273125394d551919250d251539517d410565351539560621b6044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611017908690613c97565b11156110355760405162461bcd60e51b8152600401610c6f90613caf565b600c5433600090815260166020526040902054600160201b90910460ff169061105f908690613c97565b111561107d5760405162461bcd60e51b8152600401610c6f90613ce6565b600e548460135461108e9190613c97565b11156110dc5760405162461bcd60e51b815260206004820152601a60248201527f455843454544535f4d41585f50524553414c455f535550504c590000000000006044820152606401610c6f565b601054846110e960015490565b6110f39190613c97565b11156111115760405162461bcd60e51b8152600401610c6f90613d1d565b61118283838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601b546040516001600160601b03193360601b16602082015290925060340190505b604051602081830303815290604052805190602001206129d0565b6111c85760405162461bcd60e51b815260206004820152601760248201527624a72b20a624a22faba424aa22a624a9aa2fa82927a7a360491b6044820152606401610c6f565b3360009081526018602090815260408083204290556016909152812080548692906111f4908490613c97565b92505081905550836013600082825461120d9190613c97565b9091555061121d90503385612a7f565b50505050565b6000546001600160a01b0316331461124d5760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff90921663010000000263ff00000019909216919091179055565b6000546001600160a01b031633146112975760405162461bcd60e51b8152600401610c6f90613adf565b600d55565b610ead838383612a99565b6000546001600160a01b031633146112d15760405162461bcd60e51b8152600401610c6f90613adf565b601b55565b60006112e183612010565b821061133a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610c6f565b600061134560015490565b905060008060005b838110156113ee576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561139f57805192505b876001600160a01b0316836001600160a01b031614156113db57868414156113cd57509350610c3f92505050565b836113d781613d49565b9450505b50806113e681613d49565b91505061134d565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610c6f565b33600090815260186020526040902054600190421161147f5760405162461bcd60e51b8152600401610c6f90613b4f565b32331461149e5760405162461bcd60e51b8152600401610c6f90613b86565b8060ff16600114156114d25760115462010000900460ff166114d25760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff166002141561150557601154610100900460ff166115055760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff16600314156115335760115460ff166115335760405162461bcd60e51b8152600401610c6f90613c2b565b601d546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190613d64565b905060006115af338784612e1b565b9050600d5460125460016115c39190613c97565b111561160c5760405162461bcd60e51b8152602060048201526018602482015277455843454544535f465245455f4d494e545f535550504c5960401b6044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611636906001613c97565b111561167b5760405162461bcd60e51b815260206004820152601460248201527320a62922a0a22cafa6a4a72a22a22fa6a0ac2f9960611b6044820152606401610c6f565b600c5433600090815260166020526040902054600160201b90910460ff16906116a5906001613c97565b11156116c35760405162461bcd60e51b8152600401610c6f90613ce6565b6010546001546116d4906001613c97565b11156116f25760405162461bcd60e51b8152600401610c6f90613d1d565b61174c858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506019546040516001600160601b03193360601b1660208201529092506034019050611167565b6117ab5760405162461bcd60e51b815260206004820152602a60248201527f594f555f4152455f4e4f545f57484954454c49535445445f544f5f4d494e545f604482015269465245455f57424f4e4560b01b6064820152608401610c6f565b806117f15760405162461bcd60e51b8152602060048201526016602482015275555345525f444f5f4e4f545f4f574e5f415f424f4e4560501b6044820152606401610c6f565b600082116118305760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f424f4e455f5041535360a01b6044820152606401610c6f565b60008681526014602052604090205460ff161561188f5760405162461bcd60e51b815260206004820152601d60248201527f424f4e455f414c52454144595f555345445f464f525f4d494e54494e470000006044820152606401610c6f565b3360009081526015602052604081208054600192906118af908490613c97565b909155505033600090815260186020908152604080832042905588835260149091528120805460ff1916600190811790915560128054919290916118f4908490613c97565b909155506119059050336001612a7f565b505050505050565b6000546001600160a01b031633146119375760405162461bcd60e51b8152600401610c6f90613adf565b478061197e5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610c6f565b604051600090339083908381818185875af1925050503d80600081146119c0576040519150601f19603f3d011682016040523d82523d6000602084013e6119c5565b606091505b5050905080611a165760405162461bcd60e51b815260206004820152601a60248201527f4661696c656420746f207769746864726177207061796d656e740000000000006044820152606401610c6f565b5050565b610ead83838360405180602001604052806000815250612337565b6000546001600160a01b03163314611a5f5760405162461bcd60e51b8152600401610c6f90613adf565b601955565b6000611a6f60015490565b8210611ac95760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610c6f565b5090565b6000546001600160a01b03163314611af75760405162461bcd60e51b8152600401610c6f90613adf565b6011805462ff0000198116620100009182900460ff1615909102179055565b6000546001600160a01b03163314611b405760405162461bcd60e51b8152600401610c6f90613adf565b8051611a1690600a9060208401906135ae565b6000546001600160a01b03163314611b7d5760405162461bcd60e51b8152600401610c6f90613adf565b601a55565b336000908152601860205260409020546001904211611bb35760405162461bcd60e51b8152600401610c6f90613b4f565b323314611bd25760405162461bcd60e51b8152600401610c6f90613b86565b8060ff1660011415611c065760115462010000900460ff16611c065760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff1660021415611c3957601154610100900460ff16611c395760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff1660031415611c675760115460ff16611c675760405162461bcd60e51b8152600401610c6f90613c2b565b600d5485601254611c789190613c97565b1115611cc15760405162461bcd60e51b8152602060048201526018602482015277455843454544535f465245455f4d494e545f535550504c5960401b6044820152606401610c6f565b336000908152601560205260409020548290611cde908790613c97565b1115611d2c5760405162461bcd60e51b815260206004820152601d60248201527f43414e4e4f545f4d494e545f4d4f52455f5448414e5f414c4c4f5745440000006044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611d56908790613c97565b1115611d9b5760405162461bcd60e51b815260206004820152601460248201527320a62922a0a22cafa6a4a72a22a22fa6a0ac2f9960611b6044820152606401610c6f565b600c5433600090815260166020526040902054600160201b90910460ff1690611dc5908790613c97565b1115611de35760405162461bcd60e51b8152600401610c6f90613ce6565b60105485611df060015490565b611dfa9190613c97565b1115611e185760405162461bcd60e51b8152600401610c6f90613d1d565b611e7984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601a546040516001600160601b03193360601b166020820152603481018890529092506054019050611167565b611ed15760405162461bcd60e51b8152602060048201526024808201527f594f555f4152455f4e4f545f57484954454c49535445445f544f5f4d494e545f6044820152634652454560e01b6064820152608401610c6f565b3360009081526015602052604081208054879290611ef0908490613c97565b909155505033600090815260186020526040812042905560128054879290611f19908490613c97565b90915550611f2990503386612a7f565b5050505050565b6000611f3b82612ed0565b5192915050565b6000546001600160a01b03163314611f6c5760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff191660ff92909216919091179055565b600a8054611f8f90613b14565b80601f0160208091040260200160405190810160405280929190818152602001828054611fbb90613b14565b80156120085780601f10611fdd57610100808354040283529160200191612008565b820191906000526020600020905b815481529060010190602001808311611feb57829003601f168201915b505050505081565b60006001600160a01b03821661207c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610c6f565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b031633146120cb5760405162461bcd60e51b8152600401610c6f90613adf565b6120d56000613079565b565b6000546001600160a01b031633146121015760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff909216620100000262ff000019909216919091179055565b6000546001600160a01b031633146121495760405162461bcd60e51b8152600401610c6f90613adf565b6011805461ff001981166101009182900460ff1615909102179055565b606060038054610c8c90613b14565b6001600160a01b0382163314156121ce5760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610c6f565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b031633146122645760405162461bcd60e51b8152600401610c6f90613adf565b6000600b54116122c05760405162461bcd60e51b815260206004820152602160248201527f4e4654535f464f525f5448455f5445414d5f4841535f4245454e5f4d494e54456044820152601160fa1b6064820152608401610c6f565b600b548111156123125760405162461bcd60e51b815260206004820152601960248201527f455843454544535f4d41585f4d494e545f464f525f5445414d000000000000006044820152606401610c6f565b80600b60008282546123249190613d7d565b9091555061233490503382612a7f565b50565b612342848484612a99565b61234e848484846130c9565b61121d5760405162461bcd60e51b8152600401610c6f90613d94565b6000546001600160a01b031633146123945760405162461bcd60e51b8152600401610c6f90613adf565b601c55565b6000546001600160a01b031633146123c35760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff9092166101000261ff0019909216919091179055565b60606123ec826001541190565b6124505760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c6f565b600061245a6131c8565b9050600081511161247a57604051806020016040528060008152506124a5565b80612484846131d7565b604051602001612495929190613de7565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146124d65760405162461bcd60e51b8152600401610c6f90613adf565b6011805460ff19811660ff90911615179055565b606060006124f783612010565b90506000816001600160401b038111156125135761251361384b565b60405190808252806020026020018201604052801561253c578160200160208202803683370190505b50905060005b828110156125835761255485826112d6565b82828151811061256657612566613e16565b60209081029190910101528061257b81613d49565b915050612542565b509392505050565b3360009081526018602052604090205460039042116125bc5760405162461bcd60e51b8152600401610c6f90613b4f565b3233146125db5760405162461bcd60e51b8152600401610c6f90613b86565b8060ff166001141561260f5760115462010000900460ff1661260f5760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff166002141561264257601154610100900460ff166126425760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff16600314156126705760115460ff166126705760405162461bcd60e51b8152600401610c6f90613c2b565b600c5461268e906301000000900460ff1666f5232269808000613c78565b34146126cf5760405162461bcd60e51b815260206004820152601060248201526f13505617d352539517d4915050d2115160821b6044820152606401610c6f565b601054600c5460ff6301000000909104166126e960015490565b6126f39190613c97565b11156127115760405162461bcd60e51b8152600401610c6f90613d1d565b3360009081526017602052604090205460ff16156127715760405162461bcd60e51b815260206004820152601760248201527f455843454544535f4d41585f524146464c455f4d494e540000000000000000006044820152606401610c6f565b336000908152601560205260409020546001116127a05760405162461bcd60e51b8152600401610c6f90613caf565b336000908152601660205260409020546001116127cf5760405162461bcd60e51b8152600401610c6f90613caf565b61282983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c546040516001600160601b03193360601b1660208201529092506034019050611167565b61286f5760405162461bcd60e51b815260206004820152601760248201527624a72b20a624a22faba424aa22a624a9aa2fa82927a7a360491b6044820152606401610c6f565b33600081815260186020908152604080832042905560179091529020805460ff19166001179055600c54610ead91906301000000900460ff16612a7f565b6000546001600160a01b031633146128d75760405162461bcd60e51b8152600401610c6f90613adf565b600e55565b6000546001600160a01b031633146129065760405162461bcd60e51b8152600401610c6f90613adf565b6001600160a01b03811661296b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c6f565b61233481613079565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600081815b8551811015612a745760008682815181106129f2576129f2613e16565b60200260200101519050808311612a34576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612a61565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612a6c81613d49565b9150506129d5565b509092149392505050565b611a168282604051806020016040528060008152506132d4565b6000612aa482612ed0565b80519091506000906001600160a01b0316336001600160a01b03161480612adb575033612ad084610d0f565b6001600160a01b0316145b80612aed57508151612aed9033610b54565b905080612b575760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610c6f565b846001600160a01b031682600001516001600160a01b031614612bcb5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610c6f565b6001600160a01b038416612c2f5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c6f565b612c3f6000848460000151612974565b6001600160a01b0385166000908152600560205260408120805460019290612c719084906001600160801b0316613e2c565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b03861660009081526005602052604081208054600194509092612cbd91859116613e54565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055612d44846001613c97565b6000818152600460205260409020549091506001600160a01b0316612dd557612d6e816001541190565b15612dd55760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611905565b6000805b82811015612ec557601d54604051632f745c5960e01b81526001600160a01b038781166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015612e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e9d9190613d64565b905084811415612eb2576001925050506124a5565b5080612ebd81613d49565b915050612e1f565b506000949350505050565b6040805180820190915260008082526020820152612eef826001541190565b612f4e5760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610c6f565b60007f00000000000000000000000000000000000000000000000000000000000000008310612faf57612fa17f000000000000000000000000000000000000000000000000000000000000000084613d7d565b612fac906001613c97565b90505b825b818110613018576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561300557949350505050565b508061301081613e76565b915050612fb1565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610c6f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0384163b156131bc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061310d903390899088908890600401613e8d565b6020604051808303816000875af1925050508015613148575060408051601f3d908101601f1916820190925261314591810190613eca565b60015b6131a2573d808015613176576040519150601f19603f3d011682016040523d82523d6000602084013e61317b565b606091505b50805161319a5760405162461bcd60e51b8152600401610c6f90613d94565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506131c0565b5060015b949350505050565b6060600a8054610c8c90613b14565b6060816131fb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613225578061320f81613d49565b915061321e9050600a83613efd565b91506131ff565b6000816001600160401b0381111561323f5761323f61384b565b6040519080825280601f01601f191660200182016040528015613269576020820181803683370190505b5090505b84156131c05761327e600183613d7d565b915061328b600a86613f11565b613296906030613c97565b60f81b8183815181106132ab576132ab613e16565b60200101906001600160f81b031916908160001a9053506132cd600a86613efd565b945061326d565b6001546001600160a01b0384166133375760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c6f565b613342816001541190565b1561338f5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610c6f565b7f000000000000000000000000000000000000000000000000000000000000000083111561340a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610c6f565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190613466908790613e54565b6001600160801b031681526020018583602001516134849190613e54565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156135a35760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461356760008884886130c9565b6135835760405162461bcd60e51b8152600401610c6f90613d94565b8161358d81613d49565b925050808061359b90613d49565b91505061351a565b506001819055611905565b8280546135ba90613b14565b90600052602060002090601f0160209004810192826135dc5760008555613622565b82601f106135f557805160ff1916838001178555613622565b82800160010185558215613622579182015b82811115613622578251825591602001919060010190613607565b50611ac99291505b80821115611ac9576000815560010161362a565b80356001600160a01b038116811461365557600080fd5b919050565b60006020828403121561366c57600080fd5b6124a58261363e565b6001600160e01b03198116811461233457600080fd5b60006020828403121561369d57600080fd5b81356124a581613675565b6000602082840312156136ba57600080fd5b5035919050565b60005b838110156136dc5781810151838201526020016136c4565b8381111561121d5750506000910152565b600081518084526137058160208601602086016136c1565b601f01601f19169290920160200192915050565b6020815260006124a560208301846136ed565b6000806040838503121561373f57600080fd5b6137488361363e565b946020939093013593505050565b60008083601f84011261376857600080fd5b5081356001600160401b0381111561377f57600080fd5b6020830191508360208260051b850101111561379a57600080fd5b9250929050565b6000806000604084860312156137b657600080fd5b8335925060208401356001600160401b038111156137d357600080fd5b6137df86828701613756565b9497909650939450505050565b6000602082840312156137fe57600080fd5b813560ff811681146124a557600080fd5b60008060006060848603121561382457600080fd5b61382d8461363e565b925061383b6020850161363e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561387b5761387b61384b565b604051601f8501601f19908116603f011681019082821181831017156138a3576138a361384b565b816040528093508581528686860111156138bc57600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156138e857600080fd5b81356001600160401b038111156138fe57600080fd5b8201601f8101841361390f57600080fd5b6131c084823560208401613861565b6000806000806060858703121561393457600080fd5b8435935060208501356001600160401b0381111561395157600080fd5b61395d87828801613756565b9598909750949560400135949350505050565b6000806040838503121561398357600080fd5b61398c8361363e565b9150602083013580151581146139a157600080fd5b809150509250929050565b600080600080608085870312156139c257600080fd5b6139cb8561363e565b93506139d96020860161363e565b92506040850135915060608501356001600160401b038111156139fb57600080fd5b8501601f81018713613a0c57600080fd5b613a1b87823560208401613861565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015613a5f57835183529284019291840191600101613a43565b50909695505050505050565b60008060208385031215613a7e57600080fd5b82356001600160401b03811115613a9457600080fd5b613aa085828601613756565b90969095509350505050565b60008060408385031215613abf57600080fd5b613ac88361363e565b9150613ad66020840161363e565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680613b2857607f821691505b60208210811415613b4957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601d908201527f43414e4e4f545f4d494e545f4f4e5f5448455f53414d455f424c4f434b000000604082015260600190565b6020808252601d908201527f434f4e5452414354535f4e4f545f414c4c4f5745445f544f5f4d494e54000000604082015260600190565b6020808252601b908201527f465245455f4d494e545f49535f4e4f545f5945545f4143544956450000000000604082015260600190565b6020808252601e908201527f50524553414c455f4d494e545f49535f4e4f545f5945545f4143544956450000604082015260600190565b6020808252601d908201527f524146464c455f4d494e545f49535f4e4f545f5945545f414354495645000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613c9257613c92613c62565b500290565b60008219821115613caa57613caa613c62565b500190565b6020808252601f908201527f4e4f545f414c4c4f5745445f544f5f4d494e545f4d4f52455f5448414e5f3200604082015260600190565b60208082526018908201527f455843454544535f4d41585f50524553414c455f4d494e540000000000000000604082015260600190565b602080825260129082015271455843454544535f4d41585f535550504c5960701b604082015260600190565b6000600019821415613d5d57613d5d613c62565b5060010190565b600060208284031215613d7657600080fd5b5051919050565b600082821015613d8f57613d8f613c62565b500390565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60008351613df98184602088016136c1565b835190830190613e0d8183602088016136c1565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b0383811690831681811015613e4c57613e4c613c62565b039392505050565b60006001600160801b03808316818516808303821115613e0d57613e0d613c62565b600081613e8557613e85613c62565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ec0908301846136ed565b9695505050505050565b600060208284031215613edc57600080fd5b81516124a581613675565b634e487b7160e01b600052601260045260246000fd5b600082613f0c57613f0c613ee7565b500490565b600082613f2057613f20613ee7565b50069056fea2646970667358221220d9a7b821abf9c50a63e5a228f5e77275a4e0d9621240c7eac6e81a5e76bf92e264736f6c634300080b003300000000000000000000000077c7f7dc1b592e884966f0dc4ae0ffb93cba1a7e6b4a7305ffdf7b9967a78c20ae8e0fe9f2a7b3ee1008a61f05633c1d53f1e67f7686644e66131ad073c9f9e08013efa0d02e962f896d64861d04b7897ed2e471ce82fda8eaf87a5e643258f7f79f36c31a4182b54e51182526fe4b2227790978e62edbb82a1414de0e5d81626d955a6c522109dc5ab8bc9ac3c469e19929e739
Deployed Bytecode
0x6080604052600436106103cd5760003560e01c80636352211e116101fd578063bc01197311610118578063da87741b116100ab578063e3f03a5a1161007a578063e3f03a5a14610b1f578063e985e9c514610b39578063eaff7b2d14610b82578063eb07b95314610b98578063f2fde38b14610bb857600080fd5b8063da87741b14610aa9578063dca1454714610ad6578063df573ca514610ae9578063e357a51f14610aff57600080fd5b8063c87b56dd116100e7578063c87b56dd14610a3e578063cc7eee1e14610a5e578063d2a9a1a814610a7e578063d7224ba014610a9357600080fd5b8063bc011973146109ce578063c0f728ad146109e4578063c10b8e4414610a04578063c344164614610a2457600080fd5b806391d8301611610190578063a591252d1161015f578063a591252d1461094f578063ab06bdb01461096e578063b45762781461098e578063b88d4fde146109ae57600080fd5b806391d83016146108cf57806395d89b41146108ff578063a035b1fe14610914578063a22cb4651461092f57600080fd5b8063715018a6116101cc578063715018a614610867578063716e83ca1461087c57806389b0649b1461089c5780638da5cb5b146108b157600080fd5b80636352211e146107f25780636aeeaedd146108125780636c0360eb1461083257806370a082311461084757600080fd5b806323b872dd116102ed57806342842e0e1161028057806355f804b31161024f57806355f804b31461077357806357b8dc041461079357806360d938dc146107b357806362f85a77146107d257600080fd5b806342842e0e146106fe578063440c9a4a1461071e5780634f6ccce71461073e5780635533b18d1461075e57600080fd5b80632f745c59116102bc5780632f745c59146106885780632f9eeefc146106a85780633a1c5834146106c85780633ccfd60b146106e957600080fd5b806323b872dd14610605578063257d1bd11461062557806328d7b276146106525780632f71a9e31461067257600080fd5b80630c0a6b5e11610365578063189006221161033457806318900622146105895780631c3e88f6146105b957806321bdb26e146105d957806322d59d54146105ef57600080fd5b80630c0a6b5e1461050e5780630d4a1ac7146105215780630f7d3b431461054157806318160ddd1461057457600080fd5b806306fdde03116103a157806306fdde031461047a57806307e309781461049c578063081812fc146104ce578063095ea7b3146104ee57600080fd5b8062d08060146103d257806301ffc9a714610412578063021f7867146104425780630387805814610458575b600080fd5b3480156103de57600080fd5b506103ff6103ed36600461365a565b60156020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561041e57600080fd5b5061043261042d36600461368b565b610bd8565b6040519015158152602001610409565b34801561044e57600080fd5b506103ff60125481565b34801561046457600080fd5b506104786104733660046136a8565b610c45565b005b34801561048657600080fd5b5061048f610c7d565b6040516104099190613719565b3480156104a857600080fd5b50601d546001600160a01b03165b6040516001600160a01b039091168152602001610409565b3480156104da57600080fd5b506104b66104e93660046136a8565b610d0f565b3480156104fa57600080fd5b5061047861050936600461372c565b610d9a565b61047861051c3660046137a1565b610eb2565b34801561052d57600080fd5b5061047861053c3660046137ec565b611223565b34801561054d57600080fd5b50600c54610562906301000000900460ff1681565b60405160ff9091168152602001610409565b34801561058057600080fd5b506001546103ff565b34801561059557600080fd5b506104326105a43660046136a8565b60146020526000908152604090205460ff1681565b3480156105c557600080fd5b506104786105d43660046136a8565b61126d565b3480156105e557600080fd5b506103ff600e5481565b3480156105fb57600080fd5b506103ff600d5481565b34801561061157600080fd5b5061047861062036600461380f565b61129c565b34801561063157600080fd5b506103ff61064036600461365a565b60166020526000908152604090205481565b34801561065e57600080fd5b5061047861066d3660046136a8565b6112a7565b34801561067e57600080fd5b506103ff600b5481565b34801561069457600080fd5b506103ff6106a336600461372c565b6112d6565b3480156106b457600080fd5b506104786106c33660046137a1565b61144e565b3480156106d457600080fd5b50600c5461056290600160201b900460ff1681565b3480156106f557600080fd5b5061047861190d565b34801561070a57600080fd5b5061047861071936600461380f565b611a1a565b34801561072a57600080fd5b506104786107393660046136a8565b611a35565b34801561074a57600080fd5b506103ff6107593660046136a8565b611a64565b34801561076a57600080fd5b50610478611acd565b34801561077f57600080fd5b5061047861078e3660046138d6565b611b16565b34801561079f57600080fd5b506104786107ae3660046136a8565b611b53565b3480156107bf57600080fd5b5060115461043290610100900460ff1681565b3480156107de57600080fd5b506104786107ed36600461391e565b611b82565b3480156107fe57600080fd5b506104b661080d3660046136a8565b611f30565b34801561081e57600080fd5b5061047861082d3660046137ec565b611f42565b34801561083e57600080fd5b5061048f611f82565b34801561085357600080fd5b506103ff61086236600461365a565b612010565b34801561087357600080fd5b506104786120a1565b34801561088857600080fd5b506104786108973660046137ec565b6120d7565b3480156108a857600080fd5b5061047861211f565b3480156108bd57600080fd5b506000546001600160a01b03166104b6565b3480156108db57600080fd5b506104326108ea36600461365a565b60176020526000908152604090205460ff1681565b34801561090b57600080fd5b5061048f612166565b34801561092057600080fd5b506103ff66f523226980800081565b34801561093b57600080fd5b5061047861094a366004613970565b612175565b34801561095b57600080fd5b50600c5461056290610100900460ff1681565b34801561097a57600080fd5b506104786109893660046136a8565b61223a565b34801561099a57600080fd5b50600c546105629062010000900460ff1681565b3480156109ba57600080fd5b506104786109c93660046139ac565b612337565b3480156109da57600080fd5b506103ff60135481565b3480156109f057600080fd5b506104786109ff3660046136a8565b61236a565b348015610a1057600080fd5b50610478610a1f3660046137ec565b612399565b348015610a3057600080fd5b506011546104329060ff1681565b348015610a4a57600080fd5b5061048f610a593660046136a8565b6123df565b348015610a6a57600080fd5b506011546104329062010000900460ff1681565b348015610a8a57600080fd5b506104786124ac565b348015610a9f57600080fd5b506103ff60085481565b348015610ab557600080fd5b50610ac9610ac436600461365a565b6124ea565b6040516104099190613a27565b610478610ae4366004613a6b565b61258b565b348015610af557600080fd5b506103ff600f5481565b348015610b0b57600080fd5b50610478610b1a3660046136a8565b6128ad565b348015610b2b57600080fd5b50600c546105629060ff1681565b348015610b4557600080fd5b50610432610b54366004613aac565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b8e57600080fd5b506103ff60105481565b348015610ba457600080fd5b50601d546104b6906001600160a01b031681565b348015610bc457600080fd5b50610478610bd336600461365a565b6128dc565b60006001600160e01b031982166380ac58cd60e01b1480610c0957506001600160e01b03198216635b5e139f60e01b145b80610c2457506001600160e01b0319821663780e9d6360e01b145b80610c3f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610c785760405162461bcd60e51b8152600401610c6f90613adf565b60405180910390fd5b600f55565b606060028054610c8c90613b14565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb890613b14565b8015610d055780601f10610cda57610100808354040283529160200191610d05565b820191906000526020600020905b815481529060010190602001808311610ce857829003601f168201915b5050505050905090565b6000610d1c826001541190565b610d7e5760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610c6f565b506000908152600660205260409020546001600160a01b031690565b6000610da582611f30565b9050806001600160a01b0316836001600160a01b03161415610e145760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610c6f565b336001600160a01b0382161480610e305750610e308133610b54565b610ea25760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610c6f565b610ead838383612974565b505050565b336000908152601860205260409020546002904211610ee35760405162461bcd60e51b8152600401610c6f90613b4f565b323314610f025760405162461bcd60e51b8152600401610c6f90613b86565b8060ff1660011415610f365760115462010000900460ff16610f365760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff1660021415610f6957601154610100900460ff16610f695760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff1660031415610f975760115460ff16610f975760405162461bcd60e51b8152600401610c6f90613c2b565b610fa88466f5232269808000613c78565b3414610fed5760405162461bcd60e51b8152602060048201526014602482015273125394d551919250d251539517d410565351539560621b6044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611017908690613c97565b11156110355760405162461bcd60e51b8152600401610c6f90613caf565b600c5433600090815260166020526040902054600160201b90910460ff169061105f908690613c97565b111561107d5760405162461bcd60e51b8152600401610c6f90613ce6565b600e548460135461108e9190613c97565b11156110dc5760405162461bcd60e51b815260206004820152601a60248201527f455843454544535f4d41585f50524553414c455f535550504c590000000000006044820152606401610c6f565b601054846110e960015490565b6110f39190613c97565b11156111115760405162461bcd60e51b8152600401610c6f90613d1d565b61118283838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601b546040516001600160601b03193360601b16602082015290925060340190505b604051602081830303815290604052805190602001206129d0565b6111c85760405162461bcd60e51b815260206004820152601760248201527624a72b20a624a22faba424aa22a624a9aa2fa82927a7a360491b6044820152606401610c6f565b3360009081526018602090815260408083204290556016909152812080548692906111f4908490613c97565b92505081905550836013600082825461120d9190613c97565b9091555061121d90503385612a7f565b50505050565b6000546001600160a01b0316331461124d5760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff90921663010000000263ff00000019909216919091179055565b6000546001600160a01b031633146112975760405162461bcd60e51b8152600401610c6f90613adf565b600d55565b610ead838383612a99565b6000546001600160a01b031633146112d15760405162461bcd60e51b8152600401610c6f90613adf565b601b55565b60006112e183612010565b821061133a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610c6f565b600061134560015490565b905060008060005b838110156113ee576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561139f57805192505b876001600160a01b0316836001600160a01b031614156113db57868414156113cd57509350610c3f92505050565b836113d781613d49565b9450505b50806113e681613d49565b91505061134d565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610c6f565b33600090815260186020526040902054600190421161147f5760405162461bcd60e51b8152600401610c6f90613b4f565b32331461149e5760405162461bcd60e51b8152600401610c6f90613b86565b8060ff16600114156114d25760115462010000900460ff166114d25760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff166002141561150557601154610100900460ff166115055760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff16600314156115335760115460ff166115335760405162461bcd60e51b8152600401610c6f90613c2b565b601d546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190613d64565b905060006115af338784612e1b565b9050600d5460125460016115c39190613c97565b111561160c5760405162461bcd60e51b8152602060048201526018602482015277455843454544535f465245455f4d494e545f535550504c5960401b6044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611636906001613c97565b111561167b5760405162461bcd60e51b815260206004820152601460248201527320a62922a0a22cafa6a4a72a22a22fa6a0ac2f9960611b6044820152606401610c6f565b600c5433600090815260166020526040902054600160201b90910460ff16906116a5906001613c97565b11156116c35760405162461bcd60e51b8152600401610c6f90613ce6565b6010546001546116d4906001613c97565b11156116f25760405162461bcd60e51b8152600401610c6f90613d1d565b61174c858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506019546040516001600160601b03193360601b1660208201529092506034019050611167565b6117ab5760405162461bcd60e51b815260206004820152602a60248201527f594f555f4152455f4e4f545f57484954454c49535445445f544f5f4d494e545f604482015269465245455f57424f4e4560b01b6064820152608401610c6f565b806117f15760405162461bcd60e51b8152602060048201526016602482015275555345525f444f5f4e4f545f4f574e5f415f424f4e4560501b6044820152606401610c6f565b600082116118305760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f424f4e455f5041535360a01b6044820152606401610c6f565b60008681526014602052604090205460ff161561188f5760405162461bcd60e51b815260206004820152601d60248201527f424f4e455f414c52454144595f555345445f464f525f4d494e54494e470000006044820152606401610c6f565b3360009081526015602052604081208054600192906118af908490613c97565b909155505033600090815260186020908152604080832042905588835260149091528120805460ff1916600190811790915560128054919290916118f4908490613c97565b909155506119059050336001612a7f565b505050505050565b6000546001600160a01b031633146119375760405162461bcd60e51b8152600401610c6f90613adf565b478061197e5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610c6f565b604051600090339083908381818185875af1925050503d80600081146119c0576040519150601f19603f3d011682016040523d82523d6000602084013e6119c5565b606091505b5050905080611a165760405162461bcd60e51b815260206004820152601a60248201527f4661696c656420746f207769746864726177207061796d656e740000000000006044820152606401610c6f565b5050565b610ead83838360405180602001604052806000815250612337565b6000546001600160a01b03163314611a5f5760405162461bcd60e51b8152600401610c6f90613adf565b601955565b6000611a6f60015490565b8210611ac95760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610c6f565b5090565b6000546001600160a01b03163314611af75760405162461bcd60e51b8152600401610c6f90613adf565b6011805462ff0000198116620100009182900460ff1615909102179055565b6000546001600160a01b03163314611b405760405162461bcd60e51b8152600401610c6f90613adf565b8051611a1690600a9060208401906135ae565b6000546001600160a01b03163314611b7d5760405162461bcd60e51b8152600401610c6f90613adf565b601a55565b336000908152601860205260409020546001904211611bb35760405162461bcd60e51b8152600401610c6f90613b4f565b323314611bd25760405162461bcd60e51b8152600401610c6f90613b86565b8060ff1660011415611c065760115462010000900460ff16611c065760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff1660021415611c3957601154610100900460ff16611c395760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff1660031415611c675760115460ff16611c675760405162461bcd60e51b8152600401610c6f90613c2b565b600d5485601254611c789190613c97565b1115611cc15760405162461bcd60e51b8152602060048201526018602482015277455843454544535f465245455f4d494e545f535550504c5960401b6044820152606401610c6f565b336000908152601560205260409020548290611cde908790613c97565b1115611d2c5760405162461bcd60e51b815260206004820152601d60248201527f43414e4e4f545f4d494e545f4d4f52455f5448414e5f414c4c4f5745440000006044820152606401610c6f565b600c5433600090815260156020526040902054600160201b90910460ff1690611d56908790613c97565b1115611d9b5760405162461bcd60e51b815260206004820152601460248201527320a62922a0a22cafa6a4a72a22a22fa6a0ac2f9960611b6044820152606401610c6f565b600c5433600090815260166020526040902054600160201b90910460ff1690611dc5908790613c97565b1115611de35760405162461bcd60e51b8152600401610c6f90613ce6565b60105485611df060015490565b611dfa9190613c97565b1115611e185760405162461bcd60e51b8152600401610c6f90613d1d565b611e7984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601a546040516001600160601b03193360601b166020820152603481018890529092506054019050611167565b611ed15760405162461bcd60e51b8152602060048201526024808201527f594f555f4152455f4e4f545f57484954454c49535445445f544f5f4d494e545f6044820152634652454560e01b6064820152608401610c6f565b3360009081526015602052604081208054879290611ef0908490613c97565b909155505033600090815260186020526040812042905560128054879290611f19908490613c97565b90915550611f2990503386612a7f565b5050505050565b6000611f3b82612ed0565b5192915050565b6000546001600160a01b03163314611f6c5760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff191660ff92909216919091179055565b600a8054611f8f90613b14565b80601f0160208091040260200160405190810160405280929190818152602001828054611fbb90613b14565b80156120085780601f10611fdd57610100808354040283529160200191612008565b820191906000526020600020905b815481529060010190602001808311611feb57829003601f168201915b505050505081565b60006001600160a01b03821661207c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610c6f565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b031633146120cb5760405162461bcd60e51b8152600401610c6f90613adf565b6120d56000613079565b565b6000546001600160a01b031633146121015760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff909216620100000262ff000019909216919091179055565b6000546001600160a01b031633146121495760405162461bcd60e51b8152600401610c6f90613adf565b6011805461ff001981166101009182900460ff1615909102179055565b606060038054610c8c90613b14565b6001600160a01b0382163314156121ce5760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610c6f565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b031633146122645760405162461bcd60e51b8152600401610c6f90613adf565b6000600b54116122c05760405162461bcd60e51b815260206004820152602160248201527f4e4654535f464f525f5448455f5445414d5f4841535f4245454e5f4d494e54456044820152601160fa1b6064820152608401610c6f565b600b548111156123125760405162461bcd60e51b815260206004820152601960248201527f455843454544535f4d41585f4d494e545f464f525f5445414d000000000000006044820152606401610c6f565b80600b60008282546123249190613d7d565b9091555061233490503382612a7f565b50565b612342848484612a99565b61234e848484846130c9565b61121d5760405162461bcd60e51b8152600401610c6f90613d94565b6000546001600160a01b031633146123945760405162461bcd60e51b8152600401610c6f90613adf565b601c55565b6000546001600160a01b031633146123c35760405162461bcd60e51b8152600401610c6f90613adf565b600c805460ff9092166101000261ff0019909216919091179055565b60606123ec826001541190565b6124505760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c6f565b600061245a6131c8565b9050600081511161247a57604051806020016040528060008152506124a5565b80612484846131d7565b604051602001612495929190613de7565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146124d65760405162461bcd60e51b8152600401610c6f90613adf565b6011805460ff19811660ff90911615179055565b606060006124f783612010565b90506000816001600160401b038111156125135761251361384b565b60405190808252806020026020018201604052801561253c578160200160208202803683370190505b50905060005b828110156125835761255485826112d6565b82828151811061256657612566613e16565b60209081029190910101528061257b81613d49565b915050612542565b509392505050565b3360009081526018602052604090205460039042116125bc5760405162461bcd60e51b8152600401610c6f90613b4f565b3233146125db5760405162461bcd60e51b8152600401610c6f90613b86565b8060ff166001141561260f5760115462010000900460ff1661260f5760405162461bcd60e51b8152600401610c6f90613bbd565b8060ff166002141561264257601154610100900460ff166126425760405162461bcd60e51b8152600401610c6f90613bf4565b8060ff16600314156126705760115460ff166126705760405162461bcd60e51b8152600401610c6f90613c2b565b600c5461268e906301000000900460ff1666f5232269808000613c78565b34146126cf5760405162461bcd60e51b815260206004820152601060248201526f13505617d352539517d4915050d2115160821b6044820152606401610c6f565b601054600c5460ff6301000000909104166126e960015490565b6126f39190613c97565b11156127115760405162461bcd60e51b8152600401610c6f90613d1d565b3360009081526017602052604090205460ff16156127715760405162461bcd60e51b815260206004820152601760248201527f455843454544535f4d41585f524146464c455f4d494e540000000000000000006044820152606401610c6f565b336000908152601560205260409020546001116127a05760405162461bcd60e51b8152600401610c6f90613caf565b336000908152601660205260409020546001116127cf5760405162461bcd60e51b8152600401610c6f90613caf565b61282983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c546040516001600160601b03193360601b1660208201529092506034019050611167565b61286f5760405162461bcd60e51b815260206004820152601760248201527624a72b20a624a22faba424aa22a624a9aa2fa82927a7a360491b6044820152606401610c6f565b33600081815260186020908152604080832042905560179091529020805460ff19166001179055600c54610ead91906301000000900460ff16612a7f565b6000546001600160a01b031633146128d75760405162461bcd60e51b8152600401610c6f90613adf565b600e55565b6000546001600160a01b031633146129065760405162461bcd60e51b8152600401610c6f90613adf565b6001600160a01b03811661296b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c6f565b61233481613079565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600081815b8551811015612a745760008682815181106129f2576129f2613e16565b60200260200101519050808311612a34576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612a61565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612a6c81613d49565b9150506129d5565b509092149392505050565b611a168282604051806020016040528060008152506132d4565b6000612aa482612ed0565b80519091506000906001600160a01b0316336001600160a01b03161480612adb575033612ad084610d0f565b6001600160a01b0316145b80612aed57508151612aed9033610b54565b905080612b575760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610c6f565b846001600160a01b031682600001516001600160a01b031614612bcb5760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610c6f565b6001600160a01b038416612c2f5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c6f565b612c3f6000848460000151612974565b6001600160a01b0385166000908152600560205260408120805460019290612c719084906001600160801b0316613e2c565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b03861660009081526005602052604081208054600194509092612cbd91859116613e54565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055612d44846001613c97565b6000818152600460205260409020549091506001600160a01b0316612dd557612d6e816001541190565b15612dd55760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611905565b6000805b82811015612ec557601d54604051632f745c5960e01b81526001600160a01b038781166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015612e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e9d9190613d64565b905084811415612eb2576001925050506124a5565b5080612ebd81613d49565b915050612e1f565b506000949350505050565b6040805180820190915260008082526020820152612eef826001541190565b612f4e5760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610c6f565b60007f00000000000000000000000000000000000000000000000000000000000000328310612faf57612fa17f000000000000000000000000000000000000000000000000000000000000003284613d7d565b612fac906001613c97565b90505b825b818110613018576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561300557949350505050565b508061301081613e76565b915050612fb1565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610c6f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0384163b156131bc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061310d903390899088908890600401613e8d565b6020604051808303816000875af1925050508015613148575060408051601f3d908101601f1916820190925261314591810190613eca565b60015b6131a2573d808015613176576040519150601f19603f3d011682016040523d82523d6000602084013e61317b565b606091505b50805161319a5760405162461bcd60e51b8152600401610c6f90613d94565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506131c0565b5060015b949350505050565b6060600a8054610c8c90613b14565b6060816131fb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613225578061320f81613d49565b915061321e9050600a83613efd565b91506131ff565b6000816001600160401b0381111561323f5761323f61384b565b6040519080825280601f01601f191660200182016040528015613269576020820181803683370190505b5090505b84156131c05761327e600183613d7d565b915061328b600a86613f11565b613296906030613c97565b60f81b8183815181106132ab576132ab613e16565b60200101906001600160f81b031916908160001a9053506132cd600a86613efd565b945061326d565b6001546001600160a01b0384166133375760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c6f565b613342816001541190565b1561338f5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610c6f565b7f000000000000000000000000000000000000000000000000000000000000003283111561340a5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610c6f565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190613466908790613e54565b6001600160801b031681526020018583602001516134849190613e54565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b858110156135a35760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461356760008884886130c9565b6135835760405162461bcd60e51b8152600401610c6f90613d94565b8161358d81613d49565b925050808061359b90613d49565b91505061351a565b506001819055611905565b8280546135ba90613b14565b90600052602060002090601f0160209004810192826135dc5760008555613622565b82601f106135f557805160ff1916838001178555613622565b82800160010185558215613622579182015b82811115613622578251825591602001919060010190613607565b50611ac99291505b80821115611ac9576000815560010161362a565b80356001600160a01b038116811461365557600080fd5b919050565b60006020828403121561366c57600080fd5b6124a58261363e565b6001600160e01b03198116811461233457600080fd5b60006020828403121561369d57600080fd5b81356124a581613675565b6000602082840312156136ba57600080fd5b5035919050565b60005b838110156136dc5781810151838201526020016136c4565b8381111561121d5750506000910152565b600081518084526137058160208601602086016136c1565b601f01601f19169290920160200192915050565b6020815260006124a560208301846136ed565b6000806040838503121561373f57600080fd5b6137488361363e565b946020939093013593505050565b60008083601f84011261376857600080fd5b5081356001600160401b0381111561377f57600080fd5b6020830191508360208260051b850101111561379a57600080fd5b9250929050565b6000806000604084860312156137b657600080fd5b8335925060208401356001600160401b038111156137d357600080fd5b6137df86828701613756565b9497909650939450505050565b6000602082840312156137fe57600080fd5b813560ff811681146124a557600080fd5b60008060006060848603121561382457600080fd5b61382d8461363e565b925061383b6020850161363e565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561387b5761387b61384b565b604051601f8501601f19908116603f011681019082821181831017156138a3576138a361384b565b816040528093508581528686860111156138bc57600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156138e857600080fd5b81356001600160401b038111156138fe57600080fd5b8201601f8101841361390f57600080fd5b6131c084823560208401613861565b6000806000806060858703121561393457600080fd5b8435935060208501356001600160401b0381111561395157600080fd5b61395d87828801613756565b9598909750949560400135949350505050565b6000806040838503121561398357600080fd5b61398c8361363e565b9150602083013580151581146139a157600080fd5b809150509250929050565b600080600080608085870312156139c257600080fd5b6139cb8561363e565b93506139d96020860161363e565b92506040850135915060608501356001600160401b038111156139fb57600080fd5b8501601f81018713613a0c57600080fd5b613a1b87823560208401613861565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b81811015613a5f57835183529284019291840191600101613a43565b50909695505050505050565b60008060208385031215613a7e57600080fd5b82356001600160401b03811115613a9457600080fd5b613aa085828601613756565b90969095509350505050565b60008060408385031215613abf57600080fd5b613ac88361363e565b9150613ad66020840161363e565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680613b2857607f821691505b60208210811415613b4957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601d908201527f43414e4e4f545f4d494e545f4f4e5f5448455f53414d455f424c4f434b000000604082015260600190565b6020808252601d908201527f434f4e5452414354535f4e4f545f414c4c4f5745445f544f5f4d494e54000000604082015260600190565b6020808252601b908201527f465245455f4d494e545f49535f4e4f545f5945545f4143544956450000000000604082015260600190565b6020808252601e908201527f50524553414c455f4d494e545f49535f4e4f545f5945545f4143544956450000604082015260600190565b6020808252601d908201527f524146464c455f4d494e545f49535f4e4f545f5945545f414354495645000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613c9257613c92613c62565b500290565b60008219821115613caa57613caa613c62565b500190565b6020808252601f908201527f4e4f545f414c4c4f5745445f544f5f4d494e545f4d4f52455f5448414e5f3200604082015260600190565b60208082526018908201527f455843454544535f4d41585f50524553414c455f4d494e540000000000000000604082015260600190565b602080825260129082015271455843454544535f4d41585f535550504c5960701b604082015260600190565b6000600019821415613d5d57613d5d613c62565b5060010190565b600060208284031215613d7657600080fd5b5051919050565b600082821015613d8f57613d8f613c62565b500390565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60008351613df98184602088016136c1565b835190830190613e0d8183602088016136c1565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b0383811690831681811015613e4c57613e4c613c62565b039392505050565b60006001600160801b03808316818516808303821115613e0d57613e0d613c62565b600081613e8557613e85613c62565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ec0908301846136ed565b9695505050505050565b600060208284031215613edc57600080fd5b81516124a581613675565b634e487b7160e01b600052601260045260246000fd5b600082613f0c57613f0c613ee7565b500490565b600082613f2057613f20613ee7565b50069056fea2646970667358221220d9a7b821abf9c50a63e5a228f5e77275a4e0d9621240c7eac6e81a5e76bf92e264736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000077c7f7dc1b592e884966f0dc4ae0ffb93cba1a7e6b4a7305ffdf7b9967a78c20ae8e0fe9f2a7b3ee1008a61f05633c1d53f1e67f7686644e66131ad073c9f9e08013efa0d02e962f896d64861d04b7897ed2e471ce82fda8eaf87a5e643258f7f79f36c31a4182b54e51182526fe4b2227790978e62edbb82a1414de0e5d81626d955a6c522109dc5ab8bc9ac3c469e19929e739
-----Decoded View---------------
Arg [0] : boneContractAddress (address): 0x77C7f7Dc1b592E884966f0dc4AE0fFB93CBA1a7e
Arg [1] : boneRoot (bytes32): 0x6b4a7305ffdf7b9967a78c20ae8e0fe9f2a7b3ee1008a61f05633c1d53f1e67f
Arg [2] : freeRoot (bytes32): 0x7686644e66131ad073c9f9e08013efa0d02e962f896d64861d04b7897ed2e471
Arg [3] : presaleRoot (bytes32): 0xce82fda8eaf87a5e643258f7f79f36c31a4182b54e51182526fe4b2227790978
Arg [4] : raffleRoot (bytes32): 0xe62edbb82a1414de0e5d81626d955a6c522109dc5ab8bc9ac3c469e19929e739
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000077c7f7dc1b592e884966f0dc4ae0ffb93cba1a7e
Arg [1] : 6b4a7305ffdf7b9967a78c20ae8e0fe9f2a7b3ee1008a61f05633c1d53f1e67f
Arg [2] : 7686644e66131ad073c9f9e08013efa0d02e962f896d64861d04b7897ed2e471
Arg [3] : ce82fda8eaf87a5e643258f7f79f36c31a4182b54e51182526fe4b2227790978
Arg [4] : e62edbb82a1414de0e5d81626d955a6c522109dc5ab8bc9ac3c469e19929e739
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.