ETH Price: $2,502.03 (+0.69%)

Contract

0xEE8b7FE43548E124611089D2C3fb45A204089594
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy207381932024-09-13 0:45:3545 days ago1726188335IN
0xEE8b7FE4...204089594
0 ETH0.000240952.51395605
Buy207333062024-09-12 8:21:2346 days ago1726129283IN
0xEE8b7FE4...204089594
0 ETH0.000300663.13690568
Gifting172756912023-05-17 0:03:59530 days ago1684281839IN
0xEE8b7FE4...204089594
0 ETH0.0051625352.25183893
Gifting172756862023-05-17 0:02:59530 days ago1684281779IN
0xEE8b7FE4...204089594
0 ETH0.0053158751.3110418
Gifting172756302023-05-16 23:51:47530 days ago1684281107IN
0xEE8b7FE4...204089594
0 ETH0.0053940352.06543414
Gifting172755912023-05-16 23:43:59530 days ago1684280639IN
0xEE8b7FE4...204089594
0 ETH0.0053578451.71613272
Buy167954042023-03-10 4:33:23598 days ago1678422803IN
0xEE8b7FE4...204089594
0 ETH0.0035755923.99402805
Buy166854582023-02-22 17:27:59614 days ago1677086879IN
0xEE8b7FE4...204089594
0 ETH0.0280710640.33489053
Gifting166841962023-02-22 13:11:35614 days ago1677071495IN
0xEE8b7FE4...204089594
0 ETH0.0029431429.78865911
Buy166834262023-02-22 10:34:47614 days ago1677062087IN
0xEE8b7FE4...204089594
0 ETH0.0031084425.78613363
Buy165161572023-01-30 0:48:11637 days ago1675039691IN
0xEE8b7FE4...204089594
0 ETH0.0016147415.60936863
Buy164130622023-01-15 15:21:47652 days ago1673796107IN
0xEE8b7FE4...204089594
0 ETH0.0036654235.43284343
Buy163213872023-01-02 20:10:11664 days ago1672690211IN
0xEE8b7FE4...204089594
0 ETH0.0022150121.41208471
Buy163013542022-12-31 1:06:11667 days ago1672448771IN
0xEE8b7FE4...204089594
0 ETH0.0018425117.81119839
Buy162105362022-12-18 8:59:47680 days ago1671353987IN
0xEE8b7FE4...204089594
0 ETH0.0025930613.32560424
Buy161959432022-12-16 8:04:11682 days ago1671177851IN
0xEE8b7FE4...204089594
0 ETH0.0014039613.57185214
Buy161709032022-12-12 20:07:11685 days ago1670875631IN
0xEE8b7FE4...204089594
0 ETH0.0021112920.40948037
Buy161705812022-12-12 19:02:23685 days ago1670871743IN
0xEE8b7FE4...204089594
0 ETH0.0018370521.2753091
Buy161702902022-12-12 18:03:59686 days ago1670868239IN
0xEE8b7FE4...204089594
0 ETH0.0030873329.84464371
Buy161305562022-12-07 4:40:47691 days ago1670388047IN
0xEE8b7FE4...204089594
0 ETH0.0015008614.50850784
Buy161227732022-12-06 2:30:11692 days ago1670293811IN
0xEE8b7FE4...204089594
0 ETH0.0018952612.71816644
Buy161220692022-12-06 0:08:59692 days ago1670285339IN
0xEE8b7FE4...204089594
0 ETH0.0014482514
Buy161220612022-12-06 0:07:23692 days ago1670285243IN
0xEE8b7FE4...204089594
0 ETH0.0014072113
Buy160952332022-12-02 6:08:59696 days ago1669961339IN
0xEE8b7FE4...204089594
0 ETH0.0011920311.52318139
Buy160654242022-11-28 2:14:23700 days ago1669601663IN
0xEE8b7FE4...204089594
0 ETH0.0010764310.40570288
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HighstreetAssetsMarketplace

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion, MIT license
File 1 of 21 : HighstreetAssetsMarketplace.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./HighstreetAssets.sol";
import "./utils/PriceConverter.sol";

