Contract 0x42816fa3cb0adc3fcaded3109323c0bc19215084

Contract Overview

Balance:
0 AVAX

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xace0a6d5395c9e38612a46d86f3b59342d5ae60c66f72b7f8a80ed380b4a74b10xd2b4718b198510802023-03-14 20:43:478 days 23 hrs ago0xb63c40eaf7e4cdd97f7f89e45abe84206fb319ce IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0026561127 29.85
0x58a2e926452ca17a5c694fa9c72422181b474669e71e833c5507abba826614660xd2b4718b198510642023-03-14 20:43:028 days 23 hrs ago0xb63c40eaf7e4cdd97f7f89e45abe84206fb319ce IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.00259178595 29.85
0x7ba37cb78c5a14554bcfc593e94792302d73143002c7c16a73015d446033b15a0x5af7dfdd166582192022-12-07 13:34:59106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0024160845 26.5
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b0x5af7dfdd166579912022-12-07 13:27:18106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee0x5af7dfdd166579842022-12-07 13:27:04106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f800x5af7dfdd166579822022-12-07 13:27:00106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x53be8a22d225a479e30febf0bc65ebfd1a2725c84d2fb99eb21c78ff6d85d0470x5af7dfdd166579792022-12-07 13:26:54106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xf6012cbfc6a84226be1944effa8eb391331763c0d6d72e90abb14e15a001f98a0x5af7dfdd166579732022-12-07 13:26:42106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x6e8105292ef9e8781b8c20b7ea6f90f29f332724ea69ff0e89692f76ee414c4a0x5af7dfdd166579702022-12-07 13:26:36106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xcce0eb5aeade9fa9fc159031c12a5e12d5b56a259952c5b53463b04a8a9f9ed40x5af7dfdd166579682022-12-07 13:26:32106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x393b8eddd5005de35e793c0d18c6f74c4d566f05f5be5b577bb9c4426e4d2ac20x5af7dfdd166579652022-12-07 13:26:26106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xea3077a3d1e759a7b95e4e5124dc53f1976669295277b8d81765370aebae79fc0x5af7dfdd166579592022-12-07 13:26:13106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xe5d93312d4396146979f503486931f0260f0a95c3e102736a19e1ea6979ba1a20x5af7dfdd166579532022-12-07 13:26:01106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xd660398b9647c4b59289b3362d344c9a53eccf0e24d25bb18be910da28a044470x5af7dfdd166579452022-12-07 13:25:45106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x450dd659f5ab768314f3394543ab2a79a0dce47d7ee272790c3301c3f43ec0530x5af7dfdd166579382022-12-07 13:25:31106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x5be4412aa3b7d24950c57cdfd55cec77e4317e9fbf28a182fab9acc48ce397990x5af7dfdd166579352022-12-07 13:25:25106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x57838c7b6a23306c02008a179f6f4421aab20d2008d33c8a25be273707b32d200x5af7dfdd166579262022-12-07 13:25:07106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x8f875acc4886a81c0538647f887f4036ffca4498a877bc9046d9aa0f36fcde3b0x5af7dfdd166579172022-12-07 13:24:49106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x99109be683b22526b4f6dd65e71fb5290c772fa7ae1c360806f245d682aae2fa0x5af7dfdd166579142022-12-07 13:24:43106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x110fb85815f33ed0feea5c2c0ee3ff86c5636b41202476932bc36f97fa5540450x5af7dfdd166579092022-12-07 13:24:33106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x16d533158cb3933b34e5001f6bc0019fa1d731905848d162a14c6990773e34a40x5af7dfdd166578992022-12-07 13:24:13106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xc20d0daf50dafecf787ab31c80a57ae332a318b8002487b564c32fe9f13819110x5af7dfdd166578882022-12-07 13:23:51106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x64653f268014f53a4a34325567a9007797b3beef66f7e838eb97ce572661d6c50x5af7dfdd166578842022-12-07 13:23:43106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0xee01877bd7d3854bf284935a272d2bfe4cdf8866d47f9ef4db87f5d8b46f96eb0x5af7dfdd166578792022-12-07 13:23:33106 days 6 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
0x47b5113811987761e367db0be7555a2fecaa0161acb4247ec85ea19bb305d0e90x5af7dfdd166339622022-12-06 21:44:03106 days 22 hrs ago0x848c663413681739b0fca87dd97c3659004759b4 IN  0x42816fa3cb0adc3fcaded3109323c0bc192150840 AVAX0.0030536745 26.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xace0a6d5395c9e38612a46d86f3b59342d5ae60c66f72b7f8a80ed380b4a74b1198510802023-03-14 20:43:478 days 23 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0xace0a6d5395c9e38612a46d86f3b59342d5ae60c66f72b7f8a80ed380b4a74b1198510802023-03-14 20:43:478 days 23 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x58a2e926452ca17a5c694fa9c72422181b474669e71e833c5507abba82661466198510642023-03-14 20:43:028 days 23 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x43cda502069b1dfa4f7c1a1625bc6be47cd0bd880 AVAX
0x58a2e926452ca17a5c694fa9c72422181b474669e71e833c5507abba82661466198510642023-03-14 20:43:028 days 23 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x7ba37cb78c5a14554bcfc593e94792302d73143002c7c16a73015d446033b15a166582192022-12-07 13:34:59106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x7ba37cb78c5a14554bcfc593e94792302d73143002c7c16a73015d446033b15a166582192022-12-07 13:34:59106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x7ba37cb78c5a14554bcfc593e94792302d73143002c7c16a73015d446033b15a166582192022-12-07 13:34:59106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b166579912022-12-07 13:27:18106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x43cda502069b1dfa4f7c1a1625bc6be47cd0bd880 AVAX
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b166579912022-12-07 13:27:18106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b166579912022-12-07 13:27:18106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b166579912022-12-07 13:27:18106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x552c164df5c5e01119abe76c6848cb204acd16f1ab6c6319fb8ea52cd757d35b166579912022-12-07 13:27:18106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee166579842022-12-07 13:27:04106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x43cda502069b1dfa4f7c1a1625bc6be47cd0bd880 AVAX
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee166579842022-12-07 13:27:04106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee166579842022-12-07 13:27:04106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee166579842022-12-07 13:27:04106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x4d9489ac454c8bfd6ee8c4134c18d2707fad538de2e8b3b38bbcbdae6f5444ee166579842022-12-07 13:27:04106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f80166579822022-12-07 13:27:00106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x43cda502069b1dfa4f7c1a1625bc6be47cd0bd880 AVAX
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f80166579822022-12-07 13:27:00106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f80166579822022-12-07 13:27:00106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f80166579822022-12-07 13:27:00106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
0x29ee99645ad5230727ae1e0895d5e81ea111250575f702c88022fdf67c674f80166579822022-12-07 13:27:00106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x53be8a22d225a479e30febf0bc65ebfd1a2725c84d2fb99eb21c78ff6d85d047166579792022-12-07 13:26:54106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x43cda502069b1dfa4f7c1a1625bc6be47cd0bd880 AVAX
0x53be8a22d225a479e30febf0bc65ebfd1a2725c84d2fb99eb21c78ff6d85d047166579792022-12-07 13:26:54106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc19215084 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d0 AVAX
0x53be8a22d225a479e30febf0bc65ebfd1a2725c84d2fb99eb21c78ff6d85d047166579792022-12-07 13:26:54106 days 6 hrs ago 0x42816fa3cb0adc3fcaded3109323c0bc192150840x4a590276da8e8d660f8ef638464c2d1df40ceaba0 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ReNFT

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity)

/**
 *Submitted for verification at testnet.snowtrace.io on 2022-07-11
*/

// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;

// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

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

// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

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

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

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

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

/**
 * @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 Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

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

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(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:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

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

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

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

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

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

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

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

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

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

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

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

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

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

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

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

// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)

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

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

// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Holder.sol)

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

//              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
//              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
//         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
//    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
//         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
//         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
//              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
//              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@

interface IResolver {
    /// ENUMS ///

    enum PaymentToken {
        SENTINEL,
        WETH,
        DAI,
        USDC,
        USDT,
        TUSD,
        RENT
    }

    /// CONSTANT FUNCTIONS ///

    function getPaymentToken(PaymentToken paymentToken)
        external
        view
        returns (address);

    /// NON-CONSTANT FUNCTIONS ///

    function setPaymentToken(uint8 paymentToken, address value) external;
}

/*
 *
 *              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
 *              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
 *         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
 *    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
 *         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
 *         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
 *              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
 *              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@ *
 *
 * Resolver: IResolver.sol
 *
 * MIT License
 * ===========
 *
 * Copyright (c) 2022 reNFT Labs Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 */

// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

/**
 * @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;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

interface INFTContract {
    /// ERC1155 ///

    /// @notice Get the balance of an account's tokens.
    /// @param owner  The address of the token holder
    /// @param id     ID of the token
    /// @return        The owner's balance of the token type requested
    function balanceOf(address owner, uint256 id)
        external
        view
        returns (uint256);

    /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
    /// @dev MUST emit the ApprovalForAll event on success.
    /// @param operator  Address to add to the set of authorized operators
    /// @param approved  True if the operator is approved, false to revoke approval
    function setApprovalForAll(address operator, bool approved) external;

    /// @notice Transfers `value` amount of an `id` from the `from` address to the `to` address specified (with safety call).
    /// @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see "Approval" section of the standard).
    /// MUST revert if `to` is the zero address.
    /// MUST revert if balance of holder for token `id` is lower than the `value` sent.
    /// MUST revert on any other error.
    /// MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
    /// After the above conditions are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `to` and act appropriately (see "Safe Transfer Rules" section of the standard).
    /// @param from    Source address
    /// @param to      Target address
    /// @param id      ID of the token type
    /// @param value   Transfer amount
    /// @param data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `to`
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external;

    /// @notice Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified (with safety call).
    /// @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see "Approval" section of the standard).
    /// MUST revert if `to` is the zero address.
    /// MUST revert if length of `ids` is not the same as length of `values`.
    /// MUST revert if any of the balance(s) of the holder(s) for token(s) in `ids` is lower than the respective amount(s) in `values` sent to the recipient.
    /// MUST revert on any other error.
    /// MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
    /// Balance changes and events MUST follow the ordering of the arrays (ids[0]/values[0] before ids[1]/values[1], etc).
    /// After the above conditions for the transfer(s) in the batch are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `to` and act appropriately (see "Safe Transfer Rules" section of the standard).
    /// @param from    Source address
    /// @param to      Target address
    /// @param ids     IDs of each token type (order and length must match values array)
    /// @param values  Transfer amounts per token type (order and length must match ids array)
    /// @param data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `to`
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;

    /// ERC165 ///

    /// @notice Query if a contract implements an interface
    /// @param interfaceID The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceID) external view returns (bool);

    // -------------------------------------------------------------------------------
}

/*
 *
 *              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
 *              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
 *         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
 *    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
 *         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
 *         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
 *              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
 *              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@ *
 *
 * INFTContract: INFTContract.sol
 *
 * MIT License
 * ===========
 *
 * Copyright (c) 2022 reNFT Labs Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 */

//              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
//              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
//         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
//    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
//         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
//         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
//              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
//              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@

interface IReNFT is IERC1155Receiver {
    /// STRUCTS ///

    struct Nfts {
        INFTContract nft;
        uint256[] tokenIds;
        uint256[] lendingIds;
    }

    /// @dev Since we need to persist lendings forever (check the
    /// LendingRenting struct's doc), we need a flag to let us know
    /// if lending is active or not. inactive attribute will serve this
    /// purpose. By default, when lending is created, it will be false.
    /// We will set this attribute to true, when the owner of the NFT
    /// stops lending.
    struct Lending {
        address payable[] allowedRenters; /// whitelisted addresses
        RevShare revShares;
        uint256 upfrontRentFee; /// Useful in detrring bots when whitelists not set
        address payable lenderAddress;
        uint8 maxRentDuration;
        IResolver.PaymentToken paymentToken;
        bool inactive;
    }

    /// @dev Graph protocol was not able to generate types for 2D arrays.
    /// A solution is to wrap the inner most array in a struct. And have
    /// AllowedRenters[] as an input to a function.
    struct AllowedRenters {
        address payable[] allowedRenters;
    }

    /// @dev This struct is part of the Lending struct. Therefore,
    /// payment token of the lending is what the rewards are split
    /// in.
    struct RevShare {
        address payable[] beneficiaries;
        uint8[] portions;
    }

    struct Renting {
        address payable renterAddress;
        uint32 rentedAt;
        uint8 rentDuration;
    }

    struct LendingRenting {
        Lending lending;
        Renting renting;
    }

    /// EVENTS ///

    event Lend(
        address indexed nftAddress,
        uint256 upfrontRentFee,
        address payable[] allowedRenters,
        RevShare revShares,
        uint8 maxRentDuration,
        IResolver.PaymentToken paymentToken,
        address indexed lenderAddress,
        uint256 indexed tokenId,
        uint256 lendingId
    );

    event Rent(
        uint256 indexed lendingId,
        address indexed renterAddress,
        uint8 rentDuration
    );

    event StopLend(uint256 indexed lendingId);

    event StopRent(uint256 indexed lendingId);

    event Pay(
        address indexed receiver,
        address indexed paymentToken,
        uint256 indexed amount
    );

    /// NON-CONSTANT FUNCTIONS ///

    /// @notice Sends your NFT(s) to ReNFT contract, which acts as an escrow
    /// between the lender and the renter. Called by lender.
    /// @param nfts NFT(s) to be lent.
    /// @param allowedRenters Only these addresses can rent.
    /// @param revShares Specifies the beneficiaries of the revenue share,
    /// as well as, their respective portions. These portions sum up to less
    /// than 100. This is because the renter is entitiled to 100 - sum(portions).
    /// Reason the renter address is not here, is because it is not possible to
    /// know who will rent this given lending at the time of lending creation.
    /// @param maxRentDurations Max allowed rent duration per NFT.
    /// @param paymentToken    Index of the payment token with which to pay the
    /// rewards.
    function lend(
        Nfts calldata nfts,
        uint256[] calldata upfrontRentFee,
        AllowedRenters[] calldata allowedRenters,
        RevShare[] calldata revShares,
        uint8[] calldata maxRentDurations,
        IResolver.PaymentToken[] calldata paymentToken
    ) external;

    /// @notice Renter sends the rent payment and receives tenancy rights.
    /// @param nfts NFT(s) to be rented.
    /// @param rentDurations Number of days that the renter wishes to rent the NFT for.
    /// It is possible to return the NFT prior to this. In which case, the renter
    /// receives the unused balance.
    function rent(Nfts calldata nfts, uint8[] calldata rentDurations)
        external
        payable;

    /// @notice Stop lending releases the NFT(s) from escrow and sends it back
    /// to the lender. Called by lender.
    /// @param nfts NFT(s) to stop lending.
    function stopLend(Nfts calldata nfts) external;

    /// @notice Renters call this to conclude renting the NFT before the
    /// deadline.
    /// @param nfts NFT(s) to be returned.
    function stopRent(Nfts calldata nfts) external;

    /// @notice This function gets called by the integrating project only.
    /// It will split the rewards as per the lending.
    /// @param nfts NFT(s) to identify the lendings.
    /// @param renter Renter(s) to identify the renters, since they
    /// always get a revenue share.
    /// @param amountToPay Amount to pay to the rev share parties.
    function pay(
        Nfts calldata nfts,
        address payable[] calldata renter,
        uint256[] calldata amountToPay
    ) external;
}

