S Price: $0.554409 (-6.40%)

Contract

0x3aC4F83Dd109ba480D66BbA202392D4df03E7d8D

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DLOImplementation

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion
File 1 of 9 : DebitaLendOffer-Implementation.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";

interface IAggregator {
    function isSenderALoan(address _sender) external view returns (bool);
}

interface IDLOFactory {
    function emitUpdate(address lendOrder) external;
    function emitDelete(address lendOrder) external;
    function deleteOrder(address lendOrder) external;
}

contract DLOImplementation is ReentrancyGuard, Initializable {
    address aggregatorContract;
    address factoryContract;
    bool public isActive;
    uint lastUpdate;

    using SafeERC20 for IERC20;

    struct LendInfo {
        address lendOrderAddress; // address of the lend order
        bool perpetual; // if the loan is perpetual --> every time the loan is paid back, the amount is available again here
        bool lonelyLender; // if the loan is only for one lender, if true, the loan is not available for other lenders
        bool[] oraclesPerPairActivated; // oracles activated for each pair
        uint[] maxLTVs; // max LTV for each collateral
        uint apr; // annual percentage rate you want to lend the tokens for
        uint maxDuration; // max duration of the loan
        uint minDuration; // min duration of the loan
        address owner; // owner of the lend order
        address principle; // address of the principle token
        address[] acceptedCollaterals; // address of the accepted collaterals
        address[] oracle_Collaterals; // address of the oracles for each collateral
        uint[] maxRatio; // max ratio for each collateral
        address oracle_Principle; // address of the oracle for the principle token
        uint startedLendingAmount; // initial amount of the principle token that is available for lending
        uint availableAmount; // amount of the principle token that is available for lending
    }

    LendInfo public lendInformation;

    modifier onlyOwner() {
        require(msg.sender == lendInformation.owner, "Only owner");
        _;
    }

    modifier onlyAggregator() {
        require(msg.sender == aggregatorContract, "Only aggregator");
        _;
    }

    modifier onlyAfterTimeOut() {
        require(
            lastUpdate == 0 || (block.timestamp - lastUpdate) > 1 minutes,
            "Offer has been updated in the last minute"
        );
        _;
    }

    function initialize(
        address _aggregatorContract,
        bool _perpetual,
        bool[] memory _oraclesActivated,
        bool _lonelyLender,
        uint[] memory _maxLTVs,
        uint _apr,
        uint _maxDuration,
        uint _minDuration,
        address _owner,
        address _principle,
        address[] memory _acceptedCollaterals,
        address[] memory _oracleIDS_Collateral,
        uint[] memory _ratio,
        address _oracleID_Principle,
        uint _startedLendingAmount
    ) public initializer {
        aggregatorContract = _aggregatorContract;
        isActive = true;
        // update lendInformation
        lendInformation = LendInfo({
            lendOrderAddress: address(this),
            perpetual: _perpetual,
            oraclesPerPairActivated: _oraclesActivated,
            lonelyLender: _lonelyLender,
            maxLTVs: _maxLTVs,
            apr: _apr,
            maxDuration: _maxDuration,
            minDuration: _minDuration,
            owner: _owner,
            principle: _principle,
            acceptedCollaterals: _acceptedCollaterals,
            oracle_Collaterals: _oracleIDS_Collateral,
            maxRatio: _ratio,
            oracle_Principle: _oracleID_Principle,
            startedLendingAmount: _startedLendingAmount,
            availableAmount: _startedLendingAmount
        });

        factoryContract = msg.sender;
    }

    // function to accept the lending offer
    // only aggregator can call this function
    function acceptLendingOffer(
        uint amount
    ) public onlyAggregator nonReentrant onlyAfterTimeOut {
        LendInfo memory m_lendInformation = lendInformation;
        uint previousAvailableAmount = m_lendInformation.availableAmount;
        require(
            amount <= m_lendInformation.availableAmount,
            "Amount exceeds available amount"
        );
        // has to be at least 0.1% of the available amount
        uint minAMOUNT = (previousAvailableAmount) / 1000;
        require(amount >= minAMOUNT, "Amount too low");
        require(amount > 0, "Amount must be greater than 0");

        lendInformation.availableAmount -= amount;
        SafeERC20.safeTransfer(
            IERC20(m_lendInformation.principle),
            msg.sender,
            amount
        );

        // offer has to be accepted 100% in order to be deleted
        if (
            lendInformation.availableAmount == 0 && !m_lendInformation.perpetual
        ) {
            isActive = false;
            IDLOFactory(factoryContract).emitDelete(address(this));
            IDLOFactory(factoryContract).deleteOrder(address(this));
        } else {
            IDLOFactory(factoryContract).emitUpdate(address(this));
        }

        // emit accepted event on factory
    }

    // function to cancel the lending offer
    // only callable once by the owner
    // in case of perpetual, the funds won't come back here and lender will need to claim it from the lend orders
    function cancelOffer() public onlyOwner nonReentrant {
        uint availableAmount = lendInformation.availableAmount;
        lendInformation.perpetual = false;
        lendInformation.availableAmount = 0;
        require(availableAmount > 0, "No funds to cancel");
        require(isActive, "Offer is not active");
        isActive = false;

        SafeERC20.safeTransfer(
            IERC20(lendInformation.principle),
            msg.sender,
            availableAmount
        );
        IDLOFactory(factoryContract).emitDelete(address(this));
        IDLOFactory(factoryContract).deleteOrder(address(this));
        // emit canceled event on factory
    }

    // only loans or owner can call this functions --> add more funds to the offer
    function addFunds(uint amount) public nonReentrant {
        require(
            msg.sender == lendInformation.owner ||
                IAggregator(aggregatorContract).isSenderALoan(msg.sender),
            "Only owner or loan"
        );
        require(isActive, "Offer is not active");

        SafeERC20.safeTransferFrom(
            IERC20(lendInformation.principle),
            msg.sender,
            address(this),
            amount
        );
        lendInformation.availableAmount += amount;
        IDLOFactory(factoryContract).emitUpdate(address(this));
    }

    function changePerpetual(bool _perpetual) public onlyOwner nonReentrant {
        require(isActive, "Offer is not active");

        lendInformation.perpetual = _perpetual;
        if (_perpetual == false && lendInformation.availableAmount == 0) {
            isActive = false;
            IDLOFactory(factoryContract).emitDelete(address(this));
            IDLOFactory(factoryContract).deleteOrder(address(this));
        } else {
            IDLOFactory(factoryContract).emitUpdate(address(this));
        }
    }

    function getLendInfo() public view returns (LendInfo memory) {
        return lendInformation;
    }

    // update lend order information and add a cooldown period of 1 minute to avoid overtaking the tx
    function updateLendOrder(
        uint newApr,
        uint newMaxDuration,
        uint newMinDuration,
        uint[] memory newLTVs,
        uint[] memory newRatios
    ) public onlyOwner {
        require(isActive, "Offer is not active");
        LendInfo memory m_lendInformation = lendInformation;
        require(
            newLTVs.length == m_lendInformation.acceptedCollaterals.length &&
                newLTVs.length == m_lendInformation.maxLTVs.length &&
                newRatios.length ==
                m_lendInformation.acceptedCollaterals.length,
            "Invalid lengths"
        );
        lastUpdate = block.timestamp;
        m_lendInformation.apr = newApr;
        m_lendInformation.maxDuration = newMaxDuration;
        m_lendInformation.minDuration = newMinDuration;
        m_lendInformation.maxLTVs = newLTVs;
        m_lendInformation.maxRatio = newRatios;

        // update to storage
        lendInformation = m_lendInformation;
        IDLOFactory(factoryContract).emitUpdate(address(this));
    }
}

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 3 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 4 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * 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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 5 of 9 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
     *
     * NOTE: Consider following the ERC-7201 formula to derive storage locations.
     */
    function _initializableStorageSlot() internal pure virtual returns (bytes32) {
        return INITIALIZABLE_STORAGE;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        bytes32 slot = _initializableStorageSlot();
        assembly {
            $.slot := slot
        }
    }
}

