ETH Price: $3,397.01 (-1.47%)
Gas: 6 Gwei

Token

AngelzGame (AG)
 

Overview

Max Total Supply

514 AG

Holders

165

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
bobjaeger.eth
Balance
2 AG
0xf3514329c7ebc18ea36d58022d8ad78e0c6c9881
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Angelz

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 20 : Angelz.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.10;

import "Strings.sol";
import "MerkleProof.sol";
import "ERC721Enum.sol";
import "Grace.sol";
import "IAngelz.sol";
import "ISanctuary.sol";

contract Angelz is IAngelz, ERC721Enum {
  using Strings for uint256;
  // mint price
  uint256 public constant MINT_PRICE = .0543 ether;
  // max number of tokens that can be minted - 30,616
  uint256 public immutable MAX_TOKENS;
  // number of tokens pay with eth - 25% of MAX_TOKENS
  uint256 public PAID_TOKENS;
  // number of tokens have been minted so far
  uint16 public minted;
  string public baseURI;
  bytes32 private rootWL;
  string internal constant baseExtension = ".json";
  bool public pauseMint = true;
  bool public pausePreMint = true;
  address public immutable owner;
  uint256 public freeMint = 500;

  address private constant addressOne =
    0xD70Ee431F074Fb835132ddE35255F8274A51D90b;
  address private constant addressTwo =
    0x13542174BA72e443450926Ea7fC15ED6D66491e0;
  address private constant addressThree =
    0xcC187E04A67c5601693dB7F25E4309D066512a24;

  // mapping from tokenId to a struct containing the token's traits
  mapping(uint256 => AngelHuman) public tokenTraits;
  // reference to the Sanctuary for choosing random Angel thieves
  ISanctuary public sanctuary;
  // reference to $GRACE for burning on mint
  GRACE public grace;

  /**
   * instantiates contract and rarity tables
   */
  constructor(address _grace, string memory _initBaseURI)
    ERC721P("AngelzGame", "AG")
  {
    owner = msg.sender;
    grace = GRACE(_grace);
    setBaseURI(_initBaseURI);
    MAX_TOKENS = 30616;
    PAID_TOKENS = MAX_TOKENS / 4;
  }

  modifier mintOpen() {
    require(!pauseMint, "PauseMint");
    _;
  }

  modifier preMintOpen() {
    require(!pausePreMint, "PausePreMint");
    _;
  }

  modifier onlyOwner() {
    _onlyOwner();
    _;
  }

  function _onlyOwner() private view {
    require(msg.sender == owner, "onlyOwner");
  }

  /** EXTERNAL */

  /**
   * mint a token - 90% Human, 10% Angel
   * The first 25% are 0.0543 eth, the remaining cost $GRACE
   */
  function mint(uint256 amount, bool stake) external payable mintOpen {
    require(tx.origin == msg.sender, "Only EOA");
    require(minted + amount <= MAX_TOKENS, "Allminted");
    require(amount > 0 && amount <= 10, "nomorethan10");
    if (minted < PAID_TOKENS) {
      if (minted < freeMint) {
        require(amount <= 2, "freelimit2pertx");
        require(msg.value == 0, "bruh its free");
      } else {
        require(minted + amount <= PAID_TOKENS, "Allonsaleminted");
        require(msg.value >= amount * MINT_PRICE, "notenougheth");
      }
    } else {
      require(msg.value == 0, "payinGRACE");
    }

    uint256 totalGraceTokenCost = 0;
    uint16[] memory tokenIds = stake ? new uint16[](amount) : new uint16[](0);
    uint256 seed;
    for (uint256 i = 0; i < amount; i++) {
      seed = random(minted);
      generate(minted, seed);
      address recipient = selectRecipient(seed);
      if (!stake || recipient != _msgSender()) {
        _safeMint(recipient, minted);
      } else {
        _safeMint(address(sanctuary), minted);
        tokenIds[i] = minted;
      }
      minted++;
      totalGraceTokenCost += mintCost(minted);
    }

    if (totalGraceTokenCost > 0) grace.burn(_msgSender(), totalGraceTokenCost);
    if (stake) sanctuary.addManyToSanctuaryAndHeaven(_msgSender(), tokenIds);
  }

  function preMint(
    uint256 amount,
    bool stake,
    bytes32[] calldata proof,
    uint256 _number
  ) external payable preMintOpen {
    require(tx.origin == msg.sender, "Only EOA");
    uint16 eligibilitySender = isEligible(proof, _number);
    if (eligibilitySender == 0) {
      revert("notWL");
    }
    require(minted + amount <= PAID_TOKENS, "Allminted");
    require(amount > 0 && amount <= 10, "nomorethan10");
    if (minted < freeMint) {
      require(amount <= 2, "freelimit2pertx");
      require(msg.value == 0, "bruh its free");
    } else {
      require(msg.value >= amount * MINT_PRICE, "notenougheth");
    }

    uint16[] memory tokenIds = stake ? new uint16[](amount) : new uint16[](0);
    uint256 seed;
    for (uint256 i = 0; i < amount; i++) {
      seed = random(minted);
      generate(minted, seed);
      address recipient = selectRecipient(seed);
      if (!stake || recipient != _msgSender()) {
        _safeMint(recipient, minted);
      } else {
        _safeMint(address(sanctuary), minted);
        tokenIds[i] = minted;
      }
      minted++;
    }
    if (stake) sanctuary.addManyToSanctuaryAndHeaven(_msgSender(), tokenIds);
  }

  /**
   * the first 25% are 0.0543 ETH
   * the next 25% are 10000 $GRACE
   * the next 25% are 20000 $GRACE
   * the final 25% are 40000 $GRACE
   * @param tokenId the ID to check the cost of to mint
   * @return the cost of the given token ID
   */
  function mintCost(uint256 tokenId) public view returns (uint256) {
    if (tokenId <= PAID_TOKENS) return 0;
    if (tokenId <= (MAX_TOKENS * 2) / 4) return 10000 ether;
    if (tokenId <= (MAX_TOKENS * 3) / 4) return 20000 ether;
    return 40000 ether;
  }

  function transferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    // Hardcode the Sanctuary's approval so that users don't have to waste gas approving
    if (_msgSender() != address(sanctuary))
      require(
        _isApprovedOrOwner(_msgSender(), tokenId),
        "Not owner nor approved"
      );
    _transfer(from, to, tokenId);
  }

  /** INTERNAL */

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

  /**
   * generates traits for a specific token, checking to make sure it's unique
   * @param tokenId the id of the token to generate traits for
   * @param seed a pseudorandom 256 bit number to derive traits from
   * @return t - a struct of traits for the given token ID
   */
  function generate(uint256 tokenId, uint256 seed)
    internal
    returns (AngelHuman memory t)
  {
    t = selectTraits(seed);
    tokenTraits[tokenId] = t;
    return t;
  }

  function selectTraits(uint256 seed)
    internal
    view
    returns (AngelHuman memory t)
  {
    t.human = (seed & 0xFFFF) % 10 != 0;
    seed >>= 16;
    if (t.human) {
      t.angelicIndex = 0;
      return t;
    }

    uint16 randomAngelicValue = uint16(seed & 0xFFFF) % 10;
    if (randomAngelicValue == 0) {
      t.angelicIndex = 8;
    } else if (randomAngelicValue == 1 || randomAngelicValue == 2) {
      t.angelicIndex = 7;
    } else if (
      randomAngelicValue == 3 ||
      randomAngelicValue == 4 ||
      randomAngelicValue == 5
    ) {
      t.angelicIndex = 6;
    } else {
      t.angelicIndex = 5;
    }
  }

  /**
   * the first 25% (ETH purchases) go to the minter
   * the remaining 75% have a 10% chance to be given to a random staked angel
   * @param seed a random value to select a recipient from
   * @return the address of the recipient (either the minter or the Angel thief's owner)
   */
  function selectRecipient(uint256 seed) internal view returns (address) {
    if (minted <= PAID_TOKENS || ((seed >> 245) % 10) != 0) return _msgSender(); // top 10 bits haven't been used
    address thief = sanctuary.randomAngelOwner(seed >> 144); // 144 bits reserved for trait selection
    if (thief == address(0x0)) return _msgSender();
    return thief;
  }

  /**
   * generates a pseudorandom number
   * @param seed a value ensure different outcomes for different sources in the same block
   * @return a pseudorandom value
   */
  function random(uint256 seed) internal view returns (uint256) {
    return
      uint256(
        keccak256(
          abi.encodePacked(
            tx.origin,
            blockhash(block.number - 1),
            block.timestamp,
            seed
          )
        )
      );
  }

  /** READ */

  function isEligible(bytes32[] calldata proof, uint256 _number)
    public
    view
    returns (uint16 eligibility)
  {
    bytes32 leaf = keccak256(abi.encodePacked(_number, msg.sender));
    if (MerkleProof.verify(proof, rootWL, leaf)) return 1;
    return 0;
  }

  function getTokenTraits(uint256 tokenId)
    external
    view
    override
    returns (AngelHuman memory)
  {
    return tokenTraits[tokenId];
  }

  function getPaidTokens() external view override returns (uint256) {
    return PAID_TOKENS;
  }

  /** ADMIN */

  /**
   * called after deployment so that the contract can get random angel thieves
   * @param _sanctuary the address of the Sanctuary
   */
  function setSanctuary(address _sanctuary) external onlyOwner {
    sanctuary = ISanctuary(_sanctuary);
  }

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

  function setRoot(bytes32 _rootWL) external onlyOwner {
    rootWL = _rootWL;
  }

  /**
   * allows owner to withdraw funds from minting
   */
  function withdrawAll() external onlyOwner {
    uint256 balance = address(this).balance;
    require(balance > 0, "No money");
    _withdraw(addressOne, (balance * 30) / 100);
    _withdraw(addressTwo, (balance * 30) / 100);
    _withdraw(addressThree, (balance * 30) / 100);
    _withdraw(msg.sender, address(this).balance);
  }

  function _withdraw(address _address, uint256 _amount) private {
    (bool success, ) = _address.call{ value: _amount }("");
    require(success, "Transfer failed");
  }

  /**
   * updates the number of tokens for sale
   */
  function setPaidTokens(uint256 _paidTokens) external onlyOwner {
    PAID_TOKENS = _paidTokens;
  }

  function setNumFreeMint(uint256 _freeMint) external onlyOwner {
    freeMint = _freeMint;
  }

  function setPauseMint(bool _setPauseMint) external onlyOwner {
    if (_setPauseMint) {
      pauseMint = true;
    } else {
      pauseMint = false;
    }
  }

  function setPausePreMint(bool _setPausePreMint) external onlyOwner {
    if (_setPausePreMint) {
      pausePreMint = true;
    } else {
      pausePreMint = false;
    }
  }

  /** RENDER */

  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(_exists(tokenId), "DNE");

    string memory currentBaseURI = _baseURI();

    return (
      bytes(currentBaseURI).length > 0
        ? string(
          abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension)
        )
        : ""
    );
  }
}