/*
 *
 *              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
 *              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
 *         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
 *    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
 *         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
 *         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
 *              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
 *              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@ *
 *
 * ReNFT: IReNFT.sol
 *
 * MIT License
 * ===========
 *
 * Copyright (c) 2022 reNFT Labs Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 */

library NFTCommon {

    /// @notice Transfers the NFT tokenID from to.
    /// @dev safeTransferFrom_ name to avoid collision with the interface signature definitions. The reason it is implemented the way it is,
    /// is because some NFT contracts implement both the 721 and 1155 standard at the same time. Sometimes, 721 or 1155 function does not work.
    /// So instead of relying on the user's input, or asking the contract what interface it implements, it is best to just make a good assumption
    /// about what NFT type it is (here we guess it is 721 first), and if that fails, we use the 1155 function to tranfer the NFT.
    /// @param nft     NFT address
    /// @param from    Source address
    /// @param to      Target address
    /// @param tokenID ID of the token type
    /// @return        true = transfer successful, false = transfer not successful
    function safeTransferFrom_(
        INFTContract nft,
        address from,
        address to,
        uint256[] memory tokenID
    ) internal returns (bool) {

        uint256[] memory amount = new uint256[](tokenID.length);
        for (uint256 i = 0; i < tokenID.length; i++) {
            amount[i] = 1;
        }

        // ERC-1155
        try nft.safeBatchTransferFrom(from, to, tokenID, amount, new bytes(0)) {
            return true;
        } catch (bytes memory) {
            return false;
        }
    }

}

/*
 *
 *              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
 *              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
 *         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
 *    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
 *         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
 *         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
 *              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
 *              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@ *
 *
 * NFTCommon: NFTCommon.sol
 *
 * MIT License
 * ===========
 *
 * Copyright (c) 2022 reNFT Labs Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 */

/// @notice Emitted when the item cannot be rented.
/// 0 errorCode means that renter is attempting to rent an inactive lending.
/// 1 errorCode means that renter is the creator of the lending.
/// 2 errorCode means that rentDuration is less than one period.
error NotRentable(uint8 errorCode);

/// @notice Emitted when the lending should be non-initiated, but is in fact initiated.
error LendingNotEmpty();

/// @notice Empitted when the lending should be initiated, but is in fact non-initiated.
error LendingEmpty();

/// @notice Emitted when the renter is not allowed to rent.
error NotWhitelistedToRent();

/// @notice Emitted when the address stopping the lending is not the lender.
error StopperNotLender(address lender, address msgSender);

/// @notice Emitted when rent duration exceeds max rent duration.
/// @param rentDuration Rent duration.
/// @param maxRentDuration Max allowed rent duration.
error RentDurationExceedsMaxRentDuration(
    uint8 rentDuration,
    uint8 maxRentDuration
);

/// @notice Emitted when lender tries to stop an inactive lending
error LendingNotActive();

library LendingChecks {
    function checkIsEmpty(IReNFT.Lending storage lending) internal view {
        if (lending.lenderAddress != address(0)) {
            revert LendingNotEmpty();
        }
    }

    function checkIsNotEmpty(IReNFT.Lending storage lending) internal view {
        if (lending.lenderAddress == address(0)) {
            revert LendingEmpty();
        }
    }

    function checkIsRentable(
        IReNFT.Lending storage lending,
        uint8[] calldata rentDurations,
        uint256 i,
        address msgSender
    ) internal view {
        if (lending.inactive == true) {
            revert NotRentable(0);
        }
        if (msgSender == lending.lenderAddress) {
            revert NotRentable(1);
        }
        /// Minimal rent duration is one period
        if (rentDurations[i] < 1) {
            revert NotRentable(2);
        }
        /// Note that rentDuration == lending.maxRentDuration is allowed
        if (rentDurations[i] > lending.maxRentDuration) {
            revert RentDurationExceedsMaxRentDuration(
                rentDurations[i],
                lending.maxRentDuration
            );
        }
        /// If allowed renters is an empty array, anyone can rent
        if (lending.allowedRenters.length > 0) {
            /// Means only whitelisted addresses can rent
            bool canRent = false;
            for (uint256 j = 0; j < lending.allowedRenters.length; j++) {
                if (msg.sender == lending.allowedRenters[j]) {
                    canRent = true;
                    break;
                }
            }
            if (!canRent) {
                revert NotWhitelistedToRent();
            }
        }
    }

    function checkIsStoppable(IReNFT.Lending storage lending) internal view {
        if (lending.lenderAddress != msg.sender) {
            revert StopperNotLender(lending.lenderAddress, msg.sender);
        }
        if (lending.inactive == true) {
            revert LendingNotActive();
        }
    }
}

/// @notice Emitted when the renting should be non-initiated, but is in fact initiated.
error RentingNotEmpty();

/// @notice Emitted when the renting should be initiated, but is in fact non-initiated.
error RentingEmpty();

library RentingChecks {
    function checkIsEmpty(IReNFT.Renting storage renting) internal view {
        if (renting.renterAddress != address(0)) {
            revert RentingNotEmpty();
        }
    }

    function checkIsNotEmpty(IReNFT.Renting storage renting) internal view {
        if (renting.renterAddress == address(0)) {
            revert RentingEmpty();
        }
    }

}

//              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
//              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
//         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
//         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
//         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
//    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
//    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
//    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
//         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
//         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
//         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
//              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
//              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
//                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@

/// @notice Emitted when fallback is triggered
error FallbackNotAllowed();

/// @notice Emitted when NFT transfer fails
error NftTransferFailed();

/// @notice Emitted when the caller is not an admin.
error NotAdmin(address caller);

/// @notice Emitted when the paused function is called.
error Paused();

/// @notice Emitted when length of receivers and their fee portions does not match.
error InvalidProtocolFeeReceivers();

/// @notice Emitted when the portions do not sum to 100.
error InvalidPortionsSum();

/// @notice Emitted when the item cannot lent or an existing lending item cannot be edited.
/// 0 errorCode means that maxRentDuration is zero
/// 1 errorCode means that paymentTokenAddress is zero
/// 2 errorCode is emitted when upfront fee is not set when renter addresses are empty. When there is no whitelisted addresses, anyone would be able to rent for free and not play the game.
/// 3 errorCode is emitted when the beneficiaries (for reward splits) array length is less than 1. You should always have at least 1: owner of the nft.
/// 4 errorCode is emitted when beneficiaries length is not the same as portions length.
/// 5 errorCode is emitted when sum of portions is 100 or more. Sum of portions must be less than 100. Renter is defined to receive 100 - sum (revShares.portions).
error NotLendable(uint8 errorCode);

/// @notice Emitted when there is an error in reward share split function
/// 0 errorCode means that the address that is attempting to pay is not part of `rewardPayers`.
error NotPayable(uint8 errorCode);

/// @notice Emitted when the renting is stopped by non reNFT bot.
error ReturningNotAllowed();

/// @notice ReNFT
/// @author reNFT
contract ReNFT is IReNFT, ERC1155Receiver, ERC1155Holder {
    using SafeERC20 for ERC20;
    using NFTCommon for INFTContract;
    using LendingChecks for Lending;
    using RentingChecks for Renting;

    IResolver private resolver;
    address private admin;
    address private deployer;
    // Protocol fee receivers and their respective share of the fee.
    // Sum of portions = 100. Thus, if a feeReceiver has 20 portions,
    // They are entitled to 20% of all of the protocol fees.
    address payable[] private feeReceivers;
    uint8[] private feePortions;

    // These are reNFT ran bots that stop the rentals for renters
    // automatically. This means the renters do not have to worry
    // about stopping the rental of the NFT on time.
    address[] private rentStoppers;

    // These are the addresses that are allowed to pay the rev share
    // rewards.
    address[] private rewardPayers;

    uint256 private lendingId = 1;

    bool public paused = false;
    // In basis points. So 1_000 means 1%.
    // Can't be greater or equal than 10_000
    uint256 public rentFee = 0;

    mapping(bytes32 => LendingRenting) public lendingRentings;

    modifier onlyAdmin() {
        if (msg.sender != admin && msg.sender != deployer) {
            revert NotAdmin(msg.sender);
        }
        _;
    }

    modifier onlyRentStoppers() {
        bool canStop = false;
        for (uint256 i = 0; i < rentStoppers.length; i++) {
            if (msg.sender == rentStoppers[i]) {
                canStop = true;
                break;
            }
        }
        if (!canStop) {
            revert ReturningNotAllowed();
        }
        _;
    }

    modifier notPaused() {
        if (paused) {
            revert Paused();
        }
        _;
    }

    constructor(address newResolver, address newAdmin) {
        /// ! Note that after creating the contract, you need to:
        /// - set rent fee (`setRentFee`)
        /// - set protocol fee receivers (`setProtocolFeeReceivers`). (beneficiaries and portions)
        /// - set rent stoppers (`setRentStoppers`). Bots that will stop the rentals
        /// - set reward payers (`setRewardPayers`). Rev share split payers
        resolver = IResolver(newResolver);
        admin = newAdmin;
        deployer = msg.sender;
    }

    /// EFFECTS - MAIN LOGIC - USER ENTRYPOINTS ///

    /// @inheritdoc IReNFT
    function lend(
        Nfts calldata nfts,
        uint256[] calldata upfrontRentFee,
        AllowedRenters[] calldata allowedRenters,
        RevShare[] calldata revShares,
        uint8[] calldata maxRentDurations,
        IResolver.PaymentToken[] calldata paymentTokens
    ) external override notPaused {
        for (uint256 i = 0; i < nfts.tokenIds.length; i++) {
            /// Note, you must call with empty allowedRenters arrays, if you wish for everyone to
            /// be able to rent. If you don't, you will get an index out of bounds.
            checkIsLendable(
                upfrontRentFee[i],
                allowedRenters[i],
                revShares[i],
                maxRentDurations[i],
                paymentTokens[i]
            );

            LendingRenting storage item = lendingRentings[
                keccak256(
                    abi.encodePacked(
                        nfts.nft,
                        nfts.tokenIds[i],
                        lendingId
                    )
                )
            ];

            item.lending.checkIsEmpty();
            item.renting.checkIsEmpty();

            item.lending = Lending({
                lenderAddress: payable(msg.sender),
                upfrontRentFee: upfrontRentFee[i],
                allowedRenters: allowedRenters[i].allowedRenters,
                revShares: revShares[i],
                maxRentDuration: maxRentDurations[i],
                inactive: false,
                paymentToken: paymentTokens[i]
            });

            emit Lend({
                nftAddress: address(nfts.nft),
                tokenId: nfts.tokenIds[i],
                upfrontRentFee: upfrontRentFee[i],
                lendingId: lendingId,
                lenderAddress: msg.sender,
                allowedRenters: allowedRenters[i].allowedRenters,
                revShares: revShares[i],
                maxRentDuration: maxRentDurations[i],
                paymentToken: paymentTokens[i]
            });

            lendingId++;
        }

        bool success = nfts.nft.safeTransferFrom_(
            msg.sender,
            address(this),
            nfts.tokenIds
        );

        if (!success) {
            revert NftTransferFailed();
        }
    }

    /// @inheritdoc IReNFT
    function rent(Nfts calldata nfts, uint8[] calldata rentDurations) external payable override notPaused {
        for (uint256 i = 0; i < nfts.tokenIds.length; i++) {
            LendingRenting storage item = lendingRentings[
                keccak256(
                    abi.encodePacked(
                        nfts.nft,
                        nfts.tokenIds[i],
                        nfts.lendingIds[i]
                    )
                )
            ];

            /// Pay the upfront fee directly into the lender's wallet.
            if (item.lending.upfrontRentFee != 0) {
                ERC20 pmtToken = ERC20(resolver.getPaymentToken(item.lending.paymentToken));
                pmtToken.safeTransferFrom(
                    msg.sender,
                    item.lending.lenderAddress,
                    item.lending.upfrontRentFee
                );
            }

            item.lending.checkIsNotEmpty();
            item.renting.checkIsEmpty();
            item.lending.checkIsRentable(rentDurations, i, msg.sender);

            item.renting.renterAddress = payable(msg.sender);
            item.renting.rentDuration = rentDurations[i];
            item.renting.rentedAt = uint32(block.timestamp);

            emit Rent({
                lendingId: nfts.lendingIds[i],
                renterAddress: msg.sender,
                rentDuration: rentDurations[i]
            });
        }
    }

    /// @inheritdoc IReNFT
    function stopRent(Nfts calldata nfts) external override notPaused onlyRentStoppers {
        for (uint256 i = 0; i < nfts.tokenIds.length; i++) {
            LendingRenting storage item = lendingRentings[
                keccak256(
                    abi.encodePacked(
                        nfts.nft,
                        nfts.tokenIds[i],
                        nfts.lendingIds[i]
                    )
                )
            ];

            item.lending.checkIsNotEmpty();
            item.renting.checkIsNotEmpty();

            delete item.renting;

            emit StopRent({lendingId: nfts.lendingIds[i]});
        }
    }

    /// @inheritdoc IReNFT
    function stopLend(Nfts calldata nfts) external override notPaused {
        for (uint256 i = 0; i < nfts.tokenIds.length; i++) {
            bytes32 identifier = keccak256(
                abi.encodePacked(
                    nfts.nft,
                    nfts.tokenIds[i],
                    nfts.lendingIds[i]
                )
            );
            LendingRenting storage item = lendingRentings[identifier];

            item.lending.checkIsNotEmpty();
            item.renting.checkIsEmpty();
            item.lending.checkIsStoppable();

            /// We can't delete the lendings because we need to keep track of rev share
            /// splits, in case some of the rentings haven't split the rewards
            item.lending.inactive = true;

            emit StopLend({lendingId: nfts.lendingIds[i]});
        }

        bool success = nfts.nft.safeTransferFrom_(
            address(this),
            msg.sender,
            nfts.tokenIds
        );

        if (!success) {
            revert NftTransferFailed();
        }
    }

    /// FINANCIAL ///

    /// @inheritdoc IReNFT
    function pay(
        Nfts calldata nfts,
        address payable[] calldata renter,
        uint256[] calldata amountToPay
    ) external override notPaused {
        /// If you cannot pay with this function, call it with less arguments
        /// i.e. break up the payments

        /// only payable by one of the allowed addresses
        bool canPay = false;
        for (uint256 i = 0; i < rewardPayers.length; i++) {
            /// relayer might be executing the actual transaction
            if (tx.origin == rewardPayers[i]) {
                canPay = true;
                break;
            }
        }
        if (!canPay) {
            revert NotPayable(0);
        }

        /// amountToPay - takeFee now available to be distributed between
        /// the rev share receipents in the correct amounts

        /// Possible to pay for multiple rentings at the same time
        uint8 outerLen = uint8(nfts.lendingIds.length);
        for (uint8 i = 0; i < outerLen; i++) {
            /// get the lendingRenting item (you need this for rev share details)
            LendingRenting storage item = lendingRentings[
                keccak256(
                    abi.encodePacked(
                        nfts.nft,
                        nfts.tokenIds[i],
                        nfts.lendingIds[i]
                    )
                )
            ];

            /// - takeFee on the amountToPay. distribute it between the protocol fee receivers
            uint256 takenFee = takeFee(amountToPay[i], item.lending.paymentToken);
            uint256 rewardAmount = amountToPay[i] - takenFee;
            uint8 innerLen = uint8(item.lending.revShares.beneficiaries.length);
            uint256 rewardPart = 0;
            uint8 sum = 0;
            address paymentToken = resolver.getPaymentToken(item.lending.paymentToken);
            /// All but renter. We have checked during lending that sum of revShares portions
            /// is less than 100
            for (uint8 j = 0; j < innerLen; j++) {
                sum += item.lending.revShares.portions[j];
                rewardPart = (rewardAmount * item.lending.revShares.portions[j]) / 100;
                if (rewardPart != 0) {
                    ERC20(paymentToken).safeTransferFrom(
                        tx.origin,
                        item.lending.revShares.beneficiaries[j],
                        rewardPart
                    );
                    emit Pay({
                        receiver: item.lending.revShares.beneficiaries[j],
                        paymentToken: paymentToken,
                        amount: rewardPart
                    });
                }
            }
            // renter portion := 100 - uint256(sum)
            rewardPart = (rewardAmount * (100 - uint256(sum))) / 100;
            if (rewardPart != 0) {
                ERC20(paymentToken).safeTransferFrom(
                    tx.origin,
                    renter[i],
                    rewardPart
                );
                emit Pay({
                    receiver: renter[i],
                    amount: rewardPart,
                    paymentToken: paymentToken
                });
            }
        }
    }

    /// @notice Takes protocol fee from the realised rent amounts.
    /// @param revShareAmount Once rev share payment is made, we take the protocol fee
    /// on this sum.
    /// @param paymentToken Index of the token from the Resolver. The `rentAmount`
    /// will be sent denominated in this token.
    function takeFee(uint256 revShareAmount, IResolver.PaymentToken paymentToken) private returns (uint256 fee) {
        fee = (revShareAmount * rentFee) / 10000;
        if (fee == 0) {
            return 0;
        }
        uint8 len = uint8(feeReceivers.length);
        uint256 feePart = 0;
        for (uint8 i = 0; i < len; i++) {
            feePart = (fee * feePortions[i]) / 100;
            if (feePart != 0) {
                ERC20(resolver.getPaymentToken(paymentToken)).safeTransferFrom(
                    tx.origin,
                    feeReceivers[i],
                    feePart
                );
            }
        }
        /// fee is implicitly returned
    }

    /// CHECKS ///

    function checkIsLendable(
        uint256 upfrontRentFee,
        AllowedRenters calldata allowedRenters,
        RevShare calldata revShares,
        uint8 maxRentDuration,
        IResolver.PaymentToken paymentToken
    ) private view {
        /// Enforce at least one period length max rent duration
        if (maxRentDuration < 1) {
            revert NotLendable(0);
        }

        if (allowedRenters.allowedRenters.length == 0) {
            /// Everyone can rent.
            /// Upfront fee is mandatory in such a case.
            if (upfrontRentFee == 0) {
                revert NotLendable(2);
            }
        }
        /// else, if the upfrontRentFee allowed renters length is not zero
        /// means only certain few addresses can rent
        /// in that case the upfrontRentFee can or cannot be zero
        /// most of the cases it will be zero, since the lender
        /// will trust the allowedRenters
        /// The reason for mandatory upfrontRentFee when allowedRenters
        /// length is zero is because someone can write a bot to immediately
        /// rent such lendings (free obviously, becaues upfrontRentFee is zero)
        /// and then not use them to play the game, which would causes issues.
        /// Now you obviously, can have small upfrontRentFees when
        /// allowedRenters length is zero, but it is still a better 
        /// solution than no fee at all
        /// Therefore, is allowedRenters length is not zero, we do not need
        /// to make any additional checks.

        address paymentTokenAddr = resolver.getPaymentToken(paymentToken);
        /// Only if upfrontRentFee is zero can you leave the payment token
        /// as sentinel. If this weren't the case, you'd be wasting 20k
        /// gas to set the zero payment token to something that is non-zero
        /// and would be simply wasting gas
        /// TODO: update the SDK whoopi.js example to use SENTINEL when
        /// upfrontRentFee is zero
        if (upfrontRentFee != 0) {
            if (paymentTokenAddr == address(0)) {
                revert NotLendable(1);
            }
        }

        /// Rev Share Checks

        /// RevShares beneficiaries should be at least one: the owner of the nft
        /// Renter is also in there, but renter's share is defined as:
        /// 100 - sum (revShares.portions). Plus, we can't know who the renter
        /// is at the time of the actual rent creation. Plus, you can have same
        /// lending, but multiple renters; Thus, we can't define the renter
        /// at the time of lending creation.
        if (revShares.beneficiaries.length < 1) {
            revert NotLendable(3);
        }

        if (revShares.beneficiaries.length != revShares.portions.length) {
            revert NotLendable(4);
        }

        /// Sum of portions must be less than 100.
        /// This is because the renter gets 100 - sum (revShare.portions).
        uint8 sum = computeSum(revShares.portions);
        if (sum >= 100) {
            revert NotLendable(5);
        }
    }

    function computeSum(uint8[] calldata portions) private pure returns (uint8 sum) {
        uint8 len = uint8(portions.length);
        sum = 0;
        for (uint8 i = 0; i < len; i ++) {
            sum += portions[i];
        }
    }

    function checkPortionsSum(uint8[] calldata portions) private pure {
        uint8 sum = computeSum(portions);
        if (sum != 100) {
            revert InvalidPortionsSum();
        }
    }

    /// ADMIN ///

    function revokeOwnership() external onlyAdmin {
        admin = address(0);
    }

    function setRentFee(uint256 newRentFee) external onlyAdmin {
        rentFee = newRentFee;
    }

    function setProtocolFeeReceivers(
        address payable[] calldata newFeeReceivers,
        uint8[] calldata newFeePortions
    ) external onlyAdmin {
        /// ! This function needs to be immediately called after deploying the contract
        checkPortionsSum(newFeePortions);
        if (newFeeReceivers.length != newFeePortions.length) {
            revert InvalidProtocolFeeReceivers();
        }
        feeReceivers = newFeeReceivers;
        feePortions = newFeePortions;
    }

    function setRentStoppers(
        address[] calldata newRentStoppers
    ) external onlyAdmin {
        /// ! This function needs to be immediately called after deploying the contract
        rentStoppers = newRentStoppers;
    }

    function setRewardPayers(
        address[] calldata newRewardPayers
    ) external onlyAdmin {
        /// ! This function needs to be immediately called after deploying the contract
        rewardPayers = newRewardPayers;
    }

    function flipPaused() external onlyAdmin {
        paused = !paused;
    }
}

