ETH Price: $3,484.35 (+2.04%)

Token

PRüF Network (PRUF)
 

Overview

Max Total Supply

622,715,627.5 PRUF

Holders

899 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
raselheart.eth
Balance
40,000 PRUF

Value
$0.00
0x81b53ed68ab9970d25820add55eafd4a7816413a
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

PRuF is a privacy-first, extensible, decentralized asset management protocol. With PRuF, tokenized real-world or virtual assets, ownership, transfer, and authenticity are secured on the blockchain. PRuF provides flexible tools for managing ownership, fighting brand piracy, and facilitating commerce.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
UTIL_TKN

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Multiple files format)

File 14 of 15: PRUF_UTIL_TKN.sol
/*--------------------------------------------------------PRuF0.7.1
__/\\\\\\\\\\\\\ _____/\\\\\\\\\ _______/\\./\\ ___/\\\\\\\\\\\\\\\
 _\/\\\/////////\\\ _/\\\///////\\\ ____\//..\//____\/\\\///////////__
  _\/\\\.......\/\\\.\/\\\.....\/\\\ ________________\/\\\ ____________
   _\/\\\\\\\\\\\\\/__\/\\\\\\\\\\\/_____/\\\____/\\\.\/\\\\\\\\\\\ ____
    _\/\\\/////////____\/\\\//////\\\ ___\/\\\___\/\\\.\/\\\///////______
     _\/\\\ ____________\/\\\ ___\//\\\ __\/\\\___\/\\\.\/\\\ ____________
      _\/\\\ ____________\/\\\ ____\//\\\ _\/\\\___\/\\\.\/\\\ ____________
       _\/\\\ ____________\/\\\ _____\//\\\.\//\\\\\\\\\ _\/\\\ ____________
        _\/// _____________\/// _______\/// __\///////// __\/// _____________
         *-------------------------------------------------------------------*/

/*-----------------------------------------------------------------
 *  TO DO
 *-----------------------------------------------------------------
 * UTILITY TOKEN CONTRACT
 *---------------------------------------------------------------*/

// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.6.7;

import "./PRUF_INTERFACES.sol";
import "./AccessControl.sol";
import "./ERC20Burnable.sol";
import "./Pausable.sol";
import "./ERC20Snapshot.sol";

/**
 * @dev {ERC20} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a MINTER_ROLE that allows for token minting (creation)
 *  - a PAUSER_ROLE that allows to stop all token transfers
 *  - a SNAPSHOT_ROLE that allows to take snapshots
 *  - a PAYABLE_ROLE role that allows authorized addresses to invoke the token splitting payment function (all paybale contracts)
 *  - a TRUSTED_AGENT_ROLE role that allows authorized addresses to transfer and burn tokens (AC_MGR)




 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract UTIL_TKN is
    Context,
    AccessControl,
    ERC20Burnable,
    Pausable,
    ERC20Snapshot
{
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant SNAPSHOT_ROLE = keccak256("SNAPSHOT_ROLE");
    bytes32 public constant PAYABLE_ROLE = keccak256("PAYABLE_ROLE");
    bytes32 public constant TRUSTED_AGENT_ROLE = keccak256(
        "TRUSTED_AGENT_ROLE"
    );

    using SafeMath for uint256;

    uint256 private _cap = 4000000000000000000000000000; //4billion max supply

    address private sharesAddress = address(0);

    struct Invoice {
        //invoice struct to facilitate payment messaging in-contract
        address rootAddress;
        uint256 rootPrice;
        address ACTHaddress;
        uint256 ACTHprice;
    }

    uint256 trustedAgentEnabled = 1;

    mapping(address => uint256) private coldWallet;

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * See {ERC20-constructor}.
     */
    constructor() public ERC20("PRüF Network", "PRUF") {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    //------------------------------------------------------------------------MODIFIERS

    /*
     * @dev Verify user credentials
     * Originating Address:
     *      is Admin
     */
    modifier isAdmin() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
            "PRuF:MOD: must have DEFAULT_ADMIN_ROLE"
        );
        _;
    }

    /*
     * @dev Verify user credentials
     * Originating Address:
     *      is Pauser
     */
    modifier isPauser() {
        require(
            hasRole(PAUSER_ROLE, _msgSender()),
            "PRuF:MOD: must have PAUSER_ROLE"
        );
        _;
    }

    /*
     * @dev Verify user credentials
     * Originating Address:
     *      is Minter
     */
    modifier isMinter() {
        require(
            hasRole(MINTER_ROLE, _msgSender()),
            "PRuF:MOD: must have MINTER_ROLE"
        );
        _;
    }

    /*
     * @dev Verify user credentials
     * Originating Address:
     *      is Payable in PRuF
     */
    modifier isPayable() {
        require(
            hasRole(PAYABLE_ROLE, _msgSender()),
            "PRuF:MOD: must have PAYABLE_ROLE"
        );
        require( //---------------------------------------------------DPS:TEST : NEW
            trustedAgentEnabled == 1,
            "PRuF:MOD: Trusted Payable Function permanently disabled - use allowance / transferFrom pattern"
        );
        _;
    }

    /*
     * @dev Verify user credentials
     * Originating Address:
     *      is Trusted Agent
     */
    modifier isTrustedAgent() {
        require(
            hasRole(TRUSTED_AGENT_ROLE, _msgSender()),
            "PRuF:MOD: must have TRUSTED_AGENT_ROLE"
        );
        require( //---------------------------------------------------DPS:TEST : NEW
            trustedAgentEnabled == 1,
            "PRuF:MOD: Trusted Agent function permanently disabled - use allowance / transferFrom pattern"
        );
        _;
    }

    /*
     * @dev ----------------------------------------PERMANANTLY !!!  Kills trusted agent and payable functions
     * this will break the functionality of current payment mechanisms.
     *
     * The workaround for this is to create an allowance for pruf contracts for a single or multiple payments,
     * either ahead of time "loading up your PRUF account" or on demand with an operation. On demand will use quite a bit more gas.
     * "preloading" should be pretty gas efficient, but will add an extra step to the workflow, requiring users to have sufficient
     * PRuF "banked" in an allowance for use in the system.
     *
     */
    function adminKillTrustedAgent(uint256 _key) external isAdmin {
        //---------------------------------------------------DPS:TEST : NEW
        if (_key == 170) {
            trustedAgentEnabled = 0; //-------------------THIS IS A PERMANENT ACTION AND CANNOT BE UNDONE
        }
    }

    /*
     * @dev Set calling wallet to a "cold Wallet" that cannot be manipulated by TRUSTED_AGENT or PAYABLE permissioned functions
     * WALLET ADDRESSES SET TO "Cold" DO NOT WORK WITH TRUSTED_AGENT FUNCTIONS and must be unset from cold before it can interact with
     * contract functions.
     */
    function setColdWallet() external {
        //---------------------------------------------------DPS:TEST : NEW
        coldWallet[_msgSender()] = 170;
    }

    /*
     * @dev un-set calling wallet to a "cold Wallet", enabling manipulation by TRUSTED_AGENT and PAYABLE permissioned functions
     * WALLET ADDRESSES SET TO "Cold" DO NOT WORK WITH TRUSTED_AGENT FUNCTIONS and must be unset from cold before it can interact with
     * contract functions.
     */
    function unSetColdWallet() external {
        //---------------------------------------------------DPS:TEST : NEW
        coldWallet[_msgSender()] = 0;
    }

    /*
     * @dev return an adresses "cold wallet" status
     * WALLET ADDRESSES SET TO "Cold" DO NOT WORK WITH TRUSTED_AGENT FUNCTIONS
     */
    function isColdWallet(address _addr) external view returns (uint256) {
        return coldWallet[_addr];
    }

    /*
     * @dev Set address of SHARES payment contract. by default contract will use root address instead if set to zero.
     */
    function AdminSetSharesAddress(address _paymentAddress) external isAdmin {
        require(
            _paymentAddress != address(0),
            "PRuF:SSA: payment address cannot be zero"
        );

        //^^^^^^^checks^^^^^^^^^

        sharesAddress = _paymentAddress;
        //^^^^^^^effects^^^^^^^^^
    }

    /*
     * @dev Deducts token payment from transaction
     */
    function payForService(
        address _senderAddress,
        address _rootAddress,
        uint256 _rootPrice,
        address _ACTHaddress,
        uint256 _ACTHprice
    ) external isPayable {
        require( //---------------------------------------------------DPS:TEST : NEW
            coldWallet[_senderAddress] == 0,
            "PRuF:PFS: Cold Wallet - Trusted payable functions prohibited"
        );
        require( //redundant? throws on transfer?
            balanceOf(_senderAddress) >= _rootPrice.add(_ACTHprice),
            "PRuF:PFS: insufficient balance"
        );
        //^^^^^^^checks^^^^^^^^^

        if (sharesAddress == address(0)) {
            //IF SHARES ADDRESS IS NOT SET
            _transfer(_senderAddress, _rootAddress, _rootPrice);
            _transfer(_senderAddress, _ACTHaddress, _ACTHprice);
        } else {
            //IF SHARES ADDRESS IS SET
            uint256 sharesShare = _rootPrice.div(uint256(4)); // sharesShare is 0.25 share of root costs
            uint256 rootShare = _rootPrice.sub(sharesShare); // adjust root price to be root price - 0.25 share

            _transfer(_senderAddress, _rootAddress, rootShare);
            _transfer(_senderAddress, sharesAddress, sharesShare);
            _transfer(_senderAddress, _ACTHaddress, _ACTHprice);
        }
        //^^^^^^^effects / interactions^^^^^^^^^
    }

    /*
     * @dev arbitrary burn (requires TRUSTED_AGENT_ROLE)   ****USE WITH CAUTION
     */
    function trustedAgentBurn(address _addr, uint256 _amount)
        public
        isTrustedAgent
    {
        require( //---------------------------------------------------DPS:TEST : NEW
            coldWallet[_addr] == 0,
            "PRuF:BRN: Cold Wallet - Trusted functions prohibited"
        );
        //^^^^^^^checks^^^^^^^^^
        _burn(_addr, _amount);
        //^^^^^^^effects^^^^^^^^^
    }

    /*
     * @dev arbitrary transfer (requires TRUSTED_AGENT_ROLE)   ****USE WITH CAUTION
     */
    function trustedAgentTransfer(
        address _from,
        address _to,
        uint256 _amount
    ) public isTrustedAgent {
        require( //---------------------------------------------------DPS:TEST : NEW
            coldWallet[_from] == 0,
            "PRuF:TAT: Cold Wallet - Trusted functions prohibited"
        );
        //^^^^^^^checks^^^^^^^^^
        _transfer(_from, _to, _amount);
        //^^^^^^^effects^^^^^^^^^
    }

    /*
     * @dev Take a balance snapshot, returns snapshot ID
     */
    function takeSnapshot() external returns (uint256) {
        require(
            hasRole(SNAPSHOT_ROLE, _msgSender()),
            "ERC20PresetMinterPauser: must have snapshot role to take a snapshot"
        );
        return _snapshot();
    }

    /**
     * @dev Creates `_amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 _amount) public virtual {
        require(
            hasRole(MINTER_ROLE, _msgSender()),
            "PRuF:MOD: must have MINTER_ROLE"
        );
        //^^^^^^^checks^^^^^^^^^

        _mint(to, _amount);
        //^^^^^^^interactions^^^^^^^^^
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual isPauser {
        //^^^^^^^checks^^^^^^^^^
        _pause();
        //^^^^^^^effects^^^^^^^^
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual isPauser {
        //^^^^^^^checks^^^^^^^^^
        _unpause();
        //^^^^^^^effects^^^^^^^^
    }

    /**
     * @dev Returns the cap on the token's total supply.
     */
    function cap() public view returns (uint256) {
        return _cap;
    }

    /**
     * @dev all paused functions are blocked here, unless caller has "pauser" role
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20, ERC20Snapshot) {
        super._beforeTokenTransfer(from, to, amount);

        require(
            (!paused()) || hasRole(PAUSER_ROLE, _msgSender()),
            "ERC20Pausable: function unavailble while contract is paused"
        );
        if (from == address(0)) {
            // When minting tokens
            require(
                totalSupply().add(amount) <= _cap,
                "ERC20Capped: cap exceeded"
            );
        }
    }
}

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

pragma solidity ^0.6.0;

import "./EnumerableSet.sol";
import "./Address.sol";
import "./Context.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * 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 {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

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

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _grantRole(role, account);
    }

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

        _revokeRole(role, account);
    }

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.6.2;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.6.0;

import "./Math.sol";

/**
 * @dev Collection of functions related to array types.
 */
