Contract 0x919f65EF8134dbEA4232b32672Bf287b916c61cb 2

Contract Overview

Balance:
0 MATIC
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x66b91d23c0bdee6c0f8f328a5a369e92974985aa9c0dfa85f29879d4cb18c588Change Config Ad...184434172021-09-03 4:00:5388 days 18 hrs ago0x627306090abab3a6e1400e9345bc60c78a8bef57 IN  0x919f65ef8134dbea4232b32672bf287b916c61cb0 MATIC0.000044064
0x45dae7019875d55c4e75e7b3a1f39be2deb5b6104df7c78343f6d7e220664ede0x60806040184433472021-09-03 3:58:2988 days 18 hrs ago0x627306090abab3a6e1400e9345bc60c78a8bef57 IN  Contract Creation0 MATIC0.002457387
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x7Ad0593CDa7C7Ae4dbE511660540493e323bc21C

Contract Name:
ListingData

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if(!hasRole(role, account)) {
            revert(string(abi.encodePacked(
                "AccessControl: account ",
                Strings.toHexString(uint160(account), 20),
                " is missing role ",
                Strings.toHexString(uint256(role), 32)
            )));
        }
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

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

        _revokeRole(role, account);
    }

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

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

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

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

File 2 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

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

        emit Transfer(sender, recipient, amount);
    }

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

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

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

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

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

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

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

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

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

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 3 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

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

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

File 4 of 12 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        _approve(account, _msgSender(), currentAllowance - amount);
        _burn(account, amount);
    }
}

File 5 of 12 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 7 of 12 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

}

File 8 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 10 of 12 : ListingData.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

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

contract ListingData is Master {
    // State Variable
    // Cover Request
    CoverRequest[] internal requests; // CoverRequest.id
    mapping(uint256 => uint256) public requestIdToInsuredSumTaken;
    mapping(address => uint256[]) internal buyerToRequests;
    mapping(string => uint256[]) internal coinIdToRequests;
    mapping(uint256 => uint256) public coverRequestFullyFundedAt;
    mapping(uint256 => bool) public requestIdToRefundPremium;
    mapping(uint256 => bool) public isDepositTakenBack; // coverId -> true/false
    // Cover Offer
    CoverOffer[] internal offers; // CoverOffer.id
    mapping(uint256 => uint256) public offerIdToInsuredSumTaken;
    mapping(address => uint256[]) internal funderToOffers;
    mapping(string => uint256[]) internal coinIdToOffers;
    mapping(uint256 => bool) public isDepositOfOfferTakenBack; // offer id => state of take back deposit

    // Events
    event CreateRequest(
        uint256 id,
        address indexed holder,
        CoverRequest request,
        CoinPricingInfo assetPricing,
        CoinPricingInfo feePricing
    );
    event CreateOffer(
        uint256 id,
        address indexed funder,
        CoverOffer coverOffer,
        CoinPricingInfo feePricing,
        CoinPricingInfo assetPricing,
        uint8 depositPeriod
    );
    event DepositOfOfferTakenBack(uint256 offerId);
    event DepositTakenBack(uint256 coverId);
    event RequestFullyFunded(uint256 requestId, uint256 fullyFundedAt);
    event PremiumRefunded(uint256 requestId);

    /**
     * @dev Save listing data of cover request
     */
    function storedRequest(
        CoverRequest memory _inputRequest,
        CoinPricingInfo memory _assetPricing,
        CoinPricingInfo memory _feePricing,
        address _member
    ) public onlyInternal {
        requests.push(_inputRequest);
        uint256 requestId = requests.length - 1;
        buyerToRequests[_member].push(requestId);
        coinIdToRequests[_inputRequest.coinId].push(requestId);
        requestIdToInsuredSumTaken[requestId] = 0; // set insured sum taken to 0 as iniitial value
        emit CreateRequest(
            requestId,
            _member,
            _inputRequest,
            _assetPricing,
            _feePricing
        );
    }

    /**
     * @dev Get cover request detail
     */
    function getCoverRequestById(uint256 _requestId)
        public
        view
        returns (CoverRequest memory coverRequest)
    {
        return requests[_requestId];
    }

    /**
     * @dev Get length of array contains Cover Request(s)
     */
    function getCoverRequestLength() public view returns (uint256) {
        return requests.length;
    }

    /**
     * @dev Save cover offer listing data
     */
    function storedOffer(
        CoverOffer memory _inputOffer,
        CoinPricingInfo memory _feePricing,
        CoinPricingInfo memory _assetPricing,
        uint8 _depositPeriod,
        address _member
    ) public onlyInternal {
        offers.push(_inputOffer);
        uint256 offerId = offers.length - 1;
        funderToOffers[_member].push(offerId);
        coinIdToOffers[_inputOffer.coinId].push(offerId);
        offerIdToInsuredSumTaken[offerId] = 0; // set insured sum remaining to 0 as initial
        emit CreateOffer(
            offerId,
            _member,
            _inputOffer,
            _feePricing,
            _assetPricing,
            _depositPeriod
        );
    }

    /**
     * @dev Get detail of Cover Offer
     */
    function getCoverOfferById(uint256 _offerId)
        public
        view
        returns (CoverOffer memory coverOffer)
    {
        return offers[_offerId];
    }

    /**
     * @dev Get list of offer id(s) that funded by member/funder
     */
    function getCoverOffersListByAddr(address _member)
        public
        view
        returns (uint256[] memory)
    {
        return funderToOffers[_member];
    }

    /**
     * @dev Get length of array contains Cover Offer(s)
     */
    function getCoverOfferLength() public view returns (uint256) {
        return offers.length;
    }

    /**
     * @dev Called when member take offer to update insured sum taken on Cover Offer
     */
    function updateOfferInsuredSumTaken(
        uint256 _offerId,
        uint256 _insuredSumTaken
    ) public onlyInternal {
        offerIdToInsuredSumTaken[_offerId] = _insuredSumTaken;
    }

    /**
     * @dev Called when member take request to update insured sum taken on Cover Request
     */
    function updateRequestInsuredSumTaken(
        uint256 _requestId,
        uint256 _insuredSumTaken
    ) public onlyInternal {
        requestIdToInsuredSumTaken[_requestId] = _insuredSumTaken;
    }

    /**
     * @dev Check whether Cover Request reach target
     * @dev For Partial : must reach minimal 25% of insured sum
     * @dev For Full : must react minimal 100% - 2 token of insured sum
     */
    function isRequestReachTarget(uint256 _requestId)
        public
        view
        returns (bool)
    {
        CoverRequest memory request = requests[_requestId];
        return
            requestIdToInsuredSumTaken[_requestId] >= request.insuredSumTarget;
    }

    /**
     * @dev Check whether Cover Request fully funded
     * @dev Must react minimal 100% - 2 token of insured sum
     */
    function isRequestFullyFunded(uint256 _requestId)
        public
        view
        returns (bool)
    {
        CoverRequest memory request = requests[_requestId];
        uint8 decimal = cg.getCurrencyDecimal(
            uint8(request.insuredSumCurrency)
        );
        uint256 tolerance = 2 * (10**decimal);

        return
            (request.insuredSum - requestIdToInsuredSumTaken[_requestId]) <=
            tolerance;
    }

    /**
     * @dev Called when Cover Request fully funded
     */
    function setCoverRequestFullyFundedAt(
        uint256 _requestId,
        uint256 _fullyFundedAt
    ) public onlyInternal {
        coverRequestFullyFundedAt[_requestId] = _fullyFundedAt;
        emit RequestFullyFunded(_requestId, _fullyFundedAt);
    }

    /**
     * @dev Called when holder refund premium
     * @dev Refund premium condition :
     * @dev Withdraw premium of fail Cover Request or Withdraw of remaining premium on Cover Request
     */
    function setRequestIdToRefundPremium(uint256 _requestId)
        public
        onlyInternal
    {
        requestIdToRefundPremium[_requestId] = true;
        emit PremiumRefunded(_requestId);
    }

    /**
     * @dev Called when funder refund/take back deposit
     * @dev Withdraw of remaining deposit on Cover Offer
     */
    function setDepositOfOfferTakenBack(uint256 _offerId) public onlyInternal {
        isDepositOfOfferTakenBack[_offerId] = true;
        emit DepositOfOfferTakenBack(_offerId);
    }

    /**
     * @dev Called when funder refund/take back deposit, to mark deposit had taken
     */
    function setIsDepositTakenBack(uint256 _coverId) public onlyInternal {
        isDepositTakenBack[_coverId] = true;
        emit DepositTakenBack(_coverId);
    }

    /**
     * @dev Get list of request id(s) that funded by member
     */
    function getBuyerToRequests(address _holder)
        public
        view
        returns (uint256[] memory)
    {
        return buyerToRequests[_holder];
    }

    /**
     * @dev Get list of offer id(s) that funded by member/funder
     */
    function getFunderToOffers(address _funder)
        public
        view
        returns (uint256[] memory)
    {
        return funderToOffers[_funder];
    }
}

