ETH Price: $1,618.95 (-1.13%)
Gas: 10 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60046101137053712021-11-28 23:56:48661 days 8 hrs ago1638143808IN
 Create: Traits
0 ETH0.5554652200

Advanced mode:
Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Traits

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : Traits.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./interfaces/ITraits.sol";
import "./interfaces/IWnD.sol";

contract Traits is Ownable, ITraits {

  using Strings for uint256;

  // struct to store each trait's data for metadata and rendering
  struct Trait {
    string name;
    string png;
  }

  // mapping from trait type (index) to its name
  string[9] private _traitTypes = [
    "Body",
    "Head",
    "Spell",
    "Eye",
    "Neck",
    "Mouth",
    "Wings",
    "Wand",
    "Rank"
  ];
  // storage of each traits name and base64 PNG data
  mapping(uint8 => mapping(uint8 => Trait)) public traitData;
  // mapping from rankIndex to its score
  string[4] private _ranks = [
    "8",
    "7",
    "6",
    "5"
  ];

  IWnD public wndNFT;

  constructor() {}

  /** ADMIN */

  function setWnD(address _wndNFT) external onlyOwner {
    wndNFT = IWnD(_wndNFT);
  }

  /**
   * administrative to upload the names and images associated with each trait
   * @param traitType the trait type to upload the traits for (see traitTypes for a mapping)
   * @param traits the names and base64 encoded PNGs for each trait
   */
  function uploadTraits(uint8 traitType, uint8[] calldata traitIds, Trait[] calldata traits) external onlyOwner {
    require(traitIds.length == traits.length, "Mismatched inputs");
    for (uint i = 0; i < traits.length; i++) {
      traitData[traitType][traitIds[i]] = Trait(
        traits[i].name,
        traits[i].png
      );
    }
  }

  /** RENDER */

  /**
   * generates an <image> element using base64 encoded PNGs
   * @param trait the trait storing the PNG data
   * @return the <image> element
   */
  function drawTrait(Trait memory trait) internal pure returns (string memory) {
    return string(abi.encodePacked(
      '<image x="4" y="4" width="32" height="32" image-rendering="pixelated" preserveAspectRatio="xMidYMid" xlink:href="data:image/png;base64,',
      trait.png,
      '"/>'
    ));
  }

  /**
   * generates an entire SVG by composing multiple <image> elements of PNGs
   * @param tokenId the ID of the token to generate an SVG for
   * @return a valid SVG of the Wizard / Dragon
   */
  function drawSVG(uint256 tokenId) public view returns (string memory) {
    IWnD.WizardDragon memory s = wndNFT.getTokenTraits(tokenId);
    uint8 shift = s.isWizard ? 0 : 9;

    // Trait data indexes 0 - 7 are reserved for Wizards
    // Trait data indexew 9 - 17 are reserved for Dragons.
    string memory svgString = string(abi.encodePacked(
      drawTrait(traitData[0 + shift][s.body]),
      s.isWizard ? drawTrait(traitData[1 + shift][s.head]) : drawTrait(traitData[1 + shift][s.rankIndex]),
      s.isWizard ? drawTrait(traitData[2 + shift][s.spell]) : '',
      drawTrait(traitData[3 + shift][s.eyes]),
      s.isWizard ? drawTrait(traitData[4 + shift][s.neck]) : '',
      drawTrait(traitData[5 + shift][s.mouth]),
      s.isWizard ? '' : drawTrait(traitData[6 + shift][s.tail]),
      s.isWizard ? drawTrait(traitData[7 + shift][s.wand]) : ''
    ));

    return string(abi.encodePacked(
      '<svg id="wndNFT" width="100%" height="100%" version="1.1" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">',
      svgString,
      "</svg>"
    ));
  }

  /**
   * generates an attribute for the attributes array in the ERC721 metadata standard
   * @param traitType the trait type to reference as the metadata key
   * @param value the token's trait associated with the key
   * @return a JSON dictionary for the single attribute
   */
  function attributeForTypeAndValue(string memory traitType, string memory value) internal pure returns (string memory) {
    return string(abi.encodePacked(
      '{"trait_type":"',
      traitType,
      '","value":"',
      value,
      '"}'
    ));
  }

  /**
   * generates an array composed of all the individual traits and values
   * @param tokenId the ID of the token to compose the metadata for
   * @return a JSON array of all of the attributes for given token ID
   */
  function compileAttributes(uint256 tokenId) public view returns (string memory) {
    IWnD.WizardDragon memory s = wndNFT.getTokenTraits(tokenId);
    string memory traits;
    if (s.isWizard) {
      traits = string(abi.encodePacked(
        attributeForTypeAndValue(_traitTypes[0], traitData[0][s.body].name),',',
        attributeForTypeAndValue(_traitTypes[1], traitData[1][s.head].name),',',
        attributeForTypeAndValue(_traitTypes[2], traitData[2][s.spell].name),',',
        attributeForTypeAndValue(_traitTypes[3], traitData[3][s.eyes].name),',',
        attributeForTypeAndValue(_traitTypes[4], traitData[4][s.neck].name),',',
        attributeForTypeAndValue(_traitTypes[5], traitData[5][s.mouth].name),',',
        attributeForTypeAndValue(_traitTypes[7], traitData[7][s.wand].name),','
      ));
    } else {
      traits = string(abi.encodePacked(
        attributeForTypeAndValue(_traitTypes[0], traitData[9][s.body].name),',',
        attributeForTypeAndValue(_traitTypes[1], traitData[10][s.rankIndex].name),',',
        attributeForTypeAndValue(_traitTypes[3], traitData[12][s.eyes].name),',',
        attributeForTypeAndValue(_traitTypes[5], traitData[14][s.mouth].name),',',
        attributeForTypeAndValue(_traitTypes[6], traitData[15][s.tail].name),',',
        attributeForTypeAndValue("Rank Score", _ranks[s.rankIndex]),','
      ));
    }
    return string(abi.encodePacked(
      '[',
      traits,
      '{"trait_type":"Generation","value":',
      tokenId <= wndNFT.getPaidTokens() ? '"Gen 0"' : '"Gen 1"',
      '},{"trait_type":"Type","value":',
      s.isWizard ? '"Wizard"' : '"Dragon"',
      '}]'
    ));
  }

  /**
   * generates a base64 encoded metadata response without referencing off-chain content
   * @param tokenId the ID of the token to generate the metadata for
   * @return a base64 encoded JSON dictionary of the token's metadata and SVG
   */
  function tokenURI(uint256 tokenId) public view override returns (string memory) {
    IWnD.WizardDragon memory s = wndNFT.getTokenTraits(tokenId);

    string memory metadata = string(abi.encodePacked(
      '{"name": "',
      s.isWizard ? 'Wizard #' : 'Dragon #',
      tokenId.toString(),
      '", "description": "Thousands of Wizards and Dragons compete in a tower in the metaverse. A tempting prize of $GP awaits, with deadly high stakes. All the metadata and images are generated and stored 100% on-chain. No IPFS. NO API. Just the Ethereum blockchain.", "image": "data:image/svg+xml;base64,',
      base64(bytes(drawSVG(tokenId))),
      '", "attributes":',
      compileAttributes(tokenId),
      "}"
    ));

    return string(abi.encodePacked(
      "data:application/json;base64,",
      base64(bytes(metadata))
    ));
  }

  /** BASE 64 - Written by Brech Devos */
  
  string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

  function base64(bytes memory data) internal pure returns (string memory) {
    if (data.length == 0) return '';
    
    // load the table into memory
    string memory table = TABLE;

    // multiply by 4/3 rounded up
    uint256 encodedLen = 4 * ((data.length + 2) / 3);

    // add some extra buffer at the end required for the writing
    string memory result = new string(encodedLen + 32);

    assembly {
      // set the actual output length
      mstore(result, encodedLen)
      
      // prepare the lookup table
      let tablePtr := add(table, 1)
      
      // input ptr
      let dataPtr := data
      let endPtr := add(dataPtr, mload(data))
      
      // result ptr, jump over length
      let resultPtr := add(result, 32)
      
      // run over the input, 3 bytes at a time
      for {} lt(dataPtr, endPtr) {}
      {
          dataPtr := add(dataPtr, 3)
          
          // read 3 bytes
          let input := mload(dataPtr)
          
          // write 4 characters
          mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
          resultPtr := add(resultPtr, 1)
          mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
          resultPtr := add(resultPtr, 1)
          mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
          resultPtr := add(resultPtr, 1)
          mstore(resultPtr, shl(248, mload(add(tablePtr, and(        input,  0x3F)))))
          resultPtr := add(resultPtr, 1)
      }
      
      // padding with '='
      switch mod(mload(data), 3)
      case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
      case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
    }
    
    return result;
  }
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 3 of 9 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 4 of 9 : ITraits.sol
// SPDX-License-Identifier: MIT LICENSE 

pragma solidity ^0.8.0;

interface ITraits {
  function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 5 of 9 : IWnD.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface IWnD is IERC721Enumerable {

    // game data storage
    struct WizardDragon {
        bool isWizard;
        uint8 body;
        uint8 head;
        uint8 spell;
        uint8 eyes;
        uint8 neck;
        uint8 mouth;
        uint8 wand;
        uint8 tail;
        uint8 rankIndex;
    }

    function minted() external returns (uint16);
    function updateOriginAccess() external;
    function mint(address recipient, uint256 seed) external;
    function burn(uint256 tokenId) external;
    function getMaxTokens() external view returns (uint256);
    function getPaidTokens() external view returns (uint256);
    function getTokenTraits(uint256 tokenId) external view returns (WizardDragon memory);
    function tokenTraits(uint256 tokenId) external view returns (bool a, uint8 b, uint8 c, uint8 d, uint8 e, uint8 f, uint8 g, uint8 h, uint8 i, uint8 j);
  
}

File 6 of 9 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 7 of 9 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"compileAttributes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"drawSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wndNFT","type":"address"}],"name":"setWnD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"traitData","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"png","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"traitType","type":"uint8"},{"internalType":"uint8[]","name":"traitIds","type":"uint8[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"png","type":"string"}],"internalType":"struct Traits.Trait[]","name":"traits","type":"tuple[]"}],"name":"uploadTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wndNFT","outputs":[{"internalType":"contract IWnD","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60046101a081815263426f647960e01b6101c05260809081526101e0828152631219585960e21b6102005260a05260056102208181526414dc195b1b60da1b6102405260c05260036102609081526245796560e81b6102805260e0526102a0838152634e65636b60e01b6102c052610100526102e08181526409adeeae8d60db1b61030052610120526103209081526457696e677360d81b61034052610140526103608281526315d85b9960e21b61038052610160526103e06040526103a09182526352616e6b60e01b6103c05261018091909152620000e4906001906009620001d6565b506040805160c081018252600160808201818152600760fb1b60a0840152825282518084018452818152603760f81b6020828101919091528084019190915283518085018552828152601b60f91b81830152838501528351808501909452908352603560f81b9083015260608101919091526200016690600b9060046200022d565b503480156200017457600080fd5b50620001803362000186565b620003b4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82600981019282156200021b579160200282015b828111156200021b57825180516200020a91849160209091019062000272565b5091602001919060010190620001ea565b5062000229929150620002fd565b5090565b82600481019282156200021b579160200282015b828111156200021b57825180516200026191849160209091019062000272565b509160200191906001019062000241565b828054620002809062000377565b90600052602060002090601f016020900481019282620002a45760008555620002ef565b82601f10620002bf57805160ff1916838001178555620002ef565b82800160010185558215620002ef579182015b82811115620002ef578251825591602001919060010190620002d2565b50620002299291506200031e565b808211156200022957600062000314828262000335565b50600101620002fd565b5b808211156200022957600081556001016200031f565b508054620003439062000377565b6000825580601f1062000354575050565b601f0160209004906000526020600020908101906200037491906200031e565b50565b600181811c908216806200038c57607f821691505b60208210811415620003ae57634e487b7160e01b600052602260045260246000fd5b50919050565b612b4380620003c46000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80639bf2ee35116100665780639bf2ee3514610121578063c87b56dd14610142578063d93ae3d914610155578063f2fde38b14610168578063f8b2a46e1461017b57600080fd5b80631eda66fa146100a357806368dba5e5146100b8578063715018a6146100e15780637abecb86146100e95780638da5cb5b146100fc575b600080fd5b6100b66100b1366004611ea0565b61018e565b005b6100cb6100c6366004611f95565b6101e3565b6040516100d8919061285f565b60405180910390f35b6100b6610f49565b6100cb6100f7366004611f95565b610f7f565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100d8565b61013461012f366004612061565b61153c565b6040516100d8929190612872565b6100cb610150366004611f95565b611673565b6100b6610163366004611fe1565b6117ab565b6100b6610176366004611ea0565b6119c1565b600f54610109906001600160a01b031681565b6000546001600160a01b031633146101c15760405162461bcd60e51b81526004016101b8906128a0565b60405180910390fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b15801561022e57600080fd5b505afa158015610242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102669190611ece565b90506060816000015115610931576103d26001600001805461028790612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546102b390612a28565b80156103005780601f106102d557610100808354040283529160200191610300565b820191906000526020600020905b8154815290600101906020018083116102e357829003601f168201915b50506000808052600a60209081528881015160ff1682527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3905260409020805490935061034f92509050612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461037b90612a28565b80156103c85780601f1061039d576101008083540402835291602001916103c8565b820191906000526020600020905b8154815290600101906020018083116103ab57829003601f168201915b5050505050611a5c565b6104af6001800180546103e490612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461041090612a28565b801561045d5780601f106104325761010080835404028352916020019161045d565b820191906000526020600020905b81548152906001019060200180831161044057829003601f168201915b505060016000908152600a602090815260408a81015160ff1683527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091529020805490935061034f92509050612a28565b61058d600160020180546104c290612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546104ee90612a28565b801561053b5780601f106105105761010080835404028352916020019161053b565b820191906000526020600020905b81548152906001019060200180831161051e57829003601f168201915b505060026000908152600a602090815260608b015160ff1682527fbff4442b8ed600beeb8e26b1279a0f0d14c6edfaec26d968ee13c86f7d4c2ba8905260409020805490935061034f92509050612a28565b61066b600160030180546105a090612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546105cc90612a28565b80156106195780601f106105ee57610100808354040283529160200191610619565b820191906000526020600020905b8154815290600101906020018083116105fc57829003601f168201915b505060036000908152600a602090815260808c015160ff1682527fa856840544dc26124927add067d799967eac11be13e14d82cc281ea46fa39759905260409020805490935061034f92509050612a28565b6107496001600401805461067e90612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546106aa90612a28565b80156106f75780601f106106cc576101008083540402835291602001916106f7565b820191906000526020600020905b8154815290600101906020018083116106da57829003601f168201915b505060046000908152600a602090815260a08d015160ff1682527fe1eb2b2161a492c07c5a334e48012567cba93ec021043f53c1955516a3c5a841905260409020805490935061034f92509050612a28565b6108276001600501805461075c90612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461078890612a28565b80156107d55780601f106107aa576101008083540402835291602001916107d5565b820191906000526020600020905b8154815290600101906020018083116107b857829003601f168201915b505060056000908152600a602090815260c08e015160ff1682527ff35035bc2b01d44bd35a1dcdc552315cffb73da35cfd60570b7b777f98036f9f905260409020805490935061034f92509050612a28565b6109056001600701805461083a90612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461086690612a28565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b505060076000908152600a602090815260e08f015160ff1682527f22e39f61d1e4986b4f116cea9067f62cc77d74dff1780ae9c8b5166d1dd28829905260409020805490935061034f92509050612a28565b60405160200161091b979695949392919061224b565b6040516020818303038152906040529050610e08565b610a0e6001600001805461094490612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461097090612a28565b80156109bd5780601f10610992576101008083540402835291602001916109bd565b820191906000526020600020905b8154815290600101906020018083116109a057829003601f168201915b505060096000908152600a60209081528881015160ff1682527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb284905260409020805490935061034f92509050612a28565b610aeb600180018054610a2090612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4c90612a28565b8015610a995780601f10610a6e57610100808354040283529160200191610a99565b820191906000526020600020905b815481529060010190602001808311610a7c57829003601f168201915b5050600a600081815260209182526101208a015160ff1681527f3e57c57b03145299956be61386751c5b285d460d484d5c2403a6be086d9d6baa90915260409020805490935061034f92509050612a28565b610bc960016003018054610afe90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2a90612a28565b8015610b775780601f10610b4c57610100808354040283529160200191610b77565b820191906000526020600020905b815481529060010190602001808311610b5a57829003601f168201915b5050600c6000908152600a602090815260808b015160ff1682527f80283cfdc74729ecb224822f7a02837fb1d52df7cc3435ae86bb6e025f6e06fa905260409020805490935061034f92509050612a28565b610ca760016005018054610bdc90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0890612a28565b8015610c555780601f10610c2a57610100808354040283529160200191610c55565b820191906000526020600020905b815481529060010190602001808311610c3857829003601f168201915b5050600e6000908152600a602090815260c08c015160ff1682527f95e5396155afd2ec086edc0518f3069d6ba131fb95388521b3342aebbda916f0905260409020805490935061034f92509050612a28565b610d8660016006018054610cba90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce690612a28565b8015610d335780601f10610d0857610100808354040283529160200191610d33565b820191906000526020600020905b815481529060010190602001808311610d1657829003601f168201915b5050600f6000908152600a60209081526101008d015160ff1682527fcc8dc71342d3ea7c205feea2d040f8f577a07edda8d6b43a4daf11d5e7fd280a905260409020805490935061034f92509050612a28565b610de16040518060400160405280600a81526020016952616e6b2053636f726560b01b815250600b89610120015160ff1660048110610dd557634e487b7160e01b600052603260045260246000fd5b01805461034f90612a28565b604051602001610df696959493929190612186565b60405160208183030381529060405290505b600f5460408051630803163f60e31b8152905183926001600160a01b031691634018b1f8916004808301926020929190829003018186803b158015610e4c57600080fd5b505afa158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190611fad565b851115610eb057604051806040016040528060078152602001661123b2b710189160c91b815250610ed1565b604051806040016040528060078152602001661123b2b710181160c91b8152505b8351610efd576040518060400160405280600881526020016711223930b3b7b71160c11b815250610f1f565b60405180604001604052806008815260200167112bb4bd30b9321160c11b8152505b604051602001610f319392919061255c565b60405160208183030381529060405292505050919050565b6000546001600160a01b03163314610f735760405162461bcd60e51b81526004016101b8906128a0565b610f7d6000611a88565b565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b158015610fca57600080fd5b505afa158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190611ece565b905060008160000151611016576009611019565b60005b90506000611190600a8261102d8582612989565b60ff1660ff1681526020019081526020016000206000856020015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546110a390612a28565b80156110f05780601f106110c5576101008083540402835291602001916110f0565b820191906000526020600020905b8154815290600101906020018083116110d357829003601f168201915b5050505050815260200160018201805461110990612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461113590612a28565b80156111825780601f1061115757610100808354040283529160200191611182565b820191906000526020600020905b81548152906001019060200180831161116557829003601f168201915b505050505081525050611ad8565b83516111f8576111f3600a60006111a8866001612989565b60ff1660ff168152602001908152602001600020600086610120015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611254565b611254600a600061120a866001612989565b60ff1660ff1681526020019081526020016000206000866040015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b845161126f57604051806020016040528060008152506112cb565b6112cb600a6000611281876002612989565b60ff1660ff1681526020019081526020016000206000876060015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611327600a60006112dd886003612989565b60ff1660ff1681526020019081526020016000206000886080015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b8651611342576040518060200160405280600081525061139e565b61139e600a6000611354896004612989565b60ff1660ff16815260200190815260200160002060008960a0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b6113fa600a60006113b08a6005612989565b60ff1660ff16815260200190815260200160002060008a60c0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b88516114625761145d600a60006114128b6006612989565b60ff1660ff16815260200190815260200160002060008b610100015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611473565b604051806020016040528060008152505b895161148e57604051806020016040528060008152506114ea565b6114ea600a60006114a08c6007612989565b60ff1660ff16815260200190815260200160002060008c60e0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b6040516020016115019897969594939291906120e1565b604051602081830303815290604052905080604051602001611523919061232a565b6040516020818303038152906040529350505050919050565b600a60209081526000928352604080842090915290825290208054819061156290612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461158e90612a28565b80156115db5780601f106115b0576101008083540402835291602001916115db565b820191906000526020600020905b8154815290600101906020018083116115be57829003601f168201915b5050505050908060010180546115f090612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461161c90612a28565b80156116695780601f1061163e57610100808354040283529160200191611669565b820191906000526020600020905b81548152906001019060200180831161164c57829003601f168201915b5050505050905082565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b1580156116be57600080fd5b505afa1580156116d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f69190611ece565b9050600081600001516117295760405180604001604052806008815260200167447261676f6e202360c01b81525061174b565b6040518060400160405280600881526020016757697a617264202360c01b8152505b61175485611b05565b61176561176087610f7f565b611c27565b61176e876101e3565b604051602001611781949392919061261b565b604051602081830303815290604052905061179b81611c27565b604051602001610f31919061281a565b6000546001600160a01b031633146117d55760405162461bcd60e51b81526004016101b8906128a0565b8281146118185760405162461bcd60e51b81526020600482015260116024820152704d69736d61746368656420696e7075747360781b60448201526064016101b8565b60005b818110156119b957604051806040016040528084848481811061184e57634e487b7160e01b600052603260045260246000fd5b9050602002810190611860919061291a565b61186a90806128d5565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020018484848181106118c457634e487b7160e01b600052603260045260246000fd5b90506020028101906118d6919061291a565b6118e49060208101906128d5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505060ff89168152600a60205260408120915087878581811061194b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119609190611fc5565b60ff16815260208082019290925260400160002082518051919261198992849290910190611d9d565b5060208281015180516119a29260018501920190611d9d565b5090505080806119b190612a63565b91505061181b565b505050505050565b6000546001600160a01b031633146119eb5760405162461bcd60e51b81526004016101b8906128a0565b6001600160a01b038116611a505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101b8565b611a5981611a88565b50565b60608282604051602001611a719291906124eb565b604051602081830303815290604052905092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608160200151604051602001611aef9190612417565b6040516020818303038152906040529050919050565b606081611b295750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b535780611b3d81612a63565b9150611b4c9050600a836129ae565b9150611b2d565b60008167ffffffffffffffff811115611b7c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611ba6576020820181803683370190505b5090505b8415611c1f57611bbb6001836129e1565b9150611bc8600a86612a7e565b611bd3906030612971565b60f81b818381518110611bf657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611c18600a866129ae565b9450611baa565b949350505050565b6060815160001415611c4757505060408051602081019091526000815290565b6000604051806060016040528060408152602001612ace6040913990506000600384516002611c769190612971565b611c8091906129ae565b611c8b9060046129c2565b90506000611c9a826020612971565b67ffffffffffffffff811115611cc057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611cea576020820181803683370190505b509050818152600183018586518101602084015b81831015611d585760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611cfe565b600389510660018114611d725760028114611d8357611d8f565b613d3d60f01b600119830152611d8f565b603d60f81b6000198301525b509398975050505050505050565b828054611da990612a28565b90600052602060002090601f016020900481019282611dcb5760008555611e11565b82601f10611de457805160ff1916838001178555611e11565b82800160010185558215611e11579182015b82811115611e11578251825591602001919060010190611df6565b50611e1d929150611e21565b5090565b5b80821115611e1d5760008155600101611e22565b60008083601f840112611e47578182fd5b50813567ffffffffffffffff811115611e5e578182fd5b6020830191508360208260051b8501011115611e7957600080fd5b9250929050565b80518015158114611e9057600080fd5b919050565b8051611e9081612abe565b600060208284031215611eb1578081fd5b81356001600160a01b0381168114611ec7578182fd5b9392505050565b60006101408284031215611ee0578081fd5b611ee8612939565b611ef183611e80565b8152611eff60208401611e95565b6020820152611f1060408401611e95565b6040820152611f2160608401611e95565b6060820152611f3260808401611e95565b6080820152611f4360a08401611e95565b60a0820152611f5460c08401611e95565b60c0820152611f6560e08401611e95565b60e0820152610100611f78818501611e95565b90820152610120611f8a848201611e95565b908201529392505050565b600060208284031215611fa6578081fd5b5035919050565b600060208284031215611fbe578081fd5b5051919050565b600060208284031215611fd6578081fd5b8135611ec781612abe565b600080600080600060608688031215611ff8578081fd5b853561200381612abe565b9450602086013567ffffffffffffffff8082111561201f578283fd5b61202b89838a01611e36565b90965094506040880135915080821115612043578283fd5b5061205088828901611e36565b969995985093965092949392505050565b60008060408385031215612073578182fd5b823561207e81612abe565b9150602083013561208e81612abe565b809150509250929050565b600081518084526120b18160208601602086016129f8565b601f01601f19169290920160200192915050565b600081516120d78185602086016129f8565b9290920192915050565b6000895160206120f48285838f016129f8565b8a51918401916121078184848f016129f8565b8a519201916121198184848e016129f8565b895192019161212b8184848d016129f8565b885192019161213d8184848c016129f8565b875192019161214f8184848b016129f8565b86519201916121618184848a016129f8565b855192019161217381848489016129f8565b919091019b9a5050505050505050505050565b6000875160206121998285838d016129f8565b8184019150600b60fa1b80835289516121b88160018601858e016129f8565b6001930192830181905288516121d48160028601858d016129f8565b6002930192830181905287516121f08160038601858c016129f8565b60039301928301819052865161220c8160048601858b016129f8565b6004930192830152845161222681600585018489016129f8565b61223c600582850101600b60fa1b815260010190565b9b9a5050505050505050505050565b60008851602061225e8285838e016129f8565b8184019150600b60fa1b8083528a5161227d8160018601858f016129f8565b6001930192830181905289516122998160028601858e016129f8565b6002930192830181905288516122b58160038601858d016129f8565b6003930192830181905287516122d18160048601858c016129f8565b600493019283015285516122eb8160058501848a016129f8565b61231a61230d612307600584870101600b60fa1b815260010190565b886120c5565b600b60fa1b815260010190565b9c9b505050505050505050505050565b7f3c7376672069643d22776e644e4654222077696474683d22313030252220686581527f696768743d2231303025222076657273696f6e3d22312e31222076696577426f60208201527f783d223020302034302034302220786d6c6e733d22687474703a2f2f7777772e60408201527f77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687460608201527f74703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e000000006080820152600082516123fa81609c8501602087016129f8565b651e17b9bb339f60d11b609c93909101928301525060a201919050565b7f3c696d61676520783d22342220793d2234222077696474683d2233322220686581527f696768743d2233322220696d6167652d72656e646572696e673d22706978656c60208201527f6174656422207072657365727665417370656374526174696f3d22784d69645960408201527f4d69642220786c696e6b3a687265663d22646174613a696d6167652f706e673b60608201526618985cd94d8d0b60ca1b6080820152600082516124d18160878501602087016129f8565b6211179f60e91b6087939091019283015250608a01919050565b6e3d913a3930b4ba2fba3cb832911d1160891b8152825160009061251681600f8501602088016129f8565b6a1116113b30b63ab2911d1160a91b600f91840191820152835161254181601a8401602088016129f8565b61227d60f01b601a9290910191820152601c01949350505050565b605b60f81b8152600084516125788160018501602089016129f8565b7f7b2274726169745f74797065223a2247656e65726174696f6e222c2276616c756001918401918201526232911d60e91b602182015284516125c18160248401602089016129f8565b7f7d2c7b2274726169745f74797065223a2254797065222c2276616c7565223a006024929091019182015283516125ff8160438401602088016129f8565b617d5d60f01b6043929091019182015260450195945050505050565b693d913730b6b2911d101160b11b8152845160009061264181600a850160208a016129f8565b85519083019061265881600a840160208a016129f8565b7f222c20226465736372697074696f6e223a202254686f7573616e6473206f6620600a92909101918201527f57697a6172647320616e6420447261676f6e7320636f6d7065746520696e2061602a8201527f20746f77657220696e20746865206d65746176657273652e20412074656d7074604a8201527f696e67207072697a65206f6620244750206177616974732c2077697468206465606a8201527f61646c792068696768207374616b65732e20416c6c20746865206d6574616461608a8201527f746120616e6420696d61676573206172652067656e65726174656420616e642060aa8201527f73746f7265642031303025206f6e2d636861696e2e204e6f20495046532e204e60ca8201527f4f204150492e204a7573742074686520457468657265756d20626c6f636b636860ea8201527f61696e2e222c2022696d616765223a2022646174613a696d6167652f7376672b61010a8201526a1e1b5b0ed8985cd94d8d0b60aa1b61012a82015261280f6128026127fc6127e06101358501896120c5565b6f1116101130ba3a3934b13aba32b9911d60811b815260100190565b866120c5565b607d60f81b815260010190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161285281601d8501602087016129f8565b91909101601d0192915050565b602081526000611ec76020830184612099565b6040815260006128856040830185612099565b82810360208401526128978185612099565b95945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e198436030181126128eb578283fd5b83018035915067ffffffffffffffff821115612905578283fd5b602001915036819003821315611e7957600080fd5b60008235603e1983360301811261292f578182fd5b9190910192915050565b604051610140810167ffffffffffffffff8111828210171561296b57634e487b7160e01b600052604160045260246000fd5b60405290565b6000821982111561298457612984612a92565b500190565b600060ff821660ff84168060ff038211156129a6576129a6612a92565b019392505050565b6000826129bd576129bd612aa8565b500490565b60008160001904831182151516156129dc576129dc612a92565b500290565b6000828210156129f3576129f3612a92565b500390565b60005b83811015612a135781810151838201526020016129fb565b83811115612a22576000848401525b50505050565b600181811c90821680612a3c57607f821691505b60208210811415612a5d57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a7757612a77612a92565b5060010190565b600082612a8d57612a8d612aa8565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60ff81168114611a5957600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212208a8f41291ce7c0dafc05354bc5b370e54c5299992e4877e9b914fbe8cfba00f064736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80639bf2ee35116100665780639bf2ee3514610121578063c87b56dd14610142578063d93ae3d914610155578063f2fde38b14610168578063f8b2a46e1461017b57600080fd5b80631eda66fa146100a357806368dba5e5146100b8578063715018a6146100e15780637abecb86146100e95780638da5cb5b146100fc575b600080fd5b6100b66100b1366004611ea0565b61018e565b005b6100cb6100c6366004611f95565b6101e3565b6040516100d8919061285f565b60405180910390f35b6100b6610f49565b6100cb6100f7366004611f95565b610f7f565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100d8565b61013461012f366004612061565b61153c565b6040516100d8929190612872565b6100cb610150366004611f95565b611673565b6100b6610163366004611fe1565b6117ab565b6100b6610176366004611ea0565b6119c1565b600f54610109906001600160a01b031681565b6000546001600160a01b031633146101c15760405162461bcd60e51b81526004016101b8906128a0565b60405180910390fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b15801561022e57600080fd5b505afa158015610242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102669190611ece565b90506060816000015115610931576103d26001600001805461028790612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546102b390612a28565b80156103005780601f106102d557610100808354040283529160200191610300565b820191906000526020600020905b8154815290600101906020018083116102e357829003601f168201915b50506000808052600a60209081528881015160ff1682527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3905260409020805490935061034f92509050612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461037b90612a28565b80156103c85780601f1061039d576101008083540402835291602001916103c8565b820191906000526020600020905b8154815290600101906020018083116103ab57829003601f168201915b5050505050611a5c565b6104af6001800180546103e490612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461041090612a28565b801561045d5780601f106104325761010080835404028352916020019161045d565b820191906000526020600020905b81548152906001019060200180831161044057829003601f168201915b505060016000908152600a602090815260408a81015160ff1683527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc79091529020805490935061034f92509050612a28565b61058d600160020180546104c290612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546104ee90612a28565b801561053b5780601f106105105761010080835404028352916020019161053b565b820191906000526020600020905b81548152906001019060200180831161051e57829003601f168201915b505060026000908152600a602090815260608b015160ff1682527fbff4442b8ed600beeb8e26b1279a0f0d14c6edfaec26d968ee13c86f7d4c2ba8905260409020805490935061034f92509050612a28565b61066b600160030180546105a090612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546105cc90612a28565b80156106195780601f106105ee57610100808354040283529160200191610619565b820191906000526020600020905b8154815290600101906020018083116105fc57829003601f168201915b505060036000908152600a602090815260808c015160ff1682527fa856840544dc26124927add067d799967eac11be13e14d82cc281ea46fa39759905260409020805490935061034f92509050612a28565b6107496001600401805461067e90612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546106aa90612a28565b80156106f75780601f106106cc576101008083540402835291602001916106f7565b820191906000526020600020905b8154815290600101906020018083116106da57829003601f168201915b505060046000908152600a602090815260a08d015160ff1682527fe1eb2b2161a492c07c5a334e48012567cba93ec021043f53c1955516a3c5a841905260409020805490935061034f92509050612a28565b6108276001600501805461075c90612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461078890612a28565b80156107d55780601f106107aa576101008083540402835291602001916107d5565b820191906000526020600020905b8154815290600101906020018083116107b857829003601f168201915b505060056000908152600a602090815260c08e015160ff1682527ff35035bc2b01d44bd35a1dcdc552315cffb73da35cfd60570b7b777f98036f9f905260409020805490935061034f92509050612a28565b6109056001600701805461083a90612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461086690612a28565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b505060076000908152600a602090815260e08f015160ff1682527f22e39f61d1e4986b4f116cea9067f62cc77d74dff1780ae9c8b5166d1dd28829905260409020805490935061034f92509050612a28565b60405160200161091b979695949392919061224b565b6040516020818303038152906040529050610e08565b610a0e6001600001805461094490612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461097090612a28565b80156109bd5780601f10610992576101008083540402835291602001916109bd565b820191906000526020600020905b8154815290600101906020018083116109a057829003601f168201915b505060096000908152600a60209081528881015160ff1682527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb284905260409020805490935061034f92509050612a28565b610aeb600180018054610a2090612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4c90612a28565b8015610a995780601f10610a6e57610100808354040283529160200191610a99565b820191906000526020600020905b815481529060010190602001808311610a7c57829003601f168201915b5050600a600081815260209182526101208a015160ff1681527f3e57c57b03145299956be61386751c5b285d460d484d5c2403a6be086d9d6baa90915260409020805490935061034f92509050612a28565b610bc960016003018054610afe90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2a90612a28565b8015610b775780601f10610b4c57610100808354040283529160200191610b77565b820191906000526020600020905b815481529060010190602001808311610b5a57829003601f168201915b5050600c6000908152600a602090815260808b015160ff1682527f80283cfdc74729ecb224822f7a02837fb1d52df7cc3435ae86bb6e025f6e06fa905260409020805490935061034f92509050612a28565b610ca760016005018054610bdc90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0890612a28565b8015610c555780601f10610c2a57610100808354040283529160200191610c55565b820191906000526020600020905b815481529060010190602001808311610c3857829003601f168201915b5050600e6000908152600a602090815260c08c015160ff1682527f95e5396155afd2ec086edc0518f3069d6ba131fb95388521b3342aebbda916f0905260409020805490935061034f92509050612a28565b610d8660016006018054610cba90612a28565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce690612a28565b8015610d335780601f10610d0857610100808354040283529160200191610d33565b820191906000526020600020905b815481529060010190602001808311610d1657829003601f168201915b5050600f6000908152600a60209081526101008d015160ff1682527fcc8dc71342d3ea7c205feea2d040f8f577a07edda8d6b43a4daf11d5e7fd280a905260409020805490935061034f92509050612a28565b610de16040518060400160405280600a81526020016952616e6b2053636f726560b01b815250600b89610120015160ff1660048110610dd557634e487b7160e01b600052603260045260246000fd5b01805461034f90612a28565b604051602001610df696959493929190612186565b60405160208183030381529060405290505b600f5460408051630803163f60e31b8152905183926001600160a01b031691634018b1f8916004808301926020929190829003018186803b158015610e4c57600080fd5b505afa158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190611fad565b851115610eb057604051806040016040528060078152602001661123b2b710189160c91b815250610ed1565b604051806040016040528060078152602001661123b2b710181160c91b8152505b8351610efd576040518060400160405280600881526020016711223930b3b7b71160c11b815250610f1f565b60405180604001604052806008815260200167112bb4bd30b9321160c11b8152505b604051602001610f319392919061255c565b60405160208183030381529060405292505050919050565b6000546001600160a01b03163314610f735760405162461bcd60e51b81526004016101b8906128a0565b610f7d6000611a88565b565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b158015610fca57600080fd5b505afa158015610fde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190611ece565b905060008160000151611016576009611019565b60005b90506000611190600a8261102d8582612989565b60ff1660ff1681526020019081526020016000206000856020015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b80601f01602080910402602001604051908101604052809291908181526020018280546110a390612a28565b80156110f05780601f106110c5576101008083540402835291602001916110f0565b820191906000526020600020905b8154815290600101906020018083116110d357829003601f168201915b5050505050815260200160018201805461110990612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461113590612a28565b80156111825780601f1061115757610100808354040283529160200191611182565b820191906000526020600020905b81548152906001019060200180831161116557829003601f168201915b505050505081525050611ad8565b83516111f8576111f3600a60006111a8866001612989565b60ff1660ff168152602001908152602001600020600086610120015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611254565b611254600a600061120a866001612989565b60ff1660ff1681526020019081526020016000206000866040015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b845161126f57604051806020016040528060008152506112cb565b6112cb600a6000611281876002612989565b60ff1660ff1681526020019081526020016000206000876060015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611327600a60006112dd886003612989565b60ff1660ff1681526020019081526020016000206000886080015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b8651611342576040518060200160405280600081525061139e565b61139e600a6000611354896004612989565b60ff1660ff16815260200190815260200160002060008960a0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b6113fa600a60006113b08a6005612989565b60ff1660ff16815260200190815260200160002060008a60c0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b88516114625761145d600a60006114128b6006612989565b60ff1660ff16815260200190815260200160002060008b610100015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b611473565b604051806020016040528060008152505b895161148e57604051806020016040528060008152506114ea565b6114ea600a60006114a08c6007612989565b60ff1660ff16815260200190815260200160002060008c60e0015160ff1660ff16815260200190815260200160002060405180604001604052908160008201805461107790612a28565b6040516020016115019897969594939291906120e1565b604051602081830303815290604052905080604051602001611523919061232a565b6040516020818303038152906040529350505050919050565b600a60209081526000928352604080842090915290825290208054819061156290612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461158e90612a28565b80156115db5780601f106115b0576101008083540402835291602001916115db565b820191906000526020600020905b8154815290600101906020018083116115be57829003601f168201915b5050505050908060010180546115f090612a28565b80601f016020809104026020016040519081016040528092919081815260200182805461161c90612a28565b80156116695780601f1061163e57610100808354040283529160200191611669565b820191906000526020600020905b81548152906001019060200180831161164c57829003601f168201915b5050505050905082565b600f546040516394e5684760e01b8152600481018390526060916000916001600160a01b03909116906394e56847906024016101406040518083038186803b1580156116be57600080fd5b505afa1580156116d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f69190611ece565b9050600081600001516117295760405180604001604052806008815260200167447261676f6e202360c01b81525061174b565b6040518060400160405280600881526020016757697a617264202360c01b8152505b61175485611b05565b61176561176087610f7f565b611c27565b61176e876101e3565b604051602001611781949392919061261b565b604051602081830303815290604052905061179b81611c27565b604051602001610f31919061281a565b6000546001600160a01b031633146117d55760405162461bcd60e51b81526004016101b8906128a0565b8281146118185760405162461bcd60e51b81526020600482015260116024820152704d69736d61746368656420696e7075747360781b60448201526064016101b8565b60005b818110156119b957604051806040016040528084848481811061184e57634e487b7160e01b600052603260045260246000fd5b9050602002810190611860919061291a565b61186a90806128d5565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050908252506020018484848181106118c457634e487b7160e01b600052603260045260246000fd5b90506020028101906118d6919061291a565b6118e49060208101906128d5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505060ff89168152600a60205260408120915087878581811061194b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119609190611fc5565b60ff16815260208082019290925260400160002082518051919261198992849290910190611d9d565b5060208281015180516119a29260018501920190611d9d565b5090505080806119b190612a63565b91505061181b565b505050505050565b6000546001600160a01b031633146119eb5760405162461bcd60e51b81526004016101b8906128a0565b6001600160a01b038116611a505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101b8565b611a5981611a88565b50565b60608282604051602001611a719291906124eb565b604051602081830303815290604052905092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608160200151604051602001611aef9190612417565b6040516020818303038152906040529050919050565b606081611b295750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611b535780611b3d81612a63565b9150611b4c9050600a836129ae565b9150611b2d565b60008167ffffffffffffffff811115611b7c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611ba6576020820181803683370190505b5090505b8415611c1f57611bbb6001836129e1565b9150611bc8600a86612a7e565b611bd3906030612971565b60f81b818381518110611bf657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611c18600a866129ae565b9450611baa565b949350505050565b6060815160001415611c4757505060408051602081019091526000815290565b6000604051806060016040528060408152602001612ace6040913990506000600384516002611c769190612971565b611c8091906129ae565b611c8b9060046129c2565b90506000611c9a826020612971565b67ffffffffffffffff811115611cc057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611cea576020820181803683370190505b509050818152600183018586518101602084015b81831015611d585760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611cfe565b600389510660018114611d725760028114611d8357611d8f565b613d3d60f01b600119830152611d8f565b603d60f81b6000198301525b509398975050505050505050565b828054611da990612a28565b90600052602060002090601f016020900481019282611dcb5760008555611e11565b82601f10611de457805160ff1916838001178555611e11565b82800160010185558215611e11579182015b82811115611e11578251825591602001919060010190611df6565b50611e1d929150611e21565b5090565b5b80821115611e1d5760008155600101611e22565b60008083601f840112611e47578182fd5b50813567ffffffffffffffff811115611e5e578182fd5b6020830191508360208260051b8501011115611e7957600080fd5b9250929050565b80518015158114611e9057600080fd5b919050565b8051611e9081612abe565b600060208284031215611eb1578081fd5b81356001600160a01b0381168114611ec7578182fd5b9392505050565b60006101408284031215611ee0578081fd5b611ee8612939565b611ef183611e80565b8152611eff60208401611e95565b6020820152611f1060408401611e95565b6040820152611f2160608401611e95565b6060820152611f3260808401611e95565b6080820152611f4360a08401611e95565b60a0820152611f5460c08401611e95565b60c0820152611f6560e08401611e95565b60e0820152610100611f78818501611e95565b90820152610120611f8a848201611e95565b908201529392505050565b600060208284031215611fa6578081fd5b5035919050565b600060208284031215611fbe578081fd5b5051919050565b600060208284031215611fd6578081fd5b8135611ec781612abe565b600080600080600060608688031215611ff8578081fd5b853561200381612abe565b9450602086013567ffffffffffffffff8082111561201f578283fd5b61202b89838a01611e36565b90965094506040880135915080821115612043578283fd5b5061205088828901611e36565b969995985093965092949392505050565b60008060408385031215612073578182fd5b823561207e81612abe565b9150602083013561208e81612abe565b809150509250929050565b600081518084526120b18160208601602086016129f8565b601f01601f19169290920160200192915050565b600081516120d78185602086016129f8565b9290920192915050565b6000895160206120f48285838f016129f8565b8a51918401916121078184848f016129f8565b8a519201916121198184848e016129f8565b895192019161212b8184848d016129f8565b885192019161213d8184848c016129f8565b875192019161214f8184848b016129f8565b86519201916121618184848a016129f8565b855192019161217381848489016129f8565b919091019b9a5050505050505050505050565b6000875160206121998285838d016129f8565b8184019150600b60fa1b80835289516121b88160018601858e016129f8565b6001930192830181905288516121d48160028601858d016129f8565b6002930192830181905287516121f08160038601858c016129f8565b60039301928301819052865161220c8160048601858b016129f8565b6004930192830152845161222681600585018489016129f8565b61223c600582850101600b60fa1b815260010190565b9b9a5050505050505050505050565b60008851602061225e8285838e016129f8565b8184019150600b60fa1b8083528a5161227d8160018601858f016129f8565b6001930192830181905289516122998160028601858e016129f8565b6002930192830181905288516122b58160038601858d016129f8565b6003930192830181905287516122d18160048601858c016129f8565b600493019283015285516122eb8160058501848a016129f8565b61231a61230d612307600584870101600b60fa1b815260010190565b886120c5565b600b60fa1b815260010190565b9c9b505050505050505050505050565b7f3c7376672069643d22776e644e4654222077696474683d22313030252220686581527f696768743d2231303025222076657273696f6e3d22312e31222076696577426f60208201527f783d223020302034302034302220786d6c6e733d22687474703a2f2f7777772e60408201527f77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687460608201527f74703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e000000006080820152600082516123fa81609c8501602087016129f8565b651e17b9bb339f60d11b609c93909101928301525060a201919050565b7f3c696d61676520783d22342220793d2234222077696474683d2233322220686581527f696768743d2233322220696d6167652d72656e646572696e673d22706978656c60208201527f6174656422207072657365727665417370656374526174696f3d22784d69645960408201527f4d69642220786c696e6b3a687265663d22646174613a696d6167652f706e673b60608201526618985cd94d8d0b60ca1b6080820152600082516124d18160878501602087016129f8565b6211179f60e91b6087939091019283015250608a01919050565b6e3d913a3930b4ba2fba3cb832911d1160891b8152825160009061251681600f8501602088016129f8565b6a1116113b30b63ab2911d1160a91b600f91840191820152835161254181601a8401602088016129f8565b61227d60f01b601a9290910191820152601c01949350505050565b605b60f81b8152600084516125788160018501602089016129f8565b7f7b2274726169745f74797065223a2247656e65726174696f6e222c2276616c756001918401918201526232911d60e91b602182015284516125c18160248401602089016129f8565b7f7d2c7b2274726169745f74797065223a2254797065222c2276616c7565223a006024929091019182015283516125ff8160438401602088016129f8565b617d5d60f01b6043929091019182015260450195945050505050565b693d913730b6b2911d101160b11b8152845160009061264181600a850160208a016129f8565b85519083019061265881600a840160208a016129f8565b7f222c20226465736372697074696f6e223a202254686f7573616e6473206f6620600a92909101918201527f57697a6172647320616e6420447261676f6e7320636f6d7065746520696e2061602a8201527f20746f77657220696e20746865206d65746176657273652e20412074656d7074604a8201527f696e67207072697a65206f6620244750206177616974732c2077697468206465606a8201527f61646c792068696768207374616b65732e20416c6c20746865206d6574616461608a8201527f746120616e6420696d61676573206172652067656e65726174656420616e642060aa8201527f73746f7265642031303025206f6e2d636861696e2e204e6f20495046532e204e60ca8201527f4f204150492e204a7573742074686520457468657265756d20626c6f636b636860ea8201527f61696e2e222c2022696d616765223a2022646174613a696d6167652f7376672b61010a8201526a1e1b5b0ed8985cd94d8d0b60aa1b61012a82015261280f6128026127fc6127e06101358501896120c5565b6f1116101130ba3a3934b13aba32b9911d60811b815260100190565b866120c5565b607d60f81b815260010190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161285281601d8501602087016129f8565b91909101601d0192915050565b602081526000611ec76020830184612099565b6040815260006128856040830185612099565b82810360208401526128978185612099565b95945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e198436030181126128eb578283fd5b83018035915067ffffffffffffffff821115612905578283fd5b602001915036819003821315611e7957600080fd5b60008235603e1983360301811261292f578182fd5b9190910192915050565b604051610140810167ffffffffffffffff8111828210171561296b57634e487b7160e01b600052604160045260246000fd5b60405290565b6000821982111561298457612984612a92565b500190565b600060ff821660ff84168060ff038211156129a6576129a6612a92565b019392505050565b6000826129bd576129bd612aa8565b500490565b60008160001904831182151516156129dc576129dc612a92565b500290565b6000828210156129f3576129f3612a92565b500390565b60005b83811015612a135781810151838201526020016129fb565b83811115612a22576000848401525b50505050565b600181811c90821680612a3c57607f821691505b60208210811415612a5d57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a7757612a77612a92565b5060010190565b600082612a8d57612a8d612aa8565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60ff81168114611a5957600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212208a8f41291ce7c0dafc05354bc5b370e54c5299992e4877e9b914fbe8cfba00f064736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.