POL Price: $0.704745 (+1.17%)
Gas: 30 GWei
 

Overview

Max Total Supply

300,210,273.340963666804233789 EMON

Holders

19,417 (0.00%)

Market

Price

$0.001 @ 0.001477 POL (-4.84%)

Onchain Market Cap

$312,434.84

Circulating Supply Market Cap

$153,014.00

Other Info

Token Contract (WITH 18 Decimals)

Balance
4,224.155123307275777869 EMON

Value
$4.40 ( ~6.2434 POL) [0.0014%]
0x68d36DcBDD7Bbf206e27134F28103abE7cf972df
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Ethermon was the very first blockchain battle game on Ethereum. Ethermon NFT collectors can now take their Ethermon to explore in the world famous decentralized 3D world (Decentraland) and challenge other players on battle ladders on the classic website Ethermon.io. Now also on Matic Polygon.

Market

Volume (24H):$13,185.53
Market Capitalization:$153,014.00
Circulating Supply:147,026,673.00 EMON
Market Data Source: Coinmarketcap

Contract Source Code Verified (Exact Match)

Contract Name:
EthermonToken

Compiler Version
v0.7.0+commit.9e61f92b

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-30
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

abstract contract Context {
  function _msgSender() internal view virtual returns (address payable) {
    return msg.sender;
  }

  function _msgData() internal view virtual returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}

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() internal {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), 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 {
    emit OwnershipTransferred(_owner, address(0));
    _owner = 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");
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

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

library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    uint256 c = a + b;
    if (c < a) return (false, 0);
    return (true, c);
  }

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

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

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

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

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

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

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

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

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

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

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

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