File 11 of 12 : IConfig.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

interface IConfig {
    /**
     * @dev return address of Infi Token
     */
    function infiTokenAddr() external returns (address);

    /**
     * @dev return address of contract based on Initial Contract Name
     */
    function getLatestAddress(bytes2 _contractName)
        external
        returns (address payable contractAddress);

    /**
     * @dev check whether caller is internal smart contract
     * @dev internal smart contracts are smart contracts that used on Infi Project
     */
    function isInternal(address _add) external returns (bool);

    /**
     * @dev get decimals of given currency code/number
     */
    function getCurrencyDecimal(uint8 _currencyType)
        external
        view
        returns (uint8);

    /**
     * @dev get name of given currency code/number
     */
    function getCurrencyName(uint8 _currencyType)
        external
        view
        returns (string memory);

    function maxDevaluation() external view returns (uint256);

    function monitoringPeriod() external view returns (uint256);

    function maxPayoutPeriod() external view returns (uint256);

    function validationPreviousPeriod() external view returns (uint256);
}

File 12 of 12 : Master.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import {IConfig} from "./IConfig.sol";
import {IAccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";

contract Master {
    // Used publicly
    IConfig internal cg;
    ERC20Burnable internal infiToken;
    bytes32 internal constant DEFAULT_ADMIN_ROLE = 0x00;

    // Storage and Payload
    enum CoverType {
        SMART_PROTOCOL_FAILURE,
        STABLECOIN_DEVALUATION,
        CUSTODIAN_FAILURE,
        RUGPULL_LIQUIDITY_SCAM
    }
    enum CurrencyType {
        USDT,
        USDC,
        DAI,
        END_ENUM
    }
    enum InsuredSumRule {
        PARTIAL,
        FULL
    }
    enum ListingType {
        REQUEST,
        OFFER
    }

    enum ClaimState {
        MONITORING,
        INVALID,
        VALID,
        INVALID_AFTER_EXPIRED,
        VALID_AFTER_EXPIRED
    }

    mapping(CurrencyType => uint8) internal currencyDecimalsOnFeed; // insuredSumCurrencyDecimalOnCL
    mapping(CurrencyType => uint256) internal currencyPriceOnFeed; // insuredSumCurrencyPriceOnCL
    mapping(string => uint8) internal coinIdToDecimals;

    // For passing parameter and store state variables
    struct CoverRequest {
        uint256 coverQty; // coverQty decimals depends on coinIdToDecimals mapping
        uint8 coverMonths; // represent month value 1-12
        uint256 insuredSum;
        uint256 insuredSumTarget; // if full funding : insuredSum - 2$
        CurrencyType insuredSumCurrency;
        uint256 premiumSum;
        CurrencyType premiumCurrency;
        uint256 expiredAt; // now + 14 days
        string coinId; // CoinGecko
        CoverLimit coverLimit;
        InsuredSumRule insuredSumRule;
        address holder; // may validate or not validate if same as msg.sender
    }

    // For passing parameter and store state variables
    struct CoverOffer {
        uint8 minCoverMonths; // represent month value 1-12 (expiredAt + 1 month - now >= minCoverMonths)
        uint256 insuredSum;
        CurrencyType insuredSumCurrency;
        uint256 premiumCostPerMonth; // $0.02 per $1 insured per Month (2000) a.k.a Premium Cost Per month per asset
        CurrencyType premiumCurrency;
        // IMPORTANT: max date for buying cover = expiredAt + 1 month
        uint256 expiredAt; // despositEndDate - 14 days beforeDepositEndDate
        string coinId; // CoinGecko
        CoverLimit coverLimit;
        InsuredSumRule insuredSumRule;
        address funder; // may validate or not validate if same as msg.sender
    }

    // Storage struct
    // Relationship: CoverCoverOffer ||--< Cover
    // Relationship: CoverRequest ||--< Cover
    // Relationship: One cover can have only one offer
    // Relationship: One cover can have only one request
    struct InsuranceCover {
        // type computed from (offerId != 0) or (requestId != 0)

        // If BuyCover (take offer)
        uint256 offerId; // from BuyCover.offerId
        // If CoverFunding (take request)
        uint256 requestId; // from CoverFunding.requestId
        // uint[] provideIds;

        ListingType listingType;
        // will validate claimSender
        address holder; // from BuyCover.buyer or CoverRequest.buyer
        // will validate maximum claimSum
        uint256 insuredSum; // from BuyCover.insuredSum or sum(CoverFunding.fundingSum)
        // will validate maximum claimQuantity
        uint256 coverQty; // from BuyCover.coverQty or CoverRequest.coverQty
    }

    // Storage: "Booking" object when take request
    // Relationship: CoverRequest ||--< CoverFunding
    struct CoverFunding {
        uint256 requestId;
        address funder;
        // insurance data:
        uint256 fundingSum; // part or portion of total insuredSum
    }

    // Payload: object when take offer
    // Virtual struct/type for payload (type of payloadBuyCover)
    struct BuyCover {
        uint256 offerId;
        address buyer;
        // insurance data:
        uint8 coverMonths; // represent month value 1-12
        uint256 coverQty; // coverQty decimals depends on coinIdToDecimals mapping
        uint256 insuredSum; // need validation : coverQty * assetPricing.coinPrice
        CoinPricingInfo assetPricing;
        bytes premiumPermit;
    }

    // Payload: object when take request
    // Virtual struct/type for payload (type of payloadBuyCover)
    struct ProvideCover {
        uint256 requestId;
        address provider;
        // insurance data:
        uint256 fundingSum;
        CoinPricingInfo assetPricing;
        bytes assetPermit;
    }

    // For passing Coin and Listing Fee info, required for validation
    struct CoinPricingInfo {
        string coinId;
        string coinSymbol;
        uint256 coinPrice; // decimals 6
        uint256 lastUpdatedAt;
        uint8 sigV;
        bytes32 sigR;
        bytes32 sigS;
    }

    struct CoverLimit {
        CoverType coverType;
        uint256[] territoryIds; // Platform Id, Price Feed Id, Custodian Id , (Dex Pool Id not Yet implemented)
    }

    struct Platform {
        string name;
        string website;
    }

    struct Oracle {
        string name;
        string website;
    }

    struct PriceFeed {
        uint256 oracleId;
        uint256 chainId;
        uint8 decimals;
        address proxyAddress;
    }

    struct Custodian {
        string name;
        string website;
    }

    struct EIP2612Permit {
        address owner;
        uint256 value;
        address spender;
        uint256 deadline;
        uint8 sigV;
        bytes32 sigR;
        bytes32 sigS;
    }

    struct DAIPermit {
        address holder;
        address spender;
        uint256 nonce;
        uint256 expiry;
        bool allowed;
        uint8 sigV;
        bytes32 sigR;
        bytes32 sigS;
    }

    struct CreateCoverRequestData {
        CoverRequest request; //
        CoinPricingInfo assetPricing; //
        CoinPricingInfo feePricing; //
        uint80 roundId; // insured sum to usd for calculate fee price
        bytes premiumPermit; // for transfer DAI, USDT, USDC
    }

    struct CreateCoverOfferData {
        CoverOffer offer; //
        CoinPricingInfo assetPricing;
        uint8 depositPeriod;
        CoinPricingInfo feePricing; //
        uint80 roundId; // insured sum to usd for calculate fee price
        bytes fundingPermit; // for transfer DAI, USDT, USDC
    }

    // Structs
    struct Claim {
        uint80 roundId; // round id that represent start of dropping value
        uint256 claimTime;
        uint256 payout;
        ClaimState state;
    }

    struct CollectiveClaim {
        uint80 roundId; // round id that represent start of dropping value
        uint256 claimTime;
        uint256 payout;
        ClaimState state;
    }

    // Modifier
    modifier onlyInternal() {
        require(cg.isInternal(msg.sender), "ERR_AUTH_2");
        _;
    }

    /**
    @dev Check balance of member/sender, minimal have 5000 Infi token. Used in Create Offer, Take Offer and Take Request
    @param _from member/sender's address
    @param _tokenAmount amount of token that used for create listing (will be 0 for take offer and take request)
     */
    modifier minimumBalance(address _from, uint256 _tokenAmount) {
        uint256 tokenAfterTransfer = infiToken.balanceOf(_from);
        uint256 tokenBeforeTransfer = tokenAfterTransfer + _tokenAmount;
        uint256 infiTokenDecimal = 18;
        require(
            tokenBeforeTransfer >= (5000 * (10**infiTokenDecimal)),
            "ERR_AUTH_4"
        );
        _;
    }

    /**
     * @dev change config contract address
     * @param _configAddress is the new address
     */
    function changeConfigAddress(address _configAddress) external {
        // Only admin allowed to call this function
        if (address(cg) != address(0)) {
            require(
                IAccessControl(address(cg)).hasRole(
                    DEFAULT_ADMIN_ROLE,
                    msg.sender
                ),
                "ERR_AUTH_1"
            );
        }
        // Change config address
        cg = IConfig(_configAddress);
    }
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"funder","type":"address"},{"components":[{"internalType":"uint8","name":"minCoverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumCostPerMonth","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"funder","type":"address"}],"indexed":false,"internalType":"struct Master.CoverOffer","name":"coverOffer","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"indexed":false,"internalType":"struct Master.CoinPricingInfo","name":"feePricing","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"indexed":false,"internalType":"struct Master.CoinPricingInfo","name":"assetPricing","type":"tuple"},{"indexed":false,"internalType":"uint8","name":"depositPeriod","type":"uint8"}],"name":"CreateOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"components":[{"internalType":"uint256","name":"coverQty","type":"uint256"},{"internalType":"uint8","name":"coverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"uint256","name":"insuredSumTarget","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"holder","type":"address"}],"indexed":false,"internalType":"struct Master.CoverRequest","name":"request","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"indexed":false,"internalType":"struct Master.CoinPricingInfo","name":"assetPricing","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"indexed":false,"internalType":"struct Master.CoinPricingInfo","name":"feePricing","type":"tuple"}],"name":"CreateRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"offerId","type":"uint256"}],"name":"DepositOfOfferTakenBack","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"coverId","type":"uint256"}],"name":"DepositTakenBack","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"PremiumRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fullyFundedAt","type":"uint256"}],"name":"RequestFullyFunded","type":"event"},{"inputs":[{"internalType":"address","name":"_configAddress","type":"address"}],"name":"changeConfigAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"coverRequestFullyFundedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"}],"name":"getBuyerToRequests","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offerId","type":"uint256"}],"name":"getCoverOfferById","outputs":[{"components":[{"internalType":"uint8","name":"minCoverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumCostPerMonth","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"funder","type":"address"}],"internalType":"struct Master.CoverOffer","name":"coverOffer","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCoverOfferLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"getCoverOffersListByAddr","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"getCoverRequestById","outputs":[{"components":[{"internalType":"uint256","name":"coverQty","type":"uint256"},{"internalType":"uint8","name":"coverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"uint256","name":"insuredSumTarget","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"holder","type":"address"}],"internalType":"struct Master.CoverRequest","name":"coverRequest","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCoverRequestLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_funder","type":"address"}],"name":"getFunderToOffers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isDepositOfOfferTakenBack","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isDepositTakenBack","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"isRequestFullyFunded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"isRequestReachTarget","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"offerIdToInsuredSumTaken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIdToInsuredSumTaken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIdToRefundPremium","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"},{"internalType":"uint256","name":"_fullyFundedAt","type":"uint256"}],"name":"setCoverRequestFullyFundedAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offerId","type":"uint256"}],"name":"setDepositOfOfferTakenBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_coverId","type":"uint256"}],"name":"setIsDepositTakenBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"setRequestIdToRefundPremium","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"minCoverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumCostPerMonth","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"funder","type":"address"}],"internalType":"struct Master.CoverOffer","name":"_inputOffer","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"internalType":"struct Master.CoinPricingInfo","name":"_feePricing","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"internalType":"struct Master.CoinPricingInfo","name":"_assetPricing","type":"tuple"},{"internalType":"uint8","name":"_depositPeriod","type":"uint8"},{"internalType":"address","name":"_member","type":"address"}],"name":"storedOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"coverQty","type":"uint256"},{"internalType":"uint8","name":"coverMonths","type":"uint8"},{"internalType":"uint256","name":"insuredSum","type":"uint256"},{"internalType":"uint256","name":"insuredSumTarget","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"insuredSumCurrency","type":"uint8"},{"internalType":"uint256","name":"premiumSum","type":"uint256"},{"internalType":"enum Master.CurrencyType","name":"premiumCurrency","type":"uint8"},{"internalType":"uint256","name":"expiredAt","type":"uint256"},{"internalType":"string","name":"coinId","type":"string"},{"components":[{"internalType":"enum Master.CoverType","name":"coverType","type":"uint8"},{"internalType":"uint256[]","name":"territoryIds","type":"uint256[]"}],"internalType":"struct Master.CoverLimit","name":"coverLimit","type":"tuple"},{"internalType":"enum Master.InsuredSumRule","name":"insuredSumRule","type":"uint8"},{"internalType":"address","name":"holder","type":"address"}],"internalType":"struct Master.CoverRequest","name":"_inputRequest","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"internalType":"struct Master.CoinPricingInfo","name":"_assetPricing","type":"tuple"},{"components":[{"internalType":"string","name":"coinId","type":"string"},{"internalType":"string","name":"coinSymbol","type":"string"},{"internalType":"uint256","name":"coinPrice","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint8","name":"sigV","type":"uint8"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"}],"internalType":"struct Master.CoinPricingInfo","name":"_feePricing","type":"tuple"},{"internalType":"address","name":"_member","type":"address"}],"name":"storedRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offerId","type":"uint256"},{"internalType":"uint256","name":"_insuredSumTaken","type":"uint256"}],"name":"updateOfferInsuredSumTaken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"},{"internalType":"uint256","name":"_insuredSumTaken","type":"uint256"}],"name":"updateRequestInsuredSumTaken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612b7f806100206000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063a0287eda116100c3578063ccd7168c1161007c578063ccd7168c14610313578063ce19b2d214610333578063ce6293d114610346578063d8f23c3d14610359578063db1eaac31461036c578063e7bcb2ab1461038c57610158565b8063a0287eda146102b2578063a15a1ca6146102c5578063aa6f85de146102e5578063ac7bedeb146102ed578063bd42140e146102c5578063cbc9b8781461030057610158565b806350ffb8471161011557806350ffb84714610221578063615f7359146102415780638a091fca1461024957806391c373771461025c578063985ed02e1461027f578063988e27ed1461029257610158565b80630da047661461015d5780631342fa8014610195578063164cadb9146101aa5780633e94781d146101bd5780633f8d354b146101d057806344c51186146101fe575b600080fd5b61018061016b3660046124d1565b600b6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6101a86101a33660046124d1565b61039f565b005b6101a86101b83660046124d1565b610497565b6101a86101cb3660046121ea565b61057b565b6101f06101de3660046124d1565b60066020526000908152604090205481565b60405190815260200161018c565b61018061020c3660046124d1565b60106020526000908152604090205460ff1681565b61023461022f3660046124d1565b6108e6565b60405161018c919061282a565b6005546101f0565b6101806102573660046124d1565b610bae565b61018061026a3660046124d1565b600a6020526000908152604090205460ff1681565b6101a861028d3660046124e9565b610f77565b6101f06102a03660046124d1565b600d6020526000908152604090205481565b6101a86102c03660046121a9565b61105f565b6102d86102d33660046121a9565b61114d565b60405161018c91906127f3565b600c546101f0565b6101a86102fb3660046124d1565b6111b9565b6101a861030e3660046124e9565b61129d565b6101f06103213660046124d1565b60096020526000908152604090205481565b6101a861034136600461235a565b611348565b6102d86103543660046121a9565b6116fd565b6101806103673660046124d1565b611767565b61037f61037a3660046124d1565b611a5a565b60405161018c919061283d565b6101a861039a3660046124e9565b611d37565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041c91906121ca565b6104415760405162461bcd60e51b815260040161043890612806565b60405180910390fd5b60008181526010602052604090819020805460ff19166001179055517fcc4df9d619d176c5c13031da4edf912af5d64c08b5682c23b1fea4cebfc6aba79061048c9083815260200190565b60405180910390a150565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b1580156104dc57600080fd5b505af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051491906121ca565b6105305760405162461bcd60e51b815260040161043890612806565b6000818152600a602052604090819020805460ff19166001179055517f085de3aa0ed0bc84ace2f4e9b73671c3c5760c72398103ff252670e9f601cb6c9061048c9083815260200190565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b1580156105c057600080fd5b505af11580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f891906121ca565b6106145760405162461bcd60e51b815260040161043890612806565b600c8054600181810183556000929092528651600a9091027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c78101805460ff90931660ff1993841617815560208901517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c883015560408901517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c990920180548a95929491929116908360038111156106dc57634e487b7160e01b600052602160045260246000fd5b02179055506060820151816003015560808201518160040160006101000a81548160ff0219169083600381111561072357634e487b7160e01b600052602160045260246000fd5b021790555060a0820151600582015560c0820151805161074d916006840191602090910190611de2565b5060e08201518051600783018054909190829060ff1916600183600381111561078657634e487b7160e01b600052602160045260246000fd5b021790555060208281015180516107a39260018501920190611e66565b50505061010082015160098201805460ff1916600183818111156107d757634e487b7160e01b600052602160045260246000fd5b02179055506101209190910151600990910180546001600160a01b0390921661010002610100600160a81b0319909216919091179055600c5460009061081f90600190612a56565b6001600160a01b0383166000908152600e602090815260408083208054600181018255908452919092200182905560c08801519051919250600f9161086491906127d7565b9081526040805191829003602090810183208054600181018255600091825282822001859055848152600d909152908120556001600160a01b038316907f72a110132a9ea5cb3df6663dea31c56ae1f6da6eaca838db8abd305d4d957845906108d69084908a908a908a908a90612850565b60405180910390a2505050505050565b6108ee611ea0565b600c828154811061090f57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805161014081018252600a909302909101805460ff90811684526001820154948401949094526002810154929390929184019116600381111561096f57634e487b7160e01b600052602160045260246000fd5b600381111561098e57634e487b7160e01b600052602160045260246000fd5b81526003828101546020830152600483015460409092019160ff16908111156109c757634e487b7160e01b600052602160045260246000fd5b60038111156109e657634e487b7160e01b600052602160045260246000fd5b815260200160058201548152602001600682018054610a0490612a9d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3090612a9d565b8015610a7d5780601f10610a5257610100808354040283529160200191610a7d565b820191906000526020600020905b815481529060010190602001808311610a6057829003601f168201915b505050918352505060408051808201909152600783018054602090930192829060ff166003811115610abf57634e487b7160e01b600052602160045260246000fd5b6003811115610ade57634e487b7160e01b600052602160045260246000fd5b815260200160018201805480602002602001604051908101604052809291908181526020018280548015610b3157602002820191906000526020600020905b815481526020019060010190808311610b1d575b505050919092525050508152600982015460209091019060ff166001811115610b6a57634e487b7160e01b600052602160045260246000fd5b6001811115610b8957634e487b7160e01b600052602160045260246000fd5b81526009919091015461010090046001600160a01b031660209091015290505b919050565b60008060058381548110610bd257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805161018081018252600c90930290910180548352600181015460ff90811694840194909452600281015491830191909152600380820154606084015260048201549293919260808501921690811115610c4957634e487b7160e01b600052602160045260246000fd5b6003811115610c6857634e487b7160e01b600052602160045260246000fd5b815260058201546020820152600682015460409091019060ff166003811115610ca157634e487b7160e01b600052602160045260246000fd5b6003811115610cc057634e487b7160e01b600052602160045260246000fd5b815260200160078201548152602001600882018054610cde90612a9d565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0a90612a9d565b8015610d575780601f10610d2c57610100808354040283529160200191610d57565b820191906000526020600020905b815481529060010190602001808311610d3a57829003601f168201915b505050918352505060408051808201909152600983018054602090930192829060ff166003811115610d9957634e487b7160e01b600052602160045260246000fd5b6003811115610db857634e487b7160e01b600052602160045260246000fd5b815260200160018201805480602002602001604051908101604052809291908181526020018280548015610e0b57602002820191906000526020600020905b815481526020019060010190808311610df7575b505050919092525050508152600b82015460209091019060ff166001811115610e4457634e487b7160e01b600052602160045260246000fd5b6001811115610e6357634e487b7160e01b600052602160045260246000fd5b8152600b91909101546001600160a01b0361010090910481166020909201919091526000805460808401519394509092911690637a0ccb71906003811115610ebb57634e487b7160e01b600052602160045260246000fd5b6040516001600160e01b031960e084901b16815260ff909116600482015260240160206040518083038186803b158015610ef457600080fd5b505afa158015610f08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2c919061250a565b90506000610f3b82600a612966565b610f46906002612a37565b90508060066000878152602001908152602001600020548460400151610f6c9190612a56565b111595945050505050565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b158015610fbc57600080fd5b505af1158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff491906121ca565b6110105760405162461bcd60e51b815260040161043890612806565b60008281526009602090815260409182902083905581518481529081018390527fc1441e01aeb40573f05f3cb569528d63ce347f2016768e07218ef95d9c5622c3910160405180910390a15050565b6000546001600160a01b03161561112b5760008054604051632474521560e21b815260048101929092523360248301526001600160a01b0316906391d148549060440160206040518083038186803b1580156110ba57600080fd5b505afa1580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f291906121ca565b61112b5760405162461bcd60e51b815260206004820152600a6024820152694552525f415554485f3160b01b6044820152606401610438565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600e60209081526040918290208054835181840281018401909452808452606093928301828280156111ad57602002820191906000526020600020905b815481526020019060010190808311611199575b50505050509050919050565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b1580156111fe57600080fd5b505af1158015611212573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123691906121ca565b6112525760405162461bcd60e51b815260040161043890612806565b6000818152600b602052604090819020805460ff19166001179055517fe3ccb19985244c1e19fcf9cc2cc2e315168248c9cb3bfb26028dc4fb39d5261b9061048c9083815260200190565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b1580156112e257600080fd5b505af11580156112f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131a91906121ca565b6113365760405162461bcd60e51b815260040161043890612806565b60009182526006602052604090912055565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b15801561138d57600080fd5b505af11580156113a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c591906121ca565b6113e15760405162461bcd60e51b815260040161043890612806565b60058054600181810183556000929092528551600c9091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810191825560208701517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db18201805460ff90921660ff1992831617905560408801517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db283015560608801517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db383015560808801517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db490920180548995919216908360038111156114fa57634e487b7160e01b600052602160045260246000fd5b021790555060a0820151600582015560c082015160068201805460ff1916600183600381111561153a57634e487b7160e01b600052602160045260246000fd5b021790555060e082015160078201556101008201518051611565916008840191602090910190611de2565b506101208201518051600983018054909190829060ff1916600183600381111561159f57634e487b7160e01b600052602160045260246000fd5b021790555060208281015180516115bc9260018501920190611e66565b505050610140820151600b8201805460ff1916600183818111156115f057634e487b7160e01b600052602160045260246000fd5b02179055506101609190910151600b90910180546001600160a01b0390921661010002610100600160a81b031990921691909117905560055460009061163890600190612a56565b6001600160a01b038316600090815260076020908152604080832080546001810182559084529190922001829055610100870151905191925060089161167e91906127d7565b90815260408051918290036020908101832080546001810182556000918252828220018590558481526006909152908120556001600160a01b038316907f905c2f9ea8dec011bcb7a27569b871afeb9faa68a12bce47de2a20f5156b9946906116ee9084908990899089906128a5565b60405180910390a25050505050565b6001600160a01b0381166000908152600760209081526040918290208054835181840281018401909452808452606093928301828280156111ad57602002820191906000526020600020908154815260200190600101908083116111995750505050509050919050565b6000806005838154811061178b57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805161018081018252600c90930290910180548352600181015460ff9081169484019490945260028101549183019190915260038082015460608401526004820154929391926080850192169081111561180257634e487b7160e01b600052602160045260246000fd5b600381111561182157634e487b7160e01b600052602160045260246000fd5b815260058201546020820152600682015460409091019060ff16600381111561185a57634e487b7160e01b600052602160045260246000fd5b600381111561187957634e487b7160e01b600052602160045260246000fd5b81526020016007820154815260200160088201805461189790612a9d565b80601f01602080910402602001604051908101604052809291908181526020018280546118c390612a9d565b80156119105780601f106118e557610100808354040283529160200191611910565b820191906000526020600020905b8154815290600101906020018083116118f357829003601f168201915b505050918352505060408051808201909152600983018054602090930192829060ff16600381111561195257634e487b7160e01b600052602160045260246000fd5b600381111561197157634e487b7160e01b600052602160045260246000fd5b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156119c457602002820191906000526020600020905b8154815260200190600101908083116119b0575b505050919092525050508152600b82015460209091019060ff1660018111156119fd57634e487b7160e01b600052602160045260246000fd5b6001811115611a1c57634e487b7160e01b600052602160045260246000fd5b8152600b91909101546001600160a01b0361010090910416602091820152606090910151600085815260069092526040909120541015915050919050565b611a62611f2c565b60058281548110611a8357634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805161018081018252600c90930290910180548352600181015460ff90811694840194909452600281015491830191909152600380820154606084015260048201549293919260808501921690811115611afa57634e487b7160e01b600052602160045260246000fd5b6003811115611b1957634e487b7160e01b600052602160045260246000fd5b815260058201546020820152600682015460409091019060ff166003811115611b5257634e487b7160e01b600052602160045260246000fd5b6003811115611b7157634e487b7160e01b600052602160045260246000fd5b815260200160078201548152602001600882018054611b8f90612a9d565b80601f0160208091040260200160405190810160405280929190818152602001828054611bbb90612a9d565b8015611c085780601f10611bdd57610100808354040283529160200191611c08565b820191906000526020600020905b815481529060010190602001808311611beb57829003601f168201915b505050918352505060408051808201909152600983018054602090930192829060ff166003811115611c4a57634e487b7160e01b600052602160045260246000fd5b6003811115611c6957634e487b7160e01b600052602160045260246000fd5b815260200160018201805480602002602001604051908101604052809291908181526020018280548015611cbc57602002820191906000526020600020905b815481526020019060010190808311611ca8575b505050919092525050508152600b82015460209091019060ff166001811115611cf557634e487b7160e01b600052602160045260246000fd5b6001811115611d1457634e487b7160e01b600052602160045260246000fd5b8152600b919091015461010090046001600160a01b031660209091015292915050565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381600087803b158015611d7c57600080fd5b505af1158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db491906121ca565b611dd05760405162461bcd60e51b815260040161043890612806565b6000918252600d602052604090912055565b828054611dee90612a9d565b90600052602060002090601f016020900481019282611e105760008555611e56565b82601f10611e2957805160ff1916838001178555611e56565b82800160010185558215611e56579182015b82811115611e56578251825591602001919060010190611e3b565b50611e62929150611f78565b5090565b828054828255906000526020600020908101928215611e565791602002820182811115611e56578251825591602001919060010190611e3b565b604080516101408101825260008082526020820181905290918201905b81526020016000815260200160006003811115611eea57634e487b7160e01b600052602160045260246000fd5b81526020016000815260200160608152602001611f1860408051808201909152600081526060602082015290565b815260200160008152600060209091015290565b60405180610180016040528060008152602001600060ff168152602001600081526020016000815260200160006003811115611ebd57634e487b7160e01b600052602160045260246000fd5b5b80821115611e625760008155600101611f79565b80356001600160a01b0381168114610ba957600080fd5b8035610ba981612b2d565b803560028110610ba957600080fd5b600082601f830112611fce578081fd5b813567ffffffffffffffff811115611fe857611fe8612b04565b611ffb601f8201601f19166020016128ef565b81815284602083860101111561200f578283fd5b816020850160208301379081016020019190915292915050565b600060e0828403121561203a578081fd5b61204460e06128ef565b9050813567ffffffffffffffff8082111561205e57600080fd5b61206a85838601611fbe565b8352602084013591508082111561208057600080fd5b5061208d84828501611fbe565b60208301525060408201356040820152606082013560608201526120b36080830161219e565b608082015260a082013560a082015260c082013560c082015292915050565b6000604082840312156120e3578081fd5b6120ed60406128ef565b905081356120fa81612b2d565b815260208281013567ffffffffffffffff8082111561211857600080fd5b818501915085601f83011261212c57600080fd5b81358181111561213e5761213e612b04565b838102915061214e8483016128ef565b8181528481019084860184860187018a101561216957600080fd5b600095505b8386101561218c57803583526001959095019491860191860161216e565b50808688015250505050505092915050565b8035610ba981612b3a565b6000602082840312156121ba578081fd5b6121c382611f8d565b9392505050565b6000602082840312156121db578081fd5b815180151581146121c3578182fd5b600080600080600060a08688031215612201578081fd5b853567ffffffffffffffff80821115612218578283fd5b818801915061014080838b03121561222e578384fd5b612237816128ef565b90506122428361219e565b81526020830135602082015261225a60408401611fa4565b60408201526060830135606082015261227560808401611fa4565b608082015260a083013560a082015260c083013582811115612295578485fd5b6122a18b828601611fbe565b60c08301525060e0830135828111156122b8578485fd5b6122c48b8286016120d2565b60e0830152506101006122d8818501611faf565b908201526101206122ea848201611f8d565b9082015296506020880135915080821115612303578283fd5b61230f89838a01612029565b95506040880135915080821115612324578283fd5b5061233188828901612029565b9350506123406060870161219e565b915061234e60808701611f8d565b90509295509295909350565b6000806000806080858703121561236f578182fd5b843567ffffffffffffffff80821115612386578384fd5b818701915061018080838a03121561239c578485fd5b6123a5816128ef565b9050823581526123b76020840161219e565b602082015260408301356040820152606083013560608201526123dc60808401611fa4565b608082015260a083013560a08201526123f760c08401611fa4565b60c082015260e083013560e08201526101008084013583811115612419578687fd5b6124258b828701611fbe565b828401525050610120808401358381111561243e578687fd5b61244a8b8287016120d2565b82840152505061014061245e818501611faf565b90820152610160612470848201611f8d565b9082015295506020870135915080821115612489578384fd5b61249588838901612029565b945060408701359150808211156124aa578384fd5b506124b787828801612029565b9250506124c660608601611f8d565b905092959194509250565b6000602082840312156124e2578081fd5b5035919050565b600080604083850312156124fb578182fd5b50508035926020909101359150565b60006020828403121561251b578081fd5b81516121c381612b3a565b6000815180845260208085019450808401835b8381101561255557815187529582019590820190600101612539565b509495945050505050565b61256981612b1a565b9052565b6002811061256957612569612aee565b60008151808452612595816020860160208601612a6d565b601f01601f19169290920160200192915050565b6000815160e084526125be60e085018261257d565b9050602083015184820360208601526125d7828261257d565b915050604083015160408501526060830151606085015260ff608084015116608085015260a083015160a085015260c083015160c08501528091505092915050565b6000815161262681612b1a565b808452506020820151604060208501526126436040850182612526565b949350505050565b805160ff16825260006101406020830151602085015260408301516126736040860182612560565b506060830151606085015260808301516126906080860182612560565b5060a083015160a085015260c08301518160c08601526126b28286018261257d565b91505060e083015184820360e08601526126cc8282612619565b915050610100808401516126e28287018261256d565b5050610120838101516001600160a01b038116868301525b5090949350505050565b6000610180825184526020830151612721602086018260ff169052565b50604083015160408501526060830151606085015260808301516127486080860182612560565b5060a083015160a085015260c083015161276560c0860182612560565b5060e083015160e08501526101008084015182828701526127888387018261257d565b9250505061012080840151858303828701526127a48382612619565b92505050610140808401516127bb8287018261256d565b5050610160838101516001600160a01b038116868301526126fa565b600082516127e9818460208701612a6d565b9190910192915050565b6000602082526121c36020830184612526565b6020808252600a908201526922a9292fa0aaaa242f9960b11b604082015260600190565b6000602082526121c3602083018461264b565b6000602082526121c36020830184612704565b600086825260a0602083015261286960a083018761264b565b828103604084015261287b81876125a9565b9050828103606084015261288f81866125a9565b91505060ff831660808301529695505050505050565b6000858252608060208301526128be6080830186612704565b82810360408401526128d081866125a9565b905082810360608401526128e481856125a9565b979650505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561291857612918612b04565b604052919050565b80825b6001808611612932575061295d565b81870482111561294457612944612ad8565b8086161561295157918102915b9490941c938002612923565b94509492505050565b60006121c360001960ff851684600082612982575060016121c3565b8161298f575060006121c3565b81600181146129a557600281146129af576129dc565b60019150506121c3565b60ff8411156129c0576129c0612ad8565b6001841b9150848211156129d6576129d6612ad8565b506121c3565b5060208310610133831016604e8410600b8410161715612a0f575081810a83811115612a0a57612a0a612ad8565b6121c3565b612a1c8484846001612920565b808604821115612a2e57612a2e612ad8565b02949350505050565b6000816000190483118215151615612a5157612a51612ad8565b500290565b600082821015612a6857612a68612ad8565b500390565b60005b83811015612a88578181015183820152602001612a70565b83811115612a97576000848401525b50505050565b600281046001821680612ab157607f821691505b60208210811415612ad257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60048110612b2a57612b2a612aee565b50565b60048110612b2a57600080fd5b60ff81168114612b2a57600080fdfea2646970667358221220bc47412d0a707e86e2f33157976f572c42d30a136167216e747d530f4c3aa02d64736f6c63430008020033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading