ETH Price: $3,169.90 (+1.09%)

Token

ShogunSamurais (SGS)
 

Overview

Max Total Supply

7,470 SGS

Holders

2,738

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
3 SGS
0x32af781fd229348420d3e8e46168753e2f89c96b
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

SHOGUN S侍MURAIS is a collection of 8,888 randomly generated NFT Samurais living on the Ethereum Blockchain.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ShogunNFT

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : ShogunNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./interfaces/IShogunToken.sol";

/*  _____ _                             _____                                 _     
  / ____| |                            / ____|                               (_)    
 | (___ | |__   ___   __ _ _   _ _ __ | (___   __ _ _ __ ___  _   _ _ __ __ _ _ ___ 
  \___ \| '_ \ / _ \ / _` | | | | '_ \ \___ \ / _` | '_ ` _ \| | | | '__/ _` | / __|
  ____) | | | | (_) | (_| | |_| | | | |____) | (_| | | | | | | |_| | | | (_| | \__ \
 |_____/|_| |_|\___/ \__, |\__,_|_| |_|_____/ \__,_|_| |_| |_|\__,_|_|  \__,_|_|___/
                      __/ |                                                         
                     |___/    
*/
contract ShogunNFT is ERC721Enumerable, Ownable {
  using SafeMath for uint256;
  using Strings for uint256;
  using ECDSA for bytes32;

  IShogunToken public SHOGUN_TOKEN;

  address payable public treasury;
  address public stakingContractAddress;
  address private signerAddressPublic;
  address private signerAddressPresale;

  string public baseURI;
  string public notRevealedUri;

  uint256 public cost = 0.08 ether;
  uint256 public maxSupply = 8888;
  uint256 public maxMintPerTxn = 4; // maximum number of mint per transaction
  uint256 public nftPerAddressLimitPublic = 8; // maximum number of mint per wallet for public sale
  uint256 public nftPerAddressLimitPresale = 2; // maximum number of mint per wallet for presale
  uint256 public nameChangePrice = 300 ether;

  uint256 public presaleWindow = 24 hours; // 24 hours presale period
  uint256 public presaleStartTime = 1634342400; // 16th October 0800 SGT
  uint256 public publicSaleStartTime = 1634443200; // 17thth October 1200 SGT

  bool public paused = false;
  bool public revealed = false;
  mapping(uint256 => string) public shogunName;

  // manual toggle for presale and public sale //
  bool public presaleOpen = false;
  bool public publicSaleOpen = false;

  // private variables //
  mapping(uint256 => bool) private _isLocked;
  mapping(address => bool) public whitelistedAddresses; // all address of whitelisted OGs
  mapping(address => uint256) private presaleAddressMintedAmount; // number of NFT minted for each wallet during presale
  mapping(address => uint256) private publicAddressMintedAmount; // number of NFT minted for each wallet during public sale
  mapping(bytes => bool) private _nonceUsed; // nonce was used to mint already

  // allows transactiones from only externally owned account (cannot be from smart contract)
  modifier onlyEOA() {
    require(msg.sender == tx.origin, "SHOGUN: Only EOA");
    _;
  }

  // allow transactions only from staking Contract address
  modifier onlyStakingContract() {
    require(
      msg.sender == stakingContractAddress,
      "SHOGUN: Only callable from staking contract"
    );
    _;
  }

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _initBaseURI, // ""
    string memory _notRevealedUri, // default unrevealed IPFS
    address _signerAddressPresale,
    address _signerAddressPublic,
    address _treasury
  ) ERC721(_name, _symbol) {
    setBaseURI(_initBaseURI);
    notRevealedUri = _notRevealedUri;
    setSignerAddressPresale(_signerAddressPresale);
    setSignerAddressPublic(_signerAddressPublic);
    treasury = payable(_treasury);
  }

  // dev team mint
  function devMint(uint256 _mintAmount) public onlyEOA onlyOwner {
    require(!paused); // contract is not paused
    uint256 supply = totalSupply(); // get current mintedAmount
    require(
      supply + _mintAmount <= maxSupply,
      "SHOGUN: total mint amount exceeded supply, try lowering amount"
    );
    for (uint256 i = 1; i <= _mintAmount; i++) {
      _safeMint(msg.sender, supply + i);
    }
  }

  // public sale
  function publicMint(
    bytes memory nonce,
    bytes memory signature,
    uint256 _mintAmount
  ) public payable onlyEOA {
    require(!paused);
    require(
      (isPublicSaleOpen() || publicSaleOpen),
      "SHOGUN: public sale has not started"
    );
    require(!_nonceUsed[nonce], "SHOGUN: nonce was used");
    require(
      isSignedBySigner(msg.sender, nonce, signature, signerAddressPublic),
      "invalid signature"
    );
    uint256 supply = totalSupply();
    require(
      publicAddressMintedAmount[msg.sender] + _mintAmount <=
        nftPerAddressLimitPublic,
      "SHOGUN: You have exceeded max amount of mints"
    );
    require(
      _mintAmount <= maxMintPerTxn,
      "SHOGUN: exceeded max mint amount per transaction"
    );
    require(
      supply + _mintAmount <= maxSupply,
      "SHOGUN: total mint amount exceeded supply, try lowering amount"
    );

    (bool success, ) = treasury.call{ value: msg.value }(""); // forward amount to treasury wallet
    require(success, "SHOGUN: not able to forward msg value to treasury");

    require(
      msg.value == cost * _mintAmount,
      "SHOGUN: not enough ether sent for mint amount"
    );

    for (uint256 i = 1; i <= _mintAmount; i++) {
      publicAddressMintedAmount[msg.sender]++;
      _safeMint(msg.sender, supply + i);
    }
    _nonceUsed[nonce] = true;
  }

  // presale mint
  function presaleMint(
    bytes memory nonce,
    bytes memory signature,
    uint256 _mintAmount
  ) public payable onlyEOA {
    require(!paused, "SHOGUN: contract is paused");
    require(
      (isPresaleOpen() || presaleOpen),
      "SHOGUN: presale has not started or it has ended"
    );
    require(
      whitelistedAddresses[msg.sender],
      "SHOGUN: you are not in the whitelist"
    );
    require(!_nonceUsed[nonce], "SHOGUN: nonce was used");
    require(
      isSignedBySigner(msg.sender, nonce, signature, signerAddressPresale),
      "SHOGUN: invalid signature"
    );
    uint256 supply = totalSupply();
    require(
      presaleAddressMintedAmount[msg.sender] + _mintAmount <=
        nftPerAddressLimitPresale,
      "SHOGUN: you can only mint a maximum of two nft during presale"
    );
    require(
      msg.value >= cost * _mintAmount,
      "SHOGUN: not enought ethere sent for mint amount"
    );

    (bool success, ) = treasury.call{ value: msg.value }(""); // forward amount to treasury wallet
    require(success, "SHOGUN: not able to forward msg value to treasury");

    for (uint256 i = 1; i <= _mintAmount; i++) {
      presaleAddressMintedAmount[msg.sender]++;
      _safeMint(msg.sender, supply + i);
    }
    _nonceUsed[nonce] = true;
  }

  function airdrop(address[] memory giveawayList) public onlyEOA onlyOwner {
    require(!paused, "SHOGUN: contract is paused");
    require(
      balanceOf(msg.sender) >= giveawayList.length,
      "SHOGUN: not enough in wallet for airdrop amount"
    );
    uint256[] memory ownerWallet = walletOfOwner(msg.sender);

    for (uint256 i = 0; i < giveawayList.length; i++) {
      _safeTransfer(msg.sender, giveawayList[i], ownerWallet[i], "0x00");
    }
  }

  //*************** PUBLIC FUNCTIONS ******************//
  function walletOfOwner(address _owner)
    public
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory tokenIds = new uint256[](ownerTokenCount);
    for (uint256 i; i < ownerTokenCount; i++) {
      tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
    }
    return tokenIds;
  }

  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(
      _exists(tokenId),
      "ERC721Metadata: URI query for nonexistent token"
    );

    string memory currentBaseURI = _baseURI();

    if (!revealed) {
      return notRevealedUri;
    } else {
      return
        bytes(currentBaseURI).length > 0
          ? string(abi.encodePacked(currentBaseURI, tokenId.toString()))
          : "";
    }
  }

  //*************** INTERNAL FUNCTIONS ******************//
  function isSignedBySigner(
    address sender,
    bytes memory nonce,
    bytes memory signature,
    address signerAddress
  ) private pure returns (bool) {
    bytes32 hash = keccak256(abi.encodePacked(sender, nonce));
    return signerAddress == hash.recover(signature);
  }

  function _baseURI() internal view virtual override returns (string memory) {
    return baseURI;
  }

  function isPresaleOpen() public view returns (bool) {
    return
      block.timestamp >= presaleStartTime &&
      block.timestamp < (presaleStartTime + presaleWindow);
  }

  function isPublicSaleOpen() public view returns (bool) {
    return block.timestamp >= publicSaleStartTime;
  }

  function isWhitelisted(address _user) public view returns (bool) {
    return whitelistedAddresses[_user];
  }

  //*************** OWNER FUNCTIONS ******************//
  // No possible way to unreveal once it is toggled
  function reveal() public onlyOwner {
    revealed = true;
  }

  function setBaseURI(string memory _newBaseURI) public onlyOwner {
    baseURI = _newBaseURI;
  }

  function setShogunToken(address _shogunToken) external onlyOwner {
    SHOGUN_TOKEN = IShogunToken(_shogunToken);
  }

  function pause(bool _state) public onlyOwner {
    paused = _state;
  }

  function whitelistUsers(address[] calldata _users) external onlyOwner {
    for (uint256 i = 0; i < _users.length; i++) {
      whitelistedAddresses[_users[i]] = true;
    }
  }

  function withdrawToTreasury() public payable onlyOwner {
    (bool success, ) = treasury.call{ value: address(this).balance }(""); // returns boolean and data
    require(success);
  }

  function setPresaleOpen(bool _presaleOpen) public onlyOwner {
    presaleOpen = _presaleOpen;
  }

  function setPublicSaleOpen(bool _publicSaleOpen) public onlyOwner {
    publicSaleOpen = _publicSaleOpen;
  }

  function setSignerAddressPresale(address presaleSignerAddresss)
    public
    onlyOwner
  {
    signerAddressPresale = presaleSignerAddresss;
  }

  function setSignerAddressPublic(address publicSignerAddress)
    public
    onlyOwner
  {
    signerAddressPublic = publicSignerAddress;
  }

  function setNotRevealedUri(string memory _notRevealedUri)
    public
    onlyOwner
  {
    notRevealedUri = _notRevealedUri;
  }

  //*************** Future Utility Functions ******************//
  function setStakingContractAddress(address _stakingContract)
    public
    onlyOwner
  {
    stakingContractAddress = _stakingContract;
  }

  // sacrifice/burn ERC721
  function seppuku(uint256 _tokenId) public {
    require(
      _isApprovedOrOwner(_msgSender(), _tokenId),
      "ERC721: transfer caller is not owner nor approved"
    );
    _burn(_tokenId);
  }

  function setNameChangePrice(uint256 _newNameChangePrice) public onlyOwner {
    nameChangePrice = _newNameChangePrice;
  }

  function changeName(uint256 tokenId, string memory newName) public virtual {
    address owner = ownerOf(tokenId);
    require(_msgSender() == owner, "ERC721: caller is not the owner");
    require(validateName(newName) == true, "SHOGUN: Not a valid new name");
    require(
      sha256(bytes(newName)) != sha256(bytes(shogunName[tokenId])),
      "SHOGUN: New name is same as the current one"
    );

    SHOGUN_TOKEN.burn(_msgSender(), nameChangePrice);
    shogunName[tokenId] = newName;
  }

  function tokenNameByIndex(uint256 index) public view returns (string memory) {
    return shogunName[index];
  }

  function validateName(string memory str) public pure returns (bool) {
    bytes memory b = bytes(str);
    if (b.length < 1) return false;
    if (b.length > 25) return false; // Cannot be longer than 25 characters
    if (b[0] == 0x20) return false; // Leading space
    if (b[b.length - 1] == 0x20) return false; // Trailing space

    bytes1 lastChar = b[0];

    for (uint256 i; i < b.length; i++) {
      bytes1 char = b[i];

      if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces

      if (
        !(char >= 0x30 && char <= 0x39) && //9-0
        !(char >= 0x41 && char <= 0x5A) && //A-Z
        !(char >= 0x61 && char <= 0x7A) && //a-z
        !(char == 0x20) //space
      ) return false;

      lastChar = char;
    }

    return true;
  }

  function lockToken(uint256[] memory _tokenIds) external onlyStakingContract {
    for (uint256 i = 0; i < _tokenIds.length; i++) {
      _isLocked[_tokenIds[i]] = true;
    }
  }

  function unlockToken(uint256[] memory _tokenIds)
    external
    onlyStakingContract
  {
    for (uint256 i = 0; i < _tokenIds.length; i++) {
      _isLocked[_tokenIds[i]] = false;
    }
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual override(ERC721Enumerable) {
    require(_isLocked[tokenId] == false, "SHOGUN: Token is Locked");
    super._beforeTokenTransfer(from, to, tokenId);
  }
}

