ETH Price: $3,020.32 (-2.25%)

Contract

0xfAb4e880467e26ED46F00c669C28fEaC58262698
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

2 Token Transfers found.

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x9d061331...E0Fc029B9
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
OCC_Modular

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : OCC_Modular.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;

import "../../ZivoeLocker.sol";

import "../../../lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";

interface IZivoeGlobals_OCC {
    /// @notice Returns the address of the ZivoeYDL contract.
    function YDL() external view returns (address);

    /// @notice Returns the address of the Zivoe Laboratory.
    function ZVL() external view returns (address);

    /// @notice Returns the net defaults in the system.
    function defaults() external view returns (uint256);

    /// @notice Returns true if an address is whitelisted as a keeper.
    function isKeeper(address) external view returns (bool);

    /// @notice Returns "true" if a locker is whitelisted for DAO interactions and accounting accessibility.
    /// @param  locker  The address of the locker to check for.
    function isLocker(address locker) external view returns (bool);

    /// @notice Handles WEI standardization of a given asset amount (i.e. 6 decimal precision => 18 decimal precision).
    /// @param  amount The amount of a given "asset".
    /// @param  asset The asset (ERC-20) from which to standardize the amount to WEI.
    /// @return standardizedAmount The above amount standardized to 18 decimals.
    function standardize(uint256 amount, address asset) external view returns (uint256 standardizedAmount);

    /// @notice Call when a default is resolved, decreases net defaults system-wide.
    /// @dev    The value "amount" should be standardized to WEI.
    /// @param  amount The default amount that has been resolved.
    function decreaseDefaults(uint256 amount) external;

    /// @notice Call when a default occurs, increases net defaults system-wide.
    /// @dev    The value "amount" should be standardized to WEI.
    /// @param  amount The default amount.
    function increaseDefaults(uint256 amount) external;
}

interface IZivoeYDL_OCC {
    /// @notice Returns the "stablecoin" that will be distributed via YDL.
    /// @return asset The address of the "stablecoin" that will be distributed via YDL.
    function distributedAsset() external view returns (address asset);
}