library Arrays {
   /**
     * @dev Searches a sorted `array` and returns the first index that contains
     * a value greater or equal to `element`. If no such index exists (i.e. all
     * values in the array are strictly less than `element`), the array length is
     * returned. Time complexity O(log n).
     *
     * `array` is expected to be sorted in ascending order, and to contain no
     * repeated elements.
     */
    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
        if (array.length == 0) {
            return 0;
        }

        uint256 low = 0;
        uint256 high = array.length;

        while (low < high) {
            uint256 mid = Math.average(low, high);

            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)
            // because Math.average rounds down (it does integer division with truncation).
            if (array[mid] > element) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
        if (low > 0 && array[low - 1] == element) {
            return low - 1;
        } else {
            return low;
        }
    }
}

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

pragma solidity ^0.6.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 GSN 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 payable) {
        return msg.sender;
    }

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

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

pragma solidity ^0.6.0;

import "./SafeMath.sol";

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

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

pragma solidity ^0.6.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

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

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

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

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

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

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

            bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

pragma solidity ^0.6.0;

import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.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 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

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

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

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

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

pragma solidity ^0.6.0;

import "./Context.sol";
import "./ERC20.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 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

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

pragma solidity ^0.6.0;

import "./SafeMath.sol";
import "./Arrays.sol";
import "./Counters.sol";
import "./ERC20.sol";

/**
 * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and
 * total supply at the time are recorded for later access.
 *
 * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.
 * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different
 * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be
 * used to create an efficient ERC20 forking mechanism.
 *
 * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a
 * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot
 * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id
 * and the account address.
 *
 * ==== Gas Costs
 *
 * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log
 * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much
 * smaller since identical balances in subsequent snapshots are stored as a single entry.
 *
 * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is
 * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent
 * transfers will have normal cost until the next snapshot, and so on.
 */
abstract contract ERC20Snapshot is ERC20 {
    // Inspired by Jordi Baylina's MiniMeToken to record historical balances:
    // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol

    using SafeMath for uint256;
    using Arrays for uint256[];
    using Counters for Counters.Counter;

    // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a
    // Snapshot struct, but that would impede usage of functions that work on an array.
    struct Snapshots {
        uint256[] ids;
        uint256[] values;
    }

    mapping (address => Snapshots) private _accountBalanceSnapshots;
    Snapshots private _totalSupplySnapshots;

    // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.
    Counters.Counter private _currentSnapshotId;

    /**
     * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.
     */
    event Snapshot(uint256 id);

    /**
     * @dev Creates a new snapshot and returns its snapshot id.
     *
     * Emits a {Snapshot} event that contains the same id.
     *
     * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a
     * set of accounts, for example using {AccessControl}, or it may be open to the public.
     *
     * [WARNING]
     * ====
     * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,
     * you must consider that it can potentially be used by attackers in two ways.
     *
     * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow
     * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target
     * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs
     * section above.
     *
     * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.
     * ====
     */
    function _snapshot() internal virtual returns (uint256) {
        _currentSnapshotId.increment();

        uint256 currentId = _currentSnapshotId.current();
        emit Snapshot(currentId);
        return currentId;
    }

    /**
     * @dev Retrieves the balance of `account` at the time `snapshotId` was created.
     */
    function balanceOfAt(address account, uint256 snapshotId) public view returns (uint256) {
        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);

        return snapshotted ? value : balanceOf(account);
    }

    /**
     * @dev Retrieves the total supply at the time `snapshotId` was created.
     */
    function totalSupplyAt(uint256 snapshotId) public view returns(uint256) {
        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);

        return snapshotted ? value : totalSupply();
    }


    // Update balance and/or total supply snapshots before the values are modified. This is implemented
    // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
      super._beforeTokenTransfer(from, to, amount);

      if (from == address(0)) {
        // mint
        _updateAccountSnapshot(to);
        _updateTotalSupplySnapshot();
      } else if (to == address(0)) {
        // burn
        _updateAccountSnapshot(from);
        _updateTotalSupplySnapshot();
      } else {
        // transfer
        _updateAccountSnapshot(from);
        _updateAccountSnapshot(to);
      }
    }

    function _valueAt(uint256 snapshotId, Snapshots storage snapshots)
        private view returns (bool, uint256)
    {
        require(snapshotId > 0, "ERC20Snapshot: id is 0");
        // solhint-disable-next-line max-line-length
        require(snapshotId <= _currentSnapshotId.current(), "ERC20Snapshot: nonexistent id");

        // When a valid snapshot is queried, there are three possibilities:
        //  a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never
        //  created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds
        //  to this id is the current one.
        //  b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the
        //  requested id, and its value is the one to return.
        //  c) More snapshots were created after the requested one, and the queried value was later modified. There will be
        //  no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is
        //  larger than the requested one.
        //
        // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if
        // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does
        // exactly this.

        uint256 index = snapshots.ids.findUpperBound(snapshotId);

        if (index == snapshots.ids.length) {
            return (false, 0);
        } else {
            return (true, snapshots.values[index]);
        }
    }

    function _updateAccountSnapshot(address account) private {
        _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));
    }

    function _updateTotalSupplySnapshot() private {
        _updateSnapshot(_totalSupplySnapshots, totalSupply());
    }

    function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {
        uint256 currentId = _currentSnapshotId.current();
        if (_lastSnapshotId(snapshots.ids) < currentId) {
            snapshots.ids.push(currentId);
            snapshots.values.push(currentValue);
        }
    }

    function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {
        if (ids.length == 0) {
            return 0;
        } else {
            return ids[ids.length - 1];
        }
    }
}

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

pragma solidity ^0.6.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 11 of 15: Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

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

pragma solidity ^0.6.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

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

    bool private _paused;

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

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

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

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

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

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

File 13 of 15: PRUF_INTERFACES.sol
/*--------------------------------------------------------PRuF0.7.1
__/\\\\\\\\\\\\\ _____/\\\\\\\\\ _______/\\./\\ ___/\\\\\\\\\\\\\\\
 _\/\\\/////////\\\ _/\\\///////\\\ ____\//..\//____\/\\\///////////__
  _\/\\\.......\/\\\.\/\\\.....\/\\\ ________________\/\\\ ____________
   _\/\\\\\\\\\\\\\/__\/\\\\\\\\\\\/_____/\\\____/\\\.\/\\\\\\\\\\\ ____
    _\/\\\/////////____\/\\\//////\\\ ___\/\\\___\/\\\.\/\\\///////______
     _\/\\\ ____________\/\\\ ___\//\\\ __\/\\\___\/\\\.\/\\\ ____________
      _\/\\\ ____________\/\\\ ____\//\\\ _\/\\\___\/\\\.\/\\\ ____________
       _\/\\\ ____________\/\\\ _____\//\\\.\//\\\\\\\\\ _\/\\\ ____________
        _\/// _____________\/// _______\/// __\///////// __\/// _____________
         *-------------------------------------------------------------------*/

/*-----------------------------------------------------------------
 *  TO DO
 *
 *---------------------------------------------------------------*/

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.7;

/*
 * @dev Interface for UTIL_TKN
 * INHERIANCE:
    import "./AccessControl.sol";
    import "./ERC20.sol";
    import "./ERC20Burnable.sol";
    import "./ERC20Pausable.sol";
    import "./ERC20Snapshot.sol";
 */
interface UTIL_TKN_Interface {

    /*
     * @dev PERMENANTLY !!!  Kill trusted agent and payable
     */
    function killTrustedAgent(uint256 _key) external;

    /*
     * @dev Set calling wallet to a "cold Wallet" that cannot be manipulated by TRUSTED_AGENT or PAYABLE permissioned functions
     */
    function setColdWallet() external;

    /*
     * @dev un-set calling wallet to a "cold Wallet", enabling manipulation by TRUSTED_AGENT and PAYABLE permissioned functions
     */
    function unSetColdWallet() external;

    /*
     * @dev return an adresses "cold wallet" status
     */
    function isColdWallet (address _addr) external returns (uint256);
   

    /*
     * @dev Set adress of payment contract
     */
    function AdminSetSharesAddress(address _paymentAddress) external;


    /*
     * @dev Deducts token payment from transaction
     * Requirements:
     * - the caller must have PAYABLE_ROLE.
     * - the caller must have a pruf token balance of at least `_rootPrice + _ACTHprice`.
     */
    function payForService(
        address _senderAddress,
        address _rootAddress,
        uint256 _rootPrice,
        address _ACTHaddress,
        uint256 _ACTHprice
    ) external;

    /*
     * @dev arbitrary burn (requires TRUSTED_AGENT_ROLE)   ****USE WITH CAUTION
     */
    function trustedAgentBurn(address _addr, uint256 _amount) external;

    /*
     * @dev arbitrary transfer (requires TRUSTED_AGENT_ROLE)   ****USE WITH CAUTION
     */
    function trustedAgentTransfer(
        address _from,
        address _to,
        uint256 _amount
    ) external;