File 2 of 17 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 3 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 17 : IShogunToken.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IShogunToken is IERC20 {
    function updateRewardOnMint(address _user, uint256 _amount) external;

    function updateReward(address _from, address _to) external;

    function getReward(address _to) external;

    function burn(address _from, uint256 _amount) external;

    function mint(address to, uint256 amount) external;

    function getTotalClaimable(address _user) external view returns (uint256);
}

File 7 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

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

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.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 {}
}

File 8 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 9 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 11 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 12 of 17 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @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 13 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 14 of 17 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 15 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 16 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 17 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"string","name":"_notRevealedUri","type":"string"},{"internalType":"address","name":"_signerAddressPresale","type":"address"},{"internalType":"address","name":"_signerAddressPublic","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"SHOGUN_TOKEN","outputs":[{"internalType":"contract IShogunToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"giveawayList","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"isPresaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"lockToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxMintPerTxn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftPerAddressLimitPresale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftPerAddressLimitPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleWindow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"_tokenId","type":"uint256"}],"name":"seppuku","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newNameChangePrice","type":"uint256"}],"name":"setNameChangePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedUri","type":"string"}],"name":"setNotRevealedUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_presaleOpen","type":"bool"}],"name":"setPresaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicSaleOpen","type":"bool"}],"name":"setPublicSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_shogunToken","type":"address"}],"name":"setShogunToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"presaleSignerAddresss","type":"address"}],"name":"setSignerAddressPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"publicSignerAddress","type":"address"}],"name":"setSignerAddressPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingContract","type":"address"}],"name":"setStakingContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"shogunName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenNameByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"unlockToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"whitelistUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawToTreasury","outputs":[],"stateMutability":"payable","type":"function"}]

608060405267011c37937e0800006012556122b8601355600460145560086015556002601655681043561a88293000006017556201518060185563616a160060195563616b9fc0601a55601b805461ffff19908116909155601d805490911690553480156200006d57600080fd5b5060405162004e3238038062004e3283398101604081905262000090916200044b565b865187908790620000a9906000906020850190620002dd565b508051620000bf906001906020840190620002dd565b505050620000dc620000d66200014060201b60201c565b62000144565b620000e78562000196565b8351620000fc906011906020870190620002dd565b506200010883620001fe565b620001138262000266565b600c80546001600160a01b0319166001600160a01b039290921691909117905550620005bf945050505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001a062000140565b6001600160a01b0316620001b3620002ce565b6001600160a01b031614620001e55760405162461bcd60e51b8152600401620001dc9062000537565b60405180910390fd5b8051620001fa906010906020840190620002dd565b5050565b6200020862000140565b6001600160a01b03166200021b620002ce565b6001600160a01b031614620002445760405162461bcd60e51b8152600401620001dc9062000537565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6200027062000140565b6001600160a01b031662000283620002ce565b6001600160a01b031614620002ac5760405162461bcd60e51b8152600401620001dc9062000537565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031690565b828054620002eb906200056c565b90600052602060002090601f0160209004810192826200030f57600085556200035a565b82601f106200032a57805160ff19168380011785556200035a565b828001600101855582156200035a579182015b828111156200035a5782518255916020019190600101906200033d565b50620003689291506200036c565b5090565b5b808211156200036857600081556001016200036d565b80516001600160a01b03811681146200039b57600080fd5b919050565b600082601f830112620003b1578081fd5b81516001600160401b0380821115620003ce57620003ce620005a9565b6040516020601f8401601f1916820181018381118382101715620003f657620003f6620005a9565b60405283825285840181018710156200040d578485fd5b8492505b8383101562000430578583018101518284018201529182019162000411565b838311156200044157848185840101525b5095945050505050565b600080600080600080600060e0888a03121562000466578283fd5b87516001600160401b03808211156200047d578485fd5b6200048b8b838c01620003a0565b985060208a0151915080821115620004a1578485fd5b620004af8b838c01620003a0565b975060408a0151915080821115620004c5578485fd5b620004d38b838c01620003a0565b965060608a0151915080821115620004e9578485fd5b50620004f88a828b01620003a0565b945050620005096080890162000383565b92506200051960a0890162000383565b91506200052960c0890162000383565b905092959891949750929550565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6002810460018216806200058157607f821691505b60208210811415620005a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61486380620005cf6000396000f3fe6080604052600436106103d95760003560e01c80636c0360eb116101fd578063b88d4fde11610118578063da4ac476116100ab578063edec5f271161007a578063edec5f2714610a92578063f2fde38b14610ab2578063f5b9662114610ad2578063f9e2379914610af2578063fdc593c314610b07576103d9565b8063da4ac47614610a1d578063e6cf726b14610a3d578063e985e9c514610a5d578063eb4f847b14610a7d576103d9565b8063c87b56dd116100e7578063c87b56dd146109be578063caa8078f146109de578063ce8b680c146109f3578063d5abeb0114610a08576103d9565b8063b88d4fde14610949578063bee6348a14610969578063c17ecd121461097e578063c39cbef11461099e576103d9565b806384a1b902116101905780639ffdb65a1161015f5780639ffdb65a146108df578063a22cb465146108ff578063a475b5dd1461091f578063a82524b214610934576103d9565b806384a1b90214610880578063885bf15c146108a05780638da5cb5b146108b557806395d89b41146108ca576103d9565b8063715018a6116101cc578063715018a61461082e578063729ad39e146108435780637e80c186146108635780638124428a1461086b576103d9565b80636c0360eb146107b95780636d522418146107ce5780636defcd46146107ee57806370a082311461080e576103d9565b80632e09282e116102f857806349759d951161028b5780635c975abb1161025a5780635c975abb1461073a57806361d027b31461074f5780636352211e14610764578063665adcfd146107845780636bb7b1d9146107a4576103d9565b806349759d95146106c55780634f6ccce7146106e5578063518302271461070557806355f804b31461071a576103d9565b80633af32abf116102c75780633af32abf1461064357806342842e0e14610663578063438b63001461068357806345ca7738146106b0576103d9565b80632e09282e146105d95780632f745c59146105ee5780633535f48b1461060e578063375a069a14610623576103d9565b806313faede6116103705780631c1f8aa31161033f5780631c1f8aa31461056657806322a589c11461058657806323394d991461059957806323b872dd146105b9576103d9565b806313faede6146104fa57806318160ddd1461051c578063190145bb146105315780631a6949e314610551576103d9565b8063081812fc116103ac578063081812fc14610478578063081c8c44146104a5578063095ea7b3146104ba5780630acb7924146104da576103d9565b806301ffc9a7146103de57806302329a291461041457806306c933d81461043657806306fdde0314610456575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004613791565b610b1a565b60405161040b9190613abe565b60405180910390f35b34801561042057600080fd5b5061043461042f36600461375f565b610b47565b005b34801561044257600080fd5b506103fe61045136600461348a565b610ba2565b34801561046257600080fd5b5061046b610bb7565b60405161040b9190613ae7565b34801561048457600080fd5b50610498610493366004613866565b610c49565b60405161040b9190613a10565b3480156104b157600080fd5b5061046b610c8c565b3480156104c657600080fd5b506104346104d53660046135a7565b610d1a565b3480156104e657600080fd5b506104346104f53660046136db565b610db2565b34801561050657600080fd5b5061050f610e52565b60405161040b9190614680565b34801561052857600080fd5b5061050f610e58565b34801561053d57600080fd5b5061046b61054c366004613866565b610e5e565b34801561055d57600080fd5b506103fe610e77565b34801561057257600080fd5b5061043461058136600461348a565b610e80565b6104346105943660046137c9565b610ee1565b3480156105a557600080fd5b506104346105b436600461375f565b61118b565b3480156105c557600080fd5b506104346105d43660046134dd565b6111e4565b3480156105e557600080fd5b5061050f61121c565b3480156105fa57600080fd5b5061050f6106093660046135a7565b611222565b34801561061a57600080fd5b50610498611274565b34801561062f57600080fd5b5061043461063e366004613866565b611283565b34801561064f57600080fd5b506103fe61065e36600461348a565b611353565b34801561066f57600080fd5b5061043461067e3660046134dd565b611371565b34801561068f57600080fd5b506106a361069e36600461348a565b61138c565b60405161040b9190613a7a565b3480156106bc57600080fd5b5061050f61144a565b3480156106d157600080fd5b506104346106e0366004613866565b611450565b3480156106f157600080fd5b5061050f610700366004613866565b611483565b34801561071157600080fd5b506103fe6114de565b34801561072657600080fd5b50610434610735366004613833565b6114ec565b34801561074657600080fd5b506103fe61153e565b34801561075b57600080fd5b50610498611547565b34801561077057600080fd5b5061049861077f366004613866565b611556565b34801561079057600080fd5b5061043461079f3660046136db565b61158b565b3480156107b057600080fd5b5061050f611627565b3480156107c557600080fd5b5061046b61162d565b3480156107da57600080fd5b5061046b6107e9366004613866565b61163a565b3480156107fa57600080fd5b5061043461080936600461348a565b6116dc565b34801561081a57600080fd5b5061050f61082936600461348a565b61173d565b34801561083a57600080fd5b50610434611781565b34801561084f57600080fd5b5061043461085e36600461363f565b6117cc565b610434611917565b34801561087757600080fd5b506104986119c4565b34801561088c57600080fd5b5061043461089b366004613866565b6119d3565b3480156108ac57600080fd5b5061050f611a17565b3480156108c157600080fd5b50610498611a1d565b3480156108d657600080fd5b5061046b611a2c565b3480156108eb57600080fd5b506103fe6108fa366004613833565b611a3b565b34801561090b57600080fd5b5061043461091a36600461357e565b611c88565b34801561092b57600080fd5b50610434611d56565b34801561094057600080fd5b5061050f611da6565b34801561095557600080fd5b50610434610964366004613518565b611dac565b34801561097557600080fd5b506103fe611deb565b34801561098a57600080fd5b50610434610999366004613833565b611df4565b3480156109aa57600080fd5b506104346109b936600461387e565b611e46565b3480156109ca57600080fd5b5061046b6109d9366004613866565b61200d565b3480156109ea57600080fd5b5061050f61213a565b3480156109ff57600080fd5b5061050f612140565b348015610a1457600080fd5b5061050f612146565b348015610a2957600080fd5b50610434610a3836600461348a565b61214c565b348015610a4957600080fd5b50610434610a5836600461348a565b6121ad565b348015610a6957600080fd5b506103fe610a783660046134ab565b61220e565b348015610a8957600080fd5b506103fe61223c565b348015610a9e57600080fd5b50610434610aad3660046135d0565b612263565b348015610abe57600080fd5b50610434610acd36600461348a565b612322565b348015610ade57600080fd5b50610434610aed36600461375f565b612390565b348015610afe57600080fd5b506103fe6123e2565b610434610b153660046137c9565b6123f0565b60006001600160e01b0319821663780e9d6360e01b1480610b3f5750610b3f8261264a565b90505b919050565b610b4f61268a565b6001600160a01b0316610b60611a1d565b6001600160a01b031614610b8f5760405162461bcd60e51b8152600401610b8690614291565b60405180910390fd5b601b805460ff1916911515919091179055565b601f6020526000908152604090205460ff1681565b606060008054610bc690614771565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf290614771565b8015610c3f5780601f10610c1457610100808354040283529160200191610c3f565b820191906000526020600020905b815481529060010190602001808311610c2257829003601f168201915b5050505050905090565b6000610c548261268e565b610c705760405162461bcd60e51b8152600401610b8690614245565b506000908152600460205260409020546001600160a01b031690565b60118054610c9990614771565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc590614771565b8015610d125780601f10610ce757610100808354040283529160200191610d12565b820191906000526020600020905b815481529060010190602001808311610cf557829003601f168201915b505050505081565b6000610d2582611556565b9050806001600160a01b0316836001600160a01b03161415610d595760405162461bcd60e51b8152600401610b86906143fe565b806001600160a01b0316610d6b61268a565b6001600160a01b03161480610d875750610d8781610a7861268a565b610da35760405162461bcd60e51b8152600401610b8690613f94565b610dad83836126ab565b505050565b600d546001600160a01b03163314610ddc5760405162461bcd60e51b8152600401610b8690613d68565b60005b8151811015610e4e576001601e6000848481518110610e0e57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610e46906147a6565b915050610ddf565b5050565b60125481565b60085490565b601c6020526000908152604090208054610c9990614771565b601a5442101590565b610e8861268a565b6001600160a01b0316610e99611a1d565b6001600160a01b031614610ebf5760405162461bcd60e51b8152600401610b8690614291565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b333214610f005760405162461bcd60e51b8152600401610b869061421b565b601b5460ff1615610f1057600080fd5b610f18610e77565b80610f2a5750601d54610100900460ff165b610f465760405162461bcd60e51b8152600401610b86906143bb565b602283604051610f569190613927565b9081526040519081900360200190205460ff1615610f865760405162461bcd60e51b8152600401610b8690614123565b600e54610fa1903390859085906001600160a01b0316612719565b610fbd5760405162461bcd60e51b8152600401610b8690613b68565b6000610fc7610e58565b6015543360009081526021602052604090205491925090610fe99084906146e3565b11156110075760405162461bcd60e51b8152600401610b8690614633565b6014548211156110295760405162461bcd60e51b8152600401610b869061408a565b60135461103683836146e3565b11156110545760405162461bcd60e51b8152600401610b869061430f565b600c546040516000916001600160a01b031690349061107290613a0d565b60006040518083038185875af1925050503d80600081146110af576040519150601f19603f3d011682016040523d82523d6000602084013e6110b4565b606091505b50509050806110d55760405162461bcd60e51b8152600401610b8690614195565b826012546110e3919061470f565b34146111015760405162461bcd60e51b8152600401610b8690613d1b565b60015b83811161115157336000908152602160205260408120805491611126836147a6565b9091555061113f90503361113a83866146e3565b612773565b80611149816147a6565b915050611104565b5060016022866040516111649190613927565b908152604051908190036020019020805491151560ff199092169190911790555050505050565b61119361268a565b6001600160a01b03166111a4611a1d565b6001600160a01b0316146111ca5760405162461bcd60e51b8152600401610b8690614291565b601d80549115156101000261ff0019909216919091179055565b6111f56111ef61268a565b8261278d565b6112115760405162461bcd60e51b8152600401610b8690614476565b610dad83838361280a565b60165481565b600061122d8361173d565b821061124b5760405162461bcd60e51b8152600401610b8690613c01565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d546001600160a01b031681565b3332146112a25760405162461bcd60e51b8152600401610b869061421b565b6112aa61268a565b6001600160a01b03166112bb611a1d565b6001600160a01b0316146112e15760405162461bcd60e51b8152600401610b8690614291565b601b5460ff16156112f157600080fd5b60006112fb610e58565b60135490915061130b83836146e3565b11156113295760405162461bcd60e51b8152600401610b869061430f565b60015b828111610dad576113413361113a83856146e3565b8061134b816147a6565b91505061132c565b6001600160a01b03166000908152601f602052604090205460ff1690565b610dad83838360405180602001604052806000815250611dac565b606060006113998361173d565b905060008167ffffffffffffffff8111156113c457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113ed578160200160208202803683370190505b50905060005b82811015611442576114058582611222565b82828151811061142557634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061143a816147a6565b9150506113f3565b509392505050565b60175481565b61145b6111ef61268a565b6114775760405162461bcd60e51b8152600401610b8690614476565b61148081612937565b50565b600061148d610e58565b82106114ab5760405162461bcd60e51b8152600401610b8690614561565b600882815481106114cc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601b54610100900460ff1681565b6114f461268a565b6001600160a01b0316611505611a1d565b6001600160a01b03161461152b5760405162461bcd60e51b8152600401610b8690614291565b8051610e4e90601090602084019061335f565b601b5460ff1681565b600c546001600160a01b031681565b6000818152600260205260408120546001600160a01b031680610b3f5760405162461bcd60e51b8152600401610b86906140da565b600d546001600160a01b031633146115b55760405162461bcd60e51b8152600401610b8690613d68565b60005b8151811015610e4e576000601e60008484815181106115e757634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550808061161f906147a6565b9150506115b8565b601a5481565b60108054610c9990614771565b6000818152601c6020526040902080546060919061165790614771565b80601f016020809104026020016040519081016040528092919081815260200182805461168390614771565b80156116d05780601f106116a5576101008083540402835291602001916116d0565b820191906000526020600020905b8154815290600101906020018083116116b357829003601f168201915b50505050509050919050565b6116e461268a565b6001600160a01b03166116f5611a1d565b6001600160a01b03161461171b5760405162461bcd60e51b8152600401610b8690614291565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166117655760405162461bcd60e51b8152600401610b8690614040565b506001600160a01b031660009081526003602052604090205490565b61178961268a565b6001600160a01b031661179a611a1d565b6001600160a01b0316146117c05760405162461bcd60e51b8152600401610b8690614291565b6117ca60006129de565b565b3332146117eb5760405162461bcd60e51b8152600401610b869061421b565b6117f361268a565b6001600160a01b0316611804611a1d565b6001600160a01b03161461182a5760405162461bcd60e51b8152600401610b8690614291565b601b5460ff161561184d5760405162461bcd60e51b8152600401610b869061443f565b80516118583361173d565b10156118765760405162461bcd60e51b8152600401610b8690614512565b60006118813361138c565b905060005b8251811015610dad57611905338483815181106118b357634e487b7160e01b600052603260045260246000fd5b60200260200101518484815181106118db57634e487b7160e01b600052603260045260246000fd5b6020026020010151604051806040016040528060048152602001630307830360e41b815250612a30565b8061190f816147a6565b915050611886565b61191f61268a565b6001600160a01b0316611930611a1d565b6001600160a01b0316146119565760405162461bcd60e51b8152600401610b8690614291565b600c546040516000916001600160a01b031690479061197490613a0d565b60006040518083038185875af1925050503d80600081146119b1576040519150601f19603f3d011682016040523d82523d6000602084013e6119b6565b606091505b505090508061148057600080fd5b600b546001600160a01b031681565b6119db61268a565b6001600160a01b03166119ec611a1d565b6001600160a01b031614611a125760405162461bcd60e51b8152600401610b8690614291565b601755565b60155481565b600a546001600160a01b031690565b606060018054610bc690614771565b600080829050600181511015611a55576000915050610b42565b601981511115611a69576000915050610b42565b80600081518110611a8a57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611aaf576000915050610b42565b8060018251611abe919061472e565b81518110611adc57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611b01576000915050610b42565b600081600081518110611b2457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b8251811015611c7d576000838281518110611b6357634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b81148015611b945750600160fd1b6001600160f81b03198416145b15611ba6576000945050505050610b42565b600360fc1b6001600160f81b0319821610801590611bd25750603960f81b6001600160f81b0319821611155b158015611c085750604160f81b6001600160f81b0319821610801590611c065750602d60f91b6001600160f81b0319821611155b155b8015611c3d5750606160f81b6001600160f81b0319821610801590611c3b5750603d60f91b6001600160f81b0319821611155b155b8015611c575750600160fd1b6001600160f81b0319821614155b15611c69576000945050505050610b42565b915080611c75816147a6565b915050611b38565b506001949350505050565b611c9061268a565b6001600160a01b0316826001600160a01b03161415611cc15760405162461bcd60e51b8152600401610b8690613df7565b8060056000611cce61268a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611d1261268a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d4a9190613abe565b60405180910390a35050565b611d5e61268a565b6001600160a01b0316611d6f611a1d565b6001600160a01b031614611d955760405162461bcd60e51b8152600401610b8690614291565b601b805461ff001916610100179055565b60195481565b611dbd611db761268a565b8361278d565b611dd95760405162461bcd60e51b8152600401610b8690614476565b611de584848484612a30565b50505050565b601d5460ff1681565b611dfc61268a565b6001600160a01b0316611e0d611a1d565b6001600160a01b031614611e335760405162461bcd60e51b8152600401610b8690614291565b8051610e4e90601190602084019061335f565b6000611e5183611556565b9050806001600160a01b0316611e6561268a565b6001600160a01b031614611e8b5760405162461bcd60e51b8152600401610b8690613bca565b611e9482611a3b565b1515600114611eb55760405162461bcd60e51b8152600401610b86906145ad565b6000838152601c6020526040908190209051600291611ed391613943565b602060405180830381855afa158015611ef0573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f139190613779565b600283604051611f239190613927565b602060405180830381855afa158015611f40573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f639190613779565b1415611f815760405162461bcd60e51b8152600401610b86906144c7565b600b546001600160a01b0316639dc29fac611f9a61268a565b6017546040518363ffffffff1660e01b8152600401611fba929190613a61565b600060405180830381600087803b158015611fd457600080fd5b505af1158015611fe8573d6000803e3d6000fd5b5050506000848152601c602090815260409091208451611de59350909185019061335f565b60606120188261268e565b6120345760405162461bcd60e51b8152600401610b869061436c565b600061203e612a63565b601b54909150610100900460ff166120e3576011805461205d90614771565b80601f016020809104026020016040519081016040528092919081815260200182805461208990614771565b80156120d65780601f106120ab576101008083540402835291602001916120d6565b820191906000526020600020905b8154815290600101906020018083116120b957829003601f168201915b5050505050915050610b42565b6000815111612101576040518060200160405280600081525061212c565b8061210b84612a72565b60405160200161211c9291906139de565b6040516020818303038152906040525b915050610b42565b50919050565b60145481565b60185481565b60135481565b61215461268a565b6001600160a01b0316612165611a1d565b6001600160a01b03161461218b5760405162461bcd60e51b8152600401610b8690614291565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6121b561268a565b6001600160a01b03166121c6611a1d565b6001600160a01b0316146121ec5760405162461bcd60e51b8152600401610b8690614291565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000601954421015801561225e575060185460195461225b91906146e3565b42105b905090565b61226b61268a565b6001600160a01b031661227c611a1d565b6001600160a01b0316146122a25760405162461bcd60e51b8152600401610b8690614291565b60005b81811015610dad576001601f60008585858181106122d357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122e8919061348a565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061231a816147a6565b9150506122a5565b61232a61268a565b6001600160a01b031661233b611a1d565b6001600160a01b0316146123615760405162461bcd60e51b8152600401610b8690614291565b6001600160a01b0381166123875760405162461bcd60e51b8152600401610b8690613c9e565b611480816129de565b61239861268a565b6001600160a01b03166123a9611a1d565b6001600160a01b0316146123cf5760405162461bcd60e51b8152600401610b8690614291565b601d805460ff1916911515919091179055565b601d54610100900460ff1681565b33321461240f5760405162461bcd60e51b8152600401610b869061421b565b601b5460ff16156124325760405162461bcd60e51b8152600401610b869061443f565b61243a61223c565b806124475750601d5460ff165b6124635760405162461bcd60e51b8152600401610b8690613ff1565b336000908152601f602052604090205460ff166124925760405162461bcd60e51b8152600401610b8690613f19565b6022836040516124a29190613927565b9081526040519081900360200190205460ff16156124d25760405162461bcd60e51b8152600401610b8690614123565b600f546124ed903390859085906001600160a01b0316612719565b6125095760405162461bcd60e51b8152600401610b8690613f5d565b6000612513610e58565b601654336000908152602080526040902054919250906125349084906146e3565b11156125525760405162461bcd60e51b8152600401610b8690613ebc565b81601254612560919061470f565b34101561257f5760405162461bcd60e51b8152600401610b86906145e4565b600c546040516000916001600160a01b031690349061259d90613a0d565b60006040518083038185875af1925050503d80600081146125da576040519150601f19603f3d011682016040523d82523d6000602084013e6125df565b606091505b50509050806126005760405162461bcd60e51b8152600401610b8690614195565b60015b838111611151573360009081526020805260408120805491612624836147a6565b9091555061263890503361113a83866146e3565b80612642816147a6565b915050612603565b60006001600160e01b031982166380ac58cd60e01b148061267b57506001600160e01b03198216635b5e139f60e01b145b80610b3f5750610b3f82612b8d565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126e082611556565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080858560405160200161272f9291906138ef565b60408051601f19818403018152919052805160209091012090506127538185612ba6565b6001600160a01b0316836001600160a01b0316149150505b949350505050565b610e4e828260405180602001604052806000815250612bc2565b60006127988261268e565b6127b45760405162461bcd60e51b8152600401610b8690613e70565b60006127bf83611556565b9050806001600160a01b0316846001600160a01b031614806127fa5750836001600160a01b03166127ef84610c49565b6001600160a01b0316145b8061276b575061276b818561220e565b826001600160a01b031661281d82611556565b6001600160a01b0316146128435760405162461bcd60e51b8152600401610b86906142c6565b6001600160a01b0382166128695760405162461bcd60e51b8152600401610b8690613db3565b612874838383612bf5565b61287f6000826126ab565b6001600160a01b03831660009081526003602052604081208054600192906128a890849061472e565b90915550506001600160a01b03821660009081526003602052604081208054600192906128d69084906146e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061294282611556565b905061295081600084612bf5565b61295b6000836126ab565b6001600160a01b038116600090815260036020526040812080546001929061298490849061472e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612a3b84848461280a565b612a4784848484612c2f565b611de55760405162461bcd60e51b8152600401610b8690613c4c565b606060108054610bc690614771565b606081612a9757506040805180820190915260018152600360fc1b6020820152610b42565b8160005b8115612ac15780612aab816147a6565b9150612aba9050600a836146fb565b9150612a9b565b60008167ffffffffffffffff811115612aea57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612b14576020820181803683370190505b5090505b841561276b57612b2960018361472e565b9150612b36600a866147c1565b612b419060306146e3565b60f81b818381518110612b6457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b86600a866146fb565b9450612b18565b6001600160e01b031981166301ffc9a760e01b14919050565b6000806000612bb58585612d47565b9150915061144281612db7565b612bcc8383612ee4565b612bd96000848484612c2f565b610dad5760405162461bcd60e51b8152600401610b8690613c4c565b6000818152601e602052604090205460ff1615612c245760405162461bcd60e51b8152600401610b8690613b31565b610dad838383612fc3565b6000612c43846001600160a01b031661304c565b15612d3f57836001600160a01b031663150b7a02612c5f61268a565b8786866040518563ffffffff1660e01b8152600401612c819493929190613a24565b602060405180830381600087803b158015612c9b57600080fd5b505af1925050508015612ccb575060408051601f3d908101601f19168201909252612cc8918101906137ad565b60015b612d25573d808015612cf9576040519150601f19603f3d011682016040523d82523d6000602084013e612cfe565b606091505b508051612d1d5760405162461bcd60e51b8152600401610b8690613c4c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061276b565b50600161276b565b600080825160411415612d7e5760208301516040840151606085015160001a612d7287828585613052565b94509450505050612db0565b825160401415612da85760208301516040840151612d9d868383613132565b935093505050612db0565b506000905060025b9250929050565b6000816004811115612dd957634e487b7160e01b600052602160045260246000fd5b1415612de457611480565b6001816004811115612e0657634e487b7160e01b600052602160045260246000fd5b1415612e245760405162461bcd60e51b8152600401610b8690613afa565b6002816004811115612e4657634e487b7160e01b600052602160045260246000fd5b1415612e645760405162461bcd60e51b8152600401610b8690613b93565b6003816004811115612e8657634e487b7160e01b600052602160045260246000fd5b1415612ea45760405162461bcd60e51b8152600401610b8690613e2e565b6004816004811115612ec657634e487b7160e01b600052602160045260246000fd5b14156114805760405162461bcd60e51b8152600401610b8690614153565b6001600160a01b038216612f0a5760405162461bcd60e51b8152600401610b86906141e6565b612f138161268e565b15612f305760405162461bcd60e51b8152600401610b8690613ce4565b612f3c60008383612bf5565b6001600160a01b0382166000908152600360205260408120805460019290612f659084906146e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612fce838383610dad565b6001600160a01b038316612fea57612fe581613161565b61300d565b816001600160a01b0316836001600160a01b03161461300d5761300d83826131a5565b6001600160a01b0382166130295761302481613242565b610dad565b826001600160a01b0316826001600160a01b031614610dad57610dad828261331b565b3b151590565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156130895750600090506003613129565b8460ff16601b141580156130a157508460ff16601c14155b156130b25750600090506004613129565b6000600187878787604051600081526020016040526040516130d79493929190613ac9565b6020604051602081039080840390855afa1580156130f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661312257600060019250925050613129565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161315387828885613052565b935093505050935093915050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016131b28461173d565b6131bc919061472e565b60008381526007602052604090205490915080821461320f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906132549060019061472e565b6000838152600960205260408120546008805493945090928490811061328a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106132b957634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806132ff57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006133268361173d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461336b90614771565b90600052602060002090601f01602090048101928261338d57600085556133d3565b82601f106133a657805160ff19168380011785556133d3565b828001600101855582156133d3579182015b828111156133d35782518255916020019190600101906133b8565b506133df9291506133e3565b5090565b5b808211156133df57600081556001016133e4565b80356001600160a01b0381168114610b4257600080fd5b80358015158114610b4257600080fd5b600082601f83011261342f578081fd5b813567ffffffffffffffff81111561344957613449614801565b61345c601f8201601f1916602001614689565b818152846020838601011115613470578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561349b578081fd5b6134a4826133f8565b9392505050565b600080604083850312156134bd578081fd5b6134c6836133f8565b91506134d4602084016133f8565b90509250929050565b6000806000606084860312156134f1578081fd5b6134fa846133f8565b9250613508602085016133f8565b9150604084013590509250925092565b6000806000806080858703121561352d578081fd5b613536856133f8565b9350613544602086016133f8565b925060408501359150606085013567ffffffffffffffff811115613566578182fd5b6135728782880161341f565b91505092959194509250565b60008060408385031215613590578182fd5b613599836133f8565b91506134d46020840161340f565b600080604083850312156135b9578182fd5b6135c2836133f8565b946020939093013593505050565b600080602083850312156135e2578182fd5b823567ffffffffffffffff808211156135f9578384fd5b818501915085601f83011261360c578384fd5b81358181111561361a578485fd5b866020808302850101111561362d578485fd5b60209290920196919550909350505050565b60006020808385031215613651578182fd5b823567ffffffffffffffff811115613667578283fd5b8301601f81018513613677578283fd5b803561368a613685826146b3565b614689565b81815283810190838501858402850186018910156136a6578687fd5b8694505b838510156136cf576136bb816133f8565b8352600194909401939185019185016136aa565b50979650505050505050565b600060208083850312156136ed578182fd5b823567ffffffffffffffff811115613703578283fd5b8301601f81018513613713578283fd5b8035613721613685826146b3565b818152838101908385018584028501860189101561373d578687fd5b8694505b838510156136cf578035835260019490940193918501918501613741565b600060208284031215613770578081fd5b6134a48261340f565b60006020828403121561378a578081fd5b5051919050565b6000602082840312156137a2578081fd5b81356134a481614817565b6000602082840312156137be578081fd5b81516134a481614817565b6000806000606084860312156137dd578081fd5b833567ffffffffffffffff808211156137f4578283fd5b6138008783880161341f565b94506020860135915080821115613815578283fd5b506138228682870161341f565b925050604084013590509250925092565b600060208284031215613844578081fd5b813567ffffffffffffffff81111561385a578182fd5b61276b8482850161341f565b600060208284031215613877578081fd5b5035919050565b60008060408385031215613890578182fd5b82359150602083013567ffffffffffffffff8111156138ad578182fd5b6138b98582860161341f565b9150509250929050565b600081518084526138db816020860160208601614745565b601f01601f19169290920160200192915050565b60006bffffffffffffffffffffffff198460601b1682528251613919816014850160208701614745565b919091016014019392505050565b60008251613939818460208701614745565b9190910192915050565b815460009081906002810460018083168061395f57607f831692505b602080841082141561397f57634e487b7160e01b87526022600452602487fd5b81801561399357600181146139a4576139d0565b60ff198616895284890196506139d0565b6139ad8a6146d7565b885b868110156139c85781548b8201529085019083016139af565b505084890196505b509498975050505050505050565b600083516139f0818460208801614745565b835190830190613a04818360208801614745565b01949350505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613a57908301846138c3565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613ab257835183529284019291840191600101613a96565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526134a460208301846138c3565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526017908201527f53484f47554e3a20546f6b656e206973204c6f636b6564000000000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252601f908201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252602d908201527f53484f47554e3a206e6f7420656e6f7567682065746865722073656e7420666f60408201526c1c881b5a5b9d08185b5bdd5b9d609a1b606082015260800190565b6020808252602b908201527f53484f47554e3a204f6e6c792063616c6c61626c652066726f6d207374616b6960408201526a1b99c818dbdb9d1c9858dd60aa1b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252603d908201527f53484f47554e3a20796f752063616e206f6e6c79206d696e742061206d61786960408201527f6d756d206f662074776f206e667420647572696e672070726573616c65000000606082015260800190565b60208082526024908201527f53484f47554e3a20796f7520617265206e6f7420696e207468652077686974656040820152631b1a5cdd60e21b606082015260800190565b60208082526019908201527f53484f47554e3a20696e76616c6964207369676e617475726500000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602f908201527f53484f47554e3a2070726573616c6520686173206e6f7420737461727465642060408201526e1bdc881a5d081a185cc8195b991959608a1b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526030908201527f53484f47554e3a206578636565646564206d6178206d696e7420616d6f756e7460408201526f103832b9103a3930b739b0b1ba34b7b760811b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526016908201527514d213d1d5538e881b9bdb98d9481dd85cc81d5cd95960521b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526031908201527f53484f47554e3a206e6f742061626c6520746f20666f7277617264206d73672060408201527076616c756520746f20747265617375727960781b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b60208082526010908201526f53484f47554e3a204f6e6c7920454f4160801b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252603e908201527f53484f47554e3a20746f74616c206d696e7420616d6f756e742065786365656460408201527f656420737570706c792c20747279206c6f776572696e6720616d6f756e740000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526023908201527f53484f47554e3a207075626c69632073616c6520686173206e6f7420737461726040820152621d195960ea1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601a908201527f53484f47554e3a20636f6e747261637420697320706175736564000000000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f53484f47554e3a204e6577206e616d652069732073616d65206173207468652060408201526a63757272656e74206f6e6560a81b606082015260800190565b6020808252602f908201527f53484f47554e3a206e6f7420656e6f75676820696e2077616c6c657420666f7260408201526e08185a5c991c9bdc08185b5bdd5b9d608a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252601c908201527f53484f47554e3a204e6f7420612076616c6964206e6577206e616d6500000000604082015260600190565b6020808252602f908201527f53484f47554e3a206e6f7420656e6f75676874206574686572652073656e742060408201526e199bdc881b5a5b9d08185b5bdd5b9d608a1b606082015260800190565b6020808252602d908201527f53484f47554e3a20596f752068617665206578636565646564206d617820616d60408201526c6f756e74206f66206d696e747360981b606082015260800190565b90815260200190565b60405181810167ffffffffffffffff811182821017156146ab576146ab614801565b604052919050565b600067ffffffffffffffff8211156146cd576146cd614801565b5060209081020190565b60009081526020902090565b600082198211156146f6576146f66147d5565b500190565b60008261470a5761470a6147eb565b500490565b6000816000190483118215151615614729576147296147d5565b500290565b600082821015614740576147406147d5565b500390565b60005b83811015614760578181015183820152602001614748565b83811115611de55750506000910152565b60028104600182168061478557607f821691505b6020821081141561213457634e487b7160e01b600052602260045260246000fd5b60006000198214156147ba576147ba6147d5565b5060010190565b6000826147d0576147d06147eb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461148057600080fdfea2646970667358221220e0df60a071ac5b37fc6479055bf3e47cc66c06241a3263e9b6f16ffe22cb84a064736f6c6343000800003300000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001800000000000000000000000002348681242641a26fdee99633848ea3bf995986a00000000000000000000000001bc98715ecd2643259a396213d86582ed7571f50000000000000000000000009115ed5a96e881f12868e83d0c5a18444e22c063000000000000000000000000000000000000000000000000000000000000000e53686f67756e53616d7572616973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000353475300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d574a65484742504e367837347376556a7a4a6966485561774e784c4d316b425144656352734259393932724500000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106103d95760003560e01c80636c0360eb116101fd578063b88d4fde11610118578063da4ac476116100ab578063edec5f271161007a578063edec5f2714610a92578063f2fde38b14610ab2578063f5b9662114610ad2578063f9e2379914610af2578063fdc593c314610b07576103d9565b8063da4ac47614610a1d578063e6cf726b14610a3d578063e985e9c514610a5d578063eb4f847b14610a7d576103d9565b8063c87b56dd116100e7578063c87b56dd146109be578063caa8078f146109de578063ce8b680c146109f3578063d5abeb0114610a08576103d9565b8063b88d4fde14610949578063bee6348a14610969578063c17ecd121461097e578063c39cbef11461099e576103d9565b806384a1b902116101905780639ffdb65a1161015f5780639ffdb65a146108df578063a22cb465146108ff578063a475b5dd1461091f578063a82524b214610934576103d9565b806384a1b90214610880578063885bf15c146108a05780638da5cb5b146108b557806395d89b41146108ca576103d9565b8063715018a6116101cc578063715018a61461082e578063729ad39e146108435780637e80c186146108635780638124428a1461086b576103d9565b80636c0360eb146107b95780636d522418146107ce5780636defcd46146107ee57806370a082311461080e576103d9565b80632e09282e116102f857806349759d951161028b5780635c975abb1161025a5780635c975abb1461073a57806361d027b31461074f5780636352211e14610764578063665adcfd146107845780636bb7b1d9146107a4576103d9565b806349759d95146106c55780634f6ccce7146106e5578063518302271461070557806355f804b31461071a576103d9565b80633af32abf116102c75780633af32abf1461064357806342842e0e14610663578063438b63001461068357806345ca7738146106b0576103d9565b80632e09282e146105d95780632f745c59146105ee5780633535f48b1461060e578063375a069a14610623576103d9565b806313faede6116103705780631c1f8aa31161033f5780631c1f8aa31461056657806322a589c11461058657806323394d991461059957806323b872dd146105b9576103d9565b806313faede6146104fa57806318160ddd1461051c578063190145bb146105315780631a6949e314610551576103d9565b8063081812fc116103ac578063081812fc14610478578063081c8c44146104a5578063095ea7b3146104ba5780630acb7924146104da576103d9565b806301ffc9a7146103de57806302329a291461041457806306c933d81461043657806306fdde0314610456575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004613791565b610b1a565b60405161040b9190613abe565b60405180910390f35b34801561042057600080fd5b5061043461042f36600461375f565b610b47565b005b34801561044257600080fd5b506103fe61045136600461348a565b610ba2565b34801561046257600080fd5b5061046b610bb7565b60405161040b9190613ae7565b34801561048457600080fd5b50610498610493366004613866565b610c49565b60405161040b9190613a10565b3480156104b157600080fd5b5061046b610c8c565b3480156104c657600080fd5b506104346104d53660046135a7565b610d1a565b3480156104e657600080fd5b506104346104f53660046136db565b610db2565b34801561050657600080fd5b5061050f610e52565b60405161040b9190614680565b34801561052857600080fd5b5061050f610e58565b34801561053d57600080fd5b5061046b61054c366004613866565b610e5e565b34801561055d57600080fd5b506103fe610e77565b34801561057257600080fd5b5061043461058136600461348a565b610e80565b6104346105943660046137c9565b610ee1565b3480156105a557600080fd5b506104346105b436600461375f565b61118b565b3480156105c557600080fd5b506104346105d43660046134dd565b6111e4565b3480156105e557600080fd5b5061050f61121c565b3480156105fa57600080fd5b5061050f6106093660046135a7565b611222565b34801561061a57600080fd5b50610498611274565b34801561062f57600080fd5b5061043461063e366004613866565b611283565b34801561064f57600080fd5b506103fe61065e36600461348a565b611353565b34801561066f57600080fd5b5061043461067e3660046134dd565b611371565b34801561068f57600080fd5b506106a361069e36600461348a565b61138c565b60405161040b9190613a7a565b3480156106bc57600080fd5b5061050f61144a565b3480156106d157600080fd5b506104346106e0366004613866565b611450565b3480156106f157600080fd5b5061050f610700366004613866565b611483565b34801561071157600080fd5b506103fe6114de565b34801561072657600080fd5b50610434610735366004613833565b6114ec565b34801561074657600080fd5b506103fe61153e565b34801561075b57600080fd5b50610498611547565b34801561077057600080fd5b5061049861077f366004613866565b611556565b34801561079057600080fd5b5061043461079f3660046136db565b61158b565b3480156107b057600080fd5b5061050f611627565b3480156107c557600080fd5b5061046b61162d565b3480156107da57600080fd5b5061046b6107e9366004613866565b61163a565b3480156107fa57600080fd5b5061043461080936600461348a565b6116dc565b34801561081a57600080fd5b5061050f61082936600461348a565b61173d565b34801561083a57600080fd5b50610434611781565b34801561084f57600080fd5b5061043461085e36600461363f565b6117cc565b610434611917565b34801561087757600080fd5b506104986119c4565b34801561088c57600080fd5b5061043461089b366004613866565b6119d3565b3480156108ac57600080fd5b5061050f611a17565b3480156108c157600080fd5b50610498611a1d565b3480156108d657600080fd5b5061046b611a2c565b3480156108eb57600080fd5b506103fe6108fa366004613833565b611a3b565b34801561090b57600080fd5b5061043461091a36600461357e565b611c88565b34801561092b57600080fd5b50610434611d56565b34801561094057600080fd5b5061050f611da6565b34801561095557600080fd5b50610434610964366004613518565b611dac565b34801561097557600080fd5b506103fe611deb565b34801561098a57600080fd5b50610434610999366004613833565b611df4565b3480156109aa57600080fd5b506104346109b936600461387e565b611e46565b3480156109ca57600080fd5b5061046b6109d9366004613866565b61200d565b3480156109ea57600080fd5b5061050f61213a565b3480156109ff57600080fd5b5061050f612140565b348015610a1457600080fd5b5061050f612146565b348015610a2957600080fd5b50610434610a3836600461348a565b61214c565b348015610a4957600080fd5b50610434610a5836600461348a565b6121ad565b348015610a6957600080fd5b506103fe610a783660046134ab565b61220e565b348015610a8957600080fd5b506103fe61223c565b348015610a9e57600080fd5b50610434610aad3660046135d0565b612263565b348015610abe57600080fd5b50610434610acd36600461348a565b612322565b348015610ade57600080fd5b50610434610aed36600461375f565b612390565b348015610afe57600080fd5b506103fe6123e2565b610434610b153660046137c9565b6123f0565b60006001600160e01b0319821663780e9d6360e01b1480610b3f5750610b3f8261264a565b90505b919050565b610b4f61268a565b6001600160a01b0316610b60611a1d565b6001600160a01b031614610b8f5760405162461bcd60e51b8152600401610b8690614291565b60405180910390fd5b601b805460ff1916911515919091179055565b601f6020526000908152604090205460ff1681565b606060008054610bc690614771565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf290614771565b8015610c3f5780601f10610c1457610100808354040283529160200191610c3f565b820191906000526020600020905b815481529060010190602001808311610c2257829003601f168201915b5050505050905090565b6000610c548261268e565b610c705760405162461bcd60e51b8152600401610b8690614245565b506000908152600460205260409020546001600160a01b031690565b60118054610c9990614771565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc590614771565b8015610d125780601f10610ce757610100808354040283529160200191610d12565b820191906000526020600020905b815481529060010190602001808311610cf557829003601f168201915b505050505081565b6000610d2582611556565b9050806001600160a01b0316836001600160a01b03161415610d595760405162461bcd60e51b8152600401610b86906143fe565b806001600160a01b0316610d6b61268a565b6001600160a01b03161480610d875750610d8781610a7861268a565b610da35760405162461bcd60e51b8152600401610b8690613f94565b610dad83836126ab565b505050565b600d546001600160a01b03163314610ddc5760405162461bcd60e51b8152600401610b8690613d68565b60005b8151811015610e4e576001601e6000848481518110610e0e57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610e46906147a6565b915050610ddf565b5050565b60125481565b60085490565b601c6020526000908152604090208054610c9990614771565b601a5442101590565b610e8861268a565b6001600160a01b0316610e99611a1d565b6001600160a01b031614610ebf5760405162461bcd60e51b8152600401610b8690614291565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b333214610f005760405162461bcd60e51b8152600401610b869061421b565b601b5460ff1615610f1057600080fd5b610f18610e77565b80610f2a5750601d54610100900460ff165b610f465760405162461bcd60e51b8152600401610b86906143bb565b602283604051610f569190613927565b9081526040519081900360200190205460ff1615610f865760405162461bcd60e51b8152600401610b8690614123565b600e54610fa1903390859085906001600160a01b0316612719565b610fbd5760405162461bcd60e51b8152600401610b8690613b68565b6000610fc7610e58565b6015543360009081526021602052604090205491925090610fe99084906146e3565b11156110075760405162461bcd60e51b8152600401610b8690614633565b6014548211156110295760405162461bcd60e51b8152600401610b869061408a565b60135461103683836146e3565b11156110545760405162461bcd60e51b8152600401610b869061430f565b600c546040516000916001600160a01b031690349061107290613a0d565b60006040518083038185875af1925050503d80600081146110af576040519150601f19603f3d011682016040523d82523d6000602084013e6110b4565b606091505b50509050806110d55760405162461bcd60e51b8152600401610b8690614195565b826012546110e3919061470f565b34146111015760405162461bcd60e51b8152600401610b8690613d1b565b60015b83811161115157336000908152602160205260408120805491611126836147a6565b9091555061113f90503361113a83866146e3565b612773565b80611149816147a6565b915050611104565b5060016022866040516111649190613927565b908152604051908190036020019020805491151560ff199092169190911790555050505050565b61119361268a565b6001600160a01b03166111a4611a1d565b6001600160a01b0316146111ca5760405162461bcd60e51b8152600401610b8690614291565b601d80549115156101000261ff0019909216919091179055565b6111f56111ef61268a565b8261278d565b6112115760405162461bcd60e51b8152600401610b8690614476565b610dad83838361280a565b60165481565b600061122d8361173d565b821061124b5760405162461bcd60e51b8152600401610b8690613c01565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d546001600160a01b031681565b3332146112a25760405162461bcd60e51b8152600401610b869061421b565b6112aa61268a565b6001600160a01b03166112bb611a1d565b6001600160a01b0316146112e15760405162461bcd60e51b8152600401610b8690614291565b601b5460ff16156112f157600080fd5b60006112fb610e58565b60135490915061130b83836146e3565b11156113295760405162461bcd60e51b8152600401610b869061430f565b60015b828111610dad576113413361113a83856146e3565b8061134b816147a6565b91505061132c565b6001600160a01b03166000908152601f602052604090205460ff1690565b610dad83838360405180602001604052806000815250611dac565b606060006113998361173d565b905060008167ffffffffffffffff8111156113c457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113ed578160200160208202803683370190505b50905060005b82811015611442576114058582611222565b82828151811061142557634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061143a816147a6565b9150506113f3565b509392505050565b60175481565b61145b6111ef61268a565b6114775760405162461bcd60e51b8152600401610b8690614476565b61148081612937565b50565b600061148d610e58565b82106114ab5760405162461bcd60e51b8152600401610b8690614561565b600882815481106114cc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b601b54610100900460ff1681565b6114f461268a565b6001600160a01b0316611505611a1d565b6001600160a01b03161461152b5760405162461bcd60e51b8152600401610b8690614291565b8051610e4e90601090602084019061335f565b601b5460ff1681565b600c546001600160a01b031681565b6000818152600260205260408120546001600160a01b031680610b3f5760405162461bcd60e51b8152600401610b86906140da565b600d546001600160a01b031633146115b55760405162461bcd60e51b8152600401610b8690613d68565b60005b8151811015610e4e576000601e60008484815181106115e757634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550808061161f906147a6565b9150506115b8565b601a5481565b60108054610c9990614771565b6000818152601c6020526040902080546060919061165790614771565b80601f016020809104026020016040519081016040528092919081815260200182805461168390614771565b80156116d05780601f106116a5576101008083540402835291602001916116d0565b820191906000526020600020905b8154815290600101906020018083116116b357829003601f168201915b50505050509050919050565b6116e461268a565b6001600160a01b03166116f5611a1d565b6001600160a01b03161461171b5760405162461bcd60e51b8152600401610b8690614291565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166117655760405162461bcd60e51b8152600401610b8690614040565b506001600160a01b031660009081526003602052604090205490565b61178961268a565b6001600160a01b031661179a611a1d565b6001600160a01b0316146117c05760405162461bcd60e51b8152600401610b8690614291565b6117ca60006129de565b565b3332146117eb5760405162461bcd60e51b8152600401610b869061421b565b6117f361268a565b6001600160a01b0316611804611a1d565b6001600160a01b03161461182a5760405162461bcd60e51b8152600401610b8690614291565b601b5460ff161561184d5760405162461bcd60e51b8152600401610b869061443f565b80516118583361173d565b10156118765760405162461bcd60e51b8152600401610b8690614512565b60006118813361138c565b905060005b8251811015610dad57611905338483815181106118b357634e487b7160e01b600052603260045260246000fd5b60200260200101518484815181106118db57634e487b7160e01b600052603260045260246000fd5b6020026020010151604051806040016040528060048152602001630307830360e41b815250612a30565b8061190f816147a6565b915050611886565b61191f61268a565b6001600160a01b0316611930611a1d565b6001600160a01b0316146119565760405162461bcd60e51b8152600401610b8690614291565b600c546040516000916001600160a01b031690479061197490613a0d565b60006040518083038185875af1925050503d80600081146119b1576040519150601f19603f3d011682016040523d82523d6000602084013e6119b6565b606091505b505090508061148057600080fd5b600b546001600160a01b031681565b6119db61268a565b6001600160a01b03166119ec611a1d565b6001600160a01b031614611a125760405162461bcd60e51b8152600401610b8690614291565b601755565b60155481565b600a546001600160a01b031690565b606060018054610bc690614771565b600080829050600181511015611a55576000915050610b42565b601981511115611a69576000915050610b42565b80600081518110611a8a57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611aaf576000915050610b42565b8060018251611abe919061472e565b81518110611adc57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415611b01576000915050610b42565b600081600081518110611b2457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b8251811015611c7d576000838281518110611b6357634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b81148015611b945750600160fd1b6001600160f81b03198416145b15611ba6576000945050505050610b42565b600360fc1b6001600160f81b0319821610801590611bd25750603960f81b6001600160f81b0319821611155b158015611c085750604160f81b6001600160f81b0319821610801590611c065750602d60f91b6001600160f81b0319821611155b155b8015611c3d5750606160f81b6001600160f81b0319821610801590611c3b5750603d60f91b6001600160f81b0319821611155b155b8015611c575750600160fd1b6001600160f81b0319821614155b15611c69576000945050505050610b42565b915080611c75816147a6565b915050611b38565b506001949350505050565b611c9061268a565b6001600160a01b0316826001600160a01b03161415611cc15760405162461bcd60e51b8152600401610b8690613df7565b8060056000611cce61268a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611d1261268a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d4a9190613abe565b60405180910390a35050565b611d5e61268a565b6001600160a01b0316611d6f611a1d565b6001600160a01b031614611d955760405162461bcd60e51b8152600401610b8690614291565b601b805461ff001916610100179055565b60195481565b611dbd611db761268a565b8361278d565b611dd95760405162461bcd60e51b8152600401610b8690614476565b611de584848484612a30565b50505050565b601d5460ff1681565b611dfc61268a565b6001600160a01b0316611e0d611a1d565b6001600160a01b031614611e335760405162461bcd60e51b8152600401610b8690614291565b8051610e4e90601190602084019061335f565b6000611e5183611556565b9050806001600160a01b0316611e6561268a565b6001600160a01b031614611e8b5760405162461bcd60e51b8152600401610b8690613bca565b611e9482611a3b565b1515600114611eb55760405162461bcd60e51b8152600401610b86906145ad565b6000838152601c6020526040908190209051600291611ed391613943565b602060405180830381855afa158015611ef0573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f139190613779565b600283604051611f239190613927565b602060405180830381855afa158015611f40573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611f639190613779565b1415611f815760405162461bcd60e51b8152600401610b86906144c7565b600b546001600160a01b0316639dc29fac611f9a61268a565b6017546040518363ffffffff1660e01b8152600401611fba929190613a61565b600060405180830381600087803b158015611fd457600080fd5b505af1158015611fe8573d6000803e3d6000fd5b5050506000848152601c602090815260409091208451611de59350909185019061335f565b60606120188261268e565b6120345760405162461bcd60e51b8152600401610b869061436c565b600061203e612a63565b601b54909150610100900460ff166120e3576011805461205d90614771565b80601f016020809104026020016040519081016040528092919081815260200182805461208990614771565b80156120d65780601f106120ab576101008083540402835291602001916120d6565b820191906000526020600020905b8154815290600101906020018083116120b957829003601f168201915b5050505050915050610b42565b6000815111612101576040518060200160405280600081525061212c565b8061210b84612a72565b60405160200161211c9291906139de565b6040516020818303038152906040525b915050610b42565b50919050565b60145481565b60185481565b60135481565b61215461268a565b6001600160a01b0316612165611a1d565b6001600160a01b03161461218b5760405162461bcd60e51b8152600401610b8690614291565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6121b561268a565b6001600160a01b03166121c6611a1d565b6001600160a01b0316146121ec5760405162461bcd60e51b8152600401610b8690614291565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000601954421015801561225e575060185460195461225b91906146e3565b42105b905090565b61226b61268a565b6001600160a01b031661227c611a1d565b6001600160a01b0316146122a25760405162461bcd60e51b8152600401610b8690614291565b60005b81811015610dad576001601f60008585858181106122d357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122e8919061348a565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061231a816147a6565b9150506122a5565b61232a61268a565b6001600160a01b031661233b611a1d565b6001600160a01b0316146123615760405162461bcd60e51b8152600401610b8690614291565b6001600160a01b0381166123875760405162461bcd60e51b8152600401610b8690613c9e565b611480816129de565b61239861268a565b6001600160a01b03166123a9611a1d565b6001600160a01b0316146123cf5760405162461bcd60e51b8152600401610b8690614291565b601d805460ff1916911515919091179055565b601d54610100900460ff1681565b33321461240f5760405162461bcd60e51b8152600401610b869061421b565b601b5460ff16156124325760405162461bcd60e51b8152600401610b869061443f565b61243a61223c565b806124475750601d5460ff165b6124635760405162461bcd60e51b8152600401610b8690613ff1565b336000908152601f602052604090205460ff166124925760405162461bcd60e51b8152600401610b8690613f19565b6022836040516124a29190613927565b9081526040519081900360200190205460ff16156124d25760405162461bcd60e51b8152600401610b8690614123565b600f546124ed903390859085906001600160a01b0316612719565b6125095760405162461bcd60e51b8152600401610b8690613f5d565b6000612513610e58565b601654336000908152602080526040902054919250906125349084906146e3565b11156125525760405162461bcd60e51b8152600401610b8690613ebc565b81601254612560919061470f565b34101561257f5760405162461bcd60e51b8152600401610b86906145e4565b600c546040516000916001600160a01b031690349061259d90613a0d565b60006040518083038185875af1925050503d80600081146125da576040519150601f19603f3d011682016040523d82523d6000602084013e6125df565b606091505b50509050806126005760405162461bcd60e51b8152600401610b8690614195565b60015b838111611151573360009081526020805260408120805491612624836147a6565b9091555061263890503361113a83866146e3565b80612642816147a6565b915050612603565b60006001600160e01b031982166380ac58cd60e01b148061267b57506001600160e01b03198216635b5e139f60e01b145b80610b3f5750610b3f82612b8d565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126e082611556565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080858560405160200161272f9291906138ef565b60408051601f19818403018152919052805160209091012090506127538185612ba6565b6001600160a01b0316836001600160a01b0316149150505b949350505050565b610e4e828260405180602001604052806000815250612bc2565b60006127988261268e565b6127b45760405162461bcd60e51b8152600401610b8690613e70565b60006127bf83611556565b9050806001600160a01b0316846001600160a01b031614806127fa5750836001600160a01b03166127ef84610c49565b6001600160a01b0316145b8061276b575061276b818561220e565b826001600160a01b031661281d82611556565b6001600160a01b0316146128435760405162461bcd60e51b8152600401610b86906142c6565b6001600160a01b0382166128695760405162461bcd60e51b8152600401610b8690613db3565b612874838383612bf5565b61287f6000826126ab565b6001600160a01b03831660009081526003602052604081208054600192906128a890849061472e565b90915550506001600160a01b03821660009081526003602052604081208054600192906128d69084906146e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061294282611556565b905061295081600084612bf5565b61295b6000836126ab565b6001600160a01b038116600090815260036020526040812080546001929061298490849061472e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612a3b84848461280a565b612a4784848484612c2f565b611de55760405162461bcd60e51b8152600401610b8690613c4c565b606060108054610bc690614771565b606081612a9757506040805180820190915260018152600360fc1b6020820152610b42565b8160005b8115612ac15780612aab816147a6565b9150612aba9050600a836146fb565b9150612a9b565b60008167ffffffffffffffff811115612aea57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612b14576020820181803683370190505b5090505b841561276b57612b2960018361472e565b9150612b36600a866147c1565b612b419060306146e3565b60f81b818381518110612b6457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b86600a866146fb565b9450612b18565b6001600160e01b031981166301ffc9a760e01b14919050565b6000806000612bb58585612d47565b9150915061144281612db7565b612bcc8383612ee4565b612bd96000848484612c2f565b610dad5760405162461bcd60e51b8152600401610b8690613c4c565b6000818152601e602052604090205460ff1615612c245760405162461bcd60e51b8152600401610b8690613b31565b610dad838383612fc3565b6000612c43846001600160a01b031661304c565b15612d3f57836001600160a01b031663150b7a02612c5f61268a565b8786866040518563ffffffff1660e01b8152600401612c819493929190613a24565b602060405180830381600087803b158015612c9b57600080fd5b505af1925050508015612ccb575060408051601f3d908101601f19168201909252612cc8918101906137ad565b60015b612d25573d808015612cf9576040519150601f19603f3d011682016040523d82523d6000602084013e612cfe565b606091505b508051612d1d5760405162461bcd60e51b8152600401610b8690613c4c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061276b565b50600161276b565b600080825160411415612d7e5760208301516040840151606085015160001a612d7287828585613052565b94509450505050612db0565b825160401415612da85760208301516040840151612d9d868383613132565b935093505050612db0565b506000905060025b9250929050565b6000816004811115612dd957634e487b7160e01b600052602160045260246000fd5b1415612de457611480565b6001816004811115612e0657634e487b7160e01b600052602160045260246000fd5b1415612e245760405162461bcd60e51b8152600401610b8690613afa565b6002816004811115612e4657634e487b7160e01b600052602160045260246000fd5b1415612e645760405162461bcd60e51b8152600401610b8690613b93565b6003816004811115612e8657634e487b7160e01b600052602160045260246000fd5b1415612ea45760405162461bcd60e51b8152600401610b8690613e2e565b6004816004811115612ec657634e487b7160e01b600052602160045260246000fd5b14156114805760405162461bcd60e51b8152600401610b8690614153565b6001600160a01b038216612f0a5760405162461bcd60e51b8152600401610b86906141e6565b612f138161268e565b15612f305760405162461bcd60e51b8152600401610b8690613ce4565b612f3c60008383612bf5565b6001600160a01b0382166000908152600360205260408120805460019290612f659084906146e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612fce838383610dad565b6001600160a01b038316612fea57612fe581613161565b61300d565b816001600160a01b0316836001600160a01b03161461300d5761300d83826131a5565b6001600160a01b0382166130295761302481613242565b610dad565b826001600160a01b0316826001600160a01b031614610dad57610dad828261331b565b3b151590565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156130895750600090506003613129565b8460ff16601b141580156130a157508460ff16601c14155b156130b25750600090506004613129565b6000600187878787604051600081526020016040526040516130d79493929190613ac9565b6020604051602081039080840390855afa1580156130f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661312257600060019250925050613129565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161315387828885613052565b935093505050935093915050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016131b28461173d565b6131bc919061472e565b60008381526007602052604090205490915080821461320f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906132549060019061472e565b6000838152600960205260408120546008805493945090928490811061328a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106132b957634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806132ff57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006133268361173d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461336b90614771565b90600052602060002090601f01602090048101928261338d57600085556133d3565b82601f106133a657805160ff19168380011785556133d3565b828001600101855582156133d3579182015b828111156133d35782518255916020019190600101906133b8565b506133df9291506133e3565b5090565b5b808211156133df57600081556001016133e4565b80356001600160a01b0381168114610b4257600080fd5b80358015158114610b4257600080fd5b600082601f83011261342f578081fd5b813567ffffffffffffffff81111561344957613449614801565b61345c601f8201601f1916602001614689565b818152846020838601011115613470578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561349b578081fd5b6134a4826133f8565b9392505050565b600080604083850312156134bd578081fd5b6134c6836133f8565b91506134d4602084016133f8565b90509250929050565b6000806000606084860312156134f1578081fd5b6134fa846133f8565b9250613508602085016133f8565b9150604084013590509250925092565b6000806000806080858703121561352d578081fd5b613536856133f8565b9350613544602086016133f8565b925060408501359150606085013567ffffffffffffffff811115613566578182fd5b6135728782880161341f565b91505092959194509250565b60008060408385031215613590578182fd5b613599836133f8565b91506134d46020840161340f565b600080604083850312156135b9578182fd5b6135c2836133f8565b946020939093013593505050565b600080602083850312156135e2578182fd5b823567ffffffffffffffff808211156135f9578384fd5b818501915085601f83011261360c578384fd5b81358181111561361a578485fd5b866020808302850101111561362d578485fd5b60209290920196919550909350505050565b60006020808385031215613651578182fd5b823567ffffffffffffffff811115613667578283fd5b8301601f81018513613677578283fd5b803561368a613685826146b3565b614689565b81815283810190838501858402850186018910156136a6578687fd5b8694505b838510156136cf576136bb816133f8565b8352600194909401939185019185016136aa565b50979650505050505050565b600060208083850312156136ed578182fd5b823567ffffffffffffffff811115613703578283fd5b8301601f81018513613713578283fd5b8035613721613685826146b3565b818152838101908385018584028501860189101561373d578687fd5b8694505b838510156136cf578035835260019490940193918501918501613741565b600060208284031215613770578081fd5b6134a48261340f565b60006020828403121561378a578081fd5b5051919050565b6000602082840312156137a2578081fd5b81356134a481614817565b6000602082840312156137be578081fd5b81516134a481614817565b6000806000606084860312156137dd578081fd5b833567ffffffffffffffff808211156137f4578283fd5b6138008783880161341f565b94506020860135915080821115613815578283fd5b506138228682870161341f565b925050604084013590509250925092565b600060208284031215613844578081fd5b813567ffffffffffffffff81111561385a578182fd5b61276b8482850161341f565b600060208284031215613877578081fd5b5035919050565b60008060408385031215613890578182fd5b82359150602083013567ffffffffffffffff8111156138ad578182fd5b6138b98582860161341f565b9150509250929050565b600081518084526138db816020860160208601614745565b601f01601f19169290920160200192915050565b60006bffffffffffffffffffffffff198460601b1682528251613919816014850160208701614745565b919091016014019392505050565b60008251613939818460208701614745565b9190910192915050565b815460009081906002810460018083168061395f57607f831692505b602080841082141561397f57634e487b7160e01b87526022600452602487fd5b81801561399357600181146139a4576139d0565b60ff198616895284890196506139d0565b6139ad8a6146d7565b885b868110156139c85781548b8201529085019083016139af565b505084890196505b509498975050505050505050565b600083516139f0818460208801614745565b835190830190613a04818360208801614745565b01949350505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613a57908301846138c3565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613ab257835183529284019291840191600101613a96565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526134a460208301846138c3565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526017908201527f53484f47554e3a20546f6b656e206973204c6f636b6564000000000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252601f908201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252602d908201527f53484f47554e3a206e6f7420656e6f7567682065746865722073656e7420666f60408201526c1c881b5a5b9d08185b5bdd5b9d609a1b606082015260800190565b6020808252602b908201527f53484f47554e3a204f6e6c792063616c6c61626c652066726f6d207374616b6960408201526a1b99c818dbdb9d1c9858dd60aa1b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252603d908201527f53484f47554e3a20796f752063616e206f6e6c79206d696e742061206d61786960408201527f6d756d206f662074776f206e667420647572696e672070726573616c65000000606082015260800190565b60208082526024908201527f53484f47554e3a20796f7520617265206e6f7420696e207468652077686974656040820152631b1a5cdd60e21b606082015260800190565b60208082526019908201527f53484f47554e3a20696e76616c6964207369676e617475726500000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602f908201527f53484f47554e3a2070726573616c6520686173206e6f7420737461727465642060408201526e1bdc881a5d081a185cc8195b991959608a1b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526030908201527f53484f47554e3a206578636565646564206d6178206d696e7420616d6f756e7460408201526f103832b9103a3930b739b0b1ba34b7b760811b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526016908201527514d213d1d5538e881b9bdb98d9481dd85cc81d5cd95960521b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526031908201527f53484f47554e3a206e6f742061626c6520746f20666f7277617264206d73672060408201527076616c756520746f20747265617375727960781b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b60208082526010908201526f53484f47554e3a204f6e6c7920454f4160801b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252603e908201527f53484f47554e3a20746f74616c206d696e7420616d6f756e742065786365656460408201527f656420737570706c792c20747279206c6f776572696e6720616d6f756e740000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526023908201527f53484f47554e3a207075626c69632073616c6520686173206e6f7420737461726040820152621d195960ea1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252601a908201527f53484f47554e3a20636f6e747261637420697320706175736564000000000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f53484f47554e3a204e6577206e616d652069732073616d65206173207468652060408201526a63757272656e74206f6e6560a81b606082015260800190565b6020808252602f908201527f53484f47554e3a206e6f7420656e6f75676820696e2077616c6c657420666f7260408201526e08185a5c991c9bdc08185b5bdd5b9d608a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252601c908201527f53484f47554e3a204e6f7420612076616c6964206e6577206e616d6500000000604082015260600190565b6020808252602f908201527f53484f47554e3a206e6f7420656e6f75676874206574686572652073656e742060408201526e199bdc881b5a5b9d08185b5bdd5b9d608a1b606082015260800190565b6020808252602d908201527f53484f47554e3a20596f752068617665206578636565646564206d617820616d60408201526c6f756e74206f66206d696e747360981b606082015260800190565b90815260200190565b60405181810167ffffffffffffffff811182821017156146ab576146ab614801565b604052919050565b600067ffffffffffffffff8211156146cd576146cd614801565b5060209081020190565b60009081526020902090565b600082198211156146f6576146f66147d5565b500190565b60008261470a5761470a6147eb565b500490565b6000816000190483118215151615614729576147296147d5565b500290565b600082821015614740576147406147d5565b500390565b60005b83811015614760578181015183820152602001614748565b83811115611de55750506000910152565b60028104600182168061478557607f821691505b6020821081141561213457634e487b7160e01b600052602260045260246000fd5b60006000198214156147ba576147ba6147d5565b5060010190565b6000826147d0576147d06147eb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461148057600080fdfea2646970667358221220e0df60a071ac5b37fc6479055bf3e47cc66c06241a3263e9b6f16ffe22cb84a064736f6c63430008000033

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