contract ERC20 is Context, IERC20 {
  using SafeMath for uint256;

  mapping(address => uint256) private _balances;

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

  uint256 private _totalSupply;

  string private _name;
  string private _symbol;
  uint8 private _decimals;

  /**
   * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
   * a default value of 18.
   *
   * To select a different value for {decimals}, use {_setupDecimals}.
   *
   * All three of these values are immutable: they can only be set once during
   * construction.
   */
  constructor(string memory name_, string memory symbol_) public {
    _name = name_;
    _symbol = symbol_;
    _decimals = 18;
  }

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

  /**
   * @dev Returns the symbol of the token, usually a shorter version of the
   * name.
   */
  function symbol() public view virtual 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 {_setupDecimals} is
   * called.
   *
   * 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 returns (uint8) {
    return _decimals;
  }

  /**
   * @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);
    _approve(
      sender,
      _msgSender(),
      _allowances[sender][_msgSender()].sub(
        amount,
        "ERC20: transfer amount exceeds allowance"
      )
    );
    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].add(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)
  {
    _approve(
      _msgSender(),
      spender,
      _allowances[_msgSender()][spender].sub(
        subtractedValue,
        "ERC20: decreased allowance below zero"
      )
    );
    return true;
  }

  /**
   * @dev Moves tokens `amount` from `sender` to `recipient`.
   *
   * This is 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);

    _balances[sender] = _balances[sender].sub(
      amount,
      "ERC20: transfer amount exceeds balance"
    );
    _balances[recipient] = _balances[recipient].add(amount);
    emit Transfer(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:
   *
   * - `to` 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 = _totalSupply.add(amount);
    _balances[account] = _balances[account].add(amount);
    emit Transfer(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);

    _balances[account] = _balances[account].sub(
      amount,
      "ERC20: burn amount exceeds balance"
    );
    _totalSupply = _totalSupply.sub(amount);
    emit Transfer(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 Sets {decimals} to a value other than the default one of 18.
   *
   * WARNING: This function should only be called from the constructor. Most
   * applications that interact with token contracts will not expect
   * {decimals} to ever change, and may work incorrectly if it does.
   */
  function _setupDecimals(uint8 decimals_) internal virtual {
    _decimals = decimals_;
  }

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

abstract contract Pausable is Context {
  /**
   * @dev Emitted when the pause is triggered by `account`.
   */
  event Paused(address account);

  /**
   * @dev Emitted when the pause is lifted by `account`.
   */
  event Unpaused(address account);

  bool private _paused;

  /**
   * @dev Initializes the contract in unpaused state.
   */
  constructor() internal {
    _paused = false;
  }

  /**
   * @dev Returns true if the contract is paused, and false otherwise.
   */
  function paused() public view virtual returns (bool) {
    return _paused;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   *
   * Requirements:
   *
   * - The contract must not be paused.
   */
  modifier whenNotPaused() {
    require(!paused(), "Pausable: paused");
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   *
   * Requirements:
   *
   * - The contract must be paused.
   */
  modifier whenPaused() {
    require(paused(), "Pausable: not paused");
    _;
  }

  /**
   * @dev Triggers stopped state.
   *
   * Requirements:
   *
   * - The contract must not be paused.
   */
  function _pause() internal virtual whenNotPaused {
    _paused = true;
    emit Paused(_msgSender());
  }

  /**
   * @dev Returns to normal state.
   *
   * Requirements:
   *
   * - The contract must be paused.
   */
  function _unpause() internal virtual whenPaused {
    _paused = false;
    emit Unpaused(_msgSender());
  }
}

abstract contract ERC20Pausable is ERC20, Pausable {
  /**
   * @dev See {ERC20-_beforeTokenTransfer}.
   *
   * Requirements:
   *
   * - the contract must not be paused.
   */
  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 amount
  ) internal virtual override {
    super._beforeTokenTransfer(from, to, amount);

    require(!paused(), "ERC20Pausable: token transfer while paused");
  }
}

library EnumerableSet {
  // To implement this library for multiple types with as little code
  // repetition as possible, we write it in terms of a generic Set type with
  // bytes32 values.
  // The Set implementation uses private functions, and user-facing
  // implementations (such as AddressSet) are just wrappers around the
  // underlying Set.
  // This means that we can only create new EnumerableSets for types that fit
  // in bytes32.

  struct Set {
    // Storage of set values
    bytes32[] _values;
    // Position of the value in the `values` array, plus 1 because index 0
    // means a value is not in the set.
    mapping(bytes32 => uint256) _indexes;
  }

  /**
   * @dev Add a value to a set. O(1).
   *
   * Returns true if the value was added to the set, that is if it was not
   * already present.
   */
  function _add(Set storage set, bytes32 value) private returns (bool) {
    if (!_contains(set, value)) {
      set._values.push(value);
      // The value is stored at length-1, but we add 1 to all indexes
      // and use 0 as a sentinel value
      set._indexes[value] = set._values.length;
      return true;
    } else {
      return false;
    }
  }

  /**
   * @dev Removes a value from a set. O(1).
   *
   * Returns true if the value was removed from the set, that is if it was
   * present.
   */
  function _remove(Set storage set, bytes32 value) private returns (bool) {
    // We read and store the value's index to prevent multiple reads from the same storage slot
    uint256 valueIndex = set._indexes[value];

    if (valueIndex != 0) {
      // Equivalent to contains(set, value)
      // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
      // the array, and then remove the last element (sometimes called as 'swap and pop').
      // This modifies the order of the array, as noted in {at}.

      uint256 toDeleteIndex = valueIndex - 1;
      uint256 lastIndex = set._values.length - 1;

      // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
      // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

      bytes32 lastvalue = set._values[lastIndex];

      // Move the last value to the index where the value to delete is
      set._values[toDeleteIndex] = lastvalue;
      // Update the index for the moved value
      set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

      // Delete the slot where the moved value was stored
      set._values.pop();

      // Delete the index for the deleted slot
      delete set._indexes[value];

      return true;
    } else {
      return false;
    }
  }

  /**
   * @dev Returns true if the value is in the set. O(1).
   */
  function _contains(Set storage set, bytes32 value)
    private
    view
    returns (bool)
  {
    return set._indexes[value] != 0;
  }

  /**
   * @dev Returns the number of values on the set. O(1).
   */
  function _length(Set storage set) private view returns (uint256) {
    return set._values.length;
  }

  /**
   * @dev Returns the value stored at position `index` in the set. O(1).
   *
   * Note that there are no guarantees on the ordering of values inside the
   * array, and it may change when more values are added or removed.
   *
   * Requirements:
   *
   * - `index` must be strictly less than {length}.
   */
  function _at(Set storage set, uint256 index) private view returns (bytes32) {
    require(set._values.length > index, "EnumerableSet: index out of bounds");
    return set._values[index];
  }

  // Bytes32Set

  struct Bytes32Set {
    Set _inner;
  }

  /**
   * @dev Add a value to a set. O(1).
   *
   * Returns true if the value was added to the set, that is if it was not
   * already present.
   */
  function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
    return _add(set._inner, value);
  }

  /**
   * @dev Removes a value from a set. O(1).
   *
   * Returns true if the value was removed from the set, that is if it was
   * present.
   */
  function remove(Bytes32Set storage set, bytes32 value)
    internal
    returns (bool)
  {
    return _remove(set._inner, value);
  }

  /**
   * @dev Returns true if the value is in the set. O(1).
   */
  function contains(Bytes32Set storage set, bytes32 value)
    internal
    view
    returns (bool)
  {
    return _contains(set._inner, value);
  }

  /**
   * @dev Returns the number of values in the set. O(1).
   */
  function length(Bytes32Set storage set) internal view returns (uint256) {
    return _length(set._inner);
  }

  /**
   * @dev Returns the value stored at position `index` in the set. O(1).
   *
   * Note that there are no guarantees on the ordering of values inside the
   * array, and it may change when more values are added or removed.
   *
   * Requirements:
   *
   * - `index` must be strictly less than {length}.
   */
  function at(Bytes32Set storage set, uint256 index)
    internal
    view
    returns (bytes32)
  {
    return _at(set._inner, index);
  }

  // AddressSet

  struct AddressSet {
    Set _inner;
  }

  /**
   * @dev Add a value to a set. O(1).
   *
   * Returns true if the value was added to the set, that is if it was not
   * already present.
   */
  function add(AddressSet storage set, address value) internal returns (bool) {
    return _add(set._inner, bytes32(uint256(uint160(value))));
  }

  /**
   * @dev Removes a value from a set. O(1).
   *
   * Returns true if the value was removed from the set, that is if it was
   * present.
   */
  function remove(AddressSet storage set, address value)
    internal
    returns (bool)
  {
    return _remove(set._inner, bytes32(uint256(uint160(value))));
  }

  /**
   * @dev Returns true if the value is in the set. O(1).
   */
  function contains(AddressSet storage set, address value)
    internal
    view
    returns (bool)
  {
    return _contains(set._inner, bytes32(uint256(uint160(value))));
  }

  /**
   * @dev Returns the number of values in the set. O(1).
   */
  function length(AddressSet storage set) internal view returns (uint256) {
    return _length(set._inner);
  }

  /**
   * @dev Returns the value stored at position `index` in the set. O(1).
   *
   * Note that there are no guarantees on the ordering of values inside the
   * array, and it may change when more values are added or removed.
   *
   * Requirements:
   *
   * - `index` must be strictly less than {length}.
   */
  function at(AddressSet storage set, uint256 index)
    internal
    view
    returns (address)
  {
    return address(uint160(uint256(_at(set._inner, index))));
  }

  // UintSet

  struct UintSet {
    Set _inner;
  }

  /**
   * @dev Add a value to a set. O(1).
   *
   * Returns true if the value was added to the set, that is if it was not
   * already present.
   */
  function add(UintSet storage set, uint256 value) internal returns (bool) {
    return _add(set._inner, bytes32(value));
  }

  /**
   * @dev Removes a value from a set. O(1).
   *
   * Returns true if the value was removed from the set, that is if it was
   * present.
   */
  function remove(UintSet storage set, uint256 value) internal returns (bool) {
    return _remove(set._inner, bytes32(value));
  }

  /**
   * @dev Returns true if the value is in the set. O(1).
   */
  function contains(UintSet storage set, uint256 value)
    internal
    view
    returns (bool)
  {
    return _contains(set._inner, bytes32(value));
  }

  /**
   * @dev Returns the number of values on the set. O(1).
   */
  function length(UintSet storage set) internal view returns (uint256) {
    return _length(set._inner);
  }

  /**
   * @dev Returns the value stored at position `index` in the set. O(1).
   *
   * Note that there are no guarantees on the ordering of values inside the
   * array, and it may change when more values are added or removed.
   *
   * Requirements:
   *
   * - `index` must be strictly less than {length}.
   */
  function at(UintSet storage set, uint256 index)
    internal
    view
    returns (uint256)
  {
    return uint256(_at(set._inner, index));
  }
}

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;
    // solhint-disable-next-line no-inline-assembly
    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");

    // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
    (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");

    // solhint-disable-next-line avoid-low-level-calls
    (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");

    // solhint-disable-next-line avoid-low-level-calls
    (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");

    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory returndata) = target.delegatecall(data);
    return _verifyCallResult(success, returndata, errorMessage);
  }

  function _verifyCallResult(
    bool success,
    bytes memory returndata,
    string memory errorMessage
  ) private pure returns (bytes memory) {
    if (success) {
      return returndata;
    } else {
      // Look for revert reason and bubble it up if present
      if (returndata.length > 0) {
        // The easiest way to bubble the revert reason is using memory via assembly

        // solhint-disable-next-line no-inline-assembly
        assembly {
          let returndata_size := mload(returndata)
          revert(add(32, returndata), returndata_size)
        }
      } else {
        revert(errorMessage);
      }
    }
  }
}

abstract contract AccessControl is Context {
  using EnumerableSet for EnumerableSet.AddressSet;
  using Address for address;

  struct RoleData {
    EnumerableSet.AddressSet members;
    bytes32 adminRole;
  }

  mapping(bytes32 => RoleData) private _roles;

  bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

  /**
   * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
   *
   * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
   * {RoleAdminChanged} not being emitted signaling this.
   *
   * _Available since v3.1._
   */
  event RoleAdminChanged(
    bytes32 indexed role,
    bytes32 indexed previousAdminRole,
    bytes32 indexed newAdminRole
  );

  /**
   * @dev Emitted when `account` is granted `role`.
   *
   * `sender` is the account that originated the contract call, an admin role
   * bearer except when using {_setupRole}.
   */
  event RoleGranted(
    bytes32 indexed role,
    address indexed account,
    address indexed sender
  );

  /**
   * @dev Emitted when `account` is revoked `role`.
   *
   * `sender` is the account that originated the contract call:
   *   - if using `revokeRole`, it is the admin role bearer
   *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
   */
  event RoleRevoked(
    bytes32 indexed role,
    address indexed account,
    address indexed sender
  );

  /**
   * @dev Returns `true` if `account` has been granted `role`.
   */
  function hasRole(bytes32 role, address account) public view returns (bool) {
    return _roles[role].members.contains(account);
  }

  /**
   * @dev Returns the number of accounts that have `role`. Can be used
   * together with {getRoleMember} to enumerate all bearers of a role.
   */
  function getRoleMemberCount(bytes32 role) public view returns (uint256) {
    return _roles[role].members.length();
  }

  /**
   * @dev Returns one of the accounts that have `role`. `index` must be a
   * value between 0 and {getRoleMemberCount}, non-inclusive.
   *
   * Role bearers are not sorted in any particular way, and their ordering may
   * change at any point.
   *
   * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
   * you perform all queries on the same block. See the following
   * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
   * for more information.
   */
  function getRoleMember(bytes32 role, uint256 index)
    public
    view
    returns (address)
  {
    return _roles[role].members.at(index);
  }

  /**
   * @dev Returns the admin role that controls `role`. See {grantRole} and
   * {revokeRole}.
   *
   * To change a role's admin, use {_setRoleAdmin}.
   */
  function getRoleAdmin(bytes32 role) public view returns (bytes32) {
    return _roles[role].adminRole;
  }

  /**
   * @dev Grants `role` to `account`.
   *
   * If `account` had not been already granted `role`, emits a {RoleGranted}
   * event.
   *
   * Requirements:
   *
   * - the caller must have ``role``'s admin role.
   */
  function grantRole(bytes32 role, address account) public virtual {
    require(
      hasRole(_roles[role].adminRole, _msgSender()),
      "AccessControl: sender must be an admin to grant"
    );

    _grantRole(role, account);
  }

  /**
   * @dev Revokes `role` from `account`.
   *
   * If `account` had been granted `role`, emits a {RoleRevoked} event.
   *
   * Requirements:
   *
   * - the caller must have ``role``'s admin role.
   */
  function revokeRole(bytes32 role, address account) public virtual {
    require(
      hasRole(_roles[role].adminRole, _msgSender()),
      "AccessControl: sender must be an admin to revoke"
    );

    _revokeRole(role, account);
  }

  /**
   * @dev Revokes `role` from the calling account.
   *
   * Roles are often managed via {grantRole} and {revokeRole}: this function's
   * purpose is to provide a mechanism for accounts to lose their privileges
   * if they are compromised (such as when a trusted device is misplaced).
   *
   * If the calling account had been granted `role`, emits a {RoleRevoked}
   * event.
   *
   * Requirements:
   *
   * - the caller must be `account`.
   */
  function renounceRole(bytes32 role, address account) public virtual {
    require(
      account == _msgSender(),
      "AccessControl: can only renounce roles for self"
    );

    _revokeRole(role, account);
  }

  /**
   * @dev Grants `role` to `account`.
   *
   * If `account` had not been already granted `role`, emits a {RoleGranted}
   * event. Note that unlike {grantRole}, this function doesn't perform any
   * checks on the calling account.
   *
   * [WARNING]
   * ====
   * This function should only be called from the constructor when setting
   * up the initial roles for the system.
   *
   * Using this function in any other way is effectively circumventing the admin
   * system imposed by {AccessControl}.
   * ====
   */
  function _setupRole(bytes32 role, address account) internal virtual {
    _grantRole(role, account);
  }

  /**
   * @dev Sets `adminRole` as ``role``'s admin role.
   *
   * Emits a {RoleAdminChanged} event.
   */
  function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
    emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
    _roles[role].adminRole = adminRole;
  }

  function _grantRole(bytes32 role, address account) private {
    if (_roles[role].members.add(account)) {
      emit RoleGranted(role, account, _msgSender());
    }
  }

  function _revokeRole(bytes32 role, address account) private {
    if (_roles[role].members.remove(account)) {
      emit RoleRevoked(role, account, _msgSender());
    }
  }
}