File 2 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 3 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 4 of 20 : ERC721Enum.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;
import "ERC721P.sol";
import "IERC721Enumerable.sol";

abstract contract ERC721Enum is ERC721P, IERC721Enumerable {
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(IERC165, ERC721P)
    returns (bool)
  {
    return
      interfaceId == type(IERC721Enumerable).interfaceId ||
      super.supportsInterface(interfaceId);
  }

  function tokenOfOwnerByIndex(address owner, uint256 index)
    public
    view
    override
    returns (uint256 tokenId)
  {
    require(index < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
    uint256 count;
    for (uint256 i; i < _owners.length; ++i) {
      if (owner == _owners[i]) {
        if (count == index) return i;
        else ++count;
      }
    }
    require(false, "ERC721Enum: owner ioob");
  }

  function tokensOfOwner(address owner) public view returns (uint256[] memory) {
    require(0 < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
    uint256 tokenCount = balanceOf(owner);
    uint256[] memory tokenIds = new uint256[](tokenCount);
    for (uint256 i = 0; i < tokenCount; i++) {
      tokenIds[i] = tokenOfOwnerByIndex(owner, i);
    }
    return tokenIds;
  }

  function totalSupply() public view virtual override returns (uint256) {
    return _owners.length;
  }

  function tokenByIndex(uint256 index)
    public
    view
    virtual
    override
    returns (uint256)
  {
    require(index < ERC721Enum.totalSupply(), "ERC721Enum: global ioob");
    return index;
  }
}

File 5 of 20 : ERC721P.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;
import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "ERC165.sol";

abstract contract ERC721P is Context, ERC165, IERC721, IERC721Metadata {
  using Address for address;
  string private _name;
  string private _symbol;
  address[] internal _owners;
  mapping(uint256 => address) private _tokenApprovals;
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  constructor(string memory name_, string memory symbol_) {
    _name = name_;
    _symbol = symbol_;
  }

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

  function balanceOf(address owner)
    public
    view
    virtual
    override
    returns (uint256)
  {
    require(owner != address(0), "ERC721: balance query for the zero address");
    uint256 count = 0;
    uint256 length = _owners.length;
    for (uint256 i = 0; i < length; ++i) {
      if (owner == _owners[i]) {
        ++count;
      }
    }
    delete length;
    return count;
  }

  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;
  }

  function name() public view virtual override returns (string memory) {
    return _name;
  }

  function symbol() public view virtual override returns (string memory) {
    return _symbol;
  }

  function approve(address to, uint256 tokenId) public virtual override {
    address owner = ERC721P.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);
  }

  function getApproved(uint256 tokenId)
    public
    view
    virtual
    override
    returns (address)
  {
    require(_exists(tokenId), "ERC721: approved query for nonexistent token");

    return _tokenApprovals[tokenId];
  }

  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);
  }

  function isApprovedForAll(address owner, address operator)
    public
    view
    virtual
    override
    returns (bool)
  {
    return _operatorApprovals[owner][operator];
  }

  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);
  }

  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    safeTransferFrom(from, to, tokenId, "");
  }

  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);
  }

  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"
    );
  }

  function _exists(uint256 tokenId) internal view virtual returns (bool) {
    return tokenId < _owners.length && _owners[tokenId] != address(0);
  }

  function _isApprovedOrOwner(address spender, uint256 tokenId)
    internal
    view
    virtual
    returns (bool)
  {
    require(_exists(tokenId), "ERC721: operator query for nonexistent token");
    address owner = ERC721P.ownerOf(tokenId);
    return (spender == owner ||
      getApproved(tokenId) == spender ||
      isApprovedForAll(owner, spender));
  }

  function _safeMint(address to, uint256 tokenId) internal virtual {
    _safeMint(to, tokenId, "");
  }

  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"
    );
  }

  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);
    _owners.push(to);

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

  function _burn(uint256 tokenId) internal virtual {
    address owner = ERC721P.ownerOf(tokenId);

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

    // Clear approvals
    _approve(address(0), tokenId);
    _owners[tokenId] = address(0);

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

  function _transfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {
    require(
      ERC721P.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);
    _owners[tokenId] = to;

    emit Transfer(from, to, tokenId);
  }

  function _approve(address to, uint256 tokenId) internal virtual {
    _tokenApprovals[tokenId] = to;
    emit Approval(ERC721P.ownerOf(tokenId), to, tokenId);
  }

  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;
    }
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {}
}

File 6 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "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 7 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 8 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "IERC721.sol";

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

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

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

File 10 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

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 11 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "IERC165.sol";

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

File 13 of 20 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "IERC721.sol";

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

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 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 14 of 20 : Grace.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.10;

import "ERC20.sol";
import "Ownable.sol";