/** @title The primary marketplace contract of Highstreet assets */
contract HighstreetAssetsMarketplace is Context, Ownable, ReentrancyGuard, Pausable, PriceConverter {

  uint8 public constant CONST_EXCHANGE_RATE_DECIMAL = 18;

  HighstreetAssets public immutable assets;
  IERC20 public immutable high;
  address public immutable highUsdPriceFeed;
  address public immutable ethUsdPriceFeed;
  address payable private _platfomReceiver;

  enum InputType {
    PRICE,
    MAX,
    TOTAL,
    RESTRICT,
    RESET,
    START,
    END,
    COOLDOWN
  }

  struct Item {
    uint256 price;
    uint64 startTime;
    uint64 endTime;
    uint32 count;
    uint32 maxCanSell;
    uint32 maxSupply;
    uint16 restriction;
    uint16 coolDownTime;
  }

  struct ItemDisplay {
    uint256 id;
    uint256 price;
    uint64 startTime;
    uint64 endTime;
    uint32 count;
    uint32 maxCanSell;
    uint32 maxSupply;
    uint16 restriction;
    uint16 coolDownTime;
  }

  struct CoolDownTimeDisplay {
    uint256 id;
    uint256 coolDownTime;
  }

  uint256 [] public idList;

  mapping(uint256 => Item) public saleList;
  mapping(address => mapping(uint256 => uint256)) public coolDownTimer;

  event TransferReceiver(address indexed sender, address indexed newReciever);
  event Update(uint256 indexed id, InputType inputType, uint256 data);
  event Add(uint256 indexed id, Item item);
  event Received(address indexed from, uint256 amount);
  event Deal(address indexed buyer, address indexed receiver, uint256[] ids, uint256[] amounts, bool isPaidByEth, uint256 price);

  /**
   * @dev constructor function
   */
  constructor (
    address assets_,
    address receiver_,
    address high_,
    address highUsdPriceFeed_,
    address ethUsdPriceFeed_
  ) {
    require(assets_ != address(0), "invalid assets address");
    require(receiver_ != address(0), "invalid receiver address");
    require(high_ != address(0), "invalid high address");
    require(highUsdPriceFeed_ != address(0), "invalid high aggregator address");
    require(ethUsdPriceFeed_ != address(0), "invalid eth aggregator address");

    assets = HighstreetAssets(assets_);
    high = IERC20(high_);
    highUsdPriceFeed = highUsdPriceFeed_;
    ethUsdPriceFeed = ethUsdPriceFeed_;
    transferReceiver(receiver_);
  }

  function name() public view virtual returns (string memory) {
    return "Highstreet Assets Marketplace";
  }

  /**
    * @notice Transfer the receiver to new address
    *
    * @dev update the payment receiver, can refer to buy function for more detail
    * @param receiver_ new receiver address
    */
  function transferReceiver(address receiver_) public virtual onlyOwner {
    require(receiver_ != address(0), "invalid receiver address");
    _platfomReceiver = payable(receiver_);
    emit TransferReceiver(_msgSender(), receiver_);
  }

  /**
    * @notice Add new assets item to the marketplace
    *
    * @dev this function will also set the maximum supply in HighstreetAssets contract
    * @param id_ a number of id expected to create
    * @param item_ the speify token specification, more detail can refer to Item struct
    */
  function addItem(uint256 id_, Item memory item_) external onlyOwner {
    require(assets.minters(address(this)), "don't have minter role");
    require(saleList[id_].price == 0, "id have already in the list");
    require(item_.price > 0, "invalid price");
    saleList[id_] = item_;
    assets.setMaxSupply(id_, uint256(item_.maxSupply));
    idList.push(id_);
    emit Add(id_, item_);
  }

  /**
    * @notice Update the token specification based on the type and data
    *
    * @dev should be very careful about the RESET InputType, will clear the existing count
    * @param id_ a number of id expected to update
    * @param type_ specify the which type of specification
    * @param data_ the new value to be updated
    */
  function updateItem(uint256 id_, InputType type_, uint256 data_) external onlyOwner {
    require(saleList[id_].price != 0, "id isn't existing");
    // setup price
    if(type_ == InputType.PRICE) {
      require(data_ != 0, "invalid price");
      saleList[id_].price = data_;
    }
    //reset count
    if (type_ == InputType.RESET) {
      saleList[id_].count = 0;
    }
    //update max supply
    if (type_ == InputType.MAX) {
      saleList[id_].maxCanSell = uint32(data_);
    } else if (type_ == InputType.TOTAL) {
      saleList[id_].maxSupply = uint32(data_);
      assets.setMaxSupply(id_, uint256(data_));
    } else if (type_ == InputType.RESTRICT) {
      saleList[id_].restriction = uint16(data_);
    }
    //update time
    if (type_ == InputType.START) {
      saleList[id_].startTime = uint64(data_);
    } else if (type_ == InputType.END) {
      saleList[id_].endTime = uint64(data_);
    } else if (type_ == InputType.COOLDOWN) {
      saleList[id_].coolDownTime = uint16(data_);
    }
    emit Update(id_, type_, data_);
  }

  /**
    * @notice Receive the payment and mint the corresponding amount of token to the sender
    *
    * @dev the function supports both HIGH and ETH
    * @dev if msg.value is not zero will recognize ETH as payment currency
    *
    * @param ids_ array of ids to buy
    * @param amounts_ array of amounts of tokens to buy per id
    */
  function buy(uint256[] memory ids_, uint256[] memory amounts_) external payable virtual nonReentrant whenNotPaused {
    _deal(ids_, amounts_, _msgSender());
  }

  /**
    * @notice Receive the payment and mint the corresponding amount of token to the receiver
    *
    * @dev the function supports both HIGH and ETH
    * @dev if msg.value is not zero will recognize ETH as payment currency
    *
    * @param ids_ array of ids to buy
    * @param amounts_ array of amounts of tokens to buy per id
    * @param receiver_ an address to receive nft
    */
  function gifting(uint256[] memory ids_, uint256[] memory amounts_, address receiver_) external payable virtual nonReentrant whenNotPaused {
    _deal(ids_, amounts_, receiver_);
  }

  /**
    * @notice Internal function
    */
  function _deal(uint256[] memory ids_, uint256[] memory amounts_, address receiver_) internal virtual {
    uint256 eth =  msg.value;
    uint256 allowance = high.allowance(_msgSender(), address(this));
    require(eth != 0 || allowance != 0, "payment fail");
    bool isPaidByEth = eth != 0;

    uint256 totalPrice;
    uint256 priceInEth;
    for (uint256 i = 0; i < ids_.length; ++i) {
      uint256 id = ids_[i];
      uint256 amount = amounts_[i];
      Item memory item = saleList[id];
      require(item.price > 0, "id isn't existing");
      require(block.timestamp >= item.startTime, "sale haven't begin");
      require(item.endTime == 0 || block.timestamp <= item.endTime, "sale is closed");
      require(item.count + amount <= item.maxCanSell, "exceed max amount");
      if(item.restriction != 0) {
        require(amount <= item.restriction , "exceed max per buy");
        uint256 lastTime = coolDownTimer[_msgSender()][id];
        if( lastTime != 0) {
          require(block.timestamp - lastTime > item.coolDownTime, "waiting cool down");
        }
        coolDownTimer[_msgSender()][id] = block.timestamp;
      }
      totalPrice += item.price * amount;
    }

    if(isPaidByEth) {
      priceInEth = exchangeToETH(totalPrice);
      require(eth >= priceInEth, "not enough ether");
      uint256 reimburse = eth - priceInEth;
      Address.sendValue(payable(_platfomReceiver), priceInEth);
      Address.sendValue(payable(_msgSender()), reimburse);
    } else {
      SafeERC20.safeTransferFrom(high, _msgSender(), _platfomReceiver, totalPrice);
    }

    for (uint256 i = 0; i < ids_.length; ++i) {
      uint256 id = ids_[i];
      uint256 amount = amounts_[i];
      assets.mint( receiver_, id, amount, "");
      saleList[id].count += uint32(amount);
    }
    emit Deal(_msgSender(), receiver_, ids_, amounts_, isPaidByEth, isPaidByEth ? priceInEth : totalPrice);
  }

  /**
    * @notice Exchange the price from HIGH to ETH
    *
    * @param value the amount of HIGH token
    */
  function exchangeToETH(uint256 value) public view virtual returns (uint256) {
    int256 rate = getDerivedPrice(highUsdPriceFeed, ethUsdPriceFeed, CONST_EXCHANGE_RATE_DECIMAL);
    require(rate > 0, "invalid exchange rate");

    return value * uint256(rate) / 10 ** uint256(CONST_EXCHANGE_RATE_DECIMAL);
  }

  /**
    * @notice Get the exist item information in batch
    *
    * @return An array contains the information of all assets items
    */
  function getItemInfo() external view virtual returns (ItemDisplay[] memory) {
    ItemDisplay[] memory info = new ItemDisplay[](idList.length);
    for (uint256 i = 0; i < idList.length; ++i) {
      uint256 id = idList[i];
      info[i].id = id;
      info[i].price = saleList[id].price;
      info[i].startTime = saleList[id].startTime;
      info[i].endTime = saleList[id].endTime;
      info[i].count = saleList[id].count;
      info[i].restriction = saleList[id].restriction;
      info[i].maxCanSell = saleList[id].maxCanSell;
      info[i].maxSupply = saleList[id].maxSupply;
      info[i].coolDownTime = saleList[id].coolDownTime;
    }
    return info;
  }

  /**
    * @notice Get user's cool dowm time information in batch
    *
    * @return An array contains all informations
    */
  function getCoolDownInfo(address user_) external view virtual returns (CoolDownTimeDisplay[] memory) {
    CoolDownTimeDisplay[] memory info = new CoolDownTimeDisplay[](idList.length);
    for (uint256 i = 0; i < idList.length; ++i) {
      uint256 id = idList[i];
      info[i].id = id;
      info[i].coolDownTime = coolDownTimer[user_][id] + saleList[id].coolDownTime;
    }
    return info;
  }

  function pause() external virtual onlyOwner {
    _pause();
  }

  function unpause() external virtual onlyOwner {
    _unpause();
  }

  /**
    * @dev The Ether received will be logged with {Received} events. Note that these events are not fully
    * reliable: it's possible for a contract to receive Ether without triggering this function.
    */
  receive() external payable virtual {
      emit Received(_msgSender(), msg.value);
  }
}

File 2 of 21 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
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() {
        _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());
    }
}

File 5 of 21 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 21 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 7 of 21 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 8 of 21 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 9 of 21 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 10 of 21 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] -= amounts[i];
            }
        }
    }
}

File 11 of 21 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 12 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 13 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 19 of 21 : HighstreetAssets.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "./utils/MinterAccessControl.sol";