File 6 of 9 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 7 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 8 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 9 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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);
}

Settings
{
  "remappings": [
    "@pythnetwork/pyth-sdk-solidity/=node_modules/@pythnetwork/pyth-sdk-solidity/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@contracts/=contracts/",
    "@aerodrome/=lib/contracts/contracts/",
    "forge-std/=lib/forge-std/src/",
    "@redstone-finance/evm-connector/dist/contracts/=lib/redstone-oracles-monorepo/packages/evm-connector/contracts/",
    "@chainlink/=lib/foundry-chainlink-toolkit/",
    "@opengsn/=lib/contracts/lib/gsn/packages/",
    "@uniswap/v3-core/=lib/contracts/lib/v3-core/",
    "chainlink-brownie-contracts/=lib/foundry-chainlink-toolkit/lib/chainlink-brownie-contracts/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/",
    "contracts/=lib/contracts/contracts/",
    "ds-test/=lib/contracts/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "foundry-chainlink-toolkit/=lib/foundry-chainlink-toolkit/",
    "gsn/=lib/contracts/lib/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "redstone-oracles-monorepo/=lib/redstone-oracles-monorepo/",
    "utils/=lib/contracts/test/utils/",
    "v3-core/=lib/contracts/lib/v3-core/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"acceptLendingOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_perpetual","type":"bool"}],"name":"changePerpetual","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getLendInfo","outputs":[{"components":[{"internalType":"address","name":"lendOrderAddress","type":"address"},{"internalType":"bool","name":"perpetual","type":"bool"},{"internalType":"bool","name":"lonelyLender","type":"bool"},{"internalType":"bool[]","name":"oraclesPerPairActivated","type":"bool[]"},{"internalType":"uint256[]","name":"maxLTVs","type":"uint256[]"},{"internalType":"uint256","name":"apr","type":"uint256"},{"internalType":"uint256","name":"maxDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"principle","type":"address"},{"internalType":"address[]","name":"acceptedCollaterals","type":"address[]"},{"internalType":"address[]","name":"oracle_Collaterals","type":"address[]"},{"internalType":"uint256[]","name":"maxRatio","type":"uint256[]"},{"internalType":"address","name":"oracle_Principle","type":"address"},{"internalType":"uint256","name":"startedLendingAmount","type":"uint256"},{"internalType":"uint256","name":"availableAmount","type":"uint256"}],"internalType":"struct DLOImplementation.LendInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregatorContract","type":"address"},{"internalType":"bool","name":"_perpetual","type":"bool"},{"internalType":"bool[]","name":"_oraclesActivated","type":"bool[]"},{"internalType":"bool","name":"_lonelyLender","type":"bool"},{"internalType":"uint256[]","name":"_maxLTVs","type":"uint256[]"},{"internalType":"uint256","name":"_apr","type":"uint256"},{"internalType":"uint256","name":"_maxDuration","type":"uint256"},{"internalType":"uint256","name":"_minDuration","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_principle","type":"address"},{"internalType":"address[]","name":"_acceptedCollaterals","type":"address[]"},{"internalType":"address[]","name":"_oracleIDS_Collateral","type":"address[]"},{"internalType":"uint256[]","name":"_ratio","type":"uint256[]"},{"internalType":"address","name":"_oracleID_Principle","type":"address"},{"internalType":"uint256","name":"_startedLendingAmount","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lendInformation","outputs":[{"internalType":"address","name":"lendOrderAddress","type":"address"},{"internalType":"bool","name":"perpetual","type":"bool"},{"internalType":"bool","name":"lonelyLender","type":"bool"},{"internalType":"uint256","name":"apr","type":"uint256"},{"internalType":"uint256","name":"maxDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"principle","type":"address"},{"internalType":"address","name":"oracle_Principle","type":"address"},{"internalType":"uint256","name":"startedLendingAmount","type":"uint256"},{"internalType":"uint256","name":"availableAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newApr","type":"uint256"},{"internalType":"uint256","name":"newMaxDuration","type":"uint256"},{"internalType":"uint256","name":"newMinDuration","type":"uint256"},{"internalType":"uint256[]","name":"newLTVs","type":"uint256[]"},{"internalType":"uint256[]","name":"newRatios","type":"uint256[]"}],"name":"updateLendOrder","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080806040523461001a5760015f55612bea908161001f8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f803560e01c80630451af4e14611d6e57806322f3e2d414611d485780632ea3e0f6146110f257806349b1b18714610f1057806362d05c7814610dd8578063be99970514610c01578063c70f7b3a14610b6e578063df1aaf1d146103a95763eeabf8291461007d575f80fd5b346101b757602090816003193601126101b7576001546001600160a01b03906004359082163303610372576100b0612ad3565b600354801590811561035d575b5015610306576100cb6122af565b906101e08201518082116102c1576103e89004811061028b578015610246579361010d856100fc869760115461211c565b601155338561012086015116612a23565b60115415918261023a575b5050156101eb576002805460ff60a01b1981169091558116803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc5783916101c8575b505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba576101a3575b50505b6001815580f35b6101ac90611eb6565b6101b757805f610199565b80fd5b6040513d84823e3d90fd5b50fd5b6101d190611eb6565b6101c557815f610163565b6040513d85823e3d90fd5b5050fd5b60025416803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba57610226575b505061019c565b61022f90611eb6565b6101b757805f61021f565b01511590505f80610118565b60405162461bcd60e51b815260048101869052601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606490fd5b60405162461bcd60e51b815260048101869052600e60248201526d416d6f756e7420746f6f206c6f7760901b6044820152606490fd5b60405162461bcd60e51b815260048101879052601f60248201527f416d6f756e74206578636565647320617661696c61626c6520616d6f756e74006044820152606490fd5b60405162461bcd60e51b815260048101859052602960248201527f4f6666657220686173206265656e207570646174656420696e20746865206c616044820152687374206d696e75746560b81b6064820152608490fd5b603c915061036b904261211c565b115f6100bd565b60405162461bcd60e51b815260048101859052600f60248201526e27b7363c9030b3b3b932b3b0ba37b960891b6044820152606490fd5b50346101b7576101e03660031901126101b7576004356001600160a01b0381168103610b3d57602435908115158203610b3d576044356001600160401b038111610b6a5736602382011215610b6a5780600401359061040782611f06565b906104156040519283611ee5565b82825260208201906024829460051b82010190368211610b6657602401915b818310610b4d575050506064358015158103610b3d576084356001600160401b038111610b4957610469903690600401611f1d565b61010435959094906001600160a01b0387168703610b3d57610124356001600160a01b0381168103610b3d57610144356001600160401b038111610b45576104b5903690600401611fea565b6001600160401b036101643511610b45576104d63661016435600401611fea565b6001600160401b036101843511610b41576104f73661018435600401611f1d565b6101a435939092906001600160a01b0385168503610b3d575f80516020612b95833981519152549b6001600160401b038d16158d81610b2d575b6001600160401b03166001149081610b23575b159081610b1a575b50610b085760609b61068e988e60016001600160401b03198216175f80516020612b958339815191525560ff8160401c1615610adc575b50600180546001600160a01b0319166001600160a01b03929092169190911790556002805460ff60a01b1916600160a01b1790556040519c8b908e6105c781611ec9565b3081528a151560208201528c15156040820152015260808d015260a43560a08d015260c43560c08d015260e43560e08d015260018060a01b03166101008c015260018060a01b03166101208b01526101408a015261016089015261018088015260018060a01b03166101a08701526101c4356101c08701526101c4356101e087015261066f3060018060a01b03166bffffffffffffffffffffffff60a01b6004541617600455565b6004805460ff60a01b191691151560a01b60ff60a01b16919091179055565b6004805460ff60a81b191691151560a81b60ff60a81b1691909117905551906001600160401b03821161092d57600160401b821161092d5760055482600555808310610a62575b509060058552845b8160051c8110610a105750601f19811681036109b6575b505060808101518051906001600160401b03821161092d57600160401b821161092d5760209061072a836006548160065561206e565b0160068552845b8281106109955750505060a081015160075560c081015160085560e0810151600955610100810151600a80546001600160a01b039283166001600160a01b031991821617909155610120830151600b80549190931691161790556101408101518051906001600160401b03821161092d57600160401b821161092d576020906107c083600c5481600c5561209b565b01600c8552845b82811061096b575050506101608101518051906001600160401b03821161092d57600160401b821161092d5760209061080683600d5481600d556120c6565b01600d8552845b828110610941575050506101808101518051906001600160401b03821161092d57600160401b821161092d5760209061084c83600e5481600e556120f1565b01600e8552845b82811061090c576101a0840151600f80546001600160a01b0319166001600160a01b03929092169190911790558560ff866101e0876101c08101516010550151601155600280546001600160a01b0319163317905560401c16156108b45780f35b68ff0000000000000000195f80516020612b9583398151915254165f80516020612b95833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b60019060208351930192815f80516020612b35833981519152015501610853565b634e487b7160e01b85526041600452602485fd5b81516001600160a01b03165f80516020612b5583398151915282015560209091019060010161080d565b81516001600160a01b03165f80516020612b158339815191528201556020909101906001016107c7565b60019060208351930192815f80516020612b75833981519152015501610731565b8491855b601f198316830381106109e357505060051c5f80516020612af583398151915201555f806106f4565b90926020610a076001928487511515919060ff809160031b9316831b921b19161790565b940191016109ba565b85865b60208110610a3557505f80516020612af58339815191528201556001016106dd565b93906020610a596001928785511515919060ff809160031b9316831b921b19161790565b92019401610a13565b610a9690601f841680610a9c575b50601f5f80516020612af5833981519152910160051c810190601f850160051c01612058565b5f6106d5565b7f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3daf601f860160051c01908154905f199060200360031b1c1690555f610a70565b68ffffffffffffffffff191668010000000000000001175f80516020612b95833981519152558e610583565b60405163f92ee8a960e01b8152600490fd5b9050155f61054c565b303b159150610544565b604081901c60ff16159150610531565b5f80fd5b8a80fd5b8980fd5b8680fd5b82358015158103610b3d57815260209283019201610434565b8780fd5b8380fd5b50346101b757806003193601126101b75761016060045460075490600854916009549260018060a01b039384600a541685600b54169186600f5416936010549560ff601154986040519a81168b52818160a01c16151560208c015260a81c16151560408a01526060890152608088015260a087015260c086015260e0850152610100840152610120830152610140820152f35b50346101b757602090816003193601126101b75760043591610c21612ad3565b600a546001600160a01b039190821633148015610d61575b15610d2857610c4f60ff60025460a01c166129e1565b81600b541690604051906323b872dd60e01b908201523360248201523060448201528460648201526064815260a08101918183106001600160401b03841117610d1457610c9e92604052612a6e565b601154928301809311610d0057819260115560025416803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba57610cec575b506001905580f35b610cf590611eb6565b6101b757805f610ce4565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b5f52604160045260245ffd5b6064906040519062461bcd60e51b82526004820152601260248201527127b7363c9037bbb732b91037b9103637b0b760711b6044820152fd5b5060248183600154166040519283809263dab4babb60e01b82523360048301525afa908115610dcd578491610d97575b50610c39565b90508181813d8311610dc6575b610dae8183611ee5565b81010312610b6a57518015158103610b6a575f610d91565b503d610da4565b6040513d86823e3d90fd5b50346101b757806003193601126101b757600a546001600160a01b0390610e0290821633146129a8565b610e0a612ad3565b6011549060ff60a01b198060045416600455836011558215610ed6578392610e4d91600254610e3e60ff8260a01c166129e1565b166002553383600b5416612a23565b8060025416803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc578391610ec2575b505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba57610cec57506001905580f35b610ecb90611eb6565b6101c557815f610e85565b60405162461bcd60e51b8152602060048201526012602482015271139bc8199d5b991cc81d1bc818d85b98d95b60721b6044820152606490fd5b50346101b757806003193601126101b757806101e0604051610f3181611ec9565b828152826020820152826040820152606080820152606060808201528260a08201528260c08201528260e08201528261010082015282610120820152606061014082015260606101608201526060610180820152826101a0820152826101c08201520152610f9d6122af565b604051906020825260018060a01b038151166020830152602081015115156040830152604081015115156060830152606081015192610200608084015261022083018451809152602061024085019501915b8181106110da575050506101e06110ad8394611096611080611023608087015193601f1994858a83030160a08b0152611f7b565b60a087015160c089015260c087015160e089015260e087015161010089015260018060a01b036101008801511661012089015260018060a01b036101208801511661014089015261014087015184898303016101608a0152611fae565b6101608601518388830301610180890152611fae565b9061018085015190868303016101a0870152611f7b565b6101a08301516001600160a01b03166101c085810191909152830151828501529101516102008301520390f35b82511515865260209586019590920191600101610fef565b50346101b75760a03660031901126101b7576064356001600160401b038111611d4457611123903690600401611f1d565b6084356001600160401b038111611d4057611142903690600401611f1d565b600a546001600160a01b03169161115a3384146129a8565b61116b60ff60025460a01c166129e1565b6040519261117884611ec9565b60ff60045460018060a01b0381168652818160a01c161515602087015260a81c161515604085015260405180816020600554928381520160055f525f80516020612af5833981519152925f905b80601f830110611b6f576112db945491818110611b59575b818110611b40575b818110611b27575b818110611b0e575b818110611af6575b818110611add575b818110611ac4575b818110611aab575b818110611a92575b818110611a79575b818110611a60575b818110611a47575b818110611a2e575b818110611a15575b8181106119fc575b8181106119e3575b8181106119ca575b8181106119b1575b818110611998575b81811061197f575b818110611966575b81811061194d575b818110611934575b81811061191b575b818110611902575b8181106118e9575b8181106118d0575b8181106118b7575b81811061189e575b818110611885575b81811061186c575b1061185c575b500382611ee5565b60608501526112e861213d565b608085015260075460a085015260085460c085015260095460e0850152610100840152600b546001600160a01b03166101208401526113256121ed565b61014084015261133361224e565b610160840152611341612195565b610180840152600f546001600160a01b03166101a08401526010546101c08401526011546101e0840152805161014084015151808214918261184d575b5081611842575b501561180b57426003556004803560a08581019190915260243560c086015260443560e08601526080850192909252610180840192909252825182546020850151604086015190151590931b60ff60a01b166001600160a01b039092166001600160b01b0319909116171790151560a81b60ff60a81b1617905560608101518051906001600160401b03821161165957600160401b8211611659576020906005548360055580841061178d575b50019060058452835b8160051c811061173b5750601f1981168103806116e2575b50505060808101518051906001600160401b03821161165957600160401b82116116595760209061148a836006548160065561206e565b0160068452835b8281106116c15750505060a081015160075560c081015160085560e0810151600955610100810151600a80546001600160a01b039283166001600160a01b031991821617909155610120830151600b80549190931691161790556101408101518051906001600160401b03821161165957600160401b82116116595760209061152083600c5481600c5561209b565b01600c8452835b828110611697575050506101608101518051906001600160401b03821161165957600160401b82116116595760209061156683600d5481600d556120c6565b01600d8452835b82811061166d575050506101808101518051906001600160401b03821161165957600160401b8211611659576020906115ac83600e5481600e556120f1565b01600e8452835b828110611638576101a0840151600f80546001600160a01b0319166001600160a01b039283161790556101c08501516010556101e08501516011556002548691829116803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba576116285750f35b61163190611eb6565b6101b75780f35b60019060208351930192815f80516020612b358339815191520155016115b3565b634e487b7160e01b84526041600452602484fd5b81516001600160a01b03165f80516020612b5583398151915282015560209091019060010161156d565b81516001600160a01b03165f80516020612b15833981519152820155602090910190600101611527565b60019060208351930192815f80516020612b75833981519152015501611491565b918492855b81811061170c5750505060051c5f80516020612af583398151915201555f8080611453565b90919360206117316001928488511515919060ff809160031b9316831b921b19161790565b95019291016116e7565b84855b6020811061176057505f80516020612af583398151915282015560010161143b565b939060206117846001928785511515919060ff809160031b9316831b921b19161790565b9201940161173e565b6117cc90601f80860160051c91818716806117d2575b500160051c5f80516020612af583398151915201905f80516020612af583398151915201612058565b5f611432565b7f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3daf8401908154905f1990890360031b1c1690555f6117a3565b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206c656e6774687360881b6044820152606490fd5b90508251145f611385565b6080860151511491505f61137e565b60f81c151581526020015f6112d3565b92602060019160ff8560f01c16151581520193016112cd565b92602060019160ff8560e81c16151581520193016112c5565b92602060019160ff8560e01c16151581520193016112bd565b92602060019160ff8560d81c16151581520193016112b5565b92602060019160ff8560d01c16151581520193016112ad565b92602060019160ff8560c81c16151581520193016112a5565b92602060019160ff8560c01c161515815201930161129d565b92602060019160ff8560b81c1615158152019301611295565b92602060019160ff8560b01c161515815201930161128d565b92602060019160ff8560a81c1615158152019301611285565b92602060019160ff8560a01c161515815201930161127d565b92602060019160ff8560981c1615158152019301611275565b92602060019160ff8560901c161515815201930161126d565b92602060019160ff8560881c1615158152019301611265565b92602060019160ff8560801c161515815201930161125d565b92602060019160ff8560781c1615158152019301611255565b92602060019160ff8560701c161515815201930161124d565b92602060019160ff8560681c1615158152019301611245565b92602060019160ff8560601c161515815201930161123d565b92602060019160ff8560581c1615158152019301611235565b92602060019160ff8560501c161515815201930161122d565b92602060019160ff8560481c1615158152019301611225565b92602060019160ff8560401c161515815201930161121d565b92602060019160ff8560381c1615158152019301611215565b92602060019160ff8560301c161515815201930161120d565b92602060019160ff8560281c1615158152019301611205565b92602060019160ff85831c16151581520193016111fd565b92602060019160ff8560181c16151581520193016111f5565b92602060019160ff8560101c16151581520193016111ed565b92602060019160ff8560081c16151581520193016111e5565b92602060019160ff8516151581520193016111dd565b916020919350610400600191865460ff81161515825260ff8160081c1615158583015260ff8160101c161515604083015260ff816060828260181c161515818601528282608082828c1c16151581890152828260281c16151560a0890152828260c095828260301c161515878c0152828260381c16151560e08c0152828260401c1615156101008c0152828260481c1615156101208c0152828260501c1615156101408c0152828260581c1615156101608c01521c161515610180890152828260681c1615156101a0890152828260701c1615156101c0890152828260781c1615156101e08901521c161515610200860152828260881c161515610220860152828260901c161515610240860152828260981c161515610260860152828260a01c161515610280860152828260a81c1615156102a0860152828260b01c1615156102c0860152828260b81c1615156102e08601521c16151561030083015260ff8160c81c16151561032083015260ff8160d01c16151561034083015260ff8160d81c16151561036083015260ff8160e01c16151561038083015260ff8160e81c1615156103a083015260ff8160f01c1615156103c083015260f81c15156103e08201520194019201849293916111c5565b8280fd5b5080fd5b50346101b757806003193601126101b757602060ff60025460a01c166040519015158152f35b50346101b75760203660031901126101b75780600435801580158092036101e75760018060a01b03918291611da883600a541633146129a8565b611db0612ad3565b60025490611dc360ff8360a01c166129e1565b60045460ff60a01b19809460ff60a01b9060a01b1691161760045580611eac575b15611e64575060025490811660025516803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc5783916101c857505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba576101a35750506001815580f35b91505016803b156101c5578190602460405180948193630656df0760e51b83523060048401525af180156101ba57611e9d575b5061019c565b611ea690611eb6565b5f611e97565b5060115415611de4565b6001600160401b038111610d1457604052565b61020081019081106001600160401b03821117610d1457604052565b90601f801991011681019081106001600160401b03821117610d1457604052565b6001600160401b038111610d145760051b60200190565b81601f82011215610b3d57803591611f3483611f06565b92611f426040519485611ee5565b808452602092838086019260051b820101928311610b3d578301905b828210611f6c575050505090565b81358152908301908301611f5e565b9081518082526020808093019301915f5b828110611f9a575050505090565b835185529381019392810192600101611f8c565b9081518082526020808093019301915f5b828110611fcd575050505090565b83516001600160a01b031685529381019392810192600101611fbf565b81601f82011215610b3d5780359161200183611f06565b9261200f6040519485611ee5565b808452602092838086019260051b820101928311610b3d578301905b828210612039575050505090565b81356001600160a01b0381168103610b3d57815290830190830161202b565b818110612063575050565b5f8155600101612058565b808210612079575050565b6120999160065f525f80516020612b758339815191529182019101612058565b565b8082106120a6575050565b61209991600c5f525f80516020612b158339815191529182019101612058565b8082106120d1575050565b61209991600d5f525f80516020612b558339815191529182019101612058565b8082106120fc575050565b61209991600e5f525f80516020612b358339815191529182019101612058565b9190820391821161212957565b634e487b7160e01b5f52601160045260245ffd5b60405190600654808352826020918282019060065f525f80516020612b75833981519152935f905b82821061217b5750505061209992500383611ee5565b855484526001958601958895509381019390910190612165565b60405190600e548083528260209182820190600e5f525f80516020612b35833981519152935f905b8282106121d35750505061209992500383611ee5565b8554845260019586019588955093810193909101906121bd565b60405190600c548083528260209182820190600c5f525f80516020612b15833981519152935f905b82821061222b5750505061209992500383611ee5565b85546001600160a01b031684526001958601958895509381019390910190612215565b60405190600d548083528260209182820190600d5f525f80516020612b55833981519152935f905b82821061228c5750505061209992500383611ee5565b85546001600160a01b031684526001958601958895509381019390910190612276565b604051906122bc82611ec9565b8160045460018060a01b0390818116835260209060ff8160a01c1615158285015260ff60a891821c161515604085015260405190819283918160055494858152019060055f525f80516020612af5833981519152945f5b81601f8201106127d3578461242e9754938383106127bc575b8383106127a2575b838310612788575b83831061276e575b838310612755575b83831061273b575b838310612721575b838310612707575b8383106126ed575b8383106126d3575b8383106126b9575b83831061269f575b838310612685575b83831061266b575b838310612651575b838310612637575b83831061261d575b838310612603575b8383106125e9575b8383106125cf575b8383106125b5575b83831061259d575b50828210612585575b82821061256d575b828210612555575b82821061253d575b828210612525575b82821061250d575b8282106124f5575b8282106124dd575b8282106124c5575b50106124b6575b5090500382611ee5565b606083015261243b61213d565b608083015260075460a083015260085460c083015260095460e083015280600a541661010083015280600b54166101208301526124766121ed565b61014083015261248461224e565b610160830152612492612195565b610180830152600f54166101a08201526010546101c08201526101e0601154910152565b60f81c1515815201805f612424565b6001919460ff8560f01c16151581520193018461241d565b6001919460ff8560e81c161515815201930184612415565b6001919460ff8560e01c16151581520193018461240d565b6001919460ff8560d81c161515815201930184612405565b6001919460ff8560d01c1615158152019301846123fd565b6001919460ff8560c81c1615158152019301846123f5565b6001919460ff8560c01c1615158152019301846123ed565b6001919460ff8560b81c1615158152019301846123e5565b6001919460ff8560b01c1615158152019301846123dd565b9460ff85600194971c1615158152019301845f6123d4565b91948160019160ff8760a01c1615158152019501916123cc565b91948160019160ff8760981c1615158152019501916123c4565b91948160019160ff8760901c1615158152019501916123bc565b91948160019160ff8760881c1615158152019501916123b4565b91948160019160ff8760801c1615158152019501916123ac565b91948160019160ff8760781c1615158152019501916123a4565b91948160019160ff8760701c16151581520195019161239c565b91948160019160ff8760681c161515815201950191612394565b91948160019160ff8760601c16151581520195019161238c565b91948160019160ff8760581c161515815201950191612384565b91948160019160ff8760501c16151581520195019161237c565b91948160019160ff8760481c161515815201950191612374565b91948160019160ff8760401c16151581520195019161236c565b91948160019160ff8760381c161515815201950191612364565b91948160019160ff8760301c16151581520195019161235c565b91948160019160ff8760281c161515815201950191612354565b91948160019160ff87831c16151581520195019161234c565b91948160019160ff8760181c161515815201950191612344565b91948160019160ff8760101c16151581520195019161233c565b91948160019160ff8760081c161515815201950191612334565b91948160019160ff8716151581520195019161232c565b91939594509160016104008792875460ff81161515825260ff8160081c1615158583015260ff8160101c161515604083015260ff816060828260181c161515818601528282608082828c1c16151581890152828260281c16151560a0890152828260c095828260301c161515878c0152828260381c16151560e08c0152828260401c1615156101008c0152828260481c1615156101208c0152828260501c1615156101408c0152828260581c1615156101608c01521c161515610180890152828260681c1615156101a0890152828260701c1615156101c0890152828260781c1615156101e08901521c161515610200860152828260881c161515610220860152828260901c161515610240860152828260981c161515610260860152828260a01c16151561028086015282828c1c1615156102a0860152828260b01c1615156102c0860152828260b81c1615156102e08601521c16151561030083015260ff8160c81c16151561032083015260ff8160d01c16151561034083015260ff8160d81c16151561036083015260ff8160e01c16151561038083015260ff8160e81c1615156103a083015260ff8160f01c1615156103c083015260f81c15156103e082015201950191019186949295939195612313565b156129af57565b60405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606490fd5b156129e857565b60405162461bcd60e51b81526020600482015260136024820152724f66666572206973206e6f742061637469766560681b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03909216602483015260448083019390935291815260808101916001600160401b03831182841017610d1457612099926040525b905f602091828151910182855af115612ac8575f513d612abf57506001600160a01b0381163b155b612a9d5750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b60011415612a96565b6040513d5f823e3d90fd5b60025f5414612ae25760025f55565b604051633ee5aeb560e01b8152600490fdfe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0df6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7bb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fdd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212209ec0ee198f442453bd3fdea5dc79fab9dcc2d07fb8d7cd44b81020bb947fbb3964736f6c63430008140033

Deployed Bytecode

0x60806040526004361015610011575f80fd5b5f803560e01c80630451af4e14611d6e57806322f3e2d414611d485780632ea3e0f6146110f257806349b1b18714610f1057806362d05c7814610dd8578063be99970514610c01578063c70f7b3a14610b6e578063df1aaf1d146103a95763eeabf8291461007d575f80fd5b346101b757602090816003193601126101b7576001546001600160a01b03906004359082163303610372576100b0612ad3565b600354801590811561035d575b5015610306576100cb6122af565b906101e08201518082116102c1576103e89004811061028b578015610246579361010d856100fc869760115461211c565b601155338561012086015116612a23565b60115415918261023a575b5050156101eb576002805460ff60a01b1981169091558116803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc5783916101c8575b505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba576101a3575b50505b6001815580f35b6101ac90611eb6565b6101b757805f610199565b80fd5b6040513d84823e3d90fd5b50fd5b6101d190611eb6565b6101c557815f610163565b6040513d85823e3d90fd5b5050fd5b60025416803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba57610226575b505061019c565b61022f90611eb6565b6101b757805f61021f565b01511590505f80610118565b60405162461bcd60e51b815260048101869052601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606490fd5b60405162461bcd60e51b815260048101869052600e60248201526d416d6f756e7420746f6f206c6f7760901b6044820152606490fd5b60405162461bcd60e51b815260048101879052601f60248201527f416d6f756e74206578636565647320617661696c61626c6520616d6f756e74006044820152606490fd5b60405162461bcd60e51b815260048101859052602960248201527f4f6666657220686173206265656e207570646174656420696e20746865206c616044820152687374206d696e75746560b81b6064820152608490fd5b603c915061036b904261211c565b115f6100bd565b60405162461bcd60e51b815260048101859052600f60248201526e27b7363c9030b3b3b932b3b0ba37b960891b6044820152606490fd5b50346101b7576101e03660031901126101b7576004356001600160a01b0381168103610b3d57602435908115158203610b3d576044356001600160401b038111610b6a5736602382011215610b6a5780600401359061040782611f06565b906104156040519283611ee5565b82825260208201906024829460051b82010190368211610b6657602401915b818310610b4d575050506064358015158103610b3d576084356001600160401b038111610b4957610469903690600401611f1d565b61010435959094906001600160a01b0387168703610b3d57610124356001600160a01b0381168103610b3d57610144356001600160401b038111610b45576104b5903690600401611fea565b6001600160401b036101643511610b45576104d63661016435600401611fea565b6001600160401b036101843511610b41576104f73661018435600401611f1d565b6101a435939092906001600160a01b0385168503610b3d575f80516020612b95833981519152549b6001600160401b038d16158d81610b2d575b6001600160401b03166001149081610b23575b159081610b1a575b50610b085760609b61068e988e60016001600160401b03198216175f80516020612b958339815191525560ff8160401c1615610adc575b50600180546001600160a01b0319166001600160a01b03929092169190911790556002805460ff60a01b1916600160a01b1790556040519c8b908e6105c781611ec9565b3081528a151560208201528c15156040820152015260808d015260a43560a08d015260c43560c08d015260e43560e08d015260018060a01b03166101008c015260018060a01b03166101208b01526101408a015261016089015261018088015260018060a01b03166101a08701526101c4356101c08701526101c4356101e087015261066f3060018060a01b03166bffffffffffffffffffffffff60a01b6004541617600455565b6004805460ff60a01b191691151560a01b60ff60a01b16919091179055565b6004805460ff60a81b191691151560a81b60ff60a81b1691909117905551906001600160401b03821161092d57600160401b821161092d5760055482600555808310610a62575b509060058552845b8160051c8110610a105750601f19811681036109b6575b505060808101518051906001600160401b03821161092d57600160401b821161092d5760209061072a836006548160065561206e565b0160068552845b8281106109955750505060a081015160075560c081015160085560e0810151600955610100810151600a80546001600160a01b039283166001600160a01b031991821617909155610120830151600b80549190931691161790556101408101518051906001600160401b03821161092d57600160401b821161092d576020906107c083600c5481600c5561209b565b01600c8552845b82811061096b575050506101608101518051906001600160401b03821161092d57600160401b821161092d5760209061080683600d5481600d556120c6565b01600d8552845b828110610941575050506101808101518051906001600160401b03821161092d57600160401b821161092d5760209061084c83600e5481600e556120f1565b01600e8552845b82811061090c576101a0840151600f80546001600160a01b0319166001600160a01b03929092169190911790558560ff866101e0876101c08101516010550151601155600280546001600160a01b0319163317905560401c16156108b45780f35b68ff0000000000000000195f80516020612b9583398151915254165f80516020612b95833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b60019060208351930192815f80516020612b35833981519152015501610853565b634e487b7160e01b85526041600452602485fd5b81516001600160a01b03165f80516020612b5583398151915282015560209091019060010161080d565b81516001600160a01b03165f80516020612b158339815191528201556020909101906001016107c7565b60019060208351930192815f80516020612b75833981519152015501610731565b8491855b601f198316830381106109e357505060051c5f80516020612af583398151915201555f806106f4565b90926020610a076001928487511515919060ff809160031b9316831b921b19161790565b940191016109ba565b85865b60208110610a3557505f80516020612af58339815191528201556001016106dd565b93906020610a596001928785511515919060ff809160031b9316831b921b19161790565b92019401610a13565b610a9690601f841680610a9c575b50601f5f80516020612af5833981519152910160051c810190601f850160051c01612058565b5f6106d5565b7f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3daf601f860160051c01908154905f199060200360031b1c1690555f610a70565b68ffffffffffffffffff191668010000000000000001175f80516020612b95833981519152558e610583565b60405163f92ee8a960e01b8152600490fd5b9050155f61054c565b303b159150610544565b604081901c60ff16159150610531565b5f80fd5b8a80fd5b8980fd5b8680fd5b82358015158103610b3d57815260209283019201610434565b8780fd5b8380fd5b50346101b757806003193601126101b75761016060045460075490600854916009549260018060a01b039384600a541685600b54169186600f5416936010549560ff601154986040519a81168b52818160a01c16151560208c015260a81c16151560408a01526060890152608088015260a087015260c086015260e0850152610100840152610120830152610140820152f35b50346101b757602090816003193601126101b75760043591610c21612ad3565b600a546001600160a01b039190821633148015610d61575b15610d2857610c4f60ff60025460a01c166129e1565b81600b541690604051906323b872dd60e01b908201523360248201523060448201528460648201526064815260a08101918183106001600160401b03841117610d1457610c9e92604052612a6e565b601154928301809311610d0057819260115560025416803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba57610cec575b506001905580f35b610cf590611eb6565b6101b757805f610ce4565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b5f52604160045260245ffd5b6064906040519062461bcd60e51b82526004820152601260248201527127b7363c9037bbb732b91037b9103637b0b760711b6044820152fd5b5060248183600154166040519283809263dab4babb60e01b82523360048301525afa908115610dcd578491610d97575b50610c39565b90508181813d8311610dc6575b610dae8183611ee5565b81010312610b6a57518015158103610b6a575f610d91565b503d610da4565b6040513d86823e3d90fd5b50346101b757806003193601126101b757600a546001600160a01b0390610e0290821633146129a8565b610e0a612ad3565b6011549060ff60a01b198060045416600455836011558215610ed6578392610e4d91600254610e3e60ff8260a01c166129e1565b166002553383600b5416612a23565b8060025416803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc578391610ec2575b505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba57610cec57506001905580f35b610ecb90611eb6565b6101c557815f610e85565b60405162461bcd60e51b8152602060048201526012602482015271139bc8199d5b991cc81d1bc818d85b98d95b60721b6044820152606490fd5b50346101b757806003193601126101b757806101e0604051610f3181611ec9565b828152826020820152826040820152606080820152606060808201528260a08201528260c08201528260e08201528261010082015282610120820152606061014082015260606101608201526060610180820152826101a0820152826101c08201520152610f9d6122af565b604051906020825260018060a01b038151166020830152602081015115156040830152604081015115156060830152606081015192610200608084015261022083018451809152602061024085019501915b8181106110da575050506101e06110ad8394611096611080611023608087015193601f1994858a83030160a08b0152611f7b565b60a087015160c089015260c087015160e089015260e087015161010089015260018060a01b036101008801511661012089015260018060a01b036101208801511661014089015261014087015184898303016101608a0152611fae565b6101608601518388830301610180890152611fae565b9061018085015190868303016101a0870152611f7b565b6101a08301516001600160a01b03166101c085810191909152830151828501529101516102008301520390f35b82511515865260209586019590920191600101610fef565b50346101b75760a03660031901126101b7576064356001600160401b038111611d4457611123903690600401611f1d565b6084356001600160401b038111611d4057611142903690600401611f1d565b600a546001600160a01b03169161115a3384146129a8565b61116b60ff60025460a01c166129e1565b6040519261117884611ec9565b60ff60045460018060a01b0381168652818160a01c161515602087015260a81c161515604085015260405180816020600554928381520160055f525f80516020612af5833981519152925f905b80601f830110611b6f576112db945491818110611b59575b818110611b40575b818110611b27575b818110611b0e575b818110611af6575b818110611add575b818110611ac4575b818110611aab575b818110611a92575b818110611a79575b818110611a60575b818110611a47575b818110611a2e575b818110611a15575b8181106119fc575b8181106119e3575b8181106119ca575b8181106119b1575b818110611998575b81811061197f575b818110611966575b81811061194d575b818110611934575b81811061191b575b818110611902575b8181106118e9575b8181106118d0575b8181106118b7575b81811061189e575b818110611885575b81811061186c575b1061185c575b500382611ee5565b60608501526112e861213d565b608085015260075460a085015260085460c085015260095460e0850152610100840152600b546001600160a01b03166101208401526113256121ed565b61014084015261133361224e565b610160840152611341612195565b610180840152600f546001600160a01b03166101a08401526010546101c08401526011546101e0840152805161014084015151808214918261184d575b5081611842575b501561180b57426003556004803560a08581019190915260243560c086015260443560e08601526080850192909252610180840192909252825182546020850151604086015190151590931b60ff60a01b166001600160a01b039092166001600160b01b0319909116171790151560a81b60ff60a81b1617905560608101518051906001600160401b03821161165957600160401b8211611659576020906005548360055580841061178d575b50019060058452835b8160051c811061173b5750601f1981168103806116e2575b50505060808101518051906001600160401b03821161165957600160401b82116116595760209061148a836006548160065561206e565b0160068452835b8281106116c15750505060a081015160075560c081015160085560e0810151600955610100810151600a80546001600160a01b039283166001600160a01b031991821617909155610120830151600b80549190931691161790556101408101518051906001600160401b03821161165957600160401b82116116595760209061152083600c5481600c5561209b565b01600c8452835b828110611697575050506101608101518051906001600160401b03821161165957600160401b82116116595760209061156683600d5481600d556120c6565b01600d8452835b82811061166d575050506101808101518051906001600160401b03821161165957600160401b8211611659576020906115ac83600e5481600e556120f1565b01600e8452835b828110611638576101a0840151600f80546001600160a01b0319166001600160a01b039283161790556101c08501516010556101e08501516011556002548691829116803b156101c557818091602460405180948193630656df0760e51b83523060048401525af180156101ba576116285750f35b61163190611eb6565b6101b75780f35b60019060208351930192815f80516020612b358339815191520155016115b3565b634e487b7160e01b84526041600452602484fd5b81516001600160a01b03165f80516020612b5583398151915282015560209091019060010161156d565b81516001600160a01b03165f80516020612b15833981519152820155602090910190600101611527565b60019060208351930192815f80516020612b75833981519152015501611491565b918492855b81811061170c5750505060051c5f80516020612af583398151915201555f8080611453565b90919360206117316001928488511515919060ff809160031b9316831b921b19161790565b95019291016116e7565b84855b6020811061176057505f80516020612af583398151915282015560010161143b565b939060206117846001928785511515919060ff809160031b9316831b921b19161790565b9201940161173e565b6117cc90601f80860160051c91818716806117d2575b500160051c5f80516020612af583398151915201905f80516020612af583398151915201612058565b5f611432565b7f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3daf8401908154905f1990890360031b1c1690555f6117a3565b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206c656e6774687360881b6044820152606490fd5b90508251145f611385565b6080860151511491505f61137e565b60f81c151581526020015f6112d3565b92602060019160ff8560f01c16151581520193016112cd565b92602060019160ff8560e81c16151581520193016112c5565b92602060019160ff8560e01c16151581520193016112bd565b92602060019160ff8560d81c16151581520193016112b5565b92602060019160ff8560d01c16151581520193016112ad565b92602060019160ff8560c81c16151581520193016112a5565b92602060019160ff8560c01c161515815201930161129d565b92602060019160ff8560b81c1615158152019301611295565b92602060019160ff8560b01c161515815201930161128d565b92602060019160ff8560a81c1615158152019301611285565b92602060019160ff8560a01c161515815201930161127d565b92602060019160ff8560981c1615158152019301611275565b92602060019160ff8560901c161515815201930161126d565b92602060019160ff8560881c1615158152019301611265565b92602060019160ff8560801c161515815201930161125d565b92602060019160ff8560781c1615158152019301611255565b92602060019160ff8560701c161515815201930161124d565b92602060019160ff8560681c1615158152019301611245565b92602060019160ff8560601c161515815201930161123d565b92602060019160ff8560581c1615158152019301611235565b92602060019160ff8560501c161515815201930161122d565b92602060019160ff8560481c1615158152019301611225565b92602060019160ff8560401c161515815201930161121d565b92602060019160ff8560381c1615158152019301611215565b92602060019160ff8560301c161515815201930161120d565b92602060019160ff8560281c1615158152019301611205565b92602060019160ff85831c16151581520193016111fd565b92602060019160ff8560181c16151581520193016111f5565b92602060019160ff8560101c16151581520193016111ed565b92602060019160ff8560081c16151581520193016111e5565b92602060019160ff8516151581520193016111dd565b916020919350610400600191865460ff81161515825260ff8160081c1615158583015260ff8160101c161515604083015260ff816060828260181c161515818601528282608082828c1c16151581890152828260281c16151560a0890152828260c095828260301c161515878c0152828260381c16151560e08c0152828260401c1615156101008c0152828260481c1615156101208c0152828260501c1615156101408c0152828260581c1615156101608c01521c161515610180890152828260681c1615156101a0890152828260701c1615156101c0890152828260781c1615156101e08901521c161515610200860152828260881c161515610220860152828260901c161515610240860152828260981c161515610260860152828260a01c161515610280860152828260a81c1615156102a0860152828260b01c1615156102c0860152828260b81c1615156102e08601521c16151561030083015260ff8160c81c16151561032083015260ff8160d01c16151561034083015260ff8160d81c16151561036083015260ff8160e01c16151561038083015260ff8160e81c1615156103a083015260ff8160f01c1615156103c083015260f81c15156103e08201520194019201849293916111c5565b8280fd5b5080fd5b50346101b757806003193601126101b757602060ff60025460a01c166040519015158152f35b50346101b75760203660031901126101b75780600435801580158092036101e75760018060a01b03918291611da883600a541633146129a8565b611db0612ad3565b60025490611dc360ff8360a01c166129e1565b60045460ff60a01b19809460ff60a01b9060a01b1691161760045580611eac575b15611e64575060025490811660025516803b156101e757828091602460405180948193632c52105360e21b83523060048401525af19081156101dc5783916101c857505060025416803b156101c5578180916024604051809481936346c8f1c760e11b83523060048401525af180156101ba576101a35750506001815580f35b91505016803b156101c5578190602460405180948193630656df0760e51b83523060048401525af180156101ba57611e9d575b5061019c565b611ea690611eb6565b5f611e97565b5060115415611de4565b6001600160401b038111610d1457604052565b61020081019081106001600160401b03821117610d1457604052565b90601f801991011681019081106001600160401b03821117610d1457604052565b6001600160401b038111610d145760051b60200190565b81601f82011215610b3d57803591611f3483611f06565b92611f426040519485611ee5565b808452602092838086019260051b820101928311610b3d578301905b828210611f6c575050505090565b81358152908301908301611f5e565b9081518082526020808093019301915f5b828110611f9a575050505090565b835185529381019392810192600101611f8c565b9081518082526020808093019301915f5b828110611fcd575050505090565b83516001600160a01b031685529381019392810192600101611fbf565b81601f82011215610b3d5780359161200183611f06565b9261200f6040519485611ee5565b808452602092838086019260051b820101928311610b3d578301905b828210612039575050505090565b81356001600160a01b0381168103610b3d57815290830190830161202b565b818110612063575050565b5f8155600101612058565b808210612079575050565b6120999160065f525f80516020612b758339815191529182019101612058565b565b8082106120a6575050565b61209991600c5f525f80516020612b158339815191529182019101612058565b8082106120d1575050565b61209991600d5f525f80516020612b558339815191529182019101612058565b8082106120fc575050565b61209991600e5f525f80516020612b358339815191529182019101612058565b9190820391821161212957565b634e487b7160e01b5f52601160045260245ffd5b60405190600654808352826020918282019060065f525f80516020612b75833981519152935f905b82821061217b5750505061209992500383611ee5565b855484526001958601958895509381019390910190612165565b60405190600e548083528260209182820190600e5f525f80516020612b35833981519152935f905b8282106121d35750505061209992500383611ee5565b8554845260019586019588955093810193909101906121bd565b60405190600c548083528260209182820190600c5f525f80516020612b15833981519152935f905b82821061222b5750505061209992500383611ee5565b85546001600160a01b031684526001958601958895509381019390910190612215565b60405190600d548083528260209182820190600d5f525f80516020612b55833981519152935f905b82821061228c5750505061209992500383611ee5565b85546001600160a01b031684526001958601958895509381019390910190612276565b604051906122bc82611ec9565b8160045460018060a01b0390818116835260209060ff8160a01c1615158285015260ff60a891821c161515604085015260405190819283918160055494858152019060055f525f80516020612af5833981519152945f5b81601f8201106127d3578461242e9754938383106127bc575b8383106127a2575b838310612788575b83831061276e575b838310612755575b83831061273b575b838310612721575b838310612707575b8383106126ed575b8383106126d3575b8383106126b9575b83831061269f575b838310612685575b83831061266b575b838310612651575b838310612637575b83831061261d575b838310612603575b8383106125e9575b8383106125cf575b8383106125b5575b83831061259d575b50828210612585575b82821061256d575b828210612555575b82821061253d575b828210612525575b82821061250d575b8282106124f5575b8282106124dd575b8282106124c5575b50106124b6575b5090500382611ee5565b606083015261243b61213d565b608083015260075460a083015260085460c083015260095460e083015280600a541661010083015280600b54166101208301526124766121ed565b61014083015261248461224e565b610160830152612492612195565b610180830152600f54166101a08201526010546101c08201526101e0601154910152565b60f81c1515815201805f612424565b6001919460ff8560f01c16151581520193018461241d565b6001919460ff8560e81c161515815201930184612415565b6001919460ff8560e01c16151581520193018461240d565b6001919460ff8560d81c161515815201930184612405565b6001919460ff8560d01c1615158152019301846123fd565b6001919460ff8560c81c1615158152019301846123f5565b6001919460ff8560c01c1615158152019301846123ed565b6001919460ff8560b81c1615158152019301846123e5565b6001919460ff8560b01c1615158152019301846123dd565b9460ff85600194971c1615158152019301845f6123d4565b91948160019160ff8760a01c1615158152019501916123cc565b91948160019160ff8760981c1615158152019501916123c4565b91948160019160ff8760901c1615158152019501916123bc565b91948160019160ff8760881c1615158152019501916123b4565b91948160019160ff8760801c1615158152019501916123ac565b91948160019160ff8760781c1615158152019501916123a4565b91948160019160ff8760701c16151581520195019161239c565b91948160019160ff8760681c161515815201950191612394565b91948160019160ff8760601c16151581520195019161238c565b91948160019160ff8760581c161515815201950191612384565b91948160019160ff8760501c16151581520195019161237c565b91948160019160ff8760481c161515815201950191612374565b91948160019160ff8760401c16151581520195019161236c565b91948160019160ff8760381c161515815201950191612364565b91948160019160ff8760301c16151581520195019161235c565b91948160019160ff8760281c161515815201950191612354565b91948160019160ff87831c16151581520195019161234c565b91948160019160ff8760181c161515815201950191612344565b91948160019160ff8760101c16151581520195019161233c565b91948160019160ff8760081c161515815201950191612334565b91948160019160ff8716151581520195019161232c565b91939594509160016104008792875460ff81161515825260ff8160081c1615158583015260ff8160101c161515604083015260ff816060828260181c161515818601528282608082828c1c16151581890152828260281c16151560a0890152828260c095828260301c161515878c0152828260381c16151560e08c0152828260401c1615156101008c0152828260481c1615156101208c0152828260501c1615156101408c0152828260581c1615156101608c01521c161515610180890152828260681c1615156101a0890152828260701c1615156101c0890152828260781c1615156101e08901521c161515610200860152828260881c161515610220860152828260901c161515610240860152828260981c161515610260860152828260a01c16151561028086015282828c1c1615156102a0860152828260b01c1615156102c0860152828260b81c1615156102e08601521c16151561030083015260ff8160c81c16151561032083015260ff8160d01c16151561034083015260ff8160d81c16151561036083015260ff8160e01c16151561038083015260ff8160e81c1615156103a083015260ff8160f01c1615156103c083015260f81c15156103e082015201950191019186949295939195612313565b156129af57565b60405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606490fd5b156129e857565b60405162461bcd60e51b81526020600482015260136024820152724f66666572206973206e6f742061637469766560681b6044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03909216602483015260448083019390935291815260808101916001600160401b03831182841017610d1457612099926040525b905f602091828151910182855af115612ac8575f513d612abf57506001600160a01b0381163b155b612a9d5750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b60011415612a96565b6040513d5f823e3d90fd5b60025f5414612ae25760025f55565b604051633ee5aeb560e01b8152600490fdfe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0df6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7bb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fdd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212209ec0ee198f442453bd3fdea5dc79fab9dcc2d07fb8d7cd44b81020bb947fbb3964736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.