contract GRACE is ERC20, Ownable {
  // a mapping from an address to whether or not it can mint / burn
  mapping(address => bool) controllers;

  constructor() ERC20("$GRACE", "GRACE") {}

  /**
   * mints $GRACE to a recipient
   * @param to the recipient of the $GRACE
   * @param amount the amount of $GRACE to mint
   */
  function mint(address to, uint256 amount) external {
    require(controllers[msg.sender], "Only controllers can mint");
    _mint(to, amount);
  }

  /**
   * burns $GRACE from a holder
   * @param from the holder of the $GRACE
   * @param amount the amount of $GRACE to burn
   */
  function burn(address from, uint256 amount) external {
    require(controllers[msg.sender], "Only controllers can burn");
    _burn(from, amount);
  }

  /**
   * enables an address to mint / burn
   * @param controller the address to enable
   */
  function addController(address controller) external onlyOwner {
    controllers[controller] = true;
  }

  /**
   * disables an address from minting / burning
   * @param controller the address to disbale
   */
  function removeController(address controller) external onlyOwner {
    controllers[controller] = false;
  }
}

File 15 of 20 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";
import "IERC20Metadata.sol";
import "Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens 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 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 16 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

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);
}

File 17 of 20 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 18 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "Context.sol";

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

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

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

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

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

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

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

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

File 19 of 20 : IAngelz.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.10;

interface IAngelz {
  // struct to store each token's traits
  struct AngelHuman {
    bool human;
    uint8 angelicIndex;
  }

  function getPaidTokens() external view returns (uint256);

  function getTokenTraits(uint256 tokenId)
    external
    view
    returns (AngelHuman memory);
}

File 20 of 20 : ISanctuary.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.10;

interface ISanctuary {
  function addManyToSanctuaryAndHeaven(
    address account,
    uint16[] calldata tokenIds
  ) external;

