FTM Price: $1.02 (-1.74%)
Gas: 111 GWei

Contract

0xd0dc4Cc10fCf3fEe2bF5310c0E4e097b60F097D3
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Multichain Info

Transaction Hash
Method
Block
From
To
Value
0x60806040192459062021-10-16 12:56:43894 days ago1634389003IN
 Create: FujiERC1155
0 FTM0.41516471153.2266

Latest 1 internal transaction

Parent Txn Hash Block From To Value
192459062021-10-16 12:56:43894 days ago1634389003  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FujiERC1155

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : FujiERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./abstracts/fujiERC1155/FujiBaseERC1155.sol";
import "./abstracts/fujiERC1155/F1155Manager.sol";
import "./abstracts/claimable/ClaimableUpgradeable.sol";
import "./interfaces/IFujiERC1155.sol";
import "./libraries/WadRayMath.sol";
import "./libraries/Errors.sol";

contract FujiERC1155 is IFujiERC1155, FujiBaseERC1155, F1155Manager {
  using WadRayMath for uint256;

  // FujiERC1155 Asset ID Mapping

  // AssetType => asset reference address => ERC1155 Asset ID
  mapping(AssetType => mapping(address => uint256)) public assetIDs;

  // Control mapping that returns the AssetType of an AssetID
  mapping(uint256 => AssetType) public assetIDtype;

  uint64 public override qtyOfManagedAssets;

  // Asset ID  Liquidity Index mapping
  // AssetId => Liquidity index for asset ID
  mapping(uint256 => uint256) public indexes;

  function initialize() external initializer {
    __ERC165_init();
    __Context_init();
    __Climable_init();
  }

  /**
   * @dev Updates Index of AssetID
   * @param _assetID: ERC1155 ID of the asset which state will be updated.
   * @param newBalance: Amount
   **/
  function updateState(uint256 _assetID, uint256 newBalance) external override onlyPermit {
    uint256 total = totalSupply(_assetID);

    if (newBalance > 0 && total > 0 && newBalance > total) {
      uint256 diff = newBalance - total;

      uint256 amountToIndexRatio = (diff.wadToRay()).rayDiv(total.wadToRay());

      uint256 result = amountToIndexRatio + WadRayMath.ray();

      result = result.rayMul(indexes[_assetID]);
      require(result <= type(uint128).max, Errors.VL_INDEX_OVERFLOW);

      indexes[_assetID] = uint128(result);

      // TODO: calculate interest rate for a fujiOptimizer Fee.
    }
  }

  /**
   * @dev Returns the total supply of Asset_ID with accrued interest.
   * @param _assetID: ERC1155 ID of the asset which state will be updated.
   **/
  function totalSupply(uint256 _assetID) public view virtual override returns (uint256) {
    // TODO: include interest accrued by Fuji OptimizerFee

    return super.totalSupply(_assetID).rayMul(indexes[_assetID]);
  }

  /**
   * @dev Returns the scaled total supply of the token ID. Represents sum(token ID Principal /index)
   * @param _assetID: ERC1155 ID of the asset which state will be updated.
   **/
  function scaledTotalSupply(uint256 _assetID) public view virtual returns (uint256) {
    return super.totalSupply(_assetID);
  }

  /**
   * @dev Returns the principal + accrued interest balance of the user
   * @param _account: address of the User
   * @param _assetID: ERC1155 ID of the asset which state will be updated.
   **/
  function balanceOf(address _account, uint256 _assetID)
    public
    view
    override(FujiBaseERC1155, IFujiERC1155)
    returns (uint256)
  {
    uint256 scaledBalance = super.balanceOf(_account, _assetID);

    if (scaledBalance == 0) {
      return 0;
    }

    // TODO: include interest accrued by Fuji OptimizerFee
    return scaledBalance.rayMul(indexes[_assetID]);
  }

  /**
   * @dev Returns Scaled Balance of the user (e.g. balance/index)
   * @param _account: address of the User
   * @param _assetID: ERC1155 ID of the asset which state will be updated.
   **/
  function scaledBalanceOf(address _account, uint256 _assetID)
    public
    view
    virtual
    returns (uint256)
  {
    return super.balanceOf(_account, _assetID);
  }

  /**
   * @dev Mints tokens for Collateral and Debt receipts for the Fuji Protocol
   * Emits a {TransferSingle} event.
   * Requirements:
   * - `_account` cannot be the zero address.
   * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
   * acceptance magic value.
   * - `_amount` should be in WAD
   */
  function mint(
    address _account,
    uint256 _id,
    uint256 _amount,
    bytes memory _data
  ) external override onlyPermit {
    require(_account != address(0), Errors.VL_ZERO_ADDR_1155);

    address operator = _msgSender();

    uint256 accountBalance = _balances[_id][_account];
    uint256 assetTotalBalance = _totalSupply[_id];
    uint256 amountScaled = _amount.rayDiv(indexes[_id]);

    require(amountScaled != 0, Errors.VL_INVALID_MINT_AMOUNT);

    _balances[_id][_account] = accountBalance + amountScaled;
    _totalSupply[_id] = assetTotalBalance + amountScaled;

    emit TransferSingle(operator, address(0), _account, _id, _amount);

    _doSafeTransferAcceptanceCheck(operator, address(0), _account, _id, _amount, _data);
  }

  /**
   * @dev [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
  ) external onlyPermit {
    require(_to != address(0), Errors.VL_ZERO_ADDR_1155);
    require(_ids.length == _amounts.length, Errors.VL_INPUT_ERROR);

    address operator = _msgSender();

    uint256 accountBalance;
    uint256 assetTotalBalance;
    uint256 amountScaled;

    for (uint256 i = 0; i < _ids.length; i++) {
      accountBalance = _balances[_ids[i]][_to];
      assetTotalBalance = _totalSupply[_ids[i]];

      amountScaled = _amounts[i].rayDiv(indexes[_ids[i]]);

      require(amountScaled != 0, Errors.VL_INVALID_MINT_AMOUNT);

      _balances[_ids[i]][_to] = accountBalance + amountScaled;
      _totalSupply[_ids[i]] = assetTotalBalance + amountScaled;
    }

    emit TransferBatch(operator, address(0), _to, _ids, _amounts);

    _doSafeBatchTransferAcceptanceCheck(operator, address(0), _to, _ids, _amounts, _data);
  }

  /**
   * @dev Destroys `_amount` receipt tokens of token type `_id` from `account` for the Fuji Protocol
   * Requirements:
   * - `account` cannot be the zero address.
   * - `account` must have at least `_amount` tokens of token type `_id`.
   * - `_amount` should be in WAD
   */
  function burn(
    address _account,
    uint256 _id,
    uint256 _amount
  ) external override onlyPermit {
    require(_account != address(0), Errors.VL_ZERO_ADDR_1155);

    address operator = _msgSender();

    uint256 accountBalance = _balances[_id][_account];
    uint256 assetTotalBalance = _totalSupply[_id];

    uint256 amountScaled = _amount.rayDiv(indexes[_id]);

    require(amountScaled != 0 && accountBalance >= amountScaled, Errors.VL_INVALID_BURN_AMOUNT);

    _balances[_id][_account] = accountBalance - amountScaled;
    _totalSupply[_id] = assetTotalBalance - amountScaled;

    emit TransferSingle(operator, _account, address(0), _id, _amount);
  }

  /**
   * @dev [Batched] version of {burn}.
   * Requirements:
   * - `_ids` and `_amounts` must have the same length.
   */
  function burnBatch(
    address _account,
    uint256[] memory _ids,
    uint256[] memory _amounts
  ) external onlyPermit {
    require(_account != address(0), Errors.VL_ZERO_ADDR_1155);
    require(_ids.length == _amounts.length, Errors.VL_INPUT_ERROR);

    address operator = _msgSender();

    uint256 accountBalance;
    uint256 assetTotalBalance;
    uint256 amountScaled;

    for (uint256 i = 0; i < _ids.length; i++) {
      uint256 amount = _amounts[i];

      accountBalance = _balances[_ids[i]][_account];
      assetTotalBalance = _totalSupply[_ids[i]];

      amountScaled = _amounts[i].rayDiv(indexes[_ids[i]]);

      require(amountScaled != 0 && accountBalance >= amountScaled, Errors.VL_INVALID_BURN_AMOUNT);

      _balances[_ids[i]][_account] = accountBalance - amount;
      _totalSupply[_ids[i]] = assetTotalBalance - amount;
    }

    emit TransferBatch(operator, _account, address(0), _ids, _amounts);
  }

  //Getter Functions

  /**
   * @dev Getter Function for the Asset ID locally managed
   * @param _type: enum AssetType, 0 = Collateral asset, 1 = debt asset
   * @param _addr: Reference Address of the Asset
   */
  function getAssetID(AssetType _type, address _addr) external view override returns (uint256 id) {
    id = assetIDs[_type][_addr];
    require(id <= qtyOfManagedAssets, Errors.VL_INVALID_ASSETID_1155);
  }

  //Setter Functions

  /**
   * @dev Sets a new URI for all token types, by relying on the token type ID
   */
  function setURI(string memory _newUri) public onlyOwner {
    _uri = _newUri;
  }

  /**
   * @dev Adds and initializes liquidity index of a new asset in FujiERC1155
   * @param _type: enum AssetType, 0 = Collateral asset, 1 = debt asset
   * @param _addr: Reference Address of the Asset
   */
  function addInitializeAsset(AssetType _type, address _addr)
    external
    override
    onlyPermit
    returns (uint64)
  {
    require(assetIDs[_type][_addr] == 0, Errors.VL_ASSET_EXISTS);

    assetIDs[_type][_addr] = qtyOfManagedAssets;
    assetIDtype[qtyOfManagedAssets] = _type;

    //Initialize the liquidity Index
    indexes[qtyOfManagedAssets] = WadRayMath.ray();
    qtyOfManagedAssets++;

    return qtyOfManagedAssets - 1;
  }
}