    /*
     * @dev Take a balance snapshot, returns snapshot ID
     * - the caller must have the `SNAPSHOT_ROLE`.
     */
    function takeSnapshot() external returns (uint256);

    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 amount) external;

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() external;

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() external;

    /**
     * @dev Retrieves the balance of `account` at the time `snapshotId` was created.
     */
    function balanceOfAt(address account, uint256 snapshotId)
        external
        returns (uint256);

    /**
     * @dev Retrieves the total supply at the time `snapshotId` was created.
     */
    function totalSupplyAt(uint256 snapshotId) external returns (uint256);

   

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external 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
        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 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) external returns (bool); 
    

    /**
     * @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) external returns (bool);

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) external; 

    /**
     * @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) external;

    /**
     * @dev Returns the cap on the token's total supply.
     */
    function cap() external returns (uint256);

        /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external returns (bool);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external returns (uint256);

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

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

    /**
     * @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) external;

    /**
     * @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) external;

    /**
     * @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) external;
       
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for AC_TKN
 * INHERIANCE:
    import "./ERC721/ERC721.sol";
    import "./Ownable.sol";
    import "./ReentrancyGuard.sol";
 */
interface AC_TKN_Interface {
    /*
     * @dev Set storage contract to interface with
     */
    function OO_setStorageContract(address _storageAddress) external;

    /*
     * @dev Address Setters
     */
    function OO_resolveContractAddresses() external;

    /*
     * @dev Mints assetClass token, must be isAdmin
     */
    function mintACToken(
        address _recipientAddress,
        uint256 tokenId,
        string calldata _tokenURI
    ) external returns (uint256);

    /*
     * @dev remint Asset Token
     * must set a new and unuiqe rgtHash
     * burns old token
     * Sends new token to original Caller
     */
    function reMintACToken(
        address _recipientAddress,
        uint256 tokenId,
        string calldata _tokenURI
    ) external returns (uint256);

    /**
     * @dev Transfers the ownership of a given token ID to another address.
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata _data
    ) external;

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

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

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId)
        external
        view
        returns (string memory URI);

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for A_TKN
 * INHERIANCE:
    import "./ERC721/ERC721.sol";
    import "./Ownable.sol";
    import "./ReentrancyGuard.sol";
 */
interface A_TKN_Interface {
    /*
     * @dev Set storage contract to interface with
     */
    function OO_setStorageContract(address _storageAddress) external;

    /*
     * @dev Address Setters
     */
    function OO_resolveContractAddresses() external;

    /*
     * @dev Mint new asset token
     */
    function mintAssetToken(
        address _recipientAddress,
        uint256 tokenId,
        string calldata _tokenURI
    ) external returns (uint256);

    /*
     * @dev remint Asset Token
     * must set a new and unuiqe rgtHash
     * burns old token
     * Sends new token to original Caller
     */
    function reMintAssetToken(address _recipientAddress, uint256 tokenId)
        external
        returns (uint256);

    /*
     * @dev Set new token URI String
     */
    function setURI(uint256 tokenId, string calldata _tokenURI)
        external
        returns (uint256);

    /*
     * @dev Reassures user that token is minted in the PRUF system
     */
    function validatePipToken(
        uint256 tokenId,
        uint32 _assetClass,
        string calldata _authCode
    ) external view;

    /*
     * @dev See if token exists
     */
    function tokenExists(uint256 tokenId) external view returns (uint8);

    /**
     * @dev Transfers the ownership of a given token ID to another address.
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata _data
    ) external;

    /**
     * @dev Safely burns a token and sets the corresponding RGT to zero in storage.
     */
    function discard(uint256 tokenId) external;

    /**
     * @dev Converts uint256 to string form @OpenZeppelin.
     */
    function uint256toString(uint256 number) external returns (string memory);

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

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

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external returns (string memory URI);

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external returns (uint256);

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

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

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for ID_TKN
 * INHERIANCE:
    import "./ERC721/ERC721.sol";
    import "./Ownable.sol";
    import "./ReentrancyGuard.sol";
 */
interface ID_TKN_Interface {
    /*
     * @dev Mint new PRUF_ID token
     */
    function mintPRUF_IDToken(address _recipientAddress, uint256 tokenId)
        external
        returns (uint256);

    /*
     * @dev remint Asset Token
     * must set a new and unuiqe rgtHash
     * burns old token
     * Sends new token to original Caller
     */
    function reMintPRUF_IDToken(address _recipientAddress, uint256 tokenId)
        external
        returns (uint256);

    /*
     * @dev See if token exists
     */
    function tokenExists(uint256 tokenId) external view returns (uint8);

    /**
     * @dev @dev Blocks the transfer of a given token ID to another address
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely blocks the transfer of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Safely blocks the transfer of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata _data
    ) external;

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

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

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId)
        external
        view
        returns (string memory URI);

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for AC_MGR
 * INHERIANCE:
    import "./PRUF_BASIC.sol";
    import "./math/Safemath.sol";
 */
interface AC_MGR_Interface {
    /*
     * @dev Authorize / Deauthorize / Authorize users for an address be permitted to make record modifications
     */
    function OO_addUser(
        bytes32 _addrHash,
        uint8 _userType,
        uint32 _assetClass
    ) external;

    /*
     * @dev Mints asset class token and creates an assetClass. Mints to @address
     * Requires that:
     *  name is unuiqe
     *  AC is not provisioned with a root (proxy for not yet registered)
     *  that ACtoken does not exist
     */
    function createAssetClass(
        address _recipientAddress,
        string calldata _name,
        uint32 _assetClass,
        uint32 _assetClassRoot,
        uint8 _custodyType,
        bytes32 _IPFS
    ) external;

    /*
     * @dev Modifies an assetClass
     * Sets a new AC name. Asset Classes cannot be moved to a new root or custody type.
     * Requires that:
     *  caller holds ACtoken
     *  name is unuiqe or same as old name
     */
    function updateACname(string calldata _name, uint32 _assetClass) external;

    /*
     * @dev Modifies an assetClass
     * Sets a new AC IPFS Address. Asset Classes cannot be moved to a new root or custody type.
     * Requires that:
     *  caller holds ACtoken
     */
    function updateACipfs(bytes32 _IPFS, uint32 _assetClass) external;

    /*
     * @dev Set function costs and payment address per asset class, in Wei
     */
    function ACTH_setCosts(
        uint32 _assetClass,
        uint16 _service,
        uint256 _serviceCost,
        address _paymentAddress
    ) external;

    /*
     * @dev get a User Record
     */
    function getUserType(bytes32 _userHash, uint32 _assetClass)
        external
        view
        returns (uint8);

    /*
     * @dev Retrieve AC_data @ _assetClass
     */
    function getAC_data(uint32 _assetClass)
        external
        view
        returns (
            uint32,
            uint8,
            uint32,
            uint32,
            bytes32
        );

    /*
     * @dev Retrieve AC_discount @ _assetClass, in percent ACTH share, * 100 (9000 = 90%)
     */
    function getAC_discount(uint32 _assetClass) external view returns (uint32);

    /*
     * @dev compare the root of two asset classes
     */
    function isSameRootAC(uint32 _assetClass1, uint32 _assetClass2)
        external
        view
        returns (uint8);

    /*
     * @dev Retrieve AC_name @ _tokenId
     */
    function getAC_name(uint32 _tokenId) external view returns (string memory);

    /*
     * @dev Retrieve AC_number @ AC_name
     */
    function resolveAssetClass(string calldata _name)
        external
        view
        returns (uint32);

    /*
     * @dev Retrieve function costs per asset class, per service type, in Wei
     */
    function getServiceCosts(uint32 _assetClass, uint16 _service)
        external
        view
        returns (
            address,
            uint256,
            address,
            uint256
        );
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for STOR
 * INHERIANCE:
    import "./Ownable.sol";
    import "./Pausable.sol";
    import "./math/Safemath.sol";
    import "./ReentrancyGuard.sol";
 */
interface STOR_Interface {
    /*
     * @dev Triggers stopped state. (pausable)
     */
    function pause() external;

    /*
     * @dev Returns to normal state. (pausable)
     */
    function unpause() external;

    /*
     * @dev Authorize / Deauthorize / Authorize ADRESSES permitted to make record modifications, per AssetClass
     * populates contract name resolution and data mappings
     */
    function OO_addContract(
        string calldata _name,
        address _addr,
        uint32 _assetClass,
        uint8 _contractAuthLevel
    ) external;

    /*
     * @dev Authorize / Deauthorize / Authorize contract NAMES permitted to make record modifications, per AssetClass
     * allows ACtokenHolder to auithorize or deauthorize specific contracts to work within their asset class
     */
    function enableContractForAC(
        string calldata _name,
        uint32 _assetClass,
        uint8 _contractAuthLevel
    ) external;

    /*
     * @dev Make a new record, writing to the 'database' mapping with basic initial asset data
     */
    function newRecord(
        bytes32 _idxHash,
        bytes32 _rgtHash,
        uint32 _assetClass,
        uint32 _countDownStart
    ) external;

    /*
     * @dev Modify a record, writing to the 'database' mapping with updates to multiple fields
     */
    function modifyRecord(
        bytes32 _idxHash,
        bytes32 _rgtHash,
        uint8 _newAssetStatus,
        uint32 _countDown,
        uint256 _incrementForceModCount,
        uint256 _incrementNumberOfTransfers
    ) external;

    /*
     * @dev Change asset class of an asset - writes to assetClass in the 'Record' struct of the 'database' at _idxHash
     */
    function changeAC(bytes32 _idxHash, uint32 _newAssetClass) external;

    /*
     * @dev Set an asset to stolen or lost. Allows narrow modification of status 6/12 assets, normally locked
     */
    function setStolenOrLost(bytes32 _idxHash, uint8 _newAssetStatus) external;

    /*
     * @dev Set an asset to escrow locked status (6/50/56).
     */
    function setEscrow(bytes32 _idxHash, uint8 _newAssetStatus) external;

    /*
     * @dev remove an asset from escrow status. Implicitly trusts escrowManager ECR_MGR contract
     */
    function endEscrow(bytes32 _idxHash) external;

    /*
     * @dev Modify record Ipfs1 data
     */
    function modifyIpfs1(bytes32 _idxHash, bytes32 _Ipfs1) external;

    /*
     * @dev Write record Ipfs2 data
     */
    function modifyIpfs2(bytes32 _idxHash, bytes32 _Ipfs2) external;

    /*
     * @dev return a record from the database, including rgt
     */
    function retrieveRecord(bytes32 _idxHash)
        external
        view
        returns (
            bytes32,
            uint8,
            uint32,
            uint32,
            uint32,
            bytes32,
            bytes32
        );

    /*
     * @dev return a record from the database w/o rgt
     */
    function retrieveShortRecord(bytes32 _idxHash)
        external
        view
        returns (
            uint8,
            uint8,
            uint32,
            uint32,
            uint32,
            bytes32,
            bytes32,
            uint16
        );

    /*
     * @dev Compare record.rightsholder with supplied bytes32 rightsholder
     * return 170 if matches, 0 if not
     */
    function _verifyRightsHolder(bytes32 _idxHash, bytes32 _rgtHash)
        external
        view
        returns (uint256);

    /*
     * @dev Compare record.rightsholder with supplied bytes32 rightsholder (writes an emit in blockchain for independant verification)
     */
    function blockchainVerifyRightsHolder(bytes32 _idxHash, bytes32 _rgtHash)
        external
        returns (uint8);

    /*
     * @dev //returns the address of a contract with name _name. This is for web3 implementations to find the right contract to interact with
     * example :  Frontend = ****** so web 3 first asks storage where to find frontend, then calls for frontend functions.
     */
    function resolveContractAddress(string calldata _name)
        external
        view
        returns (address);

    /*
     * @dev //returns the contract type of a contract with address _addr.
     */
    function ContractInfoHash(address _addr, uint32 _assetClass)
        external
        view
        returns (uint8, bytes32);
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for ECR_MGR
 * INHERIANCE:
    import "./PRUF_BASIC.sol";
    import "./math/Safemath.sol";
 */
interface ECR_MGR_Interface {
    /*
     * @dev Set an asset to escrow status (6/50/56). Sets timelock for unix timestamp of escrow end.
     */
    function setEscrow(
        bytes32 _idxHash,
        uint8 _newAssetStatus,
        bytes32 _escrowOwnerAddressHash,
        uint256 _timelock
    ) external;

    /*
     * @dev remove an asset from escrow status
     */
    function endEscrow(bytes32 _idxHash) external;

    /*
     * @dev Set data in EDL mapping
     * Must be setter contract
     * Must be in  escrow
     */
    function setEscrowDataLight(
        bytes32 _idxHash,
        uint8 _escrowData,
        uint8 _u8_1,
        uint8 _u8_2,
        uint8 _u8_3,
        uint16 _u16_1,
        uint16 _u16_2,
        uint32 _u32_1,
        address _addr_1
    ) external;

    /*
     * @dev Set data in EDL mapping
     * Must be setter contract
     * Must be in  escrow
     */
    function setEscrowDataHeavy(
        bytes32 _idxHash,
        uint32 _u32_2,
        uint32 _u32_3,
        uint32 _u32_4,
        address _addr_2,
        bytes32 _b32_1,
        bytes32 _b32_2,
        uint256 _u256_1,
        uint256 _u256_2
    ) external;

    /*
     * @dev Permissive removal of asset from escrow status after time-out
     */
    function permissiveEndEscrow(bytes32 _idxHash) external;

    /*
     * @dev return escrow OwnerHash
     */
    function retrieveEscrowOwner(bytes32 _idxHash)
        external
        returns (bytes32 hashOfEscrowOwnerAdress);

    /*
     * @dev return escrow data @ IDX
     */
    function retrieveEscrowData(bytes32 _idxHash)
        external
        returns (
            bytes32 controllingContractNameHash,
            bytes32 escrowOwnerAddressHash,
            uint256 timelock
        );

    /*
     * @dev return EscrowDataLight @ IDX
     */
    function retrieveEscrowDataLight(bytes32 _idxHash)
        external
        view
        returns (
            uint8 _escrowData,
            uint8 _u8_1,
            uint8 _u8_2,
            uint8 _u8_3,
            uint16 _u16_1,
            uint16 _u16_2,
            uint32 _u32_1,
            address _addr_1
        );

    /*
     * @dev return EscrowDataHeavy @ IDX
     */
    function retrieveEscrowDataHeavy(bytes32 _idxHash)
        external
        view
        returns (
            uint32 _u32_2,
            uint32 _u32_3,
            uint32 _u32_4,
            address _addr_2,
            bytes32 _b32_1,
            bytes32 _b32_2,
            uint256 _u256_1,
            uint256 _u256_2
        );
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for RCLR
 * INHERIANCE:
    import "./PRUF_ECR_CORE.sol";
    import "./PRUF_CORE.sol";
 */
interface RCLR_Interface {
    function discard(bytes32 _idxHash, address _sender) external;

    function recycle(bytes32 _idxHash) external;
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for APP
 * INHERIANCE:
    import "./PRUF_CORE.sol";
 */
interface APP_Interface {
    function transferAssetToken(address _to, bytes32 _idxHash) external;

    function $withdraw() external;
}

//------------------------------------------------------------------------------------------------
/*
 * @dev Interface for APP_NC
 * INHERIANCE:
    import "./PRUF_CORE.sol";
 */
interface APP_NC_Interface {
    function transferAssetToken(address _to, bytes32 _idxHash) external;