contract AccessControlMixin is AccessControl {
  string private _revertMsg;

  function _setupContractId(string memory contractId) internal {
    _revertMsg = string(
      abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS")
    );
  }

  modifier only(bytes32 role) {
    require(hasRole(role, _msgSender()), _revertMsg);
    _;
  }
}

interface IChildToken {
  function deposit(address user, bytes calldata depositData) external;
}

contract Initializable {
  bool inited = false;

  modifier initializer() {
    require(!inited, "already inited");
    _;
    inited = true;
  }
}

contract EIP712Base is Initializable {
  struct EIP712Domain {
    string name;
    string version;
    address verifyingContract;
    bytes32 salt;
  }

  string public constant ERC712_VERSION = "1";

  bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
    keccak256(
      bytes(
        "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
      )
    );
  bytes32 internal domainSeperator;

  // supposed to be called once while initializing.
  // one of the contractsa that inherits this contract follows proxy pattern
  // so it is not possible to do this in a constructor
  function _initializeEIP712(string memory name) internal initializer {
    _setDomainSeperator(name);
  }

  function _setDomainSeperator(string memory name) internal {
    domainSeperator = keccak256(
      abi.encode(
        EIP712_DOMAIN_TYPEHASH,
        keccak256(bytes(name)),
        keccak256(bytes(ERC712_VERSION)),
        address(this),
        bytes32(getChainId())
      )
    );
  }

  function getDomainSeperator() public view returns (bytes32) {
    return domainSeperator;
  }

  function getChainId() public pure returns (uint256) {
    uint256 id;
    assembly {
      id := chainid()
    }
    return id;
  }

  /**
   * Accept message hash and returns hash message in EIP712 compatible form
   * So that it can be used to recover signer from signature signed using EIP712 formatted data
   * https://eips.ethereum.org/EIPS/eip-712
   * "\\x19" makes the encoding deterministic
   * "\\x01" is the version byte to make it compatible to EIP-191
   */
  function toTypedMessageHash(bytes32 messageHash)
    internal
    view
    returns (bytes32)
  {
    return
      keccak256(
        abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
      );
  }
}

contract NativeMetaTransaction is EIP712Base {
  using SafeMath for uint256;
  bytes32 private constant META_TRANSACTION_TYPEHASH =
    keccak256(
      bytes(
        "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
      )
    );
  event MetaTransactionExecuted(
    address userAddress,
    address payable relayerAddress,
    bytes functionSignature
  );
  mapping(address => uint256) nonces;

  /*
   * Meta transaction structure.
   * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
   * He should call the desired function directly in that case.
   */
  struct MetaTransaction {
    uint256 nonce;
    address from;
    bytes functionSignature;
  }

  function executeMetaTransaction(
    address userAddress,
    bytes memory functionSignature,
    bytes32 sigR,
    bytes32 sigS,
    uint8 sigV
  ) public payable returns (bytes memory) {
    MetaTransaction memory metaTx =
      MetaTransaction({
        nonce: nonces[userAddress],
        from: userAddress,
        functionSignature: functionSignature
      });

    require(
      verify(userAddress, metaTx, sigR, sigS, sigV),
      "Signer and signature do not match"
    );

    // increase nonce for user (to avoid re-use)
    nonces[userAddress] = nonces[userAddress].add(1);

    emit MetaTransactionExecuted(userAddress, msg.sender, functionSignature);

    // Append userAddress and relayer address at the end to extract it from calling context
    (bool success, bytes memory returnData) =
      address(this).call(abi.encodePacked(functionSignature, userAddress));
    require(success, "Function call not successful");

    return returnData;
  }

  function hashMetaTransaction(MetaTransaction memory metaTx)
    internal
    pure
    returns (bytes32)
  {
    return
      keccak256(
        abi.encode(
          META_TRANSACTION_TYPEHASH,
          metaTx.nonce,
          metaTx.from,
          keccak256(metaTx.functionSignature)
        )
      );
  }

  function getNonce(address user) public view returns (uint256 nonce) {
    nonce = nonces[user];
  }

  function verify(
    address signer,
    MetaTransaction memory metaTx,
    bytes32 sigR,
    bytes32 sigS,
    uint8 sigV
  ) internal view returns (bool) {
    require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
    return
      signer ==
      ecrecover(
        toTypedMessageHash(hashMetaTransaction(metaTx)),
        sigV,
        sigR,
        sigS
      );
  }
}