/*
 *
 *              @@@@@@@@@@@@@@@@        ,@@@@@@@@@@@@@@@@
 *              @@@,,,,,,,,,,@@@        ,@@&,,,,,,,,,,@@@
 *         @@@@@@@@,,,,,,,,,,@@@@@@@@&  ,@@&,,,,,,,,,,@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@
 *         @@@**********@@@@@@@@@@@@@&  ,@@@@@@@@**********@@@@@@@@
 *         @@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@@@@@@&       [email protected]@@**********@@@@@@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@
 *    @@@**********@@@@@@@@@@@@@&            [email protected]@@@@@@@**********@@@@@@@@
 *    @@@@@@@@**********@@@@@@@@&            [email protected]@@**********@@@@@@@@@@@@@
 *    @@@@@@@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&            [email protected]@@//////////@@@@@@@@@@@@@
 *         @@@//////////@@@@@@@@&       ,@@@@@@@@//////////@@@@@@@@@@@@@
 *         @@@%%%%%/////(((((@@@&       ,@@@(((((/////%%%%%@@@@@@@@
 *         @@@@@@@@//////////@@@@@@@@&  ,@@@//////////@@@@@@@@@@@@@
 *              @@@%%%%%%%%%%@@@@@@@@&  ,@@@%%%%%%%%%%@@@@@@@@@@@@@
 *              @@@@@@@@@@@@@@@@@@@@@&  ,@@@@@@@@@@@@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@
 *                   @@@@@@@@@@@@@@@@&        @@@@@@@@@@@@@@@@ *
 *
 * ReNFT: ReNFT.sol
 *
 * MIT License
 * ===========
 *
 * Copyright (c) 2022 reNFT Labs Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 */

Contract ABI