/** @title The ERC1155 contract of Highstreet Asset */
contract HighstreetAssets is Context, ERC1155Burnable, ERC1155Supply, Ownable, MinterAccessControl {

  using Strings for uint256;

  // Token name
  string private _name;

  // Token symbol
  string private _symbol;

  /// @dev a string of base uri for this nft
  string private _baseUri;

  mapping(uint256 => uint256) private _maxSupply;

  event SetMaxSupply(uint256 indexed id, uint256 amount);

  /**
    * @dev Fired in updateBaseUri()
    *
    * @param sender an address which performed an operation, usually contract owner
    * @param uri a stringof base uri for this nft
    */
  event UpdateBaseUri(address indexed sender, string uri);


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

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

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

  function decimals() public view virtual returns (uint8) {
    return 0;
  }

  /**
    * @notice Creates `amount` tokens of token type `id`, and assigns them to `to`.
    *
    * @dev this function can only be called by minter
    *
    * @param to_ an address which received nft
    * @param id_ a number of id expected to mint
    * @param amount_ a number of amount of token be minted
    */
  function mint(
    address to_,
    uint256 id_,
    uint256 amount_,
    bytes memory data_
  ) public virtual onlyMinter {
    _mint(to_, id_, amount_, data_);
  }

  /**
    * @notice Creates `amount` tokens of token type `id`, and assigns them to `to`.
    *
    * @dev this function can only be called by minter
    * @dev `ids` and `amounts` must have the same length.
    *
    * @param to_ an address which received nft
    * @param ids_ a number of id expected to mint
    * @param amounts_ a number of amount of token be minted
    */
  function mintBatch(
    address to_,
    uint256[] memory ids_,
    uint256[] memory amounts_,
    bytes memory data_
  ) public virtual onlyMinter {
    _mintBatch(to_, ids_, amounts_, data_);
  }

  /**
    * @dev Hook that is called before any token transfer. This includes minting
    * and burning.
    *
    * @dev Additionally to the parent smart contract, restrict this contract can not be receiver.
    */
  function _beforeTokenTransfer(
      address operator_,
      address from_,
      address to_,
      uint256[] memory ids_,
      uint256[] memory amounts_,
      bytes memory data_
  ) internal virtual override(ERC1155, ERC1155Supply) {
    require(to_ != address(this), "this contract cannot be receiver");

    if (from_ == address(0)) {
      for (uint256 i = 0; i < ids_.length; ++i) {
        uint256 id = ids_[i];
        if(isLimited(id)) {
          require(totalSupply(id) + amounts_[i] <= maxSupply(id), "exceed max amount");
        }
      }
    }

    super._beforeTokenTransfer(operator_, from_, to_, ids_, amounts_, data_);
  }

  /**
    * @notice Check whether the token id has maximum supply or not.
    *
    * @param id_ a number of id expected to check
    * @return the boolean result
    */
  function isLimited(uint256 id_) public view virtual returns (bool) {
    return _maxSupply[id_] > 0;
  }

  /**
    * @notice Query the maximum supply of specified token id
    *
    * @param id_ a number of id expected to check
    * @return the value of maximum supply 
    */
  function maxSupply(uint256 id_) public view virtual returns (uint256) {
    return _maxSupply[id_];
  }

  /**
    * @notice Set the maximum supply of specified token id
    *
    * @dev this function can only be called by minter
    * @param id_ a number of id expected to set
    * @param amount_ the amount of maximum supply
    */
  function setMaxSupply(uint256 id_, uint256 amount_) external virtual onlyMinter {
    require(amount_ >= totalSupply(id_), "invalid amount");
    _maxSupply[id_] = amount_;
    emit SetMaxSupply(id_, amount_);
  }

  /**
    * @dev  See {IERC1155MetadataURI-uri}.
    * @dev Additionally to the parent smart contract, return string of uri based on id
    */
  function uri(uint256 id_) public view virtual override returns (string memory) {
    require(exists(id_), "URI query for nonexistent token");
    return bytes(_baseUri).length > 0 ? string(abi.encodePacked(_baseUri, id_.toString())) : "";
  }

  /**
    * @notice Service function to update base uri
    *
    * @dev this function can only be called by owner
    *
    * @param uri_ a string for updating base uri
    */
  function updateBaseUri(string memory uri_) public virtual onlyOwner {
    _baseUri = uri_;
    emit UpdateBaseUri(_msgSender(), uri_);
  }

  /**
    * @dev  See {MinterAccessControl-_grantMinterRole}.
    *
    */
  function grantMinterRole(address addr_) external virtual onlyOwner {
    super._grantMinterRole(addr_);
  }

  /**
    * @dev  See {MinterAccessControl-_revokeMinterRole}.
    *
    */
  function revokeMinterRole(address addr_) external virtual onlyOwner {
    super._revokeMinterRole(addr_);
  }
}

File 20 of 21 : MinterAccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

abstract contract MinterAccessControl {

  /// @dev a list of minter role, and only minter can mint nft
  mapping(address => bool) public minters;

  /**
    * @dev Fired in grantMinterRole()
    *
    * @param sender an address which performed an operation, usually contract owner
    * @param account an address which is granted minter role
    */
  event MinterRoleGranted(address indexed sender, address indexed account);

  /**
    * @dev Fired in revokeMinterRole()
    *
    * @param sender an address which performed an operation, usually contract owner
    * @param account an address which is revoked minter role
    */
  event MinterRoleRevoked(address indexed sender, address indexed account);

  /**
    * @notice Service function to grant minter role
    *
    * @dev this function can only be called by owner
    *
    * @param addr_ an address which is granted minter role
    */
  function _grantMinterRole(address addr_) internal virtual {
    require(addr_ != address(0), "invalid address");
    minters[addr_] = true;
    emit MinterRoleGranted(msg.sender, addr_);
  }

  /**
    * @notice Service function to revoke minter role
    *
    * @dev this function can only be called by owner
    *
    * @param addr_ an address which is revorked minter role
    */
  function _revokeMinterRole(address addr_) internal virtual {
    require(addr_ != address(0), "invalid address");
    minters[addr_] = false;
    emit MinterRoleRevoked(msg.sender, addr_);
  }

  /**
    * @dev Modifier that checks that an account has a minter role.
    *
    */
  modifier onlyMinter() {
      require(minters[msg.sender] == true, "permission denied");
      _;
  }


}

File 21 of 21 : PriceConverter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