abstract contract ContextMixin {
  function msgSender() internal view returns (address payable sender) {
    if (msg.sender == address(this)) {
      bytes memory array = msg.data;
      uint256 index = msg.data.length;
      assembly {
        // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
        sender := and(
          mload(add(array, index)),
          0xffffffffffffffffffffffffffffffffffffffff
        )
      }
    } else {
      sender = msg.sender;
    }
    return sender;
  }
}

interface TokenRecipient {
  function receiveApproval(
    address _from,
    uint256 _value,
    address _token,
    bytes memory _extraData
  ) external;
}

interface TokenConvertor {
  function convertToOld(uint256, address) external;
}

contract EthermonToken is
  ERC20Pausable,
  Ownable,
  IChildToken,
  AccessControlMixin,
  NativeMetaTransaction,
  ContextMixin
{
  using SafeMath for uint256;
  // metadata
  string public version = "1.0";
  bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");
  bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE");

  // Ethermon payment
  address public convertorContract;

  mapping(address => bool) public frozenAccount;
  event FrozenFunds(address target, bool frozen);

  modifier onlyModerators {
    require(hasRole(MODERATOR_ROLE, msg.sender), "Caller is not a moderator");
    _;
  }

  // constructor
  constructor(
    string memory name_,
    string memory symbol_,
    uint8 decimals_,
    address childChainManager
  ) ERC20(name_, symbol_) Ownable() Pausable() {
    _setupDecimals(decimals_);
    _setupContractId("ChildERC20");
    _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    _setupRole(DEPOSITOR_ROLE, childChainManager);
    _initializeEIP712(name_);

    _mint(msg.sender, 0 * 10**decimals());
  }

  // This is to support Native meta transactions
  // never use msg.sender directly, use _msgSender() instead
  function _msgSender()
    internal
    view
    override
    returns (address payable sender)
  {
    return ContextMixin.msgSender();
  }

  function AddModerator(address _newModerator) public onlyOwner {
    _setupRole(MODERATOR_ROLE, _newModerator);
  }

  function RemoveModerator(address _oldModerator) public onlyOwner {
    revokeRole(MODERATOR_ROLE, _oldModerator);
  }

  function UpdateMaintaining(bool _isMaintaining) public onlyOwner {
    if (_isMaintaining) _pause();
    else _unpause();
  }

  function approveAndCall(
    address _spender,
    uint256 _value,
    bytes memory _extraData
  ) public returns (bool success) {
    TokenRecipient spender = TokenRecipient(_spender);
    if (approve(_spender, _value)) {
      spender.receiveApproval(msg.sender, _value, address(this), _extraData);
      return true;
    }
  }

  function transferAndCall(
    address _convertor,
    uint256 _amount,
    bytes memory _extraData
  ) public returns (bool success) {
    require(_amount != 0);
    TokenConvertor convertor = TokenConvertor(_convertor);
    convertor.convertToOld(_amount, msg.sender);
    _transfer(_msgSender(), _convertor, _amount);
    return true;
  }

  function freezeAccount(address _target, bool _freeze) public onlyOwner {
    frozenAccount[_target] = _freeze;
    FrozenFunds(_target, _freeze);
  }

  /**
   * @notice called when token is deposited on root chain
   * @dev Should be callable only by ChildChainManager
   * Should handle deposit by minting the required amount for user
   * Make sure minting is done only by this function
   * @param user user address for whom deposit is being done
   * @param depositData abi encoded amount
   */
  function deposit(address user, bytes calldata depositData)
    external
    override
    only(DEPOSITOR_ROLE)
  {
    uint256 amount = abi.decode(depositData, (uint256));
    _mint(user, amount);
  }

  /**
   * @notice called when user wants to withdraw tokens back to root chain
   * @dev Should burn user's tokens. This transaction will be verified when exiting on root chain
   * @param amount amount of tokens to withdraw
   */
  function withdraw(uint256 amount) external {
    _burn(_msgSender(), amount);
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address","name":"childChainManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"frozen","type":"bool"}],"name":"FrozenFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_newModerator","type":"address"}],"name":"AddModerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSITOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MODERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oldModerator","type":"address"}],"name":"RemoveModerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isMaintaining","type":"bool"}],"name":"UpdateMaintaining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convertorContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bool","name":"_freeze","type":"bool"}],"name":"freezeAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"frozenAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_convertor","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6008805460ff1916905560c060405260036080819052620312e360ec1b60a09081526200003091600b919062000883565b503480156200003e57600080fd5b50604051620033f1380380620033f1833981810160405260808110156200006457600080fd5b81019080805160405193929190846401000000008211156200008557600080fd5b9083019060208201858111156200009b57600080fd5b8251640100000000811182820188101715620000b657600080fd5b82525081516020918201929091019080838360005b83811015620000e5578181015183820152602001620000cb565b50505050905090810190601f168015620001135780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200013757600080fd5b9083019060208201858111156200014d57600080fd5b82516401000000008111828201881017156200016857600080fd5b82525081516020918201929091019080838360005b83811015620001975781810151838201526020016200017d565b50505050905090810190601f168015620001c55780820380516001836020036101000a031916815260200191505b50604090815260208281015192909101518651929450925085918591620001f29160039185019062000883565b5080516200020890600490602084019062000883565b50506005805461ff001960ff199091166012171690555060006200022b62000329565b6005805462010000600160b01b031916620100006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200028e8262000346565b60408051808201909152600a81526904368696c6445524332360b41b6020820152620002ba906200035c565b620002d06000620002ca62000329565b62000402565b620002fc7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a98262000402565b62000307846200040e565b6200031f336200031662000473565b5060006200047c565b505050506200091f565b6000620003406200058b60201b62001b341760201c565b90505b90565b6005805460ff191660ff92909216919091179055565b806040516020018082805190602001908083835b60208310620003915780518252601f19909201916020918201910162000370565b51815160209384036101000a60001901801990921691161790527f3a20494e53554646494349454e545f5045524d495353494f4e530000000000009190930190815260408051808303600519018152601a90920190528051620003fe955060079450920191905062000883565b5050565b620003fe8282620005ea565b60085460ff161562000458576040805162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015290519081900360640190fd5b620004638162000665565b506008805460ff19166001179055565b60055460ff1690565b6001600160a01b038216620004d8576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620004e6600083836200072a565b62000502816002546200078f60201b62001b911790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200053591839062001b916200078f821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600033301415620005e55760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620003439050565b503390565b60008281526006602090815260409091206200061191839062001beb620007f3821b17901c565b15620003fe576200062162000329565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6040518060800160405280604f815260200162003378604f913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc630620006d36200080a565b60001b60405160200180868152602001858152602001848152602001836001600160a01b03168152602001828152602001955050505050506040516020818303038152906040528051906020012060098190555050565b620007428383836200078a60201b62001c001760201c565b6200074c6200080e565b156200078a5760405162461bcd60e51b815260040180806020018281038252602a815260200180620033c7602a913960400191505060405180910390fd5b505050565b600082820183811015620007ea576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000620007ea836001600160a01b0384166200081c565b4690565b600554610100900460ff1690565b60006200082a83836200086b565b6200086257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620007ed565b506000620007ed565b60009081526001919091016020526040902054151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620008c657805160ff1916838001178555620008f6565b82800160010185558215620008f6579182015b82811115620008f6578251825591602001919060010190620008d9565b506200090492915062000908565b5090565b5b8082111562000904576000815560010162000909565b612a49806200092f6000396000f3fe6080604052600436106102465760003560e01c806370a0823111610139578063a9059cbb116100b6578063cf2c52cb1161007a578063cf2c52cb14610a39578063d547741f14610ac4578063dd62ed3e14610afd578063e122db6c14610b38578063e724529c14610b4d578063f2fde38b14610b8857610246565b8063a9059cbb146108aa578063b414d4b6146108e3578063b85d627514610916578063ca15c87314610949578063cae9ca511461097357610246565b806391d14854116100fd57806391d14854146107f957806395d89b4114610832578063a217fddf14610847578063a3b0b5a31461085c578063a457c2d71461087157610246565b806370a082311461073b578063715018a61461076e578063797669c9146107835780638da5cb5b146107985780639010d07c146107c957610246565b80632f2ff15d116101c75780634000aea01161018b5780634000aea0146105ec57806348ef5aa8146106b257806354fd4d50146106de5780635c975abb146106f35780636c81fd6d1461070857610246565b80632f2ff15d14610501578063313ce5671461053a5780633408e4701461056557806336568abe1461057a57806339509351146105b357610246565b806320379ee51161020e57806320379ee51461042057806323b872dd14610435578063248a9ca3146104785780632d0335ab146104a25780632e1a7d4d146104d557610246565b806306fdde031461024b578063095ea7b3146102d55780630c53c51c146103225780630f7e5970146103e457806318160ddd146103f9575b600080fd5b34801561025757600080fd5b50610260610bbb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029a578181015183820152602001610282565b50505050905090810190601f1680156102c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e157600080fd5b5061030e600480360360408110156102f857600080fd5b506001600160a01b038135169060200135610c52565b604080519115158252519081900360200190f35b610260600480360360a081101561033857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036257600080fd5b82018360208201111561037457600080fd5b803590602001918460018302840111600160201b8311171561039557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610c70565b3480156103f057600080fd5b50610260610f7d565b34801561040557600080fd5b5061040e610f9a565b60408051918252519081900360200190f35b34801561042c57600080fd5b5061040e610fa0565b34801561044157600080fd5b5061030e6004803603606081101561045857600080fd5b506001600160a01b03813581169160208101359091169060400135610fa6565b34801561048457600080fd5b5061040e6004803603602081101561049b57600080fd5b503561102e565b3480156104ae57600080fd5b5061040e600480360360208110156104c557600080fd5b50356001600160a01b0316611043565b3480156104e157600080fd5b506104ff600480360360208110156104f857600080fd5b503561105e565b005b34801561050d57600080fd5b506104ff6004803603604081101561052457600080fd5b50803590602001356001600160a01b0316611072565b34801561054657600080fd5b5061054f6110de565b6040805160ff9092168252519081900360200190f35b34801561057157600080fd5b5061040e6110e7565b34801561058657600080fd5b506104ff6004803603604081101561059d57600080fd5b50803590602001356001600160a01b03166110eb565b3480156105bf57600080fd5b5061030e600480360360408110156105d657600080fd5b506001600160a01b03813516906020013561114c565b3480156105f857600080fd5b5061030e6004803603606081101561060f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561063e57600080fd5b82018360208201111561065057600080fd5b803590602001918460018302840111600160201b8311171561067157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061119a945050505050565b3480156106be57600080fd5b506104ff600480360360208110156106d557600080fd5b5035151561122c565b3480156106ea57600080fd5b506102606112a9565b3480156106ff57600080fd5b5061030e611337565b34801561071457600080fd5b506104ff6004803603602081101561072b57600080fd5b50356001600160a01b0316611345565b34801561074757600080fd5b5061040e6004803603602081101561075e57600080fd5b50356001600160a01b03166113d1565b34801561077a57600080fd5b506104ff6113ec565b34801561078f57600080fd5b5061040e6114a0565b3480156107a457600080fd5b506107ad6114c4565b604080516001600160a01b039092168252519081900360200190f35b3480156107d557600080fd5b506107ad600480360360408110156107ec57600080fd5b50803590602001356114d9565b34801561080557600080fd5b5061030e6004803603604081101561081c57600080fd5b50803590602001356001600160a01b03166114f1565b34801561083e57600080fd5b50610260611509565b34801561085357600080fd5b5061040e61156a565b34801561086857600080fd5b5061040e61156f565b34801561087d57600080fd5b5061030e6004803603604081101561089457600080fd5b506001600160a01b038135169060200135611593565b3480156108b657600080fd5b5061030e600480360360408110156108cd57600080fd5b506001600160a01b0381351690602001356115fb565b3480156108ef57600080fd5b5061030e6004803603602081101561090657600080fd5b50356001600160a01b031661160f565b34801561092257600080fd5b506104ff6004803603602081101561093957600080fd5b50356001600160a01b0316611624565b34801561095557600080fd5b5061040e6004803603602081101561096c57600080fd5b50356116b0565b34801561097f57600080fd5b5061030e6004803603606081101561099657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156109c557600080fd5b8201836020820111156109d757600080fd5b803590602001918460018302840111600160201b831117156109f857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506116c7945050505050565b348015610a4557600080fd5b506104ff60048036036040811015610a5c57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a8657600080fd5b820183602082011115610a9857600080fd5b803590602001918460018302840111600160201b83111715610ab957600080fd5b5090925090506117d5565b348015610ad057600080fd5b506104ff60048036036040811015610ae757600080fd5b50803590602001356001600160a01b03166118ca565b348015610b0957600080fd5b5061040e60048036036040811015610b2057600080fd5b506001600160a01b0381358116916020013516611923565b348015610b4457600080fd5b506107ad61194e565b348015610b5957600080fd5b506104ff60048036036040811015610b7057600080fd5b506001600160a01b038135169060200135151561195d565b348015610b9457600080fd5b506104ff60048036036020811015610bab57600080fd5b50356001600160a01b0316611a23565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c475780601f10610c1c57610100808354040283529160200191610c47565b820191906000526020600020905b815481529060010190602001808311610c2a57829003601f168201915b505050505090505b90565b6000610c66610c5f611c05565b8484611c14565b5060015b92915050565b6060610c7a6126fc565b50604080516060810182526001600160a01b0388166000818152600a602090815290849020548352820152908101869052610cb88782878787611d00565b610cf35760405162461bcd60e51b815260040180806020018281038252602181526020018061290b6021913960400191505060405180910390fd5b6001600160a01b0387166000908152600a6020526040902054610d17906001611b91565b600a6000896001600160a01b03166001600160a01b03168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87338860405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610dbf578181015183820152602001610da7565b50505050905090810190601f168015610dec5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160006060306001600160a01b0316888a6040516020018083805190602001908083835b60208310610e3d5780518252601f199092019160209182019101610e1e565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610eb35780518252601f199092019160209182019101610e94565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f15576040519150601f19603f3d011682016040523d82523d6000602084013e610f1a565b606091505b509150915081610f71576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b60025490565b60095490565b6000610fb3848484611dda565b61102384610fbf611c05565b61101e856040518060600160405280602881526020016128c3602891396001600160a01b038a16600090815260016020526040812090610ffd611c05565b6001600160a01b031681526020810191909152604001600020549190611f35565b611c14565b5060015b9392505050565b60009081526006602052604090206002015490565b6001600160a01b03166000908152600a602052604090205490565b61106f611069611c05565b82611fcc565b50565b60008281526006602052604090206002015461109590611090611c05565b6114f1565b6110d05760405162461bcd60e51b815260040180806020018281038252602f81526020018061276c602f913960400191505060405180910390fd5b6110da82826120c8565b5050565b60055460ff1690565b4690565b6110f3611c05565b6001600160a01b0316816001600160a01b0316146111425760405162461bcd60e51b815260040180806020018281038252602f8152602001806129bb602f913960400191505060405180910390fd5b6110da8282612131565b6000610c66611159611c05565b8461101e856001600061116a611c05565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611b91565b6000826111a657600080fd5b60408051631efb138d60e31b815260048101859052336024820152905185916001600160a01b0383169163f7d89c689160448082019260009290919082900301818387803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b5050505061122161121a611c05565b8686611dda565b506001949350505050565b611234611c05565b6001600160a01b03166112456114c4565b6001600160a01b03161461128e576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b80156112a15761129c61219a565b61106f565b61106f61223c565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561132f5780601f106113045761010080835404028352916020019161132f565b820191906000526020600020905b81548152906001019060200180831161131257829003601f168201915b505050505081565b600554610100900460ff1690565b61134d611c05565b6001600160a01b031661135e6114c4565b6001600160a01b0316146113a7576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b61106f7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f826110d0565b6001600160a01b031660009081526020819052604090205490565b6113f4611c05565b6001600160a01b03166114056114c4565b6001600160a01b03161461144e576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6005546040516000916201000090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805462010000600160b01b0319169055565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b6005546201000090046001600160a01b031690565b600082815260066020526040812061102790836122c0565b600082815260066020526040812061102790836122cc565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c475780601f10610c1c57610100808354040283529160200191610c47565b600081565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a981565b6000610c666115a0611c05565b8461101e8560405180606001604052806025815260200161299660259139600160006115ca611c05565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611f35565b6000610c66611608611c05565b8484611dda565b600d6020526000908152604090205460ff1681565b61162c611c05565b6001600160a01b031661163d6114c4565b6001600160a01b031614611686576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b61106f7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f826118ca565b6000818152600660205260408120610c6a906122e1565b6000836116d48185610c52565b156117cd57806001600160a01b0316638f4ffcb1338630876040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561175c578181015183820152602001611744565b50505050905090810190601f1680156117895780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156117ab57600080fd5b505af11580156117bf573d6000803e3d6000fd5b505050506001915050611027565b509392505050565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a961180281611090611c05565b6007906118a25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156118935780601f1061186857610100808354040283529160200191611893565b820191906000526020600020905b81548152906001019060200180831161187657829003601f168201915b50509250505060405180910390fd5b506000838360208110156118b557600080fd5b503590506118c385826122ec565b5050505050565b6000828152600660205260409020600201546118e890611090611c05565b6111425760405162461bcd60e51b815260040180806020018281038252603081526020018061286e6030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600c546001600160a01b031681565b611965611c05565b6001600160a01b03166119766114c4565b6001600160a01b0316146119bf576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152600d6020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a15050565b611a2b611c05565b6001600160a01b0316611a3c6114c4565b6001600160a01b031614611a85576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6001600160a01b038116611aca5760405162461bcd60e51b81526004018080602001828103825260268152602001806128006026913960400191505060405180910390fd5b6005546040516001600160a01b038084169262010000900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600033301415611b8c5760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150610c4f9050565b503390565b600082820183811015611027576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611027836001600160a01b0384166123dc565b505050565b6000611c0f611b34565b905090565b6001600160a01b038316611c595760405162461bcd60e51b81526004018080602001828103825260248152602001806129726024913960400191505060405180910390fd5b6001600160a01b038216611c9e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128266022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60006001600160a01b038616611d475760405162461bcd60e51b815260040180806020018281038252602581526020018061289e6025913960400191505060405180910390fd5b6001611d5a611d5587612426565b6124a9565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611db1573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6001600160a01b038316611e1f5760405162461bcd60e51b815260040180806020018281038252602581526020018061294d6025913960400191505060405180910390fd5b6001600160a01b038216611e645760405162461bcd60e51b81526004018080602001828103825260238152602001806127496023913960400191505060405180910390fd5b611e6f8383836124f5565b611eac81604051806060016040528060268152602001612848602691396001600160a01b0386166000908152602081905260409020549190611f35565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611edb9082611b91565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611fc45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f89578181015183820152602001611f71565b50505050905090810190601f168015611fb65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b0382166120115760405162461bcd60e51b815260040180806020018281038252602181526020018061292c6021913960400191505060405180910390fd5b61201d826000836124f5565b61205a8160405180606001604052806022815260200161279b602291396001600160a01b0385166000908152602081905260409020549190611f35565b6001600160a01b0383166000908152602081905260409020556002546120809082612544565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60008281526006602052604090206120e09082611beb565b156110da576120ed611c05565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260066020526040902061214990826125a1565b156110da57612156611c05565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6121a2611337565b156121e7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6005805461ff0019166101001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861221f611c05565b604080516001600160a01b039092168252519081900360200190a1565b612244611337565b61228c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6005805461ff00191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61221f611c05565b600061102783836125b6565b6000611027836001600160a01b03841661261a565b6000610c6a82612632565b6001600160a01b038216612347576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612353600083836124f5565b6002546123609082611b91565b6002556001600160a01b0382166000908152602081905260409020546123869082611b91565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60006123e8838361261a565b61241e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c6a565b506000610c6a565b60006040518060800160405280604381526020016127bd60439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006124b3610fa0565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b612500838383611c00565b612508611337565b15611c005760405162461bcd60e51b815260040180806020018281038252602a8152602001806129ea602a913960400191505060405180910390fd5b60008282111561259b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611027836001600160a01b038416612636565b815460009082106125f85760405162461bcd60e51b81526004018080602001828103825260228152602001806127276022913960400191505060405180910390fd5b82600001828154811061260757fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600081815260018301602052604081205480156126f2578354600019808301919081019060009087908390811061266957fe5b906000526020600020015490508087600001848154811061268657fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806126b657fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610c6a565b6000915050610c6a565b60405180606001604052806000815260200160006001600160a01b0316815260200160608152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e455245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e657220616e64207369676e617475726520646f206e6f74206d6174636845524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6645524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564a2646970667358221220873cb9110187ccc15e45b3bb75a5f9ded5a1a96927207b23601616e20d640bc164736f6c63430007000033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742945524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa000000000000000000000000000000000000000000000000000000000000000d45746865726d6f6e546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004454d4f4e00000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102465760003560e01c806370a0823111610139578063a9059cbb116100b6578063cf2c52cb1161007a578063cf2c52cb14610a39578063d547741f14610ac4578063dd62ed3e14610afd578063e122db6c14610b38578063e724529c14610b4d578063f2fde38b14610b8857610246565b8063a9059cbb146108aa578063b414d4b6146108e3578063b85d627514610916578063ca15c87314610949578063cae9ca511461097357610246565b806391d14854116100fd57806391d14854146107f957806395d89b4114610832578063a217fddf14610847578063a3b0b5a31461085c578063a457c2d71461087157610246565b806370a082311461073b578063715018a61461076e578063797669c9146107835780638da5cb5b146107985780639010d07c146107c957610246565b80632f2ff15d116101c75780634000aea01161018b5780634000aea0146105ec57806348ef5aa8146106b257806354fd4d50146106de5780635c975abb146106f35780636c81fd6d1461070857610246565b80632f2ff15d14610501578063313ce5671461053a5780633408e4701461056557806336568abe1461057a57806339509351146105b357610246565b806320379ee51161020e57806320379ee51461042057806323b872dd14610435578063248a9ca3146104785780632d0335ab146104a25780632e1a7d4d146104d557610246565b806306fdde031461024b578063095ea7b3146102d55780630c53c51c146103225780630f7e5970146103e457806318160ddd146103f9575b600080fd5b34801561025757600080fd5b50610260610bbb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029a578181015183820152602001610282565b50505050905090810190601f1680156102c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e157600080fd5b5061030e600480360360408110156102f857600080fd5b506001600160a01b038135169060200135610c52565b604080519115158252519081900360200190f35b610260600480360360a081101561033857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036257600080fd5b82018360208201111561037457600080fd5b803590602001918460018302840111600160201b8311171561039557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610c70565b3480156103f057600080fd5b50610260610f7d565b34801561040557600080fd5b5061040e610f9a565b60408051918252519081900360200190f35b34801561042c57600080fd5b5061040e610fa0565b34801561044157600080fd5b5061030e6004803603606081101561045857600080fd5b506001600160a01b03813581169160208101359091169060400135610fa6565b34801561048457600080fd5b5061040e6004803603602081101561049b57600080fd5b503561102e565b3480156104ae57600080fd5b5061040e600480360360208110156104c557600080fd5b50356001600160a01b0316611043565b3480156104e157600080fd5b506104ff600480360360208110156104f857600080fd5b503561105e565b005b34801561050d57600080fd5b506104ff6004803603604081101561052457600080fd5b50803590602001356001600160a01b0316611072565b34801561054657600080fd5b5061054f6110de565b6040805160ff9092168252519081900360200190f35b34801561057157600080fd5b5061040e6110e7565b34801561058657600080fd5b506104ff6004803603604081101561059d57600080fd5b50803590602001356001600160a01b03166110eb565b3480156105bf57600080fd5b5061030e600480360360408110156105d657600080fd5b506001600160a01b03813516906020013561114c565b3480156105f857600080fd5b5061030e6004803603606081101561060f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561063e57600080fd5b82018360208201111561065057600080fd5b803590602001918460018302840111600160201b8311171561067157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061119a945050505050565b3480156106be57600080fd5b506104ff600480360360208110156106d557600080fd5b5035151561122c565b3480156106ea57600080fd5b506102606112a9565b3480156106ff57600080fd5b5061030e611337565b34801561071457600080fd5b506104ff6004803603602081101561072b57600080fd5b50356001600160a01b0316611345565b34801561074757600080fd5b5061040e6004803603602081101561075e57600080fd5b50356001600160a01b03166113d1565b34801561077a57600080fd5b506104ff6113ec565b34801561078f57600080fd5b5061040e6114a0565b3480156107a457600080fd5b506107ad6114c4565b604080516001600160a01b039092168252519081900360200190f35b3480156107d557600080fd5b506107ad600480360360408110156107ec57600080fd5b50803590602001356114d9565b34801561080557600080fd5b5061030e6004803603604081101561081c57600080fd5b50803590602001356001600160a01b03166114f1565b34801561083e57600080fd5b50610260611509565b34801561085357600080fd5b5061040e61156a565b34801561086857600080fd5b5061040e61156f565b34801561087d57600080fd5b5061030e6004803603604081101561089457600080fd5b506001600160a01b038135169060200135611593565b3480156108b657600080fd5b5061030e600480360360408110156108cd57600080fd5b506001600160a01b0381351690602001356115fb565b3480156108ef57600080fd5b5061030e6004803603602081101561090657600080fd5b50356001600160a01b031661160f565b34801561092257600080fd5b506104ff6004803603602081101561093957600080fd5b50356001600160a01b0316611624565b34801561095557600080fd5b5061040e6004803603602081101561096c57600080fd5b50356116b0565b34801561097f57600080fd5b5061030e6004803603606081101561099657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156109c557600080fd5b8201836020820111156109d757600080fd5b803590602001918460018302840111600160201b831117156109f857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506116c7945050505050565b348015610a4557600080fd5b506104ff60048036036040811015610a5c57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a8657600080fd5b820183602082011115610a9857600080fd5b803590602001918460018302840111600160201b83111715610ab957600080fd5b5090925090506117d5565b348015610ad057600080fd5b506104ff60048036036040811015610ae757600080fd5b50803590602001356001600160a01b03166118ca565b348015610b0957600080fd5b5061040e60048036036040811015610b2057600080fd5b506001600160a01b0381358116916020013516611923565b348015610b4457600080fd5b506107ad61194e565b348015610b5957600080fd5b506104ff60048036036040811015610b7057600080fd5b506001600160a01b038135169060200135151561195d565b348015610b9457600080fd5b506104ff60048036036020811015610bab57600080fd5b50356001600160a01b0316611a23565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c475780601f10610c1c57610100808354040283529160200191610c47565b820191906000526020600020905b815481529060010190602001808311610c2a57829003601f168201915b505050505090505b90565b6000610c66610c5f611c05565b8484611c14565b5060015b92915050565b6060610c7a6126fc565b50604080516060810182526001600160a01b0388166000818152600a602090815290849020548352820152908101869052610cb88782878787611d00565b610cf35760405162461bcd60e51b815260040180806020018281038252602181526020018061290b6021913960400191505060405180910390fd5b6001600160a01b0387166000908152600a6020526040902054610d17906001611b91565b600a6000896001600160a01b03166001600160a01b03168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87338860405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610dbf578181015183820152602001610da7565b50505050905090810190601f168015610dec5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160006060306001600160a01b0316888a6040516020018083805190602001908083835b60208310610e3d5780518252601f199092019160209182019101610e1e565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b60208310610eb35780518252601f199092019160209182019101610e94565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f15576040519150601f19603f3d011682016040523d82523d6000602084013e610f1a565b606091505b509150915081610f71576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b60025490565b60095490565b6000610fb3848484611dda565b61102384610fbf611c05565b61101e856040518060600160405280602881526020016128c3602891396001600160a01b038a16600090815260016020526040812090610ffd611c05565b6001600160a01b031681526020810191909152604001600020549190611f35565b611c14565b5060015b9392505050565b60009081526006602052604090206002015490565b6001600160a01b03166000908152600a602052604090205490565b61106f611069611c05565b82611fcc565b50565b60008281526006602052604090206002015461109590611090611c05565b6114f1565b6110d05760405162461bcd60e51b815260040180806020018281038252602f81526020018061276c602f913960400191505060405180910390fd5b6110da82826120c8565b5050565b60055460ff1690565b4690565b6110f3611c05565b6001600160a01b0316816001600160a01b0316146111425760405162461bcd60e51b815260040180806020018281038252602f8152602001806129bb602f913960400191505060405180910390fd5b6110da8282612131565b6000610c66611159611c05565b8461101e856001600061116a611c05565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611b91565b6000826111a657600080fd5b60408051631efb138d60e31b815260048101859052336024820152905185916001600160a01b0383169163f7d89c689160448082019260009290919082900301818387803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b5050505061122161121a611c05565b8686611dda565b506001949350505050565b611234611c05565b6001600160a01b03166112456114c4565b6001600160a01b03161461128e576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b80156112a15761129c61219a565b61106f565b61106f61223c565b600b805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561132f5780601f106113045761010080835404028352916020019161132f565b820191906000526020600020905b81548152906001019060200180831161131257829003601f168201915b505050505081565b600554610100900460ff1690565b61134d611c05565b6001600160a01b031661135e6114c4565b6001600160a01b0316146113a7576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b61106f7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f826110d0565b6001600160a01b031660009081526020819052604090205490565b6113f4611c05565b6001600160a01b03166114056114c4565b6001600160a01b03161461144e576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6005546040516000916201000090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805462010000600160b01b0319169055565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b6005546201000090046001600160a01b031690565b600082815260066020526040812061102790836122c0565b600082815260066020526040812061102790836122cc565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c475780601f10610c1c57610100808354040283529160200191610c47565b600081565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a981565b6000610c666115a0611c05565b8461101e8560405180606001604052806025815260200161299660259139600160006115ca611c05565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611f35565b6000610c66611608611c05565b8484611dda565b600d6020526000908152604090205460ff1681565b61162c611c05565b6001600160a01b031661163d6114c4565b6001600160a01b031614611686576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b61106f7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f826118ca565b6000818152600660205260408120610c6a906122e1565b6000836116d48185610c52565b156117cd57806001600160a01b0316638f4ffcb1338630876040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561175c578181015183820152602001611744565b50505050905090810190601f1680156117895780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156117ab57600080fd5b505af11580156117bf573d6000803e3d6000fd5b505050506001915050611027565b509392505050565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a961180281611090611c05565b6007906118a25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156118935780601f1061186857610100808354040283529160200191611893565b820191906000526020600020905b81548152906001019060200180831161187657829003601f168201915b50509250505060405180910390fd5b506000838360208110156118b557600080fd5b503590506118c385826122ec565b5050505050565b6000828152600660205260409020600201546118e890611090611c05565b6111425760405162461bcd60e51b815260040180806020018281038252603081526020018061286e6030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600c546001600160a01b031681565b611965611c05565b6001600160a01b03166119766114c4565b6001600160a01b0316146119bf576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152600d6020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a15050565b611a2b611c05565b6001600160a01b0316611a3c6114c4565b6001600160a01b031614611a85576040805162461bcd60e51b815260206004820181905260248201526000805160206128eb833981519152604482015290519081900360640190fd5b6001600160a01b038116611aca5760405162461bcd60e51b81526004018080602001828103825260268152602001806128006026913960400191505060405180910390fd5b6005546040516001600160a01b038084169262010000900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600033301415611b8c5760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150610c4f9050565b503390565b600082820183811015611027576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611027836001600160a01b0384166123dc565b505050565b6000611c0f611b34565b905090565b6001600160a01b038316611c595760405162461bcd60e51b81526004018080602001828103825260248152602001806129726024913960400191505060405180910390fd5b6001600160a01b038216611c9e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128266022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60006001600160a01b038616611d475760405162461bcd60e51b815260040180806020018281038252602581526020018061289e6025913960400191505060405180910390fd5b6001611d5a611d5587612426565b6124a9565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611db1573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6001600160a01b038316611e1f5760405162461bcd60e51b815260040180806020018281038252602581526020018061294d6025913960400191505060405180910390fd5b6001600160a01b038216611e645760405162461bcd60e51b81526004018080602001828103825260238152602001806127496023913960400191505060405180910390fd5b611e6f8383836124f5565b611eac81604051806060016040528060268152602001612848602691396001600160a01b0386166000908152602081905260409020549190611f35565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611edb9082611b91565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611fc45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f89578181015183820152602001611f71565b50505050905090810190601f168015611fb65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b0382166120115760405162461bcd60e51b815260040180806020018281038252602181526020018061292c6021913960400191505060405180910390fd5b61201d826000836124f5565b61205a8160405180606001604052806022815260200161279b602291396001600160a01b0385166000908152602081905260409020549190611f35565b6001600160a01b0383166000908152602081905260409020556002546120809082612544565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60008281526006602052604090206120e09082611beb565b156110da576120ed611c05565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260066020526040902061214990826125a1565b156110da57612156611c05565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6121a2611337565b156121e7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6005805461ff0019166101001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861221f611c05565b604080516001600160a01b039092168252519081900360200190a1565b612244611337565b61228c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6005805461ff00191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61221f611c05565b600061102783836125b6565b6000611027836001600160a01b03841661261a565b6000610c6a82612632565b6001600160a01b038216612347576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612353600083836124f5565b6002546123609082611b91565b6002556001600160a01b0382166000908152602081905260409020546123869082611b91565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60006123e8838361261a565b61241e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c6a565b506000610c6a565b60006040518060800160405280604381526020016127bd60439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006124b3610fa0565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b612500838383611c00565b612508611337565b15611c005760405162461bcd60e51b815260040180806020018281038252602a8152602001806129ea602a913960400191505060405180910390fd5b60008282111561259b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611027836001600160a01b038416612636565b815460009082106125f85760405162461bcd60e51b81526004018080602001828103825260228152602001806127276022913960400191505060405180910390fd5b82600001828154811061260757fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600081815260018301602052604081205480156126f2578354600019808301919081019060009087908390811061266957fe5b906000526020600020015490508087600001848154811061268657fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806126b657fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610c6a565b6000915050610c6a565b60405180606001604052806000815260200160006001600160a01b0316815260200160608152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b654e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e455245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e657220616e64207369676e617475726520646f206e6f74206d6174636845524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6645524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564a2646970667358221220873cb9110187ccc15e45b3bb75a5f9ded5a1a96927207b23601616e20d640bc164736f6c63430007000033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa000000000000000000000000000000000000000000000000000000000000000d45746865726d6f6e546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004454d4f4e00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): EthermonToken
Arg [1] : symbol_ (string): EMON
Arg [2] : decimals_ (uint8): 18
Arg [3] : childChainManager (address): 0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 000000000000000000000000a6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [5] : 45746865726d6f6e546f6b656e00000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 454d4f4e00000000000000000000000000000000000000000000000000000000


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.