[{"inputs":[{"internalType":"address","name":"newResolver","type":"address"},{"internalType":"address","name":"newAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidPortionsSum","type":"error"},{"inputs":[],"name":"InvalidProtocolFeeReceivers","type":"error"},{"inputs":[],"name":"LendingEmpty","type":"error"},{"inputs":[],"name":"LendingNotActive","type":"error"},{"inputs":[],"name":"LendingNotEmpty","type":"error"},{"inputs":[],"name":"NftTransferFailed","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotAdmin","type":"error"},{"inputs":[{"internalType":"uint8","name":"errorCode","type":"uint8"}],"name":"NotLendable","type":"error"},{"inputs":[{"internalType":"uint8","name":"errorCode","type":"uint8"}],"name":"NotPayable","type":"error"},{"inputs":[{"internalType":"uint8","name":"errorCode","type":"uint8"}],"name":"NotRentable","type":"error"},{"inputs":[],"name":"NotWhitelistedToRent","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[{"internalType":"uint8","name":"rentDuration","type":"uint8"},{"internalType":"uint8","name":"maxRentDuration","type":"uint8"}],"name":"RentDurationExceedsMaxRentDuration","type":"error"},{"inputs":[],"name":"RentingEmpty","type":"error"},{"inputs":[],"name":"RentingNotEmpty","type":"error"},{"inputs":[],"name":"ReturningNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"lender","type":"address"},{"internalType":"address","name":"msgSender","type":"address"}],"name":"StopperNotLender","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"upfrontRentFee","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"allowedRenters","type":"address[]"},{"components":[{"internalType":"address payable[]","name":"beneficiaries","type":"address[]"},{"internalType":"uint8[]","name":"portions","type":"uint8[]"}],"indexed":false,"internalType":"struct IReNFT.RevShare","name":"revShares","type":"tuple"},{"indexed":false,"internalType":"uint8","name":"maxRentDuration","type":"uint8"},{"indexed":false,"internalType":"enum IResolver.PaymentToken","name":"paymentToken","type":"uint8"},{"indexed":true,"internalType":"address","name":"lenderAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lendingId","type":"uint256"}],"name":"Lend","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Pay","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"lendingId","type":"uint256"},{"indexed":true,"internalType":"address","name":"renterAddress","type":"address"},{"indexed":false,"internalType":"uint8","name":"rentDuration","type":"uint8"}],"name":"Rent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"lendingId","type":"uint256"}],"name":"StopLend","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"lendingId","type":"uint256"}],"name":"StopRent","type":"event"},{"inputs":[],"name":"flipPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract INFTContract","name":"nft","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lendingIds","type":"uint256[]"}],"internalType":"struct IReNFT.Nfts","name":"nfts","type":"tuple"},{"internalType":"uint256[]","name":"upfrontRentFee","type":"uint256[]"},{"components":[{"internalType":"address payable[]","name":"allowedRenters","type":"address[]"}],"internalType":"struct IReNFT.AllowedRenters[]","name":"allowedRenters","type":"tuple[]"},{"components":[{"internalType":"address payable[]","name":"beneficiaries","type":"address[]"},{"internalType":"uint8[]","name":"portions","type":"uint8[]"}],"internalType":"struct IReNFT.RevShare[]","name":"revShares","type":"tuple[]"},{"internalType":"uint8[]","name":"maxRentDurations","type":"uint8[]"},{"internalType":"enum IResolver.PaymentToken[]","name":"paymentTokens","type":"uint8[]"}],"name":"lend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"lendingRentings","outputs":[{"components":[{"internalType":"address payable[]","name":"allowedRenters","type":"address[]"},{"components":[{"internalType":"address payable[]","name":"beneficiaries","type":"address[]"},{"internalType":"uint8[]","name":"portions","type":"uint8[]"}],"internalType":"struct IReNFT.RevShare","name":"revShares","type":"tuple"},{"internalType":"uint256","name":"upfrontRentFee","type":"uint256"},{"internalType":"address payable","name":"lenderAddress","type":"address"},{"internalType":"uint8","name":"maxRentDuration","type":"uint8"},{"internalType":"enum IResolver.PaymentToken","name":"paymentToken","type":"uint8"},{"internalType":"bool","name":"inactive","type":"bool"}],"internalType":"struct IReNFT.Lending","name":"lending","type":"tuple"},{"components":[{"internalType":"address payable","name":"renterAddress","type":"address"},{"internalType":"uint32","name":"rentedAt","type":"uint32"},{"internalType":"uint8","name":"rentDuration","type":"uint8"}],"internalType":"struct IReNFT.Renting","name":"renting","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract INFTContract","name":"nft","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lendingIds","type":"uint256[]"}],"internalType":"struct IReNFT.Nfts","name":"nfts","type":"tuple"},{"internalType":"address payable[]","name":"renter","type":"address[]"},{"internalType":"uint256[]","name":"amountToPay","type":"uint256[]"}],"name":"pay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract INFTContract","name":"nft","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lendingIds","type":"uint256[]"}],"internalType":"struct IReNFT.Nfts","name":"nfts","type":"tuple"},{"internalType":"uint8[]","name":"rentDurations","type":"uint8[]"}],"name":"rent","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"rentFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revokeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"newFeeReceivers","type":"address[]"},{"internalType":"uint8[]","name":"newFeePortions","type":"uint8[]"}],"name":"setProtocolFeeReceivers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRentFee","type":"uint256"}],"name":"setRentFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"newRentStoppers","type":"address[]"}],"name":"setRentStoppers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"newRewardPayers","type":"address[]"}],"name":"setRewardPayers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract INFTContract","name":"nft","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lendingIds","type":"uint256[]"}],"internalType":"struct IReNFT.Nfts","name":"nfts","type":"tuple"}],"name":"stopLend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract INFTContract","name":"nft","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lendingIds","type":"uint256[]"}],"internalType":"struct IReNFT.Nfts","name":"nfts","type":"tuple"}],"name":"stopRent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405260016007556008805460ff1916905560006009553480156200002557600080fd5b5060405162004152380380620041528339810160408190526200004891620000a7565b600080546001600160a01b039384166001600160a01b0319918216179091556001805492909316918116919091179091556002805490911633179055620000df565b80516001600160a01b0381168114620000a257600080fd5b919050565b60008060408385031215620000bb57600080fd5b620000c6836200008a565b9150620000d6602084016200008a565b90509250929050565b61406380620000ef6000396000f3fe60806040526004361061010e5760003560e01c80636d11d1c5116100a5578063bc197c8111610074578063d2b4718b11610059578063d2b4718b14610336578063e247100b14610349578063f23a6e611461036957600080fd5b8063bc197c811461029c578063bf2b23ea1461031257600080fd5b80636d11d1c51461020e57806376774ea31461022e57806397a21d6a1461024e578063a731147c1461026e57600080fd5b8063333171bb116100e1578063333171bb1461019f5780635af7dfdd146101b45780635c975abb146101d4578063659e7c38146101ee57600080fd5b806301ffc9a7146101135780631308264d14610148578063257490981461016a5780632b9689581461018a575b600080fd5b34801561011f57600080fd5b5061013361012e36600461309a565b6103ae565b60405190151581526020015b60405180910390f35b34801561015457600080fd5b50610168610163366004613128565b610447565b005b34801561017657600080fd5b50610168610185366004613182565b6104d6565b34801561019657600080fd5b5061016861078a565b3480156101ab57600080fd5b5061016861082d565b3480156101c057600080fd5b506101686101cf3660046131b7565b6108d8565b3480156101e057600080fd5b506008546101339060ff1681565b3480156101fa57600080fd5b50610168610209366004613128565b610e85565b34801561021a57600080fd5b50610168610229366004613182565b610f0a565b34801561023a57600080fd5b5061016861024936600461324c565b61116e565b34801561025a57600080fd5b50610168610269366004613265565b6111ec565b34801561027a57600080fd5b5061028e61028936600461324c565b6112c8565b60405161013f92919061338c565b3480156102a857600080fd5b506102e16102b73660046136bf565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161013f565b34801561031e57600080fd5b5061032860095481565b60405190815260200161013f565b61016861034436600461376d565b611579565b34801561035557600080fd5b506101686103643660046137d6565b61193b565b34801561037557600080fd5b506102e16103843660046138ef565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000148061044157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff163314801590610487575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156104c5576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6104d160058383612e78565b505050565b60085460ff1615610513576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b6105236020830183613958565b90508110156106db57600061053b60208401846139c0565b6105486020850185613958565b84818110610558576105586139dd565b9050602002013584806040019061056f9190613958565b8581811061057f5761057f6139dd565b905060200201356040516020016105d09392919060609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683526014830191909152603482015260540190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600a909352912090915061061e8161200c565b61062a81600501612060565b610633816120af565b6004810180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000001790556106836040850185613958565b84818110610693576106936139dd565b905060200201357fdc82f4416fd3195e4291124b4902226d3b43eb712c6dfd16c2390d02448fa06f60405160405180910390a2505080806106d390613a3b565b915050610516565b50600061074d30336106f06020860186613958565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061072f9250505060208701876139c0565b73ffffffffffffffffffffffffffffffffffffffff16929190612186565b905080610786576040517f7b935bf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60015473ffffffffffffffffffffffffffffffffffffffff1633148015906107ca575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610803576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024016104bc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60015473ffffffffffffffffffffffffffffffffffffffff16331480159061086d575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156108a6576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024016104bc565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60085460ff1615610915576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b6006548110156109795760068181548110610936576109366139dd565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1632036109675760019150610979565b8061097181613a3b565b915050610919565b50806109b4576040517f1c5a03f1000000000000000000000000000000000000000000000000000000008152600060048201526024016104bc565b60006109c36040880188613958565b9050905060005b8160ff168160ff161015610e7b576000600a816109ea60208c018c6139c0565b6109f760208d018d613958565b8660ff16818110610a0a57610a0a6139dd565b905060200201358c8060400190610a219190613958565b8760ff16818110610a3457610a346139dd565b90506020020135604051602001610a859392919060609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683526014830191909152603482015260540190565b60405160208183030381529060405280519060200120815260200190815260200160002090506000610ae687878560ff16818110610ac557610ac56139dd565b905060200201358360000160040160159054906101000a900460ff166122ec565b905060008188888660ff16818110610b0057610b006139dd565b90506020020135610b119190613a73565b6001840154600080546004808801546040517fc6ee427f000000000000000000000000000000000000000000000000000000008152959650939492938493849373ffffffffffffffffffffffffffffffffffffffff169263c6ee427f92610b9692750100000000000000000000000000000000000000000090910460ff169101613a8a565b602060405180830381865afa158015610bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd79190613a98565b905060005b8460ff168160ff161015610d635760028801805460ff8316908110610c0357610c036139dd565b90600052602060002090602091828204019190069054906101000a900460ff1683610c2e9190613ab5565b60028901805491945060649160ff8416908110610c4d57610c4d6139dd565b600091825260209182902091810490910154610c7591601f166101000a900460ff1688613ada565b610c7f9190613b17565b93508315610d5157600188018054610cd391329160ff8516908110610ca657610ca66139dd565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff8581169291168761247a565b600188018054859173ffffffffffffffffffffffffffffffffffffffff85169160ff8516908110610d0657610d066139dd565b600091825260208220015460405173ffffffffffffffffffffffffffffffffffffffff909116917f288d9a5737d39d766acb848da277a970d9ee31f9115e17490b9393e282fa7b4d91a45b80610d5b81613b52565b915050610bdc565b506064610d7360ff841682613a73565b610d7d9087613ada565b610d879190613b17565b92508215610e6157610ddc328f8f8b60ff16818110610da857610da86139dd565b9050602002016020810190610dbd91906139c0565b73ffffffffffffffffffffffffffffffffffffffff841691908661247a565b828173ffffffffffffffffffffffffffffffffffffffff168f8f8b60ff16818110610e0957610e096139dd565b9050602002016020810190610e1e91906139c0565b73ffffffffffffffffffffffffffffffffffffffff167f288d9a5737d39d766acb848da277a970d9ee31f9115e17490b9393e282fa7b4d60405160405180910390a45b505050505050508080610e7390613b52565b9150506109ca565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314801590610ec5575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610efe576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024016104bc565b6104d160068383612e78565b60085460ff1615610f47576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b600554811015610fab5760058181548110610f6857610f686139dd565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163303610f995760019150610fab565b80610fa381613a3b565b915050610f4b565b5080610fe3576040517f57af5e2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b610ff36020840184613958565b90508110156104d1576000600a8161100e60208701876139c0565b61101b6020880188613958565b8681811061102b5761102b6139dd565b905060200201358780604001906110429190613958565b87818110611052576110526139dd565b905060200201356040516020016110a39392919060609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683526014830191909152603482015260540190565b60405160208183030381529060405280519060200120815260200190815260200160002090506110d58160000161200c565b6110e18160050161250f565b6005810180547fffffffffffffff000000000000000000000000000000000000000000000000001690556111186040850185613958565b83818110611128576111286139dd565b905060200201357f7afecc40577ae7813c91a9c4e99c2844716d4fe3892b6b3af8582670a7ffffd160405160405180910390a2508061116681613a3b565b915050610fe6565b60015473ffffffffffffffffffffffffffffffffffffffff1633148015906111ae575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156111e7576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024016104bc565b600955565b60015473ffffffffffffffffffffffffffffffffffffffff16331480159061122c575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15611265576040517f17a842420000000000000000000000000000000000000000000000000000000081523360048201526024016104bc565b61126f828261255c565b8281146112a8576040517f97a63f6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112b460038585612e78565b506112c160048383612f00565b5050505050565b600a60209081526000918252604091829020825181546101009381028201840190945260e081018481529193909284928492909184919084018282801561134557602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161131a575b5050505050815260200160018201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156113c457602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611399575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561143a57602002820191906000526020600020906000905b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161140b5790505b50505091909252505050815260038201546020820152600482015473ffffffffffffffffffffffffffffffffffffffff8116604083015260ff7401000000000000000000000000000000000000000082048116606084015260809092019175010000000000000000000000000000000000000000009091041660068111156114c4576114c4613322565b60068111156114d5576114d5613322565b81526004919091015460ff760100000000000000000000000000000000000000000000909104811615156020928301526040805160608101825260059095015473ffffffffffffffffffffffffffffffffffffffff8116865263ffffffff7401000000000000000000000000000000000000000082041693860193909352780100000000000000000000000000000000000000000000000090920416908301529082565b60085460ff16156115b6576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b6115c66020850185613958565b9050811015611935576000600a816115e160208801886139c0565b6115ee6020890189613958565b868181106115fe576115fe6139dd565b905060200201358880604001906116159190613958565b87818110611625576116256139dd565b905060200201356040516020016116769392919060609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683526014830191909152603482015260540190565b6040516020818303038152906040528051906020012081526020019081526020016000209050806000016003015460001461179857600080546004838101546040517fc6ee427f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263c6ee427f92611721927501000000000000000000000000000000000000000000900460ff169101613a8a565b602060405180830381865afa15801561173e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117629190613a98565b600483015460038401549192506117969173ffffffffffffffffffffffffffffffffffffffff80851692339291169061247a565b505b6117a18161200c565b6117ad81600501612060565b6117ba81858585336125a7565b6005810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790558383838181106117f8576117f86139dd565b905060200201602081019061180d9190613b87565b6005820180547fffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000060ff93909316929092027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff1691909117740100000000000000000000000000000000000000004263ffffffff1602179055336118ae6040870187613958565b848181106118be576118be6139dd565b905060200201357fd5fd6c8eb07ae98c2aa8f9d9dbb5efd0474736d3e52725dcd327b51c13694d6a8686868181106118f8576118f86139dd565b905060200201602081019061190d9190613b87565b60405160ff909116815260200160405180910390a3508061192d81613a3b565b9150506115b9565b50505050565b60085460ff1615611978576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b61198860208d018d613958565b9050811015611f5a57611a488b8b838181106119a6576119a66139dd565b905060200201358a8a848181106119bf576119bf6139dd565b90506020028101906119d19190613ba2565b8989858181106119e3576119e36139dd565b90506020028101906119f59190613be0565b888886818110611a0757611a076139dd565b9050602002016020810190611a1c9190613b87565b878787818110611a2e57611a2e6139dd565b9050602002016020810190611a439190613c14565b61284b565b6000600a60008e6000016020810190611a6191906139c0565b8f8060200190611a719190613958565b86818110611a8157611a816139dd565b90506020020135600754604051602001611ad59392919060609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683526014830191909152603482015260540190565b6040516020818303038152906040528051906020012081526020019081526020016000209050611b0781600001612acb565b611b1381600501612060565b6040518060e001604052808b8b85818110611b3057611b306139dd565b9050602002810190611b429190613ba2565b611b4c9080613958565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505090825250602001898985818110611b9557611b956139dd565b9050602002810190611ba79190613be0565b611bb090613c97565b81526020018d8d85818110611bc757611bc76139dd565b9050602002013581526020013373ffffffffffffffffffffffffffffffffffffffff168152602001878785818110611c0157611c016139dd565b9050602002016020810190611c169190613b87565b60ff168152602001858585818110611c3057611c306139dd565b9050602002016020810190611c459190613c14565b6006811115611c5657611c56613322565b81526000602091820152815180518492611c74928492910190612fa4565b506020828101518051805191926001850192611c939284920190612fa4565b506020828101518051611cac926001850192019061301e565b505050604082015160038201556060820151600482018054608085015160ff1674010000000000000000000000000000000000000000027fffffffffffffffffffffff00000000000000000000000000000000000000000090911673ffffffffffffffffffffffffffffffffffffffff909316929092179190911780825560a084015191907fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000836006811115611d7c57611d7c613322565b021790555060c0919091015160049091018054911515760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055611de260208e018e613958565b83818110611df257611df26139dd565b905060200201353373ffffffffffffffffffffffffffffffffffffffff168e6000016020810190611e2391906139c0565b73ffffffffffffffffffffffffffffffffffffffff167fbd6b3d4a34edb7d986d312cc7c7443c63a5b0e1d9074fd96b30b0623a99ea9a08f8f87818110611e6c57611e6c6139dd565b905060200201358e8e88818110611e8557611e856139dd565b9050602002810190611e979190613ba2565b611ea19080613958565b8e8e8a818110611eb357611eb36139dd565b9050602002810190611ec59190613be0565b8d8d8b818110611ed757611ed76139dd565b9050602002016020810190611eec9190613b87565b8c8c8c818110611efe57611efe6139dd565b9050602002016020810190611f139190613c14565b600754604051611f299796959493929190613e14565b60405180910390a460078054906000611f4183613a3b565b9190505550508080611f5290613a3b565b91505061197b565b506000611fc533308e8060200190611f729190613958565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508f600001602081019061072f91906139c0565b905080611ffe576040517f7b935bf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b600481015473ffffffffffffffffffffffffffffffffffffffff1661205d576040517fd4cb216700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b805473ffffffffffffffffffffffffffffffffffffffff161561205d576040517f4bc74d0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600481015473ffffffffffffffffffffffffffffffffffffffff163314612129576004818101546040517faec378e800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116918101919091523360248201526044016104bc565b6004810154760100000000000000000000000000000000000000000000900460ff16151560010361205d576040517f2bf1f7c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080825167ffffffffffffffff8111156121a3576121a36134fb565b6040519080825280602002602001820160405280156121cc578160200160208202803683370190505b50905060005b835181101561220c5760018282815181106121ef576121ef6139dd565b60209081029190910101528061220481613a3b565b9150506121d2565b50604080516000815260208101918290527f2eb2c2d60000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff871690632eb2c2d69061227490889088908890879060248101613f7b565b600060405180830381600087803b15801561228e57600080fd5b505af192505050801561229f575060015b6122de573d8080156122cd576040519150601f19603f3d011682016040523d82523d6000602084013e6122d2565b606091505b506000925050506122e4565b60019150505b949350505050565b6000612710600954846122ff9190613ada565b6123099190613b17565b90508060000361231b57506000610441565b6003546000805b8260ff168160ff16101561247157606460048260ff1681548110612348576123486139dd565b60009182526020918290209181049091015461237091601f166101000a900460ff1686613ada565b61237a9190613b17565b9150811561245f5761245f3260038360ff168154811061239c5761239c6139dd565b600091825260208220015490546040517fc6ee427f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316928792169063c6ee427f90612400908c90600401613a8a565b602060405180830381865afa15801561241d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124419190613a98565b73ffffffffffffffffffffffffffffffffffffffff1692919061247a565b8061246981613b52565b915050612322565b50505092915050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611935908590612b1d565b805473ffffffffffffffffffffffffffffffffffffffff1661205d576040517ed4028d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006125688383612c29565b90508060ff166064146104d1576040517f047b193d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004850154760100000000000000000000000000000000000000000000900460ff161515600103612607576040517fa3ba5940000000000000000000000000000000000000000000000000000000008152600060048201526024016104bc565b600485015473ffffffffffffffffffffffffffffffffffffffff90811690821603612661576040517fa3ba5940000000000000000000000000000000000000000000000000000000008152600160048201526024016104bc565b6001848484818110612675576126756139dd565b905060200201602081019061268a9190613b87565b60ff1610156126c8576040517fa3ba5940000000000000000000000000000000000000000000000000000000008152600260048201526024016104bc565b600485015474010000000000000000000000000000000000000000900460ff168484848181106126fa576126fa6139dd565b905060200201602081019061270f9190613b87565b60ff16111561279f5783838381811061272a5761272a6139dd565b905060200201602081019061273f9190613b87565b6004868101546040517f19d4d53500000000000000000000000000000000000000000000000000000000815260ff9384169281019290925274010000000000000000000000000000000000000000900490911660248201526044016104bc565b8454156112c1576000805b865481101561280b578660000181815481106127c8576127c86139dd565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1633036127f9576001915061280b565b8061280381613a3b565b9150506127aa565b5080612843576040517ff24448dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b60018260ff16101561288c576040517f1e37933c000000000000000000000000000000000000000000000000000000008152600060048201526024016104bc565b6128968480613958565b90506000036128dc57846000036128dc576040517f1e37933c000000000000000000000000000000000000000000000000000000008152600260048201526024016104bc565b600080546040517fc6ee427f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063c6ee427f90612933908590600401613a8a565b602060405180830381865afa158015612950573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129749190613a98565b905085156129cc5773ffffffffffffffffffffffffffffffffffffffff81166129cc576040517f1e37933c000000000000000000000000000000000000000000000000000000008152600160048201526024016104bc565b60016129d88580613958565b90501015612a15576040517f1e37933c000000000000000000000000000000000000000000000000000000008152600360048201526024016104bc565b612a226020850185613958565b9050612a2e8580613958565b905014612a69576040517f1e37933c0000000000000000000000000000000000000000000000000000000081526004818101526024016104bc565b6000612a80612a7b6020870187613958565b612c29565b905060648160ff1610612ac2576040517f1e37933c000000000000000000000000000000000000000000000000000000008152600560048201526024016104bc565b50505050505050565b600481015473ffffffffffffffffffffffffffffffffffffffff161561205d576040517fc8d551cc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b7f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c8c9092919063ffffffff16565b8051909150156104d15780806020019051810190612b9d9190613fe6565b6104d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104bc565b600081815b8160ff168160ff161015612c845784848260ff16818110612c5157612c516139dd565b9050602002016020810190612c669190613b87565b612c709084613ab5565b925080612c7c81613b52565b915050612c2e565b505092915050565b6060612c9b8484600085612ca5565b90505b9392505050565b606082471015612d37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104bc565b843b612d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104bc565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612dc89190614008565b60006040518083038185875af1925050503d8060008114612e05576040519150601f19603f3d011682016040523d82523d6000602084013e612e0a565b606091505b5091509150612e1a828286612e25565b979650505050505050565b60608315612e34575081612c9e565b825115612e445782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bc919061401a565b828054828255906000526020600020908101928215612ef0579160200282015b82811115612ef05781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190612e98565b50612efc929150613085565b5090565b82805482825590600052602060002090601f01602090048101928215612ef05791602002820160005b83821115612f6a57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302612f29565b8015612f975782816101000a81549060ff0219169055600101602081600001049283019260010302612f6a565b5050612efc929150613085565b828054828255906000526020600020908101928215612ef0579160200282015b82811115612ef057825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612fc4565b82805482825590600052602060002090601f01602090048101928215612ef05791602002820160005b83821115612f6a57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613047565b5b80821115612efc5760008155600101613086565b6000602082840312156130ac57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c9e57600080fd5b60008083601f8401126130ee57600080fd5b50813567ffffffffffffffff81111561310657600080fd5b6020830191508360208260051b850101111561312157600080fd5b9250929050565b6000806020838503121561313b57600080fd5b823567ffffffffffffffff81111561315257600080fd5b61315e858286016130dc565b90969095509350505050565b60006060828403121561317c57600080fd5b50919050565b60006020828403121561319457600080fd5b813567ffffffffffffffff8111156131ab57600080fd5b6122e48482850161316a565b6000806000806000606086880312156131cf57600080fd5b853567ffffffffffffffff808211156131e757600080fd5b6131f389838a0161316a565b9650602088013591508082111561320957600080fd5b61321589838a016130dc565b9096509450604088013591508082111561322e57600080fd5b5061323b888289016130dc565b969995985093965092949392505050565b60006020828403121561325e57600080fd5b5035919050565b6000806000806040858703121561327b57600080fd5b843567ffffffffffffffff8082111561329357600080fd5b61329f888389016130dc565b909650945060208701359150808211156132b857600080fd5b506132c5878288016130dc565b95989497509550505050565b600081518084526020808501945080840160005b8381101561331757815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016132e5565b509495945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60078110613388577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b608081526000835160e060808401526133a96101608401826132d1565b90506020808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808584030160a08601528051604084526133ee60408501826132d1565b9183015184830394840194909452508251808252908201928201906000905b8082101561343057825160ff16855293830193918301916001919091019061340d565b505050604086015160c0850152606086015173ffffffffffffffffffffffffffffffffffffffff1660e0850152608086015160ff1661010085015260a086015161347e610120860182613351565b5060c0860151801515610140860152508192506134d081850186805173ffffffffffffffffffffffffffffffffffffffff16825260208082015163ffffffff169083015260409081015160ff16910152565b50509392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461205d57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561354d5761354d6134fb565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561359a5761359a6134fb565b604052919050565b600067ffffffffffffffff8211156135bc576135bc6134fb565b5060051b60200190565b600082601f8301126135d757600080fd5b813560206135ec6135e7836135a2565b613553565b82815260059290921b8401810191818101908684111561360b57600080fd5b8286015b84811015613626578035835291830191830161360f565b509695505050505050565b600082601f83011261364257600080fd5b813567ffffffffffffffff81111561365c5761365c6134fb565b61368d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613553565b8181528460208386010111156136a257600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156136d757600080fd5b85356136e2816134d9565b945060208601356136f2816134d9565b9350604086013567ffffffffffffffff8082111561370f57600080fd5b61371b89838a016135c6565b9450606088013591508082111561373157600080fd5b61373d89838a016135c6565b9350608088013591508082111561375357600080fd5b5061376088828901613631565b9150509295509295909350565b60008060006040848603121561378257600080fd5b833567ffffffffffffffff8082111561379a57600080fd5b6137a68783880161316a565b945060208601359150808211156137bc57600080fd5b506137c9868287016130dc565b9497909650939450505050565b600080600080600080600080600080600060c08c8e0312156137f757600080fd5b67ffffffffffffffff808d35111561380e57600080fd5b61381b8e8e358f0161316a565b9b508060208e0135111561382e57600080fd5b61383e8e60208f01358f016130dc565b909b50995060408d013581101561385457600080fd5b6138648e60408f01358f016130dc565b909950975060608d013581101561387a57600080fd5b61388a8e60608f01358f016130dc565b909750955060808d01358110156138a057600080fd5b6138b08e60808f01358f016130dc565b909550935060a08d01358110156138c657600080fd5b506138d78d60a08e01358e016130dc565b81935080925050509295989b509295989b9093969950565b600080600080600060a0868803121561390757600080fd5b8535613912816134d9565b94506020860135613922816134d9565b93506040860135925060608601359150608086013567ffffffffffffffff81111561394c57600080fd5b61376088828901613631565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261398d57600080fd5b83018035915067ffffffffffffffff8211156139a857600080fd5b6020019150600581901b360382131561312157600080fd5b6000602082840312156139d257600080fd5b8135612c9e816134d9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613a6c57613a6c613a0c565b5060010190565b600082821015613a8557613a85613a0c565b500390565b602081016104418284613351565b600060208284031215613aaa57600080fd5b8151612c9e816134d9565b600060ff821660ff84168060ff03821115613ad257613ad2613a0c565b019392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613b1257613b12613a0c565b500290565b600082613b4d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060ff821660ff8103613b6857613b68613a0c565b60010192915050565b803560ff81168114613b8257600080fd5b919050565b600060208284031215613b9957600080fd5b612c9e82613b71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1833603018112613bd657600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613bd657600080fd5b600060208284031215613c2657600080fd5b813560078110612c9e57600080fd5b600082601f830112613c4657600080fd5b81356020613c566135e7836135a2565b82815260059290921b84018101918181019086841115613c7557600080fd5b8286015b8481101561362657613c8a81613b71565b8352918301918301613c79565b600060408236031215613ca957600080fd5b613cb161352a565b823567ffffffffffffffff80821115613cc957600080fd5b9084019036601f830112613cdc57600080fd5b81356020613cec6135e7836135a2565b82815260059290921b84018101918181019036841115613d0b57600080fd5b948201945b83861015613d32578535613d23816134d9565b82529482019490820190613d10565b86525086810135935082841115613d4857600080fd5b613d5436858901613c35565b908501525091949350505050565b8183526000602080850194508260005b85811015613317578135613d85816134d9565b73ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613d72565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613de257600080fd5b830160208101925035905067ffffffffffffffff811115613e0257600080fd5b8060051b360382131561312157600080fd5b8781526000602060c081840152613e2f60c08401898b613d62565b8381036040850152613e418889613dad565b60408352613e53604084018284613d62565b915050613e62838a018a613dad565b83830393850193909352828252908301916000905b80821015613ea15760ff613e8a84613b71565b168452928401929184019160019190910190613e77565b50505060ff871660608501529150613eb69050565b613ec36080830185613351565b8260a083015298975050505050505050565b600081518084526020808501945080840160005b8381101561331757815187529582019590820190600101613ee9565b60005b83811015613f20578181015183820152602001613f08565b838111156119355750506000910152565b60008151808452613f49816020860160208601613f05565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a06040830152613fb460a0830186613ed5565b8281036060840152613fc68186613ed5565b90508281036080840152613fda8185613f31565b98975050505050505050565b600060208284031215613ff857600080fd5b81518015158114612c9e57600080fd5b60008251613bd6818460208701613f05565b602081526000612c9e6020830184613f3156fea2646970667358221220c09892481cd63648ea4abf22645215499b7d890ab2af1d733f5dea83948ee93a64736f6c634300080e003300000000000000000000000023f7f8b03baf01d5124255fe240e81bbbd3aec0d000000000000000000000000000000045232fe75a3c7db3e5b03b0ab6166f425

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