contract PriceConverter {
  function getDerivedPrice(address _base, address _quote, uint8 _decimals)
    public
    view
    returns (int256)
  {
    require(_decimals > uint8(0) && _decimals <= uint8(18), "Invalid _decimals");
    int256 decimals = int256(10 ** uint256(_decimals));
    ( , int256 basePrice, , , ) = AggregatorV3Interface(_base).latestRoundData();
    uint8 baseDecimals = AggregatorV3Interface(_base).decimals();
    basePrice = scalePrice(basePrice, baseDecimals, _decimals);

    ( , int256 quotePrice, , , ) = AggregatorV3Interface(_quote).latestRoundData();
    uint8 quoteDecimals = AggregatorV3Interface(_quote).decimals();
    quotePrice = scalePrice(quotePrice, quoteDecimals, _decimals);

    return basePrice * decimals / quotePrice;
  }

  function scalePrice(int256 _price, uint8 _priceDecimals, uint8 _decimals)
    internal
    pure
    returns (int256)
  {
    if (_priceDecimals < _decimals) {
      return _price * int256(10 ** uint256(_decimals - _priceDecimals));
    } else if (_priceDecimals > _decimals) {
      return _price / int256(10 ** uint256(_priceDecimals - _decimals));
    }
    return _price;
  }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 99999
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"assets_","type":"address"},{"internalType":"address","name":"receiver_","type":"address"},{"internalType":"address","name":"high_","type":"address"},{"internalType":"address","name":"highUsdPriceFeed_","type":"address"},{"internalType":"address","name":"ethUsdPriceFeed_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint32","name":"count","type":"uint32"},{"internalType":"uint32","name":"maxCanSell","type":"uint32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint16","name":"restriction","type":"uint16"},{"internalType":"uint16","name":"coolDownTime","type":"uint16"}],"indexed":false,"internalType":"struct HighstreetAssetsMarketplace.Item","name":"item","type":"tuple"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"isPaidByEth","type":"bool"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Deal","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":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"newReciever","type":"address"}],"name":"TransferReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"enum HighstreetAssetsMarketplace.InputType","name":"inputType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"data","type":"uint256"}],"name":"Update","type":"event"},{"inputs":[],"name":"CONST_EXCHANGE_RATE_DECIMAL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint32","name":"count","type":"uint32"},{"internalType":"uint32","name":"maxCanSell","type":"uint32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint16","name":"restriction","type":"uint16"},{"internalType":"uint16","name":"coolDownTime","type":"uint16"}],"internalType":"struct HighstreetAssetsMarketplace.Item","name":"item_","type":"tuple"}],"name":"addItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assets","outputs":[{"internalType":"contract HighstreetAssets","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids_","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts_","type":"uint256[]"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"coolDownTimer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethUsdPriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"exchangeToETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"getCoolDownInfo","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"coolDownTime","type":"uint256"}],"internalType":"struct HighstreetAssetsMarketplace.CoolDownTimeDisplay[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_base","type":"address"},{"internalType":"address","name":"_quote","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"getDerivedPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getItemInfo","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint32","name":"count","type":"uint32"},{"internalType":"uint32","name":"maxCanSell","type":"uint32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint16","name":"restriction","type":"uint16"},{"internalType":"uint16","name":"coolDownTime","type":"uint16"}],"internalType":"struct HighstreetAssetsMarketplace.ItemDisplay[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids_","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts_","type":"uint256[]"},{"internalType":"address","name":"receiver_","type":"address"}],"name":"gifting","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"high","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"highUsdPriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"","type":"uint256"}],"name":"saleList","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint32","name":"count","type":"uint32"},{"internalType":"uint32","name":"maxCanSell","type":"uint32"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint16","name":"restriction","type":"uint16"},{"internalType":"uint16","name":"coolDownTime","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver_","type":"address"}],"name":"transferReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"enum HighstreetAssetsMarketplace.InputType","name":"type_","type":"uint8"},{"internalType":"uint256","name":"data_","type":"uint256"}],"name":"updateItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b50604051620041ea380380620041ea8339810160408190526200003591620003c6565b62000040336200023f565b600180556002805460ff191690556001600160a01b038516620000aa5760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642061737365747320616464726573730000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038416620001025760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207265636569766572206164647265737300000000000000006044820152606401620000a1565b6001600160a01b0383166200015a5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206869676820616464726573730000000000000000000000006044820152606401620000a1565b6001600160a01b038216620001b25760405162461bcd60e51b815260206004820152601f60248201527f696e76616c696420686967682061676772656761746f722061646472657373006044820152606401620000a1565b6001600160a01b0381166200020a5760405162461bcd60e51b815260206004820152601e60248201527f696e76616c6964206574682061676772656761746f72206164647265737300006044820152606401620000a1565b6001600160a01b0380861660805283811660a05282811660c052811660e05262000234846200028f565b505050505062000436565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620002eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000a1565b6001600160a01b038116620003435760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207265636569766572206164647265737300000000000000006044820152606401620000a1565b60028054610100600160a81b0319166101006001600160a01b03841690810291909117909155620003713390565b6001600160a01b03167f32e51f62a857a441425ef752ee98638e34990146f594c565858d7064f18bc8c460405160405180910390a350565b80516001600160a01b0381168114620003c157600080fd5b919050565b600080600080600060a08688031215620003df57600080fd5b620003ea86620003a9565b9450620003fa60208701620003a9565b93506200040a60408701620003a9565b92506200041a60608701620003a9565b91506200042a60808701620003a9565b90509295509295909350565b60805160a05160c05160e051613d42620004a8600039600081816103090152611ede0152600081816104e90152611ebd0152600081816103a5015281816120c501526127910152600081816103ee01528181610b29015281816119e901528181611dd101526128820152613d426000f3fe60806040526004361061018f5760003560e01c806371a97305116100d6578063a26653581161007f578063e0c60f1d11610059578063e0c60f1d1461052b578063f2fde38b1461054b578063fe4de60c1461056b57600080fd5b8063a2665358146104aa578063b566e002146104d7578063dbcb99951461050b57600080fd5b80638da5cb5b116100b05780638da5cb5b1461044c57806395b3d6aa14610477578063974366551461048a57600080fd5b806371a97305146103dc5780638456cb5914610410578063860d1eb71461042557600080fd5b80633f4ba83a116101385780636313531f116101125780636313531f14610373578063713658f314610393578063715018a6146103c757600080fd5b80633f4ba83a146102e257806342f6fb29146102f75780635c975abb1461035057600080fd5b80633171330511610169578063317133051461028d57806336cb4d96146102ad5780633a8bf241146102c057600080fd5b806306fdde03146101d05780631e59ded3146102255780632e1f11241461024757600080fd5b366101cb5760405134815233907f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258749060200160405180910390a2005b600080fd5b3480156101dc57600080fd5b50604080518082018252601d81527f4869676873747265657420417373657473204d61726b6574706c6163650000006020820152905161021c9190613173565b60405180910390f35b34801561023157600080fd5b506102456102403660046131ed565b6106b2565b005b34801561025357600080fd5b5061027f610262366004613208565b600560209081526000928352604080842090915290825290205481565b60405190815260200161021c565b34801561029957600080fd5b506102456102a8366004613232565b61082d565b6102456102bb366004613375565b610d9b565b3480156102cc57600080fd5b506102d5610e93565b60405161021c91906133d9565b3480156102ee57600080fd5b50610245611245565b34801561030357600080fd5b5061032b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021c565b34801561035c57600080fd5b5060025460ff16604051901515815260200161021c565b34801561037f57600080fd5b5061027f61038e36600461349a565b6112d0565b34801561039f57600080fd5b5061032b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d357600080fd5b506102456112f1565b3480156103e857600080fd5b5061032b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041c57600080fd5b5061024561137c565b34801561043157600080fd5b5061043a601281565b60405160ff909116815260200161021c565b34801561045857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661032b565b6102456104853660046134b3565b611405565b34801561049657600080fd5b5061027f6104a5366004613536565b6114fe565b3480156104b657600080fd5b506104ca6104c53660046131ed565b6117dc565b60405161021c919061357d565b3480156104e357600080fd5b5061032b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051757600080fd5b506102456105263660046135fd565b61193a565b34801561053757600080fd5b5061027f61054636600461349a565b611eb5565b34801561055757600080fd5b506102456105663660046131ed565b611f90565b34801561057757600080fd5b5061065a61058636600461349a565b6004602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000081049091169063ffffffff700100000000000000000000000000000000820481169174010000000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000008204169061ffff7c010000000000000000000000000000000000000000000000000000000082048116917e0100000000000000000000000000000000000000000000000000000000000090041688565b6040805198895267ffffffffffffffff97881660208a0152969095169587019590955263ffffffff928316606087015290821660808601521660a084015261ffff91821660c08401521660e08201526101000161021c565b60005473ffffffffffffffffffffffffffffffffffffffff163314610738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166107b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e76616c696420726563656976657220616464726573730000000000000000604482015260640161072f565b600280547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff84169081029190911790915560405133907f32e51f62a857a441425ef752ee98638e34990146f594c565858d7064f18bc8c490600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b600083815260046020526040902054610923576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f69642069736e2774206578697374696e67000000000000000000000000000000604482015260640161072f565b6000826007811115610937576109376136db565b14156109b657806109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420707269636500000000000000000000000000000000000000604482015260640161072f565b60008381526004602052604090208190555b60048260078111156109ca576109ca6136db565b1415610a0857600083815260046020526040902060010180547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1690555b6001826007811115610a1c57610a1c6136db565b1415610a7d57600083815260046020526040902060010180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff841602179055610c16565b6002826007811115610a9157610a916136db565b1415610b9f5760008381526004602081905260409182902060010180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff86160217905590517f37da577c000000000000000000000000000000000000000000000000000000008152908101849052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906337da577c90604401600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b50505050610c16565b6003826007811115610bb357610bb36136db565b1415610c1657600083815260046020526040902060010180547fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000061ffff8416021790555b6005826007811115610c2a57610c2a6136db565b1415610c7857600083815260046020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8316179055610d5c565b6006826007811115610c8c57610c8c6136db565b1415610ce557600083815260046020526040902060010180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff841602179055610d5c565b6007826007811115610cf957610cf96136db565b1415610d5c57600083815260046020526040902060010180547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0100000000000000000000000000000000000000000000000000000000000061ffff8416021790555b827f362323b1be23c5323eca6884496c718c3dae5e6de27be827e777408d39cfe4ce8383604051610d8e92919061370a565b60405180910390a2505050565b60026001541415610e08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072f565b6002600155610e1960025460ff1690565b15610e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b610e8b8282336120c0565b505060018055565b60035460609060009067ffffffffffffffff811115610eb457610eb461326e565b604051908082528060200260200182016040528015610f4957816020015b604080516101208101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610ed25790505b50905060005b60035481101561123f57600060038281548110610f6e57610f6e61374f565b9060005260206000200154905080838381518110610f8e57610f8e61374f565b602090810291909101810151919091526000828152600490915260409020548351849084908110610fc157610fc161374f565b602090810291909101810151810191909152600082815260049091526040902060010154835167ffffffffffffffff909116908490849081106110065761100661374f565b60209081029190910181015167ffffffffffffffff92831660409182015260008481526004909252902060010154845168010000000000000000909104909116908490849081106110595761105961374f565b60200260200101516060019067ffffffffffffffff16908167ffffffffffffffff16815250506004600082815260200190815260200160002060010160109054906101000a900463ffffffff168383815181106110b8576110b861374f565b60200260200101516080019063ffffffff16908163ffffffff168152505060046000828152602001908152602001600020600101601c9054906101000a900461ffff1683838151811061110d5761110d61374f565b602002602001015160e0019061ffff16908161ffff16815250506004600082815260200190815260200160002060010160149054906101000a900463ffffffff168383815181106111605761116061374f565b60209081029190910181015163ffffffff92831660a09091015260008381526004909152604090206001015484517801000000000000000000000000000000000000000000000000909104909116908490849081106111c1576111c161374f565b602002602001015160c0019063ffffffff16908163ffffffff168152505060046000828152602001908152602001600020600101601e9054906101000a900461ffff168383815181106112165761121661374f565b602090810291909101015161ffff9091166101009091015250611238816137ad565b9050610f4f565b50919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce6129ba565b565b600381815481106112e057600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314611372576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce6000612a9b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146113fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce612b10565b60026001541415611472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072f565b600260015561148360025460ff1690565b156114ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b6114f58383836120c0565b50506001805550565b600060ff8216158015906115165750601260ff831611155b61157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964205f646563696d616c73000000000000000000000000000000604482015260640161072f565b600061158c60ff8416600a613908565b905060008573ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e919061392e565b50505091505060008673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561165c57600080fd5b505afa158015611670573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611694919061397e565b90506116a1828287612bd0565b915060008673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156116eb57600080fd5b505afa1580156116ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611723919061392e565b50505091505060008773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561177157600080fd5b505afa158015611785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a9919061397e565b90506117b6828289612bd0565b9150816117c3868661399b565b6117cd9190613a86565b955050505050505b9392505050565b60035460609060009067ffffffffffffffff8111156117fd576117fd61326e565b60405190808252806020026020018201604052801561184257816020015b604080518082019091526000808252602082015281526020019060019003908161181b5790505b50905060005b600354811015611933576000600382815481106118675761186761374f565b90600052602060002001549050808383815181106118875761188761374f565b6020908102919091018101519190915260008281526004825260408082206001015473ffffffffffffffffffffffffffffffffffffffff8916835260058452818320858452909352902054611902917e01000000000000000000000000000000000000000000000000000000000000900461ffff1690613aee565b8383815181106119145761191461374f565b60209081029190910181015101525061192c816137ad565b9050611848565b5092915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6040517ff46eccc40000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f46eccc49060240160206040518083038186803b158015611a4057600080fd5b505afa158015611a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a789190613b06565b611ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f646f6e27742068617665206d696e74657220726f6c6500000000000000000000604482015260640161072f565b60008281526004602052604090205415611b54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6964206861766520616c726561647920696e20746865206c6973740000000000604482015260640161072f565b8051611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420707269636500000000000000000000000000000000000000604482015260640161072f565b600082815260046020818152604092839020845181559084015160019091018054858501516060870151608088015160a089015160c08a015160e08b015167ffffffffffffffff9889167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090971696909617680100000000000000009890951697909702939093177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff938416027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16177401000000000000000000000000000000000000000091831691909102177fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff167801000000000000000000000000000000000000000000000000919092169081027fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919091177c010000000000000000000000000000000000000000000000000000000061ffff95861602177dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000949092169390930217905591517f37da577c00000000000000000000000000000000000000000000000000000000815290810184905260248101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906337da577c90604401600060405180830381600087803b158015611e2a57600080fd5b505af1158015611e3e573d6000803e3d6000fd5b5050600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01849055505060405182907fcf405fdfb33affaa55e05334a0ac989bd36fd2a97128579b8ff0a1556728221190611ea9908490613b28565b60405180910390a25050565b600080611f047f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060126114fe565b905060008113611f70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c69642065786368616e676520726174650000000000000000000000604482015260640161072f565b611f7c6012600a613908565b611f868285613bb0565b6117d59190613bed565b60005473ffffffffffffffffffffffffffffffffffffffff163314612011576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b73ffffffffffffffffffffffffffffffffffffffff81166120b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161072f565b6120bd81612a9b565b50565b3460007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015230602482015260440160206040518083038186803b15801561216a57600080fd5b505afa15801561217e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a29190613c01565b9050811515806121b157508015155b612217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f7061796d656e74206661696c0000000000000000000000000000000000000000604482015260640161072f565b811515600080805b88518110156126c957600089828151811061223c5761223c61374f565b60200260200101519050600089838151811061225a5761225a61374f565b602090810291909101810151600084815260048352604090819020815161010081018352815480825260019092015467ffffffffffffffff808216968301969096526801000000000000000081049095169281019290925263ffffffff70010000000000000000000000000000000085048116606084015274010000000000000000000000000000000000000000850481166080840152780100000000000000000000000000000000000000000000000085041660a083015261ffff7c01000000000000000000000000000000000000000000000000000000008504811660c08401527e0100000000000000000000000000000000000000000000000000000000000090940490931660e0820152909250906123d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f69642069736e2774206578697374696e67000000000000000000000000000000604482015260640161072f565b806020015167ffffffffffffffff1642101561244a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f73616c6520686176656e277420626567696e0000000000000000000000000000604482015260640161072f565b604081015167ffffffffffffffff1615806124735750806040015167ffffffffffffffff164211155b6124d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f73616c6520697320636c6f736564000000000000000000000000000000000000604482015260640161072f565b806080015163ffffffff1682826060015163ffffffff166124fa9190613aee565b1115612562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f657863656564206d617820616d6f756e74000000000000000000000000000000604482015260640161072f565b60c081015161ffff161561269c578060c0015161ffff168211156125e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f657863656564206d617820706572206275790000000000000000000000000000604482015260640161072f565b336000908152600560209081526040808320868452909152902054801561267d5760e082015161ffff166126168242613c1a565b1161267d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f77616974696e6720636f6f6c20646f776e000000000000000000000000000000604482015260640161072f565b5033600090815260056020908152604080832086845290915290204290555b80516126a9908390613bb0565b6126b39087613aee565b9550505050806126c2906137ad565b905061221f565b50821561278c576126d982611eb5565b905080851015612745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f75676820657468657200000000000000000000000000000000604482015260640161072f565b60006127518287613c1a565b60025490915061277c90610100900473ffffffffffffffffffffffffffffffffffffffff1683612c41565b6127863382612c41565b506127d5565b6127d57f000000000000000000000000000000000000000000000000000000000000000033600254610100900473ffffffffffffffffffffffffffffffffffffffff1685612da0565b60005b885181101561294e5760008982815181106127f5576127f561374f565b6020026020010151905060008983815181106128135761281361374f565b60209081029190910101516040517f731133e900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152602482018590526044820183905260806064830152600060848301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063731133e99060a401600060405180830381600087803b1580156128c857600080fd5b505af11580156128dc573d6000803e3d6000fd5b5050506000838152600460205260409020600101805483925060109061291d908490700100000000000000000000000000000000900463ffffffff16613c31565b92506101000a81548163ffffffff021916908363ffffffff160217905550505080612947906137ad565b90506127d8565b5073ffffffffffffffffffffffffffffffffffffffff8616337f13ea408bc7a45f5f76d23b1244dfd0b367589939fe907ba058527974e66d8b188a8a87806129965787612998565b865b6040516129a89493929190613c94565b60405180910390a35050505050505050565b60025460ff16612a26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161072f565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1615612b7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a713390565b60008160ff168360ff161015612c0957612bea8383613ccd565b612bf89060ff16600a613908565b612c02908561399b565b90506117d5565b8160ff168360ff161115612c3957612c218284613ccd565b612c2f9060ff16600a613908565b612c029085613a86565b509192915050565b80471015612cab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161072f565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612d05576040519150601f19603f3d011682016040523d82523d6000602084013e612d0a565b606091505b5050905080612d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161072f565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612e35908590612e3b565b50505050565b6000612e9d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f479092919063ffffffff16565b805190915015612d9b5780806020019051810190612ebb9190613b06565b612d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161072f565b6060612f568484600085612f5e565b949350505050565b606082471015612ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161072f565b73ffffffffffffffffffffffffffffffffffffffff85163b61306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161072f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516130979190613cf0565b60006040518083038185875af1925050503d80600081146130d4576040519150601f19603f3d011682016040523d82523d6000602084013e6130d9565b606091505b50915091506130e98282866130f4565b979650505050505050565b606083156131035750816117d5565b8251156131135782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072f9190613173565b60005b8381101561316257818101518382015260200161314a565b83811115612e355750506000910152565b6020815260008251806020840152613192816040850160208701613147565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146131e857600080fd5b919050565b6000602082840312156131ff57600080fd5b6117d5826131c4565b6000806040838503121561321b57600080fd5b613224836131c4565b946020939093013593505050565b60008060006060848603121561324757600080fd5b8335925060208401356008811061325d57600080fd5b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff811182821017156132c1576132c161326e565b60405290565b600082601f8301126132d857600080fd5b8135602067ffffffffffffffff808311156132f5576132f561326e565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811084821117156133385761333861326e565b60405293845285810183019383810192508785111561335657600080fd5b83870191505b848210156130e95781358352918301919083019061335c565b6000806040838503121561338857600080fd5b823567ffffffffffffffff808211156133a057600080fd5b6133ac868387016132c7565b935060208501359150808211156133c257600080fd5b506133cf858286016132c7565b9150509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561348d5781518051855286810151878601528581015167ffffffffffffffff908116878701526060808301519091169086015260808082015163ffffffff9081169187019190915260a08083015182169087015260c0808301519091169086015260e08082015161ffff9081169187019190915261010091820151169085015261012090930192908501906001016133f6565b5091979650505050505050565b6000602082840312156134ac57600080fd5b5035919050565b6000806000606084860312156134c857600080fd5b833567ffffffffffffffff808211156134e057600080fd5b6134ec878388016132c7565b9450602086013591508082111561350257600080fd5b5061350f868287016132c7565b92505061351e604085016131c4565b90509250925092565b60ff811681146120bd57600080fd5b60008060006060848603121561354b57600080fd5b613554846131c4565b9250613562602085016131c4565b9150604084013561357281613527565b809150509250925092565b602080825282518282018190526000919060409081850190868401855b8281101561348d5781518051855286015186850152928401929085019060010161359a565b803567ffffffffffffffff811681146131e857600080fd5b803563ffffffff811681146131e857600080fd5b803561ffff811681146131e857600080fd5b60008082840361012081121561361257600080fd5b83359250610100807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301121561364857600080fd5b61365061329d565b915060208501358252613665604086016135bf565b6020830152613676606086016135bf565b6040830152613687608086016135d7565b606083015261369860a086016135d7565b60808301526136a960c086016135d7565b60a08301526136ba60e086016135eb565b60c08301526136ca8186016135eb565b60e083015250809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6040810160088410613745577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9281526020015290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156137df576137df61377e565b5060010190565b600181815b8085111561383f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156138255761382561377e565b8085161561383257918102915b93841c93908002906137eb565b509250929050565b60008261385657506001613902565b8161386357506000613902565b816001811461387957600281146138835761389f565b6001915050613902565b60ff8411156138945761389461377e565b50506001821b613902565b5060208310610133831016604e8410600b84101617156138c2575081810a613902565b6138cc83836137e6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156138fe576138fe61377e565b0290505b92915050565b60006117d58383613847565b805169ffffffffffffffffffff811681146131e857600080fd5b600080600080600060a0868803121561394657600080fd5b61394f86613914565b945060208601519350604086015192506060860151915061397260808701613914565b90509295509295909350565b60006020828403121561399057600080fd5b81516117d581613527565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156139dc576139dc61377e565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613a1757613a1761377e565b60008712925087820587128484161615613a3357613a3361377e565b87850587128184161615613a4957613a4961377e565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613a9557613a95613a57565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615613ae957613ae961377e565b500590565b60008219821115613b0157613b0161377e565b500190565b600060208284031215613b1857600080fd5b815180151581146117d557600080fd5b60006101008201905082518252602083015167ffffffffffffffff80821660208501528060408601511660408501525050606083015163ffffffff80821660608501528060808601511660808501528060a08601511660a0850152505060c0830151613b9a60c084018261ffff169052565b5060e083015161193360e084018261ffff169052565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613be857613be861377e565b500290565b600082613bfc57613bfc613a57565b500490565b600060208284031215613c1357600080fd5b5051919050565b600082821015613c2c57613c2c61377e565b500390565b600063ffffffff808316818516808303821115613c5057613c5061377e565b01949350505050565b600081518084526020808501945080840160005b83811015613c8957815187529582019590820190600101613c6d565b509495945050505050565b608081526000613ca76080830187613c59565b8281036020840152613cb98187613c59565b941515604084015250506060015292915050565b600060ff821660ff841680821015613ce757613ce761377e565b90039392505050565b60008251613d02818460208701613147565b919091019291505056fea264697066735822122020c7330f1d9af604cf181a783cd73a542f29a4504b4fb6c97591d391e27e990f64736f6c634300080900330000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f76000000000000000000000000ac8973fcee131766cb0a077f730b28defbaf2e7900000000000000000000000071ab77b7dbb4fa7e017bc15090b2163221420282000000000000000000000000e2f95bc12fe8a3c35684be7586c39fd7c0e5b4030000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419