File 2 of 15 : FujiBaseERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";

import "../../libraries/Errors.sol";

/**
 *
 * @dev Implementation of the Base ERC1155 multi-token standard functions
 * for Fuji Protocol control of User collaterals and borrow debt positions.
 * Originally based on Openzeppelin
 *
 */

abstract contract FujiBaseERC1155 is IERC1155Upgradeable, ERC165Upgradeable, ContextUpgradeable {
  using AddressUpgradeable for address;

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

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

  // Mapping from token ID to totalSupply
  mapping(uint256 => uint256) internal _totalSupply;

  //URI for all token types by relying on ID substitution
  //https://token.fujiDao.org/{id}.json
  string internal _uri;

  /**
   * @return The total supply of a token id
   **/
  function totalSupply(uint256 id) public view virtual returns (uint256) {
    return _totalSupply[id];
  }

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

  /**
   * @dev See {IERC1155MetadataURI-uri}.
   * Clients calling this function must replace the `\{id\}` substring with the
   * actual token type ID.
   */
  function uri(uint256) public view virtual 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), Errors.VL_ZERO_ADDR_1155);
    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
    override
    returns (uint256[] memory)
  {
    require(accounts.length == ids.length, Errors.VL_INPUT_ERROR);

    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 {
    require(_msgSender() != operator, Errors.VL_INPUT_ERROR);

    _operatorApprovals[_msgSender()][operator] = approved;
    emit ApprovalForAll(_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 {
    revert(Errors.VL_ERC1155_NOT_TRANSFERABLE);
  }

  /**
   * @dev See {IERC1155-safeBatchTransferFrom}.
   */
  function safeBatchTransferFrom(
    address, // from
    address, // to
    uint256[] memory, // ids
    uint256[] memory, // amounts
    bytes memory //  data
  ) public virtual override {
    revert(Errors.VL_ERC1155_NOT_TRANSFERABLE);
  }

  function _doSafeTransferAcceptanceCheck(
    address operator,
    address from,
    address to,
    uint256 id,
    uint256 amount,
    bytes memory data
  ) internal {
    if (to.isContract()) {
      try
        IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data)
      returns (bytes4 response) {
        if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) {
          revert(Errors.VL_RECEIVER_REJECT_1155);
        }
      } catch Error(string memory reason) {
        revert(reason);
      } catch {
        revert(Errors.VL_RECEIVER_CONTRACT_NON_1155);
      }
    }
  }

  function _doSafeBatchTransferAcceptanceCheck(
    address operator,
    address from,
    address to,
    uint256[] memory ids,
    uint256[] memory amounts,
    bytes memory data
  ) internal {
    if (to.isContract()) {
      try
        IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data)
      returns (bytes4 response) {
        if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) {
          revert(Errors.VL_RECEIVER_REJECT_1155);
        }
      } catch Error(string memory reason) {
        revert(reason);
      } catch {
        revert(Errors.VL_RECEIVER_CONTRACT_NON_1155);
      }
    }
  }

  /**
   * @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 _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
    uint256[] memory array = new uint256[](1);
    array[0] = element;

    return array;
  }
}

File 3 of 15 : F1155Manager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";

import "./FujiBaseERC1155.sol";
import "../claimable/ClaimableUpgradeable.sol";
import "../../interfaces/IFujiERC1155.sol";
import "../../libraries/WadRayMath.sol";
import "../../libraries/Errors.sol";

abstract contract F1155Manager is ClaimableUpgradeable {
  using AddressUpgradeable for address;

  // Controls for Mint-Burn Operations
  mapping(address => bool) public addrPermit;

  modifier onlyPermit() {
    require(addrPermit[_msgSender()] || msg.sender == owner(), Errors.VL_NOT_AUTHORIZED);
    _;
  }

  function setPermit(address _address, bool _permit) public onlyOwner {
    require((_address).isContract(), Errors.VL_NOT_A_CONTRACT);
    addrPermit[_address] = _permit;
  }
}

File 4 of 15 : ClaimableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

abstract contract ClaimableUpgradeable is Initializable, ContextUpgradeable {
  address private _owner;
  address public pendingOwner;

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

  function __Climable_init() internal initializer {
    __Context_init_unchained();
    __Climable_init_unchained();
  }

  function __Climable_init_unchained() internal initializer {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), msgSender);
  }

  function owner() public view virtual returns (address) {
    return _owner;
  }

  modifier onlyOwner() {
    require(_msgSender() == owner(), "Ownable: caller is not the owner");
    _;
  }

  modifier onlyPendingOwner() {
    require(_msgSender() == pendingOwner);
    _;
  }

  function renounceOwnership() public virtual onlyOwner {
    emit OwnershipTransferred(owner(), address(0));
    _owner = address(0);
  }

  function transferOwnership(address newOwner) public virtual onlyOwner {
    require(pendingOwner == address(0));
    pendingOwner = newOwner;
    emit NewPendingOwner(newOwner);
  }

  function cancelTransferOwnership() public onlyOwner {
    require(pendingOwner != address(0));
    delete pendingOwner;
    emit NewPendingOwner(address(0));
  }

  function claimOwnership() public onlyPendingOwner {
    emit OwnershipTransferred(owner(), pendingOwner);
    _owner = pendingOwner;
    delete pendingOwner;
  }
}

File 5 of 15 : IFujiERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFujiERC1155 {
  //Asset Types
  enum AssetType {
    //uint8 = 0
    collateralToken,
    //uint8 = 1
    debtToken
  }

  //General Getter Functions

  function getAssetID(AssetType _type, address _assetAddr) external view returns (uint256);

  function qtyOfManagedAssets() external view returns (uint64);

  function balanceOf(address _account, uint256 _id) external view returns (uint256);

  // function splitBalanceOf(address account,uint256 _AssetID) external view  returns (uint256,uint256);

  // function balanceOfBatchType(address account, AssetType _Type) external view returns (uint256);

  //Permit Controlled  Functions
  function mint(
    address _account,
    uint256 _id,
    uint256 _amount,
    bytes memory _data
  ) external;

  function burn(
    address _account,
    uint256 _id,
    uint256 _amount
  ) external;

  function updateState(uint256 _assetID, uint256 _newBalance) external;

  function addInitializeAsset(AssetType _type, address _addr) external returns (uint64);
}

File 6 of 15 : WadRayMath.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

import { Errors } from "./Errors.sol";

/**
 * @title WadRayMath library
 * @author Aave
 * @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays (decimals with 27 digits)
 **/