/// @notice  OCC stands for "On-Chain Credit".
///          A "Bullet" loan is an interest-only loan, with principal repaid in full at the end.
///          An "Amortization" loan is a principal and interest loan, with consistent payments until fully "Repaid".
///          This locker is responsible for handling accounting of loans.
///          This locker is responsible for handling payments and distribution of payments.
///          This locker is responsible for handling defaults and liquidations (if needed).
contract OCC_Modular is ZivoeLocker, ReentrancyGuard {
    
    using SafeERC20 for IERC20;

    // ---------------------
    //    State Variables
    // ---------------------

    /// @dev Tracks payment schedule type of the loan.
    enum LoanSchedule { Bullet, Amortization }

    /// @dev    Tracks state of the loan, enabling or disabling certain actions (function calls).
    /// @param  Null Default state, loan isn't offered yet.
    /// @param  Offered Loan offer has been created, not accepted (it could have passed expiry date).
    /// @param  Active Loan has been accepted, is currently receiving payments.
    /// @param  Repaid Loan was accepted, and has been fully repaid.
    /// @param  Defaulted Loan has defaulted, payments were missed, gracePeriod passed, and markDefault() called.
    /// @param  Cancelled Loan offer was created, then cancelled prior to acceptance.
    /// @param  Resolved Loan was accepted, then there was a default, then the full amount of principal was repaid.
    /// @param  Combined Loan was accepted, then combined with other loans while active.
    enum LoanState { 
        Null,
        Offered,
        Active,
        Repaid,
        Defaulted,
        Cancelled,
        Resolved,
        Combined
    }

    /// @dev Tracks approved combination.
    struct Combine {
        uint256[] loans;                /// @dev The loans approved for combination.
        uint256 APRLateFee;             /// @dev The late fee APR.
        uint256 term;                   /// @dev The term of the resulting combined loan.
        uint256 paymentInterval;        /// @dev The paymentInterval of the resulting combined loan.
        uint256 gracePeriod;            /// @dev The gracePeriod of the resulting combined loan.
        uint256 expires;                /// @dev The expiration of this combination.
        int8 paymentSchedule;           /// @dev The paymentSchedule of the resulting combined loan.
        bool valid;                     /// @dev The validity of the combination (if it can be executed).
    }

    /// @dev Tracks the loan.
    struct Loan {
        address borrower;               /// @dev The address that receives capital when the loan is accepted.
        uint256 principalOwed;          /// @dev The amount of principal still owed on the loan.
        uint256 APR;                    /// @dev The annualized percentage rate charged on the outstanding principal.
        uint256 APRLateFee;             /// @dev The APR charged on the outstanding principal if payment is late.
        uint256 paymentDueBy;           /// @dev The timestamp (in seconds) for when the next payment is due.
        uint256 paymentsRemaining;      /// @dev The number of payments remaining until the loan is "Repaid".
        uint256 term;                   /// @dev The number of paymentIntervals that will occur (e.g. 12, 24).
        uint256 paymentInterval;        /// @dev The interval of time between payments (in seconds).
        uint256 offerExpiry;            /// @dev The block.timestamp at which the offer for this loan expires.
        uint256 gracePeriod;            /// @dev The number of seconds a borrower has to makePayment() before default.
        int8 paymentSchedule;           /// @dev The payment schedule of the loan (0 = "Bullet" or 1 = "Amortization").
        LoanState state;                /// @dev The state of the loan.
    }

    address public immutable GBL;               /// @dev The ZivoeGlobals contract.
    address public immutable stablecoin;        /// @dev The stablecoin for this OCC contract.
    address public immutable underwriter;       /// @dev The entity that is allowed to underwrite (a.k.a. issue) loans.

    address public OCT_YDL;                     /// @dev Facilitates swaps and forwards distributedAsset() to YDL.
    
    uint256 public combineCounter;              /// @dev Incrementor for "combinations" mapping.
    uint256 public loanCounter;                 /// @dev Incrementor for "loans" mapping.

    uint256 private constant BIPS = 10000;

    /// @dev Mapping of approved loan combinations.
    mapping(uint256 => Combine) public combinations;

    /// @dev Mapping of loans approved for conversion to amortization payment schedule.
    mapping (uint256 => bool) public conversionToAmortization;
    
    /// @dev Mapping of loans approved for conversion to bullet payment schedule.
    mapping (uint256 => bool) public conversionToBullet;

    /// @dev Mapping of loans approved for extension, key is the loan ID, output is paymentIntervals extension.
    mapping (uint256 => uint256) public extensions;

    /// @dev Mapping of loans and their information, key is the ID of the loan, output is the Loan struct information.
    mapping (uint256 => Loan) public loans;

    /// @dev Mapping of loans approved for refinancing, key is the ID of the loan, output is APR it can refinance to.
    mapping(uint256 => uint256) public refinancing;



    // -----------------
    //    Constructor
    // -----------------

    /// @notice Initializes the OCC_Modular contract.
    /// @param  DAO The administrator of this contract (intended to be ZivoeDAO).
    /// @param  _stablecoin The stablecoin for this OCC contract.
    /// @param  _GBL The ZivoeGlobals contract.
    /// @param  _underwriter The entity that is allowed to call createOffer() and markRepaid().
    /// @param  _OCT_YDL The contract that facilitates swaps and forwards distributedAsset() to YDL.
    constructor(address DAO, address _stablecoin, address _GBL, address _underwriter, address _OCT_YDL) {
        transferOwnershipAndLock(DAO);
        stablecoin = _stablecoin;
        GBL = _GBL;
        underwriter = _underwriter;
        OCT_YDL = _OCT_YDL;
    }



    // ------------
    //    Events
    // ------------

    /// @notice Emitted during applyCombine().
    /// @param  borrower The borrower combining their loans.
    /// @param  loanIDs The IDs of the loans that were combined.
    /// @param  term The resulting term of the combined loan.
    /// @param  paymentInterval The resulting paymentInterval of the combined loan.
    /// @param  gracePeriod The resulting gracePeriod of the combined loan.
    /// @param  paymentSchedule The payment schedule of the combined loan (0 = "Bullet" or 1 = "Amortization").
    event CombineApplied(
        address indexed borrower, 
        uint256[] loanIDs, 
        uint256 term,
        uint256 paymentInterval,
        uint256 gracePeriod,
        int8 indexed paymentSchedule
    );

    /// @notice Emitted during approveCombine().
    /// @param  id The ID of the combination approval in "combinations" mapping.
    /// @param  loanIDs The IDs of the loans that can be combined.
    /// @param  term The resulting term of the combined loan that is permitted.
    /// @param  paymentInterval The resulting paymentInterval of the combined loan.
    /// @param  gracePeriod The resulting gracePeriod of the combined loan that is permitted.
    /// @param  expires The expiration of this combination.
    /// @param  paymentSchedule The payment schedule of the combined loan (0 = "Bullet" or 1 = "Amortization").
    event CombineApproved(
        uint256 indexed id, 
        uint256[] loanIDs,
        uint256 APRLateFee,
        uint256 term,
        uint256 paymentInterval, 
        uint256 gracePeriod,
        uint256 expires,
        int8 indexed paymentSchedule
    );

    /// @notice Emitted during applyCombine().
    /// @param  borrower        The address borrowing (that will receive the loan).
    /// @param  id              Identifier for the loan offer created.
    /// @param  borrowAmount    The amount to borrow (in other words, initial principal).
    /// @param  APR             The annualized percentage rate charged on the outstanding principal.
    /// @param  APRLateFee      The APR charged for late payments.
    /// @param  paymentDueBy    The timestamp (in seconds) for when the next payment is due.
    /// @param  term            The term or "duration" of the loan (number of paymentIntervals that will occur).
    /// @param  paymentInterval The interval of time between payments (in seconds).
    /// @param  gracePeriod     The number of seconds a borrower has to makePayment() before loan could default.
    /// @param  paymentSchedule The payment schedule type ("Bullet" or "Amortization").
    event CombineLoanCreated(
        address indexed borrower,
        uint256 indexed id,
        uint256 borrowAmount,
        uint256 APR,
        uint256 APRLateFee,
        uint256 paymentDueBy,
        uint256 term,
        uint256 paymentInterval,
        uint256 gracePeriod,
        int8 indexed paymentSchedule
    );

    /// @notice Emitted during unapproveCombine().
    /// @param  id The ID of the combine to unapprove.
    event CombineUnapproved(uint256 id);

    /// @notice Emitted during applyConversionToAmortization().
    /// @param  id The loan ID converted to amortization payment schedule.
    event ConversionToAmortizationApplied(uint256 indexed id);

    /// @notice Emitted during unapproveConversionToAmortization().
    /// @param  id The loan ID approved for conversion.
    event ConversionToAmortizationApproved(uint256 indexed id);

    /// @notice Emitted during approveConversionToBullet().
    /// @param  id The loan ID unapproved for conversion.
    event ConversionToAmortizationUnapproved(uint256 indexed id);

    /// @notice Emitted during applyConversionToBullet().
    /// @param  id The loan ID converted to bullet payment schedule.
    event ConversionToBulletApplied(uint256 indexed id);

    /// @notice Emitted during approveConversionToBullet().
    /// @param  id The loan ID approved for conversion.
    event ConversionToBulletApproved(uint256 indexed id);

    /// @notice Emitted during unapproveConversionToBullet().
    /// @param  id The loan ID unapproved for conversion.
    event ConversionToBulletUnapproved(uint256 indexed id);

    /// @notice Emitted during markDefault().
    /// @param id Identifier for the loan which is now "defaulted".
    /// @param principalDefaulted The amount defaulted on.
    event DefaultMarked(uint256 indexed id, uint256 principalDefaulted);

    /// @notice Emitted during resolveDefault().
    /// @param id The identifier for the loan in default that is resolved (or partially).
    /// @param amount The amount of principal paid back.
    /// @param payee The address responsible for resolving the default.
    /// @param resolved Denotes if the loan is fully resolved (false if partial).
    event DefaultResolved(uint256 indexed id, uint256 amount, address indexed payee, bool resolved);

    /// @notice Emitted during applyExtension().
    /// @param  id The identifier of the loan extending its payment schedule.
    /// @param  intervals The number of intervals the loan is extended for.
    event ExtensionApplied(uint256 indexed id, uint256 intervals);

    /// @notice Emitted during approveExtension().
    /// @param  id The identifier of the loan receiving approval for extension.
    /// @param  intervals The number of intervals the approved loan may be extended.
    event ExtensionApproved(uint256 indexed id, uint256 intervals);

    /// @notice Emitted during unapproveExtension().
    /// @param  id The identifier of the loan losing approval for extension.
    event ExtensionUnapproved(uint256 indexed id);

    /// @notice Emitted during supplyInterest().
    /// @param id The identifier for the loan that is supplied additional interest.
    /// @param amount The amount of interest supplied.
    /// @param payee The address responsible for supplying additional interest.
    event InterestSupplied(uint256 indexed id, uint256 amount, address indexed payee);

    /// @notice Emitted during callLoan().
    /// @param id Identifier for the loan which is called.
    /// @param amount The total amount of the payment.
    /// @param interest The interest portion of "amount" paid.
    /// @param principal The principal portion of "amount" paid.
    /// @param lateFee The lateFee portion of "amount" paid.
    event LoanCalled(uint256 indexed id, uint256 amount, uint256 principal, uint256 interest, uint256 lateFee);

    /// @notice Emitted during acceptOffer().
    /// @param  id Identifier for the offer accepted.
    /// @param  principal The amount of stablecoin lent out.
    /// @param  borrower The address borrowing the amount (principal).
    /// @param  paymentDueBy Timestamp (unix seconds) by which next payment is due.
    event OfferAccepted(uint256 indexed id, uint256 principal, address indexed borrower, uint256 paymentDueBy);

    /// @notice Emitted during cancelOffer().
    /// @param  id Identifier for the loan offer cancelled.
    event OfferCancelled(uint256 indexed id);

    /// @notice Emitted during createOffer().
    /// @param  borrower        The address borrowing (that will receive the loan).
    /// @param  id              Identifier for the loan offer created.
    /// @param  borrowAmount    The amount to borrow (in other words, initial principal).
    /// @param  APR             The annualized percentage rate charged on the outstanding principal.
    /// @param  APRLateFee      The APR charged for late payments.
    /// @param  term            The term or "duration" of the loan (number of paymentIntervals that will occur).
    /// @param  paymentInterval The interval of time between payments (in seconds).
    /// @param  offerExpiry     The block.timestamp at which the offer for this loan expires.
    /// @param  gracePeriod     The number of seconds a borrower has to makePayment() before loan could default.
    /// @param  paymentSchedule The payment schedule type ("Bullet" or "Amortization").
    event OfferCreated(
        address indexed borrower,
        uint256 indexed id,
        uint256 borrowAmount,
        uint256 APR,
        uint256 APRLateFee,
        uint256 term,
        uint256 paymentInterval,
        uint256 offerExpiry,
        uint256 gracePeriod,
        int8 indexed paymentSchedule
    );

    /// @notice Emitted during makePayment() and processPayment().
    /// @param id Identifier for the loan on which payment is made.
    /// @param payee The address which made payment on the loan.
    /// @param amount The total amount of the payment.
    /// @param principal The principal portion of "amount" paid.
    /// @param interest The interest portion of "amount" paid.
    /// @param lateFee The lateFee portion of "amount" paid.
    /// @param nextPaymentDue The timestamp by which next payment is due.
    event PaymentMade(
        uint256 indexed id, 
        address indexed payee, 
        uint256 amount, 
        uint256 principal, 
        uint256 interest, 
        uint256 lateFee, 
        uint256 nextPaymentDue
    );

    /// @notice Emitted during applyRefinance().
    /// @param  id The loan ID refinancing its APR.
    /// @param  APRNew The new APR of the loan.
    /// @param  APRPrior The prior APR of the loan.
    event RefinanceApplied(uint256 indexed id, uint256 APRNew, uint256 APRPrior);

    /// @notice Emitted during approveRefinance().
    /// @param  id The loan ID approved for refinance.
    /// @param  APR The APR the loan is approved to refinance to.
    event RefinanceApproved(uint256 indexed id, uint256 APR);

    /// @notice Emitted during unapproveRefinance().
    /// @param  id The loan ID unapproved for refinance.
    event RefinanceUnapproved(uint256 indexed id);

    /// @notice Emitted during markRepaid().
    /// @param id Identifier for loan which is now "repaid".
    event RepaidMarked(uint256 indexed id);

    /// @notice Emitted during updateOCTYDL().
    /// @param  newOCT The new OCT_YDL contract.
    /// @param  oldOCT The old OCT_YDL contract.
    event UpdatedOCTYDL(address indexed newOCT, address indexed oldOCT);

    

    // ---------------
    //    Modifiers
    // ---------------

    /// @notice This modifier ensures that the caller is the entity that is allowed to issue loans.
    modifier isUnderwriter() {
        require(_msgSender() == underwriter, "OCC_Modular::isUnderwriter() _msgSender() != underwriter");
        _;
    }



    // ---------------
    //    Functions
    // ---------------

    /// @notice Permission for owner to call pushToLocker().
    function canPush() public override pure returns (bool) { return true; }

    /// @notice Permission for owner to call pullFromLocker().
    function canPull() public override pure returns (bool) { return true; }

    /// @notice Permission for owner to call pushToLockerPartial().
    function canPullPartial() public override pure returns (bool) { return true; }

    /// @notice Returns information for a given loan.
    /// @dev    Refer to documentation on Loan struct for return param information.
    /// @param  id The ID of the loan.
    /// @return borrower The borrower of the loan.
    /// @return paymentSchedule The structure of the payment schedule.
    /// @return info The remaining information for the loan:
    ///                  info[0] = principalOwed
    ///                  info[1] = APR
    ///                  info[2] = APRLateFee
    ///                  info[3] = paymentDueBy
    ///                  info[4] = paymentsRemaining
    ///                  info[5] = term
    ///                  info[6] = paymentInterval
    ///                  info[7] = offerExpiry
    ///                  info[8] = gracePeriod
    ///                  info[9] = loanState
    function loanInfo(uint256 id) external view returns (
        address borrower, int8 paymentSchedule, uint256[10] memory info
    ) {
        borrower = loans[id].borrower;
        paymentSchedule = loans[id].paymentSchedule;
        info[0] = loans[id].principalOwed;
        info[1] = loans[id].APR;
        info[2] = loans[id].APRLateFee;
        info[3] = loans[id].paymentDueBy;
        info[4] = loans[id].paymentsRemaining;
        info[5] = loans[id].term;
        info[6] = loans[id].paymentInterval;
        info[7] = loans[id].offerExpiry;
        info[8] = loans[id].gracePeriod;
        info[9] = uint256(loans[id].state);
    }

    /// @notice Returns information for amount owed on next payment of a particular loan.
    /// @param  id The ID of the loan.
    /// @return principal The amount of principal owed.
    /// @return interest The amount of interest owed.
    /// @return lateFee The amount of late fees owed.
    /// @return total Full amount owed, combining principal plus interest.
    function amountOwed(uint256 id) public view returns (
        uint256 principal, uint256 interest, uint256 lateFee, uint256 total
    ) {
        // 0 == Bullet.
        if (loans[id].paymentSchedule == 0) {
            if (loans[id].paymentsRemaining == 1) { principal = loans[id].principalOwed; }
        }
        // 1 == Amortization (only two options, use else here).
        else { principal = loans[id].principalOwed / loans[id].paymentsRemaining; }

        // Add late fee if past loans[id].paymentDueBy.
        if (block.timestamp > loans[id].paymentDueBy && loans[id].state == LoanState.Active) {
            lateFee = loans[id].principalOwed * (block.timestamp - loans[id].paymentDueBy) *
                loans[id].APRLateFee / (86400 * 365 * BIPS);
        }
        interest = loans[id].principalOwed * loans[id].paymentInterval * loans[id].APR / (86400 * 365 * BIPS);
        total = principal + interest + lateFee;
    }

    /// @notice Funds and initiates a loan.
    /// @param  id The ID of the loan.
    function acceptOffer(uint256 id) external nonReentrant {
        require(
            loans[id].state == LoanState.Offered, 
            "OCC_Modular::acceptOffer() loans[id].state != LoanState.Offered"
        );
        require(
            block.timestamp < loans[id].offerExpiry, 
            "OCC_Modular::acceptOffer() block.timestamp >= loans[id].offerExpiry"
        );
        require(
            _msgSender() == loans[id].borrower, 
            "OCC_Modular::acceptOffer() _msgSender() != loans[id].borrower"
        );

        // "Friday" Payment Standardization, minimum 7-day lead-time
        // block.timestamp - block.timestamp % 7 days + 9 days + paymentInterval
        emit OfferAccepted(
            id, 
            loans[id].principalOwed, 
            loans[id].borrower, 
            block.timestamp - block.timestamp % 7 days + 9 days + loans[id].paymentInterval
        );

        loans[id].state = LoanState.Active;
        loans[id].paymentDueBy = block.timestamp - block.timestamp % 7 days + 9 days + loans[id].paymentInterval;
        IERC20(stablecoin).safeTransfer(loans[id].borrower, loans[id].principalOwed);
    }

    /// @notice Pays off the loan in full, plus additional interest for paymentInterval.
    /// @dev    Only the "borrower" of the loan may elect this option.
    /// @param  id The loan to pay off early.
    function callLoan(uint256 id) external nonReentrant {
        require(
            _msgSender() == loans[id].borrower || IZivoeGlobals_OCC(GBL).isLocker(_msgSender()), 
            "OCC_Modular::callLoan() _msgSender() != loans[id].borrower && !isLocker(_msgSender())"
        );
        require(loans[id].state == LoanState.Active, "OCC_Modular::callLoan() loans[id].state != LoanState.Active");

        uint256 principalOwed = loans[id].principalOwed;
        (, uint256 interestOwed, uint256 lateFee,) = amountOwed(id);

        emit LoanCalled(id, principalOwed + interestOwed + lateFee, principalOwed, interestOwed, lateFee);

        // Transfer interest to YDL if in same format, otherwise keep here for 1INCH forwarding.
        if (stablecoin == IZivoeYDL_OCC(IZivoeGlobals_OCC(GBL).YDL()).distributedAsset()) {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), IZivoeGlobals_OCC(GBL).YDL(), interestOwed + lateFee);
        }
        else {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), OCT_YDL, interestOwed + lateFee);
        }

        IERC20(stablecoin).safeTransferFrom(_msgSender(), owner(), principalOwed);

        loans[id].principalOwed = 0;
        loans[id].paymentDueBy = 0;
        loans[id].paymentsRemaining = 0;
        loans[id].state = LoanState.Repaid;
    }

    /// @notice Cancels a loan offer.
    /// @param id The ID of the loan.
    function cancelOffer(uint256 id) isUnderwriter external {
        require(
            loans[id].state == LoanState.Offered, 
            "OCC_Modular::cancelOffer() loans[id].state != LoanState.Offered"
        );
        emit OfferCancelled(id);
        loans[id].state = LoanState.Cancelled;
    }

    /// @notice                 Create a loan offer.
    /// @param  borrower        The address to borrow (that receives the loan).
    /// @param  borrowAmount    The amount to borrow (in other words, initial principal).
    /// @param  APR             The annualized percentage rate charged on the outstanding principal.
    /// @param  APRLateFee      The APR charged for late payments.
    /// @param  term            The term or "duration" of the loan (number of paymentIntervals that will occur).
    /// @param  paymentInterval The interval of time between payments (in seconds).
    /// @param  gracePeriod     The number of seconds a borrower has to makePayment() before loan could default.
    /// @param  paymentSchedule The payment schedule type ("Bullet" or "Amortization").
    function createOffer(
        address borrower,
        uint256 borrowAmount,
        uint256 APR,
        uint256 APRLateFee,
        uint256 term,
        uint256 paymentInterval,
        uint256 gracePeriod,
        int8 paymentSchedule
    ) isUnderwriter external {
        require(term > 0, "OCC_Modular::createOffer() term == 0");
        require(
            paymentInterval == 86400 * 7 || paymentInterval == 86400 * 14 || paymentInterval == 86400 * 28 || 
            paymentInterval == 86400 * 91 || paymentInterval == 86400 * 364, 
            "OCC_Modular::createOffer() invalid paymentInterval value, try: 86400 * (7 || 14 || 28 || 91 || 364)"
        );
        require(gracePeriod >= 7 days, "OCC_Modular::createOffer() gracePeriod < 7 days");
        require(paymentSchedule <= 1, "OCC_Modular::createOffer() paymentSchedule > 1");

        emit OfferCreated(
            borrower, loanCounter, borrowAmount, APR, APRLateFee, term,
            paymentInterval, block.timestamp + 3 days, gracePeriod, paymentSchedule
        );

        loans[loanCounter] = Loan(
            borrower, borrowAmount, APR, APRLateFee, 0, term, term, paymentInterval, block.timestamp + 3 days,
            gracePeriod, paymentSchedule, LoanState.Offered
        );

        loanCounter += 1;
    }

    /// @notice Make a payment on a loan.
    /// @dev    Anyone is allowed to make a payment on someone's loan.
    /// @param  id The ID of the loan.
    function makePayment(uint256 id) external nonReentrant {
        require(loans[id].state == LoanState.Active, "OCC_Modular::makePayment() loans[id].state != LoanState.Active");

        (uint256 principalOwed, uint256 interestOwed, uint256 lateFee,) = amountOwed(id);

        emit PaymentMade(
            id, _msgSender(), principalOwed + interestOwed + lateFee, principalOwed,
            interestOwed, lateFee, loans[id].paymentDueBy + loans[id].paymentInterval
        );

        // Transfer interest + lateFee to YDL if in same format, otherwise keep here for 1INCH forwarding.
        if (stablecoin == IZivoeYDL_OCC(IZivoeGlobals_OCC(GBL).YDL()).distributedAsset()) {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), IZivoeGlobals_OCC(GBL).YDL(), interestOwed + lateFee);
        }
        else {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), OCT_YDL, interestOwed + lateFee);
        }
        if (principalOwed > 0) { IERC20(stablecoin).safeTransferFrom(_msgSender(), owner(), principalOwed); }

        if (loans[id].paymentsRemaining == 1) {
            loans[id].state = LoanState.Repaid;
            loans[id].paymentDueBy = 0;
        }
        else { loans[id].paymentDueBy += loans[id].paymentInterval; }

        loans[id].principalOwed -= principalOwed;
        loans[id].paymentsRemaining -= 1;
    }

    /// @notice Mark a loan insolvent if a payment hasn't been made beyond the corresponding grace period.
    /// @param  id The ID of the loan.
    function markDefault(uint256 id) external isUnderwriter {
        require(loans[id].state == LoanState.Active, "OCC_Modular::markDefault() loans[id].state != LoanState.Active");
        require( 
            loans[id].paymentDueBy + loans[id].gracePeriod < block.timestamp, 
            "OCC_Modular::markDefault() loans[id].paymentDueBy + loans[id].gracePeriod >= block.timestamp"
        );
        
        emit DefaultMarked(id, loans[id].principalOwed);
        loans[id].state = LoanState.Defaulted;
        IZivoeGlobals_OCC(GBL).increaseDefaults(
            IZivoeGlobals_OCC(GBL).standardize(loans[id].principalOwed, stablecoin)
        );
    }

    /// @notice Underwriter specifies a loan has been repaid fully via interest deposits in terms of off-chain debt.
    /// @param  id The ID of the loan.
    function markRepaid(uint256 id) external isUnderwriter {
        require(
            loans[id].state == LoanState.Resolved, 
            "OCC_Modular::markRepaid() loans[id].state != LoanState.Resolved"
        );
        emit RepaidMarked(id);
        loans[id].state = LoanState.Repaid;
        loans[id].paymentDueBy = 0;
    }

    /// @notice Process a payment for a loan, on behalf of another borrower.
    /// @dev    Only "keepeers" and "underwriter" can call this function, taking payment from the "borrower".
    /// @dev    Only allowed to call this if block.timestamp > paymentDueBy - 12 hours.
    /// @param  id The ID of the loan.
    function processPayment(uint256 id) external nonReentrant {
        require(
            _msgSender() == underwriter || IZivoeGlobals_OCC(GBL).isKeeper(_msgSender()),
            "OCC_Modular::processPayment() _msgSender() != underwriter && !IZivoeGlobals_OCC(GBL).isKeeper(_msgSender())"
        );
        require(
            loans[id].state == LoanState.Active, 
            "OCC_Modular::processPayment() loans[id].state != LoanState.Active"
        );
        require(
            block.timestamp > loans[id].paymentDueBy - 12 hours, 
            "OCC_Modular::processPayment() block.timestamp <= loans[id].paymentDueBy - 12 hours"
        );

        (uint256 principalOwed, uint256 interestOwed, uint256 lateFee,) = amountOwed(id);

        emit PaymentMade(
            id, loans[id].borrower, principalOwed + interestOwed + lateFee, principalOwed,
            interestOwed, lateFee, loans[id].paymentDueBy + loans[id].paymentInterval
        );

        // Transfer interest to YDL if in same format, otherwise keep here for 1INCH forwarding.
        if (stablecoin == IZivoeYDL_OCC(IZivoeGlobals_OCC(GBL).YDL()).distributedAsset()) {
            IERC20(stablecoin).safeTransferFrom(
                loans[id].borrower, IZivoeGlobals_OCC(GBL).YDL(), interestOwed + lateFee
            );
        }
        else {
            IERC20(stablecoin).safeTransferFrom(loans[id].borrower, OCT_YDL, interestOwed + lateFee);
        }
        
        if (principalOwed > 0) { IERC20(stablecoin).safeTransferFrom(loans[id].borrower, owner(), principalOwed); }

        if (loans[id].paymentsRemaining == 1) {
            loans[id].state = LoanState.Repaid;
            loans[id].paymentDueBy = 0;
        }
        else { loans[id].paymentDueBy += loans[id].paymentInterval; }

        loans[id].principalOwed -= principalOwed;
        loans[id].paymentsRemaining -= 1;
    }

    /// @notice Make a full (or partial) payment to resolve an insolvent loan.
    /// @param  id The ID of the loan.
    /// @param  amount The amount of principal to pay down.
    function resolveDefault(uint256 id, uint256 amount) external nonReentrant {
        require(
            loans[id].state == LoanState.Defaulted, 
            "OCC_Modular::resolveDefaut() loans[id].state != LoanState.Defaulted"
        );

        uint256 paymentAmount;

        if (amount >= loans[id].principalOwed) {
            paymentAmount = loans[id].principalOwed;
            loans[id].principalOwed = 0;
            loans[id].state = LoanState.Resolved;
        }
        else {
            paymentAmount = amount;
            loans[id].principalOwed -= paymentAmount;
        }

        emit DefaultResolved(id, paymentAmount, _msgSender(), loans[id].state == LoanState.Resolved);

        IERC20(stablecoin).safeTransferFrom(_msgSender(), owner(), paymentAmount);
        IZivoeGlobals_OCC(GBL).decreaseDefaults(IZivoeGlobals_OCC(GBL).standardize(paymentAmount, stablecoin));
    }
    
    /// @notice Supply interest to a repaid loan (for arbitrary interest repayment).
    /// @param  id The ID of the loan.
    /// @param  amount The amount of interest to supply.
    function supplyInterest(uint256 id, uint256 amount) external nonReentrant {
        require(
            loans[id].state == LoanState.Resolved, 
            "OCC_Modular::supplyInterest() loans[id].state != LoanState.Resolved"
        );
        
        emit InterestSupplied(id, amount, _msgSender());
        // Transfer interest to YDL if in same format, otherwise keep here for 1INCH forwarding.
        if (stablecoin == IZivoeYDL_OCC(IZivoeGlobals_OCC(GBL).YDL()).distributedAsset()) {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), IZivoeGlobals_OCC(GBL).YDL(), amount);
        } else {
            IERC20(stablecoin).safeTransferFrom(_msgSender(), OCT_YDL, amount);
        }
    }

    /// @notice Update the OCT_YDL endpoint.
    /// @dev    This function MUST only be called by ZVL().
    /// @param  _OCT_YDL The new address for OCT_YDL.
    function updateOCTYDL(address _OCT_YDL) external {
        require(_msgSender() == IZivoeGlobals_OCC(GBL).ZVL());
        require(_OCT_YDL != address(0));
        emit UpdatedOCTYDL(_OCT_YDL, OCT_YDL);
        OCT_YDL = _OCT_YDL;
    }



    /// ---------------------------------
    ///    Apply & Approve & Unapprove
    /// ---------------------------------

    /// @notice Combines multiple loans into a single loan.
    /// @param  id The ID to reference from "combinations" mapping.
    function applyCombine(uint256 id) external {
        require(combinations[id].valid, "OCC_Modular::applyCombine() !combinations[id].valid");
        require(
            block.timestamp < combinations[id].expires, 
            "OCC_Modular::applyCombine() block.timestamp >= combinations[id].expires"
        );

        combinations[id].valid = false;

        emit CombineApplied(
            _msgSender(),
            combinations[id].loans, 
            combinations[id].term,
            combinations[id].paymentInterval, 
            combinations[id].gracePeriod,
            combinations[id].paymentSchedule
        );

        uint256 notional;
        uint256 APR;
        
        for (uint256 i = 0; i < combinations[id].loans.length; i++) {
            uint256 loanID = combinations[id].loans[i];
            require(
                _msgSender() == loans[loanID].borrower, 
                "OCC_Modular::applyCombine() _msgSender() != loans[loanID].borrower"
            );
            require(
                loans[loanID].state == LoanState.Active, 
                "OCC_Modular::applyCombine() loans[loanID].state != LoanState.Active"
            );
            notional += loans[loanID].principalOwed;
            APR += loans[loanID].principalOwed * loans[loanID].APR;
            loans[loanID].principalOwed = 0;
            loans[loanID].paymentDueBy = 0;
            loans[loanID].paymentsRemaining = 0;
            loans[loanID].state = LoanState.Combined;
        }

        APR = APR / notional;

        uint256 term = combinations[id].term;
        uint256 APRLateFee = combinations[id].APRLateFee;
        uint256 paymentInterval = combinations[id].paymentInterval;
        uint256 gracePeriod = combinations[id].gracePeriod;
        int8 paymentSchedule = combinations[id].paymentSchedule;
        
        // "Friday" Payment Standardization, minimum 7-day lead-time
        // block.timestamp - block.timestamp % 7 days + 9 days + paymentInterval
        emit CombineLoanCreated(
            _msgSender(),  // borrower
            loanCounter,  // loanID
            notional,  // principalOwed
            APR,  // APR
            APRLateFee,  // APRLateFee
            block.timestamp - block.timestamp % 7 days + 9 days + paymentInterval,  // paymentDueBy
            term,  // term
            paymentInterval,  // paymentInterval
            gracePeriod,  // gracePeriod
            paymentSchedule  // paymentSchedule
        );
        loans[loanCounter] = Loan(
            _msgSender(), notional, APR, APRLateFee, block.timestamp - block.timestamp % 7 days + 9 days + paymentInterval, 
            term, term, paymentInterval, block.timestamp - 1 days, gracePeriod, paymentSchedule, LoanState.Active
        );
        loanCounter += 1;
    }

    /// @notice Converts a loan to amortization payment schedule.
    /// @param  id The ID for the loan.
    function applyConversionToAmortization(uint256 id) external {
        require(
            _msgSender() == loans[id].borrower, 
            "OCC_Modular::applyConversionToAmortization() _msgSender() != loans[id].borrower"
        );
        require(
            conversionToAmortization[id], 
            "OCC_Modular::applyConversionToAmortization() !conversionToAmortization[id]"
        );
        emit ConversionToAmortizationApplied(id);
        conversionToAmortization[id] = false;
        loans[id].paymentSchedule = int8(1);
    }

    /// @notice Converts a loan to bullet payment schedule.
    /// @param  id The ID for the loan.
    function applyConversionToBullet(uint256 id) external {
        require(
            _msgSender() == loans[id].borrower,
            "OCC_Modular::applyConversionToBullet() _msgSender() != loans[id].borrower"
        );
        require(
            conversionToBullet[id], 
            "OCC_Modular::applyConversionToBullet() !conversionToBullet[id]"
        );
        emit ConversionToBulletApplied(id);
        conversionToBullet[id] = false;
        loans[id].paymentSchedule = int8(0);
    }

    /// @notice Applies an extension to a loan.
    /// @param  id The ID for the loan.
    function applyExtension(uint256 id) external {
        require(
            _msgSender() == loans[id].borrower, 
            "OCC_Modular::applyExtension() _msgSender() != loans[id].borrower"
        );
        require(extensions[id] > 0,  "OCC_Modular::applyExtension() extensions[id] == 0");
        emit ExtensionApplied(id, extensions[id]);
        
        loans[id].paymentsRemaining += extensions[id];
        loans[id].term += extensions[id];
        extensions[id] = 0;
    }

    /// @notice Refinances a loan.
    /// @param  id The ID for the loan.
    function applyRefinance(uint256 id) external {
        require(_msgSender() == loans[id].borrower, "OCC_Modular::applyRefinance() _msgSender() != loans[id].borrower");
        require(refinancing[id] != 0, "OCC_Modular::applyRefinance() refinancing[id] == 0");
        require(
            loans[id].state == LoanState.Active, 
            "OCC_Modular::applyRefinance() loans[id].state != LoanState.Active"
        );
        emit RefinanceApplied(id, refinancing[id], loans[id].APR);
        loans[id].APR = refinancing[id];
        refinancing[id] = 0;
    }

    /// @notice Approves a borrower for combining loans.
    /// @param  loanIDs The IDs of the loans that can be combined.
    /// @param  term The term that loans can be combined into.
    /// @param  paymentInterval The paymentInterval that loans can be combined into.
    /// @param  gracePeriod The number of seconds a borrower has to makePayment() before loan could default.
    /// @param  paymentSchedule The payment schedule of the loan (0 = "Bullet" or 1 = "Amortization").
    function approveCombine(
        uint256[] calldata loanIDs,
        uint256 APRLateFee,
        uint256 term,
        uint256 paymentInterval,
        uint256 gracePeriod,
        int8 paymentSchedule
    ) external isUnderwriter {
        require(term > 0, "OCC_Modular::approveCombine() term == 0");
        require(
            paymentInterval == 86400 * 7 || paymentInterval == 86400 * 14 || paymentInterval == 86400 * 28 || 
            paymentInterval == 86400 * 91 || paymentInterval == 86400 * 364, 
            "OCC_Modular::approveCombine() invalid paymentInterval value, try: 86400 * (7 || 14 || 28 || 91 || 364)"
        );
        require(
            loanIDs.length > 1 && paymentSchedule <= 1 && gracePeriod >= 7 days, 
            "OCC_Modular::approveCombine() loanIDs.length <= 1 || paymentSchedule > 1 || gracePeriod < 7 days"
        );

        emit CombineApproved(
            combineCounter, loanIDs, APRLateFee, term, paymentInterval, gracePeriod, block.timestamp + 72 hours, paymentSchedule
        );
        
        combinations[combineCounter] = Combine(
            loanIDs, APRLateFee, term, paymentInterval, gracePeriod, block.timestamp + 72 hours, paymentSchedule, true
        );

        combineCounter += 1;
    }

    /// @notice Approves a loan for conversion to amortization payment schedule.
    /// @param  id The ID for the loan.
    function approveConversionToAmortization(uint256 id) external isUnderwriter {
        emit ConversionToAmortizationApproved(id);
        conversionToAmortization[id] = true;
    }

    /// @notice Approves a loan for conversion to bullet payment schedule.
    /// @param  id The ID for the loan.
    function approveConversionToBullet(uint256 id) external isUnderwriter {
        emit ConversionToBulletApproved(id);
        conversionToBullet[id] = true;
    }

    /// @notice Approves an extension for a loan.
    /// @param  id The ID for the loan.
    /// @param  intervals The amount of intervals to approve for extension.
    function approveExtension(uint256 id, uint256 intervals) external isUnderwriter {
        emit ExtensionApproved(id, intervals);
        extensions[id] = intervals;
    }

    /// @notice Approves a loan for refinancing.
    /// @param  id The ID for the loan.
    /// @param  APR The APR the loan can refinance to.
    function approveRefinance(uint256 id, uint256 APR) external isUnderwriter {
        emit RefinanceApproved(id, APR);
        refinancing[id] = APR;
    }

    /// @notice Unapproves a borrower for combining loans.
    /// @param  id The ID of the combine to unapprove.
    function unapproveCombine(uint256 id) external isUnderwriter {
        emit CombineUnapproved(id);
        combinations[id].valid = false;
    }

    /// @notice Unapproves a loan for conversion to amortization payment schedule.
    /// @param  id The ID for the loan.
    function unapproveConversionToAmortization(uint256 id) external isUnderwriter {
        emit ConversionToAmortizationUnapproved(id);
        conversionToAmortization[id] = false;
    }

    /// @notice Unapproves a loan for conversion to bullet payment schedule.
    /// @param  id The ID for the loan.
    function unapproveConversionToBullet(uint256 id) external isUnderwriter {
        emit ConversionToBulletUnapproved(id);
        conversionToBullet[id] = false;
    }

    /// @notice Unapproves an extension for a loan.
    /// @param  id The ID for the loan.
    function unapproveExtension(uint256 id) external isUnderwriter {
        emit ExtensionUnapproved(id);
        extensions[id] = 0;
    }

    /// @notice Unapproves a loan for refinancing.
    /// @param  id The ID for the loan.
    function unapproveRefinance(uint256 id) external isUnderwriter {
        emit RefinanceUnapproved(id);
        refinancing[id] = 0;
    }

}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must 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;
}

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