00000000000000000000000023f7f8b03baf01d5124255fe240e81bbbd3aec0d000000000000000000000000000000045232fe75a3c7db3e5b03b0ab6166f425

-----Decoded View---------------
Arg [0] : newResolver (address): 0x23f7f8b03baf01d5124255fe240e81bbbd3aec0d
Arg [1] : newAdmin (address): 0x000000045232fe75a3c7db3e5b03b0ab6166f425

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000023f7f8b03baf01d5124255fe240e81bbbd3aec0d
Arg [1] : 000000000000000000000000000000045232fe75a3c7db3e5b03b0ab6166f425


Deployed ByteCode Sourcemap

74788:17386:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31219:223;;;;;;;;;;-1:-1:-1;31219:223:0;;;;;:::i;:::-;;:::i;:::-;;;612:14:1;;605:22;587:41;;575:2;560:18;31219:223:0;;;;;;;;91611:234;;;;;;;;;;-1:-1:-1;91611:234:0;;;;;:::i;:::-;;:::i;:::-;;81809:1081;;;;;;;;;;-1:-1:-1;81809:1081:0;;;;;:::i;:::-;;:::i;90906:83::-;;;;;;;;;;;;;:::i;92095:76::-;;;;;;;;;;;;;:::i;82951:3284::-;;;;;;;;;;-1:-1:-1;82951:3284:0;;;;;:::i;:::-;;:::i;75768:26::-;;;;;;;;;;-1:-1:-1;75768:26:0;;;;;;;;91853:234;;;;;;;;;;-1:-1:-1;91853:234:0;;;;;:::i;:::-;;:::i;81111:662::-;;;;;;;;;;-1:-1:-1;81111:662:0;;;;;:::i;:::-;;:::i;90997:98::-;;;;;;;;;;-1:-1:-1;90997:98:0;;;;;:::i;:::-;;:::i;91103:500::-;;;;;;;;;;-1:-1:-1;91103:500:0;;;;;:::i;:::-;;:::i;75926:57::-;;;;;;;;;;-1:-1:-1;75926:57:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;31852:255::-;;;;;;;;;;-1:-1:-1;31852:255:0;;;;;:::i;:::-;32063:36;31852:255;;;;;;;;;;;11240:66:1;11228:79;;;11210:98;;11198:2;11183:18;31852:255:0;11066:248:1;75891:26:0;;;;;;;;;;;;;;;;;;;11465:25:1;;;11453:2;11438:18;75891:26:0;11319:177:1;79622:1453:0;;;;;;:::i;:::-;;:::i;77255:2331::-;;;;;;;;;;-1:-1:-1;77255:2331:0;;;;;:::i;:::-;;:::i;31617:227::-;;;;;;;;;;-1:-1:-1;31617:227:0;;;;;:::i;:::-;31805:31;31617:227;;;;;;;;31219:223;31321:4;31345:49;;;31360:34;31345:49;;:89;;-1:-1:-1;31003:25:0;30988:40;;;;31398:36;31338:96;31219:223;-1:-1:-1;;31219:223:0:o;91611:234::-;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;;;;;;;;76024:105;91807:30:::1;:12;91822:15:::0;;91807:30:::1;:::i;:::-;;91611:234:::0;;:::o;81809:1081::-;76552:6;;;;76548:54;;;76582:8;;;;;;;;;;;;;;76548:54;81891:9:::1;81886:772;81910:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;:20;;81906:1;:24;81886:772;;;81952:18;82040:8;;::::0;::::1;:4:::0;:8:::1;:::i;:::-;82071:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;82085:1;82071:16;;;;;;;:::i;:::-;;;;;;;82110:4;:15;;;;;;;;:::i;:::-;82126:1;82110:18;;;;;;;:::i;:::-;;;;;;;82001:146;;;;;;;;;16437:2:1::0;16433:15;;;;16450:66;16429:88;16417:101;;16543:2;16534:12;;16527:28;;;;16580:2;16571:12;;16564:28;16617:2;16608:12;;16211:415;82001:146:0::1;;::::0;;;;;::::1;::::0;;;;;;81973:189;;82001:146:::1;81973:189:::0;;::::1;::::0;82177:27:::1;82207::::0;;;:15:::1;:27:::0;;;;;81973:189;;-1:-1:-1;82251:30:0::1;82207:27:::0;82251:28:::1;:30::i;:::-;82296:27;:4;:12;;:25;:27::i;:::-;82338:31;:4:::0;:29:::1;:31::i;:::-;82555:21;::::0;::::1;:28:::0;;;::::1;::::0;::::1;::::0;;82626:15:::1;;::::0;::::1;:4:::0;:15:::1;:::i;:::-;82642:1;82626:18;;;;;;;:::i;:::-;;;;;;;82605:41;;;;;;;;;;81937:721;;81932:3;;;;;:::i;:::-;;;;81886:772;;;-1:-1:-1::0;82670:12:0::1;82685:118;82734:4;82754:10;82779:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;82685:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;82685:8:0::1;::::0;-1:-1:-1;;;82685:8:0::1;::::0;::::1;::::0;::::1;:::i;:::-;:26;;::::0;:118;;:26:::1;:118::i;:::-;82670:133;;82821:7;82816:67;;82852:19;;;;;;;;;;;;;;82816:67;81875:1015;81809:1081:::0;:::o;90906:83::-;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;14909:226:1;76024:105:0;90963:5:::1;:18:::0;;;::::1;::::0;;90906:83::o;92095:76::-;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;14909:226:1;76024:105:0;92157:6:::1;::::0;;92147:16;;::::1;92157:6;::::0;;::::1;92156:7;92147:16;::::0;;92095:76::o;82951:3284::-;76552:6;;;;76548:54;;;76582:8;;;;;;;;;;;;;;76548:54;83303:11:::1;83338:9:::0;83333:249:::1;83357:12;:19:::0;83353:23;::::1;83333:249;;;83482:12;83495:1;83482:15;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;::::1;;83469:9;:28:::0;83465:106:::1;;83527:4;83518:13;;83550:5;;83465:106;83378:3:::0;::::1;::::0;::::1;:::i;:::-;;;;83333:249;;;;83597:6;83592:60;;83627:13;::::0;::::1;::::0;;83638:1:::1;83627:13;::::0;::::1;17172:36:1::0;17145:18;;83627:13:0::1;17020:194:1::0;83592:60:0::1;83870:14;83893:15;;::::0;::::1;:4:::0;:15:::1;:::i;:::-;:22;;83870:46;;83932:7;83927:2301;83949:8;83945:12;;:1;:12;;;83927:2301;;;84062:27;84092:15;84062:27:::0;84201:8:::1;;::::0;::::1;:4:::0;:8:::1;:::i;:::-;84236:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;84250:1;84236:16;;;;;;;;;:::i;:::-;;;;;;;84279:4;:15;;;;;;;;:::i;:::-;84295:1;84279:18;;;;;;;;;:::i;:::-;;;;;;;84158:162;;;;;;;;;16437:2:1::0;16433:15;;;;16450:66;16429:88;16417:101;;16543:2;16534:12;;16527:28;;;;16580:2;16571:12;;16564:28;16617:2;16608:12;;16211:415;84158:162:0::1;;;;;;;;;;;;;84126:213;;;;;;84092:262;;;;;;;;;;;84062:292;;84467:16;84486:50;84494:11;;84506:1;84494:14;;;;;;;;;:::i;:::-;;;;;;;84510:4;:12;;:25;;;;;;;;;;;;84486:7;:50::i;:::-;84467:69;;84551:20;84591:8;84574:11;;84586:1;84574:14;;;;;;;;;:::i;:::-;;;;;;;:25;;;;:::i;:::-;84637:22;::::0;::::1;:43:::0;84614:14:::1;84784:8:::0;;84809:25:::1;::::0;;::::1;::::0;84784:51:::1;::::0;;;;84551:48;;-1:-1:-1;84637:43:0;;84614:14;;;;;;84784:8:::1;;::::0;:24:::1;::::0;:51:::1;::::0;84809:25;;;::::1;;;::::0;84784:51:::1;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;84761:74;;84984:7;84979:712;85001:8;84997:12;;:1;:12;;;84979:712;;;85042:31:::0;;;:34;;::::1;::::0;::::1;::::0;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;85035:41;;;;;:::i;:::-;85124:31:::0;;;:34;;85035:41;;-1:-1:-1;85162:3:0::1;::::0;85124:34:::1;::::0;::::1;::::0;;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;;;::::1;::::0;;::::1;::::0;85109:49:::1;::::0;85124:34;;::::1;;::::0;::::1;;;85109:12:::0;:49:::1;:::i;:::-;85108:57;;;;:::i;:::-;85095:70:::0;-1:-1:-1;85188:15:0;;85184:492:::1;;85327:22;::::0;::::1;:39:::0;;85228:198:::1;::::0;85291:9:::1;::::0;85327:39:::1;::::0;::::1;::::0;;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;::::1;85228:36:::0;;::::1;::::0;:198;85327:39:::1;85393:10:::0;85228:36:::1;:198::i;:::-;85495:22;::::0;::::1;:39:::0;;85622:10;;85454:202:::1;::::0;::::1;::::0;85495:39:::1;::::0;::::1;::::0;;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;::::1;::::0;85454:202:::1;::::0;85495:39:::1;::::0;;::::1;::::0;85454:202:::1;::::0;::::1;85184:492;85011:3:::0;::::1;::::0;::::1;:::i;:::-;;;;84979:712;;;-1:-1:-1::0;85811:3:0::1;85788:18;85794:12;::::0;::::1;85811:3:::0;85788:18:::1;:::i;:::-;85772:35;::::0;:12;:35:::1;:::i;:::-;85771:43;;;;:::i;:::-;85758:56:::0;-1:-1:-1;85833:15:0;;85829:388:::1;;85869:152;85928:9;85960:6;;85967:1;85960:9;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;85869:36;::::0;::::1;::::0;:152;85992:10;85869:36:::1;:152::i;:::-;86122:10;86169:12;86045:156;;86082:6;;86089:1;86082:9;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;86045:156;;;;;;;;;;;;85829:388;83964:2264;;;;;;;83959:3;;;;;:::i;:::-;;;;83927:2301;;;;83113:3122;;82951:3284:::0;;;;;:::o;91853:234::-;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;14909:226:1;76024:105:0;92049:30:::1;:12;92064:15:::0;;92049:30:::1;:::i;81111:662::-:0;76552:6;;;;76548:54;;;76582:8;;;;;;;;;;;;;;76548:54;76195:12:::1;76231:9:::0;76226:184:::1;76250:12;:19:::0;76246:23;::::1;76226:184;;;76309:12;76322:1;76309:15;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;::::1;;76295:10;:29:::0;76291:108:::1;;76355:4;76345:14;;76378:5;;76291:108;76271:3:::0;::::1;::::0;::::1;:::i;:::-;;;;76226:184;;;;76425:7;76420:69;;76456:21;;;;;;;;;;;;;;76420:69;81210:9:::2;81205:561;81229:13;;::::0;::::2;:4:::0;:13:::2;:::i;:::-;:20;;81225:1;:24;81205:561;;;81271:27;81301:15;81271:27:::0;81410:8:::2;;::::0;::::2;:4:::0;:8:::2;:::i;:::-;81445:13;;::::0;::::2;:4:::0;:13:::2;:::i;:::-;81459:1;81445:16;;;;;;;:::i;:::-;;;;;;;81488:4;:15;;;;;;;;:::i;:::-;81504:1;81488:18;;;;;;;:::i;:::-;;;;;;;81367:162;;;;;;;;;16437:2:1::0;16433:15;;;;16450:66;16429:88;16417:101;;16543:2;16534:12;;16527:28;;;;16580:2;16571:12;;16564:28;16617:2;16608:12;;16211:415;81367:162:0::2;;;;;;;;;;;;;81335:213;;;;;;81301:262;;;;;;;;;;;81271:292;;81580:30;:4;:12;;:28;:30::i;:::-;81625;:4;:12;;:28;:30::i;:::-;81679:12;::::0;::::2;81672:19:::0;;;;;;81734:15:::2;;::::0;::::2;:4:::0;:15:::2;:::i;:::-;81750:1;81734:18;;;;;;;:::i;:::-;;;;;;;81713:41;;;;;;;;;;-1:-1:-1::0;81251:3:0;::::2;::::0;::::2;:::i;:::-;;;;81205:561;;90997:98:::0;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;14909:226:1;76024:105:0;91067:7:::1;:20:::0;90997:98::o;91103:500::-;76042:5;;;;76028:10;:19;;;;:45;;-1:-1:-1;76065:8:0;;;;76051:10;:22;;76028:45;76024:105;;;76097:20;;;;;76106:10;76097:20;;;15055:74:1;15028:18;;76097:20:0;14909:226:1;76024:105:0;91357:32:::1;91374:14;;91357:16;:32::i;:::-;91404:47:::0;;::::1;91400:116;;91475:29;;;;;;;;;;;;;;91400:116;91526:30;:12;91541:15:::0;;91526:30:::1;:::i;:::-;-1:-1:-1::0;91567:28:0::1;:11;91581:14:::0;;91567:28:::1;:::i;:::-;;91103:500:::0;;;;:::o;75926:57::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;75926:57:0;;;;-1:-1:-1;;;75926:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;79622:1453::-;76552:6;;;;76548:54;;;76582:8;;;;;;;;;;;;;;76548:54;79740:9:::1;79735:1333;79759:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;:20;;79755:1;:24;79735:1333;;;79801:27;79831:15;79801:27:::0;79940:8:::1;;::::0;::::1;:4:::0;:8:::1;:::i;:::-;79975:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;79989:1;79975:16;;;;;;;:::i;:::-;;;;;;;80018:4;:15;;;;;;;;:::i;:::-;80034:1;80018:18;;;;;;;:::i;:::-;;;;;;;79897:162;;;;;;;;;16437:2:1::0;16433:15;;;;16450:66;16429:88;16417:101;;16543:2;16534:12;;16527:28;;;;16580:2;16571:12;;16564:28;16617:2;16608:12;;16211:415;79897:162:0::1;;;;;;;;;;;;;79865:213;;;;;;79831:262;;;;;;;;;;;79801:292;;80186:4;:12;;:27;;;80217:1;80186:32;80182:343;;80239:14;80262:8:::0;;80287:25:::1;::::0;;::::1;::::0;80262:51:::1;::::0;;;;:8:::1;::::0;;::::1;::::0;:24:::1;::::0;:51:::1;::::0;80287:25;;::::1;;;::::0;80262:51:::1;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;80414:26;::::0;::::1;::::0;80463:27:::1;::::0;::::1;::::0;80239:75;;-1:-1:-1;80333:176:0::1;::::0;80414:26:::1;80333:25:::0;;::::1;::::0;80381:10:::1;::::0;80414:26;::::1;::::0;80333:25:::1;:176::i;:::-;80220:305;80182:343;80541:30;:4:::0;:28:::1;:30::i;:::-;80586:27;:4;:12;;:25;:27::i;:::-;80628:58;:4:::0;80657:13;;80672:1;80675:10:::1;80628:28;:58::i;:::-;80703:12;::::0;::::1;:48:::0;;;::::1;80740:10;80703:48;::::0;;80794:13;;80808:1;80794:16;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;80766:12;::::0;::::1;:44:::0;;80825:47;;80766:44;::::1;::::0;;;::::1;::::0;;;::::1;80825:47:::0;;;;;;;80856:15:::1;80825:47;;;;::::0;;80981:10:::1;80929:15;;::::0;::::1;::::0;::::1;:::i;:::-;80945:1;80929:18;;;;;;;:::i;:::-;;;;;;;80894:162;81024:13;;81038:1;81024:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;80894:162;::::0;17202:4:1;17190:17;;;17172:36;;17160:2;17145:18;80894:162:0::1;;;;;;;-1:-1:-1::0;79781:3:0;::::1;::::0;::::1;:::i;:::-;;;;79735:1333;;;;79622:1453:::0;;;:::o;77255:2331::-;76552:6;;;;76548:54;;;76582:8;;;;;;;;;;;;;;76548:54;77586:9:::1;77581:1773;77605:13;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;:20;;77601:1;:24;77581:1773;;;77831:206;77865:14;;77880:1;77865:17;;;;;;;:::i;:::-;;;;;;;77901:14;;77916:1;77901:17;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;77937:9;;77947:1;77937:12;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;77968:16;;77985:1;77968:19;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;78006:13;;78020:1;78006:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;77831:15;:206::i;:::-;78054:27;78084:15;:253;78193:4;:8;;;;;;;;;;:::i;:::-;78228:4;:13;;;;;;;;:::i;:::-;78242:1;78228:16;;;;;;;:::i;:::-;;;;;;;78271:9;;78150:153;;;;;;;;;16437:2:1::0;16433:15;;;;16450:66;16429:88;16417:101;;16543:2;16534:12;;16527:28;;;;16580:2;16571:12;;16564:28;16617:2;16608:12;;16211:415;78150:153:0::1;;;;;;;;;;;;;78118:204;;;;;;78084:253;;;;;;;;;;;78054:283;;78354:27;:4;:12;;:25;:27::i;:::-;78396;:4;:12;;:25;:27::i;:::-;78455:376;;;;;;;;78603:14;;78618:1;78603:17;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:32;::::0;;::::1;:::i;:::-;78455:376;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;;;78455:376:0;;;-1:-1:-1;78455:376:0::1;;78665:9:::0;;78675:1;78665:12;;::::1;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;78455:376;;;:::i;:::-;;;;;78551:14;;78566:1;78551:17;;;;;;;:::i;:::-;;;;;;;78455:376;;;;78505:10;78455:376;;;;;;78713:16;;78730:1;78713:19;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;78455:376;;;;;;78799:13;;78813:1;78799:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;78455:376;;;;;;;;:::i;:::-;::::0;;78761:5:::1;78455:376;::::0;;::::1;::::0;78440:391;;;;:4;;:391:::1;::::0;:4;;:391;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;78440:391:0::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;78440:391:0::1;::::0;;::::1;::::0;;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;;78440:391:0::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;;::::0;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;;::::1;::::0;;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;78440:391:0::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;78934:13:::1;;::::0;::::1;:4:::0;:13:::1;:::i;:::-;78948:1;78934:16;;;;;;;:::i;:::-;;;;;;;79075:10;78853:461;;78897:4;:8;;;;;;;;;;:::i;:::-;78853:461;;;78985:14;;79000:1;78985:17;;;;;;;:::i;:::-;;;;;;;79120:14;;79135:1;79120:17;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:32;::::0;;::::1;:::i;:::-;79182:9;;79192:1;79182:12;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;79230:16;;79247:1;79230:19;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;79282:13;;79296:1;79282:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;79032:9;;78853:461;;;;;;;;;;;;:::i;:::-;;;;;;;;79331:9;:11:::0;;;:9:::1;:11;::::0;::::1;:::i;:::-;;;;;;77632:1722;77627:3;;;;;:::i;:::-;;;;77581:1773;;;;79366:12;79381:118;79422:10;79455:4;79475;:13;;;;;;;;:::i;:::-;79381:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:4;:8;;;;;;;;;;:::i;:118::-;79366:133;;79517:7;79512:67;;79548:19;;;;;;;;;;;;;;79512:67;77570:2016;77255:2331:::0;;;;;;;;;;;:::o;69283:178::-;69369:21;;;;:35;:21;69365:89;;69428:14;;;;;;;;;;;;;;69365:89;69283:178;:::o;71399:::-;71482:21;;:35;:21;:35;71478:92;;71541:17;;;;;;;;;;;;;;70824:308;70911:21;;;;:35;:21;70936:10;70911:35;70907:126;;70987:21;;;;;70970:51;;;;;70987:21;;;;70970:51;;;26196:34:1;;;;71010:10:0;26246:18:1;;;26239:43;26108:18;;70970:51:0;25953:335:1;70907:126:0;71047:16;;;;;;;;;:24;;71067:4;71047:24;71043:82;;71095:18;;;;;;;;;;;;;;64890:538;65048:4;65067:23;65107:7;:14;65093:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65093:29:0;;65067:55;;65138:9;65133:85;65157:7;:14;65153:1;:18;65133:85;;;65205:1;65193:6;65200:1;65193:9;;;;;;;;:::i;:::-;;;;;;;;;;:13;65173:3;;;;:::i;:::-;;;;65133:85;;;-1:-1:-1;65308:12:0;;;65318:1;65308:12;;;;;;;;;65255:66;;;;:25;;;;;;:66;;65281:4;;65287:2;;65291:7;;65300:6;;65255:66;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65251:170;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65404:5;65397:12;;;;;;65251:170;65344:4;65337:11;;;64890:538;;;;;;;:::o;86554:700::-;86649:11;86708:5;86697:7;;86680:14;:24;;;;:::i;:::-;86679:34;;;;:::i;:::-;86673:40;;86728:3;86735:1;86728:8;86724:49;;-1:-1:-1;86760:1:0;86753:8;;86724:49;86801:12;:19;86783:9;;86862:345;86884:3;86880:7;;:1;:7;;;86862:345;;;86944:3;86926:11;86938:1;86926:14;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;86920:20;;86926:14;;;;;;;;86920:3;:20;:::i;:::-;86919:28;;;;:::i;:::-;86909:38;-1:-1:-1;86966:12:0;;86962:234;;86999:181;87084:9;87116:12;87129:1;87116:15;;;;;;;;;;:::i;:::-;;;;;;;;;;87005:8;;:38;;;;;87116:15;;;;;87154:7;;87005:8;;:24;;:38;;87030:12;;87005:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;86999:62;;;:181;;:62;:181::i;:::-;86889:3;;;;:::i;:::-;;;;86862:345;;;;86662:592;;86554:700;;;;:::o;45254:248::-;45425:68;;;28383:42:1;28452:15;;;45425:68:0;;;28434:34:1;28504:15;;28484:18;;;28477:43;28536:18;;;;28529:34;;;45425:68:0;;;;;;;;;;28346:18:1;;;;45425:68:0;;;;;;;;;;45448:27;45425:68;;;45398:96;;45418:5;;45398:19;:96::i;71585:178::-;71671:21;;:35;:21;71667:89;;71730:14;;;;;;;;;;;;;;90680:197;90757:9;90769:20;90780:8;;90769:10;:20::i;:::-;90757:32;;90804:3;:10;;90811:3;90804:10;90800:70;;90838:20;;;;;;;;;;;;;;69469:1347;69660:16;;;;;;;;;:24;;69680:4;69660:24;69656:78;;69708:14;;;;;69720:1;69708:14;;;17172:36:1;17145:18;;69708:14:0;17020:194:1;69656:78:0;69761:21;;;;;;;;69748:34;;;;69744:88;;69806:14;;;;;69818:1;69806:14;;;17172:36:1;17145:18;;69806:14:0;17020:194:1;69744:88:0;69914:1;69895:13;;69909:1;69895:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:20;;;69891:74;;;69939:14;;;;;69951:1;69939:14;;;17172:36:1;17145:18;;69939:14:0;17020:194:1;69891:74:0;70072:23;;;;;;;;;70053:13;;70067:1;70053:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:42;;;70049:208;;;70172:13;;70186:1;70172:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;70207:23;;;;;70119:126;;;;;70207:23;29156:17:1;;;70119:126:0;;;29138:36:1;;;;70207:23:0;;;;;;29190:18:1;;;29183:45;29111:18;;70119:126:0;28972:262:1;70049:208:0;70338:29;;:33;70334:475;;70447:12;70487:9;70482:224;70506:29;;70502:33;;70482:224;;;70579:7;:22;;70602:1;70579:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;70565:10;:39;70561:130;;70639:4;70629:14;;70666:5;;70561:130;70537:3;;;;:::i;:::-;;;;70482:224;;;;70725:7;70720:78;;70760:22;;;;;;;;;;;;;;70720:78;70373:436;69469:1347;;;;;:::o;87284:3141::-;87626:1;87608:15;:19;;;87604:73;;;87651:14;;;;;87663:1;87651:14;;;17172:36:1;17145:18;;87651:14:0;17020:194:1;87604:73:0;87693:29;:14;;:29;:::i;:::-;:36;;87733:1;87693:41;87689:248;;87849:14;87867:1;87849:19;87845:81;;87896:14;;;;;87908:1;87896:14;;;17172:36:1;17145:18;;87896:14:0;17020:194:1;87845:81:0;88867:24;88894:8;;:38;;;;;:8;;;;;:24;;:38;;88919:12;;88894:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88867:65;-1:-1:-1;89327:19:0;;89323:143;;89367:30;;;89363:92;;89425:14;;;;;89437:1;89425:14;;;17172:36:1;17145:18;;89425:14:0;17020:194:1;89363:92:0;89985:1;89952:23;:9;;:23;:::i;:::-;:30;;:34;89948:88;;;90010:14;;;;;90022:1;90010:14;;;17172:36:1;17145:18;;90010:14:0;17020:194:1;89948:88:0;90086:18;;;;:9;:18;:::i;:::-;:25;-1:-1:-1;90052:23:0;:9;;:23;:::i;:::-;:30;;:59;90048:113;;90135:14;;;;;90147:1;90135:14;;;17172:36:1;17145:18;;90135:14:0;17020:194:1;90048:113:0;90301:9;90313:30;90324:18;;;;:9;:18;:::i;:::-;90313:10;:30::i;:::-;90301:42;;90365:3;90358;:10;;;90354:64;;90392:14;;;;;90404:1;90392:14;;;17172:36:1;17145:18;;90392:14:0;17020:194:1;90354:64:0;87527:2898;;87284:3141;;;;;:::o;69097:178::-;69180:21;;;;:35;:21;:35;69176:92;;69239:17;;;;;;;;;;;;;;47608:716;48032:23;48058:69;48086:4;48058:69;;;;;;;;;;;;;;;;;48066:5;48058:27;;;;:69;;;;;:::i;:::-;48142:17;;48032:95;;-1:-1:-1;48142:21:0;48138:179;;48239:10;48228:30;;;;;;;;;;;;:::i;:::-;48220:85;;;;;;;30927:2:1;48220:85:0;;;30909:21:1;30966:2;30946:18;;;30939:30;31005:34;30985:18;;;30978:62;31076:12;31056:18;;;31049:40;31106:19;;48220:85:0;30725:406:1;90433:239:0;90502:9;90542:8;90502:9;90587:78;90609:3;90605:7;;:1;:7;;;90587:78;;;90642:8;;90651:1;90642:11;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;90635:18;;;;:::i;:::-;;-1:-1:-1;90614:4:0;;;;:::i;:::-;;;;90587:78;;;;90513:159;90433:239;;;;:::o;39984:229::-;40121:12;40153:52;40175:6;40183:4;40189:1;40192:12;40153:21;:52::i;:::-;40146:59;;39984:229;;;;;;:::o;41104:510::-;41274:12;41332:5;41307:21;:30;;41299:81;;;;;;;31338:2:1;41299:81:0;;;31320:21:1;31377:2;31357:18;;;31350:30;31416:34;31396:18;;;31389:62;31487:8;31467:18;;;31460:36;31513:19;;41299:81:0;31136:402:1;41299:81:0;37501:20;;41391:60;;;;;;;31745:2:1;41391:60:0;;;31727:21:1;31784:2;31764:18;;;31757:30;31823:31;31803:18;;;31796:59;31872:18;;41391:60:0;31543:353:1;41391:60:0;41465:12;41479:23;41506:6;:11;;41525:5;41532:4;41506:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41464:73;;;;41555:51;41572:7;41581:10;41593:12;41555:16;:51::i;:::-;41548:58;41104:510;-1:-1:-1;;;;;;;41104:510:0:o;43790:712::-;43940:12;43969:7;43965:530;;;-1:-1:-1;44000:10:0;43993:17;;43965:530;44114:17;;:21;44110:374;;44312:10;44306:17;44373:15;44360:10;44356:2;44352:19;44345:44;44110:374;44455:12;44448:20;;;;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:332:1;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;639:367;702:8;712:6;766:3;759:4;751:6;747:17;743:27;733:55;;784:1;781;774:12;733:55;-1:-1:-1;807:20:1;;850:18;839:30;;836:50;;;882:1;879;872:12;836:50;919:4;911:6;907:17;895:29;;979:3;972:4;962:6;959:1;955:14;947:6;943:27;939:38;936:47;933:67;;;996:1;993;986:12;933:67;639:367;;;;;:::o;1011:437::-;1097:6;1105;1158:2;1146:9;1137:7;1133:23;1129:32;1126:52;;;1174:1;1171;1164:12;1126:52;1214:9;1201:23;1247:18;1239:6;1236:30;1233:50;;;1279:1;1276;1269:12;1233:50;1318:70;1380:7;1371:6;1360:9;1356:22;1318:70;:::i;:::-;1407:8;;1292:96;;-1:-1:-1;1011:437:1;-1:-1:-1;;;;1011:437:1:o;1453:152::-;1510:5;1555:2;1546:6;1541:3;1537:16;1533:25;1530:45;;;1571:1;1568;1561:12;1530:45;-1:-1:-1;1593:6:1;1453:152;-1:-1:-1;1453:152:1:o;1610:350::-;1693:6;1746:2;1734:9;1725:7;1721:23;1717:32;1714:52;;;1762:1;1759;1752:12;1714:52;1802:9;1789:23;1835:18;1827:6;1824:30;1821:50;;;1867:1;1864;1857:12;1821:50;1890:64;1946:7;1937:6;1926:9;1922:22;1890:64;:::i;1965:1009::-;2128:6;2136;2144;2152;2160;2213:2;2201:9;2192:7;2188:23;2184:32;2181:52;;;2229:1;2226;2219:12;2181:52;2269:9;2256:23;2298:18;2339:2;2331:6;2328:14;2325:34;;;2355:1;2352;2345:12;2325:34;2378:64;2434:7;2425:6;2414:9;2410:22;2378:64;:::i;:::-;2368:74;;2495:2;2484:9;2480:18;2467:32;2451:48;;2524:2;2514:8;2511:16;2508:36;;;2540:1;2537;2530:12;2508:36;2579:72;2643:7;2632:8;2621:9;2617:24;2579:72;:::i;:::-;2670:8;;-1:-1:-1;2553:98:1;-1:-1:-1;2758:2:1;2743:18;;2730:32;;-1:-1:-1;2774:16:1;;;2771:36;;;2803:1;2800;2793:12;2771:36;;2842:72;2906:7;2895:8;2884:9;2880:24;2842:72;:::i;:::-;1965:1009;;;;-1:-1:-1;1965:1009:1;;-1:-1:-1;2933:8:1;;2816:98;1965:1009;-1:-1:-1;;;1965:1009:1:o;2979:180::-;3038:6;3091:2;3079:9;3070:7;3066:23;3062:32;3059:52;;;3107:1;3104;3097:12;3059:52;-1:-1:-1;3130:23:1;;2979:180;-1:-1:-1;2979:180:1:o;3164:779::-;3292:6;3300;3308;3316;3369:2;3357:9;3348:7;3344:23;3340:32;3337:52;;;3385:1;3382;3375:12;3337:52;3425:9;3412:23;3454:18;3495:2;3487:6;3484:14;3481:34;;;3511:1;3508;3501:12;3481:34;3550:70;3612:7;3603:6;3592:9;3588:22;3550:70;:::i;:::-;3639:8;;-1:-1:-1;3524:96:1;-1:-1:-1;3727:2:1;3712:18;;3699:32;;-1:-1:-1;3743:16:1;;;3740:36;;;3772:1;3769;3762:12;3740:36;;3811:72;3875:7;3864:8;3853:9;3849:24;3811:72;:::i;:::-;3164:779;;;;-1:-1:-1;3902:8:1;-1:-1:-1;;;;3164:779:1:o;4273:492::-;4334:3;4372:5;4366:12;4399:6;4394:3;4387:19;4425:4;4454:2;4449:3;4445:12;4438:19;;4491:2;4484:5;4480:14;4512:1;4522:218;4536:6;4533:1;4530:13;4522:218;;;4601:13;;4616:42;4597:62;4585:75;;4680:12;;;;4715:15;;;;4558:1;4551:9;4522:218;;;-1:-1:-1;4756:3:1;;4273:492;-1:-1:-1;;;;;4273:492:1:o;4850:184::-;4902:77;4899:1;4892:88;4999:4;4996:1;4989:15;5023:4;5020:1;5013:15;5039:297;5123:1;5116:5;5113:12;5103:200;;5159:77;5156:1;5149:88;5260:4;5257:1;5250:15;5288:4;5285:1;5278:15;5103:200;5312:18;;5039:297::o;5627:1960::-;5884:3;5873:9;5866:22;5847:4;5923:6;5917:13;5967:4;5961:3;5950:9;5946:19;5939:33;5995:71;6061:3;6050:9;6046:19;6032:12;5995:71;:::i;:::-;5981:85;;6085:4;6138:2;6130:6;6126:15;6120:22;6207:66;6195:9;6187:6;6183:22;6179:95;6173:3;6162:9;6158:19;6151:124;6312:14;6306:21;6351:4;6343:6;6336:20;6379:71;6444:4;6436:6;6432:17;6416:14;6379:71;:::i;:::-;6487:23;;;6481:30;6544:19;;;6527:15;;;6520:44;;;;-1:-1:-1;6613:21:1;;6643:22;;;6681:15;;;;6719:23;;;6760:1;;6770:180;6784:6;6781:1;6778:13;6770:180;;;6849:13;;6864:4;6845:24;6833:37;;6890:12;;;;6925:15;;;;6806:1;6799:9;;;;;6770:180;;;-1:-1:-1;;;7005:4:1;6993:17;;6987:24;6981:3;6966:19;;6959:53;7061:4;7049:17;;7043:24;4218:42;4207:54;7134:4;7119:20;;4195:67;7189:3;7177:16;;7171:23;4837:4;4826:16;7251:3;7236:19;;4814:29;7305:3;7293:16;;7287:23;7319:65;7379:3;7364:19;;7287:23;7319:65;:::i;:::-;-1:-1:-1;7433:3:1;7421:16;;7415:23;421:13;;414:21;7494:3;7479:19;;402:34;7447:52;7516:3;7508:11;;7528:53;7577:2;7566:9;7562:18;7554:6;5418:12;;5432:42;5414:61;5402:74;;5529:4;5518:16;;;5512:23;5537:10;5508:40;5492:14;;;5485:64;5602:4;5591:16;;;5585:23;5610:4;5581:34;5565:14;;5558:58;5341:281;7528:53;;;5627:1960;;;;;:::o;7592:154::-;7678:42;7671:5;7667:54;7660:5;7657:65;7647:93;;7736:1;7733;7726:12;7751:184;7803:77;7800:1;7793:88;7900:4;7897:1;7890:15;7924:4;7921:1;7914:15;7940:257;8012:4;8006:11;;;8044:17;;8091:18;8076:34;;8112:22;;;8073:62;8070:88;;;8138:18;;:::i;:::-;8174:4;8167:24;7940:257;:::o;8202:334::-;8273:2;8267:9;8329:2;8319:13;;8334:66;8315:86;8303:99;;8432:18;8417:34;;8453:22;;;8414:62;8411:88;;;8479:18;;:::i;:::-;8515:2;8508:22;8202:334;;-1:-1:-1;8202:334:1:o;8541:183::-;8601:4;8634:18;8626:6;8623:30;8620:56;;;8656:18;;:::i;:::-;-1:-1:-1;8701:1:1;8697:14;8713:4;8693:25;;8541:183::o;8729:662::-;8783:5;8836:3;8829:4;8821:6;8817:17;8813:27;8803:55;;8854:1;8851;8844:12;8803:55;8890:6;8877:20;8916:4;8940:60;8956:43;8996:2;8956:43;:::i;:::-;8940:60;:::i;:::-;9034:15;;;9120:1;9116:10;;;;9104:23;;9100:32;;;9065:12;;;;9144:15;;;9141:35;;;9172:1;9169;9162:12;9141:35;9208:2;9200:6;9196:15;9220:142;9236:6;9231:3;9228:15;9220:142;;;9302:17;;9290:30;;9340:12;;;;9253;;9220:142;;;-1:-1:-1;9380:5:1;8729:662;-1:-1:-1;;;;;;8729:662:1:o;9396:589::-;9438:5;9491:3;9484:4;9476:6;9472:17;9468:27;9458:55;;9509:1;9506;9499:12;9458:55;9545:6;9532:20;9571:18;9567:2;9564:26;9561:52;;;9593:18;;:::i;:::-;9637:114;9745:4;9676:66;9669:4;9665:2;9661:13;9657:86;9653:97;9637:114;:::i;:::-;9776:2;9767:7;9760:19;9822:3;9815:4;9810:2;9802:6;9798:15;9794:26;9791:35;9788:55;;;9839:1;9836;9829:12;9788:55;9904:2;9897:4;9889:6;9885:17;9878:4;9869:7;9865:18;9852:55;9952:1;9927:16;;;9945:4;9923:27;9916:38;;;;9931:7;9396:589;-1:-1:-1;;;9396:589:1:o;9990:1071::-;10144:6;10152;10160;10168;10176;10229:3;10217:9;10208:7;10204:23;10200:33;10197:53;;;10246:1;10243;10236:12;10197:53;10285:9;10272:23;10304:31;10329:5;10304:31;:::i;:::-;10354:5;-1:-1:-1;10411:2:1;10396:18;;10383:32;10424:33;10383:32;10424:33;:::i;:::-;10476:7;-1:-1:-1;10534:2:1;10519:18;;10506:32;10557:18;10587:14;;;10584:34;;;10614:1;10611;10604:12;10584:34;10637:61;10690:7;10681:6;10670:9;10666:22;10637:61;:::i;:::-;10627:71;;10751:2;10740:9;10736:18;10723:32;10707:48;;10780:2;10770:8;10767:16;10764:36;;;10796:1;10793;10786:12;10764:36;10819:63;10874:7;10863:8;10852:9;10848:24;10819:63;:::i;:::-;10809:73;;10935:3;10924:9;10920:19;10907:33;10891:49;;10965:2;10955:8;10952:16;10949:36;;;10981:1;10978;10971:12;10949:36;;11004:51;11047:7;11036:8;11025:9;11021:24;11004:51;:::i;:::-;10994:61;;;9990:1071;;;;;;;;:::o;11501:684::-;11618:6;11626;11634;11687:2;11675:9;11666:7;11662:23;11658:32;11655:52;;;11703:1;11700;11693:12;11655:52;11743:9;11730:23;11772:18;11813:2;11805:6;11802:14;11799:34;;;11829:1;11826;11819:12;11799:34;11852:64;11908:7;11899:6;11888:9;11884:22;11852:64;:::i;:::-;11842:74;;11969:2;11958:9;11954:18;11941:32;11925:48;;11998:2;11988:8;11985:16;11982:36;;;12014:1;12011;12004:12;11982:36;;12053:72;12117:7;12106:8;12095:9;12091:24;12053:72;:::i;:::-;11501:684;;12144:8;;-1:-1:-1;12027:98:1;;-1:-1:-1;;;;11501:684:1:o;12190:1975::-;12530:6;12538;12546;12554;12562;12570;12578;12586;12594;12602;12610:7;12664:3;12652:9;12643:7;12639:23;12635:33;12632:53;;;12681:1;12678;12671:12;12632:53;12704:18;12762:2;12750:9;12737:23;12734:31;12731:51;;;12778:1;12775;12768:12;12731:51;12801:81;12874:7;12861:9;12848:23;12837:9;12833:39;12801:81;:::i;:::-;12791:91;;12931:2;12925;12914:9;12910:18;12897:32;12894:40;12891:60;;;12947:1;12944;12937:12;12891:60;12986:96;13074:7;13067:2;13056:9;13052:18;13039:32;13028:9;13024:48;12986:96;:::i;:::-;13101:8;;-1:-1:-1;13128:8:1;-1:-1:-1;13179:2:1;13164:18;;13151:32;13148:40;-1:-1:-1;13145:60:1;;;13201:1;13198;13191:12;13145:60;13240:96;13328:7;13321:2;13310:9;13306:18;13293:32;13282:9;13278:48;13240:96;:::i;:::-;13355:8;;-1:-1:-1;13382:8:1;-1:-1:-1;13433:2:1;13418:18;;13405:32;13402:40;-1:-1:-1;13399:60:1;;;13455:1;13452;13445:12;13399:60;13494:96;13582:7;13575:2;13564:9;13560:18;13547:32;13536:9;13532:48;13494:96;:::i;:::-;13609:8;;-1:-1:-1;13636:8:1;-1:-1:-1;13687:3:1;13672:19;;13659:33;13656:41;-1:-1:-1;13653:61:1;;;13710:1;13707;13700:12;13653:61;13749:97;13838:7;13830:3;13819:9;13815:19;13802:33;13791:9;13787:49;13749:97;:::i;:::-;13865:8;;-1:-1:-1;13892:8:1;-1:-1:-1;13943:3:1;13928:19;;13915:33;13912:41;-1:-1:-1;13909:61:1;;;13966:1;13963;13956:12;13909:61;;14006:97;14095:7;14087:3;14076:9;14072:19;14059:33;14048:9;14044:49;14006:97;:::i;:::-;14122:8;14112:18;;14150:9;14139:20;;;;12190:1975;;;;;;;;;;;;;;:::o;14170:734::-;14274:6;14282;14290;14298;14306;14359:3;14347:9;14338:7;14334:23;14330:33;14327:53;;;14376:1;14373;14366:12;14327:53;14415:9;14402:23;14434:31;14459:5;14434:31;:::i;:::-;14484:5;-1:-1:-1;14541:2:1;14526:18;;14513:32;14554:33;14513:32;14554:33;:::i;:::-;14606:7;-1:-1:-1;14660:2:1;14645:18;;14632:32;;-1:-1:-1;14711:2:1;14696:18;;14683:32;;-1:-1:-1;14766:3:1;14751:19;;14738:33;14794:18;14783:30;;14780:50;;;14826:1;14823;14816:12;14780:50;14849:49;14890:7;14881:6;14870:9;14866:22;14849:49;:::i;15140:604::-;15233:4;15239:6;15299:11;15286:25;15389:66;15378:8;15362:14;15358:29;15354:102;15334:18;15330:127;15320:155;;15471:1;15468;15461:12;15320:155;15498:33;;15550:20;;;-1:-1:-1;15593:18:1;15582:30;;15579:50;;;15625:1;15622;15615:12;15579:50;15658:4;15646:17;;-1:-1:-1;15709:1:1;15705:14;;;15689;15685:35;15675:46;;15672:66;;;15734:1;15731;15724:12;15749:268;15829:6;15882:2;15870:9;15861:7;15857:23;15853:32;15850:52;;;15898:1;15895;15888:12;15850:52;15937:9;15924:23;15956:31;15981:5;15956:31;:::i;16022:184::-;16074:77;16071:1;16064:88;16171:4;16168:1;16161:15;16195:4;16192:1;16185:15;16631:184;16683:77;16680:1;16673:88;16780:4;16777:1;16770:15;16804:4;16801:1;16794:15;16820:195;16859:3;16890:66;16883:5;16880:77;16877:103;;16960:18;;:::i;:::-;-1:-1:-1;17007:1:1;16996:13;;16820:195::o;17219:125::-;17259:4;17287:1;17284;17281:8;17278:34;;;17292:18;;:::i;:::-;-1:-1:-1;17329:9:1;;17219:125::o;17349:214::-;17498:2;17483:18;;17510:47;17487:9;17539:6;17510:47;:::i;17568:251::-;17638:6;17691:2;17679:9;17670:7;17666:23;17662:32;17659:52;;;17707:1;17704;17697:12;17659:52;17739:9;17733:16;17758:31;17783:5;17758:31;:::i;17824:204::-;17862:3;17898:4;17895:1;17891:12;17930:4;17927:1;17923:12;17965:3;17959:4;17955:14;17950:3;17947:23;17944:49;;;17973:18;;:::i;:::-;18009:13;;17824:204;-1:-1:-1;;;17824:204:1:o;18033:228::-;18073:7;18199:1;18131:66;18127:74;18124:1;18121:81;18116:1;18109:9;18102:17;18098:105;18095:131;;;18206:18;;:::i;:::-;-1:-1:-1;18246:9:1;;18033:228::o;18266:274::-;18306:1;18332;18322:189;;18367:77;18364:1;18357:88;18468:4;18465:1;18458:15;18496:4;18493:1;18486:15;18322:189;-1:-1:-1;18525:9:1;;18266:274::o;18545:175::-;18582:3;18626:4;18619:5;18615:16;18655:4;18646:7;18643:17;18640:43;;18663:18;;:::i;:::-;18712:1;18699:15;;18545:175;-1:-1:-1;;18545:175:1:o;18985:156::-;19051:20;;19111:4;19100:16;;19090:27;;19080:55;;19131:1;19128;19121:12;19080:55;18985:156;;;:::o;19146:182::-;19203:6;19256:2;19244:9;19235:7;19231:23;19227:32;19224:52;;;19272:1;19269;19262:12;19224:52;19295:27;19312:9;19295:27;:::i;19522:390::-;19622:4;19680:11;19667:25;19770:66;19759:8;19743:14;19739:29;19735:102;19715:18;19711:127;19701:155;;19852:1;19849;19842:12;19701:155;19873:33;;;;;19522:390;-1:-1:-1;;19522:390:1:o;19917:384::-;20011:4;20069:11;20056:25;20159:66;20148:8;20132:14;20128:29;20124:102;20104:18;20100:127;20090:155;;20241:1;20238;20231:12;20306:273;20382:6;20435:2;20423:9;20414:7;20410:23;20406:32;20403:52;;;20451:1;20448;20441:12;20403:52;20490:9;20477:23;20529:1;20522:5;20519:12;20509:40;;20545:1;20542;20535:12;21201:664;21253:5;21306:3;21299:4;21291:6;21287:17;21283:27;21273:55;;21324:1;21321;21314:12;21273:55;21360:6;21347:20;21386:4;21410:60;21426:43;21466:2;21426:43;:::i;21410:60::-;21504:15;;;21590:1;21586:10;;;;21574:23;;21570:32;;;21535:12;;;;21614:15;;;21611:35;;;21642:1;21639;21632:12;21611:35;21678:2;21670:6;21666:15;21690:146;21706:6;21701:3;21698:15;21690:146;;;21772:21;21789:3;21772:21;:::i;:::-;21760:34;;21814:12;;;;21723;;21690:146;;21870:1308;21974:9;22033:4;22025:5;22009:14;22005:26;22001:37;21998:57;;;22051:1;22048;22041:12;21998:57;22079:22;;:::i;:::-;22137:5;22124:19;22162:18;22203:2;22195:6;22192:14;22189:34;;;22219:1;22216;22209:12;22189:34;22242:18;;;;22298:14;22291:4;22283:13;;22279:34;22269:62;;22327:1;22324;22317:12;22269:62;22363:2;22350:16;22385:4;22409:60;22425:43;22465:2;22425:43;:::i;22409:60::-;22503:15;;;22585:1;22581:10;;;;22573:19;;22569:28;;;22534:12;;;;22620:14;22609:26;;22606:46;;;22648:1;22645;22638:12;22606:46;22672:11;;;;22692:223;22708:6;22703:3;22700:15;22692:223;;;22790:3;22777:17;22807:33;22832:7;22807:33;:::i;:::-;22853:20;;22725:12;;;;22893;;;;22692:223;;;22924:22;;-1:-1:-1;22984:14:1;;;22971:28;;-1:-1:-1;23011:16:1;;;23008:36;;;23040:1;23037;23030:12;23008:36;23078:64;23127:14;23116:8;23109:5;23105:20;23078:64;:::i;:::-;23060:16;;;23053:90;-1:-1:-1;23064:7:1;;21870:1308;-1:-1:-1;;;;21870:1308:1:o;23183:553::-;23291:6;23286:3;23279:19;23261:3;23317:4;23346:2;23341:3;23337:12;23330:19;;23372:5;23395:1;23405:306;23419:6;23416:1;23413:13;23405:306;;;23496:6;23483:20;23516:33;23541:7;23516:33;:::i;:::-;23587:42;23574:56;23562:69;;23651:12;;;;23686:15;;;;23441:1;23434:9;23405:306;;23741:587;23819:5;23826:6;23886:3;23873:17;23968:66;23957:8;23941:14;23937:29;23933:102;23913:18;23909:127;23899:155;;24050:1;24047;24040:12;23899:155;24078:33;;24182:4;24169:18;;;-1:-1:-1;24130:21:1;;-1:-1:-1;24210:18:1;24199:30;;24196:50;;;24242:1;24239;24232:12;24196:50;24296:6;24293:1;24289:14;24273;24269:35;24262:5;24258:47;24255:67;;;24318:1;24315;24308:12;24333:1615;24743:6;24732:9;24725:25;24706:4;24769:2;24807:3;24802:2;24791:9;24787:18;24780:31;24834:82;24911:3;24900:9;24896:19;24888:6;24880;24834:82;:::i;:::-;24964:9;24956:6;24952:22;24947:2;24936:9;24932:18;24925:50;25018:66;25077:6;25069;25018:66;:::i;:::-;25108:2;25100:6;25093:18;25134:90;25220:2;25212:6;25208:15;25194:12;25180;25134:90;:::i;:::-;25120:104;;;25271:75;25342:2;25334:6;25330:15;25322:6;25271:75;:::i;:::-;25379:19;;;25362:15;;;25355:44;;;;25434:30;;;25480:15;;;;25550:1;;25560:199;25574:14;25571:1;25568:21;25560:199;;;25673:4;25647:24;25664:6;25647:24;:::i;:::-;25643:35;25631:48;;25699:12;;;;25734:15;;;;25604:1;25597:9;;;;;25560:199;;;-1:-1:-1;;;4837:4:1;4826:16;;25828:2;25813:18;;4814:29;25776:3;-1:-1:-1;25788:44:1;;-1:-1:-1;4770:75:1;25788:44;25841:57;25893:3;25882:9;25878:19;25870:6;25841:57;:::i;:::-;25935:6;25929:3;25918:9;25914:19;25907:35;24333:1615;;;;;;;;;;:::o;26293:435::-;26346:3;26384:5;26378:12;26411:6;26406:3;26399:19;26437:4;26466:2;26461:3;26457:12;26450:19;;26503:2;26496:5;26492:14;26524:1;26534:169;26548:6;26545:1;26542:13;26534:169;;;26609:13;;26597:26;;26643:12;;;;26678:15;;;;26570:1;26563:9;26534:169;;26733:258;26805:1;26815:113;26829:6;26826:1;26823:13;26815:113;;;26905:11;;;26899:18;26886:11;;;26879:39;26851:2;26844:10;26815:113;;;26946:6;26943:1;26940:13;26937:48;;;-1:-1:-1;;26981:1:1;26963:16;;26956:27;26733:258::o;26996:316::-;27037:3;27075:5;27069:12;27102:6;27097:3;27090:19;27118:63;27174:6;27167:4;27162:3;27158:14;27151:4;27144:5;27140:16;27118:63;:::i;:::-;27226:2;27214:15;27231:66;27210:88;27201:98;;;;27301:4;27197:109;;26996:316;-1:-1:-1;;26996:316:1:o;27317:849::-;27639:4;27668:42;27749:2;27741:6;27737:15;27726:9;27719:34;27801:2;27793:6;27789:15;27784:2;27773:9;27769:18;27762:43;;27841:3;27836:2;27825:9;27821:18;27814:31;27868:57;27920:3;27909:9;27905:19;27897:6;27868:57;:::i;:::-;27973:9;27965:6;27961:22;27956:2;27945:9;27941:18;27934:50;28007:44;28044:6;28036;28007:44;:::i;:::-;27993:58;;28100:9;28092:6;28088:22;28082:3;28071:9;28067:19;28060:51;28128:32;28153:6;28145;28128:32;:::i;:::-;28120:40;27317:849;-1:-1:-1;;;;;;;;27317:849:1:o;30443:277::-;30510:6;30563:2;30551:9;30542:7;30538:23;30534:32;30531:52;;;30579:1;30576;30569:12;30531:52;30611:9;30605:16;30664:5;30657:13;30650:21;30643:5;30640:32;30630:60;;30686:1;30683;30676:12;31901:274;32030:3;32068:6;32062:13;32084:53;32130:6;32125:3;32118:4;32110:6;32106:17;32084:53;:::i;32180:219::-;32329:2;32318:9;32311:21;32292:4;32349:44;32389:2;32378:9;32374:18;32366:6;32349:44;:::i

Swarm Source

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