library WadRayMath {
  uint256 internal constant _WAD = 1e18;
  uint256 internal constant _HALF_WAD = _WAD / 2;

  uint256 internal constant _RAY = 1e27;
  uint256 internal constant _HALF_RAY = _RAY / 2;

  uint256 internal constant _WAD_RAY_RATIO = 1e9;

  /**
   * @return One ray, 1e27
   **/
  function ray() internal pure returns (uint256) {
    return _RAY;
  }

  /**
   * @return One wad, 1e18
   **/

  function wad() internal pure returns (uint256) {
    return _WAD;
  }

  /**
   * @return Half ray, 1e27/2
   **/
  function halfRay() internal pure returns (uint256) {
    return _HALF_RAY;
  }

  /**
   * @return Half ray, 1e18/2
   **/
  function halfWad() internal pure returns (uint256) {
    return _HALF_WAD;
  }

  /**
   * @dev Multiplies two wad, rounding half up to the nearest wad
   * @param a Wad
   * @param b Wad
   * @return The result of a*b, in wad
   **/
  function wadMul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0 || b == 0) {
      return 0;
    }

    require(a <= (type(uint256).max - _HALF_WAD) / b, Errors.MATH_MULTIPLICATION_OVERFLOW);

    return (a * b + _HALF_WAD) / _WAD;
  }

  /**
   * @dev Divides two wad, rounding half up to the nearest wad
   * @param a Wad
   * @param b Wad
   * @return The result of a/b, in wad
   **/
  function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, Errors.MATH_DIVISION_BY_ZERO);
    uint256 halfB = b / 2;

    require(a <= (type(uint256).max - halfB) / _WAD, Errors.MATH_MULTIPLICATION_OVERFLOW);

    return (a * _WAD + halfB) / b;
  }

  /**
   * @dev Multiplies two ray, rounding half up to the nearest ray
   * @param a Ray
   * @param b Ray
   * @return The result of a*b, in ray
   **/
  function rayMul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0 || b == 0) {
      return 0;
    }

    require(a <= (type(uint256).max - _HALF_RAY) / b, Errors.MATH_MULTIPLICATION_OVERFLOW);

    return (a * b + _HALF_RAY) / _RAY;
  }

  /**
   * @dev Divides two ray, rounding half up to the nearest ray
   * @param a Ray
   * @param b Ray
   * @return The result of a/b, in ray
   **/
  function rayDiv(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, Errors.MATH_DIVISION_BY_ZERO);
    uint256 halfB = b / 2;

    require(a <= (type(uint256).max - halfB) / _RAY, Errors.MATH_MULTIPLICATION_OVERFLOW);

    return (a * _RAY + halfB) / b;
  }

  /**
   * @dev Casts ray down to wad
   * @param a Ray
   * @return a casted to wad, rounded half up to the nearest wad
   **/
  function rayToWad(uint256 a) internal pure returns (uint256) {
    uint256 halfRatio = _WAD_RAY_RATIO / 2;
    uint256 result = halfRatio + a;
    require(result >= halfRatio, Errors.MATH_ADDITION_OVERFLOW);

    return result / _WAD_RAY_RATIO;
  }

  /**
   * @dev Converts wad up to ray
   * @param a Wad
   * @return a converted in ray
   **/
  function wadToRay(uint256 a) internal pure returns (uint256) {
    uint256 result = a * _WAD_RAY_RATIO;
    require(result / _WAD_RAY_RATIO == a, Errors.MATH_MULTIPLICATION_OVERFLOW);
    return result;
  }
}

File 7 of 15 : Errors.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

/**
 * @title Errors library
 * @author Fuji
 * @notice Defines the error messages emitted by the different contracts of the Aave protocol
 * @dev Error messages prefix glossary:
 *  - VL = Validation Logic 100 series
 *  - MATH = Math libraries 200 series
 *  - RF = Refinancing 300 series
 *  - VLT = vault 400 series
 *  - SP = Special 900 series
 */
library Errors {
  //Errors
  string public constant VL_INDEX_OVERFLOW = "100"; // index overflows uint128
  string public constant VL_INVALID_MINT_AMOUNT = "101"; //invalid amount to mint
  string public constant VL_INVALID_BURN_AMOUNT = "102"; //invalid amount to burn
  string public constant VL_AMOUNT_ERROR = "103"; //Input value >0, and for ETH msg.value and amount shall match
  string public constant VL_INVALID_WITHDRAW_AMOUNT = "104"; //Withdraw amount exceeds provided collateral, or falls undercollaterized
  string public constant VL_INVALID_BORROW_AMOUNT = "105"; //Borrow amount does not meet collaterization
  string public constant VL_NO_DEBT_TO_PAYBACK = "106"; //Msg sender has no debt amount to be payback
  string public constant VL_MISSING_ERC20_ALLOWANCE = "107"; //Msg sender has not approved ERC20 full amount to transfer
  string public constant VL_USER_NOT_LIQUIDATABLE = "108"; //User debt position is not liquidatable
  string public constant VL_DEBT_LESS_THAN_AMOUNT = "109"; //User debt is less than amount to partial close
  string public constant VL_PROVIDER_ALREADY_ADDED = "110"; // Provider is already added in Provider Array
  string public constant VL_NOT_AUTHORIZED = "111"; //Not authorized
  string public constant VL_INVALID_COLLATERAL = "112"; //There is no Collateral, or Collateral is not in active in vault
  string public constant VL_NO_ERC20_BALANCE = "113"; //User does not have ERC20 balance
  string public constant VL_INPUT_ERROR = "114"; //Check inputs. For ERC1155 batch functions, array sizes should match.
  string public constant VL_ASSET_EXISTS = "115"; //Asset intended to be added already exists in FujiERC1155
  string public constant VL_ZERO_ADDR_1155 = "116"; //ERC1155: balance/transfer for zero address
  string public constant VL_NOT_A_CONTRACT = "117"; //Address is not a contract.
  string public constant VL_INVALID_ASSETID_1155 = "118"; //ERC1155 Asset ID is invalid.
  string public constant VL_NO_ERC1155_BALANCE = "119"; //ERC1155: insufficient balance for transfer.
  string public constant VL_MISSING_ERC1155_APPROVAL = "120"; //ERC1155: transfer caller is not owner nor approved.
  string public constant VL_RECEIVER_REJECT_1155 = "121"; //ERC1155Receiver rejected tokens
  string public constant VL_RECEIVER_CONTRACT_NON_1155 = "122"; //ERC1155: transfer to non ERC1155Receiver implementer
  string public constant VL_OPTIMIZER_FEE_SMALL = "123"; //Fuji OptimizerFee has to be > 1 RAY (1e27)
  string public constant VL_UNDERCOLLATERIZED_ERROR = "124"; // Flashloan-Flashclose cannot be used when User's collateral is worth less than intended debt position to close.
  string public constant VL_MINIMUM_PAYBACK_ERROR = "125"; // Minimum Amount payback should be at least Fuji Optimizerfee accrued interest.
  string public constant VL_HARVESTING_FAILED = "126"; // Harvesting Function failed, check provided _farmProtocolNum or no claimable balance.
  string public constant VL_FLASHLOAN_FAILED = "127"; // Flashloan failed
  string public constant VL_ERC1155_NOT_TRANSFERABLE = "128"; // ERC1155: Not Transferable
  string public constant VL_SWAP_SLIPPAGE_LIMIT_EXCEED = "129"; // ERC1155: Not Transferable
  string public constant VL_ZERO_ADDR = "130"; // Zero Address

  string public constant MATH_DIVISION_BY_ZERO = "201";
  string public constant MATH_ADDITION_OVERFLOW = "202";
  string public constant MATH_MULTIPLICATION_OVERFLOW = "203";

  string public constant RF_INVALID_RATIO_VALUES = "301"; // Ratio Value provided is invalid, _ratioA/_ratioB <= 1, and > 0, or activeProvider borrowBalance = 0

  string public constant VLT_CALLER_MUST_BE_VAULT = "401"; // The caller of this function must be a vault

  string public constant ORACLE_INVALID_LENGTH = "501"; // The assets length and price feeds length doesn't match
  string public constant ORACLE_NONE_PRICE_FEED = "502"; // The price feed is not found
}