  function randomAngelOwner(uint256 seed) external view returns (address);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_grace","type":"address"},{"internalType":"string","name":"_initBaseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAID_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaidTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"bool","name":"human","type":"bool"},{"internalType":"uint8","name":"angelicIndex","type":"uint8"}],"internalType":"struct IAngelz.AngelHuman","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"grace","outputs":[{"internalType":"contract GRACE","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"_number","type":"uint256"}],"name":"isEligible","outputs":[{"internalType":"uint16","name":"eligibility","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausePreMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stake","type":"bool"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"_number","type":"uint256"}],"name":"preMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sanctuary","outputs":[{"internalType":"contract ISanctuary","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_freeMint","type":"uint256"}],"name":"setNumFreeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_paidTokens","type":"uint256"}],"name":"setPaidTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_setPauseMint","type":"bool"}],"name":"setPauseMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_setPausePreMint","type":"bool"}],"name":"setPausePreMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_rootWL","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sanctuary","type":"address"}],"name":"setSanctuary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenTraits","outputs":[{"internalType":"bool","name":"human","type":"bool"},{"internalType":"uint8","name":"angelicIndex","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526009805461ffff19166101011790556101f4600a553480156200002657600080fd5b50604051620034a9380380620034a983398101604081905262000049916200022f565b604080518082018252600a815269416e67656c7a47616d6560b01b602080830191825283518085019094526002845261414760f01b908401528151919291620000959160009162000173565b508051620000ab90600190602084019062000173565b50503360a05250600d80546001600160a01b0319166001600160a01b038416179055620000d881620000fa565b6177986080819052620000ee906004906200032f565b600555506200038f9050565b620001046200011d565b80516200011990600790602084019062000173565b5050565b60a0516001600160a01b0316336001600160a01b031614620001715760405162461bcd60e51b815260206004820152600960248201526837b7363ca7bbb732b960b91b604482015260640160405180910390fd5b565b828054620001819062000352565b90600052602060002090601f016020900481019282620001a55760008555620001f0565b82601f10620001c057805160ff1916838001178555620001f0565b82800160010185558215620001f0579182015b82811115620001f0578251825591602001919060010190620001d3565b50620001fe92915062000202565b5090565b5b80821115620001fe576000815560010162000203565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200024357600080fd5b82516001600160a01b03811681146200025b57600080fd5b602084810151919350906001600160401b03808211156200027b57600080fd5b818601915086601f8301126200029057600080fd5b815181811115620002a557620002a562000219565b604051601f8201601f19908116603f01168101908382118183101715620002d057620002d062000219565b816040528281528986848701011115620002e957600080fd5b600093505b828410156200030d5784840186015181850187015292850192620002ee565b828411156200031f5760008684830101525b8096505050505050509250929050565b6000826200034d57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806200036757607f821691505b602082108114156200038957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516130d8620003d1600039600081816105c60152611e9c01526000818161084901528181610ba901528181610bf70152610f5f01526130d86000f3fe60806040526004361061025c5760003560e01c80636c0360eb11610144578063b88d4fde116100b6578063cd85cdb51161007a578063cd85cdb514610762578063dab5f3401461077c578063e05c57bf1461079c578063e985e9c5146107ee578063f47c84c514610837578063f59e26d01461086b57600080fd5b8063b88d4fde146106d1578063bfc70d1a146106f1578063c002d23d14610711578063c084f5401461072c578063c87b56dd1461074257600080fd5b80638da5cb5b116101085780638da5cb5b146105b457806394e56847146105e857806395d89b411461066a578063a146bf201461067f578063a22cb46514610692578063a40a65ab146106b257600080fd5b80636c0360eb1461051d5780636f34a7ff1461053257806370a08231146105525780638462151c14610572578063853828b61461059f57600080fd5b80632f745c59116101dd5780634f6ccce7116101a15780634f6ccce71461047457806355f804b31461049457806357f8b60c146104b45780635b70ea9f146104d45780636352211e146104ea57806367f68fac1461050a57600080fd5b80632f745c59146103d15780633431a753146103f15780634018b1f81461041157806342842e0e146104265780634f02c4201461044657600080fd5b806318160ddd1161022457806318160ddd146103325780631eefddb11461035157806323b872dd1461037157806327de8f271461039157806328381b8f146103b157600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f057806309f74df814610312575b600080fd5b34801561026d57600080fd5b5061028161027c36600461292d565b61088b565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab6108b6565b60405161028d91906129a2565b3480156102c457600080fd5b506102d86102d33660046129b5565b610948565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b3660046129e3565b6109d5565b005b34801561031e57600080fd5b5061031061032d366004612a24565b610aeb565b34801561033e57600080fd5b506002545b60405190815260200161028d565b34801561035d57600080fd5b50600d546102d8906001600160a01b031681565b34801561037d57600080fd5b5061031061038c366004612a3f565b610b1a565b34801561039d57600080fd5b506103436103ac3660046129b5565b610b8f565b3480156103bd57600080fd5b506103106103cc3660046129b5565b610c4f565b3480156103dd57600080fd5b506103436103ec3660046129e3565b610c5c565b3480156103fd57600080fd5b5061031061040c3660046129b5565b610d0b565b34801561041d57600080fd5b50600554610343565b34801561043257600080fd5b50610310610441366004612a3f565b610d18565b34801561045257600080fd5b506006546104619061ffff1681565b60405161ffff909116815260200161028d565b34801561048057600080fd5b5061034361048f3660046129b5565b610d33565b3480156104a057600080fd5b506103106104af366004612b0c565b610d90565b3480156104c057600080fd5b506104616104cf366004612ba1565b610daf565b3480156104e057600080fd5b50610343600a5481565b3480156104f657600080fd5b506102d86105053660046129b5565b610e55565b610310610518366004612bed565b610ee1565b34801561052957600080fd5b506102ab611404565b34801561053e57600080fd5b50600c546102d8906001600160a01b031681565b34801561055e57600080fd5b5061034361056d366004612c19565b611492565b34801561057e57600080fd5b5061059261058d366004612c19565b611564565b60405161028d9190612c36565b3480156105ab57600080fd5b5061031061162e565b3480156105c057600080fd5b506102d87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061064a6106033660046129b5565b6040805180820190915260008082526020820152506000908152600b602090815260409182902082518084019093525460ff80821615158452610100909104169082015290565b6040805182511515815260209283015160ff16928101929092520161028d565b34801561067657600080fd5b506102ab6116f7565b61031061068d366004612c7a565b611706565b34801561069e57600080fd5b506103106106ad366004612cdc565b611b29565b3480156106be57600080fd5b5060095461028190610100900460ff1681565b3480156106dd57600080fd5b506103106106ec366004612d08565b611bee565b3480156106fd57600080fd5b5061031061070c366004612c19565b611c70565b34801561071d57600080fd5b5061034366c0e98ff34dc00081565b34801561073857600080fd5b5061034360055481565b34801561074e57600080fd5b506102ab61075d3660046129b5565b611c9a565b34801561076e57600080fd5b506009546102819060ff1681565b34801561078857600080fd5b506103106107973660046129b5565b611d51565b3480156107a857600080fd5b506107d56107b73660046129b5565b600b6020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff90911660208301520161028d565b3480156107fa57600080fd5b50610281610809366004612d88565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b34801561084357600080fd5b506103437f000000000000000000000000000000000000000000000000000000000000000081565b34801561087757600080fd5b50610310610886366004612a24565b611d5e565b60006001600160e01b0319821663780e9d6360e01b14806108b057506108b082611d89565b92915050565b6060600080546108c590612dc1565b80601f01602080910402602001604051908101604052809291908181526020018280546108f190612dc1565b801561093e5780601f106109135761010080835404028352916020019161093e565b820191906000526020600020905b81548152906001019060200180831161092157829003601f168201915b5050505050905090565b600061095382611dd9565b6109b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b60006109e082610e55565b9050806001600160a01b0316836001600160a01b03161415610a4e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109b0565b336001600160a01b0382161480610a6a5750610a6a8133610809565b610adc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109b0565b610ae68383611e23565b505050565b610af3611e91565b8015610b0b576009805461ff00191661010017905550565b6009805461ff00191690555b50565b600c546001600160a01b0316336001600160a01b031614610b8457610b3f3382611ef7565b610b845760405162461bcd60e51b8152602060048201526016602482015275139bdd081bdddb995c881b9bdc88185c1c1c9bdd995960521b60448201526064016109b0565b610ae6838383611fe1565b60006005548211610ba257506000919050565b6004610bcf7f00000000000000000000000000000000000000000000000000000000000000006002612e0c565b610bd99190612e41565b8211610bf0575069021e19e0c9bab2400000919050565b6004610c1d7f00000000000000000000000000000000000000000000000000000000000000006003612e0c565b610c279190612e41565b8211610c3e575069043c33c1937564800000919050565b50690878678326eac9000000919050565b610c57611e91565b600a55565b6000610c6783611492565b8210610c855760405162461bcd60e51b81526004016109b090612e55565b6000805b600254811015610cf25760028181548110610ca657610ca6612e85565b6000918252602090912001546001600160a01b0386811691161415610ce25783821415610cd65791506108b09050565b610cdf82612e9b565b91505b610ceb81612e9b565b9050610c89565b5060405162461bcd60e51b81526004016109b090612e55565b610d13611e91565b600555565b610ae683838360405180602001604052806000815250611bee565b6000610d3e60025490565b8210610d8c5760405162461bcd60e51b815260206004820152601760248201527f455243373231456e756d3a20676c6f62616c20696f6f6200000000000000000060448201526064016109b0565b5090565b610d98611e91565b8051610dab906007906020840190612887565b5050565b6000808233604051602001610de092919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b604051602081830303815290604052805190602001209050610e39858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050612137565b15610e48576001915050610e4e565b60009150505b9392505050565b60008060028381548110610e6b57610e6b612e85565b6000918252602090912001546001600160a01b03169050806108b05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109b0565b60095460ff1615610f205760405162461bcd60e51b815260206004820152600960248201526814185d5cd9535a5b9d60ba1b60448201526064016109b0565b323314610f5a5760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109b0565b6006547f000000000000000000000000000000000000000000000000000000000000000090610f8e90849061ffff16612eb6565b1115610fc85760405162461bcd60e51b8152602060048201526009602482015268105b1b1b5a5b9d195960ba1b60448201526064016109b0565b600082118015610fd95750600a8211155b6110145760405162461bcd60e51b815260206004820152600c60248201526b06e6f6d6f72657468616e31360a41b60448201526064016109b0565b60055460065461ffff16101561115e57600a5460065461ffff1610156110ba5760028211156110775760405162461bcd60e51b815260206004820152600f60248201526e0cce4cacad8d2dad2e864e0cae4e8f608b1b60448201526064016109b0565b34156110b55760405162461bcd60e51b815260206004820152600d60248201526c6272756820697473206672656560981b60448201526064016109b0565b611199565b6005546006546110cf90849061ffff16612eb6565b111561110f5760405162461bcd60e51b815260206004820152600f60248201526e105b1b1bdb9cd85b195b5a5b9d1959608a1b60448201526064016109b0565b61112066c0e98ff34dc00083612e0c565b3410156110b55760405162461bcd60e51b815260206004820152600c60248201526b0dcdee8cadcdeeaced0cae8d60a31b60448201526064016109b0565b34156111995760405162461bcd60e51b815260206004820152600a602482015269706179696e475241434560b01b60448201526064016109b0565b600080826111b5576040805160008152602081019091526111f9565b8367ffffffffffffffff8111156111ce576111ce612a80565b6040519080825280602002602001820160405280156111f7578160200160208202803683370190505b505b90506000805b8581101561131a576006546112179061ffff1661214d565b60065490925061122b9061ffff16836121ac565b5060006112378361220c565b905085158061124f57506001600160a01b0381163314155b1561126b5760065461126690829061ffff166122c7565b6112bd565b600c54600654611288916001600160a01b03169061ffff166122c7565b600654845161ffff909116908590849081106112a6576112a6612e85565b602002602001019061ffff16908161ffff16815250505b6006805461ffff169060006112d183612ece565b82546101009290920a61ffff8181021990931691831602179091556006546112fa925016610b8f565b6113049086612eb6565b945050808061131290612e9b565b9150506111ff565b50821561139457600d546001600160a01b0316639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b15801561137b57600080fd5b505af115801561138f573d6000803e3d6000fd5b505050505b83156113fd57600c546001600160a01b03166397f7b1ab33846040518363ffffffff1660e01b81526004016113ca929190612ef0565b600060405180830381600087803b1580156113e457600080fd5b505af11580156113f8573d6000803e3d6000fd5b505050505b5050505050565b6007805461141190612dc1565b80601f016020809104026020016040519081016040528092919081815260200182805461143d90612dc1565b801561148a5780601f1061145f5761010080835404028352916020019161148a565b820191906000526020600020905b81548152906001019060200180831161146d57829003601f168201915b505050505081565b60006001600160a01b0382166114fd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109b0565b600254600090815b8181101561155b576002818154811061152057611520612e85565b6000918252602090912001546001600160a01b038681169116141561154b5761154883612e9b565b92505b61155481612e9b565b9050611505565b50909392505050565b606061156f82611492565b60001061158e5760405162461bcd60e51b81526004016109b090612e55565b600061159983611492565b905060008167ffffffffffffffff8111156115b6576115b6612a80565b6040519080825280602002602001820160405280156115df578160200160208202803683370190505b50905060005b82811015611626576115f78582610c5c565b82828151811061160957611609612e85565b60209081029190910101528061161e81612e9b565b9150506115e5565b509392505050565b611636611e91565b478061166f5760405162461bcd60e51b81526020600482015260086024820152674e6f206d6f6e657960c01b60448201526064016109b0565b6116a373d70ee431f074fb835132dde35255f8274a51d90b606461169484601e612e0c565b61169e9190612e41565b6122e1565b6116c87313542174ba72e443450926ea7fc15ed6d66491e0606461169484601e612e0c565b6116ed73cc187e04a67c5601693db7f25e4309d066512a24606461169484601e612e0c565b610b1733476122e1565b6060600180546108c590612dc1565b600954610100900460ff161561174d5760405162461bcd60e51b815260206004820152600c60248201526b14185d5cd9541c99535a5b9d60a21b60448201526064016109b0565b3233146117875760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109b0565b6000611794848484610daf565b905061ffff81166117cf5760405162461bcd60e51b81526020600482015260056024820152641b9bdd15d360da1b60448201526064016109b0565b6005546006546117e490889061ffff16612eb6565b111561181e5760405162461bcd60e51b8152602060048201526009602482015268105b1b1b5a5b9d195960ba1b60448201526064016109b0565b60008611801561182f5750600a8611155b61186a5760405162461bcd60e51b815260206004820152600c60248201526b06e6f6d6f72657468616e31360a41b60448201526064016109b0565b600a5460065461ffff1610156119005760028611156118bd5760405162461bcd60e51b815260206004820152600f60248201526e0cce4cacad8d2dad2e864e0cae4e8f608b1b60448201526064016109b0565b34156118fb5760405162461bcd60e51b815260206004820152600d60248201526c6272756820697473206672656560981b60448201526064016109b0565b61194f565b61191166c0e98ff34dc00087612e0c565b34101561194f5760405162461bcd60e51b815260206004820152600c60248201526b0dcdee8cadcdeeaced0cae8d60a31b60448201526064016109b0565b60008561196a576040805160008152602081019091526119ae565b8667ffffffffffffffff81111561198357611983612a80565b6040519080825280602002602001820160405280156119ac578160200160208202803683370190505b505b90506000805b88811015611ab5576006546119cc9061ffff1661214d565b6006549092506119e09061ffff16836121ac565b5060006119ec8361220c565b9050881580611a0457506001600160a01b0381163314155b15611a2057600654611a1b90829061ffff166122c7565b611a72565b600c54600654611a3d916001600160a01b03169061ffff166122c7565b600654845161ffff90911690859084908110611a5b57611a5b612e85565b602002602001019061ffff16908161ffff16815250505b6006805461ffff16906000611a8683612ece565b91906101000a81548161ffff021916908361ffff16021790555050508080611aad90612e9b565b9150506119b4565b508615611b1f57600c546001600160a01b03166397f7b1ab33846040518363ffffffff1660e01b8152600401611aec929190612ef0565b600060405180830381600087803b158015611b0657600080fd5b505af1158015611b1a573d6000803e3d6000fd5b505050505b5050505050505050565b6001600160a01b038216331415611b825760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109b0565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611bf83383611ef7565b611c5e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016109b0565b611c6a84848484612376565b50505050565b611c78611e91565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060611ca582611dd9565b611cd75760405162461bcd60e51b8152602060048201526003602482015262444e4560e81b60448201526064016109b0565b6000611ce16123a9565b90506000815111611d015760405180602001604052806000815250610e4e565b80611d0b846123b8565b60405180604001604052806005815260200164173539b7b760d91b815250604051602001611d3b93929190612f4a565b6040516020818303038152906040529392505050565b611d59611e91565b600855565b611d66611e91565b8015611d7c576009805460ff1916600117905550565b6009805460ff1916905550565b60006001600160e01b031982166380ac58cd60e01b1480611dba57506001600160e01b03198216635b5e139f60e01b145b806108b057506301ffc9a760e01b6001600160e01b03198316146108b0565b600254600090821080156108b0575060006001600160a01b031660028381548110611e0657611e06612e85565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e5882610e55565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ef55760405162461bcd60e51b815260206004820152600960248201526837b7363ca7bbb732b960b91b60448201526064016109b0565b565b6000611f0282611dd9565b611f635760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109b0565b6000611f6e83610e55565b9050806001600160a01b0316846001600160a01b03161480611fa95750836001600160a01b0316611f9e84610948565b6001600160a01b0316145b80611fd957506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ff482610e55565b6001600160a01b03161461205c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109b0565b6001600160a01b0382166120be5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109b0565b6120c9600082611e23565b81600282815481106120dd576120dd612e85565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60008261214485846124b6565b14949350505050565b60003261215b600143612f8d565b60405160609290921b6bffffffffffffffffffffffff191660208301524060348201524260548201526074810183905260940160408051601f19818403018152919052805160209091012092915050565b60408051808201909152600080825260208201526121c98261255a565b6000938452600b60209081526040909420815181549583015161ffff1990961690151561ff0019161761010060ff90961695909502949094179093555090919050565b60055460065460009161ffff9091161115806122355750612232600a60f584901c612fa4565b15155b1561224057336108b0565b600c54604051631705386960e31b8152609084901c60048201526000916001600160a01b03169063b829c34890602401602060405180830381865afa15801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b19190612fb8565b90506001600160a01b0381166108b05733610e4e565b610dab82826040518060200160405280600081525061262e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461232e576040519150601f19603f3d011682016040523d82523d6000602084013e612333565b606091505b5050905080610ae65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016109b0565b612381848484611fe1565b61238d84848484612661565b611c6a5760405162461bcd60e51b81526004016109b090612fd5565b6060600780546108c590612dc1565b6060816123dc5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561240657806123f081612e9b565b91506123ff9050600a83612e41565b91506123e0565b60008167ffffffffffffffff81111561242157612421612a80565b6040519080825280601f01601f19166020018201604052801561244b576020820181803683370190505b5090505b8415611fd957612460600183612f8d565b915061246d600a86612fa4565b612478906030612eb6565b60f81b81838151811061248d5761248d612e85565b60200101906001600160f81b031916908160001a9053506124af600a86612e41565b945061244f565b600081815b84518110156116265760008582815181106124d8576124d8612e85565b6020026020010151905080831161251a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612547565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061255281612e9b565b9150506124bb565b604080518082019091526000808252602082015261257d600a61ffff8416612fa4565b158015825260109290921c916125995760006020820152919050565b60006125aa600a61ffff8516613027565b905061ffff81166125c15760086020830152612628565b8061ffff16600114806125d857508061ffff166002145b156125e95760076020830152612628565b8061ffff166003148061260057508061ffff166004145b8061260f57508061ffff166005145b156126205760066020830152612628565b600560208301525b50919050565b612638838361275f565b6126456000848484612661565b610ae65760405162461bcd60e51b81526004016109b090612fd5565b60006001600160a01b0384163b1561275457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126a5903390899088908890600401613048565b6020604051808303816000875af19250505080156126e0575060408051601f3d908101601f191682019092526126dd91810190613085565b60015b61273a573d80801561270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b5080516127325760405162461bcd60e51b81526004016109b090612fd5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fd9565b506001949350505050565b6001600160a01b0382166127b55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109b0565b6127be81611dd9565b1561280b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109b0565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461289390612dc1565b90600052602060002090601f0160209004810192826128b557600085556128fb565b82601f106128ce57805160ff19168380011785556128fb565b828001600101855582156128fb579182015b828111156128fb5782518255916020019190600101906128e0565b50610d8c9291505b80821115610d8c5760008155600101612903565b6001600160e01b031981168114610b1757600080fd5b60006020828403121561293f57600080fd5b8135610e4e81612917565b60005b8381101561296557818101518382015260200161294d565b83811115611c6a5750506000910152565b6000815180845261298e81602086016020860161294a565b601f01601f19169290920160200192915050565b602081526000610e4e6020830184612976565b6000602082840312156129c757600080fd5b5035919050565b6001600160a01b0381168114610b1757600080fd5b600080604083850312156129f657600080fd5b8235612a01816129ce565b946020939093013593505050565b80358015158114612a1f57600080fd5b919050565b600060208284031215612a3657600080fd5b610e4e82612a0f565b600080600060608486031215612a5457600080fd5b8335612a5f816129ce565b92506020840135612a6f816129ce565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612ab157612ab1612a80565b604051601f8501601f19908116603f01168101908282118183101715612ad957612ad9612a80565b81604052809350858152868686011115612af257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612b1e57600080fd5b813567ffffffffffffffff811115612b3557600080fd5b8201601f81018413612b4657600080fd5b611fd984823560208401612a96565b60008083601f840112612b6757600080fd5b50813567ffffffffffffffff811115612b7f57600080fd5b6020830191508360208260051b8501011115612b9a57600080fd5b9250929050565b600080600060408486031215612bb657600080fd5b833567ffffffffffffffff811115612bcd57600080fd5b612bd986828701612b55565b909790965060209590950135949350505050565b60008060408385031215612c0057600080fd5b82359150612c1060208401612a0f565b90509250929050565b600060208284031215612c2b57600080fd5b8135610e4e816129ce565b6020808252825182820181905260009190848201906040850190845b81811015612c6e57835183529284019291840191600101612c52565b50909695505050505050565b600080600080600060808688031215612c9257600080fd5b85359450612ca260208701612a0f565b9350604086013567ffffffffffffffff811115612cbe57600080fd5b612cca88828901612b55565b96999598509660600135949350505050565b60008060408385031215612cef57600080fd5b8235612cfa816129ce565b9150612c1060208401612a0f565b60008060008060808587031215612d1e57600080fd5b8435612d29816129ce565b93506020850135612d39816129ce565b925060408501359150606085013567ffffffffffffffff811115612d5c57600080fd5b8501601f81018713612d6d57600080fd5b612d7c87823560208401612a96565b91505092959194509250565b60008060408385031215612d9b57600080fd5b8235612da6816129ce565b91506020830135612db6816129ce565b809150509250929050565b600181811c90821680612dd557607f821691505b6020821081141561262857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612e2657612e26612df6565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612e5057612e50612e2b565b500490565b60208082526016908201527522a9219b9918a2b73ab69d1037bbb732b91034b7b7b160511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612eaf57612eaf612df6565b5060010190565b60008219821115612ec957612ec9612df6565b500190565b600061ffff80831681811415612ee657612ee6612df6565b6001019392505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b81811015612f3d57845161ffff1683529383019391830191600101612f1d565b5090979650505050505050565b60008451612f5c81846020890161294a565b845190830190612f7081836020890161294a565b8451910190612f8381836020880161294a565b0195945050505050565b600082821015612f9f57612f9f612df6565b500390565b600082612fb357612fb3612e2b565b500690565b600060208284031215612fca57600080fd5b8151610e4e816129ce565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600061ffff8084168061303c5761303c612e2b565b92169190910692915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061307b90830184612976565b9695505050505050565b60006020828403121561309757600080fd5b8151610e4e8161291756fea26469706673582212202deedb7053c180df70897fde2f43616cd7e09819ccb12b5be57d2a636766a17264736f6c634300080a0033000000000000000000000000bdfbf8c6ab5967fa3e74e43afa3a2073e3487404000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061025c5760003560e01c80636c0360eb11610144578063b88d4fde116100b6578063cd85cdb51161007a578063cd85cdb514610762578063dab5f3401461077c578063e05c57bf1461079c578063e985e9c5146107ee578063f47c84c514610837578063f59e26d01461086b57600080fd5b8063b88d4fde146106d1578063bfc70d1a146106f1578063c002d23d14610711578063c084f5401461072c578063c87b56dd1461074257600080fd5b80638da5cb5b116101085780638da5cb5b146105b457806394e56847146105e857806395d89b411461066a578063a146bf201461067f578063a22cb46514610692578063a40a65ab146106b257600080fd5b80636c0360eb1461051d5780636f34a7ff1461053257806370a08231146105525780638462151c14610572578063853828b61461059f57600080fd5b80632f745c59116101dd5780634f6ccce7116101a15780634f6ccce71461047457806355f804b31461049457806357f8b60c146104b45780635b70ea9f146104d45780636352211e146104ea57806367f68fac1461050a57600080fd5b80632f745c59146103d15780633431a753146103f15780634018b1f81461041157806342842e0e146104265780634f02c4201461044657600080fd5b806318160ddd1161022457806318160ddd146103325780631eefddb11461035157806323b872dd1461037157806327de8f271461039157806328381b8f146103b157600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f057806309f74df814610312575b600080fd5b34801561026d57600080fd5b5061028161027c36600461292d565b61088b565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab6108b6565b60405161028d91906129a2565b3480156102c457600080fd5b506102d86102d33660046129b5565b610948565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b3660046129e3565b6109d5565b005b34801561031e57600080fd5b5061031061032d366004612a24565b610aeb565b34801561033e57600080fd5b506002545b60405190815260200161028d565b34801561035d57600080fd5b50600d546102d8906001600160a01b031681565b34801561037d57600080fd5b5061031061038c366004612a3f565b610b1a565b34801561039d57600080fd5b506103436103ac3660046129b5565b610b8f565b3480156103bd57600080fd5b506103106103cc3660046129b5565b610c4f565b3480156103dd57600080fd5b506103436103ec3660046129e3565b610c5c565b3480156103fd57600080fd5b5061031061040c3660046129b5565b610d0b565b34801561041d57600080fd5b50600554610343565b34801561043257600080fd5b50610310610441366004612a3f565b610d18565b34801561045257600080fd5b506006546104619061ffff1681565b60405161ffff909116815260200161028d565b34801561048057600080fd5b5061034361048f3660046129b5565b610d33565b3480156104a057600080fd5b506103106104af366004612b0c565b610d90565b3480156104c057600080fd5b506104616104cf366004612ba1565b610daf565b3480156104e057600080fd5b50610343600a5481565b3480156104f657600080fd5b506102d86105053660046129b5565b610e55565b610310610518366004612bed565b610ee1565b34801561052957600080fd5b506102ab611404565b34801561053e57600080fd5b50600c546102d8906001600160a01b031681565b34801561055e57600080fd5b5061034361056d366004612c19565b611492565b34801561057e57600080fd5b5061059261058d366004612c19565b611564565b60405161028d9190612c36565b3480156105ab57600080fd5b5061031061162e565b3480156105c057600080fd5b506102d87f00000000000000000000000028d135dc78f6ae41601c6ed6bd25460105e3eb4a81565b3480156105f457600080fd5b5061064a6106033660046129b5565b6040805180820190915260008082526020820152506000908152600b602090815260409182902082518084019093525460ff80821615158452610100909104169082015290565b6040805182511515815260209283015160ff16928101929092520161028d565b34801561067657600080fd5b506102ab6116f7565b61031061068d366004612c7a565b611706565b34801561069e57600080fd5b506103106106ad366004612cdc565b611b29565b3480156106be57600080fd5b5060095461028190610100900460ff1681565b3480156106dd57600080fd5b506103106106ec366004612d08565b611bee565b3480156106fd57600080fd5b5061031061070c366004612c19565b611c70565b34801561071d57600080fd5b5061034366c0e98ff34dc00081565b34801561073857600080fd5b5061034360055481565b34801561074e57600080fd5b506102ab61075d3660046129b5565b611c9a565b34801561076e57600080fd5b506009546102819060ff1681565b34801561078857600080fd5b506103106107973660046129b5565b611d51565b3480156107a857600080fd5b506107d56107b73660046129b5565b600b6020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff90911660208301520161028d565b3480156107fa57600080fd5b50610281610809366004612d88565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b34801561084357600080fd5b506103437f000000000000000000000000000000000000000000000000000000000000779881565b34801561087757600080fd5b50610310610886366004612a24565b611d5e565b60006001600160e01b0319821663780e9d6360e01b14806108b057506108b082611d89565b92915050565b6060600080546108c590612dc1565b80601f01602080910402602001604051908101604052809291908181526020018280546108f190612dc1565b801561093e5780601f106109135761010080835404028352916020019161093e565b820191906000526020600020905b81548152906001019060200180831161092157829003601f168201915b5050505050905090565b600061095382611dd9565b6109b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b60006109e082610e55565b9050806001600160a01b0316836001600160a01b03161415610a4e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109b0565b336001600160a01b0382161480610a6a5750610a6a8133610809565b610adc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109b0565b610ae68383611e23565b505050565b610af3611e91565b8015610b0b576009805461ff00191661010017905550565b6009805461ff00191690555b50565b600c546001600160a01b0316336001600160a01b031614610b8457610b3f3382611ef7565b610b845760405162461bcd60e51b8152602060048201526016602482015275139bdd081bdddb995c881b9bdc88185c1c1c9bdd995960521b60448201526064016109b0565b610ae6838383611fe1565b60006005548211610ba257506000919050565b6004610bcf7f00000000000000000000000000000000000000000000000000000000000077986002612e0c565b610bd99190612e41565b8211610bf0575069021e19e0c9bab2400000919050565b6004610c1d7f00000000000000000000000000000000000000000000000000000000000077986003612e0c565b610c279190612e41565b8211610c3e575069043c33c1937564800000919050565b50690878678326eac9000000919050565b610c57611e91565b600a55565b6000610c6783611492565b8210610c855760405162461bcd60e51b81526004016109b090612e55565b6000805b600254811015610cf25760028181548110610ca657610ca6612e85565b6000918252602090912001546001600160a01b0386811691161415610ce25783821415610cd65791506108b09050565b610cdf82612e9b565b91505b610ceb81612e9b565b9050610c89565b5060405162461bcd60e51b81526004016109b090612e55565b610d13611e91565b600555565b610ae683838360405180602001604052806000815250611bee565b6000610d3e60025490565b8210610d8c5760405162461bcd60e51b815260206004820152601760248201527f455243373231456e756d3a20676c6f62616c20696f6f6200000000000000000060448201526064016109b0565b5090565b610d98611e91565b8051610dab906007906020840190612887565b5050565b6000808233604051602001610de092919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b604051602081830303815290604052805190602001209050610e39858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050612137565b15610e48576001915050610e4e565b60009150505b9392505050565b60008060028381548110610e6b57610e6b612e85565b6000918252602090912001546001600160a01b03169050806108b05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109b0565b60095460ff1615610f205760405162461bcd60e51b815260206004820152600960248201526814185d5cd9535a5b9d60ba1b60448201526064016109b0565b323314610f5a5760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109b0565b6006547f000000000000000000000000000000000000000000000000000000000000779890610f8e90849061ffff16612eb6565b1115610fc85760405162461bcd60e51b8152602060048201526009602482015268105b1b1b5a5b9d195960ba1b60448201526064016109b0565b600082118015610fd95750600a8211155b6110145760405162461bcd60e51b815260206004820152600c60248201526b06e6f6d6f72657468616e31360a41b60448201526064016109b0565b60055460065461ffff16101561115e57600a5460065461ffff1610156110ba5760028211156110775760405162461bcd60e51b815260206004820152600f60248201526e0cce4cacad8d2dad2e864e0cae4e8f608b1b60448201526064016109b0565b34156110b55760405162461bcd60e51b815260206004820152600d60248201526c6272756820697473206672656560981b60448201526064016109b0565b611199565b6005546006546110cf90849061ffff16612eb6565b111561110f5760405162461bcd60e51b815260206004820152600f60248201526e105b1b1bdb9cd85b195b5a5b9d1959608a1b60448201526064016109b0565b61112066c0e98ff34dc00083612e0c565b3410156110b55760405162461bcd60e51b815260206004820152600c60248201526b0dcdee8cadcdeeaced0cae8d60a31b60448201526064016109b0565b34156111995760405162461bcd60e51b815260206004820152600a602482015269706179696e475241434560b01b60448201526064016109b0565b600080826111b5576040805160008152602081019091526111f9565b8367ffffffffffffffff8111156111ce576111ce612a80565b6040519080825280602002602001820160405280156111f7578160200160208202803683370190505b505b90506000805b8581101561131a576006546112179061ffff1661214d565b60065490925061122b9061ffff16836121ac565b5060006112378361220c565b905085158061124f57506001600160a01b0381163314155b1561126b5760065461126690829061ffff166122c7565b6112bd565b600c54600654611288916001600160a01b03169061ffff166122c7565b600654845161ffff909116908590849081106112a6576112a6612e85565b602002602001019061ffff16908161ffff16815250505b6006805461ffff169060006112d183612ece565b82546101009290920a61ffff8181021990931691831602179091556006546112fa925016610b8f565b6113049086612eb6565b945050808061131290612e9b565b9150506111ff565b50821561139457600d546001600160a01b0316639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b15801561137b57600080fd5b505af115801561138f573d6000803e3d6000fd5b505050505b83156113fd57600c546001600160a01b03166397f7b1ab33846040518363ffffffff1660e01b81526004016113ca929190612ef0565b600060405180830381600087803b1580156113e457600080fd5b505af11580156113f8573d6000803e3d6000fd5b505050505b5050505050565b6007805461141190612dc1565b80601f016020809104026020016040519081016040528092919081815260200182805461143d90612dc1565b801561148a5780601f1061145f5761010080835404028352916020019161148a565b820191906000526020600020905b81548152906001019060200180831161146d57829003601f168201915b505050505081565b60006001600160a01b0382166114fd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109b0565b600254600090815b8181101561155b576002818154811061152057611520612e85565b6000918252602090912001546001600160a01b038681169116141561154b5761154883612e9b565b92505b61155481612e9b565b9050611505565b50909392505050565b606061156f82611492565b60001061158e5760405162461bcd60e51b81526004016109b090612e55565b600061159983611492565b905060008167ffffffffffffffff8111156115b6576115b6612a80565b6040519080825280602002602001820160405280156115df578160200160208202803683370190505b50905060005b82811015611626576115f78582610c5c565b82828151811061160957611609612e85565b60209081029190910101528061161e81612e9b565b9150506115e5565b509392505050565b611636611e91565b478061166f5760405162461bcd60e51b81526020600482015260086024820152674e6f206d6f6e657960c01b60448201526064016109b0565b6116a373d70ee431f074fb835132dde35255f8274a51d90b606461169484601e612e0c565b61169e9190612e41565b6122e1565b6116c87313542174ba72e443450926ea7fc15ed6d66491e0606461169484601e612e0c565b6116ed73cc187e04a67c5601693db7f25e4309d066512a24606461169484601e612e0c565b610b1733476122e1565b6060600180546108c590612dc1565b600954610100900460ff161561174d5760405162461bcd60e51b815260206004820152600c60248201526b14185d5cd9541c99535a5b9d60a21b60448201526064016109b0565b3233146117875760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b60448201526064016109b0565b6000611794848484610daf565b905061ffff81166117cf5760405162461bcd60e51b81526020600482015260056024820152641b9bdd15d360da1b60448201526064016109b0565b6005546006546117e490889061ffff16612eb6565b111561181e5760405162461bcd60e51b8152602060048201526009602482015268105b1b1b5a5b9d195960ba1b60448201526064016109b0565b60008611801561182f5750600a8611155b61186a5760405162461bcd60e51b815260206004820152600c60248201526b06e6f6d6f72657468616e31360a41b60448201526064016109b0565b600a5460065461ffff1610156119005760028611156118bd5760405162461bcd60e51b815260206004820152600f60248201526e0cce4cacad8d2dad2e864e0cae4e8f608b1b60448201526064016109b0565b34156118fb5760405162461bcd60e51b815260206004820152600d60248201526c6272756820697473206672656560981b60448201526064016109b0565b61194f565b61191166c0e98ff34dc00087612e0c565b34101561194f5760405162461bcd60e51b815260206004820152600c60248201526b0dcdee8cadcdeeaced0cae8d60a31b60448201526064016109b0565b60008561196a576040805160008152602081019091526119ae565b8667ffffffffffffffff81111561198357611983612a80565b6040519080825280602002602001820160405280156119ac578160200160208202803683370190505b505b90506000805b88811015611ab5576006546119cc9061ffff1661214d565b6006549092506119e09061ffff16836121ac565b5060006119ec8361220c565b9050881580611a0457506001600160a01b0381163314155b15611a2057600654611a1b90829061ffff166122c7565b611a72565b600c54600654611a3d916001600160a01b03169061ffff166122c7565b600654845161ffff90911690859084908110611a5b57611a5b612e85565b602002602001019061ffff16908161ffff16815250505b6006805461ffff16906000611a8683612ece565b91906101000a81548161ffff021916908361ffff16021790555050508080611aad90612e9b565b9150506119b4565b508615611b1f57600c546001600160a01b03166397f7b1ab33846040518363ffffffff1660e01b8152600401611aec929190612ef0565b600060405180830381600087803b158015611b0657600080fd5b505af1158015611b1a573d6000803e3d6000fd5b505050505b5050505050505050565b6001600160a01b038216331415611b825760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109b0565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611bf83383611ef7565b611c5e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016109b0565b611c6a84848484612376565b50505050565b611c78611e91565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060611ca582611dd9565b611cd75760405162461bcd60e51b8152602060048201526003602482015262444e4560e81b60448201526064016109b0565b6000611ce16123a9565b90506000815111611d015760405180602001604052806000815250610e4e565b80611d0b846123b8565b60405180604001604052806005815260200164173539b7b760d91b815250604051602001611d3b93929190612f4a565b6040516020818303038152906040529392505050565b611d59611e91565b600855565b611d66611e91565b8015611d7c576009805460ff1916600117905550565b6009805460ff1916905550565b60006001600160e01b031982166380ac58cd60e01b1480611dba57506001600160e01b03198216635b5e139f60e01b145b806108b057506301ffc9a760e01b6001600160e01b03198316146108b0565b600254600090821080156108b0575060006001600160a01b031660028381548110611e0657611e06612e85565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e5882610e55565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b336001600160a01b037f00000000000000000000000028d135dc78f6ae41601c6ed6bd25460105e3eb4a1614611ef55760405162461bcd60e51b815260206004820152600960248201526837b7363ca7bbb732b960b91b60448201526064016109b0565b565b6000611f0282611dd9565b611f635760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109b0565b6000611f6e83610e55565b9050806001600160a01b0316846001600160a01b03161480611fa95750836001600160a01b0316611f9e84610948565b6001600160a01b0316145b80611fd957506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ff482610e55565b6001600160a01b03161461205c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109b0565b6001600160a01b0382166120be5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109b0565b6120c9600082611e23565b81600282815481106120dd576120dd612e85565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60008261214485846124b6565b14949350505050565b60003261215b600143612f8d565b60405160609290921b6bffffffffffffffffffffffff191660208301524060348201524260548201526074810183905260940160408051601f19818403018152919052805160209091012092915050565b60408051808201909152600080825260208201526121c98261255a565b6000938452600b60209081526040909420815181549583015161ffff1990961690151561ff0019161761010060ff90961695909502949094179093555090919050565b60055460065460009161ffff9091161115806122355750612232600a60f584901c612fa4565b15155b1561224057336108b0565b600c54604051631705386960e31b8152609084901c60048201526000916001600160a01b03169063b829c34890602401602060405180830381865afa15801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b19190612fb8565b90506001600160a01b0381166108b05733610e4e565b610dab82826040518060200160405280600081525061262e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461232e576040519150601f19603f3d011682016040523d82523d6000602084013e612333565b606091505b5050905080610ae65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016109b0565b612381848484611fe1565b61238d84848484612661565b611c6a5760405162461bcd60e51b81526004016109b090612fd5565b6060600780546108c590612dc1565b6060816123dc5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561240657806123f081612e9b565b91506123ff9050600a83612e41565b91506123e0565b60008167ffffffffffffffff81111561242157612421612a80565b6040519080825280601f01601f19166020018201604052801561244b576020820181803683370190505b5090505b8415611fd957612460600183612f8d565b915061246d600a86612fa4565b612478906030612eb6565b60f81b81838151811061248d5761248d612e85565b60200101906001600160f81b031916908160001a9053506124af600a86612e41565b945061244f565b600081815b84518110156116265760008582815181106124d8576124d8612e85565b6020026020010151905080831161251a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612547565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061255281612e9b565b9150506124bb565b604080518082019091526000808252602082015261257d600a61ffff8416612fa4565b158015825260109290921c916125995760006020820152919050565b60006125aa600a61ffff8516613027565b905061ffff81166125c15760086020830152612628565b8061ffff16600114806125d857508061ffff166002145b156125e95760076020830152612628565b8061ffff166003148061260057508061ffff166004145b8061260f57508061ffff166005145b156126205760066020830152612628565b600560208301525b50919050565b612638838361275f565b6126456000848484612661565b610ae65760405162461bcd60e51b81526004016109b090612fd5565b60006001600160a01b0384163b1561275457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126a5903390899088908890600401613048565b6020604051808303816000875af19250505080156126e0575060408051601f3d908101601f191682019092526126dd91810190613085565b60015b61273a573d80801561270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b5080516127325760405162461bcd60e51b81526004016109b090612fd5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fd9565b506001949350505050565b6001600160a01b0382166127b55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109b0565b6127be81611dd9565b1561280b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109b0565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461289390612dc1565b90600052602060002090601f0160209004810192826128b557600085556128fb565b82601f106128ce57805160ff19168380011785556128fb565b828001600101855582156128fb579182015b828111156128fb5782518255916020019190600101906128e0565b50610d8c9291505b80821115610d8c5760008155600101612903565b6001600160e01b031981168114610b1757600080fd5b60006020828403121561293f57600080fd5b8135610e4e81612917565b60005b8381101561296557818101518382015260200161294d565b83811115611c6a5750506000910152565b6000815180845261298e81602086016020860161294a565b601f01601f19169290920160200192915050565b602081526000610e4e6020830184612976565b6000602082840312156129c757600080fd5b5035919050565b6001600160a01b0381168114610b1757600080fd5b600080604083850312156129f657600080fd5b8235612a01816129ce565b946020939093013593505050565b80358015158114612a1f57600080fd5b919050565b600060208284031215612a3657600080fd5b610e4e82612a0f565b600080600060608486031215612a5457600080fd5b8335612a5f816129ce565b92506020840135612a6f816129ce565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612ab157612ab1612a80565b604051601f8501601f19908116603f01168101908282118183101715612ad957612ad9612a80565b81604052809350858152868686011115612af257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612b1e57600080fd5b813567ffffffffffffffff811115612b3557600080fd5b8201601f81018413612b4657600080fd5b611fd984823560208401612a96565b60008083601f840112612b6757600080fd5b50813567ffffffffffffffff811115612b7f57600080fd5b6020830191508360208260051b8501011115612b9a57600080fd5b9250929050565b600080600060408486031215612bb657600080fd5b833567ffffffffffffffff811115612bcd57600080fd5b612bd986828701612b55565b909790965060209590950135949350505050565b60008060408385031215612c0057600080fd5b82359150612c1060208401612a0f565b90509250929050565b600060208284031215612c2b57600080fd5b8135610e4e816129ce565b6020808252825182820181905260009190848201906040850190845b81811015612c6e57835183529284019291840191600101612c52565b50909695505050505050565b600080600080600060808688031215612c9257600080fd5b85359450612ca260208701612a0f565b9350604086013567ffffffffffffffff811115612cbe57600080fd5b612cca88828901612b55565b96999598509660600135949350505050565b60008060408385031215612cef57600080fd5b8235612cfa816129ce565b9150612c1060208401612a0f565b60008060008060808587031215612d1e57600080fd5b8435612d29816129ce565b93506020850135612d39816129ce565b925060408501359150606085013567ffffffffffffffff811115612d5c57600080fd5b8501601f81018713612d6d57600080fd5b612d7c87823560208401612a96565b91505092959194509250565b60008060408385031215612d9b57600080fd5b8235612da6816129ce565b91506020830135612db6816129ce565b809150509250929050565b600181811c90821680612dd557607f821691505b6020821081141561262857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612e2657612e26612df6565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612e5057612e50612e2b565b500490565b60208082526016908201527522a9219b9918a2b73ab69d1037bbb732b91034b7b7b160511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612eaf57612eaf612df6565b5060010190565b60008219821115612ec957612ec9612df6565b500190565b600061ffff80831681811415612ee657612ee6612df6565b6001019392505050565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b81811015612f3d57845161ffff1683529383019391830191600101612f1d565b5090979650505050505050565b60008451612f5c81846020890161294a565b845190830190612f7081836020890161294a565b8451910190612f8381836020880161294a565b0195945050505050565b600082821015612f9f57612f9f612df6565b500390565b600082612fb357612fb3612e2b565b500690565b600060208284031215612fca57600080fd5b8151610e4e816129ce565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600061ffff8084168061303c5761303c612e2b565b92169190910692915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061307b90830184612976565b9695505050505050565b60006020828403121561309757600080fd5b8151610e4e8161291756fea26469706673582212202deedb7053c180df70897fde2f43616cd7e09819ccb12b5be57d2a636766a17264736f6c634300080a0033

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

000000000000000000000000bdfbf8c6ab5967fa3e74e43afa3a2073e3487404000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _grace (address): 0xBdfBF8C6aB5967FA3E74e43AfA3a2073E3487404
Arg [1] : _initBaseURI (string):

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000bdfbf8c6ab5967fa3e74e43afa3a2073e3487404
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000


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.