pragma solidity ^0.8.0;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @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;
    }
}

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

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 12 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol";

abstract contract OwnableLocked is Ownable {
    
    bool public locked; /// @dev A variable "locked" that prevents future ownership transfer.

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier unlocked() {
        require(!locked, "OwnableLocked::unlocked() locked");
        _;
    }

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner and if !locked.
     */
    function transferOwnershipAndLock(address newOwner) public onlyOwner unlocked {
        require(newOwner != address(0), "OwnableLocked::transferOwnershipAndLock() newOwner == address(0)");
        locked = true;
        _transferOwnership(newOwner);
    }

}

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

import "./libraries/OwnableLocked.sol";

import "../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol";



/// @notice  This contract standardizes communication between the DAO and lockers.
abstract contract ZivoeLocker is OwnableLocked, ERC1155Holder, ERC721Holder {
    
    using SafeERC20 for IERC20;

    // -----------------
    //    Constructor
    // -----------------

    /// @notice Initializes the ZivoeLocker contract.
    constructor() {}



    // ---------------
    //    Functions
    // ---------------

    /// @notice Permission for calling pushToLocker().
    function canPush() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLocker().
    function canPull() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerPartial().
    function canPullPartial() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pushToLockerMulti().
    function canPushMulti() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerMulti().
    function canPullMulti() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerMultiPartial().
    function canPullMultiPartial() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pushToLockerERC721().
    function canPushERC721() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerERC721().
    function canPullERC721() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pushToLockerMultiERC721().
    function canPushMultiERC721() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerMultiERC721().
    function canPullMultiERC721() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pushToLockerERC1155().
    function canPushERC1155() public virtual view returns (bool) { return false; }

    /// @notice Permission for calling pullFromLockerERC1155().
    function canPullERC1155() public virtual view returns (bool) { return false; }

    /// @notice Migrates specific amount of ERC20 from owner() to locker.
    /// @param  asset The asset to migrate.
    /// @param  amount The amount of "asset" to migrate.
    /// @param  data Accompanying transaction data.
    function pushToLocker(address asset, uint256 amount, bytes calldata data) external virtual onlyOwner {
        require(canPush(), "ZivoeLocker::pushToLocker() !canPush()");
        IERC20(asset).safeTransferFrom(owner(), address(this), amount);
    }

    /// @notice Migrates entire ERC20 balance from locker to owner().
    /// @param  asset The asset to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLocker(address asset, bytes calldata data) external virtual onlyOwner {
        require(canPull(), "ZivoeLocker::pullFromLocker() !canPull()");
        IERC20(asset).safeTransfer(owner(), IERC20(asset).balanceOf(address(this)));
    }

    /// @notice Migrates specific amount of ERC20 from locker to owner().
    /// @param  asset The asset to migrate.
    /// @param  amount The amount of "asset" to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLockerPartial(address asset, uint256 amount, bytes calldata data) external virtual onlyOwner {
        require(canPullPartial(), "ZivoeLocker::pullFromLockerPartial() !canPullPartial()");
        IERC20(asset).safeTransfer(owner(), amount);
    }

    /// @notice Migrates specific amounts of ERC20s from owner() to locker.
    /// @param  assets The assets to migrate.
    /// @param  amounts The amounts of "assets" to migrate, corresponds to "assets" by position in array.
    /// @param  data Accompanying transaction data.
    function pushToLockerMulti(
        address[] calldata assets, uint256[] calldata amounts, bytes[] calldata data
    ) external virtual onlyOwner {
        require(canPushMulti(), "ZivoeLocker::pushToLockerMulti() !canPushMulti()");
        for (uint256 i = 0; i < assets.length; i++) {
            IERC20(assets[i]).safeTransferFrom(owner(), address(this), amounts[i]);
        }
    }

    /// @notice Migrates full amount of ERC20s from locker to owner().
    /// @param  assets The assets to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLockerMulti(address[] calldata assets, bytes[] calldata data) external virtual onlyOwner {
        require(canPullMulti(), "ZivoeLocker::pullFromLockerMulti() !canPullMulti()");
        for (uint256 i = 0; i < assets.length; i++) {
            IERC20(assets[i]).safeTransfer(owner(), IERC20(assets[i]).balanceOf(address(this)));
        }
    }

    /// @notice Migrates specific amounts of ERC20s from locker to owner().
    /// @param  assets The assets to migrate.
    /// @param  amounts The amounts of "assets" to migrate, corresponds to "assets" by position in array.
    /// @param  data Accompanying transaction data.
    function pullFromLockerMultiPartial(
        address[] calldata assets, uint256[] calldata amounts, bytes[] calldata data
    ) external virtual onlyOwner {
        require(canPullMultiPartial(), "ZivoeLocker::pullFromLockerMultiPartial() !canPullMultiPartial()");
        for (uint256 i = 0; i < assets.length; i++) {
            IERC20(assets[i]).safeTransfer(owner(), amounts[i]);
        }
    }

    /// @notice Migrates an ERC721 from owner() to locker.
    /// @param  asset The NFT contract.
    /// @param  tokenId The ID of the NFT to migrate.
    /// @param  data Accompanying transaction data.
    function pushToLockerERC721(address asset, uint256 tokenId, bytes calldata data) external virtual onlyOwner {
        require(canPushERC721(), "ZivoeLocker::pushToLockerERC721() !canPushERC721()");
        IERC721(asset).safeTransferFrom(owner(), address(this), tokenId, data);
    }

    /// @notice Migrates an ERC721 from locker to owner().
    /// @param  asset The NFT contract.
    /// @param  tokenId The ID of the NFT to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLockerERC721(address asset, uint256 tokenId, bytes calldata data) external virtual onlyOwner {
        require(canPullERC721(), "ZivoeLocker::pullFromLockerERC721() !canPullERC721()");
        IERC721(asset).safeTransferFrom(address(this), owner(), tokenId, data);
    }

    /// @notice Migrates ERC721s from owner() to locker.
    /// @param  assets The NFT contracts.
    /// @param  tokenIds The IDs of the NFTs to migrate.
    /// @param  data Accompanying transaction data.
    function pushToLockerMultiERC721(
        address[] calldata assets, uint256[] calldata tokenIds, bytes[] calldata data
    ) external virtual onlyOwner {
        require(canPushMultiERC721(), "ZivoeLocker::pushToLockerMultiERC721() !canPushMultiERC721()");
        for (uint256 i = 0; i < assets.length; i++) {
           IERC721(assets[i]).safeTransferFrom(owner(), address(this), tokenIds[i], data[i]);
        }
    }

    /// @notice Migrates ERC721s from locker to owner().
    /// @param  assets The NFT contracts.
    /// @param  tokenIds The IDs of the NFTs to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLockerMultiERC721(
        address[] calldata assets, uint256[] calldata tokenIds, bytes[] calldata data
    ) external virtual onlyOwner {
        require(canPullMultiERC721(), "ZivoeLocker::pullFromLockerMultiERC721() !canPullMultiERC721()");
        for (uint256 i = 0; i < assets.length; i++) {
           IERC721(assets[i]).safeTransferFrom(address(this), owner(), tokenIds[i], data[i]);
        }
    }

    /// @notice Migrates ERC1155 assets from owner() to locker.
    /// @param  asset The ERC1155 contract.
    /// @param  ids The IDs of the assets within the ERC1155 to migrate.
    /// @param  amounts The amounts to migrate.
    /// @param  data Accompanying transaction data.
    function pushToLockerERC1155(
        address asset, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data
    ) external virtual onlyOwner {
        require(canPushERC1155(), "ZivoeLocker::pushToLockerERC1155() !canPushERC1155()");
        IERC1155(asset).safeBatchTransferFrom(owner(), address(this), ids, amounts, data);
    }

    /// @notice Migrates ERC1155 assets from locker to owner().
    /// @param  asset The ERC1155 contract.
    /// @param  ids The IDs of the assets within the ERC1155 to migrate.
    /// @param  amounts The amounts to migrate.
    /// @param  data Accompanying transaction data.
    function pullFromLockerERC1155(
        address asset, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data
    ) external virtual onlyOwner {
        require(canPullERC1155(), "ZivoeLocker::pullFromLockerERC1155() !canPullERC1155()");
        IERC1155(asset).safeBatchTransferFrom(address(this), owner(), ids, amounts, data);
    }

}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"DAO","type":"address"},{"internalType":"address","name":"_stablecoin","type":"address"},{"internalType":"address","name":"_GBL","type":"address"},{"internalType":"address","name":"_underwriter","type":"address"},{"internalType":"address","name":"_OCT_YDL","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"loanIDs","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"term","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"indexed":true,"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"CombineApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"loanIDs","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"term","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"},{"indexed":true,"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"CombineApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APR","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentDueBy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"term","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"indexed":true,"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"CombineLoanCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"CombineUnapproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToAmortizationApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToAmortizationApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToAmortizationUnapproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToBulletApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToBulletApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ConversionToBulletUnapproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principalDefaulted","type":"uint256"}],"name":"DefaultMarked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"payee","type":"address"},{"indexed":false,"internalType":"bool","name":"resolved","type":"bool"}],"name":"DefaultResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervals","type":"uint256"}],"name":"ExtensionApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervals","type":"uint256"}],"name":"ExtensionApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ExtensionUnapproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"payee","type":"address"}],"name":"InterestSupplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interest","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lateFee","type":"uint256"}],"name":"LoanCalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"},{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"paymentDueBy","type":"uint256"}],"name":"OfferAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"OfferCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APR","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"term","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"offerExpiry","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"indexed":true,"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"OfferCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"payee","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interest","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lateFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextPaymentDue","type":"uint256"}],"name":"PaymentMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APRNew","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APRPrior","type":"uint256"}],"name":"RefinanceApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"APR","type":"uint256"}],"name":"RefinanceApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"RefinanceUnapproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"RepaidMarked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOCT","type":"address"},{"indexed":true,"internalType":"address","name":"oldOCT","type":"address"}],"name":"UpdatedOCTYDL","type":"event"},{"inputs":[],"name":"GBL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OCT_YDL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"acceptOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"amountOwed","outputs":[{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"interest","type":"uint256"},{"internalType":"uint256","name":"lateFee","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"applyCombine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"applyConversionToAmortization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"applyConversionToBullet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"applyExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"applyRefinance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"loanIDs","type":"uint256[]"},{"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"approveCombine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approveConversionToAmortization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approveConversionToBullet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"intervals","type":"uint256"}],"name":"approveExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"APR","type":"uint256"}],"name":"approveRefinance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"callLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"canPull","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPullERC1155","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullMulti","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullMultiERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullMultiPartial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullPartial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPush","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPushERC1155","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPushERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPushMulti","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPushMultiERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"combinations","outputs":[{"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"internalType":"uint256","name":"expires","type":"uint256"},{"internalType":"int8","name":"paymentSchedule","type":"int8"},{"internalType":"bool","name":"valid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"combineCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"conversionToAmortization","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"conversionToBullet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"internalType":"uint256","name":"APR","type":"uint256"},{"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"internalType":"int8","name":"paymentSchedule","type":"int8"}],"name":"createOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extensions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loanCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"loanInfo","outputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"int8","name":"paymentSchedule","type":"int8"},{"internalType":"uint256[10]","name":"info","type":"uint256[10]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"loans","outputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"principalOwed","type":"uint256"},{"internalType":"uint256","name":"APR","type":"uint256"},{"internalType":"uint256","name":"APRLateFee","type":"uint256"},{"internalType":"uint256","name":"paymentDueBy","type":"uint256"},{"internalType":"uint256","name":"paymentsRemaining","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"paymentInterval","type":"uint256"},{"internalType":"uint256","name":"offerExpiry","type":"uint256"},{"internalType":"uint256","name":"gracePeriod","type":"uint256"},{"internalType":"int8","name":"paymentSchedule","type":"int8"},{"internalType":"enum OCC_Modular.LoanState","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"makePayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"markDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"markRepaid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"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":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"processPayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLocker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMultiERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMultiPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLocker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLockerERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLockerERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pushToLockerMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pushToLockerMultiERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"refinancing","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"resolveDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stablecoin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"supplyInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnershipAndLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unapproveCombine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unapproveConversionToAmortization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unapproveConversionToBullet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unapproveExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unapproveRefinance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underwriter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_OCT_YDL","type":"address"}],"name":"updateOCTYDL","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60e06040523480156200001157600080fd5b506040516200611038038062006110833981016040819052620000349162000259565b6200003f3362000083565b600180556200004e85620000d3565b6001600160a01b0393841660a052918316608052821660c052600280546001600160a01b0319169190921617905550620002c9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000dd620001de565b600054600160a01b900460ff16156200013d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b656460448201526064015b60405180910390fd5b6001600160a01b038116620001bd576040805162461bcd60e51b81526020600482015260248101919091527f4f776e61626c654c6f636b65643a3a7472616e736665724f776e65727368697060448201527f416e644c6f636b2829206e65774f776e6572203d3d2061646472657373283029606482015260840162000134565b6000805460ff60a01b1916600160a01b179055620001db8162000083565b50565b6000546001600160a01b031633146200023a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000134565b565b80516001600160a01b03811681146200025457600080fd5b919050565b600080600080600060a086880312156200027257600080fd5b6200027d866200023c565b94506200028d602087016200023c565b93506200029d604087016200023c565b9250620002ad606087016200023c565b9150620002bd608087016200023c565b90509295509295909350565b60805160a05160c051615d0d62000403600039600081816109430152818161111a015281816111a5015281816113950152818161143101528181611b62015281816122bd0152818161245f0152818161289001528181612cc901528181612d6001528181612f0201528181613658015281816140f3015281816141a201526149190152600081816109090152818161186201528181611942015281816119d00152818161213d01528181612750015281816127c60152818161343101528181613a59015281816143d00152818161465e015261472701526000818161055b0152818161146f01528181611776015281816118c201528181612051015281816121710152818161278f01528181612df301528181613120015281816133450152818161439a0152818161457201526146910152615d0d6000f3fe608060405234801561001057600080fd5b50600436106103535760003560e01c80638b648ee2116101c65780638b648ee2146103fa5780638da5cb5b1461069557806395ab3f8e1461069d57806395d32da3146106b0578063a4a3e79d146103fa578063a785a3a8146106c3578063aad20142146106d6578063b0607cf8146103fa578063b85ed91c146106e9578063b892bcc014610709578063bc197c811461071c578063bd63457b1461073b578063c008c1c214610744578063c230eec414610757578063c701c9941461077a578063c815729d1461078d578063cc97b426146107a0578063cd45e1fb146107b3578063cf10b7ab146103fa578063cf309012146107c6578063d284af94146107da578063d69225b5146107ed578063d8f2a78b14610800578063db85d59c14610813578063dd913bdb146103fa578063e1d927c814610833578063e1ec3c6814610846578063e2d3a0fe146108de578063e4c0eae5146108f1578063e7f4462914610427578063e9cbd82214610904578063ef706adf1461092b578063f00db2601461093e578063f1641cbe14610965578063f23a6e6114610978578063f2fde38b14610997578063fd76f59d146109aa57600080fd5b806301ffc9a714610358578063073624531461038057806310a45e6d1461039557806312052176146103a8578063150b7a02146103bb57806315e98744146103e75780631852b383146103fa57806319165874146104015780631d9389e914610414578063215cccdd1461042757806323535e091461042e578063250b8df8146104415780632f08d48b146103fa578063308224c21461045457806334d9289e1461046757806336a56bea1461047e57806338a33fb8146104915780633a24ca26146105205780633a2f8485146105435780633c117244146103fa5780633ce8d432146105565780633eda81ad146103fa578063422b20181461058a578063423156321461059d5780634c5caaec146105b05780635114cb52146105c357806358289c7e146105d65780635e6084bf146105e957806364c77735146104275780636a10b4541461060c5780636a7ab9af1461061f578063715018a6146106325780637de2072b1461063a5780638349d6be1461064d578063888a9e2b1461066f57806389b7265a14610682575b600080fd5b61036b610366366004614f5c565b6109bd565b60405190151581526020015b60405180910390f35b61039361038e366004614f8d565b6109f4565b005b6103936103a3366004614f8d565b610c0c565b6103936103b6366004615003565b610d8a565b6103ce6103c9366004615113565b610df7565b6040516001600160e01b03199091168152602001610377565b6103936103f53660046151c2565b610e08565b600061036b565b61039361040f36600461525b565b610f5d565b610393610422366004615003565b6110ac565b600161036b565b61039361043c366004614f8d565b611117565b61039361044f366004614f8d565b6111a2565b610393610462366004614f8d565b611230565b61047060045481565b604051908152602001610377565b61039361048c3660046152ba565b611392565b6104e661049f366004614f8d565b600560208190526000918252604082206001810154600282015460038301546004840154948401546006909401549295919490939092909181900b90610100900460ff1687565b604080519788526020880196909652948601939093526060850191909152608084015260000b60a0830152151560c082015260e001610377565b61036b61052e366004614f8d565b60066020526000908152604090205460ff1681565b610393610551366004614f8d565b611426565b61057d7f000000000000000000000000000000000000000000000000000000000000000081565b60405161037791906152dc565b6103936105983660046152f0565b611ac5565b6103936105ab366004615003565b611b34565b6103936105be3660046153b3565b611b5f565b6103936105d1366004614f8d565b611f2e565b6103936105e436600461542c565b612200565b61036b6105f7366004614f8d565b60076020526000908152604090205460ff1681565b61039361061a366004614f8d565b6122ba565b61039361062d3660046151c2565b61233e565b61039361241e565b610393610648366004614f8d565b61245c565b61066061065b366004614f8d565b6124ea565b60405161037793929190615449565b61039361067d3660046152ba565b6125a6565b61039361069036600461549a565b61288d565b61057d612cb7565b6103936106ab366004614f8d565b612cc6565b6103936106be3660046152ba565b612d5d565b6103936106d136600461542c565b612df1565b6103936106e4366004614f8d565b612eff565b6104706106f7366004614f8d565b600a6020526000908152604090205481565b6103936107173660046151c2565b612f83565b6103ce61072a36600461557d565b63bc197c8160e01b95945050505050565b61047060035481565b610393610752366004614f8d565b6130e0565b61076a610765366004614f8d565b6134ba565b604051610377949392919061562a565b610393610788366004614f8d565b613655565b61039361079b366004614f8d565b61378d565b6103936107ae366004614f8d565b613a8c565b6103936107c1366004615645565b613fa4565b60005461036b90600160a01b900460ff1681565b6103936107e83660046151c2565b61403a565b6103936107fb366004614f8d565b6140f0565b61039361080e366004615003565b61417b565b610470610821366004614f8d565b60086020526000908152604090205481565b610393610841366004614f8d565b61419f565b6108c6610854366004614f8d565b6009602081905260009182526040822080546001820154600283015460038401546004850154600586015460068701546007880154600889015499890154600a909901546001600160a01b039098169a9699959894979396929591949093919290919081900b90610100900460ff168c565b6040516103779c9b9a999897969594939291906156af565b6103936108ec3660046152ba565b614485565b6103936108ff366004614f8d565b61475a565b61057d7f000000000000000000000000000000000000000000000000000000000000000081565b610393610939366004614f8d565b614916565b61057d7f000000000000000000000000000000000000000000000000000000000000000081565b60025461057d906001600160a01b031681565b6103ce61098636600461573b565b63f23a6e6160e01b95945050505050565b6103936109a536600461542c565b614a37565b6103936109b83660046152f0565b614ad8565b60006001600160e01b03198216630271189760e51b14806109ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000818152600960205260409020546001600160a01b0316336001600160a01b031614610a7e576040805162461bcd60e51b81526020600482015260248101919091527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829205f6d6044820152600080516020615c1883398151915260648201526084015b60405180910390fd5b6000818152600a60205260408120549003610af65760405162461bcd60e51b815260206004820152603260248201527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829207265604482015271066696e616e63696e675b69645d203d3d20360741b6064820152608401610a75565b60026000828152600960205260409020600a0154610100900460ff166007811115610b2357610b23615699565b14610b8e5760405162461bcd60e51b815260206004820152604160248201527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829206c6f6044820152600080516020615c388339815191526064820152606560f81b608482015260a401610a75565b6000818152600a602090815260408083205460098352928190206002015481519384529183019190915282917f9baf84aeac18cf9f9b5746487496c49af0eb79e60f496ad193f9386e92c3c6a8910160405180910390a26000908152600a602081815260408084208054600984529185206002019190915591905255565b6000818152600960205260409020546001600160a01b0316336001600160a01b031614610ca75760405162461bcd60e51b815260206004820152604f6024820152600080516020615bf883398151915260448201527f6f7274697a6174696f6e2829205f6d736753656e646572282920213d206c6f6160648201526e3739adb4b22e973137b93937bbb2b960891b608482015260a401610a75565b60008181526006602052604090205460ff16610d2c5760405162461bcd60e51b815260206004820152604a6024820152600080516020615bf883398151915260448201527f6f7274697a6174696f6e28292021636f6e76657273696f6e546f416d6f7274696064820152697a6174696f6e5b69645d60b01b608482015260a401610a75565b60405181907ff28bf95bb58b9dae25c7311563fc735d43c342dc67f2e2f1eaa188761df802b890600090a26000908152600660209081526040808320805460ff199081169091556009909252909120600a0180549091166001179055565b610d92614b45565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b6064820152608401610a75565b630a85bd0160e11b5b949350505050565b610e10614b45565b60405162461bcd60e51b815260206004820152603e6024820152600080516020615b9883398151915260448201527f4552433732312829202163616e50756c6c4d756c7469455243373231282900006064820152608401610a75565b85811015610f5457868682818110610e8657610e86615800565b9050602002016020810190610e9b919061542c565b6001600160a01b031663b88d4fde30610eb2612cb7565b888886818110610ec457610ec4615800565b90506020020135878787818110610edd57610edd615800565b9050602002810190610eef9190615816565b6040518663ffffffff1660e01b8152600401610f0f9594939291906157cc565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505050508080610f4c90615872565b915050610e6c565b50505050505050565b610f65614b45565b60405162461bcd60e51b81526020600482015260326024820152600080516020615b988339815191526044820152712829202163616e50756c6c4d756c7469282960701b6064820152608401610a75565b838110156110a557611093610fc9612cb7565b868684818110610fdb57610fdb615800565b9050602002016020810190610ff0919061542c565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161101b91906152dc565b602060405180830381865afa158015611038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105c919061588b565b87878581811061106e5761106e615800565b9050602002016020810190611083919061542c565b6001600160a01b03169190614ba4565b8061109d81615872565b915050610fb6565b5050505050565b6110b4614b45565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b6064820152608401610a75565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461115f5760405162461bcd60e51b8152600401610a75906158a4565b60405181907fc001c5df2e7c7607dc9d9ab046c22e10b5d540fd06ef75fd2fb118634c702cba90600090a26000908152600760205260409020805460ff19169055565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146111ea5760405162461bcd60e51b8152600401610a75906158a4565b60405181907fc26159d36d0a2b8bd44b316438eb4bde8f81367bc96832216cb8fff2de368d7690600090a26000908152600660205260409020805460ff19166001179055565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316146112c55760405162461bcd60e51b81526020600482015260496024820152600080516020615bb883398151915260448201527f6c6c65742829205f6d736753656e646572282920213d206c6f616e735b69645d606482015268173137b93937bbb2b960b91b608482015260a401610a75565b60008181526007602052604090205460ff166113375760405162461bcd60e51b815260206004820152603e6024820152600080516020615bb883398151915260448201527f6c6c657428292021636f6e76657273696f6e546f42756c6c65745b69645d00006064820152608401610a75565b60405181907f43053dc356b6c4ec544a8acff075b699d433d2b751751683a24b4df4b7d59c5190600090a26000908152600760209081526040808320805460ff199081169091556009909252909120600a0180549091169055565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146113da5760405162461bcd60e51b8152600401610a75906158a4565b817fddcf0b9dbe14d2de9b94c3dcf9ad6f0767698e2b055eb5574b2967eee37f1a3e8260405161140c91815260200190565b60405180910390a260009182526008602052604090912055565b61142e614c07565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614806114ed57506040516335d2155560e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636ba42aaa906114ac9033906004016152dc565b602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed91906158fc565b6115995760405162461bcd60e51b815260206004820152606b60248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e742829205f6d60448201527f736753656e646572282920213d20756e6465727772697465722026262021495a60648201527f69766f65476c6f62616c735f4f43432847424c292e69734b6565706572285f6d60848201526a736753656e64657228292960a81b60a482015260c401610a75565b60026000828152600960205260409020600a0154610100900460ff1660078111156115c6576115c6615699565b146116315760405162461bcd60e51b815260206004820152604160248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e742829206c6f6044820152600080516020615c388339815191526064820152606560f81b608482015260a401610a75565b6000818152600960205260409020600401546116509061a8c09061591e565b42116116df5760405162461bcd60e51b815260206004820152605260248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e74282920626c60448201527f6f636b2e74696d657374616d70203c3d206c6f616e735b69645d2e7061796d656064820152716e744475654279202d20313220686f75727360701b608482015260a401610a75565b60008060006116ed846134ba565b5060008781526009602052604090205492955090935091506001600160a01b031684600080516020615bd8833981519152836117298688615931565b6117339190615931565b6000888152600960205260409020600781015460049091015488918891889161175b91615931565b60405161176c959493929190615944565b60405180910390a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f69190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118579190615967565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03160361196f5760008481526009602090815260409182902054825163396b392560e11b8152925161196a936001600160a01b03928316937f0000000000000000000000000000000000000000000000000000000000000000909316926372d6724a926004808401938290030181865afa15801561190a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192e9190615967565b6119388486615931565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190614c60565b61199c565b60008481526009602052604090205460025461199c916001600160a01b0390811691166119388486615931565b82156119f8576000848152600960205260409020546119f8906001600160a01b03166119c6612cb7565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016919086614c60565b600084815260096020526040902060050154600103611a39576000848152600960205260408120600a8101805461ff00191661030017905560040155611a68565b600084815260096020526040812060078101546004909101805491929091611a62908490615931565b90915550505b60008481526009602052604081206001018054859290611a8990849061591e565b90915550506000848152600960205260408120600501805460019290611ab090849061591e565b90915550506001805550611ac2915050565b50565b611acd614b45565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b6064820152608401610a75565b611b3c614b45565b611b59611b47612cb7565b6001600160a01b038616903086614c60565b50505050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611ba75760405162461bcd60e51b8152600401610a75906158a4565b60008411611c075760405162461bcd60e51b815260206004820152602760248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e6528292074656044820152660726d203d3d20360cc1b6064820152608401610a75565b8262093a801480611c1a57508262127500145b80611c275750826224ea00145b80611c345750826277f880145b80611c425750826301dfe200145b611ce95760405162461bcd60e51b815260206004820152606660248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e65282920696e60448201527f76616c6964207061796d656e74496e74657276616c2076616c75652c2074727960648201527f3a203836343030202a202837207c7c203134207c7c203238207c7c203931207c6084820152657c203336342960d01b60a482015260c401610a75565b600186118015611cfd575060018160000b13155b8015611d0c575062093a808210155b611da45760405162461bcd60e51b815260206004820152606060248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e652829206c6f60448201527f616e4944732e6c656e677468203c3d2031207c7c207061796d656e745363686560648201527f64756c65203e2031207c7c206772616365506572696f64203c20372064617973608482015260a401610a75565b8060000b6003547f31830e7e8e1e467720429d858edc1963a91b3c9925befc40bd96da84e037c237898989898989426203f480611de19190615931565b604051611df497969594939291906159b6565b60405180910390a36040518061010001604052808888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506020810187905260408101869052606081018590526080810184905260a001611e6a426203f480615931565b8152600083810b6020808401919091526001604093840152600354825260058152919020825180519192611ea392849290910190614edd565b5060208201516001808301919091556040830151600283015560608301516003808401919091556080840151600484015560a0840151600584015560c08401516006909301805460e09095015115156101000261ffff1990951660ff90941693909317939093179091558154909190600090611f20908490615931565b909155505050505050505050565b611f36614c07565b60026000828152600960205260409020600a0154610100900460ff166007811115611f6357611f63615699565b14611fc45760405162461bcd60e51b815260206004820152603e60248201527f4f43435f4d6f64756c61723a3a6d616b655061796d656e742829206c6f616e736044820152600080516020615cb88339815191526064820152608401610a75565b6000806000611fd2846134ba565b50925092509250611fe03390565b6001600160a01b031684600080516020615bd8833981519152836120048688615931565b61200e9190615931565b6000888152600960205260409020600781015460049091015488918891889161203691615931565b604051612047959493929190615944565b60405180910390a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d19190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561210e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121329190615967565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316036121d2576121cd335b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561190a573d6000803e3d6000fd5b6121ed565b6121ed335b6002546001600160a01b03166119388486615931565b82156119f8576119f8335b6119c6612cb7565b612208614b45565b600054600160a01b900460ff16156122325760405162461bcd60e51b8152600401610a75906159f4565b6001600160a01b03811661229e576040805162461bcd60e51b8152602060048201526024810191909152600080516020615c9883398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d20616464726573732830296064820152608401610a75565b6000805460ff60a01b1916600160a01b179055611ac281614c98565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146123025760405162461bcd60e51b8152600401610a75906158a4565b60405181907f7f5df20e85483a0ee204aeb7ae47ff330ffa6780edacd9a480c6cba37a2fd8ab90600090a2600090815260086020526040812055565b612346614b45565b60405162461bcd60e51b815260206004820152603060248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469282960448201526f202163616e507573684d756c7469282960801b6064820152608401610a75565b85811015610f545761240c6123ba612cb7565b308787858181106123cd576123cd615800565b905060200201358a8a868181106123e6576123e6615800565b90506020020160208101906123fb919061542c565b6001600160a01b0316929190614c60565b8061241681615872565b9150506123a7565b612426614b45565b600054600160a01b900460ff16156124505760405162461bcd60e51b8152600401610a75906159f4565b61245a6000614c98565b565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146124a45760405162461bcd60e51b8152600401610a75906158a4565b60405181907f4f257439fc7e66e47d44a6b3974facdf94b54e184733ab2581d744990d070ef690600090a26000908152600760205260409020805460ff19166001179055565b6000806124f5614f28565b60008481526009602081815260408084208054600a820154600183015488526002830154888601526003830154938801939093526004820154606088015260058201546080880152600682015460a088015260078083015460c0890152600883015460e089015291850154610100808901919091528a8752949093526001600160a01b0390921696509283900b9450910460ff169081111561259957612599615699565b6101208201529193909250565b6125ae614c07565b60046000838152600960205260409020600a0154610100900460ff1660078111156125db576125db615699565b1461265a5760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a7265736f6c76654465666175742829206c6f6160448201527f6e735b69645d2e737461746520213d204c6f616e53746174652e44656661756c6064820152621d195960ea1b608482015260a401610a75565b600082815260096020526040812060010154821061269f57506000828152600960205260408120600181018054929055600a01805461ff0019166106001790556126c9565b506000828152600960205260408120600101805483928392916126c390849061591e565b90915550505b336001600160a01b0316837f92163773d605b6d564984a8f4d6fe46f32149fc640adf237b5baa1ce80b6ad1c8360066000888152600960205260409020600a0154610100900460ff16600781111561272357612723615699565b60408051938452911460208301520160405180910390a361277833612746612cb7565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016919084614c60565b60405163dc3c1da560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906379de292790829063dc3c1da5906127ee9086907f000000000000000000000000000000000000000000000000000000000000000090600401615a29565b602060405180830381865afa15801561280b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282f919061588b565b6040518263ffffffff1660e01b815260040161284d91815260200190565b600060405180830381600087803b15801561286757600080fd5b505af115801561287b573d6000803e3d6000fd5b505050505061288960018055565b5050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146128d55760405162461bcd60e51b8152600401610a75906158a4565b600084116129315760405162461bcd60e51b8152602060048201526024808201527f4f43435f4d6f64756c61723a3a6372656174654f666665722829207465726d2060448201526303d3d20360e41b6064820152608401610a75565b8262093a80148061294457508262127500145b806129515750826224ea00145b8061295e5750826277f880145b8061296c5750826301dfe200145b612a105760405162461bcd60e51b815260206004820152606360248201527f4f43435f4d6f64756c61723a3a6372656174654f66666572282920696e76616c60448201527f6964207061796d656e74496e74657276616c2076616c75652c207472793a203860648201527f36343030202a202837207c7c203134207c7c203238207c7c203931207c7c203360848201526236342960e81b60a482015260c401610a75565b62093a80821015612a7b5760405162461bcd60e51b815260206004820152602f60248201527f4f43435f4d6f64756c61723a3a6372656174654f66666572282920677261636560448201526e506572696f64203c2037206461797360881b6064820152608401610a75565b60018160000b1315612ae65760405162461bcd60e51b815260206004820152602e60248201527f4f43435f4d6f64756c61723a3a6372656174654f666665722829207061796d6560448201526d6e745363686564756c65203e203160901b6064820152608401610a75565b8060000b600454896001600160a01b03167f94f899dadfc609e7c15604401a348d950fb227403d0a783352ec927fa7e1d5298a8a8a8a8a426203f480612b2c9190615931565b8b604051612b409796959493929190615a40565b60405180910390a4604051806101800160405280896001600160a01b0316815260200188815260200187815260200186815260200160008152602001858152602001858152602001848152602001426203f480612b9d9190615931565b815260208101849052600083900b604082015260600160015b905260048054600090815260096020818152604092839020855181546001600160a01b039091166001600160a01b03199091161781559085015160018201559184015160028301556060840151600383015560808401519282019290925560a0830151600582015560c0830151600682015560e083015160078083019190915561010080850151600884015561012085015193830193909355610140840151600a8301805460ff90921660ff198316811782556101608701519495919361ffff1990931617918490811115612c8d57612c8d615699565b0217905550905050600160046000828254612ca89190615931565b90915550505050505050505050565b6000546001600160a01b031690565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614612d0e5760405162461bcd60e51b8152600401610a75906158a4565b6040518181527f01f095e1db14b4097879dfad43aed8f7e3338fce261403ffd93286f67bcbc2729060200160405180910390a16000908152600560205260409020600601805461ff0019169055565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614612da55760405162461bcd60e51b8152600401610a75906158a4565b817f4763469296b708c4e6f64af139f17b02ab4191d85b44bca400a9364ab90f5fe382604051612dd791815260200190565b60405180910390a26000918252600a602052604090912055565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316620960456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e729190615967565b6001600160a01b0316336001600160a01b031614612e8f57600080fd5b6001600160a01b038116612ea257600080fd5b6002546040516001600160a01b03918216918316907f82f2be5c35e63cad0f00b86cbce7d31261fd13665d7c5b210a5828dd5494d05390600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614612f475760405162461bcd60e51b8152600401610a75906158a4565b60405181907f4b3d5546db4f01514b7862af5a9f67f5edff7aede068c71f417697310b867bb390600090a26000908152600a6020526040812055565b612f8b614b45565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b6064820152608401610a75565b85811015610f545786868281811061301257613012615800565b9050602002016020810190613027919061542c565b6001600160a01b031663b88d4fde61303d612cb7565b3088888681811061305057613050615800565b9050602002013587878781811061306957613069615800565b905060200281019061307b9190615816565b6040518663ffffffff1660e01b815260040161309b9594939291906157cc565b600060405180830381600087803b1580156130b557600080fd5b505af11580156130c9573d6000803e3d6000fd5b5050505080806130d890615872565b915050612ff8565b6130e8614c07565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316148061319e5750604051630bb18f5f60e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632ec63d7c9061315d9033906004016152dc565b602060405180830381865afa15801561317a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319e91906158fc565b61322e5760405162461bcd60e51b815260206004820152605560248201527f4f43435f4d6f64756c61723a3a63616c6c4c6f616e2829205f6d736753656e6460448201527f6572282920213d206c6f616e735b69645d2e626f72726f776572202626202169606482015274734c6f636b6572285f6d736753656e64657228292960581b608482015260a401610a75565b60026000828152600960205260409020600a0154610100900460ff16600781111561325b5761325b615699565b146132cc5760405162461bcd60e51b815260206004820152603b60248201527f4f43435f4d6f64756c61723a3a63616c6c4c6f616e2829206c6f616e735b696460448201527a5d2e737461746520213d204c6f616e53746174652e41637469766560281b6064820152608401610a75565b60008181526009602052604081206001015490806132e9846134ba565b509250925050837f0d8ffb93115b6e4936fd4b12c998bc38980df7a5f5d0cf6b3c800c1acd594caa82848661331e9190615931565b6133289190615931565b85858560405161333b949392919061562a565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c59190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa158015613402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134269190615967565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03160361346c576134673361216f565b613475565b613475336121d7565b61347e336121f8565b50505060009081526009602052604081206001808201839055600482018390556005820192909255600a01805461ff0019166103001790558055565b6000818152600960205260408120600a0154819081908190810b810361350d576000858152600960205260409020600501546001036135085760008581526009602052604090206001015493505b613533565b600085815260096020526040902060058101546001909101546135309190615a86565b93505b6000858152600960205260409020600401544211801561357d575060026000868152600960205260409020600a0154610100900460ff16600781111561357b5761357b615699565b145b156135e8576135926127106301e13380615a9a565b600086815260096020526040902060038101546004909101546135b5904261591e565b6000888152600960205260409020600101546135d19190615a9a565b6135db9190615a9a565b6135e59190615a86565b91505b6135f86127106301e13380615a9a565b600086815260096020526040902060028101546007820154600190920154909161362191615a9a565b61362b9190615a9a565b6136359190615a86565b9250816136428486615931565b61364c9190615931565b90509193509193565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461369d5760405162461bcd60e51b8152600401610a75906158a4565b60066000828152600960205260409020600a0154610100900460ff1660078111156136ca576136ca615699565b1461373d5760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a6d61726b5265706169642829206c6f616e735b60448201527f69645d2e737461746520213d204c6f616e53746174652e5265736f6c766564006064820152608401610a75565b60405181907f2a2fdae8d2b224badb596c7192d6bb8eaeac464eb5e0532029bf9515b21f46bb90600090a26000908152600960205260408120600a8101805461ff00191661030017905560040155565b613795614c07565b60016000828152600960205260409020600a0154610100900460ff1660078111156137c2576137c2615699565b146138235760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a6163636570744f666665722829206c6f616e736044820152600080516020615c788339815191526064820152608401610a75565b60008181526009602052604090206008015442106138b55760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a6163636570744f66666572282920626c6f636b60448201527f2e74696d657374616d70203e3d206c6f616e735b69645d2e6f6666657245787060648201526269727960e81b608482015260a401610a75565b6000818152600960205260409020546001600160a01b0316336001600160a01b03161461394a5760405162461bcd60e51b815260206004820152603d60248201527f4f43435f4d6f64756c61723a3a6163636570744f666665722829205f6d73675360448201527f656e646572282920213d206c6f616e735b69645d2e626f72726f7765720000006064820152608401610a75565b6000818152600960205260409020805460018201546007909201546001600160a01b039091169183917fd2bcb88564ee3936089ae1e4ab2296ba37e8775949ff81054e4b3b737929889291906139a362093a8042615ab1565b6139ad904261591e565b6139ba90620bdd80615931565b6139c49190615931565b6040805192835260208301919091520160405180910390a36000818152600960205260409020600a8101805461ff00191661020017905560070154613a0c62093a8042615ab1565b613a16904261591e565b613a2390620bdd80615931565b613a2d9190615931565b600082815260096020526040902060048101919091558054600190910154613a83916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692911690614ba4565b611ac260018055565b600081815260056020526040902060060154610100900460ff16613b0e5760405162461bcd60e51b815260206004820152603360248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e6528292021636f6d604482015272189a5b985d1a5bdb9cd6da59174b9d985b1a59606a1b6064820152608401610a75565b600081815260056020819052604090912001544210613ba55760405162461bcd60e51b815260206004820152604760248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e65282920626c6f6360448201527f6b2e74696d657374616d70203e3d20636f6d62696e6174696f6e735b69645d2e6064820152666578706972657360c81b608482015260a401610a75565b60008181526005602052604080822060068101805461ff0019169081905560028201546003830154600484015494519290950b9433947fbd597f2b72b5fccc6d032087fd1cac7775df7334836826a87d9c525d76e6b4d394613c0b949093929190615ac5565b60405180910390a360008060005b600084815260056020526040902054811015613e46576000848152600560205260408120805483908110613c4f57613c4f615800565b600091825260208083209091015480835260099091526040909120549091506001600160a01b0316613c7e3390565b6001600160a01b031614613d055760405162461bcd60e51b815260206004820152604260248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e652829205f6d736760448201527f53656e646572282920213d206c6f616e735b6c6f616e49445d2e626f72726f7760648201526132b960f11b608482015260a401610a75565b60026000828152600960205260409020600a0154610100900460ff166007811115613d3257613d32615699565b14613db15760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e652829206c6f616e60448201527f735b6c6f616e49445d2e737461746520213d204c6f616e53746174652e41637460648201526269766560e81b608482015260a401610a75565b600081815260096020526040902060010154613dcd9085615931565b60008281526009602052604090206002810154600190910154919550613df291615a9a565b613dfc9084615931565b600091825260096020526040822060018101839055600481018390556005810192909255600a909101805461ff001916610700179055915080613e3e81615872565b915050613c19565b50613e518282615a86565b6000848152600560205260408120600281015460018201546003830154600480850154600690950154905496975092959194909392900b908190337f795cefa377a89d82c74691764ff0c7515591f1fb4e0af7e4ae7395360229567b8a8a8989613ebe62093a8042615ab1565b613ec8904261591e565b613ed590620bdd80615931565b613edf9190615931565b8c8b8b604051613ef59796959493929190615a40565b60405180910390a4604051806101800160405280613f103390565b6001600160a01b031681526020018881526020018781526020018581526020018462093a8042613f409190615ab1565b613f4a904261591e565b613f5790620bdd80615931565b613f619190615931565b81526020018681526020018681526020018481526020016201518042613f87919061591e565b815260208101849052600083900b60408201526060016002612bb6565b613fac614b45565b614035613fb7612cb7565b6040516370a0823160e01b81526001600160a01b038616906370a0823190613fe39030906004016152dc565b602060405180830381865afa158015614000573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614024919061588b565b6001600160a01b0386169190614ba4565b505050565b614042614b45565b6040805162461bcd60e51b8152602060048201526024810191909152600080516020615b9883398151915260448201527f5061727469616c2829202163616e50756c6c4d756c74695061727469616c28296064820152608401610a75565b85811015610f54576140de6140b3612cb7565b8686848181106140c5576140c5615800565b9050602002013589898581811061106e5761106e615800565b806140e881615872565b9150506140a0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146141385760405162461bcd60e51b8152600401610a75906158a4565b60405181907f7643f83ecdd3d6580d8d54233cc6670ea7bb9fb170a95d84f6ba97a8b4e5ae8990600090a26000908152600660205260409020805460ff19169055565b614183614b45565b611b5961418e612cb7565b6001600160a01b0386169085614ba4565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146141e75760405162461bcd60e51b8152600401610a75906158a4565b60026000828152600960205260409020600a0154610100900460ff16600781111561421457614214615699565b146142635760405162461bcd60e51b815260206004820152603e6024820152600080516020615c588339815191526044820152600080516020615cb88339815191526064820152608401610a75565b600081815260096020819052604090912090810154600490910154429161428991615931565b1061430f5760405162461bcd60e51b815260206004820152605c6024820152600080516020615c5883398151915260448201527f5b69645d2e7061796d656e744475654279202b206c6f616e735b69645d2e677260648201527b0616365506572696f64203e3d20626c6f636b2e74696d657374616d760241b608482015260a401610a75565b807f707ca27730c34090bd5dcfdda355646f6c358e2fa4d9416d2b4e5407404c6f71600960008481526020019081526020016000206001015460405161435791815260200190565b60405180910390a260008181526009602052604090819020600a8101805461ff00191661040017905560010154905163dc3c1da560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916359e269ee91839163dc3c1da5916143f891907f000000000000000000000000000000000000000000000000000000000000000090600401615a29565b602060405180830381865afa158015614415573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614439919061588b565b6040518263ffffffff1660e01b815260040161445791815260200190565b600060405180830381600087803b15801561447157600080fd5b505af11580156110a5573d6000803e3d6000fd5b61448d614c07565b60066000838152600960205260409020600a0154610100900460ff1660078111156144ba576144ba615699565b146145395760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a737570706c79496e7465726573742829206c6f60448201527f616e735b69645d2e737461746520213d204c6f616e53746174652e5265736f6c6064820152621d995960ea1b608482015260a401610a75565b604051818152339083907f48553440463342ea69fd346ab316f094939577d42fcd3810f0cdc03cadbc13c89060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156145ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145f29190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561462f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146539190615967565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03160361471657614711337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156146ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127469190615967565b614751565b614751336002546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692911684614c60565b61288960018055565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316146147df576040805162461bcd60e51b81526020600482015260248101919091527f4f43435f4d6f64756c61723a3a6170706c79457874656e73696f6e2829205f6d6044820152600080516020615c188339815191526064820152608401610a75565b6000818152600860205260409020546148545760405162461bcd60e51b815260206004820152603160248201527f4f43435f4d6f64756c61723a3a6170706c79457874656e73696f6e2829206578604482015270074656e73696f6e735b69645d203d3d203607c1b6064820152608401610a75565b807fc50b066a94517abf3619b358e69aa6e87266434a150c472aac968ec3dc39140e600860008481526020019081526020016000205460405161489991815260200190565b60405180910390a2600081815260086020908152604080832054600990925282206005018054919290916148ce908490615931565b909155505060008181526008602090815260408083205460099092528220600601805491929091614900908490615931565b9091555050600090815260086020526040812055565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461495e5760405162461bcd60e51b8152600401610a75906158a4565b60016000828152600960205260409020600a0154610100900460ff16600781111561498b5761498b615699565b146149ec5760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a63616e63656c4f666665722829206c6f616e736044820152600080516020615c788339815191526064820152608401610a75565b60405181907fc28b4aed030bfacc245c0501326e1beb8c0ef0d60e4edc21067fdeb52da2a7aa90600090a26000908152600960205260409020600a01805461ff001916610500179055565b614a3f614b45565b600054600160a01b900460ff1615614a695760405162461bcd60e51b8152600401610a75906159f4565b6001600160a01b038116614acf5760405162461bcd60e51b81526020600482015260396024820152600080516020615c988339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b6064820152608401610a75565b611ac281614c98565b614ae0614b45565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b6064820152608401610a75565b33614b4e612cb7565b6001600160a01b03161461245a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a75565b6040516001600160a01b03831660248201526044810182905261403590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614ce8565b600260015403614c595760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a75565b6002600155565b6040516001600160a01b0380851660248301528316604482015260648101829052611b599085906323b872dd60e01b90608401614bd0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000614d3d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614dba9092919063ffffffff16565b8051909150156140355780806020019051810190614d5b91906158fc565b6140355760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a75565b6060610e00848460008585600080866001600160a01b03168587604051614de19190615b48565b60006040518083038185875af1925050503d8060008114614e1e576040519150601f19603f3d011682016040523d82523d6000602084013e614e23565b606091505b5091509150614e3487838387614e3f565b979650505050505050565b60608315614eae578251600003614ea7576001600160a01b0385163b614ea75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a75565b5081610e00565b610e008383815115614ec35781518083602001fd5b8060405162461bcd60e51b8152600401610a759190615b64565b828054828255906000526020600020908101928215614f18579160200282015b82811115614f18578251825591602001919060010190614efd565b50614f24929150614f47565b5090565b604051806101400160405280600a906020820280368337509192915050565b5b80821115614f245760008155600101614f48565b600060208284031215614f6e57600080fd5b81356001600160e01b031981168114614f8657600080fd5b9392505050565b600060208284031215614f9f57600080fd5b5035919050565b6001600160a01b0381168114611ac257600080fd5b60008083601f840112614fcd57600080fd5b5081356001600160401b03811115614fe457600080fd5b602083019150836020828501011115614ffc57600080fd5b9250929050565b6000806000806060858703121561501957600080fd5b843561502481614fa6565b93506020850135925060408501356001600160401b0381111561504657600080fd5b61505287828801614fbb565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561509c5761509c61505e565b604052919050565b600082601f8301126150b557600080fd5b81356001600160401b038111156150ce576150ce61505e565b6150e1601f8201601f1916602001615074565b8181528460208386010111156150f657600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561512957600080fd5b843561513481614fa6565b9350602085013561514481614fa6565b92506040850135915060608501356001600160401b0381111561516657600080fd5b615172878288016150a4565b91505092959194509250565b60008083601f84011261519057600080fd5b5081356001600160401b038111156151a757600080fd5b6020830191508360208260051b8501011115614ffc57600080fd5b600080600080600080606087890312156151db57600080fd5b86356001600160401b03808211156151f257600080fd5b6151fe8a838b0161517e565b9098509650602089013591508082111561521757600080fd5b6152238a838b0161517e565b9096509450604089013591508082111561523c57600080fd5b5061524989828a0161517e565b979a9699509497509295939492505050565b6000806000806040858703121561527157600080fd5b84356001600160401b038082111561528857600080fd5b6152948883890161517e565b909650945060208701359150808211156152ad57600080fd5b506150528782880161517e565b600080604083850312156152cd57600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a03121561530b57600080fd5b873561531681614fa6565b965060208801356001600160401b038082111561533257600080fd5b61533e8b838c0161517e565b909850965060408a013591508082111561535757600080fd5b6153638b838c0161517e565b909650945060608a013591508082111561537c57600080fd5b506153898a828b01614fbb565b989b979a50959850939692959293505050565b8035600081900b81146153ae57600080fd5b919050565b600080600080600080600060c0888a0312156153ce57600080fd5b87356001600160401b038111156153e457600080fd5b6153f08a828b0161517e565b9098509650506020880135945060408801359350606088013592506080880135915061541e60a0890161539c565b905092959891949750929550565b60006020828403121561543e57600080fd5b8135614f8681614fa6565b6001600160a01b0384168152600083810b602080840191909152610180830191604084019085905b600a81101561548e57815183529183019190830190600101615471565b50505050949350505050565b600080600080600080600080610100898b0312156154b757600080fd5b88356154c281614fa6565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c089013591506154fa60e08a0161539c565b90509295985092959890939650565b600082601f83011261551a57600080fd5b813560206001600160401b038211156155355761553561505e565b8160051b615544828201615074565b928352848101820192828101908785111561555e57600080fd5b83870192505b84831015614e3457823582529183019190830190615564565b600080600080600060a0868803121561559557600080fd5b85356155a081614fa6565b945060208601356155b081614fa6565b935060408601356001600160401b03808211156155cc57600080fd5b6155d889838a01615509565b945060608801359150808211156155ee57600080fd5b6155fa89838a01615509565b9350608088013591508082111561561057600080fd5b5061561d888289016150a4565b9150509295509295909350565b93845260208401929092526040830152606082015260800190565b60008060006040848603121561565a57600080fd5b833561566581614fa6565b925060208401356001600160401b0381111561568057600080fd5b61568c86828701614fbb565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b60006101808201905060018060a01b038e1682528c60208301528b60408301528a60608301528960808301528860a08301528760c08301528660e083015285610100830152846101208301528360000b6101408301526008831061572357634e487b7160e01b600052602160045260246000fd5b826101608301529d9c50505050505050505050505050565b600080600080600060a0868803121561575357600080fd5b853561575e81614fa6565b9450602086013561576e81614fa6565b9350604086013592506060860135915060808601356001600160401b0381111561579757600080fd5b61561d888289016150a4565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386811682528516602082015260408101849052608060608201819052600090614e3490830184866157a3565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261582d57600080fd5b8301803591506001600160401b0382111561584757600080fd5b602001915036819003821315614ffc57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016158845761588461585c565b5060010190565b60006020828403121561589d57600080fd5b5051919050565b60208082526038908201527f4f43435f4d6f64756c61723a3a6973556e6465727772697465722829205f6d7360408201527733a9b2b73232b9141490109e903ab73232b93bb934ba32b960411b606082015260800190565b60006020828403121561590e57600080fd5b81518015158114614f8657600080fd5b818103818111156109ee576109ee61585c565b808201808211156109ee576109ee61585c565b948552602085019390935260408401919091526060830152608082015260a00190565b60006020828403121561597957600080fd5b8151614f8681614fa6565b81835260006001600160fb1b0383111561599d57600080fd5b8260051b80836020870137939093016020019392505050565b60c0815260006159ca60c08301898b615984565b60208301979097525060408101949094526060840192909252608083015260a09091015292915050565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b9182526001600160a01b0316602082015260400190565b968752602087019590955260408601939093526060850191909152608084015260a083015260c082015260e00190565b634e487b7160e01b600052601260045260246000fd5b600082615a9557615a95615a70565b500490565b80820281158282048414176109ee576109ee61585c565b600082615ac057615ac0615a70565b500690565b6000608082016080835280875480835260a08501915088600052602092508260002060005b82811015615b0657815484529284019260019182019101615aea565b50505090830195909552506040810192909252606090910152919050565b60005b83811015615b3f578181015183820152602001615b27565b50506000910152565b60008251615b5a818460208701615b24565b9190910192915050565b6020815260008251806020840152615b83816040850160208701615b24565b601f01601f1916919091016040019291505056fe5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c74694f43435f4d6f64756c61723a3a6170706c79436f6e76657273696f6e546f4275156efd898bf24c8c6af5b216d47176074332f389713e96fec4af716703edb6374f43435f4d6f64756c61723a3a6170706c79436f6e76657273696f6e546f416d736753656e646572282920213d206c6f616e735b69645d2e626f72726f776572616e735b69645d2e737461746520213d204c6f616e53746174652e41637469764f43435f4d6f64756c61723a3a6d61726b44656661756c742829206c6f616e735b69645d2e737461746520213d204c6f616e53746174652e4f666665726564004f776e61626c654c6f636b65643a3a7472616e736665724f776e6572736869705b69645d2e737461746520213d204c6f616e53746174652e4163746976650000a264697066735822122088ab3b67f8e0522e8a2e4a89bf2a85a405fcb8aafc73e606fc2f795afb4bb84b64736f6c63430008110033000000000000000000000000b65a66621d7de34afec9b9ac0755133051550dd7000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da660000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab60000000000000000000000006172f8103d156c49532e610232d33f0796e6ef87

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103535760003560e01c80638b648ee2116101c65780638b648ee2146103fa5780638da5cb5b1461069557806395ab3f8e1461069d57806395d32da3146106b0578063a4a3e79d146103fa578063a785a3a8146106c3578063aad20142146106d6578063b0607cf8146103fa578063b85ed91c146106e9578063b892bcc014610709578063bc197c811461071c578063bd63457b1461073b578063c008c1c214610744578063c230eec414610757578063c701c9941461077a578063c815729d1461078d578063cc97b426146107a0578063cd45e1fb146107b3578063cf10b7ab146103fa578063cf309012146107c6578063d284af94146107da578063d69225b5146107ed578063d8f2a78b14610800578063db85d59c14610813578063dd913bdb146103fa578063e1d927c814610833578063e1ec3c6814610846578063e2d3a0fe146108de578063e4c0eae5146108f1578063e7f4462914610427578063e9cbd82214610904578063ef706adf1461092b578063f00db2601461093e578063f1641cbe14610965578063f23a6e6114610978578063f2fde38b14610997578063fd76f59d146109aa57600080fd5b806301ffc9a714610358578063073624531461038057806310a45e6d1461039557806312052176146103a8578063150b7a02146103bb57806315e98744146103e75780631852b383146103fa57806319165874146104015780631d9389e914610414578063215cccdd1461042757806323535e091461042e578063250b8df8146104415780632f08d48b146103fa578063308224c21461045457806334d9289e1461046757806336a56bea1461047e57806338a33fb8146104915780633a24ca26146105205780633a2f8485146105435780633c117244146103fa5780633ce8d432146105565780633eda81ad146103fa578063422b20181461058a578063423156321461059d5780634c5caaec146105b05780635114cb52146105c357806358289c7e146105d65780635e6084bf146105e957806364c77735146104275780636a10b4541461060c5780636a7ab9af1461061f578063715018a6146106325780637de2072b1461063a5780638349d6be1461064d578063888a9e2b1461066f57806389b7265a14610682575b600080fd5b61036b610366366004614f5c565b6109bd565b60405190151581526020015b60405180910390f35b61039361038e366004614f8d565b6109f4565b005b6103936103a3366004614f8d565b610c0c565b6103936103b6366004615003565b610d8a565b6103ce6103c9366004615113565b610df7565b6040516001600160e01b03199091168152602001610377565b6103936103f53660046151c2565b610e08565b600061036b565b61039361040f36600461525b565b610f5d565b610393610422366004615003565b6110ac565b600161036b565b61039361043c366004614f8d565b611117565b61039361044f366004614f8d565b6111a2565b610393610462366004614f8d565b611230565b61047060045481565b604051908152602001610377565b61039361048c3660046152ba565b611392565b6104e661049f366004614f8d565b600560208190526000918252604082206001810154600282015460038301546004840154948401546006909401549295919490939092909181900b90610100900460ff1687565b604080519788526020880196909652948601939093526060850191909152608084015260000b60a0830152151560c082015260e001610377565b61036b61052e366004614f8d565b60066020526000908152604090205460ff1681565b610393610551366004614f8d565b611426565b61057d7f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da6681565b60405161037791906152dc565b6103936105983660046152f0565b611ac5565b6103936105ab366004615003565b611b34565b6103936105be3660046153b3565b611b5f565b6103936105d1366004614f8d565b611f2e565b6103936105e436600461542c565b612200565b61036b6105f7366004614f8d565b60076020526000908152604090205460ff1681565b61039361061a366004614f8d565b6122ba565b61039361062d3660046151c2565b61233e565b61039361241e565b610393610648366004614f8d565b61245c565b61066061065b366004614f8d565b6124ea565b60405161037793929190615449565b61039361067d3660046152ba565b6125a6565b61039361069036600461549a565b61288d565b61057d612cb7565b6103936106ab366004614f8d565b612cc6565b6103936106be3660046152ba565b612d5d565b6103936106d136600461542c565b612df1565b6103936106e4366004614f8d565b612eff565b6104706106f7366004614f8d565b600a6020526000908152604090205481565b6103936107173660046151c2565b612f83565b6103ce61072a36600461557d565b63bc197c8160e01b95945050505050565b61047060035481565b610393610752366004614f8d565b6130e0565b61076a610765366004614f8d565b6134ba565b604051610377949392919061562a565b610393610788366004614f8d565b613655565b61039361079b366004614f8d565b61378d565b6103936107ae366004614f8d565b613a8c565b6103936107c1366004615645565b613fa4565b60005461036b90600160a01b900460ff1681565b6103936107e83660046151c2565b61403a565b6103936107fb366004614f8d565b6140f0565b61039361080e366004615003565b61417b565b610470610821366004614f8d565b60086020526000908152604090205481565b610393610841366004614f8d565b61419f565b6108c6610854366004614f8d565b6009602081905260009182526040822080546001820154600283015460038401546004850154600586015460068701546007880154600889015499890154600a909901546001600160a01b039098169a9699959894979396929591949093919290919081900b90610100900460ff168c565b6040516103779c9b9a999897969594939291906156af565b6103936108ec3660046152ba565b614485565b6103936108ff366004614f8d565b61475a565b61057d7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b610393610939366004614f8d565b614916565b61057d7f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab681565b60025461057d906001600160a01b031681565b6103ce61098636600461573b565b63f23a6e6160e01b95945050505050565b6103936109a536600461542c565b614a37565b6103936109b83660046152f0565b614ad8565b60006001600160e01b03198216630271189760e51b14806109ee57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000818152600960205260409020546001600160a01b0316336001600160a01b031614610a7e576040805162461bcd60e51b81526020600482015260248101919091527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829205f6d6044820152600080516020615c1883398151915260648201526084015b60405180910390fd5b6000818152600a60205260408120549003610af65760405162461bcd60e51b815260206004820152603260248201527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829207265604482015271066696e616e63696e675b69645d203d3d20360741b6064820152608401610a75565b60026000828152600960205260409020600a0154610100900460ff166007811115610b2357610b23615699565b14610b8e5760405162461bcd60e51b815260206004820152604160248201527f4f43435f4d6f64756c61723a3a6170706c79526566696e616e63652829206c6f6044820152600080516020615c388339815191526064820152606560f81b608482015260a401610a75565b6000818152600a602090815260408083205460098352928190206002015481519384529183019190915282917f9baf84aeac18cf9f9b5746487496c49af0eb79e60f496ad193f9386e92c3c6a8910160405180910390a26000908152600a602081815260408084208054600984529185206002019190915591905255565b6000818152600960205260409020546001600160a01b0316336001600160a01b031614610ca75760405162461bcd60e51b815260206004820152604f6024820152600080516020615bf883398151915260448201527f6f7274697a6174696f6e2829205f6d736753656e646572282920213d206c6f6160648201526e3739adb4b22e973137b93937bbb2b960891b608482015260a401610a75565b60008181526006602052604090205460ff16610d2c5760405162461bcd60e51b815260206004820152604a6024820152600080516020615bf883398151915260448201527f6f7274697a6174696f6e28292021636f6e76657273696f6e546f416d6f7274696064820152697a6174696f6e5b69645d60b01b608482015260a401610a75565b60405181907ff28bf95bb58b9dae25c7311563fc735d43c342dc67f2e2f1eaa188761df802b890600090a26000908152600660209081526040808320805460ff199081169091556009909252909120600a0180549091166001179055565b610d92614b45565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b6064820152608401610a75565b630a85bd0160e11b5b949350505050565b610e10614b45565b60405162461bcd60e51b815260206004820152603e6024820152600080516020615b9883398151915260448201527f4552433732312829202163616e50756c6c4d756c7469455243373231282900006064820152608401610a75565b85811015610f5457868682818110610e8657610e86615800565b9050602002016020810190610e9b919061542c565b6001600160a01b031663b88d4fde30610eb2612cb7565b888886818110610ec457610ec4615800565b90506020020135878787818110610edd57610edd615800565b9050602002810190610eef9190615816565b6040518663ffffffff1660e01b8152600401610f0f9594939291906157cc565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505050508080610f4c90615872565b915050610e6c565b50505050505050565b610f65614b45565b60405162461bcd60e51b81526020600482015260326024820152600080516020615b988339815191526044820152712829202163616e50756c6c4d756c7469282960701b6064820152608401610a75565b838110156110a557611093610fc9612cb7565b868684818110610fdb57610fdb615800565b9050602002016020810190610ff0919061542c565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161101b91906152dc565b602060405180830381865afa158015611038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105c919061588b565b87878581811061106e5761106e615800565b9050602002016020810190611083919061542c565b6001600160a01b03169190614ba4565b8061109d81615872565b915050610fb6565b5050505050565b6110b4614b45565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b6064820152608401610a75565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b03161461115f5760405162461bcd60e51b8152600401610a75906158a4565b60405181907fc001c5df2e7c7607dc9d9ab046c22e10b5d540fd06ef75fd2fb118634c702cba90600090a26000908152600760205260409020805460ff19169055565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146111ea5760405162461bcd60e51b8152600401610a75906158a4565b60405181907fc26159d36d0a2b8bd44b316438eb4bde8f81367bc96832216cb8fff2de368d7690600090a26000908152600660205260409020805460ff19166001179055565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316146112c55760405162461bcd60e51b81526020600482015260496024820152600080516020615bb883398151915260448201527f6c6c65742829205f6d736753656e646572282920213d206c6f616e735b69645d606482015268173137b93937bbb2b960b91b608482015260a401610a75565b60008181526007602052604090205460ff166113375760405162461bcd60e51b815260206004820152603e6024820152600080516020615bb883398151915260448201527f6c6c657428292021636f6e76657273696f6e546f42756c6c65745b69645d00006064820152608401610a75565b60405181907f43053dc356b6c4ec544a8acff075b699d433d2b751751683a24b4df4b7d59c5190600090a26000908152600760209081526040808320805460ff199081169091556009909252909120600a0180549091169055565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146113da5760405162461bcd60e51b8152600401610a75906158a4565b817fddcf0b9dbe14d2de9b94c3dcf9ad6f0767698e2b055eb5574b2967eee37f1a3e8260405161140c91815260200190565b60405180910390a260009182526008602052604090912055565b61142e614c07565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b031614806114ed57506040516335d2155560e11b81527f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031690636ba42aaa906114ac9033906004016152dc565b602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed91906158fc565b6115995760405162461bcd60e51b815260206004820152606b60248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e742829205f6d60448201527f736753656e646572282920213d20756e6465727772697465722026262021495a60648201527f69766f65476c6f62616c735f4f43432847424c292e69734b6565706572285f6d60848201526a736753656e64657228292960a81b60a482015260c401610a75565b60026000828152600960205260409020600a0154610100900460ff1660078111156115c6576115c6615699565b146116315760405162461bcd60e51b815260206004820152604160248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e742829206c6f6044820152600080516020615c388339815191526064820152606560f81b608482015260a401610a75565b6000818152600960205260409020600401546116509061a8c09061591e565b42116116df5760405162461bcd60e51b815260206004820152605260248201527f4f43435f4d6f64756c61723a3a70726f636573735061796d656e74282920626c60448201527f6f636b2e74696d657374616d70203c3d206c6f616e735b69645d2e7061796d656064820152716e744475654279202d20313220686f75727360701b608482015260a401610a75565b60008060006116ed846134ba565b5060008781526009602052604090205492955090935091506001600160a01b031684600080516020615bd8833981519152836117298688615931565b6117339190615931565b6000888152600960205260409020600781015460049091015488918891889161175b91615931565b60405161176c959493929190615944565b60405180910390a37f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f69190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118579190615967565b6001600160a01b03167f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03160361196f5760008481526009602090815260409182902054825163396b392560e11b8152925161196a936001600160a01b03928316937f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da66909316926372d6724a926004808401938290030181865afa15801561190a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192e9190615967565b6119388486615931565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816929190614c60565b61199c565b60008481526009602052604090205460025461199c916001600160a01b0390811691166119388486615931565b82156119f8576000848152600960205260409020546119f8906001600160a01b03166119c6612cb7565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816919086614c60565b600084815260096020526040902060050154600103611a39576000848152600960205260408120600a8101805461ff00191661030017905560040155611a68565b600084815260096020526040812060078101546004909101805491929091611a62908490615931565b90915550505b60008481526009602052604081206001018054859290611a8990849061591e565b90915550506000848152600960205260408120600501805460019290611ab090849061591e565b90915550506001805550611ac2915050565b50565b611acd614b45565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b6064820152608401610a75565b611b3c614b45565b611b59611b47612cb7565b6001600160a01b038616903086614c60565b50505050565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b031614611ba75760405162461bcd60e51b8152600401610a75906158a4565b60008411611c075760405162461bcd60e51b815260206004820152602760248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e6528292074656044820152660726d203d3d20360cc1b6064820152608401610a75565b8262093a801480611c1a57508262127500145b80611c275750826224ea00145b80611c345750826277f880145b80611c425750826301dfe200145b611ce95760405162461bcd60e51b815260206004820152606660248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e65282920696e60448201527f76616c6964207061796d656e74496e74657276616c2076616c75652c2074727960648201527f3a203836343030202a202837207c7c203134207c7c203238207c7c203931207c6084820152657c203336342960d01b60a482015260c401610a75565b600186118015611cfd575060018160000b13155b8015611d0c575062093a808210155b611da45760405162461bcd60e51b815260206004820152606060248201527f4f43435f4d6f64756c61723a3a617070726f7665436f6d62696e652829206c6f60448201527f616e4944732e6c656e677468203c3d2031207c7c207061796d656e745363686560648201527f64756c65203e2031207c7c206772616365506572696f64203c20372064617973608482015260a401610a75565b8060000b6003547f31830e7e8e1e467720429d858edc1963a91b3c9925befc40bd96da84e037c237898989898989426203f480611de19190615931565b604051611df497969594939291906159b6565b60405180910390a36040518061010001604052808888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506020810187905260408101869052606081018590526080810184905260a001611e6a426203f480615931565b8152600083810b6020808401919091526001604093840152600354825260058152919020825180519192611ea392849290910190614edd565b5060208201516001808301919091556040830151600283015560608301516003808401919091556080840151600484015560a0840151600584015560c08401516006909301805460e09095015115156101000261ffff1990951660ff90941693909317939093179091558154909190600090611f20908490615931565b909155505050505050505050565b611f36614c07565b60026000828152600960205260409020600a0154610100900460ff166007811115611f6357611f63615699565b14611fc45760405162461bcd60e51b815260206004820152603e60248201527f4f43435f4d6f64756c61723a3a6d616b655061796d656e742829206c6f616e736044820152600080516020615cb88339815191526064820152608401610a75565b6000806000611fd2846134ba565b50925092509250611fe03390565b6001600160a01b031684600080516020615bd8833981519152836120048688615931565b61200e9190615931565b6000888152600960205260409020600781015460049091015488918891889161203691615931565b604051612047959493929190615944565b60405180910390a37f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d19190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561210e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121329190615967565b6001600160a01b03167f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316036121d2576121cd335b7f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561190a573d6000803e3d6000fd5b6121ed565b6121ed335b6002546001600160a01b03166119388486615931565b82156119f8576119f8335b6119c6612cb7565b612208614b45565b600054600160a01b900460ff16156122325760405162461bcd60e51b8152600401610a75906159f4565b6001600160a01b03811661229e576040805162461bcd60e51b8152602060048201526024810191909152600080516020615c9883398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d20616464726573732830296064820152608401610a75565b6000805460ff60a01b1916600160a01b179055611ac281614c98565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146123025760405162461bcd60e51b8152600401610a75906158a4565b60405181907f7f5df20e85483a0ee204aeb7ae47ff330ffa6780edacd9a480c6cba37a2fd8ab90600090a2600090815260086020526040812055565b612346614b45565b60405162461bcd60e51b815260206004820152603060248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469282960448201526f202163616e507573684d756c7469282960801b6064820152608401610a75565b85811015610f545761240c6123ba612cb7565b308787858181106123cd576123cd615800565b905060200201358a8a868181106123e6576123e6615800565b90506020020160208101906123fb919061542c565b6001600160a01b0316929190614c60565b8061241681615872565b9150506123a7565b612426614b45565b600054600160a01b900460ff16156124505760405162461bcd60e51b8152600401610a75906159f4565b61245a6000614c98565b565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146124a45760405162461bcd60e51b8152600401610a75906158a4565b60405181907f4f257439fc7e66e47d44a6b3974facdf94b54e184733ab2581d744990d070ef690600090a26000908152600760205260409020805460ff19166001179055565b6000806124f5614f28565b60008481526009602081815260408084208054600a820154600183015488526002830154888601526003830154938801939093526004820154606088015260058201546080880152600682015460a088015260078083015460c0890152600883015460e089015291850154610100808901919091528a8752949093526001600160a01b0390921696509283900b9450910460ff169081111561259957612599615699565b6101208201529193909250565b6125ae614c07565b60046000838152600960205260409020600a0154610100900460ff1660078111156125db576125db615699565b1461265a5760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a7265736f6c76654465666175742829206c6f6160448201527f6e735b69645d2e737461746520213d204c6f616e53746174652e44656661756c6064820152621d195960ea1b608482015260a401610a75565b600082815260096020526040812060010154821061269f57506000828152600960205260408120600181018054929055600a01805461ff0019166106001790556126c9565b506000828152600960205260408120600101805483928392916126c390849061591e565b90915550505b336001600160a01b0316837f92163773d605b6d564984a8f4d6fe46f32149fc640adf237b5baa1ce80b6ad1c8360066000888152600960205260409020600a0154610100900460ff16600781111561272357612723615699565b60408051938452911460208301520160405180910390a361277833612746612cb7565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816919084614c60565b60405163dc3c1da560e01b81526001600160a01b037f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da6616906379de292790829063dc3c1da5906127ee9086907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4890600401615a29565b602060405180830381865afa15801561280b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282f919061588b565b6040518263ffffffff1660e01b815260040161284d91815260200190565b600060405180830381600087803b15801561286757600080fd5b505af115801561287b573d6000803e3d6000fd5b505050505061288960018055565b5050565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146128d55760405162461bcd60e51b8152600401610a75906158a4565b600084116129315760405162461bcd60e51b8152602060048201526024808201527f4f43435f4d6f64756c61723a3a6372656174654f666665722829207465726d2060448201526303d3d20360e41b6064820152608401610a75565b8262093a80148061294457508262127500145b806129515750826224ea00145b8061295e5750826277f880145b8061296c5750826301dfe200145b612a105760405162461bcd60e51b815260206004820152606360248201527f4f43435f4d6f64756c61723a3a6372656174654f66666572282920696e76616c60448201527f6964207061796d656e74496e74657276616c2076616c75652c207472793a203860648201527f36343030202a202837207c7c203134207c7c203238207c7c203931207c7c203360848201526236342960e81b60a482015260c401610a75565b62093a80821015612a7b5760405162461bcd60e51b815260206004820152602f60248201527f4f43435f4d6f64756c61723a3a6372656174654f66666572282920677261636560448201526e506572696f64203c2037206461797360881b6064820152608401610a75565b60018160000b1315612ae65760405162461bcd60e51b815260206004820152602e60248201527f4f43435f4d6f64756c61723a3a6372656174654f666665722829207061796d6560448201526d6e745363686564756c65203e203160901b6064820152608401610a75565b8060000b600454896001600160a01b03167f94f899dadfc609e7c15604401a348d950fb227403d0a783352ec927fa7e1d5298a8a8a8a8a426203f480612b2c9190615931565b8b604051612b409796959493929190615a40565b60405180910390a4604051806101800160405280896001600160a01b0316815260200188815260200187815260200186815260200160008152602001858152602001858152602001848152602001426203f480612b9d9190615931565b815260208101849052600083900b604082015260600160015b905260048054600090815260096020818152604092839020855181546001600160a01b039091166001600160a01b03199091161781559085015160018201559184015160028301556060840151600383015560808401519282019290925560a0830151600582015560c0830151600682015560e083015160078083019190915561010080850151600884015561012085015193830193909355610140840151600a8301805460ff90921660ff198316811782556101608701519495919361ffff1990931617918490811115612c8d57612c8d615699565b0217905550905050600160046000828254612ca89190615931565b90915550505050505050505050565b6000546001600160a01b031690565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b031614612d0e5760405162461bcd60e51b8152600401610a75906158a4565b6040518181527f01f095e1db14b4097879dfad43aed8f7e3338fce261403ffd93286f67bcbc2729060200160405180910390a16000908152600560205260409020600601805461ff0019169055565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b031614612da55760405162461bcd60e51b8152600401610a75906158a4565b817f4763469296b708c4e6f64af139f17b02ab4191d85b44bca400a9364ab90f5fe382604051612dd791815260200190565b60405180910390a26000918252600a602052604090912055565b7f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b0316620960456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e729190615967565b6001600160a01b0316336001600160a01b031614612e8f57600080fd5b6001600160a01b038116612ea257600080fd5b6002546040516001600160a01b03918216918316907f82f2be5c35e63cad0f00b86cbce7d31261fd13665d7c5b210a5828dd5494d05390600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b031614612f475760405162461bcd60e51b8152600401610a75906158a4565b60405181907f4b3d5546db4f01514b7862af5a9f67f5edff7aede068c71f417697310b867bb390600090a26000908152600a6020526040812055565b612f8b614b45565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b6064820152608401610a75565b85811015610f545786868281811061301257613012615800565b9050602002016020810190613027919061542c565b6001600160a01b031663b88d4fde61303d612cb7565b3088888681811061305057613050615800565b9050602002013587878781811061306957613069615800565b905060200281019061307b9190615816565b6040518663ffffffff1660e01b815260040161309b9594939291906157cc565b600060405180830381600087803b1580156130b557600080fd5b505af11580156130c9573d6000803e3d6000fd5b5050505080806130d890615872565b915050612ff8565b6130e8614c07565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316148061319e5750604051630bb18f5f60e21b81527f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031690632ec63d7c9061315d9033906004016152dc565b602060405180830381865afa15801561317a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319e91906158fc565b61322e5760405162461bcd60e51b815260206004820152605560248201527f4f43435f4d6f64756c61723a3a63616c6c4c6f616e2829205f6d736753656e6460448201527f6572282920213d206c6f616e735b69645d2e626f72726f776572202626202169606482015274734c6f636b6572285f6d736753656e64657228292960581b608482015260a401610a75565b60026000828152600960205260409020600a0154610100900460ff16600781111561325b5761325b615699565b146132cc5760405162461bcd60e51b815260206004820152603b60248201527f4f43435f4d6f64756c61723a3a63616c6c4c6f616e2829206c6f616e735b696460448201527a5d2e737461746520213d204c6f616e53746174652e41637469766560281b6064820152608401610a75565b60008181526009602052604081206001015490806132e9846134ba565b509250925050837f0d8ffb93115b6e4936fd4b12c998bc38980df7a5f5d0cf6b3c800c1acd594caa82848661331e9190615931565b6133289190615931565b85858560405161333b949392919061562a565b60405180910390a27f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c59190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa158015613402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134269190615967565b6001600160a01b03167f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03160361346c576134673361216f565b613475565b613475336121d7565b61347e336121f8565b50505060009081526009602052604081206001808201839055600482018390556005820192909255600a01805461ff0019166103001790558055565b6000818152600960205260408120600a0154819081908190810b810361350d576000858152600960205260409020600501546001036135085760008581526009602052604090206001015493505b613533565b600085815260096020526040902060058101546001909101546135309190615a86565b93505b6000858152600960205260409020600401544211801561357d575060026000868152600960205260409020600a0154610100900460ff16600781111561357b5761357b615699565b145b156135e8576135926127106301e13380615a9a565b600086815260096020526040902060038101546004909101546135b5904261591e565b6000888152600960205260409020600101546135d19190615a9a565b6135db9190615a9a565b6135e59190615a86565b91505b6135f86127106301e13380615a9a565b600086815260096020526040902060028101546007820154600190920154909161362191615a9a565b61362b9190615a9a565b6136359190615a86565b9250816136428486615931565b61364c9190615931565b90509193509193565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b03161461369d5760405162461bcd60e51b8152600401610a75906158a4565b60066000828152600960205260409020600a0154610100900460ff1660078111156136ca576136ca615699565b1461373d5760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a6d61726b5265706169642829206c6f616e735b60448201527f69645d2e737461746520213d204c6f616e53746174652e5265736f6c766564006064820152608401610a75565b60405181907f2a2fdae8d2b224badb596c7192d6bb8eaeac464eb5e0532029bf9515b21f46bb90600090a26000908152600960205260408120600a8101805461ff00191661030017905560040155565b613795614c07565b60016000828152600960205260409020600a0154610100900460ff1660078111156137c2576137c2615699565b146138235760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a6163636570744f666665722829206c6f616e736044820152600080516020615c788339815191526064820152608401610a75565b60008181526009602052604090206008015442106138b55760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a6163636570744f66666572282920626c6f636b60448201527f2e74696d657374616d70203e3d206c6f616e735b69645d2e6f6666657245787060648201526269727960e81b608482015260a401610a75565b6000818152600960205260409020546001600160a01b0316336001600160a01b03161461394a5760405162461bcd60e51b815260206004820152603d60248201527f4f43435f4d6f64756c61723a3a6163636570744f666665722829205f6d73675360448201527f656e646572282920213d206c6f616e735b69645d2e626f72726f7765720000006064820152608401610a75565b6000818152600960205260409020805460018201546007909201546001600160a01b039091169183917fd2bcb88564ee3936089ae1e4ab2296ba37e8775949ff81054e4b3b737929889291906139a362093a8042615ab1565b6139ad904261591e565b6139ba90620bdd80615931565b6139c49190615931565b6040805192835260208301919091520160405180910390a36000818152600960205260409020600a8101805461ff00191661020017905560070154613a0c62093a8042615ab1565b613a16904261591e565b613a2390620bdd80615931565b613a2d9190615931565b600082815260096020526040902060048101919091558054600190910154613a83916001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48811692911690614ba4565b611ac260018055565b600081815260056020526040902060060154610100900460ff16613b0e5760405162461bcd60e51b815260206004820152603360248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e6528292021636f6d604482015272189a5b985d1a5bdb9cd6da59174b9d985b1a59606a1b6064820152608401610a75565b600081815260056020819052604090912001544210613ba55760405162461bcd60e51b815260206004820152604760248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e65282920626c6f6360448201527f6b2e74696d657374616d70203e3d20636f6d62696e6174696f6e735b69645d2e6064820152666578706972657360c81b608482015260a401610a75565b60008181526005602052604080822060068101805461ff0019169081905560028201546003830154600484015494519290950b9433947fbd597f2b72b5fccc6d032087fd1cac7775df7334836826a87d9c525d76e6b4d394613c0b949093929190615ac5565b60405180910390a360008060005b600084815260056020526040902054811015613e46576000848152600560205260408120805483908110613c4f57613c4f615800565b600091825260208083209091015480835260099091526040909120549091506001600160a01b0316613c7e3390565b6001600160a01b031614613d055760405162461bcd60e51b815260206004820152604260248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e652829205f6d736760448201527f53656e646572282920213d206c6f616e735b6c6f616e49445d2e626f72726f7760648201526132b960f11b608482015260a401610a75565b60026000828152600960205260409020600a0154610100900460ff166007811115613d3257613d32615699565b14613db15760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a6170706c79436f6d62696e652829206c6f616e60448201527f735b6c6f616e49445d2e737461746520213d204c6f616e53746174652e41637460648201526269766560e81b608482015260a401610a75565b600081815260096020526040902060010154613dcd9085615931565b60008281526009602052604090206002810154600190910154919550613df291615a9a565b613dfc9084615931565b600091825260096020526040822060018101839055600481018390556005810192909255600a909101805461ff001916610700179055915080613e3e81615872565b915050613c19565b50613e518282615a86565b6000848152600560205260408120600281015460018201546003830154600480850154600690950154905496975092959194909392900b908190337f795cefa377a89d82c74691764ff0c7515591f1fb4e0af7e4ae7395360229567b8a8a8989613ebe62093a8042615ab1565b613ec8904261591e565b613ed590620bdd80615931565b613edf9190615931565b8c8b8b604051613ef59796959493929190615a40565b60405180910390a4604051806101800160405280613f103390565b6001600160a01b031681526020018881526020018781526020018581526020018462093a8042613f409190615ab1565b613f4a904261591e565b613f5790620bdd80615931565b613f619190615931565b81526020018681526020018681526020018481526020016201518042613f87919061591e565b815260208101849052600083900b60408201526060016002612bb6565b613fac614b45565b614035613fb7612cb7565b6040516370a0823160e01b81526001600160a01b038616906370a0823190613fe39030906004016152dc565b602060405180830381865afa158015614000573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614024919061588b565b6001600160a01b0386169190614ba4565b505050565b614042614b45565b6040805162461bcd60e51b8152602060048201526024810191909152600080516020615b9883398151915260448201527f5061727469616c2829202163616e50756c6c4d756c74695061727469616c28296064820152608401610a75565b85811015610f54576140de6140b3612cb7565b8686848181106140c5576140c5615800565b9050602002013589898581811061106e5761106e615800565b806140e881615872565b9150506140a0565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146141385760405162461bcd60e51b8152600401610a75906158a4565b60405181907f7643f83ecdd3d6580d8d54233cc6670ea7bb9fb170a95d84f6ba97a8b4e5ae8990600090a26000908152600660205260409020805460ff19169055565b614183614b45565b611b5961418e612cb7565b6001600160a01b0386169085614ba4565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b0316146141e75760405162461bcd60e51b8152600401610a75906158a4565b60026000828152600960205260409020600a0154610100900460ff16600781111561421457614214615699565b146142635760405162461bcd60e51b815260206004820152603e6024820152600080516020615c588339815191526044820152600080516020615cb88339815191526064820152608401610a75565b600081815260096020819052604090912090810154600490910154429161428991615931565b1061430f5760405162461bcd60e51b815260206004820152605c6024820152600080516020615c5883398151915260448201527f5b69645d2e7061796d656e744475654279202b206c6f616e735b69645d2e677260648201527b0616365506572696f64203e3d20626c6f636b2e74696d657374616d760241b608482015260a401610a75565b807f707ca27730c34090bd5dcfdda355646f6c358e2fa4d9416d2b4e5407404c6f71600960008481526020019081526020016000206001015460405161435791815260200190565b60405180910390a260008181526009602052604090819020600a8101805461ff00191661040017905560010154905163dc3c1da560e01b81526001600160a01b037f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da6616916359e269ee91839163dc3c1da5916143f891907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4890600401615a29565b602060405180830381865afa158015614415573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614439919061588b565b6040518263ffffffff1660e01b815260040161445791815260200190565b600060405180830381600087803b15801561447157600080fd5b505af11580156110a5573d6000803e3d6000fd5b61448d614c07565b60066000838152600960205260409020600a0154610100900460ff1660078111156144ba576144ba615699565b146145395760405162461bcd60e51b815260206004820152604360248201527f4f43435f4d6f64756c61723a3a737570706c79496e7465726573742829206c6f60448201527f616e735b69645d2e737461746520213d204c6f616e53746174652e5265736f6c6064820152621d995960ea1b608482015260a401610a75565b604051818152339083907f48553440463342ea69fd346ab316f094939577d42fcd3810f0cdc03cadbc13c89060200160405180910390a37f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156145ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145f29190615967565b6001600160a01b0316635df8d1686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561462f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146539190615967565b6001600160a01b03167f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03160361471657614711337f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166372d6724a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156146ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127469190615967565b614751565b614751336002546001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48811692911684614c60565b61288960018055565b6000818152600960205260409020546001600160a01b0316336001600160a01b0316146147df576040805162461bcd60e51b81526020600482015260248101919091527f4f43435f4d6f64756c61723a3a6170706c79457874656e73696f6e2829205f6d6044820152600080516020615c188339815191526064820152608401610a75565b6000818152600860205260409020546148545760405162461bcd60e51b815260206004820152603160248201527f4f43435f4d6f64756c61723a3a6170706c79457874656e73696f6e2829206578604482015270074656e73696f6e735b69645d203d3d203607c1b6064820152608401610a75565b807fc50b066a94517abf3619b358e69aa6e87266434a150c472aac968ec3dc39140e600860008481526020019081526020016000205460405161489991815260200190565b60405180910390a2600081815260086020908152604080832054600990925282206005018054919290916148ce908490615931565b909155505060008181526008602090815260408083205460099092528220600601805491929091614900908490615931565b9091555050600090815260086020526040812055565b337f0000000000000000000000001fa2700aa0544716d4597d094f4adacf67d47ab66001600160a01b03161461495e5760405162461bcd60e51b8152600401610a75906158a4565b60016000828152600960205260409020600a0154610100900460ff16600781111561498b5761498b615699565b146149ec5760405162461bcd60e51b815260206004820152603f60248201527f4f43435f4d6f64756c61723a3a63616e63656c4f666665722829206c6f616e736044820152600080516020615c788339815191526064820152608401610a75565b60405181907fc28b4aed030bfacc245c0501326e1beb8c0ef0d60e4edc21067fdeb52da2a7aa90600090a26000908152600960205260409020600a01805461ff001916610500179055565b614a3f614b45565b600054600160a01b900460ff1615614a695760405162461bcd60e51b8152600401610a75906159f4565b6001600160a01b038116614acf5760405162461bcd60e51b81526020600482015260396024820152600080516020615c988339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b6064820152608401610a75565b611ac281614c98565b614ae0614b45565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b6064820152608401610a75565b33614b4e612cb7565b6001600160a01b03161461245a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a75565b6040516001600160a01b03831660248201526044810182905261403590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614ce8565b600260015403614c595760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a75565b6002600155565b6040516001600160a01b0380851660248301528316604482015260648101829052611b599085906323b872dd60e01b90608401614bd0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000614d3d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614dba9092919063ffffffff16565b8051909150156140355780806020019051810190614d5b91906158fc565b6140355760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a75565b6060610e00848460008585600080866001600160a01b03168587604051614de19190615b48565b60006040518083038185875af1925050503d8060008114614e1e576040519150601f19603f3d011682016040523d82523d6000602084013e614e23565b606091505b5091509150614e3487838387614e3f565b979650505050505050565b60608315614eae578251600003614ea7576001600160a01b0385163b614ea75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a75565b5081610e00565b610e008383815115614ec35781518083602001fd5b8060405162461bcd60e51b8152600401610a759190615b64565b828054828255906000526020600020908101928215614f18579160200282015b82811115614f18578251825591602001919060010190614efd565b50614f24929150614f47565b5090565b604051806101400160405280600a906020820280368337509192915050565b5b80821115614f245760008155600101614f48565b600060208284031215614f6e57600080fd5b81356001600160e01b031981168114614f8657600080fd5b9392505050565b600060208284031215614f9f57600080fd5b5035919050565b6001600160a01b0381168114611ac257600080fd5b60008083601f840112614fcd57600080fd5b5081356001600160401b03811115614fe457600080fd5b602083019150836020828501011115614ffc57600080fd5b9250929050565b6000806000806060858703121561501957600080fd5b843561502481614fa6565b93506020850135925060408501356001600160401b0381111561504657600080fd5b61505287828801614fbb565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561509c5761509c61505e565b604052919050565b600082601f8301126150b557600080fd5b81356001600160401b038111156150ce576150ce61505e565b6150e1601f8201601f1916602001615074565b8181528460208386010111156150f657600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561512957600080fd5b843561513481614fa6565b9350602085013561514481614fa6565b92506040850135915060608501356001600160401b0381111561516657600080fd5b615172878288016150a4565b91505092959194509250565b60008083601f84011261519057600080fd5b5081356001600160401b038111156151a757600080fd5b6020830191508360208260051b8501011115614ffc57600080fd5b600080600080600080606087890312156151db57600080fd5b86356001600160401b03808211156151f257600080fd5b6151fe8a838b0161517e565b9098509650602089013591508082111561521757600080fd5b6152238a838b0161517e565b9096509450604089013591508082111561523c57600080fd5b5061524989828a0161517e565b979a9699509497509295939492505050565b6000806000806040858703121561527157600080fd5b84356001600160401b038082111561528857600080fd5b6152948883890161517e565b909650945060208701359150808211156152ad57600080fd5b506150528782880161517e565b600080604083850312156152cd57600080fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a03121561530b57600080fd5b873561531681614fa6565b965060208801356001600160401b038082111561533257600080fd5b61533e8b838c0161517e565b909850965060408a013591508082111561535757600080fd5b6153638b838c0161517e565b909650945060608a013591508082111561537c57600080fd5b506153898a828b01614fbb565b989b979a50959850939692959293505050565b8035600081900b81146153ae57600080fd5b919050565b600080600080600080600060c0888a0312156153ce57600080fd5b87356001600160401b038111156153e457600080fd5b6153f08a828b0161517e565b9098509650506020880135945060408801359350606088013592506080880135915061541e60a0890161539c565b905092959891949750929550565b60006020828403121561543e57600080fd5b8135614f8681614fa6565b6001600160a01b0384168152600083810b602080840191909152610180830191604084019085905b600a81101561548e57815183529183019190830190600101615471565b50505050949350505050565b600080600080600080600080610100898b0312156154b757600080fd5b88356154c281614fa6565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c089013591506154fa60e08a0161539c565b90509295985092959890939650565b600082601f83011261551a57600080fd5b813560206001600160401b038211156155355761553561505e565b8160051b615544828201615074565b928352848101820192828101908785111561555e57600080fd5b83870192505b84831015614e3457823582529183019190830190615564565b600080600080600060a0868803121561559557600080fd5b85356155a081614fa6565b945060208601356155b081614fa6565b935060408601356001600160401b03808211156155cc57600080fd5b6155d889838a01615509565b945060608801359150808211156155ee57600080fd5b6155fa89838a01615509565b9350608088013591508082111561561057600080fd5b5061561d888289016150a4565b9150509295509295909350565b93845260208401929092526040830152606082015260800190565b60008060006040848603121561565a57600080fd5b833561566581614fa6565b925060208401356001600160401b0381111561568057600080fd5b61568c86828701614fbb565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b60006101808201905060018060a01b038e1682528c60208301528b60408301528a60608301528960808301528860a08301528760c08301528660e083015285610100830152846101208301528360000b6101408301526008831061572357634e487b7160e01b600052602160045260246000fd5b826101608301529d9c50505050505050505050505050565b600080600080600060a0868803121561575357600080fd5b853561575e81614fa6565b9450602086013561576e81614fa6565b9350604086013592506060860135915060808601356001600160401b0381111561579757600080fd5b61561d888289016150a4565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0386811682528516602082015260408101849052608060608201819052600090614e3490830184866157a3565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261582d57600080fd5b8301803591506001600160401b0382111561584757600080fd5b602001915036819003821315614ffc57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016158845761588461585c565b5060010190565b60006020828403121561589d57600080fd5b5051919050565b60208082526038908201527f4f43435f4d6f64756c61723a3a6973556e6465727772697465722829205f6d7360408201527733a9b2b73232b9141490109e903ab73232b93bb934ba32b960411b606082015260800190565b60006020828403121561590e57600080fd5b81518015158114614f8657600080fd5b818103818111156109ee576109ee61585c565b808201808211156109ee576109ee61585c565b948552602085019390935260408401919091526060830152608082015260a00190565b60006020828403121561597957600080fd5b8151614f8681614fa6565b81835260006001600160fb1b0383111561599d57600080fd5b8260051b80836020870137939093016020019392505050565b60c0815260006159ca60c08301898b615984565b60208301979097525060408101949094526060840192909252608083015260a09091015292915050565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b9182526001600160a01b0316602082015260400190565b968752602087019590955260408601939093526060850191909152608084015260a083015260c082015260e00190565b634e487b7160e01b600052601260045260246000fd5b600082615a9557615a95615a70565b500490565b80820281158282048414176109ee576109ee61585c565b600082615ac057615ac0615a70565b500690565b6000608082016080835280875480835260a08501915088600052602092508260002060005b82811015615b0657815484529284019260019182019101615aea565b50505090830195909552506040810192909252606090910152919050565b60005b83811015615b3f578181015183820152602001615b27565b50506000910152565b60008251615b5a818460208701615b24565b9190910192915050565b6020815260008251806020840152615b83816040850160208701615b24565b601f01601f1916919091016040019291505056fe5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c74694f43435f4d6f64756c61723a3a6170706c79436f6e76657273696f6e546f4275156efd898bf24c8c6af5b216d47176074332f389713e96fec4af716703edb6374f43435f4d6f64756c61723a3a6170706c79436f6e76657273696f6e546f416d736753656e646572282920213d206c6f616e735b69645d2e626f72726f776572616e735b69645d2e737461746520213d204c6f616e53746174652e41637469764f43435f4d6f64756c61723a3a6d61726b44656661756c742829206c6f616e735b69645d2e737461746520213d204c6f616e53746174652e4f666665726564004f776e61626c654c6f636b65643a3a7472616e736665724f776e6572736869705b69645d2e737461746520213d204c6f616e53746174652e4163746976650000a264697066735822122088ab3b67f8e0522e8a2e4a89bf2a85a405fcb8aafc73e606fc2f795afb4bb84b64736f6c63430008110033

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

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