File 8 of 15 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.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 IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @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 9 of 15 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {
    /**
        @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.
        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. 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 10 of 15 : IERC1155MetadataURIUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.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 IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {
    /**
     * @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 11 of 15 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal initializer {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}

File 12 of 15 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @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 13 of 15 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/*
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 14 of 15 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NewPendingOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"enum IFujiERC1155.AssetType","name":"_type","type":"uint8"},{"internalType":"address","name":"_addr","type":"address"}],"name":"addInitializeAsset","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addrPermit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum IFujiERC1155.AssetType","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"assetIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assetIDtype","outputs":[{"internalType":"enum IFujiERC1155.AssetType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_assetID","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IFujiERC1155.AssetType","name":"_type","type":"uint8"},{"internalType":"address","name":"_addr","type":"address"}],"name":"getAssetID","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"indexes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"qtyOfManagedAssets","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_assetID","type":"uint256"}],"name":"scaledBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetID","type":"uint256"}],"name":"scaledTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_permit","type":"bool"}],"name":"setPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newUri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetID","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetID","type":"uint256"},{"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"updateState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061301e806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ee5760003560e01c80638129fc1c1161010f578063aa39404b116100a2578063e985e9c511610071578063e985e9c514610420578063f242432a14610433578063f2fde38b14610441578063f5298aca14610454576101ee565b8063aa39404b146103df578063bd85b039146103f2578063ccf2526114610405578063e30c397814610418576101ee565b806392fede00116100de57806392fede001461039e5780639d763d57146103a6578063a22cb465146103b9578063a6d2823c146103cc576101ee565b80638129fc1c1461035b5780638da5cb5b146103635780639270891a1461037857806392f8eb941461038b576101ee565b806330e2d1ed116101875780636b20c454116101565780636b20c4541461031a578063715018a61461032d578063731133e91461033557806377e3d4b614610348576101ee565b806330e2d1ed146102cc5780634e1273f4146102df5780634e71e0c8146102ff5780635eb62f6314610307576101ee565b80630ac77c32116101c35780630ac77c32146102665780630e89341c146102865780631f7fdffa146102a65780632eb2c2d6146102b9576101ee565b8062bf8e7b146101f3578062fdd58e1461021157806301ffc9a71461023157806302fe530514610251575b600080fd5b6101fb610467565b6040516102089190612d83565b60405180910390f35b61022461021f3660046128d6565b610477565b6040516102089190612d6c565b61024461023f366004612a42565b6104b9565b6040516102089190612c94565b61026461025f366004612a9a565b610533565b005b610279610274366004612ae0565b610592565b6040516102089190612c9f565b610299610294366004612ae0565b6105a7565b6040516102089190612cc7565b6102646102b4366004612807565b61063b565b6102646102c736600461268d565b6109d8565b6101fb6102da366004612a7a565b610a23565b6102f26102ed366004612984565b610ca8565b6040516102089190612c53565b610264610de7565b610264610315366004612af8565b610e7e565b610264610328366004612796565b611025565b6102646113d9565b610264610343366004612931565b611469565b61026461035636600461289c565b611664565b610264611735565b61036b6117c2565b6040516102089190612b9e565b610224610386366004612ae0565b6117d2565b610224610399366004612ae0565b6117dd565b6102646117ef565b6102246103b43660046128d6565b611880565b6102646103c736600461289c565b61188c565b6102246103da366004612a7a565b611979565b6102446103ed366004612641565b611996565b610224610400366004612ae0565b6119ab565b610224610413366004612a7a565b6119cd565b61036b611aa4565b61024461042e36600461265b565b611ab3565b6102646102c7366004612733565b61026461044f366004612641565b611ae1565b6102646104623660046128ff565b611b80565b606e5467ffffffffffffffff1681565b6000806104848484611d73565b9050806104955760009150506104b3565b6000838152606f60205260409020546104af908290611de0565b9150505b92915050565b60006001600160e01b031982167fd9b67a2600000000000000000000000000000000000000000000000000000000148061051c57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061052b575061052b82611e9c565b90505b919050565b61053b6117c2565b6001600160a01b031661054c611ece565b6001600160a01b03161461057b5760405162461bcd60e51b815260040161057290612d37565b60405180910390fd5b805161058e9060689060208401906124ae565b5050565b606d6020526000908152604090205460ff1681565b6060606880546105b690612e7d565b80601f01602080910402602001604051908101604052809291908181526020018280546105e290612e7d565b801561062f5780601f106106045761010080835404028352916020019161062f565b820191906000526020600020905b81548152906001019060200180831161061257829003601f168201915b50505050509050919050565b606b6000610647611ece565b6001600160a01b0316815260208101919091526040016000205460ff168061068757506106726117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906106c15760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0385166107035760405162461bcd60e51b81526004016105729190612cc7565b508151835114604051806040016040528060038152602001620c4c4d60ea1b815250906107435760405162461bcd60e51b81526004016105729190612cc7565b50600061074e611ece565b905060008080805b8751811015610966576065600089838151811061078357634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008a6001600160a01b03166001600160a01b03168152602001908152602001600020549350606760008983815181106107e357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020549250610870606f60008a848151811061082357634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205488838151811061085a57634e487b7160e01b600052603260045260246000fd5b6020026020010151611ed290919063ffffffff16565b60408051808201909152600381526231303160e81b6020820152909250826108ab5760405162461bcd60e51b81526004016105729190612cc7565b506108b68285612de6565b606560008a84815181106108da57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038e1682529092529020556109158284612de6565b606760008a848151811061093957634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550808061095e90612eb8565b915050610756565b50876001600160a01b031660006001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a8a6040516109b7929190612c66565b60405180910390a46109ce8460008a8a8a8a611fc4565b5050505050505050565b604080518082018252600381527f31323800000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b81526105729190600401612cc7565b6000606b6000610a31611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680610a715750610a5c6117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090610aab5760405162461bcd60e51b81526004016105729190612cc7565b50606c6000846001811115610ad057634e487b7160e01b600052602160045260246000fd5b6001811115610aef57634e487b7160e01b600052602160045260246000fd5b81526020019081526020016000206000836001600160a01b03166001600160a01b03168152602001908152602001600020546000146040518060400160405280600381526020017f313135000000000000000000000000000000000000000000000000000000000081525090610b785760405162461bcd60e51b81526004016105729190612cc7565b50606e5467ffffffffffffffff16606c6000856001811115610baa57634e487b7160e01b600052602160045260246000fd5b6001811115610bc957634e487b7160e01b600052602160045260246000fd5b8152602080820192909252604090810160009081206001600160a01b0387168252835281812093909355606e5467ffffffffffffffff168352606d9091529020805484919060ff191660018381811115610c3357634e487b7160e01b600052602160045260246000fd5b0217905550610c40612128565b606e805467ffffffffffffffff9081166000908152606f602052604081209390935581541691610c6f83612ed3565b82546101009290920a67ffffffffffffffff818102199093169183160217909155606e54610ca1925060019116612e54565b9392505050565b60608151835114604051806040016040528060038152602001620c4c4d60ea1b81525090610ce95760405162461bcd60e51b81526004016105729190612cc7565b506000835167ffffffffffffffff811115610d1457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610d3d578160200160208202803683370190505b50905060005b8451811015610ddf57610da4858281518110610d6f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610d9757634e487b7160e01b600052603260045260246000fd5b6020026020010151610477565b828281518110610dc457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610dd881612eb8565b9050610d43565b509392505050565b606a546001600160a01b0316610dfb611ece565b6001600160a01b031614610e0e57600080fd5b606a546001600160a01b0316610e226117c2565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3606a8054606980546001600160a01b03199081166001600160a01b03841617909155169055565b606b6000610e8a611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680610eca5750610eb56117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090610f045760405162461bcd60e51b81526004016105729190612cc7565b506000610f10836119ab565b9050600082118015610f225750600081115b8015610f2d57508082115b15611020576000610f3e8284612e3d565b90506000610f5d610f4e84612138565b610f5784612138565b90611ed2565b90506000610f69612128565b610f739083612de6565b6000878152606f6020526040902054909150610f90908290611de0565b60408051808201909152600381527f313030000000000000000000000000000000000000000000000000000000000060208201529091506fffffffffffffffffffffffffffffffff821115610ff85760405162461bcd60e51b81526004016105729190612cc7565b506000868152606f602052604090206fffffffffffffffffffffffffffffffff909116905550505b505050565b606b6000611031611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680611071575061105c6117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906110ab5760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0384166110ed5760405162461bcd60e51b81526004016105729190612cc7565b508051825114604051806040016040528060038152602001620c4c4d60ea1b8152509061112d5760405162461bcd60e51b81526004016105729190612cc7565b506000611138611ece565b905060008080805b865181101561137757600086828151811061116b57634e487b7160e01b600052603260045260246000fd5b602002602001015190506065600089848151811061119957634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008a6001600160a01b03166001600160a01b03168152602001908152602001600020549450606760008984815181106111f957634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020549350611270606f60008a858151811061123957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205488848151811061085a57634e487b7160e01b600052603260045260246000fd5b925082158015906112815750828510155b6040518060400160405280600381526020016218981960e91b815250906112bb5760405162461bcd60e51b81526004016105729190612cc7565b506112c68186612e3d565b606560008a85815181106112ea57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038e1682529092529020556113258185612e3d565b606760008a858151811061134957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000208190555050808061136f90612eb8565b915050611140565b5060006001600160a01b0316876001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb89896040516113c8929190612c66565b60405180910390a450505050505050565b6113e16117c2565b6001600160a01b03166113f2611ece565b6001600160a01b0316146114185760405162461bcd60e51b815260040161057290612d37565b60006114226117c2565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3606980546001600160a01b0319169055565b606b6000611475611ece565b6001600160a01b0316815260208101919091526040016000205460ff16806114b557506114a06117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906114ef5760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0385166115315760405162461bcd60e51b81526004016105729190612cc7565b50600061153c611ece565b60008581526065602090815260408083206001600160a01b038a1684528252808320548884526067835281842054606f9093529083205493945092909190611585908790611ed2565b60408051808201909152600381526231303160e81b6020820152909150816115c05760405162461bcd60e51b81526004016105729190612cc7565b506115cb8184612de6565b60008881526065602090815260408083206001600160a01b038d1684529091529020556115f88183612de6565b6000888152606760205260408082209290925590516001600160a01b03808b169291908716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061164d908c908c90612d75565b60405180910390a46109ce8460008a8a8a8a612195565b61166c6117c2565b6001600160a01b031661167d611ece565b6001600160a01b0316146116a35760405162461bcd60e51b815260040161057290612d37565b6116b5826001600160a01b031661227f565b6040518060400160405280600381526020017f3131370000000000000000000000000000000000000000000000000000000000815250906117095760405162461bcd60e51b81526004016105729190612cc7565b506001600160a01b03919091166000908152606b60205260409020805460ff1916911515919091179055565b600054610100900460ff168061174e575060005460ff16155b61176a5760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff16158015611795576000805460ff1961ff0019909116610100171660011790555b61179d612285565b6117a5612285565b6117ad6122ed565b80156117bf576000805461ff00191690555b50565b6069546001600160a01b03165b90565b600061052b8261235d565b606f6020526000908152604090205481565b6117f76117c2565b6001600160a01b0316611808611ece565b6001600160a01b03161461182e5760405162461bcd60e51b815260040161057290612d37565b606a546001600160a01b031661184357600080fd5b606a80546001600160a01b03191690556040516000907f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc908290a2565b6000610ca18383611d73565b816001600160a01b031661189e611ece565b6001600160a01b03161415604051806040016040528060038152602001620c4c4d60ea1b815250906118e35760405162461bcd60e51b81526004016105729190612cc7565b5080606660006118f1611ece565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611935611ece565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161196d9190612c94565b60405180910390a35050565b606c60209081526000928352604080842090915290825290205481565b606b6020526000908152604090205460ff1681565b6000818152606f602052604081205461052b906119c78461235d565b90611de0565b6000606c60008460018111156119f357634e487b7160e01b600052602160045260246000fd5b6001811115611a1257634e487b7160e01b600052602160045260246000fd5b8152602080820192909252604090810160009081206001600160a01b0386168252835281902054606e548251808401909352600383527f31313800000000000000000000000000000000000000000000000000000000009383019390935292509067ffffffffffffffff16821115611a9d5760405162461bcd60e51b81526004016105729190612cc7565b5092915050565b606a546001600160a01b031681565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b611ae96117c2565b6001600160a01b0316611afa611ece565b6001600160a01b031614611b205760405162461bcd60e51b815260040161057290612d37565b606a546001600160a01b031615611b3657600080fd5b606a80546001600160a01b0319166001600160a01b0383169081179091556040517f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc90600090a250565b606b6000611b8c611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680611bcc5750611bb76117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090611c065760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b038416611c485760405162461bcd60e51b81526004016105729190612cc7565b506000611c53611ece565b60008481526065602090815260408083206001600160a01b03891684528252808320548784526067835281842054606f9093529083205493945092909190611c9c908690611ed2565b90508015801590611cad5750808310155b6040518060400160405280600381526020016218981960e91b81525090611ce75760405162461bcd60e51b81526004016105729190612cc7565b50611cf28184612e3d565b60008781526065602090815260408083206001600160a01b038c168452909152902055611d1f8183612e3d565b6000878152606760205260408082209290925590516001600160a01b0389811691908716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906113c8908b908b90612d75565b60408051808201909152600381526218989b60e91b60208201526000906001600160a01b038416611db75760405162461bcd60e51b81526004016105729190612cc7565b505060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6000821580611ded575081155b15611dfa575060006104b3565b81611e1260026b033b2e3c9fd0803ce8000000612dfe565b611e1e90600019612e3d565b611e289190612dfe565b8311156040518060400160405280600381526020016232303360e81b81525090611e655760405162461bcd60e51b81526004016105729190612cc7565b506b033b2e3c9fd0803ce8000000611e7e600282612dfe565b611e888486612e1e565b611e929190612de6565b610ca19190612dfe565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b3390565b60408051808201909152600381527f3230310000000000000000000000000000000000000000000000000000000000602082015260009082611f275760405162461bcd60e51b81526004016105729190612cc7565b506000611f35600284612dfe565b90506b033b2e3c9fd0803ce8000000611f5082600019612e3d565b611f5a9190612dfe565b8411156040518060400160405280600381526020016232303360e81b81525090611f975760405162461bcd60e51b81526004016105729190612cc7565b508281611fb06b033b2e3c9fd0803ce800000087612e1e565b611fba9190612de6565b6104af9190612dfe565b611fd6846001600160a01b031661227f565b156121205760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061200f9089908990889088908890600401612bb2565b602060405180830381600087803b15801561202957600080fd5b505af1925050508015612059575060408051601f3d908101601f1916820190925261205691810190612a5e565b60015b6120d557612065612f2d565b80612070575061208a565b8060405162461bcd60e51b81526004016105729190612cc7565b604080518082018252600381527f31323200000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b81526105729190600401612cc7565b6001600160e01b0319811663bc197c8160e01b1461211e57604080518082018252600381526231323160e81b6020820152905162461bcd60e51b81526105729190600401612cc7565b505b505050505050565b6b033b2e3c9fd0803ce800000090565b600080612149633b9aca0084612e1e565b90508261215a633b9aca0083612dfe565b146040518060400160405280600381526020016232303360e81b81525090611a9d5760405162461bcd60e51b81526004016105729190612cc7565b6121a7846001600160a01b031661227f565b156121205760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906121e09089908990889088908890600401612c10565b602060405180830381600087803b1580156121fa57600080fd5b505af192505050801561222a575060408051601f3d908101601f1916820190925261222791810190612a5e565b60015b61223657612065612f2d565b6001600160e01b0319811663f23a6e6160e01b1461211e57604080518082018252600381526231323160e81b6020820152905162461bcd60e51b81526105729190600401612cc7565b3b151590565b600054610100900460ff168061229e575060005460ff16155b6122ba5760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff161580156122e5576000805460ff1961ff0019909116610100171660011790555b6117ad61236f565b600054610100900460ff1680612306575060005460ff16155b6123225760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff1615801561234d576000805460ff1961ff0019909116610100171660011790555b61235561236f565b6117ad6123e2565b60009081526067602052604090205490565b600054610100900460ff1680612388575060005460ff16155b6123a45760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff161580156117ad576000805460ff1961ff00199091166101001716600117905580156117bf576000805461ff001916905550565b600054610100900460ff16806123fb575060005460ff16155b6124175760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff16158015612442576000805460ff1961ff0019909116610100171660011790555b600061244c611ece565b606980546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156117bf576000805461ff001916905550565b8280546124ba90612e7d565b90600052602060002090601f0160209004810192826124dc5760008555612522565b82601f106124f557805160ff1916838001178555612522565b82800160010185558215612522579182015b82811115612522578251825591602001919060010190612507565b5061252e929150612532565b5090565b5b8082111561252e5760008155600101612533565b600067ffffffffffffffff83111561256157612561612f11565b612574601f8401601f1916602001612d98565b905082815283838301111561258857600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461052e57600080fd5b600082601f8301126125c6578081fd5b813560206125db6125d683612dc2565b612d98565b82815281810190858301838502870184018810156125f7578586fd5b855b85811015612615578135845292840192908401906001016125f9565b5090979650505050505050565b600082601f830112612632578081fd5b610ca183833560208501612547565b600060208284031215612652578081fd5b610ca18261259f565b6000806040838503121561266d578081fd5b6126768361259f565b91506126846020840161259f565b90509250929050565b600080600080600060a086880312156126a4578081fd5b6126ad8661259f565b94506126bb6020870161259f565b9350604086013567ffffffffffffffff808211156126d7578283fd5b6126e389838a016125b6565b945060608801359150808211156126f8578283fd5b61270489838a016125b6565b93506080880135915080821115612719578283fd5b5061272688828901612622565b9150509295509295909350565b600080600080600060a0868803121561274a578081fd5b6127538661259f565b94506127616020870161259f565b93506040860135925060608601359150608086013567ffffffffffffffff81111561278a578182fd5b61272688828901612622565b6000806000606084860312156127aa578283fd5b6127b38461259f565b9250602084013567ffffffffffffffff808211156127cf578384fd5b6127db878388016125b6565b935060408601359150808211156127f0578283fd5b506127fd868287016125b6565b9150509250925092565b6000806000806080858703121561281c578384fd5b6128258561259f565b9350602085013567ffffffffffffffff80821115612841578485fd5b61284d888389016125b6565b94506040870135915080821115612862578384fd5b61286e888389016125b6565b93506060870135915080821115612883578283fd5b5061289087828801612622565b91505092959194509250565b600080604083850312156128ae578081fd5b6128b78361259f565b9150602083013580151581146128cb578182fd5b809150509250929050565b600080604083850312156128e8578182fd5b6128f18361259f565b946020939093013593505050565b600080600060608486031215612913578081fd5b61291c8461259f565b95602085013595506040909401359392505050565b60008060008060808587031215612946578182fd5b61294f8561259f565b93506020850135925060408501359150606085013567ffffffffffffffff811115612978578182fd5b61289087828801612622565b60008060408385031215612996578182fd5b823567ffffffffffffffff808211156129ad578384fd5b818501915085601f8301126129c0578384fd5b813560206129d06125d683612dc2565b82815281810190858301838502870184018b10156129ec578889fd5b8896505b84871015612a1557612a018161259f565b8352600196909601959183019183016129f0565b5096505086013592505080821115612a2b578283fd5b50612a38858286016125b6565b9150509250929050565b600060208284031215612a53578081fd5b8135610ca181612fd2565b600060208284031215612a6f578081fd5b8151610ca181612fd2565b60008060408385031215612a8c578182fd5b823560028110612676578283fd5b600060208284031215612aab578081fd5b813567ffffffffffffffff811115612ac1578182fd5b8201601f81018413612ad1578182fd5b6104af84823560208401612547565b600060208284031215612af1578081fd5b5035919050565b60008060408385031215612b0a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015612b4857815187529582019590820190600101612b2c565b509495945050505050565b60008151808452815b81811015612b7857602081850181015186830182015201612b5c565b81811115612b895782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808816835280871660208401525060a06040830152612bde60a0830186612b19565b8281036060840152612bf08186612b19565b90508281036080840152612c048185612b53565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612c4860a0830184612b53565b979650505050505050565b600060208252610ca16020830184612b19565b600060408252612c796040830185612b19565b8281036020840152612c8b8185612b19565b95945050505050565b901515815260200190565b6020810160028310612cc157634e487b7160e01b600052602160045260246000fd5b91905290565b600060208252610ca16020830184612b53565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b90815260200190565b918252602082015260400190565b67ffffffffffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715612dba57612dba612f11565b604052919050565b600067ffffffffffffffff821115612ddc57612ddc612f11565b5060209081020190565b60008219821115612df957612df9612efb565b500190565b600082612e1957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e3857612e38612efb565b500290565b600082821015612e4f57612e4f612efb565b500390565b600067ffffffffffffffff83811690831681811015612e7557612e75612efb565b039392505050565b600281046001821680612e9157607f821691505b60208210811415612eb257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612ecc57612ecc612efb565b5060010190565b600067ffffffffffffffff80831681811415612ef157612ef1612efb565b6001019392505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60e01c90565b600060443d1015612f3d576117cf565b600481823e6308c379a0612f518251612f27565b14612f5b576117cf565b6040513d600319016004823e80513d67ffffffffffffffff8160248401118184111715612f8b57505050506117cf565b82840192508251915080821115612fa557505050506117cf565b503d83016020828401011115612fbd575050506117cf565b601f01601f1916810160200160405291505090565b6001600160e01b0319811681146117bf57600080fdfea264697066735822122068ecc794a61eb4e5035224eeabaf276061d7a7d63eaede5c6b6ad2fd38cff4e364736f6c63430008000033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ee5760003560e01c80638129fc1c1161010f578063aa39404b116100a2578063e985e9c511610071578063e985e9c514610420578063f242432a14610433578063f2fde38b14610441578063f5298aca14610454576101ee565b8063aa39404b146103df578063bd85b039146103f2578063ccf2526114610405578063e30c397814610418576101ee565b806392fede00116100de57806392fede001461039e5780639d763d57146103a6578063a22cb465146103b9578063a6d2823c146103cc576101ee565b80638129fc1c1461035b5780638da5cb5b146103635780639270891a1461037857806392f8eb941461038b576101ee565b806330e2d1ed116101875780636b20c454116101565780636b20c4541461031a578063715018a61461032d578063731133e91461033557806377e3d4b614610348576101ee565b806330e2d1ed146102cc5780634e1273f4146102df5780634e71e0c8146102ff5780635eb62f6314610307576101ee565b80630ac77c32116101c35780630ac77c32146102665780630e89341c146102865780631f7fdffa146102a65780632eb2c2d6146102b9576101ee565b8062bf8e7b146101f3578062fdd58e1461021157806301ffc9a71461023157806302fe530514610251575b600080fd5b6101fb610467565b6040516102089190612d83565b60405180910390f35b61022461021f3660046128d6565b610477565b6040516102089190612d6c565b61024461023f366004612a42565b6104b9565b6040516102089190612c94565b61026461025f366004612a9a565b610533565b005b610279610274366004612ae0565b610592565b6040516102089190612c9f565b610299610294366004612ae0565b6105a7565b6040516102089190612cc7565b6102646102b4366004612807565b61063b565b6102646102c736600461268d565b6109d8565b6101fb6102da366004612a7a565b610a23565b6102f26102ed366004612984565b610ca8565b6040516102089190612c53565b610264610de7565b610264610315366004612af8565b610e7e565b610264610328366004612796565b611025565b6102646113d9565b610264610343366004612931565b611469565b61026461035636600461289c565b611664565b610264611735565b61036b6117c2565b6040516102089190612b9e565b610224610386366004612ae0565b6117d2565b610224610399366004612ae0565b6117dd565b6102646117ef565b6102246103b43660046128d6565b611880565b6102646103c736600461289c565b61188c565b6102246103da366004612a7a565b611979565b6102446103ed366004612641565b611996565b610224610400366004612ae0565b6119ab565b610224610413366004612a7a565b6119cd565b61036b611aa4565b61024461042e36600461265b565b611ab3565b6102646102c7366004612733565b61026461044f366004612641565b611ae1565b6102646104623660046128ff565b611b80565b606e5467ffffffffffffffff1681565b6000806104848484611d73565b9050806104955760009150506104b3565b6000838152606f60205260409020546104af908290611de0565b9150505b92915050565b60006001600160e01b031982167fd9b67a2600000000000000000000000000000000000000000000000000000000148061051c57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061052b575061052b82611e9c565b90505b919050565b61053b6117c2565b6001600160a01b031661054c611ece565b6001600160a01b03161461057b5760405162461bcd60e51b815260040161057290612d37565b60405180910390fd5b805161058e9060689060208401906124ae565b5050565b606d6020526000908152604090205460ff1681565b6060606880546105b690612e7d565b80601f01602080910402602001604051908101604052809291908181526020018280546105e290612e7d565b801561062f5780601f106106045761010080835404028352916020019161062f565b820191906000526020600020905b81548152906001019060200180831161061257829003601f168201915b50505050509050919050565b606b6000610647611ece565b6001600160a01b0316815260208101919091526040016000205460ff168061068757506106726117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906106c15760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0385166107035760405162461bcd60e51b81526004016105729190612cc7565b508151835114604051806040016040528060038152602001620c4c4d60ea1b815250906107435760405162461bcd60e51b81526004016105729190612cc7565b50600061074e611ece565b905060008080805b8751811015610966576065600089838151811061078357634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008a6001600160a01b03166001600160a01b03168152602001908152602001600020549350606760008983815181106107e357634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020549250610870606f60008a848151811061082357634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205488838151811061085a57634e487b7160e01b600052603260045260246000fd5b6020026020010151611ed290919063ffffffff16565b60408051808201909152600381526231303160e81b6020820152909250826108ab5760405162461bcd60e51b81526004016105729190612cc7565b506108b68285612de6565b606560008a84815181106108da57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038e1682529092529020556109158284612de6565b606760008a848151811061093957634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002081905550808061095e90612eb8565b915050610756565b50876001600160a01b031660006001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a8a6040516109b7929190612c66565b60405180910390a46109ce8460008a8a8a8a611fc4565b5050505050505050565b604080518082018252600381527f31323800000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b81526105729190600401612cc7565b6000606b6000610a31611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680610a715750610a5c6117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090610aab5760405162461bcd60e51b81526004016105729190612cc7565b50606c6000846001811115610ad057634e487b7160e01b600052602160045260246000fd5b6001811115610aef57634e487b7160e01b600052602160045260246000fd5b81526020019081526020016000206000836001600160a01b03166001600160a01b03168152602001908152602001600020546000146040518060400160405280600381526020017f313135000000000000000000000000000000000000000000000000000000000081525090610b785760405162461bcd60e51b81526004016105729190612cc7565b50606e5467ffffffffffffffff16606c6000856001811115610baa57634e487b7160e01b600052602160045260246000fd5b6001811115610bc957634e487b7160e01b600052602160045260246000fd5b8152602080820192909252604090810160009081206001600160a01b0387168252835281812093909355606e5467ffffffffffffffff168352606d9091529020805484919060ff191660018381811115610c3357634e487b7160e01b600052602160045260246000fd5b0217905550610c40612128565b606e805467ffffffffffffffff9081166000908152606f602052604081209390935581541691610c6f83612ed3565b82546101009290920a67ffffffffffffffff818102199093169183160217909155606e54610ca1925060019116612e54565b9392505050565b60608151835114604051806040016040528060038152602001620c4c4d60ea1b81525090610ce95760405162461bcd60e51b81526004016105729190612cc7565b506000835167ffffffffffffffff811115610d1457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610d3d578160200160208202803683370190505b50905060005b8451811015610ddf57610da4858281518110610d6f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610d9757634e487b7160e01b600052603260045260246000fd5b6020026020010151610477565b828281518110610dc457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610dd881612eb8565b9050610d43565b509392505050565b606a546001600160a01b0316610dfb611ece565b6001600160a01b031614610e0e57600080fd5b606a546001600160a01b0316610e226117c2565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3606a8054606980546001600160a01b03199081166001600160a01b03841617909155169055565b606b6000610e8a611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680610eca5750610eb56117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090610f045760405162461bcd60e51b81526004016105729190612cc7565b506000610f10836119ab565b9050600082118015610f225750600081115b8015610f2d57508082115b15611020576000610f3e8284612e3d565b90506000610f5d610f4e84612138565b610f5784612138565b90611ed2565b90506000610f69612128565b610f739083612de6565b6000878152606f6020526040902054909150610f90908290611de0565b60408051808201909152600381527f313030000000000000000000000000000000000000000000000000000000000060208201529091506fffffffffffffffffffffffffffffffff821115610ff85760405162461bcd60e51b81526004016105729190612cc7565b506000868152606f602052604090206fffffffffffffffffffffffffffffffff909116905550505b505050565b606b6000611031611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680611071575061105c6117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906110ab5760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0384166110ed5760405162461bcd60e51b81526004016105729190612cc7565b508051825114604051806040016040528060038152602001620c4c4d60ea1b8152509061112d5760405162461bcd60e51b81526004016105729190612cc7565b506000611138611ece565b905060008080805b865181101561137757600086828151811061116b57634e487b7160e01b600052603260045260246000fd5b602002602001015190506065600089848151811061119957634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008a6001600160a01b03166001600160a01b03168152602001908152602001600020549450606760008984815181106111f957634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020549350611270606f60008a858151811061123957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205488848151811061085a57634e487b7160e01b600052603260045260246000fd5b925082158015906112815750828510155b6040518060400160405280600381526020016218981960e91b815250906112bb5760405162461bcd60e51b81526004016105729190612cc7565b506112c68186612e3d565b606560008a85815181106112ea57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038e1682529092529020556113258185612e3d565b606760008a858151811061134957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000208190555050808061136f90612eb8565b915050611140565b5060006001600160a01b0316876001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb89896040516113c8929190612c66565b60405180910390a450505050505050565b6113e16117c2565b6001600160a01b03166113f2611ece565b6001600160a01b0316146114185760405162461bcd60e51b815260040161057290612d37565b60006114226117c2565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3606980546001600160a01b0319169055565b606b6000611475611ece565b6001600160a01b0316815260208101919091526040016000205460ff16806114b557506114a06117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906114ef5760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b0385166115315760405162461bcd60e51b81526004016105729190612cc7565b50600061153c611ece565b60008581526065602090815260408083206001600160a01b038a1684528252808320548884526067835281842054606f9093529083205493945092909190611585908790611ed2565b60408051808201909152600381526231303160e81b6020820152909150816115c05760405162461bcd60e51b81526004016105729190612cc7565b506115cb8184612de6565b60008881526065602090815260408083206001600160a01b038d1684529091529020556115f88183612de6565b6000888152606760205260408082209290925590516001600160a01b03808b169291908716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061164d908c908c90612d75565b60405180910390a46109ce8460008a8a8a8a612195565b61166c6117c2565b6001600160a01b031661167d611ece565b6001600160a01b0316146116a35760405162461bcd60e51b815260040161057290612d37565b6116b5826001600160a01b031661227f565b6040518060400160405280600381526020017f3131370000000000000000000000000000000000000000000000000000000000815250906117095760405162461bcd60e51b81526004016105729190612cc7565b506001600160a01b03919091166000908152606b60205260409020805460ff1916911515919091179055565b600054610100900460ff168061174e575060005460ff16155b61176a5760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff16158015611795576000805460ff1961ff0019909116610100171660011790555b61179d612285565b6117a5612285565b6117ad6122ed565b80156117bf576000805461ff00191690555b50565b6069546001600160a01b03165b90565b600061052b8261235d565b606f6020526000908152604090205481565b6117f76117c2565b6001600160a01b0316611808611ece565b6001600160a01b03161461182e5760405162461bcd60e51b815260040161057290612d37565b606a546001600160a01b031661184357600080fd5b606a80546001600160a01b03191690556040516000907f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc908290a2565b6000610ca18383611d73565b816001600160a01b031661189e611ece565b6001600160a01b03161415604051806040016040528060038152602001620c4c4d60ea1b815250906118e35760405162461bcd60e51b81526004016105729190612cc7565b5080606660006118f1611ece565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611935611ece565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161196d9190612c94565b60405180910390a35050565b606c60209081526000928352604080842090915290825290205481565b606b6020526000908152604090205460ff1681565b6000818152606f602052604081205461052b906119c78461235d565b90611de0565b6000606c60008460018111156119f357634e487b7160e01b600052602160045260246000fd5b6001811115611a1257634e487b7160e01b600052602160045260246000fd5b8152602080820192909252604090810160009081206001600160a01b0386168252835281902054606e548251808401909352600383527f31313800000000000000000000000000000000000000000000000000000000009383019390935292509067ffffffffffffffff16821115611a9d5760405162461bcd60e51b81526004016105729190612cc7565b5092915050565b606a546001600160a01b031681565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b611ae96117c2565b6001600160a01b0316611afa611ece565b6001600160a01b031614611b205760405162461bcd60e51b815260040161057290612d37565b606a546001600160a01b031615611b3657600080fd5b606a80546001600160a01b0319166001600160a01b0383169081179091556040517f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc90600090a250565b606b6000611b8c611ece565b6001600160a01b0316815260208101919091526040016000205460ff1680611bcc5750611bb76117c2565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b81525090611c065760405162461bcd60e51b81526004016105729190612cc7565b5060408051808201909152600381526218989b60e91b60208201526001600160a01b038416611c485760405162461bcd60e51b81526004016105729190612cc7565b506000611c53611ece565b60008481526065602090815260408083206001600160a01b03891684528252808320548784526067835281842054606f9093529083205493945092909190611c9c908690611ed2565b90508015801590611cad5750808310155b6040518060400160405280600381526020016218981960e91b81525090611ce75760405162461bcd60e51b81526004016105729190612cc7565b50611cf28184612e3d565b60008781526065602090815260408083206001600160a01b038c168452909152902055611d1f8183612e3d565b6000878152606760205260408082209290925590516001600160a01b0389811691908716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906113c8908b908b90612d75565b60408051808201909152600381526218989b60e91b60208201526000906001600160a01b038416611db75760405162461bcd60e51b81526004016105729190612cc7565b505060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6000821580611ded575081155b15611dfa575060006104b3565b81611e1260026b033b2e3c9fd0803ce8000000612dfe565b611e1e90600019612e3d565b611e289190612dfe565b8311156040518060400160405280600381526020016232303360e81b81525090611e655760405162461bcd60e51b81526004016105729190612cc7565b506b033b2e3c9fd0803ce8000000611e7e600282612dfe565b611e888486612e1e565b611e929190612de6565b610ca19190612dfe565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b3390565b60408051808201909152600381527f3230310000000000000000000000000000000000000000000000000000000000602082015260009082611f275760405162461bcd60e51b81526004016105729190612cc7565b506000611f35600284612dfe565b90506b033b2e3c9fd0803ce8000000611f5082600019612e3d565b611f5a9190612dfe565b8411156040518060400160405280600381526020016232303360e81b81525090611f975760405162461bcd60e51b81526004016105729190612cc7565b508281611fb06b033b2e3c9fd0803ce800000087612e1e565b611fba9190612de6565b6104af9190612dfe565b611fd6846001600160a01b031661227f565b156121205760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061200f9089908990889088908890600401612bb2565b602060405180830381600087803b15801561202957600080fd5b505af1925050508015612059575060408051601f3d908101601f1916820190925261205691810190612a5e565b60015b6120d557612065612f2d565b80612070575061208a565b8060405162461bcd60e51b81526004016105729190612cc7565b604080518082018252600381527f31323200000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b81526105729190600401612cc7565b6001600160e01b0319811663bc197c8160e01b1461211e57604080518082018252600381526231323160e81b6020820152905162461bcd60e51b81526105729190600401612cc7565b505b505050505050565b6b033b2e3c9fd0803ce800000090565b600080612149633b9aca0084612e1e565b90508261215a633b9aca0083612dfe565b146040518060400160405280600381526020016232303360e81b81525090611a9d5760405162461bcd60e51b81526004016105729190612cc7565b6121a7846001600160a01b031661227f565b156121205760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906121e09089908990889088908890600401612c10565b602060405180830381600087803b1580156121fa57600080fd5b505af192505050801561222a575060408051601f3d908101601f1916820190925261222791810190612a5e565b60015b61223657612065612f2d565b6001600160e01b0319811663f23a6e6160e01b1461211e57604080518082018252600381526231323160e81b6020820152905162461bcd60e51b81526105729190600401612cc7565b3b151590565b600054610100900460ff168061229e575060005460ff16155b6122ba5760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff161580156122e5576000805460ff1961ff0019909116610100171660011790555b6117ad61236f565b600054610100900460ff1680612306575060005460ff16155b6123225760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff1615801561234d576000805460ff1961ff0019909116610100171660011790555b61235561236f565b6117ad6123e2565b60009081526067602052604090205490565b600054610100900460ff1680612388575060005460ff16155b6123a45760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff161580156117ad576000805460ff1961ff00199091166101001716600117905580156117bf576000805461ff001916905550565b600054610100900460ff16806123fb575060005460ff16155b6124175760405162461bcd60e51b815260040161057290612cda565b600054610100900460ff16158015612442576000805460ff1961ff0019909116610100171660011790555b600061244c611ece565b606980546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156117bf576000805461ff001916905550565b8280546124ba90612e7d565b90600052602060002090601f0160209004810192826124dc5760008555612522565b82601f106124f557805160ff1916838001178555612522565b82800160010185558215612522579182015b82811115612522578251825591602001919060010190612507565b5061252e929150612532565b5090565b5b8082111561252e5760008155600101612533565b600067ffffffffffffffff83111561256157612561612f11565b612574601f8401601f1916602001612d98565b905082815283838301111561258857600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461052e57600080fd5b600082601f8301126125c6578081fd5b813560206125db6125d683612dc2565b612d98565b82815281810190858301838502870184018810156125f7578586fd5b855b85811015612615578135845292840192908401906001016125f9565b5090979650505050505050565b600082601f830112612632578081fd5b610ca183833560208501612547565b600060208284031215612652578081fd5b610ca18261259f565b6000806040838503121561266d578081fd5b6126768361259f565b91506126846020840161259f565b90509250929050565b600080600080600060a086880312156126a4578081fd5b6126ad8661259f565b94506126bb6020870161259f565b9350604086013567ffffffffffffffff808211156126d7578283fd5b6126e389838a016125b6565b945060608801359150808211156126f8578283fd5b61270489838a016125b6565b93506080880135915080821115612719578283fd5b5061272688828901612622565b9150509295509295909350565b600080600080600060a0868803121561274a578081fd5b6127538661259f565b94506127616020870161259f565b93506040860135925060608601359150608086013567ffffffffffffffff81111561278a578182fd5b61272688828901612622565b6000806000606084860312156127aa578283fd5b6127b38461259f565b9250602084013567ffffffffffffffff808211156127cf578384fd5b6127db878388016125b6565b935060408601359150808211156127f0578283fd5b506127fd868287016125b6565b9150509250925092565b6000806000806080858703121561281c578384fd5b6128258561259f565b9350602085013567ffffffffffffffff80821115612841578485fd5b61284d888389016125b6565b94506040870135915080821115612862578384fd5b61286e888389016125b6565b93506060870135915080821115612883578283fd5b5061289087828801612622565b91505092959194509250565b600080604083850312156128ae578081fd5b6128b78361259f565b9150602083013580151581146128cb578182fd5b809150509250929050565b600080604083850312156128e8578182fd5b6128f18361259f565b946020939093013593505050565b600080600060608486031215612913578081fd5b61291c8461259f565b95602085013595506040909401359392505050565b60008060008060808587031215612946578182fd5b61294f8561259f565b93506020850135925060408501359150606085013567ffffffffffffffff811115612978578182fd5b61289087828801612622565b60008060408385031215612996578182fd5b823567ffffffffffffffff808211156129ad578384fd5b818501915085601f8301126129c0578384fd5b813560206129d06125d683612dc2565b82815281810190858301838502870184018b10156129ec578889fd5b8896505b84871015612a1557612a018161259f565b8352600196909601959183019183016129f0565b5096505086013592505080821115612a2b578283fd5b50612a38858286016125b6565b9150509250929050565b600060208284031215612a53578081fd5b8135610ca181612fd2565b600060208284031215612a6f578081fd5b8151610ca181612fd2565b60008060408385031215612a8c578182fd5b823560028110612676578283fd5b600060208284031215612aab578081fd5b813567ffffffffffffffff811115612ac1578182fd5b8201601f81018413612ad1578182fd5b6104af84823560208401612547565b600060208284031215612af1578081fd5b5035919050565b60008060408385031215612b0a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015612b4857815187529582019590820190600101612b2c565b509495945050505050565b60008151808452815b81811015612b7857602081850181015186830182015201612b5c565b81811115612b895782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808816835280871660208401525060a06040830152612bde60a0830186612b19565b8281036060840152612bf08186612b19565b90508281036080840152612c048185612b53565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612c4860a0830184612b53565b979650505050505050565b600060208252610ca16020830184612b19565b600060408252612c796040830185612b19565b8281036020840152612c8b8185612b19565b95945050505050565b901515815260200190565b6020810160028310612cc157634e487b7160e01b600052602160045260246000fd5b91905290565b600060208252610ca16020830184612b53565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b90815260200190565b918252602082015260400190565b67ffffffffffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715612dba57612dba612f11565b604052919050565b600067ffffffffffffffff821115612ddc57612ddc612f11565b5060209081020190565b60008219821115612df957612df9612efb565b500190565b600082612e1957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e3857612e38612efb565b500290565b600082821015612e4f57612e4f612efb565b500390565b600067ffffffffffffffff83811690831681811015612e7557612e75612efb565b039392505050565b600281046001821680612e9157607f821691505b60208210811415612eb257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612ecc57612ecc612efb565b5060010190565b600067ffffffffffffffff80831681811415612ef157612ef1612efb565b6001019392505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60e01c90565b600060443d1015612f3d576117cf565b600481823e6308c379a0612f518251612f27565b14612f5b576117cf565b6040513d600319016004823e80513d67ffffffffffffffff8160248401118184111715612f8b57505050506117cf565b82840192508251915080821115612fa557505050506117cf565b503d83016020828401011115612fbd575050506117cf565b601f01601f1916810160200160405291505090565b6001600160e01b0319811681146117bf57600080fdfea264697066735822122068ecc794a61eb4e5035224eeabaf276061d7a7d63eaede5c6b6ad2fd38cff4e364736f6c63430008000033

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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.