ETH Price: $3,333.95 (-3.87%)
Gas: 5 Gwei

Token

Galaxii Online Tribes (GOT)
 

Overview

Max Total Supply

78 GOT

Holders

41

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
noskittles.eth
Balance
1 GOT
0xefb89cf6c608bf7cde59e0e0ec10734cc42894d5
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
TribeNFT

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : TribeNFT.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma abicoder v2;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";

contract TribeNFT is ERC721, IERC721Receiver, IERC2981, Ownable {
  using Strings for uint256;
  using Address for address;

  event MintedTribe(
    address indexed to,
    string name,
    uint256 tokenId
  );

  event BatchMintedTribe(
    address indexed to,
    string name,
    uint256 quantity,
    uint256[] tokenIds
  );

  event TradeInLootBox(
    address indexed from,
    uint256 lootboxTokenId
  );

  struct TribeToken {
    uint8   tribeIndex;
    uint256 tribeId;
  }

  struct Tribe {
    string  name;
    uint256 supply;
    string  baseURI;
    bool    isUnlocked;
    bool    isTradeable;
  }

  // Receiver of all mint revenue (payment splitter)
  address payable private immutable _receiver;

  IERC721 private LOOTBOX = IERC721(0xB3246C9BD4EF9D9178F87B80fE488104440c3Bd6);

  // Each tokenId will have a corresponding TribeToken and tribeId
  mapping(uint256 => TribeToken) internal _tribeTokens;

  mapping(uint8 => Tribe) internal _tribes;

  uint256 internal immutable _numOfTribes;

  uint256 public constant maxSupplyPerTribe = 1111;

  uint256 public constant mintPrice = 0.1 ether;

  uint256 public totalSupply;


  constructor(address payable receiver_, address owner_, string[] memory tribeNames_) ERC721("Galaxii Online Tribes", "GOT") {
    require(receiver_ != address(0), "TribeNFT: receiver_ cannot be null address");
    require(owner_ != address(0), "TribeNFT: owner_ cannot be null address");

    _receiver = receiver_;

    for(uint8 i=0; i < tribeNames_.length; i++) {
      require(bytes(tribeNames_[i]).length > 0, "TribeNFT: tribe name is empty string");
      _tribes[i] = Tribe(tribeNames_[i], 0, "", false, false);
    }

    _numOfTribes = tribeNames_.length;

    transferOwnership(owner_);
  }

  modifier isTribe(uint8 index) {
		require(index < _numOfTribes, "TribeNFT: no tribe exists at index");
    _;
  }

  /**
    * @dev See {IERC165-supportsInterface}.
    */
  function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
      return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
  }

  /**
   * @dev Mint token via msg.value payment
   */
  function mint(uint8 index) payable public isTribe(index) {
    require(_tribes[index].isUnlocked, "TribeNFT: tribe is locked and cannot pay to mint");
    require(msg.value >= mintPrice, "TribeNFT: msg.value is below 0.1 ETH");

		string memory tribeName = _tribes[index].name;

    uint256 tokenId = totalSupply;
    uint256 tribeId = _tribes[index].supply + 1;

    require(_tribes[index].supply < maxSupplyPerTribe, "TribeNFT: each tribe cannot exceed 1111 max supply");

    TribeToken memory token = TribeToken(index, tribeId);
    
    Address.sendValue(_receiver, msg.value);

    _tribeTokens[tokenId] = token;
    _tribes[index].supply++;
    totalSupply++;

    _safeMint(msg.sender, tokenId);
    emit MintedTribe(msg.sender, tribeName, tokenId);
  }

  /**
   * @dev Mint token via trading in a Loot Box token
   */
  function mint(uint8 index, uint256 lootBoxId) public isTribe(index) {
    require(_tribes[index].isTradeable, "TribeNFT: tribe is not mintable for trade-in");
    require(LOOTBOX.ownerOf(lootBoxId) == msg.sender, "TribeNFT: must be lootbox owner to trade in for mint");
    require(
			LOOTBOX.getApproved(lootBoxId) == address(this) || LOOTBOX.isApprovedForAll(msg.sender, address(this)), 
			"TribeNFT: not approved to trade in lootbox token"
		);

		string memory tribeName = _tribes[index].name;
		
    uint256 tokenId = totalSupply;
    uint256 tribeId = _tribes[index].supply + 1;

    require(_tribes[index].supply < maxSupplyPerTribe, "TribeNFT: each tribe cannot exceed 1111 max supply");

    TribeToken memory token = TribeToken(index, tribeId);
    
    LOOTBOX.safeTransferFrom(msg.sender, address(this), lootBoxId);
    emit TradeInLootBox(msg.sender, lootBoxId);

    _tribeTokens[tokenId] = token;
    _tribes[index].supply++;
    totalSupply++;

    _safeMint(msg.sender, tokenId);
    emit MintedTribe(msg.sender, tribeName, tokenId);
  }

  /**
   * @dev Mint token via msg.value payment
   */
  function mintBatch(uint8 index, uint256 quantity) payable public isTribe(index) {
    require(_tribes[index].isUnlocked, "TribeNFT: tribe is locked and cannot pay to mint");
    require(quantity <= 5, "TribeNFT: only mint up to 5 tokens at a time");
    
    uint256 payment = mintPrice * quantity;
    require(msg.value >= payment, "TribeNFT: msg.value is below amount owed");

    uint256 newSupply = _tribes[index].supply + quantity;
    require(newSupply < maxSupplyPerTribe, "TribeNFT: each tribe cannot exceed 1111 max supply");

    Address.sendValue(_receiver, msg.value);
		_mintBatch(msg.sender, index, quantity);
  }

  /**
   * @dev Mint token via msg.value payment
   */
  function mintBatchAsOwner(address to, uint8 index, uint256 quantity) payable public onlyOwner isTribe(index) {
    require(
      bytes(_tribes[index].baseURI).length > 0, 
      "TribeNFT: tribe has no baseURI"
    );
    require(quantity <= 100, "TribeNFT: quantity limit of 100 tokens per mint");

    uint256 newSupply = _tribes[index].supply + quantity;
    require(newSupply < maxSupplyPerTribe, "TribeNFT: each tribe cannot exceed 1111 max supply");

    if (msg.value >= 0) {
      Address.sendValue(_receiver, msg.value);
    }
    _mintBatch(to, index, quantity);
  }

  /**
  * @dev See {IERC721Metadata-tokenURI}.
  */
  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

    (uint8 index, uint256 tribeId) = _tribeOf(tokenId);

    string memory baseURI = _tribes[index].baseURI;
    return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tribeId.toString(), ".json")) : "";
  }

  function tribeOf(uint256 tokenId) external view returns (uint8 index, uint256 tribeId) {
    (index, tribeId) = _tribeOf(tokenId);
  }

  function setTradeable(uint8 index) external onlyOwner isTribe(index) {
    string memory baseURI = _tribes[index].baseURI;
    require(bytes(baseURI).length > 0, "TribeNFT: no baseURI exists for tribe");

    _tribes[index].isTradeable = true;
  }

  function unlockTribe(uint8 index) external onlyOwner isTribe(index) {
    string memory baseURI = _tribes[index].baseURI;
    require(bytes(baseURI).length > 0, "TribeNFT: no baseURI exists for tribe");

    if (!_tribes[index].isTradeable) {
      _tribes[index].isTradeable = true;
    }

    _tribes[index].isUnlocked = true;
  }

  function setTokenURI(uint8 index, string memory tribeURI) external onlyOwner {
    _tribes[index].baseURI = tribeURI;
  }

  function getAllTribes() public view returns (Tribe[] memory) {
    Tribe[] memory tribes = new Tribe[](_numOfTribes);
    for(uint8 i=0; i < _numOfTribes; i++) {
      tribes[i] = _tribes[i];
    }
    return tribes;
  }

  function getReceiver() public view returns (address) {
    return _receiver;
  }

  /**
    * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
    * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
    */
  function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address receiver, uint256 royaltyAmount) {
    receiver = getReceiver();
    royaltyAmount = (salePrice * 750) / 10000;
  }

  function onERC721Received(
    address,
    address,
    uint256,
    bytes calldata
  ) external override pure returns(bytes4) {
    return this.onERC721Received.selector;
  }

  function _tribeOf(uint256 tokenId) internal view returns (uint8, uint256) {
    TribeToken memory token = _tribeTokens[tokenId];
    return (token.tribeIndex, token.tribeId);
  }

  function _mintBatch(address to, uint8 index, uint256 quantity) private {
    string memory tribeName = _tribes[index].name;
    uint256 tokenId = totalSupply;
    uint256 tribeId = _tribes[index].supply + 1;
    uint256[] memory ids = new uint256[](quantity);

    for(uint256 i=0; i < quantity; i++) {
      TribeToken memory token = TribeToken(index, tribeId);
      ids[i] = tokenId;

      _tribeTokens[tokenId] = token;
      _tribes[index].supply++;
      
      _safeMint(to, tokenId);
      
      tokenId += 1;
      tribeId += 1;
    }

    totalSupply += quantity;

    emit BatchMintedTribe(to, tribeName, quantity, ids);
  }
}