    function $withdraw() external;
}

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

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_paymentAddress","type":"address"}],"name":"AdminSetSharesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAYABLE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SNAPSHOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRUSTED_AGENT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_key","type":"uint256"}],"name":"adminKillTrustedAgent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"isColdWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_senderAddress","type":"address"},{"internalType":"address","name":"_rootAddress","type":"address"},{"internalType":"uint256","name":"_rootPrice","type":"uint256"},{"internalType":"address","name":"_ACTHaddress","type":"address"},{"internalType":"uint256","name":"_ACTHprice","type":"uint256"}],"name":"payForService","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setColdWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"takeSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"trustedAgentBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"trustedAgentTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unSetColdWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526b0cecb8f27f4200f3a0000000600b55600c80546001600160a01b03191690556001600d553480156200003657600080fd5b506040518060400160405280600d81526020016c5052c3bc46204e6574776f726b60981b8152506040518060400160405280600481526020016328292aa360e11b8152508160049080519060200190620000929291906200024d565b508051620000a89060059060208401906200024d565b50506006805461ff001960ff1990911660121716905550620000d56000620000cf62000139565b6200013d565b620001047f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6620000cf62000139565b620001337f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a620000cf62000139565b620002e9565b3390565b6200014982826200014d565b5050565b60008281526020818152604090912062000172918390620019fd620001c6821b17901c565b1562000149576200018262000139565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001dd836001600160a01b038416620001e6565b90505b92915050565b6000620001f4838362000235565b6200022c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001e0565b506000620001e0565b60009081526001919091016020526040902054151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200029057805160ff1916838001178555620002c0565b82800160010185558215620002c0579182015b82811115620002c0578251825591602001919060010190620002a3565b50620002ce929150620002d2565b5090565b5b80821115620002ce5760008155600101620002d3565b61306b80620002f96000396000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c806379cc679011610186578063a9059cbb116100e3578063ca15c87311610097578063dd62ed3e11610071578063dd62ed3e146108be578063e60f0b98146108f9578063e63ab1e91461094a576102de565b8063ca15c87314610860578063d53913931461087d578063d547741f14610885576102de565b8063adfcaae0116100c8578063adfcaae014610848578063b3b0af6c14610850578063b3d3d37e14610858576102de565b8063a9059cbb146107d6578063ac4162531461080f576102de565b8063981b24d01161013a5780639b30d1e91161011f5780639b30d1e914610752578063a217fddf14610795578063a457c2d71461079d576102de565b8063981b24d01461072d578063992a71761461074a576102de565b80639010d07c1161016b5780639010d07c146106a057806391d14854146106ec57806395d89b4114610725576102de565b806379cc67901461065f5780638456cb5914610698576102de565b806336568abe1161023f5780634ac3c31b116101f35780635c975abb116101cd5780635c975abb1461061c5780637028e2cd1461062457806370a082311461062c576102de565b80634ac3c31b1461057d5780634ee2cd7e146105b057806350c7a35c146105e9576102de565b80633f4ba83a116102245780633f4ba83a1461051f57806340c10f191461052757806342966c6814610560576102de565b806336568abe146104ad57806339509351146104e6576102de565b8063248a9ca3116102965780632f2ff15d1161027b5780632f2ff15d1461044e578063313ce56714610487578063355274ea146104a5576102de565b8063248a9ca3146104295780632670d21614610446576102de565b8063113e6c0c116102c7578063113e6c0c146103ad57806318160ddd146103cc57806323b872dd146103e6576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb610952565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a06565b604080519115158252519081900360200190f35b6103ca600480360360208110156103c357600080fd5b5035610a24565b005b6103d4610a9d565b60408051918252519081900360200190f35b610399600480360360608110156103fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610aa3565b6103d46004803603602081101561043f57600080fd5b5035610b44565b6103ca610b5c565b6103ca6004803603604081101561046457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b93565b61048f610c14565b6040805160ff9092168252519081900360200190f35b6103d4610c1d565b6103ca600480360360408110156104c357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610c23565b610399600480360360408110156104fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cb8565b6103ca610d13565b6103ca6004803603604081101561053d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610db4565b6103ca6004803603602081101561057657600080fd5b5035610e55565b6103d46004803603602081101561059357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e66565b6103d4600480360360408110156105c657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e8e565b6103ca600480360360208110156105ff57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee4565b610399610ff9565b6103d4611007565b6103d46004803603602081101561064257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661102b565b6103ca6004803603604081101561067557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611053565b6103ca6110ad565b6106c3600480360360408110156106b657600080fd5b508035906020013561114c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103996004803603604081101561070257600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661116b565b6102eb611183565b6103d46004803603602081101561074357600080fd5b5035611202565b6103d4611232565b6103ca6004803603606081101561076857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611256565b6103d46113b9565b610399600480360360408110156107b357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113be565b610399600480360360408110156107ec57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611433565b6103ca6004803603604081101561082557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611447565b6103ca6115a9565b6103d46115b7565b6103d46115db565b6103d46004803603602081101561087657600080fd5b503561166b565b6103d4611682565b6103ca6004803603604081101561089b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166116a6565b6103d4600480360360408110156108d457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611719565b6103ca600480360360a081101561090f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359091169060800135611751565b6103d46119d9565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109fc5780601f106109d1576101008083540402835291602001916109fc565b820191906000526020600020905b8154815290600101906020018083116109df57829003601f168201915b5050505050905090565b6000610a1a610a13611a1f565b8484611a23565b5060015b92915050565b610a366000610a31611a1f565b61116b565b610a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f726026913960400191505060405180910390fd5b8060aa1415610a9a576000600d555b50565b60035490565b6000610ab0848484611b6a565b610b3a84610abc611a1f565b610b3585604051806060016040528060288152602001612e716028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610b07611a1f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d3c565b611a23565b5060019392505050565b6000818152602081905260409020600201545b919050565b6000600e6000610b6a611a1f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055565b600082815260208190526040902060020154610bb190610a31611a1f565b610c06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612c4f602f913960400191505060405180910390fd5b610c108282611ded565b5050565b60065460ff1690565b600b5490565b610c2b611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613007602f913960400191505060405180910390fd5b610c108282611e70565b6000610a1a610cc5611a1f565b84610b358560026000610cd6611a1f565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611ef3565b610d3f7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b610daa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665205041555345525f524f4c4500604482015290519081900360640190fd5b610db2611f67565b565b610de07f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a31611a1f565b610e4b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665204d494e5445525f524f4c4500604482015290519081900360640190fd5b610c108282612058565b610a9a610e60611a1f565b8261218b565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040812081908190610ec29085906122d5565b9150915081610ed957610ed48561102b565b610edb565b805b95945050505050565b610ef16000610a31611a1f565b610f46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f726026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610fb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612e496028913960400191505060405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600654610100900460ff1690565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f81565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b600061108a82604051806060016040528060248152602001612f08602491396110838661107e611a1f565b611719565b9190611d3c565b905061109e83611098611a1f565b83611a23565b6110a8838361218b565b505050565b6110d97f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b61114457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665205041555345525f524f4c4500604482015290519081900360640190fd5b610db261240d565b600082815260208190526040812061116490836124d9565b9392505050565b600082815260208190526040812061116490836124e5565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109fc5780601f106109d1576101008083540402835291602001916109fc565b60008060006112128460086122d5565b915091508161122857611223610a9d565b61122a565b805b949350505050565b7feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e29481565b6112827feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e294610a31611a1f565b6112d7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612fbc6026913960400191505060405180910390fd5b600d54600114611332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605c815260200180612d54605c913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e6020526040902054156113ae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612d206034913960400191505060405180910390fd5b6110a8838383611b6a565b600081565b6000610a1a6113cb611a1f565b84610b3585604051806060016040528060258152602001612fe260259139600260006113f5611a1f565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d3c565b6000610a1a611440611a1f565b8484611b6a565b6114737feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e294610a31611a1f565b6114c8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612fbc6026913960400191505060405180910390fd5b600d54600114611523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605c815260200180612d54605c913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e60205260409020541561159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612e996034913960400191505060405180910390fd5b610c10828261218b565b60aa600e6000610b6a611a1f565b7fcdbada398fb3ae55c788123a0c3c0ccb8e69fee2e6b780278b89300b4fc80c9081565b60006116097f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f610a31611a1f565b61165e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526043815260200180612e066043913960600191505060405180910390fd5b611666612507565b905090565b6000818152602081905260408120610a1e9061255b565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6000828152602081905260409020600201546116c490610a31611a1f565b610cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612dd66030913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b61177d7fcdbada398fb3ae55c788123a0c3c0ccb8e69fee2e6b780278b89300b4fc80c90610a31611a1f565b6117e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f505275463a4d4f443a206d75737420686176652050415941424c455f524f4c45604482015290519081900360640190fd5b600d54600114611843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605e815260200180612c7e605e913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600e6020526040902054156118bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612bce603c913960400191505060405180910390fd5b6118c98382611ef3565b6118d28661102b565b101561193f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f505275463a5046533a20696e73756666696369656e742062616c616e63650000604482015290519081900360640190fd5b600c5473ffffffffffffffffffffffffffffffffffffffff1661197757611967858585611b6a565b611972858383611b6a565b6119d2565b6000611984846004612566565b9050600061199285836125a8565b905061199f878783611b6a565b600c546119c490889073ffffffffffffffffffffffffffffffffffffffff1684611b6a565b6119cf878585611b6a565b50505b5050505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006111648373ffffffffffffffffffffffffffffffffffffffff84166125ea565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611a8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612f986024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612cfe6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612f4d6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611c42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612c2c6023913960400191505060405180910390fd5b611c4d838383612634565b611c9781604051806060016040528060268152602001612db06026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d3c565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611cd39082611ef3565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611de5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611daa578181015183820152602001611d92565b50505050905090810190601f168015611dd75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828152602081905260409020611e0590826119fd565b15610c1057611e12611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611e88908261276c565b15610c1057611e95611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60008282018381101561116457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600654610100900460ff16611fdd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61202e611a1f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190a1565b73ffffffffffffffffffffffffffffffffffffffff82166120da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6120e660008383612634565b6003546120f39082611ef3565b60035573ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546121269082611ef3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166121f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612f2c6021913960400191505060405180910390fd5b61220382600083612634565b61224d81604051806060016040528060228152602001612cdc6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d3c565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461228090826125a8565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000806000841161234757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433230536e617073686f743a206964206973203000000000000000000000604482015290519081900360640190fd5b612351600a61278e565b8411156123bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b60006123cb8486612792565b84549091508114156123e4576000809250925050612406565b60018460010182815481106123f557fe5b906000526020600020015492509250505b9250929050565b600654610100900460ff161561248457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861202e611a1f565b60006111648383612851565b60006111648373ffffffffffffffffffffffffffffffffffffffff84166128cf565b6000612513600a6128e7565b600061251f600a61278e565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610a1e8261278e565b600061116483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506128f0565b600061116483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d3c565b60006125f683836128cf565b61262c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a1e565b506000610a1e565b61263f83838361296f565b612647610ff9565b158061267a575061267a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b6126cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180612ecd603b913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166110a857600b546126ff826126f9610a9d565b90611ef3565b11156110a857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f45524332304361707065643a2063617020657863656564656400000000000000604482015290519081900360640190fd5b60006111648373ffffffffffffffffffffffffffffffffffffffff84166129e1565b5490565b81546000906127a357506000610a1e565b82546000905b808210156127f25760006127bd8383612ac5565b9050848682815481106127cc57fe5b906000526020600020015411156127e5578091506127ec565b8060010192505b506127a9565b60008211801561281a57508385600184038154811061280d57fe5b9060005260206000200154145b1561284957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019050610a1e565b509050610a1e565b815460009082106128ad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612c0a6022913960400191505060405180910390fd5b8260000182815481106128bc57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b60008183612959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611daa578181015183820152602001611d92565b50600083858161296557fe5b0495945050505050565b61297a8383836110a8565b73ffffffffffffffffffffffffffffffffffffffff83166129ab5761299e82612aea565b6129a6612b21565b6110a8565b73ffffffffffffffffffffffffffffffffffffffff82166129cf5761299e83612aea565b6129d883612aea565b6110a882612aea565b60008181526001830160205260408120548015612abb5783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083019190810190600090879083908110612a3257fe5b9060005260206000200154905080876000018481548110612a4f57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612a7f57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a1e565b6000915050610a1e565b60006002808306600285060181612ad857fe5b04600283046002850401019392505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760205260409020610a9a90612b1c8361102b565b612b2e565b610db26008612b1c610a9d565b6000612b3a600a61278e565b905080612b4684612b7a565b10156110a8578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090612b8b57506000610b57565b815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612bbb57fe5b90600052602060002001549050610b5756fe505275463a5046533a20436f6c642057616c6c6574202d20547275737465642070617961626c652066756e6374696f6e732070726f68696269746564456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74505275463a4d4f443a20547275737465642050617961626c652046756e6374696f6e207065726d616e656e746c792064697361626c6564202d2075736520616c6c6f77616e6365202f207472616e7366657246726f6d207061747465726e45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f2061646472657373505275463a5441543a20436f6c642057616c6c6574202d20547275737465642066756e6374696f6e732070726f68696269746564505275463a4d4f443a2054727573746564204167656e742066756e6374696f6e207065726d616e656e746c792064697361626c6564202d2075736520616c6c6f77616e6365202f207472616e7366657246726f6d207061747465726e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b6545524332305072657365744d696e7465725061757365723a206d757374206861766520736e617073686f7420726f6c6520746f2074616b65206120736e617073686f74505275463a5353413a207061796d656e7420616464726573732063616e6e6f74206265207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365505275463a42524e3a20436f6c642057616c6c6574202d20547275737465642066756e6374696f6e732070726f6869626974656445524332305061757361626c653a2066756e6374696f6e20756e617661696c626c65207768696c6520636f6e74726163742069732070617573656445524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373505275463a4d4f443a206d75737420686176652044454641554c545f41444d494e5f524f4c4545524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373505275463a4d4f443a206d757374206861766520545255535445445f4147454e545f524f4c4545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212208317da3565e101010a007e9c84299cecd25abefe6bc2b698ba82e8398141624064736f6c634300060c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102de5760003560e01c806379cc679011610186578063a9059cbb116100e3578063ca15c87311610097578063dd62ed3e11610071578063dd62ed3e146108be578063e60f0b98146108f9578063e63ab1e91461094a576102de565b8063ca15c87314610860578063d53913931461087d578063d547741f14610885576102de565b8063adfcaae0116100c8578063adfcaae014610848578063b3b0af6c14610850578063b3d3d37e14610858576102de565b8063a9059cbb146107d6578063ac4162531461080f576102de565b8063981b24d01161013a5780639b30d1e91161011f5780639b30d1e914610752578063a217fddf14610795578063a457c2d71461079d576102de565b8063981b24d01461072d578063992a71761461074a576102de565b80639010d07c1161016b5780639010d07c146106a057806391d14854146106ec57806395d89b4114610725576102de565b806379cc67901461065f5780638456cb5914610698576102de565b806336568abe1161023f5780634ac3c31b116101f35780635c975abb116101cd5780635c975abb1461061c5780637028e2cd1461062457806370a082311461062c576102de565b80634ac3c31b1461057d5780634ee2cd7e146105b057806350c7a35c146105e9576102de565b80633f4ba83a116102245780633f4ba83a1461051f57806340c10f191461052757806342966c6814610560576102de565b806336568abe146104ad57806339509351146104e6576102de565b8063248a9ca3116102965780632f2ff15d1161027b5780632f2ff15d1461044e578063313ce56714610487578063355274ea146104a5576102de565b8063248a9ca3146104295780632670d21614610446576102de565b8063113e6c0c116102c7578063113e6c0c146103ad57806318160ddd146103cc57806323b872dd146103e6576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb610952565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a06565b604080519115158252519081900360200190f35b6103ca600480360360208110156103c357600080fd5b5035610a24565b005b6103d4610a9d565b60408051918252519081900360200190f35b610399600480360360608110156103fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610aa3565b6103d46004803603602081101561043f57600080fd5b5035610b44565b6103ca610b5c565b6103ca6004803603604081101561046457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b93565b61048f610c14565b6040805160ff9092168252519081900360200190f35b6103d4610c1d565b6103ca600480360360408110156104c357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610c23565b610399600480360360408110156104fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cb8565b6103ca610d13565b6103ca6004803603604081101561053d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610db4565b6103ca6004803603602081101561057657600080fd5b5035610e55565b6103d46004803603602081101561059357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e66565b6103d4600480360360408110156105c657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e8e565b6103ca600480360360208110156105ff57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee4565b610399610ff9565b6103d4611007565b6103d46004803603602081101561064257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661102b565b6103ca6004803603604081101561067557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611053565b6103ca6110ad565b6106c3600480360360408110156106b657600080fd5b508035906020013561114c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103996004803603604081101561070257600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661116b565b6102eb611183565b6103d46004803603602081101561074357600080fd5b5035611202565b6103d4611232565b6103ca6004803603606081101561076857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611256565b6103d46113b9565b610399600480360360408110156107b357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113be565b610399600480360360408110156107ec57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611433565b6103ca6004803603604081101561082557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611447565b6103ca6115a9565b6103d46115b7565b6103d46115db565b6103d46004803603602081101561087657600080fd5b503561166b565b6103d4611682565b6103ca6004803603604081101561089b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166116a6565b6103d4600480360360408110156108d457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611719565b6103ca600480360360a081101561090f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359091169060800135611751565b6103d46119d9565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109fc5780601f106109d1576101008083540402835291602001916109fc565b820191906000526020600020905b8154815290600101906020018083116109df57829003601f168201915b5050505050905090565b6000610a1a610a13611a1f565b8484611a23565b5060015b92915050565b610a366000610a31611a1f565b61116b565b610a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f726026913960400191505060405180910390fd5b8060aa1415610a9a576000600d555b50565b60035490565b6000610ab0848484611b6a565b610b3a84610abc611a1f565b610b3585604051806060016040528060288152602001612e716028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610b07611a1f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d3c565b611a23565b5060019392505050565b6000818152602081905260409020600201545b919050565b6000600e6000610b6a611a1f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055565b600082815260208190526040902060020154610bb190610a31611a1f565b610c06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612c4f602f913960400191505060405180910390fd5b610c108282611ded565b5050565b60065460ff1690565b600b5490565b610c2b611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613007602f913960400191505060405180910390fd5b610c108282611e70565b6000610a1a610cc5611a1f565b84610b358560026000610cd6611a1f565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611ef3565b610d3f7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b610daa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665205041555345525f524f4c4500604482015290519081900360640190fd5b610db2611f67565b565b610de07f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a31611a1f565b610e4b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665204d494e5445525f524f4c4500604482015290519081900360640190fd5b610c108282612058565b610a9a610e60611a1f565b8261218b565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040812081908190610ec29085906122d5565b9150915081610ed957610ed48561102b565b610edb565b805b95945050505050565b610ef16000610a31611a1f565b610f46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612f726026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610fb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612e496028913960400191505060405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600654610100900460ff1690565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f81565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b600061108a82604051806060016040528060248152602001612f08602491396110838661107e611a1f565b611719565b9190611d3c565b905061109e83611098611a1f565b83611a23565b6110a8838361218b565b505050565b6110d97f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b61114457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f505275463a4d4f443a206d7573742068617665205041555345525f524f4c4500604482015290519081900360640190fd5b610db261240d565b600082815260208190526040812061116490836124d9565b9392505050565b600082815260208190526040812061116490836124e5565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109fc5780601f106109d1576101008083540402835291602001916109fc565b60008060006112128460086122d5565b915091508161122857611223610a9d565b61122a565b805b949350505050565b7feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e29481565b6112827feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e294610a31611a1f565b6112d7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612fbc6026913960400191505060405180910390fd5b600d54600114611332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605c815260200180612d54605c913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600e6020526040902054156113ae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612d206034913960400191505060405180910390fd5b6110a8838383611b6a565b600081565b6000610a1a6113cb611a1f565b84610b3585604051806060016040528060258152602001612fe260259139600260006113f5611a1f565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d3c565b6000610a1a611440611a1f565b8484611b6a565b6114737feeed90ae47cd1f23b88ce446295f1ca23c5e4f5b894addbe83563fd27494e294610a31611a1f565b6114c8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612fbc6026913960400191505060405180910390fd5b600d54600114611523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605c815260200180612d54605c913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e60205260409020541561159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612e996034913960400191505060405180910390fd5b610c10828261218b565b60aa600e6000610b6a611a1f565b7fcdbada398fb3ae55c788123a0c3c0ccb8e69fee2e6b780278b89300b4fc80c9081565b60006116097f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f610a31611a1f565b61165e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526043815260200180612e066043913960600191505060405180910390fd5b611666612507565b905090565b6000818152602081905260408120610a1e9061255b565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6000828152602081905260409020600201546116c490610a31611a1f565b610cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612dd66030913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b61177d7fcdbada398fb3ae55c788123a0c3c0ccb8e69fee2e6b780278b89300b4fc80c90610a31611a1f565b6117e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f505275463a4d4f443a206d75737420686176652050415941424c455f524f4c45604482015290519081900360640190fd5b600d54600114611843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605e815260200180612c7e605e913960600191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85166000908152600e6020526040902054156118bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612bce603c913960400191505060405180910390fd5b6118c98382611ef3565b6118d28661102b565b101561193f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f505275463a5046533a20696e73756666696369656e742062616c616e63650000604482015290519081900360640190fd5b600c5473ffffffffffffffffffffffffffffffffffffffff1661197757611967858585611b6a565b611972858383611b6a565b6119d2565b6000611984846004612566565b9050600061199285836125a8565b905061199f878783611b6a565b600c546119c490889073ffffffffffffffffffffffffffffffffffffffff1684611b6a565b6119cf878585611b6a565b50505b5050505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006111648373ffffffffffffffffffffffffffffffffffffffff84166125ea565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611a8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612f986024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612cfe6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612f4d6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611c42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612c2c6023913960400191505060405180910390fd5b611c4d838383612634565b611c9781604051806060016040528060268152602001612db06026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d3c565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611cd39082611ef3565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611de5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611daa578181015183820152602001611d92565b50505050905090810190601f168015611dd75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828152602081905260409020611e0590826119fd565b15610c1057611e12611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611e88908261276c565b15610c1057611e95611a1f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60008282018381101561116457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600654610100900460ff16611fdd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61202e611a1f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190a1565b73ffffffffffffffffffffffffffffffffffffffff82166120da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6120e660008383612634565b6003546120f39082611ef3565b60035573ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546121269082611ef3565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166121f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612f2c6021913960400191505060405180910390fd5b61220382600083612634565b61224d81604051806060016040528060228152602001612cdc6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d3c565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461228090826125a8565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000806000841161234757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433230536e617073686f743a206964206973203000000000000000000000604482015290519081900360640190fd5b612351600a61278e565b8411156123bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b60006123cb8486612792565b84549091508114156123e4576000809250925050612406565b60018460010182815481106123f557fe5b906000526020600020015492509250505b9250929050565b600654610100900460ff161561248457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861202e611a1f565b60006111648383612851565b60006111648373ffffffffffffffffffffffffffffffffffffffff84166128cf565b6000612513600a6128e7565b600061251f600a61278e565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610a1e8261278e565b600061116483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506128f0565b600061116483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d3c565b60006125f683836128cf565b61262c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a1e565b506000610a1e565b61263f83838361296f565b612647610ff9565b158061267a575061267a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a31611a1f565b6126cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180612ecd603b913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166110a857600b546126ff826126f9610a9d565b90611ef3565b11156110a857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f45524332304361707065643a2063617020657863656564656400000000000000604482015290519081900360640190fd5b60006111648373ffffffffffffffffffffffffffffffffffffffff84166129e1565b5490565b81546000906127a357506000610a1e565b82546000905b808210156127f25760006127bd8383612ac5565b9050848682815481106127cc57fe5b906000526020600020015411156127e5578091506127ec565b8060010192505b506127a9565b60008211801561281a57508385600184038154811061280d57fe5b9060005260206000200154145b1561284957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019050610a1e565b509050610a1e565b815460009082106128ad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612c0a6022913960400191505060405180910390fd5b8260000182815481106128bc57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b60008183612959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611daa578181015183820152602001611d92565b50600083858161296557fe5b0495945050505050565b61297a8383836110a8565b73ffffffffffffffffffffffffffffffffffffffff83166129ab5761299e82612aea565b6129a6612b21565b6110a8565b73ffffffffffffffffffffffffffffffffffffffff82166129cf5761299e83612aea565b6129d883612aea565b6110a882612aea565b60008181526001830160205260408120548015612abb5783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083019190810190600090879083908110612a3257fe5b9060005260206000200154905080876000018481548110612a4f57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612a7f57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a1e565b6000915050610a1e565b60006002808306600285060181612ad857fe5b04600283046002850401019392505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760205260409020610a9a90612b1c8361102b565b612b2e565b610db26008612b1c610a9d565b6000612b3a600a61278e565b905080612b4684612b7a565b10156110a8578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8054600090612b8b57506000610b57565b815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612bbb57fe5b90600052602060002001549050610b5756fe505275463a5046533a20436f6c642057616c6c6574202d20547275737465642070617961626c652066756e6374696f6e732070726f68696269746564456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74505275463a4d4f443a20547275737465642050617961626c652046756e6374696f6e207065726d616e656e746c792064697361626c6564202d2075736520616c6c6f77616e6365202f207472616e7366657246726f6d207061747465726e45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f2061646472657373505275463a5441543a20436f6c642057616c6c6574202d20547275737465642066756e6374696f6e732070726f68696269746564505275463a4d4f443a2054727573746564204167656e742066756e6374696f6e207065726d616e656e746c792064697361626c6564202d2075736520616c6c6f77616e6365202f207472616e7366657246726f6d207061747465726e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b6545524332305072657365744d696e7465725061757365723a206d757374206861766520736e617073686f7420726f6c6520746f2074616b65206120736e617073686f74505275463a5353413a207061796d656e7420616464726573732063616e6e6f74206265207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365505275463a42524e3a20436f6c642057616c6c6574202d20547275737465642066756e6374696f6e732070726f6869626974656445524332305061757361626c653a2066756e6374696f6e20756e617661696c626c65207768696c6520636f6e74726163742069732070617573656445524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373505275463a4d4f443a206d75737420686176652044454641554c545f41444d494e5f524f4c4545524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373505275463a4d4f443a206d757374206861766520545255535445445f4147454e545f524f4c4545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212208317da3565e101010a007e9c84299cecd25abefe6bc2b698ba82e8398141624064736f6c634300060c0033

Deployed Bytecode Sourcemap

2122:10704:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2137:81:5;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4173:166;;;;;;;;;;;;;;;;-1:-1:-1;4173:166:5;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6064:288:12;;;;;;;;;;;;;;;;-1:-1:-1;6064:288:12;;:::i;:::-;;3180:98:5;;;:::i;:::-;;;;;;;;;;;;;;;;4806:317;;;;;;;;;;;;;;;;-1:-1:-1;4806:317:5;;;;;;;;;;;;;;;;;;:::i;4253:112:0:-;;;;;;;;;;;;;;;;-1:-1:-1;4253:112:0;;:::i;7131:157:12:-;;;:::i;4615:223:0:-;;;;;;;;;;;;;;;;-1:-1:-1;4615:223:0;;;;;;;;;:::i;3039:81:5:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;12059:73:12;;;:::i;5789:205:0:-;;;;;;;;;;;;;;;;-1:-1:-1;5789:205:0;;;;;;;;;:::i;5518:215:5:-;;;;;;;;;;;;;;;;-1:-1:-1;5518:215:5;;;;;;;;;:::i;11844:136:12:-;;;:::i;11014:288::-;;;;;;;;;;;;;;;;-1:-1:-1;11014:288:12;;;;;;;;;:::i;473:89:6:-;;;;;;;;;;;;;;;;-1:-1:-1;473:89:6;;:::i;7440:110:12:-;;;;;;;;;;;;;;;;-1:-1:-1;7440:110:12;;;;:::i;4248:254:7:-;;;;;;;;;;;;;;;;-1:-1:-1;4248:254:7;;;;;;;;;:::i;7689:316:12:-;;;;;;;;;;;;;;;;-1:-1:-1;7689:316:12;;;;:::i;1035:76:13:-;;;:::i;2368:66:12:-;;;:::i;3336:117:5:-;;;;;;;;;;;;;;;;-1:-1:-1;3336:117:5;;;;:::i;868:290:6:-;;;;;;;;;;;;;;;;-1:-1:-1;868:290:6;;;;;;;;;:::i;11505:132:12:-;;;:::i;3936:136:0:-;;;;;;;;;;;;;;;;-1:-1:-1;3936:136:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2921:137;;;;;;;;;;;;;;;;-1:-1:-1;2921:137:0;;;;;;;;;:::i;2331:85:5:-;;;:::i;4601:221:7:-;;;;;;;;;;;;;;;;-1:-1:-1;4601:221:7;;:::i;2510:90:12:-;;;:::i;10060:440::-;;;;;;;;;;;;;;;;-1:-1:-1;10060:440:12;;;;;;;;;;;;;;;;;;:::i;1698:49:0:-;;;:::i;6220:266:5:-;;;;;;;;;;;;;;;;-1:-1:-1;6220:266:5;;;;;;;;;:::i;3656:172::-;;;;;;;;;;;;;;;;-1:-1:-1;3656:172:5;;;;;;;;;:::i;9551:404:12:-;;;;;;;;;;;;;;;;-1:-1:-1;9551:404:12;;;;;;;;;:::i;6663:157::-;;;:::i;2440:64::-;;;:::i;10578:246::-;;;:::i;3226:125:0:-;;;;;;;;;;;;;;;;-1:-1:-1;3226:125:0;;:::i;2232:62:12:-;;;:::i;5072:226:0:-;;;;;;;;;;;;;;;;-1:-1:-1;5072:226:0;;;;;;;;;:::i;3886:149:5:-;;;;;;;;;;;;;;;;-1:-1:-1;3886:149:5;;;;;;;;;;;:::i;8077:1373:12:-;;;;;;;;;;;;;;;;-1:-1:-1;8077:1373:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2300:62::-;;;:::i;2137:81:5:-;2206:5;2199:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2174:13;;2199:12;;2206:5;;2199:12;;2206:5;2199:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2137:81;:::o;4173:166::-;4256:4;4272:39;4281:12;:10;:12::i;:::-;4295:7;4304:6;4272:8;:39::i;:::-;-1:-1:-1;4328:4:5;4173:166;;;;;:::o;6064:288:12:-;3698:41;1743:4:0;3726:12:12;:10;:12::i;:::-;3698:7;:41::i;:::-;3677:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6216:4:::1;6224:3;6216:11;6212:134;;;6265:1;6243:19;:23:::0;6212:134:::1;6064:288:::0;:::o;3180:98:5:-;3259:12;;3180:98;:::o;4806:317::-;4912:4;4928:36;4938:6;4946:9;4957:6;4928:9;:36::i;:::-;4974:121;4983:6;4991:12;:10;:12::i;:::-;5005:89;5043:6;5005:89;;;;;;;;;;;;;;;;;:19;;;;;;;:11;:19;;;;;;5025:12;:10;:12::i;:::-;5005:33;;;;;;;;;;;;;-1:-1:-1;5005:33:5;;;:89;:37;:89::i;:::-;4974:8;:121::i;:::-;-1:-1:-1;5112:4:5;4806:317;;;;;:::o;4253:112:0:-;4310:7;4336:12;;;;;;;;;;:22;;;4253:112;;;;:::o;7131:157:12:-;7280:1;7253:10;:24;7264:12;:10;:12::i;:::-;7253:24;;;;;;;;;;;;;-1:-1:-1;7253:24:12;:28;7131:157::o;4615:223:0:-;4706:6;:12;;;;;;;;;;:22;;;4698:45;;4730:12;:10;:12::i;4698:45::-;4690:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4806:25;4817:4;4823:7;4806:10;:25::i;:::-;4615:223;;:::o;3039:81:5:-;3104:9;;;;3039:81;:::o;12059:73:12:-;12121:4;;12059:73;:::o;5789:205:0:-;5886:12;:10;:12::i;:::-;5875:23;;:7;:23;;;5867:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5961:26;5973:4;5979:7;5961:11;:26::i;5518:215:5:-;5606:4;5622:83;5631:12;:10;:12::i;:::-;5645:7;5654:50;5693:10;5654:11;:25;5666:12;:10;:12::i;:::-;5654:25;;;;;;;;;;;;;;;;;;-1:-1:-1;5654:25:5;;;:34;;;;;;;;;;;:38;:50::i;11844:136:12:-;3979:34;2338:24;4000:12;:10;:12::i;3979:34::-;3958:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11930:10:::1;:8;:10::i;:::-;11844:136::o:0;11014:288::-;11103:34;2270:24;11124:12;:10;:12::i;11103:34::-;11082:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11238:18;11244:2;11248:7;11238:5;:18::i;473:89:6:-;528:27;534:12;:10;:12::i;:::-;548:6;528:5;:27::i;7440:110:12:-;7526:17;;7500:7;7526:17;;;:10;:17;;;;;;;7440:110::o;4248:254:7:-;4403:33;;;4327:7;4403:33;;;:24;:33;;;;;4327:7;;;;4382:55;;4391:10;;4382:8;:55::i;:::-;4346:91;;;;4455:11;:40;;4477:18;4487:7;4477:9;:18::i;:::-;4455:40;;;4469:5;4455:40;4448:47;4248:254;-1:-1:-1;;;;;4248:254:7:o;7689:316:12:-;3698:41;1743:4:0;3726:12:12;:10;:12::i;3698:41::-;3677:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7793:29:::1;::::0;::::1;7772:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7933:13;:31:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;7689:316::o;1035:76:13:-;1097:7;;;;;;;;1035:76::o;2368:66:12:-;2408:26;2368:66;:::o;3336:117:5:-;3428:18;;3402:7;3428:18;;;:9;:18;;;;;;;3336:117::o;868:290:6:-;944:26;973:84;1010:6;973:84;;;;;;;;;;;;;;;;;:32;983:7;992:12;:10;:12::i;:::-;973:9;:32::i;:::-;:36;:84;:36;:84::i;:::-;944:113;;1068:51;1077:7;1086:12;:10;:12::i;:::-;1100:18;1068:8;:51::i;:::-;1129:22;1135:7;1144:6;1129:5;:22::i;:::-;868:290;;;:::o;11505:132:12:-;3979:34;2338:24;4000:12;:10;:12::i;3979:34::-;3958:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11589:8:::1;:6;:8::i;3936:136:0:-:0;4009:7;4035:12;;;;;;;;;;:30;;4059:5;4035:23;:30::i;:::-;4028:37;3936:136;-1:-1:-1;;;3936:136:0:o;2921:137::-;2990:4;3013:12;;;;;;;;;;:38;;3043:7;3013:29;:38::i;2331:85:5:-;2402:7;2395:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2370:13;;2395:14;;2402:7;;2395:14;;2402:7;2395:14;;;;;;;;;;;;;;;;;;;;;;;;4601:221:7;4664:7;4684:16;4702:13;4719:43;4728:10;4740:21;4719:8;:43::i;:::-;4683:79;;;;4780:11;:35;;4802:13;:11;:13::i;:::-;4780:35;;;4794:5;4780:35;4773:42;4601:221;-1:-1:-1;;;;4601:221:7:o;2510:90:12:-;2555:45;2510:90;:::o;10060:440::-;5048:41;2555:45;5076:12;:10;:12::i;5048:41::-;5027:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5252:19;;5275:1;5252:24;5163:231;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10286:17:::1;::::0;::::1;;::::0;;;:10:::1;:17;::::0;;;;;:22;10197:189:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10429:30;10439:5;10446:3;10451:7;10429:9;:30::i;1698:49:0:-:0;1743:4;1698:49;:::o;6220:266:5:-;6313:4;6329:129;6338:12;:10;:12::i;:::-;6352:7;6361:96;6400:15;6361:96;;;;;;;;;;;;;;;;;:11;:25;6373:12;:10;:12::i;:::-;6361:25;;;;;;;;;;;;;;;;;;-1:-1:-1;6361:25:5;;;:34;;;;;;;;;;;:96;:38;:96::i;3656:172::-;3742:4;3758:42;3768:12;:10;:12::i;:::-;3782:9;3793:6;3758:9;:42::i;9551:404:12:-;5048:41;2555:45;5076:12;:10;:12::i;5048:41::-;5027:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5252:19;;5275:1;5252:24;5163:231;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9750:17:::1;::::0;::::1;;::::0;;;:10:::1;:17;::::0;;;;;:22;9661:189:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9893:21;9899:5;9906:7;9893:5;:21::i;6663:157::-:0;6810:3;6783:10;:24;6794:12;:10;:12::i;2440:64::-;2479:25;2440:64;:::o;10578:246::-;10620:7;10660:36;2408:26;10683:12;:10;:12::i;10660:36::-;10639:150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10806:11;:9;:11::i;:::-;10799:18;;10578:246;:::o;3226:125:0:-;3289:7;3315:12;;;;;;;;;;:29;;:27;:29::i;2232:62:12:-;2270:24;2232:62;:::o;5072:226:0:-;5164:6;:12;;;;;;;;;;:22;;;5156:45;;5188:12;:10;:12::i;5156:45::-;5148:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3886:149:5;4001:18;;;;3975:7;4001:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3886:149::o;8077:1373:12:-;4523:35;2479:25;4545:12;:10;:12::i;4523:35::-;4502:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4715:19;;4738:1;4715:24;4626:233;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8372:26:::1;::::0;::::1;;::::0;;;:10:::1;:26;::::0;;;;;:31;8283:206:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8582:26;:10:::0;8597;8582:14:::1;:26::i;:::-;8553:25;8563:14;8553:9;:25::i;:::-;:55;;8499:165;;;::::0;;::::1;::::0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;8712:13;::::0;:27:::1;:13;8708:687;;8798:51;8808:14;8824:12;8838:10;8798:9;:51::i;:::-;8863;8873:14;8889:12;8903:10;8863:9;:51::i;:::-;8708:687;;;8984:19;9006:26;:10:::0;9029:1:::1;9006:14;:26::i;:::-;8984:48:::0;-1:-1:-1;9089:17:12::1;9109:27;:10:::0;8984:48;9109:14:::1;:27::i;:::-;9089:47;;9202:50;9212:14;9228:12;9242:9;9202;:50::i;:::-;9292:13;::::0;9266:53:::1;::::0;9276:14;;9292:13:::1;;9307:11:::0;9266:9:::1;:53::i;:::-;9333:51;9343:14;9359:12;9373:10;9333:9;:51::i;:::-;8708:687;;;8077:1373:::0;;;;;:::o;2300:62::-;2338:24;2300:62;:::o;6421:141:8:-;6491:4;6514:41;6519:3;6539:14;;;6514:4;:41::i;590:104:3:-;677:10;590:104;:::o;9284:340:5:-;9385:19;;;9377:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9463:21;;;9455:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9534:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;9585:32;;;;;;;;;;;;;;;;;9284:340;;;:::o;6960:530::-;7065:20;;;7057:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7145:23;;;7137:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7219:47;7240:6;7248:9;7259:6;7219:20;:47::i;:::-;7297:71;7319:6;7297:71;;;;;;;;;;;;;;;;;:17;;;;;;;:9;:17;;;;;;;:71;:21;:71::i;:::-;7277:17;;;;;;;;:9;:17;;;;;;:91;;;;7401:20;;;;;;;:32;;7426:6;7401:24;:32::i;:::-;7378:20;;;;;;;;:9;:20;;;;;;;;;:55;;;;7448:35;;;;;;;7378:20;;7448:35;;;;;;;;;;;;;6960:530;;;:::o;1746:187:14:-;1832:7;1867:12;1859:6;;;;1851:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1902:5:14;;;1746:187::o;6996:184:0:-;7069:6;:12;;;;;;;;;;:33;;7094:7;7069:24;:33::i;:::-;7065:109;;;7150:12;:10;:12::i;:::-;7123:40;;7141:7;7123:40;;7135:4;7123:40;;;;;;;;;;6996:184;;:::o;7186:188::-;7260:6;:12;;;;;;;;;;:36;;7288:7;7260:27;:36::i;:::-;7256:112;;;7344:12;:10;:12::i;:::-;7317:40;;7335:7;7317:40;;7329:4;7317:40;;;;;;;;;;7186:188;;:::o;874:176:14:-;932:7;963:5;;;986:6;;;;978:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2037:117:13;1605:7;;;;;;;1597:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2095:7:::1;:15:::0;;;::::1;::::0;;2125:22:::1;2134:12;:10;:12::i;:::-;2125:22;::::0;;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2037:117::o:0;7761:370:5:-;7844:21;;;7836:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7912:49;7941:1;7945:7;7954:6;7912:20;:49::i;:::-;7987:12;;:24;;8004:6;7987:16;:24::i;:::-;7972:12;:39;8042:18;;;;;;;:9;:18;;;;;;:30;;8065:6;8042:22;:30::i;:::-;8021:18;;;;;;;:9;:18;;;;;;;;:51;;;;8087:37;;;;;;;8021:18;;;;8087:37;;;;;;;;;;7761:370;;:::o;8451:410::-;8534:21;;;8526:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8604:49;8625:7;8642:1;8646:6;8604:20;:49::i;:::-;8685:68;8708:6;8685:68;;;;;;;;;;;;;;;;;:18;;;;;;;:9;:18;;;;;;;:68;:22;:68::i;:::-;8664:18;;;;;;;:9;:18;;;;;:89;8778:12;;:24;;8795:6;8778:16;:24::i;:::-;8763:12;:39;8817:37;;;;;;;;8843:1;;8817:37;;;;;;;;;;;;;8451:410;;:::o;5568:1664:7:-;5665:4;5671:7;5715:1;5702:10;:14;5694:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5828:28;:18;:26;:28::i;:::-;5814:10;:42;;5806:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7013:13;7029:40;:9;7058:10;7029:28;:40::i;:::-;7093:20;;7013:56;;-1:-1:-1;7084:29:7;;7080:146;;;7137:5;7144:1;7129:17;;;;;;;7080:146;7185:4;7191:9;:16;;7208:5;7191:23;;;;;;;;;;;;;;;;7177:38;;;;;5568:1664;;;;;;:::o;1790:115:13:-;1341:7;;;;;;;1340:8;1332:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1849:7:::1;:14:::0;;;::::1;;;::::0;;1878:20:::1;1885:12;:10;:12::i;7642:147:8:-:0;7716:7;7758:22;7762:3;7774:5;7758:3;:22::i;6958:156::-;7038:4;7061:46;7071:3;7091:14;;;7061:9;:46::i;3919:222:7:-;3966:7;3985:30;:18;:28;:30::i;:::-;4026:17;4046:28;:18;:26;:28::i;:::-;4089:19;;;;;;;;4026:48;;-1:-1:-1;4089:19:7;;;;;;;;;;4125:9;-1:-1:-1;3919:222:7;:::o;7195:115:8:-;7258:7;7284:19;7292:3;7284:7;:19::i;3101:130:14:-;3159:7;3185:39;3189:1;3192;3185:39;;;;;;;;;;;;;;;;;:3;:39::i;1321:134::-;1379:7;1405:43;1409:1;1412;1405:43;;;;;;;;;;;;;;;;;:3;:43::i;1632:404:8:-;1695:4;1716:21;1726:3;1731:5;1716:9;:21::i;:::-;1711:319;;-1:-1:-1;1753:23:8;;;;;;;;:11;:23;;;;;;;;;;;;;1933:18;;1911:19;;;:12;;;:19;;;;;;:40;;;;1965:11;;1711:319;-1:-1:-1;2014:5:8;2007:12;;12237:587:12;12397:44;12424:4;12430:2;12434:6;12397:26;:44::i;:::-;12475:8;:6;:8::i;:::-;12474:9;12473:49;;;;12488:34;2338:24;12509:12;:10;:12::i;12488:34::-;12452:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12621:18;;;12617:201;;12744:4;;12715:25;12733:6;12715:13;:11;:13::i;:::-;:17;;:25::i;:::-;:33;;12690:117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6730:147:8;6803:4;6826:44;6834:3;6854:14;;;6826:7;:44::i;1092:112:4:-;1183:14;;1092:112::o;576:892:2:-;688:12;;665:7;;684:56;;-1:-1:-1;728:1:2;721:8;;684:56;790:12;;750:11;;813:414;826:4;820:3;:10;813:414;;;846:11;860:23;873:3;878:4;860:12;:23::i;:::-;846:37;;1113:7;1100:5;1106:3;1100:10;;;;;;;;;;;;;;;;:20;1096:121;;;1147:3;1140:10;;1096:121;;;1195:3;1201:1;1195:7;1189:13;;1096:121;813:414;;;;1350:1;1344:3;:7;:36;;;;;1373:7;1355:5;1367:1;1361:3;:7;1355:14;;;;;;;;;;;;;;;;:25;1344:36;1340:122;;;-1:-1:-1;1403:7:2;;;-1:-1:-1;1396:14:2;;1340:122;-1:-1:-1;1448:3:2;-1:-1:-1;1441:10:2;;4444:201:8;4538:18;;4511:7;;4538:26;-1:-1:-1;4530:73:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4620:3;:11;;4632:5;4620:18;;;;;;;;;;;;;;;;4613:25;;4444:201;;;;:::o;3797:127::-;3870:4;3893:19;;;:12;;;;;:19;;;;;;:24;;;3797:127::o;1210:178:4:-;1362:19;;1380:1;1362:19;;;1210:178::o;3713:272:14:-;3799:7;3833:12;3826:5;3818:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3856:9;3872:1;3868;:5;;;;;;;3713:272;-1:-1:-1;;;;;3713:272:14:o;5036:526:7:-;5142:44;5169:4;5175:2;5179:6;5142:26;:44::i;:::-;5199:18;;;5195:361;;5245:26;5268:2;5245:22;:26::i;:::-;5281:28;:26;:28::i;:::-;5195:361;;;5328:16;;;5324:232;;5372:28;5395:4;5372:22;:28::i;5324:232::-;5483:28;5506:4;5483:22;:28::i;:::-;5521:26;5544:2;5521:22;:26::i;2204:1512:8:-;2270:4;2407:19;;;:12;;;:19;;;;;;2441:15;;2437:1273;;2870:18;;2822:14;;;;;2870:22;;;;2798:21;;2870:3;;:22;;3152;;;;;;;;;;;;;;3132:42;;3295:9;3266:3;:11;;3278:13;3266:26;;;;;;;;;;;;;;;;;;;:38;;;;3370:23;;;3412:1;3370:12;;;:23;;;;;;3396:17;;;3370:43;;3519:17;;3370:3;;3519:17;;;;;;;;;;;;;;;;;;;;;;3611:3;:12;;:19;3624:5;3611:19;;;;;;;;;;;3604:26;;;3652:4;3645:11;;;;;;;;2437:1273;3694:5;3687:12;;;;;608:190:10;670:7;789:1;;780;:5;776:1;772;:5;:13;771:19;;;;;;765:1;761;:5;755:1;751;:5;750:17;:41;;608:190;-1:-1:-1;;;608:190:10:o;7238:144:7:-;7321:33;;;;;;;:24;:33;;;;;7305:70;;7356:18;7346:7;7356:9;:18::i;:::-;7305:15;:70::i;7388:116::-;7444:53;7460:21;7483:13;:11;:13::i;7510:309::-;7604:17;7624:28;:18;:26;:28::i;:::-;7604:48;-1:-1:-1;7604:48:7;7666:30;7682:9;7666:15;:30::i;:::-;:42;7662:151;;;7724:29;;;;;;;;-1:-1:-1;7724:29:7;;;;;;;;;;;;;;7767:16;;;:35;;;;;;;;;;;;;;;7510:309::o;7825:206::-;7918:10;;7895:7;;7914:111;;-1:-1:-1;7956:1:7;7949:8;;7914:111;7999:10;;7995:3;;7999:14;;;;7995:19;;;;;;;;;;;;;;7988:26;;;

Swarm Source

ipfs://8317da3565e101010a007e9c84299cecd25abefe6bc2b698ba82e83981416240
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.