00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001800000000000000000000000002348681242641a26fdee99633848ea3bf995986a00000000000000000000000001bc98715ecd2643259a396213d86582ed7571f50000000000000000000000009115ed5a96e881f12868e83d0c5a18444e22c063000000000000000000000000000000000000000000000000000000000000000e53686f67756e53616d7572616973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000353475300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d574a65484742504e367837347376556a7a4a6966485561774e784c4d316b425144656352734259393932724500000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): ShogunSamurais
Arg [1] : _symbol (string): SGS
Arg [2] : _initBaseURI (string):
Arg [3] : _notRevealedUri (string): https://gateway.pinata.cloud/ipfs/QmWJeHGBPN6x74svUjzJifHUawNxLM1kBQDecRsBY992rE
Arg [4] : _signerAddressPresale (address): 0x2348681242641A26FdEE99633848EA3bf995986A
Arg [5] : _signerAddressPublic (address): 0x01Bc98715Ecd2643259A396213d86582Ed7571F5
Arg [6] : _treasury (address): 0x9115eD5a96E881F12868E83d0C5A18444E22c063

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 0000000000000000000000002348681242641a26fdee99633848ea3bf995986a
Arg [5] : 00000000000000000000000001bc98715ecd2643259a396213d86582ed7571f5
Arg [6] : 0000000000000000000000009115ed5a96e881f12868e83d0c5a18444e22c063
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [8] : 53686f67756e53616d7572616973000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [10] : 5347530000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [13] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [14] : 732f516d574a65484742504e367837347376556a7a4a6966485561774e784c4d
Arg [15] : 316b425144656352734259393932724500000000000000000000000000000000


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.