Deployed Bytecode

0x60806040526004361061018f5760003560e01c806371a97305116100d6578063a26653581161007f578063e0c60f1d11610059578063e0c60f1d1461052b578063f2fde38b1461054b578063fe4de60c1461056b57600080fd5b8063a2665358146104aa578063b566e002146104d7578063dbcb99951461050b57600080fd5b80638da5cb5b116100b05780638da5cb5b1461044c57806395b3d6aa14610477578063974366551461048a57600080fd5b806371a97305146103dc5780638456cb5914610410578063860d1eb71461042557600080fd5b80633f4ba83a116101385780636313531f116101125780636313531f14610373578063713658f314610393578063715018a6146103c757600080fd5b80633f4ba83a146102e257806342f6fb29146102f75780635c975abb1461035057600080fd5b80633171330511610169578063317133051461028d57806336cb4d96146102ad5780633a8bf241146102c057600080fd5b806306fdde03146101d05780631e59ded3146102255780632e1f11241461024757600080fd5b366101cb5760405134815233907f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258749060200160405180910390a2005b600080fd5b3480156101dc57600080fd5b50604080518082018252601d81527f4869676873747265657420417373657473204d61726b6574706c6163650000006020820152905161021c9190613173565b60405180910390f35b34801561023157600080fd5b506102456102403660046131ed565b6106b2565b005b34801561025357600080fd5b5061027f610262366004613208565b600560209081526000928352604080842090915290825290205481565b60405190815260200161021c565b34801561029957600080fd5b506102456102a8366004613232565b61082d565b6102456102bb366004613375565b610d9b565b3480156102cc57600080fd5b506102d5610e93565b60405161021c91906133d9565b3480156102ee57600080fd5b50610245611245565b34801561030357600080fd5b5061032b7f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841981565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021c565b34801561035c57600080fd5b5060025460ff16604051901515815260200161021c565b34801561037f57600080fd5b5061027f61038e36600461349a565b6112d0565b34801561039f57600080fd5b5061032b7f00000000000000000000000071ab77b7dbb4fa7e017bc15090b216322142028281565b3480156103d357600080fd5b506102456112f1565b3480156103e857600080fd5b5061032b7f0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f7681565b34801561041c57600080fd5b5061024561137c565b34801561043157600080fd5b5061043a601281565b60405160ff909116815260200161021c565b34801561045857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661032b565b6102456104853660046134b3565b611405565b34801561049657600080fd5b5061027f6104a5366004613536565b6114fe565b3480156104b657600080fd5b506104ca6104c53660046131ed565b6117dc565b60405161021c919061357d565b3480156104e357600080fd5b5061032b7f000000000000000000000000e2f95bc12fe8a3c35684be7586c39fd7c0e5b40381565b34801561051757600080fd5b506102456105263660046135fd565b61193a565b34801561053757600080fd5b5061027f61054636600461349a565b611eb5565b34801561055757600080fd5b506102456105663660046131ed565b611f90565b34801561057757600080fd5b5061065a61058636600461349a565b6004602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000081049091169063ffffffff700100000000000000000000000000000000820481169174010000000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000008204169061ffff7c010000000000000000000000000000000000000000000000000000000082048116917e0100000000000000000000000000000000000000000000000000000000000090041688565b6040805198895267ffffffffffffffff97881660208a0152969095169587019590955263ffffffff928316606087015290821660808601521660a084015261ffff91821660c08401521660e08201526101000161021c565b60005473ffffffffffffffffffffffffffffffffffffffff163314610738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166107b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e76616c696420726563656976657220616464726573730000000000000000604482015260640161072f565b600280547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff84169081029190911790915560405133907f32e51f62a857a441425ef752ee98638e34990146f594c565858d7064f18bc8c490600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b600083815260046020526040902054610923576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f69642069736e2774206578697374696e67000000000000000000000000000000604482015260640161072f565b6000826007811115610937576109376136db565b14156109b657806109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420707269636500000000000000000000000000000000000000604482015260640161072f565b60008381526004602052604090208190555b60048260078111156109ca576109ca6136db565b1415610a0857600083815260046020526040902060010180547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1690555b6001826007811115610a1c57610a1c6136db565b1415610a7d57600083815260046020526040902060010180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff841602179055610c16565b6002826007811115610a9157610a916136db565b1415610b9f5760008381526004602081905260409182902060010180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff86160217905590517f37da577c000000000000000000000000000000000000000000000000000000008152908101849052602481018290527f0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f7673ffffffffffffffffffffffffffffffffffffffff16906337da577c90604401600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b50505050610c16565b6003826007811115610bb357610bb36136db565b1415610c1657600083815260046020526040902060010180547fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000061ffff8416021790555b6005826007811115610c2a57610c2a6136db565b1415610c7857600083815260046020526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8316179055610d5c565b6006826007811115610c8c57610c8c6136db565b1415610ce557600083815260046020526040902060010180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff841602179055610d5c565b6007826007811115610cf957610cf96136db565b1415610d5c57600083815260046020526040902060010180547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0100000000000000000000000000000000000000000000000000000000000061ffff8416021790555b827f362323b1be23c5323eca6884496c718c3dae5e6de27be827e777408d39cfe4ce8383604051610d8e92919061370a565b60405180910390a2505050565b60026001541415610e08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072f565b6002600155610e1960025460ff1690565b15610e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b610e8b8282336120c0565b505060018055565b60035460609060009067ffffffffffffffff811115610eb457610eb461326e565b604051908082528060200260200182016040528015610f4957816020015b604080516101208101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610ed25790505b50905060005b60035481101561123f57600060038281548110610f6e57610f6e61374f565b9060005260206000200154905080838381518110610f8e57610f8e61374f565b602090810291909101810151919091526000828152600490915260409020548351849084908110610fc157610fc161374f565b602090810291909101810151810191909152600082815260049091526040902060010154835167ffffffffffffffff909116908490849081106110065761100661374f565b60209081029190910181015167ffffffffffffffff92831660409182015260008481526004909252902060010154845168010000000000000000909104909116908490849081106110595761105961374f565b60200260200101516060019067ffffffffffffffff16908167ffffffffffffffff16815250506004600082815260200190815260200160002060010160109054906101000a900463ffffffff168383815181106110b8576110b861374f565b60200260200101516080019063ffffffff16908163ffffffff168152505060046000828152602001908152602001600020600101601c9054906101000a900461ffff1683838151811061110d5761110d61374f565b602002602001015160e0019061ffff16908161ffff16815250506004600082815260200190815260200160002060010160149054906101000a900463ffffffff168383815181106111605761116061374f565b60209081029190910181015163ffffffff92831660a09091015260008381526004909152604090206001015484517801000000000000000000000000000000000000000000000000909104909116908490849081106111c1576111c161374f565b602002602001015160c0019063ffffffff16908163ffffffff168152505060046000828152602001908152602001600020600101601e9054906101000a900461ffff168383815181106112165761121661374f565b602090810291909101015161ffff9091166101009091015250611238816137ad565b9050610f4f565b50919050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce6129ba565b565b600381815481106112e057600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314611372576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce6000612a9b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146113fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6112ce612b10565b60026001541415611472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072f565b600260015561148360025460ff1690565b156114ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b6114f58383836120c0565b50506001805550565b600060ff8216158015906115165750601260ff831611155b61157c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964205f646563696d616c73000000000000000000000000000000604482015260640161072f565b600061158c60ff8416600a613908565b905060008573ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e919061392e565b50505091505060008673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561165c57600080fd5b505afa158015611670573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611694919061397e565b90506116a1828287612bd0565b915060008673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156116eb57600080fd5b505afa1580156116ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611723919061392e565b50505091505060008773ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561177157600080fd5b505afa158015611785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a9919061397e565b90506117b6828289612bd0565b9150816117c3868661399b565b6117cd9190613a86565b955050505050505b9392505050565b60035460609060009067ffffffffffffffff8111156117fd576117fd61326e565b60405190808252806020026020018201604052801561184257816020015b604080518082019091526000808252602082015281526020019060019003908161181b5790505b50905060005b600354811015611933576000600382815481106118675761186761374f565b90600052602060002001549050808383815181106118875761188761374f565b6020908102919091018101519190915260008281526004825260408082206001015473ffffffffffffffffffffffffffffffffffffffff8916835260058452818320858452909352902054611902917e01000000000000000000000000000000000000000000000000000000000000900461ffff1690613aee565b8383815181106119145761191461374f565b60209081029190910181015101525061192c816137ad565b9050611848565b5092915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b6040517ff46eccc40000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f7673ffffffffffffffffffffffffffffffffffffffff169063f46eccc49060240160206040518083038186803b158015611a4057600080fd5b505afa158015611a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a789190613b06565b611ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f646f6e27742068617665206d696e74657220726f6c6500000000000000000000604482015260640161072f565b60008281526004602052604090205415611b54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6964206861766520616c726561647920696e20746865206c6973740000000000604482015260640161072f565b8051611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420707269636500000000000000000000000000000000000000604482015260640161072f565b600082815260046020818152604092839020845181559084015160019091018054858501516060870151608088015160a089015160c08a015160e08b015167ffffffffffffffff9889167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090971696909617680100000000000000009890951697909702939093177fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff938416027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16177401000000000000000000000000000000000000000091831691909102177fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff167801000000000000000000000000000000000000000000000000919092169081027fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919091177c010000000000000000000000000000000000000000000000000000000061ffff95861602177dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000949092169390930217905591517f37da577c00000000000000000000000000000000000000000000000000000000815290810184905260248101919091527f0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f7673ffffffffffffffffffffffffffffffffffffffff16906337da577c90604401600060405180830381600087803b158015611e2a57600080fd5b505af1158015611e3e573d6000803e3d6000fd5b5050600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01849055505060405182907fcf405fdfb33affaa55e05334a0ac989bd36fd2a97128579b8ff0a1556728221190611ea9908490613b28565b60405180910390a25050565b600080611f047f000000000000000000000000e2f95bc12fe8a3c35684be7586c39fd7c0e5b4037f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841960126114fe565b905060008113611f70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c69642065786368616e676520726174650000000000000000000000604482015260640161072f565b611f7c6012600a613908565b611f868285613bb0565b6117d59190613bed565b60005473ffffffffffffffffffffffffffffffffffffffff163314612011576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072f565b73ffffffffffffffffffffffffffffffffffffffff81166120b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161072f565b6120bd81612a9b565b50565b3460007f00000000000000000000000071ab77b7dbb4fa7e017bc15090b216322142028273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015230602482015260440160206040518083038186803b15801561216a57600080fd5b505afa15801561217e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a29190613c01565b9050811515806121b157508015155b612217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f7061796d656e74206661696c0000000000000000000000000000000000000000604482015260640161072f565b811515600080805b88518110156126c957600089828151811061223c5761223c61374f565b60200260200101519050600089838151811061225a5761225a61374f565b602090810291909101810151600084815260048352604090819020815161010081018352815480825260019092015467ffffffffffffffff808216968301969096526801000000000000000081049095169281019290925263ffffffff70010000000000000000000000000000000085048116606084015274010000000000000000000000000000000000000000850481166080840152780100000000000000000000000000000000000000000000000085041660a083015261ffff7c01000000000000000000000000000000000000000000000000000000008504811660c08401527e0100000000000000000000000000000000000000000000000000000000000090940490931660e0820152909250906123d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f69642069736e2774206578697374696e67000000000000000000000000000000604482015260640161072f565b806020015167ffffffffffffffff1642101561244a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f73616c6520686176656e277420626567696e0000000000000000000000000000604482015260640161072f565b604081015167ffffffffffffffff1615806124735750806040015167ffffffffffffffff164211155b6124d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f73616c6520697320636c6f736564000000000000000000000000000000000000604482015260640161072f565b806080015163ffffffff1682826060015163ffffffff166124fa9190613aee565b1115612562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f657863656564206d617820616d6f756e74000000000000000000000000000000604482015260640161072f565b60c081015161ffff161561269c578060c0015161ffff168211156125e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f657863656564206d617820706572206275790000000000000000000000000000604482015260640161072f565b336000908152600560209081526040808320868452909152902054801561267d5760e082015161ffff166126168242613c1a565b1161267d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f77616974696e6720636f6f6c20646f776e000000000000000000000000000000604482015260640161072f565b5033600090815260056020908152604080832086845290915290204290555b80516126a9908390613bb0565b6126b39087613aee565b9550505050806126c2906137ad565b905061221f565b50821561278c576126d982611eb5565b905080851015612745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f75676820657468657200000000000000000000000000000000604482015260640161072f565b60006127518287613c1a565b60025490915061277c90610100900473ffffffffffffffffffffffffffffffffffffffff1683612c41565b6127863382612c41565b506127d5565b6127d57f00000000000000000000000071ab77b7dbb4fa7e017bc15090b216322142028233600254610100900473ffffffffffffffffffffffffffffffffffffffff1685612da0565b60005b885181101561294e5760008982815181106127f5576127f561374f565b6020026020010151905060008983815181106128135761281361374f565b60209081029190910101516040517f731133e900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152602482018590526044820183905260806064830152600060848301529192507f0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f769091169063731133e99060a401600060405180830381600087803b1580156128c857600080fd5b505af11580156128dc573d6000803e3d6000fd5b5050506000838152600460205260409020600101805483925060109061291d908490700100000000000000000000000000000000900463ffffffff16613c31565b92506101000a81548163ffffffff021916908363ffffffff160217905550505080612947906137ad565b90506127d8565b5073ffffffffffffffffffffffffffffffffffffffff8616337f13ea408bc7a45f5f76d23b1244dfd0b367589939fe907ba058527974e66d8b188a8a87806129965787612998565b865b6040516129a89493929190613c94565b60405180910390a35050505050505050565b60025460ff16612a26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161072f565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1615612b7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161072f565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a713390565b60008160ff168360ff161015612c0957612bea8383613ccd565b612bf89060ff16600a613908565b612c02908561399b565b90506117d5565b8160ff168360ff161115612c3957612c218284613ccd565b612c2f9060ff16600a613908565b612c029085613a86565b509192915050565b80471015612cab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161072f565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612d05576040519150601f19603f3d011682016040523d82523d6000602084013e612d0a565b606091505b5050905080612d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161072f565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612e35908590612e3b565b50505050565b6000612e9d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f479092919063ffffffff16565b805190915015612d9b5780806020019051810190612ebb9190613b06565b612d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161072f565b6060612f568484600085612f5e565b949350505050565b606082471015612ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161072f565b73ffffffffffffffffffffffffffffffffffffffff85163b61306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161072f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516130979190613cf0565b60006040518083038185875af1925050503d80600081146130d4576040519150601f19603f3d011682016040523d82523d6000602084013e6130d9565b606091505b50915091506130e98282866130f4565b979650505050505050565b606083156131035750816117d5565b8251156131135782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072f9190613173565b60005b8381101561316257818101518382015260200161314a565b83811115612e355750506000910152565b6020815260008251806020840152613192816040850160208701613147565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146131e857600080fd5b919050565b6000602082840312156131ff57600080fd5b6117d5826131c4565b6000806040838503121561321b57600080fd5b613224836131c4565b946020939093013593505050565b60008060006060848603121561324757600080fd5b8335925060208401356008811061325d57600080fd5b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff811182821017156132c1576132c161326e565b60405290565b600082601f8301126132d857600080fd5b8135602067ffffffffffffffff808311156132f5576132f561326e565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811084821117156133385761333861326e565b60405293845285810183019383810192508785111561335657600080fd5b83870191505b848210156130e95781358352918301919083019061335c565b6000806040838503121561338857600080fd5b823567ffffffffffffffff808211156133a057600080fd5b6133ac868387016132c7565b935060208501359150808211156133c257600080fd5b506133cf858286016132c7565b9150509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561348d5781518051855286810151878601528581015167ffffffffffffffff908116878701526060808301519091169086015260808082015163ffffffff9081169187019190915260a08083015182169087015260c0808301519091169086015260e08082015161ffff9081169187019190915261010091820151169085015261012090930192908501906001016133f6565b5091979650505050505050565b6000602082840312156134ac57600080fd5b5035919050565b6000806000606084860312156134c857600080fd5b833567ffffffffffffffff808211156134e057600080fd5b6134ec878388016132c7565b9450602086013591508082111561350257600080fd5b5061350f868287016132c7565b92505061351e604085016131c4565b90509250925092565b60ff811681146120bd57600080fd5b60008060006060848603121561354b57600080fd5b613554846131c4565b9250613562602085016131c4565b9150604084013561357281613527565b809150509250925092565b602080825282518282018190526000919060409081850190868401855b8281101561348d5781518051855286015186850152928401929085019060010161359a565b803567ffffffffffffffff811681146131e857600080fd5b803563ffffffff811681146131e857600080fd5b803561ffff811681146131e857600080fd5b60008082840361012081121561361257600080fd5b83359250610100807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301121561364857600080fd5b61365061329d565b915060208501358252613665604086016135bf565b6020830152613676606086016135bf565b6040830152613687608086016135d7565b606083015261369860a086016135d7565b60808301526136a960c086016135d7565b60a08301526136ba60e086016135eb565b60c08301526136ca8186016135eb565b60e083015250809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6040810160088410613745577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9281526020015290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156137df576137df61377e565b5060010190565b600181815b8085111561383f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156138255761382561377e565b8085161561383257918102915b93841c93908002906137eb565b509250929050565b60008261385657506001613902565b8161386357506000613902565b816001811461387957600281146138835761389f565b6001915050613902565b60ff8411156138945761389461377e565b50506001821b613902565b5060208310610133831016604e8410600b84101617156138c2575081810a613902565b6138cc83836137e6565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156138fe576138fe61377e565b0290505b92915050565b60006117d58383613847565b805169ffffffffffffffffffff811681146131e857600080fd5b600080600080600060a0868803121561394657600080fd5b61394f86613914565b945060208601519350604086015192506060860151915061397260808701613914565b90509295509295909350565b60006020828403121561399057600080fd5b81516117d581613527565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156139dc576139dc61377e565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615613a1757613a1761377e565b60008712925087820587128484161615613a3357613a3361377e565b87850587128184161615613a4957613a4961377e565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613a9557613a95613a57565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615613ae957613ae961377e565b500590565b60008219821115613b0157613b0161377e565b500190565b600060208284031215613b1857600080fd5b815180151581146117d557600080fd5b60006101008201905082518252602083015167ffffffffffffffff80821660208501528060408601511660408501525050606083015163ffffffff80821660608501528060808601511660808501528060a08601511660a0850152505060c0830151613b9a60c084018261ffff169052565b5060e083015161193360e084018261ffff169052565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613be857613be861377e565b500290565b600082613bfc57613bfc613a57565b500490565b600060208284031215613c1357600080fd5b5051919050565b600082821015613c2c57613c2c61377e565b500390565b600063ffffffff808316818516808303821115613c5057613c5061377e565b01949350505050565b600081518084526020808501945080840160005b83811015613c8957815187529582019590820190600101613c6d565b509495945050505050565b608081526000613ca76080830187613c59565b8281036020840152613cb98187613c59565b941515604084015250506060015292915050565b600060ff821660ff841680821015613ce757613ce761377e565b90039392505050565b60008251613d02818460208701613147565b919091019291505056fea264697066735822122020c7330f1d9af604cf181a783cd73a542f29a4504b4fb6c97591d391e27e990f64736f6c63430008090033

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

0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f76000000000000000000000000ac8973fcee131766cb0a077f730b28defbaf2e7900000000000000000000000071ab77b7dbb4fa7e017bc15090b2163221420282000000000000000000000000e2f95bc12fe8a3c35684be7586c39fd7c0e5b4030000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419

-----Decoded View---------------
Arg [0] : assets_ (address): 0x6aAB8F32C35177e7B01b957c3a4e672faD924f76
Arg [1] : receiver_ (address): 0xac8973FceE131766cB0a077F730b28DefBAf2e79
Arg [2] : high_ (address): 0x71Ab77b7dbB4fa7e017BC15090b2163221420282
Arg [3] : highUsdPriceFeed_ (address): 0xe2F95bC12FE8a3C35684Be7586C39fD7c0E5b403
Arg [4] : ethUsdPriceFeed_ (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000006aab8f32c35177e7b01b957c3a4e672fad924f76
Arg [1] : 000000000000000000000000ac8973fcee131766cb0a077f730b28defbaf2e79
Arg [2] : 00000000000000000000000071ab77b7dbb4fa7e017bc15090b2163221420282
Arg [3] : 000000000000000000000000e2f95bc12fe8a3c35684be7586c39fd7c0e5b403
Arg [4] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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