File 2 of 12 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

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 overridden 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 {
        _setApprovalForAll(_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 || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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.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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 3 of 12 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 4 of 12 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 5 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 6 of 12 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 7 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 12 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 9 of 12 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 10 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"receiver_","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"string[]","name":"tribeNames_","type":"string[]"}],"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":"to","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BatchMintedTribe","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MintedTribe","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":false,"internalType":"uint256","name":"lootboxTokenId","type":"uint256"}],"name":"TradeInLootBox","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTribes","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"isUnlocked","type":"bool"},{"internalType":"bool","name":"isTradeable","type":"bool"}],"internalType":"struct TribeNFT.Tribe[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReceiver","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":"maxSupplyPerTribe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint256","name":"lootBoxId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintBatchAsOwner","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"string","name":"tribeURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"setTradeable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tribeOf","outputs":[{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint256","name":"tribeId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"unlockTribe","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600780546001600160a01b03191673b3246c9bd4ef9d9178f87b80fe488104440c3bd61790553480156200003757600080fd5b5060405162003d0138038062003d018339810160408190526200005a91620005dd565b604080518082018252601581527f47616c61786969204f6e6c696e6520547269626573000000000000000000000060208083019182528351808501909452600384526211d3d560ea1b908401528151919291620000ba91600091620004a6565b508051620000d0906001906020840190620004a6565b505050620000ed620000e76200037f60201b60201c565b62000383565b6001600160a01b0383166200015c5760405162461bcd60e51b815260206004820152602a60248201527f54726962654e46543a2072656365697665725f2063616e6e6f74206265206e756044820152696c6c206164647265737360b01b60648201526084015b60405180910390fd5b6001600160a01b038216620001c45760405162461bcd60e51b815260206004820152602760248201527f54726962654e46543a206f776e65725f2063616e6e6f74206265206e756c6c206044820152666164647265737360c81b606482015260840162000153565b6001600160601b0319606084901b1660805260005b81518160ff16101562000365576000828260ff16815181106200020c57634e487b7160e01b600052603260045260246000fd5b60200260200101515111620002705760405162461bcd60e51b8152602060048201526024808201527f54726962654e46543a207472696265206e616d6520697320656d70747920737460448201526372696e6760e01b606482015260840162000153565b6040518060a00160405280838360ff16815181106200029f57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825260008282018190526040805180840182528281528185015260608401829052608090930181905260ff851681526009825291909120825180519192620002f992849290910190620004a6565b506020828101516001830155604083015180516200031e9260028501920190620004a6565b5060608201516003909101805460809093015115156101000261ff00199215159290921661ffff1990931692909217179055806200035c816200074a565b915050620001d9565b50805160a0526200037682620003d5565b505050620007a3565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6006546001600160a01b03163314620004315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000153565b6001600160a01b038116620004985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000153565b620004a38162000383565b50565b828054620004b4906200070d565b90600052602060002090601f016020900481019282620004d8576000855562000523565b82601f10620004f357805160ff191683800117855562000523565b8280016001018555821562000523579182015b828111156200052357825182559160200191906001019062000506565b506200053192915062000535565b5090565b5b8082111562000531576000815560010162000536565b600082601f8301126200055d578081fd5b81516001600160401b0381111562000579576200057962000777565b60206200058f601f8301601f19168201620006da565b8281528582848701011115620005a3578384fd5b835b83811015620005c2578581018301518282018401528201620005a5565b83811115620005d357848385840101525b5095945050505050565b600080600060608486031215620005f2578283fd5b8351620005ff816200078d565b8093505060208085015162000614816200078d565b60408601519093506001600160401b038082111562000631578384fd5b818701915087601f83011262000645578384fd5b8151818111156200065a576200065a62000777565b8060051b6200066b858201620006da565b8281528581019085870183870188018d101562000686578889fd5b8893505b84841015620006c857805186811115620006a257898afd5b620006b28e8a838b01016200054c565b845250600193909301929187019187016200068a565b50809750505050505050509250925092565b604051601f8201601f191681016001600160401b038111828210171562000705576200070562000777565b604052919050565b600181811c908216806200072257607f821691505b602082108114156200074457634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff8114156200076e57634e487b7160e01b82526011600452602482fd5b60010192915050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620004a357600080fd5b60805160601c60a0516134e862000819600039600081816106ce01528181610bae01528181610f6301528181611169015281816114660152818161151a015281816116fc01526118c90152600081816104eb0152818161082f01528181610ad601528181610da2015261189601526134e86000f3fe6080604052600436106101d85760003560e01c806370a0823111610102578063abe6d65111610095578063d6d88d4e11610064578063d6d88d4e146105d1578063e985e9c5146105e4578063f26748e21461062d578063f2fde38b1461064d57600080fd5b8063abe6d6511461054f578063b88d4fde1461056f578063c87b56dd1461058f578063c8eb7a9d146105af57600080fd5b806395d89b41116100d157806395d89b41146104c757806398aca922146104dc5780639c83aecc1461050f578063a22cb4651461052f57600080fd5b806370a0823114610454578063715018a614610474578063839457f2146104895780638da5cb5b146104a957600080fd5b80631dfa141b1161017a578063453ca4e611610149578063453ca4e61461039f5780636352211e146104055780636817c76c146104255780636ecd23061461044157600080fd5b80631dfa141b1461030a57806323b872dd146103205780632a55205a1461034057806342842e0e1461037f57600080fd5b8063081812fc116101b6578063081812fc14610249578063095ea7b314610281578063150b7a02146102a157806318160ddd146102e657600080fd5b806301ffc9a7146101dd5780630369d6121461021257806306fdde0314610227575b600080fd5b3480156101e957600080fd5b506101fd6101f8366004612e4d565b61066d565b60405190151581526020015b60405180910390f35b610225610220366004612df4565b610698565b005b34801561023357600080fd5b5061023c610866565b60405161020991906130a2565b34801561025557600080fd5b50610269610264366004612e85565b6108f8565b6040516001600160a01b039091168152602001610209565b34801561028d57600080fd5b5061022561029c366004612dc9565b61098d565b3480156102ad57600080fd5b506102cd6102bc366004612c85565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610209565b3480156102f257600080fd5b506102fc600a5481565b604051908152602001610209565b34801561031657600080fd5b506102fc61045781565b34801561032c57600080fd5b5061022561033b366004612c45565b610aa3565b34801561034c57600080fd5b5061036061035b366004612e9d565b610ad4565b604080516001600160a01b039093168352602083019190915201610209565b34801561038b57600080fd5b5061022561039a366004612c45565b610b19565b3480156103ab57600080fd5b506103ec6103ba366004612e85565b6000908152600860209081526040918290208251808401909352805460ff168084526001909101549290910182905291565b6040805160ff9093168352602083019190915201610209565b34801561041157600080fd5b50610269610420366004612e85565b610b34565b34801561043157600080fd5b506102fc67016345785d8a000081565b61022561044f366004612ebe565b610bab565b34801561046057600080fd5b506102fc61046f366004612bce565b610e79565b34801561048057600080fd5b50610225610f00565b34801561049557600080fd5b506102256104a4366004612ebe565b610f36565b3480156104b557600080fd5b506006546001600160a01b0316610269565b3480156104d357600080fd5b5061023c6110cb565b3480156104e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610269565b34801561051b57600080fd5b5061022561052a366004612ed8565b6110da565b34801561053b57600080fd5b5061022561054a366004612d9c565b61112d565b34801561055b57600080fd5b5061022561056a366004612ebe565b61113c565b34801561057b57600080fd5b5061022561058a366004612d1f565b61128f565b34801561059b57600080fd5b5061023c6105aa366004612e85565b6112c7565b3480156105bb57600080fd5b506105c4611460565b6040516102099190612ffa565b6102256105df366004612f37565b6116f9565b3480156105f057600080fd5b506101fd6105ff366004612c0d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561063957600080fd5b50610225610648366004612f37565b6118c6565b34801561065957600080fd5b50610225610668366004612bce565b611e4f565b60006001600160e01b0319821663152a902d60e11b1480610692575061069282611eea565b92915050565b6006546001600160a01b031633146106cb5760405162461bcd60e51b81526004016106c29061329f565b60405180910390fd5b817f00000000000000000000000000000000000000000000000000000000000000008160ff161061070e5760405162461bcd60e51b81526004016106c29061325d565b60ff83166000908152600960205260408120600201805461072e906133b3565b90501161077d5760405162461bcd60e51b815260206004820152601e60248201527f54726962654e46543a20747269626520686173206e6f2062617365555249000060448201526064016106c2565b60648211156107e65760405162461bcd60e51b815260206004820152602f60248201527f54726962654e46543a207175616e74697479206c696d6974206f66203130302060448201526e1d1bdad95b9cc81c195c881b5a5b9d608a1b60648201526084016106c2565b60ff8316600090815260096020526040812060010154610807908490613325565b9050610457811061082a5760405162461bcd60e51b81526004016106c290613174565b6108547f000000000000000000000000000000000000000000000000000000000000000034611f3a565b61085f858585612053565b5050505050565b606060008054610875906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546108a1906133b3565b80156108ee5780601f106108c3576101008083540402835291602001916108ee565b820191906000526020600020905b8154815290600101906020018083116108d157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109715760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106c2565b506000908152600460205260409020546001600160a01b031690565b600061099882610b34565b9050806001600160a01b0316836001600160a01b03161415610a065760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106c2565b336001600160a01b0382161480610a225750610a2281336105ff565b610a945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106c2565b610a9e838361229e565b505050565b610aad338261230c565b610ac95760405162461bcd60e51b81526004016106c2906132d4565b610a9e838383612403565b7f00000000000000000000000000000000000000000000000000000000000000006000612710610b06846102ee613351565b610b10919061333d565b90509250929050565b610a9e8383836040518060200160405280600081525061128f565b6000818152600260205260408120546001600160a01b0316806106925760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106c2565b807f00000000000000000000000000000000000000000000000000000000000000008160ff1610610bee5760405162461bcd60e51b81526004016106c29061325d565b60ff80831660009081526009602052604090206003015416610c225760405162461bcd60e51b81526004016106c290613124565b67016345785d8a0000341015610c865760405162461bcd60e51b8152602060048201526024808201527f54726962654e46543a206d73672e76616c75652069732062656c6f7720302e316044820152630408aa8960e31b60648201526084016106c2565b60ff821660009081526009602052604081208054610ca3906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccf906133b3565b8015610d1c5780601f10610cf157610100808354040283529160200191610d1c565b820191906000526020600020905b815481529060010190602001808311610cff57829003601f168201915b5050600a5460ff881660009081526009602052604081206001908101549697509195909450610d4d93509150613325565b60ff861660009081526009602052604090206001015490915061045711610d865760405162461bcd60e51b81526004016106c290613174565b6040805180820190915260ff8616815260208101829052610dc77f000000000000000000000000000000000000000000000000000000000000000034611f3a565b60008381526008602090815260408083208451815460ff191660ff918216178255858401516001928301558a1684526009909252822001805491610e0a836133e8565b9091555050600a8054906000610e1f836133e8565b9190505550610e2e338461259f565b336001600160a01b03167f311725bf48581c5238737bcb0312e9cbbb7d6e35a0d1d8ba32725474b12153eb8585604051610e699291906130b5565b60405180910390a2505050505050565b60006001600160a01b038216610ee45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106c2565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610f2a5760405162461bcd60e51b81526004016106c29061329f565b610f3460006125b9565b565b6006546001600160a01b03163314610f605760405162461bcd60e51b81526004016106c29061329f565b807f00000000000000000000000000000000000000000000000000000000000000008160ff1610610fa35760405162461bcd60e51b81526004016106c29061325d565b60ff821660009081526009602052604081206002018054610fc3906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610fef906133b3565b801561103c5780601f106110115761010080835404028352916020019161103c565b820191906000526020600020905b81548152906001019060200180831161101f57829003601f168201915b5050505050905060008151116110645760405162461bcd60e51b81526004016106c290613218565b60ff8084166000908152600960205260409020600301546101009004166110a85760ff83166000908152600960205260409020600301805461ff0019166101001790555b505060ff166000908152600960205260409020600301805460ff19166001179055565b606060018054610875906133b3565b6006546001600160a01b031633146111045760405162461bcd60e51b81526004016106c29061329f565b60ff821660009081526009602090815260409091208251610a9e92600290920191840190612aa9565b61113833838361260b565b5050565b6006546001600160a01b031633146111665760405162461bcd60e51b81526004016106c29061329f565b807f00000000000000000000000000000000000000000000000000000000000000008160ff16106111a95760405162461bcd60e51b81526004016106c29061325d565b60ff8216600090815260096020526040812060020180546111c9906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546111f5906133b3565b80156112425780601f1061121757610100808354040283529160200191611242565b820191906000526020600020905b81548152906001019060200180831161122557829003601f168201915b50505050509050600081511161126a5760405162461bcd60e51b81526004016106c290613218565b505060ff166000908152600960205260409020600301805461ff001916610100179055565b611299338361230c565b6112b55760405162461bcd60e51b81526004016106c2906132d4565b6112c1848484846126da565b50505050565b6000818152600260205260409020546060906001600160a01b03166113465760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106c2565b600082815260086020908152604080832081518083018352815460ff168082526001909201549084018190528185526009909352908320600201805491939161138e906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546113ba906133b3565b80156114075780601f106113dc57610100808354040283529160200191611407565b820191906000526020600020905b8154815290600101906020018083116113ea57829003601f168201915b50505050509050600081511161142c5760405180602001604052806000815250611457565b806114368361270d565b604051602001611447929190612f7e565b6040516020818303038152906040525b95945050505050565b606060007f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff8111156114ab57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561151257816020015b6114ff6040518060a001604052806060815260200160008152602001606081526020016000151581526020016000151581525090565b8152602001906001900390816114c95790505b50905060005b7f00000000000000000000000000000000000000000000000000000000000000008160ff1610156116f35760ff811660009081526009602052604090819020815160a0810190925280548290829061156f906133b3565b80601f016020809104026020016040519081016040528092919081815260200182805461159b906133b3565b80156115e85780601f106115bd576101008083540402835291602001916115e8565b820191906000526020600020905b8154815290600101906020018083116115cb57829003601f168201915b505050505081526020016001820154815260200160028201805461160b906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611637906133b3565b80156116845780601f1061165957610100808354040283529160200191611684565b820191906000526020600020905b81548152906001019060200180831161166757829003601f168201915b50505091835250506003919091015460ff80821615156020840152610100909104811615156040909201919091528351849184169081106116d557634e487b7160e01b600052603260045260246000fd5b602002602001018190525080806116eb90613403565b915050611518565b50919050565b817f00000000000000000000000000000000000000000000000000000000000000008160ff161061173c5760405162461bcd60e51b81526004016106c29061325d565b60ff808416600090815260096020526040902060030154166117705760405162461bcd60e51b81526004016106c290613124565b60058211156117d65760405162461bcd60e51b815260206004820152602c60248201527f54726962654e46543a206f6e6c79206d696e7420757020746f203520746f6b6560448201526b6e7320617420612074696d6560a01b60648201526084016106c2565b60006117ea8367016345785d8a0000613351565b90508034101561184d5760405162461bcd60e51b815260206004820152602860248201527f54726962654e46543a206d73672e76616c75652069732062656c6f7720616d6f6044820152671d5b9d081bddd95960c21b60648201526084016106c2565b60ff841660009081526009602052604081206001015461186e908590613325565b905061045781106118915760405162461bcd60e51b81526004016106c290613174565b6118bb7f000000000000000000000000000000000000000000000000000000000000000034611f3a565b61085f338686612053565b817f00000000000000000000000000000000000000000000000000000000000000008160ff16106119095760405162461bcd60e51b81526004016106c29061325d565b60ff8084166000908152600960205260409020600301546101009004166119875760405162461bcd60e51b815260206004820152602c60248201527f54726962654e46543a207472696265206973206e6f74206d696e7461626c652060448201526b3337b9103a3930b23296b4b760a11b60648201526084016106c2565b6007546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a039190612bf1565b6001600160a01b031614611a765760405162461bcd60e51b815260206004820152603460248201527f54726962654e46543a206d757374206265206c6f6f74626f78206f776e6572206044820152731d1bc81d1c985919481a5b88199bdc881b5a5b9d60621b60648201526084016106c2565b60075460405163020604bf60e21b81526004810184905230916001600160a01b03169063081812fc9060240160206040518083038186803b158015611aba57600080fd5b505afa158015611ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af29190612bf1565b6001600160a01b03161480611b83575060075460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b158015611b4b57600080fd5b505afa158015611b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b839190612e31565b611be85760405162461bcd60e51b815260206004820152603060248201527f54726962654e46543a206e6f7420617070726f76656420746f2074726164652060448201526f34b7103637b7ba3137bc103a37b5b2b760811b60648201526084016106c2565b60ff831660009081526009602052604081208054611c05906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611c31906133b3565b8015611c7e5780601f10611c5357610100808354040283529160200191611c7e565b820191906000526020600020905b815481529060010190602001808311611c6157829003601f168201915b5050600a5460ff891660009081526009602052604081206001908101549697509195909450611caf93509150613325565b60ff871660009081526009602052604090206001015490915061045711611ce85760405162461bcd60e51b81526004016106c290613174565b60408051808201825260ff88168152602081018390526007549151632142170760e11b81523360048201523060248201526044810188905290916001600160a01b0316906342842e0e90606401600060405180830381600087803b158015611d4f57600080fd5b505af1158015611d63573d6000803e3d6000fd5b50506040518881523392507fb6df3a3de335356b5b5a3e836f01273fdf198e1a7be83f94f9dbae5875654085915060200160405180910390a260008381526008602090815260408083208451815460ff191660ff918216178255858401516001928301558b1684526009909252822001805491611ddf836133e8565b9091555050600a8054906000611df4836133e8565b9190505550611e03338461259f565b336001600160a01b03167f311725bf48581c5238737bcb0312e9cbbb7d6e35a0d1d8ba32725474b12153eb8585604051611e3e9291906130b5565b60405180910390a250505050505050565b6006546001600160a01b03163314611e795760405162461bcd60e51b81526004016106c29061329f565b6001600160a01b038116611ede5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c2565b611ee7816125b9565b50565b60006001600160e01b031982166380ac58cd60e01b1480611f1b57506001600160e01b03198216635b5e139f60e01b145b8061069257506301ffc9a760e01b6001600160e01b0319831614610692565b80471015611f8a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106c2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fd7576040519150601f19603f3d011682016040523d82523d6000602084013e611fdc565b606091505b5050905080610a9e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106c2565b60ff821660009081526009602052604081208054612070906133b3565b80601f016020809104026020016040519081016040528092919081815260200182805461209c906133b3565b80156120e95780601f106120be576101008083540402835291602001916120e9565b820191906000526020600020905b8154815290600101906020018083116120cc57829003601f168201915b5050600a5460ff88166000908152600960205260408120600190810154969750919590945061211a93509150613325565b905060008467ffffffffffffffff81111561214557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561216e578160200160208202803683370190505b50905060005b8581101561224757600060405180604001604052808960ff168152602001858152509050848383815181106121b957634e487b7160e01b600052603260045260246000fd5b60209081029190910181019190915260008681526008825260408082208451815460ff191660ff918216178255858501516001928301558c1683526009909352812090910180549161220a836133e8565b9190505550612219898661259f565b612224600186613325565b9450612231600185613325565b935050808061223f906133e8565b915050612174565b5084600a600082825461225a9190613325565b92505081905550866001600160a01b03167f8da5594a57c420f05ed1f57c05990b34d94c459337e018004d7af805b9bb96cd858784604051611e3e939291906130d7565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122d382610b34565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166123855760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106c2565b600061239083610b34565b9050806001600160a01b0316846001600160a01b031614806123d757506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806123fb5750836001600160a01b03166123f0846108f8565b6001600160a01b0316145b949350505050565b826001600160a01b031661241682610b34565b6001600160a01b03161461247a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106c2565b6001600160a01b0382166124dc5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106c2565b6124e760008261229e565b6001600160a01b0383166000908152600360205260408120805460019290612510908490613370565b90915550506001600160a01b038216600090815260036020526040812080546001929061253e908490613325565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611138828260405180602001604052806000815250612827565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316141561266d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106c2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6126e5848484612403565b6126f18484848461285a565b6112c15760405162461bcd60e51b81526004016106c2906131c6565b6060816127315750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275b5780612745816133e8565b91506127549050600a8361333d565b9150612735565b60008167ffffffffffffffff81111561278457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127ae576020820181803683370190505b5090505b84156123fb576127c3600183613370565b91506127d0600a86613423565b6127db906030613325565b60f81b8183815181106127fe57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612820600a8661333d565b94506127b2565b6128318383612967565b61283e600084848461285a565b610a9e5760405162461bcd60e51b81526004016106c2906131c6565b60006001600160a01b0384163b1561295c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061289e903390899088908890600401612fbd565b602060405180830381600087803b1580156128b857600080fd5b505af19250505080156128e8575060408051601f3d908101601f191682019092526128e591810190612e69565b60015b612942573d808015612916576040519150601f19603f3d011682016040523d82523d6000602084013e61291b565b606091505b50805161293a5760405162461bcd60e51b81526004016106c2906131c6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123fb565b506001949350505050565b6001600160a01b0382166129bd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106c2565b6000818152600260205260409020546001600160a01b031615612a225760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106c2565b6001600160a01b0382166000908152600360205260408120805460019290612a4b908490613325565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612ab5906133b3565b90600052602060002090601f016020900481019282612ad75760008555612b1d565b82601f10612af057805160ff1916838001178555612b1d565b82800160010185558215612b1d579182015b82811115612b1d578251825591602001919060010190612b02565b50612b29929150612b2d565b5090565b5b80821115612b295760008155600101612b2e565b600067ffffffffffffffff80841115612b5d57612b5d613463565b604051601f8501601f19908116603f01168101908282118183101715612b8557612b85613463565b81604052809350858152868686011115612b9e57600080fd5b858560208301376000602087830101525050509392505050565b803560ff81168114612bc957600080fd5b919050565b600060208284031215612bdf578081fd5b8135612bea81613479565b9392505050565b600060208284031215612c02578081fd5b8151612bea81613479565b60008060408385031215612c1f578081fd5b8235612c2a81613479565b91506020830135612c3a81613479565b809150509250929050565b600080600060608486031215612c59578081fd5b8335612c6481613479565b92506020840135612c7481613479565b929592945050506040919091013590565b600080600080600060808688031215612c9c578081fd5b8535612ca781613479565b94506020860135612cb781613479565b935060408601359250606086013567ffffffffffffffff80821115612cda578283fd5b818801915088601f830112612ced578283fd5b813581811115612cfb578384fd5b896020828501011115612d0c578384fd5b9699959850939650602001949392505050565b60008060008060808587031215612d34578384fd5b8435612d3f81613479565b93506020850135612d4f81613479565b925060408501359150606085013567ffffffffffffffff811115612d71578182fd5b8501601f81018713612d81578182fd5b612d9087823560208401612b42565b91505092959194509250565b60008060408385031215612dae578182fd5b8235612db981613479565b91506020830135612c3a8161348e565b60008060408385031215612ddb578182fd5b8235612de681613479565b946020939093013593505050565b600080600060608486031215612e08578283fd5b8335612e1381613479565b9250612e2160208501612bb8565b9150604084013590509250925092565b600060208284031215612e42578081fd5b8151612bea8161348e565b600060208284031215612e5e578081fd5b8135612bea8161349c565b600060208284031215612e7a578081fd5b8151612bea8161349c565b600060208284031215612e96578081fd5b5035919050565b60008060408385031215612eaf578182fd5b50508035926020909101359150565b600060208284031215612ecf578081fd5b612bea82612bb8565b60008060408385031215612eea578182fd5b612ef383612bb8565b9150602083013567ffffffffffffffff811115612f0e578182fd5b8301601f81018513612f1e578182fd5b612f2d85823560208401612b42565b9150509250929050565b60008060408385031215612f49578182fd5b612de683612bb8565b60008151808452612f6a816020860160208601613387565b601f01601f19169290920160200192915050565b60008351612f90818460208801613387565b835190830190612fa4818360208801613387565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ff090830184612f52565b9695505050505050565b60006020808301818452808551808352604092508286019150828160051b870101848801865b8381101561309457603f19898403018552815160a0815181865261304682870182612f52565b915050888201518986015287820151858203898701526130668282612f52565b6060848101511515908801526080938401511515939096019290925250509386019390860190600101613020565b509098975050505050505050565b602081526000612bea6020830184612f52565b6040815260006130c86040830185612f52565b90508260208301529392505050565b6060815260006130ea6060830186612f52565b60208381018690528382036040850152845180835285820192820190845b8181101561309457845183529383019391830191600101613108565b60208082526030908201527f54726962654e46543a207472696265206973206c6f636b656420616e6420636160408201526f1b9b9bdd081c185e481d1bc81b5a5b9d60821b606082015260800190565b60208082526032908201527f54726962654e46543a20656163682074726962652063616e6e6f74206578636560408201527165642031313131206d617820737570706c7960701b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f54726962654e46543a206e6f20626173655552492065786973747320666f7220604082015264747269626560d81b606082015260800190565b60208082526022908201527f54726962654e46543a206e6f2074726962652065786973747320617420696e646040820152610caf60f31b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561333857613338613437565b500190565b60008261334c5761334c61344d565b500490565b600081600019048311821515161561336b5761336b613437565b500290565b60008282101561338257613382613437565b500390565b60005b838110156133a257818101518382015260200161338a565b838111156112c15750506000910152565b600181811c908216806133c757607f821691505b602082108114156116f357634e487b7160e01b600052602260045260246000fd5b60006000198214156133fc576133fc613437565b5060010190565b600060ff821660ff81141561341a5761341a613437565b60010192915050565b6000826134325761343261344d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611ee757600080fd5b8015158114611ee757600080fd5b6001600160e01b031981168114611ee757600080fdfea2646970667358221220246c69e5e5502b9909b4b2e65c1a568e9e4fee178c43f7572571257932de4f0064736f6c634300080400330000000000000000000000004d398bea8773bc7ab284692809645370282ca5e20000000000000000000000001296c7a5160f63b7e73e0b7491141c40900362860000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000003477575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044d69627500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853656e74696e656c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000846756c64626f7267000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000846c3ab6c69616e69000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101d85760003560e01c806370a0823111610102578063abe6d65111610095578063d6d88d4e11610064578063d6d88d4e146105d1578063e985e9c5146105e4578063f26748e21461062d578063f2fde38b1461064d57600080fd5b8063abe6d6511461054f578063b88d4fde1461056f578063c87b56dd1461058f578063c8eb7a9d146105af57600080fd5b806395d89b41116100d157806395d89b41146104c757806398aca922146104dc5780639c83aecc1461050f578063a22cb4651461052f57600080fd5b806370a0823114610454578063715018a614610474578063839457f2146104895780638da5cb5b146104a957600080fd5b80631dfa141b1161017a578063453ca4e611610149578063453ca4e61461039f5780636352211e146104055780636817c76c146104255780636ecd23061461044157600080fd5b80631dfa141b1461030a57806323b872dd146103205780632a55205a1461034057806342842e0e1461037f57600080fd5b8063081812fc116101b6578063081812fc14610249578063095ea7b314610281578063150b7a02146102a157806318160ddd146102e657600080fd5b806301ffc9a7146101dd5780630369d6121461021257806306fdde0314610227575b600080fd5b3480156101e957600080fd5b506101fd6101f8366004612e4d565b61066d565b60405190151581526020015b60405180910390f35b610225610220366004612df4565b610698565b005b34801561023357600080fd5b5061023c610866565b60405161020991906130a2565b34801561025557600080fd5b50610269610264366004612e85565b6108f8565b6040516001600160a01b039091168152602001610209565b34801561028d57600080fd5b5061022561029c366004612dc9565b61098d565b3480156102ad57600080fd5b506102cd6102bc366004612c85565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610209565b3480156102f257600080fd5b506102fc600a5481565b604051908152602001610209565b34801561031657600080fd5b506102fc61045781565b34801561032c57600080fd5b5061022561033b366004612c45565b610aa3565b34801561034c57600080fd5b5061036061035b366004612e9d565b610ad4565b604080516001600160a01b039093168352602083019190915201610209565b34801561038b57600080fd5b5061022561039a366004612c45565b610b19565b3480156103ab57600080fd5b506103ec6103ba366004612e85565b6000908152600860209081526040918290208251808401909352805460ff168084526001909101549290910182905291565b6040805160ff9093168352602083019190915201610209565b34801561041157600080fd5b50610269610420366004612e85565b610b34565b34801561043157600080fd5b506102fc67016345785d8a000081565b61022561044f366004612ebe565b610bab565b34801561046057600080fd5b506102fc61046f366004612bce565b610e79565b34801561048057600080fd5b50610225610f00565b34801561049557600080fd5b506102256104a4366004612ebe565b610f36565b3480156104b557600080fd5b506006546001600160a01b0316610269565b3480156104d357600080fd5b5061023c6110cb565b3480156104e857600080fd5b507f0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e2610269565b34801561051b57600080fd5b5061022561052a366004612ed8565b6110da565b34801561053b57600080fd5b5061022561054a366004612d9c565b61112d565b34801561055b57600080fd5b5061022561056a366004612ebe565b61113c565b34801561057b57600080fd5b5061022561058a366004612d1f565b61128f565b34801561059b57600080fd5b5061023c6105aa366004612e85565b6112c7565b3480156105bb57600080fd5b506105c4611460565b6040516102099190612ffa565b6102256105df366004612f37565b6116f9565b3480156105f057600080fd5b506101fd6105ff366004612c0d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561063957600080fd5b50610225610648366004612f37565b6118c6565b34801561065957600080fd5b50610225610668366004612bce565b611e4f565b60006001600160e01b0319821663152a902d60e11b1480610692575061069282611eea565b92915050565b6006546001600160a01b031633146106cb5760405162461bcd60e51b81526004016106c29061329f565b60405180910390fd5b817f00000000000000000000000000000000000000000000000000000000000000058160ff161061070e5760405162461bcd60e51b81526004016106c29061325d565b60ff83166000908152600960205260408120600201805461072e906133b3565b90501161077d5760405162461bcd60e51b815260206004820152601e60248201527f54726962654e46543a20747269626520686173206e6f2062617365555249000060448201526064016106c2565b60648211156107e65760405162461bcd60e51b815260206004820152602f60248201527f54726962654e46543a207175616e74697479206c696d6974206f66203130302060448201526e1d1bdad95b9cc81c195c881b5a5b9d608a1b60648201526084016106c2565b60ff8316600090815260096020526040812060010154610807908490613325565b9050610457811061082a5760405162461bcd60e51b81526004016106c290613174565b6108547f0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e234611f3a565b61085f858585612053565b5050505050565b606060008054610875906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546108a1906133b3565b80156108ee5780601f106108c3576101008083540402835291602001916108ee565b820191906000526020600020905b8154815290600101906020018083116108d157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109715760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106c2565b506000908152600460205260409020546001600160a01b031690565b600061099882610b34565b9050806001600160a01b0316836001600160a01b03161415610a065760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106c2565b336001600160a01b0382161480610a225750610a2281336105ff565b610a945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106c2565b610a9e838361229e565b505050565b610aad338261230c565b610ac95760405162461bcd60e51b81526004016106c2906132d4565b610a9e838383612403565b7f0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e26000612710610b06846102ee613351565b610b10919061333d565b90509250929050565b610a9e8383836040518060200160405280600081525061128f565b6000818152600260205260408120546001600160a01b0316806106925760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106c2565b807f00000000000000000000000000000000000000000000000000000000000000058160ff1610610bee5760405162461bcd60e51b81526004016106c29061325d565b60ff80831660009081526009602052604090206003015416610c225760405162461bcd60e51b81526004016106c290613124565b67016345785d8a0000341015610c865760405162461bcd60e51b8152602060048201526024808201527f54726962654e46543a206d73672e76616c75652069732062656c6f7720302e316044820152630408aa8960e31b60648201526084016106c2565b60ff821660009081526009602052604081208054610ca3906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccf906133b3565b8015610d1c5780601f10610cf157610100808354040283529160200191610d1c565b820191906000526020600020905b815481529060010190602001808311610cff57829003601f168201915b5050600a5460ff881660009081526009602052604081206001908101549697509195909450610d4d93509150613325565b60ff861660009081526009602052604090206001015490915061045711610d865760405162461bcd60e51b81526004016106c290613174565b6040805180820190915260ff8616815260208101829052610dc77f0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e234611f3a565b60008381526008602090815260408083208451815460ff191660ff918216178255858401516001928301558a1684526009909252822001805491610e0a836133e8565b9091555050600a8054906000610e1f836133e8565b9190505550610e2e338461259f565b336001600160a01b03167f311725bf48581c5238737bcb0312e9cbbb7d6e35a0d1d8ba32725474b12153eb8585604051610e699291906130b5565b60405180910390a2505050505050565b60006001600160a01b038216610ee45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106c2565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610f2a5760405162461bcd60e51b81526004016106c29061329f565b610f3460006125b9565b565b6006546001600160a01b03163314610f605760405162461bcd60e51b81526004016106c29061329f565b807f00000000000000000000000000000000000000000000000000000000000000058160ff1610610fa35760405162461bcd60e51b81526004016106c29061325d565b60ff821660009081526009602052604081206002018054610fc3906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610fef906133b3565b801561103c5780601f106110115761010080835404028352916020019161103c565b820191906000526020600020905b81548152906001019060200180831161101f57829003601f168201915b5050505050905060008151116110645760405162461bcd60e51b81526004016106c290613218565b60ff8084166000908152600960205260409020600301546101009004166110a85760ff83166000908152600960205260409020600301805461ff0019166101001790555b505060ff166000908152600960205260409020600301805460ff19166001179055565b606060018054610875906133b3565b6006546001600160a01b031633146111045760405162461bcd60e51b81526004016106c29061329f565b60ff821660009081526009602090815260409091208251610a9e92600290920191840190612aa9565b61113833838361260b565b5050565b6006546001600160a01b031633146111665760405162461bcd60e51b81526004016106c29061329f565b807f00000000000000000000000000000000000000000000000000000000000000058160ff16106111a95760405162461bcd60e51b81526004016106c29061325d565b60ff8216600090815260096020526040812060020180546111c9906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546111f5906133b3565b80156112425780601f1061121757610100808354040283529160200191611242565b820191906000526020600020905b81548152906001019060200180831161122557829003601f168201915b50505050509050600081511161126a5760405162461bcd60e51b81526004016106c290613218565b505060ff166000908152600960205260409020600301805461ff001916610100179055565b611299338361230c565b6112b55760405162461bcd60e51b81526004016106c2906132d4565b6112c1848484846126da565b50505050565b6000818152600260205260409020546060906001600160a01b03166113465760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016106c2565b600082815260086020908152604080832081518083018352815460ff168082526001909201549084018190528185526009909352908320600201805491939161138e906133b3565b80601f01602080910402602001604051908101604052809291908181526020018280546113ba906133b3565b80156114075780601f106113dc57610100808354040283529160200191611407565b820191906000526020600020905b8154815290600101906020018083116113ea57829003601f168201915b50505050509050600081511161142c5760405180602001604052806000815250611457565b806114368361270d565b604051602001611447929190612f7e565b6040516020818303038152906040525b95945050505050565b606060007f000000000000000000000000000000000000000000000000000000000000000567ffffffffffffffff8111156114ab57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561151257816020015b6114ff6040518060a001604052806060815260200160008152602001606081526020016000151581526020016000151581525090565b8152602001906001900390816114c95790505b50905060005b7f00000000000000000000000000000000000000000000000000000000000000058160ff1610156116f35760ff811660009081526009602052604090819020815160a0810190925280548290829061156f906133b3565b80601f016020809104026020016040519081016040528092919081815260200182805461159b906133b3565b80156115e85780601f106115bd576101008083540402835291602001916115e8565b820191906000526020600020905b8154815290600101906020018083116115cb57829003601f168201915b505050505081526020016001820154815260200160028201805461160b906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611637906133b3565b80156116845780601f1061165957610100808354040283529160200191611684565b820191906000526020600020905b81548152906001019060200180831161166757829003601f168201915b50505091835250506003919091015460ff80821615156020840152610100909104811615156040909201919091528351849184169081106116d557634e487b7160e01b600052603260045260246000fd5b602002602001018190525080806116eb90613403565b915050611518565b50919050565b817f00000000000000000000000000000000000000000000000000000000000000058160ff161061173c5760405162461bcd60e51b81526004016106c29061325d565b60ff808416600090815260096020526040902060030154166117705760405162461bcd60e51b81526004016106c290613124565b60058211156117d65760405162461bcd60e51b815260206004820152602c60248201527f54726962654e46543a206f6e6c79206d696e7420757020746f203520746f6b6560448201526b6e7320617420612074696d6560a01b60648201526084016106c2565b60006117ea8367016345785d8a0000613351565b90508034101561184d5760405162461bcd60e51b815260206004820152602860248201527f54726962654e46543a206d73672e76616c75652069732062656c6f7720616d6f6044820152671d5b9d081bddd95960c21b60648201526084016106c2565b60ff841660009081526009602052604081206001015461186e908590613325565b905061045781106118915760405162461bcd60e51b81526004016106c290613174565b6118bb7f0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e234611f3a565b61085f338686612053565b817f00000000000000000000000000000000000000000000000000000000000000058160ff16106119095760405162461bcd60e51b81526004016106c29061325d565b60ff8084166000908152600960205260409020600301546101009004166119875760405162461bcd60e51b815260206004820152602c60248201527f54726962654e46543a207472696265206973206e6f74206d696e7461626c652060448201526b3337b9103a3930b23296b4b760a11b60648201526084016106c2565b6007546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a039190612bf1565b6001600160a01b031614611a765760405162461bcd60e51b815260206004820152603460248201527f54726962654e46543a206d757374206265206c6f6f74626f78206f776e6572206044820152731d1bc81d1c985919481a5b88199bdc881b5a5b9d60621b60648201526084016106c2565b60075460405163020604bf60e21b81526004810184905230916001600160a01b03169063081812fc9060240160206040518083038186803b158015611aba57600080fd5b505afa158015611ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af29190612bf1565b6001600160a01b03161480611b83575060075460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c59060440160206040518083038186803b158015611b4b57600080fd5b505afa158015611b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b839190612e31565b611be85760405162461bcd60e51b815260206004820152603060248201527f54726962654e46543a206e6f7420617070726f76656420746f2074726164652060448201526f34b7103637b7ba3137bc103a37b5b2b760811b60648201526084016106c2565b60ff831660009081526009602052604081208054611c05906133b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611c31906133b3565b8015611c7e5780601f10611c5357610100808354040283529160200191611c7e565b820191906000526020600020905b815481529060010190602001808311611c6157829003601f168201915b5050600a5460ff891660009081526009602052604081206001908101549697509195909450611caf93509150613325565b60ff871660009081526009602052604090206001015490915061045711611ce85760405162461bcd60e51b81526004016106c290613174565b60408051808201825260ff88168152602081018390526007549151632142170760e11b81523360048201523060248201526044810188905290916001600160a01b0316906342842e0e90606401600060405180830381600087803b158015611d4f57600080fd5b505af1158015611d63573d6000803e3d6000fd5b50506040518881523392507fb6df3a3de335356b5b5a3e836f01273fdf198e1a7be83f94f9dbae5875654085915060200160405180910390a260008381526008602090815260408083208451815460ff191660ff918216178255858401516001928301558b1684526009909252822001805491611ddf836133e8565b9091555050600a8054906000611df4836133e8565b9190505550611e03338461259f565b336001600160a01b03167f311725bf48581c5238737bcb0312e9cbbb7d6e35a0d1d8ba32725474b12153eb8585604051611e3e9291906130b5565b60405180910390a250505050505050565b6006546001600160a01b03163314611e795760405162461bcd60e51b81526004016106c29061329f565b6001600160a01b038116611ede5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c2565b611ee7816125b9565b50565b60006001600160e01b031982166380ac58cd60e01b1480611f1b57506001600160e01b03198216635b5e139f60e01b145b8061069257506301ffc9a760e01b6001600160e01b0319831614610692565b80471015611f8a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106c2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fd7576040519150601f19603f3d011682016040523d82523d6000602084013e611fdc565b606091505b5050905080610a9e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106c2565b60ff821660009081526009602052604081208054612070906133b3565b80601f016020809104026020016040519081016040528092919081815260200182805461209c906133b3565b80156120e95780601f106120be576101008083540402835291602001916120e9565b820191906000526020600020905b8154815290600101906020018083116120cc57829003601f168201915b5050600a5460ff88166000908152600960205260408120600190810154969750919590945061211a93509150613325565b905060008467ffffffffffffffff81111561214557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561216e578160200160208202803683370190505b50905060005b8581101561224757600060405180604001604052808960ff168152602001858152509050848383815181106121b957634e487b7160e01b600052603260045260246000fd5b60209081029190910181019190915260008681526008825260408082208451815460ff191660ff918216178255858501516001928301558c1683526009909352812090910180549161220a836133e8565b9190505550612219898661259f565b612224600186613325565b9450612231600185613325565b935050808061223f906133e8565b915050612174565b5084600a600082825461225a9190613325565b92505081905550866001600160a01b03167f8da5594a57c420f05ed1f57c05990b34d94c459337e018004d7af805b9bb96cd858784604051611e3e939291906130d7565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122d382610b34565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166123855760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106c2565b600061239083610b34565b9050806001600160a01b0316846001600160a01b031614806123d757506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806123fb5750836001600160a01b03166123f0846108f8565b6001600160a01b0316145b949350505050565b826001600160a01b031661241682610b34565b6001600160a01b03161461247a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106c2565b6001600160a01b0382166124dc5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106c2565b6124e760008261229e565b6001600160a01b0383166000908152600360205260408120805460019290612510908490613370565b90915550506001600160a01b038216600090815260036020526040812080546001929061253e908490613325565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611138828260405180602001604052806000815250612827565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316141561266d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106c2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6126e5848484612403565b6126f18484848461285a565b6112c15760405162461bcd60e51b81526004016106c2906131c6565b6060816127315750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275b5780612745816133e8565b91506127549050600a8361333d565b9150612735565b60008167ffffffffffffffff81111561278457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127ae576020820181803683370190505b5090505b84156123fb576127c3600183613370565b91506127d0600a86613423565b6127db906030613325565b60f81b8183815181106127fe57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612820600a8661333d565b94506127b2565b6128318383612967565b61283e600084848461285a565b610a9e5760405162461bcd60e51b81526004016106c2906131c6565b60006001600160a01b0384163b1561295c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061289e903390899088908890600401612fbd565b602060405180830381600087803b1580156128b857600080fd5b505af19250505080156128e8575060408051601f3d908101601f191682019092526128e591810190612e69565b60015b612942573d808015612916576040519150601f19603f3d011682016040523d82523d6000602084013e61291b565b606091505b50805161293a5760405162461bcd60e51b81526004016106c2906131c6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123fb565b506001949350505050565b6001600160a01b0382166129bd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106c2565b6000818152600260205260409020546001600160a01b031615612a225760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106c2565b6001600160a01b0382166000908152600360205260408120805460019290612a4b908490613325565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612ab5906133b3565b90600052602060002090601f016020900481019282612ad75760008555612b1d565b82601f10612af057805160ff1916838001178555612b1d565b82800160010185558215612b1d579182015b82811115612b1d578251825591602001919060010190612b02565b50612b29929150612b2d565b5090565b5b80821115612b295760008155600101612b2e565b600067ffffffffffffffff80841115612b5d57612b5d613463565b604051601f8501601f19908116603f01168101908282118183101715612b8557612b85613463565b81604052809350858152868686011115612b9e57600080fd5b858560208301376000602087830101525050509392505050565b803560ff81168114612bc957600080fd5b919050565b600060208284031215612bdf578081fd5b8135612bea81613479565b9392505050565b600060208284031215612c02578081fd5b8151612bea81613479565b60008060408385031215612c1f578081fd5b8235612c2a81613479565b91506020830135612c3a81613479565b809150509250929050565b600080600060608486031215612c59578081fd5b8335612c6481613479565b92506020840135612c7481613479565b929592945050506040919091013590565b600080600080600060808688031215612c9c578081fd5b8535612ca781613479565b94506020860135612cb781613479565b935060408601359250606086013567ffffffffffffffff80821115612cda578283fd5b818801915088601f830112612ced578283fd5b813581811115612cfb578384fd5b896020828501011115612d0c578384fd5b9699959850939650602001949392505050565b60008060008060808587031215612d34578384fd5b8435612d3f81613479565b93506020850135612d4f81613479565b925060408501359150606085013567ffffffffffffffff811115612d71578182fd5b8501601f81018713612d81578182fd5b612d9087823560208401612b42565b91505092959194509250565b60008060408385031215612dae578182fd5b8235612db981613479565b91506020830135612c3a8161348e565b60008060408385031215612ddb578182fd5b8235612de681613479565b946020939093013593505050565b600080600060608486031215612e08578283fd5b8335612e1381613479565b9250612e2160208501612bb8565b9150604084013590509250925092565b600060208284031215612e42578081fd5b8151612bea8161348e565b600060208284031215612e5e578081fd5b8135612bea8161349c565b600060208284031215612e7a578081fd5b8151612bea8161349c565b600060208284031215612e96578081fd5b5035919050565b60008060408385031215612eaf578182fd5b50508035926020909101359150565b600060208284031215612ecf578081fd5b612bea82612bb8565b60008060408385031215612eea578182fd5b612ef383612bb8565b9150602083013567ffffffffffffffff811115612f0e578182fd5b8301601f81018513612f1e578182fd5b612f2d85823560208401612b42565b9150509250929050565b60008060408385031215612f49578182fd5b612de683612bb8565b60008151808452612f6a816020860160208601613387565b601f01601f19169290920160200192915050565b60008351612f90818460208801613387565b835190830190612fa4818360208801613387565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ff090830184612f52565b9695505050505050565b60006020808301818452808551808352604092508286019150828160051b870101848801865b8381101561309457603f19898403018552815160a0815181865261304682870182612f52565b915050888201518986015287820151858203898701526130668282612f52565b6060848101511515908801526080938401511515939096019290925250509386019390860190600101613020565b509098975050505050505050565b602081526000612bea6020830184612f52565b6040815260006130c86040830185612f52565b90508260208301529392505050565b6060815260006130ea6060830186612f52565b60208381018690528382036040850152845180835285820192820190845b8181101561309457845183529383019391830191600101613108565b60208082526030908201527f54726962654e46543a207472696265206973206c6f636b656420616e6420636160408201526f1b9b9bdd081c185e481d1bc81b5a5b9d60821b606082015260800190565b60208082526032908201527f54726962654e46543a20656163682074726962652063616e6e6f74206578636560408201527165642031313131206d617820737570706c7960701b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f54726962654e46543a206e6f20626173655552492065786973747320666f7220604082015264747269626560d81b606082015260800190565b60208082526022908201527f54726962654e46543a206e6f2074726962652065786973747320617420696e646040820152610caf60f31b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561333857613338613437565b500190565b60008261334c5761334c61344d565b500490565b600081600019048311821515161561336b5761336b613437565b500290565b60008282101561338257613382613437565b500390565b60005b838110156133a257818101518382015260200161338a565b838111156112c15750506000910152565b600181811c908216806133c757607f821691505b602082108114156116f357634e487b7160e01b600052602260045260246000fd5b60006000198214156133fc576133fc613437565b5060010190565b600060ff821660ff81141561341a5761341a613437565b60010192915050565b6000826134325761343261344d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611ee757600080fd5b8015158114611ee757600080fd5b6001600160e01b031981168114611ee757600080fdfea2646970667358221220246c69e5e5502b9909b4b2e65c1a568e9e4fee178c43f7572571257932de4f0064736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e20000000000000000000000001296c7a5160f63b7e73e0b7491141c40900362860000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000003477575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044d69627500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853656e74696e656c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000846756c64626f7267000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000846c3ab6c69616e69000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : receiver_ (address): 0x4D398BEA8773bc7ab284692809645370282Ca5E2
Arg [1] : owner_ (address): 0x1296c7A5160f63b7e73e0b7491141C4090036286
Arg [2] : tribeNames_ (string[]): Guu,Mibu,Sentinel,Fuldborg,Fëliani

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 0000000000000000000000004d398bea8773bc7ab284692809645370282ca5e2
Arg [1] : 0000000000000000000000001296c7a5160f63b7e73e0b7491141c4090036286
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [8] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [10] : 4775750000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 4d69627500000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [14] : 53656e74696e656c000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [16] : 46756c64626f7267000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [18] : 46c3ab6c69616e69000000000000000000000000000000000000000000000000


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.