ETH Price: $2,741.97 (-0.85%)

Contract

0x7c1B1D170D2a59ced43151B51a026d27a04B3eC4

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultManager

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 50 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.28;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import { IVaultManager } from "../interfaces/positions/IVaultManager.sol";
import { IStrategyManager } from "../interfaces/positions/IStrategyManager.sol";
import { IPositionManager } from "../interfaces/positions/IPositionManager.sol";

import { ZeroAddress, PermissionDenied, InvalidLendingThreshold } from "../utils/Helpers.sol";

contract VaultManager is Initializable, OwnableUpgradeable, IVaultManager {
    /// -----------------------------------------------------------------------
    /// Storage
    /// -----------------------------------------------------------------------

    /// @dev Storage slot for VaultManager storage
    bytes32 private constant VAULT_MANAGER_STORAGE_POSITION =
        keccak256("vault.manager.storage") & ~bytes32(uint256(0xff));

    struct VaultManagerStorage {
        IStrategyManager strategyManager;
        IPositionManager positionManager;
        address vaultRegistry;
        bool globalDepositEnabled;
        address morphoBlueCaller;
        mapping(address => VaultStrategyConfig) vaultConfigs;
    }

    modifier onlyVaultRegistry() {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        if (_msgSender() != s.vaultRegistry) revert PermissionDenied();
        _;
    }

    /// -----------------------------------------------------------------------
    /// Initializer
    /// -----------------------------------------------------------------------

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    function initialize(address _strategyManager, address _owner) external initializer {
        if (_strategyManager == address(0) || _owner == address(0)) revert ZeroAddress();

        __Ownable_init(_owner);
        VaultManagerStorage storage s = _getVaultManagerStorage();
        s.strategyManager = IStrategyManager(_strategyManager);
        s.globalDepositEnabled = true;
    }

    /// -----------------------------------------------------------------------
    /// Read-only Functions
    /// -----------------------------------------------------------------------

    function getStrategyManager() external view override returns (address) {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        return address(s.strategyManager);
    }

    function getPositionManager() external view override returns (address) {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        return address(s.positionManager);
    }

    function getMorphoBlueCaller() external view override returns (address) {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        return address(s.morphoBlueCaller);
    }

    function assertValidStrategy(address vault, address strategy) external view {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        if (s.vaultConfigs[vault].strategy != strategy) revert InvalidStrategyMapping();
    }

    function getVaultStrategyConfig(address vault) external view returns (VaultStrategyConfig memory) {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        VaultStrategyConfig memory cfg = s.vaultConfigs[vault];
        if (cfg.strategy == address(0)) revert VaultNotRegistered();
        return cfg;
    }

    function getDepositEnabled(address vault) external view returns (bool) {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        VaultStrategyConfig memory cfg = s.vaultConfigs[vault];
        if (cfg.strategy == address(0)) revert VaultNotRegistered();
        return cfg.depositEnabled && s.globalDepositEnabled;
    }

    /// -----------------------------------------------------------------------
    /// Write-only Functions
    /// -----------------------------------------------------------------------

    function registerVault(
        address user,
        address vault,
        address strategy,
        uint256 lendingThreshold,
        uint64 iteration
    )
        external
        onlyVaultRegistry
    {
        if (user == address(0) || vault == address(0) || strategy == address(0)) revert ZeroAddress();

        VaultManagerStorage storage s = _getVaultManagerStorage();
        IStrategyManager.StrategyConfig memory stratConfig = s.strategyManager.getStrategyConfig(strategy);

        if (stratConfig.loopingEnabled && (lendingThreshold < 1 || lendingThreshold > 1e18)) {
            revert InvalidLendingThreshold();
        }

        s.vaultConfigs[vault] = VaultStrategyConfig({
            strategy: strategy,
            lendingThreshold: lendingThreshold,
            iteration: iteration,
            depositEnabled: true,
            user: user
        });

        emit VaultRegistered(user, vault, strategy, lendingThreshold, iteration);
    }

    function upsertGlobalDepositFlag(bool flag) external onlyOwner {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        s.globalDepositEnabled = flag;

        emit VaultGlobalDepositFlagUpdated(_msgSender(), flag);
    }

    function upsertDepositEnabled(address vault, bool flag) external override onlyOwner {
        if (vault == address(0)) revert ZeroAddress();

        VaultManagerStorage storage s = _getVaultManagerStorage();
        if (s.vaultConfigs[vault].strategy == address(0)) revert VaultNotRegistered();
        s.vaultConfigs[vault].depositEnabled = flag;

        emit VaultDepositFlagUpdated(vault, _msgSender(), flag);
    }

    function updateVaultRegistry(address _vaultRegistry) external onlyOwner {
        if (_vaultRegistry == address(0)) revert ZeroAddress();
        _setVaultRegistry(_vaultRegistry);

        emit VaultRegistryUpdated(_msgSender(), _vaultRegistry);
    }

    function updatePositionManager(address _positionManager) external onlyOwner {
        if (_positionManager == address(0)) revert ZeroAddress();
        _setPositionManager(IPositionManager(_positionManager));

        emit PositionManagerUpdated(_msgSender(), _positionManager);
    }

    function updateMorphoBlueCaller(address _morphoBlueCaller) external onlyOwner {
        if (_morphoBlueCaller == address(0)) revert ZeroAddress();
        _setMorphoBlueCaller(_morphoBlueCaller);

        emit MorphoBlueCallerUpdated(_msgSender(), _morphoBlueCaller);
    }

    /// @dev Internal getter for VaultManagerStorage
    function _getVaultManagerStorage() private pure returns (VaultManagerStorage storage s) {
        bytes32 slot = VAULT_MANAGER_STORAGE_POSITION;
        assembly {
            s.slot := slot
        }
    }

    /// @dev Internal setter for vaultRegistry
    function _setVaultRegistry(address vaultRegistry) private {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        s.vaultRegistry = vaultRegistry;
    }

    /// @dev Internal setter for positionManager
    function _setPositionManager(IPositionManager positionManager) private {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        s.positionManager = positionManager;
    }

    /// @dev Internal setter for morphoBlueCaller
    function _setMorphoBlueCaller(address morphoBlueCaller) private {
        VaultManagerStorage storage s = _getVaultManagerStorage();
        s.morphoBlueCaller = morphoBlueCaller;
    }
}

// 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 Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

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

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    function __Ownable_init(address initialOwner) internal onlyInitializing {
        __Ownable_init_unchained(initialOwner);
    }

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.28;

interface IVaultManager {
    struct VaultStrategyConfig {
        address user;
        address strategy;
        uint64 iteration;
        uint256 lendingThreshold;
        bool depositEnabled;
    }

    // event
    event VaultGlobalDepositFlagUpdated(address sender, bool flag);
    event VaultDepositFlagUpdated(address vault, address sender, bool flag);

    event VaultRegistered(address user, address vault, address strategy, uint256 lendingThreshold, uint64 iteration);

    event VaultRegistryUpdated(address sender, address vaultRegistry);
    event PositionManagerUpdated(address sender, address positionManager);
    event MorphoBlueCallerUpdated(address sender, address morphoBlueCaller);

    // errors
    error InvalidStrategyMapping();
    error VaultNotRegistered();

    // read-only functions
    function assertValidStrategy(address vault, address strategy) external view;
    function getStrategyManager() external view returns (address);
    function getPositionManager() external view returns (address);
    function getVaultStrategyConfig(address vault) external view returns (VaultStrategyConfig memory);
    function getDepositEnabled(address vault) external view returns (bool);
    function getMorphoBlueCaller() external view returns (address);

    // write-only functions
    function upsertGlobalDepositFlag(bool flag) external;
    function registerVault(
        address user,
        address vault,
        address strategy,
        uint256 lendingThreshold,
        uint64 iteration
    )
        external;
    function upsertDepositEnabled(address vault, bool flag) external;
}

// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.28;

interface IStrategyManager {
    struct StrategyConfig {
        address underlying;
        address primaryDepositToken; // useful in case of swapping token to primary token for deposits
        address primaryWithdrawalToken; // useful in case of swapping token to primary token for withdrawals
        bool depositEnabled;
        bool loopingEnabled;
    }

    // event
    event StrategyAdded(
        address strategyAddress,
        address primaryDepositToken,
        address primaryWithdrawalToken,
        address underlying,
        bool loopingEnabled
    );
    event StrategyRemoved(address strategyAddress);

    event StrategyDepositFlagUpdated(address strategyAddress, bool flag);
    event StrategyTransactionCodeUpdated(address strategyAddress, uint64 transactionCode, bool flag);
    event StrategyTokenWhitelistingUpdated(address strategyAddress, address tokenAddress, uint64 purpose, bool flag);

    // error
    error InvalidStrategy();
    error StrategyAlreadyExist(address strategy);
    error StrategyDoesNotExist(address strategy);
    error StrategyTokenNotWhitelisted(address strategy, address token, uint64 purpose);

    // read-only function
    function isDepositEnabled(address strategyAddress) external view returns (bool);
    function getStrategyConfig(address strategyAddress) external view returns (StrategyConfig memory);
    function assertStrategyExists(address strategyAddress) external view;
    function isTransactionCodeWhitelisted(
        address strategyAddress,
        uint64 transactionCode
    )
        external
        view
        returns (bool);
    function assertStrategyTokenWhitelisted(
        address strategyAddress,
        address tokenAddress,
        uint64 purpose
    )
        external
        view;

    // write-only functions
    function addStrategy(
        address strategyAddress,
        address primaryDepositToken,
        address primaryWithdrawalToken,
        address underlying,
        bool loopingEnabled
    )
        external;
    function removeStrategy(address strategyAddress) external;
    function upsertDepositEnabled(address strategyAddress, bool flag) external;
    function upsertTransactionCode(address strategyAddress, uint64 transactionCode, bool flag) external;
    function updateTokenWhitelisting(
        address strategyAddress,
        address tokenAddress,
        uint64 purpose,
        bool flag
    )
        external;
}

// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.28;

interface IPositionManager {
    //events
    event PositionCreated(
        address _vault, address user, address strategy, uint64 transactionCode, address _tokenAddress, uint256 _value
    );
    event LeveragedPositionCreated(
        address _vault,
        address user,
        address strategy,
        uint64 transactionCode,
        address _tokenAddress,
        uint256 _value,
        uint64 iteration,
        uint256 loopingThreshold
    );

    event PositionDeposited(
        address _vault, address user, address strategy, uint64 transactionCode, address _tokenAddress, uint256 _value
    );
    event PositionWithdrawn(
        address _vault, address user, address strategy, uint64 transactionCode, address _tokenAddress, uint256 _value
    );

    //errors
    error IncorrectStrategy(address _strategy);

    // functions
    function createPosition(
        address strategy,
        uint64 transactionCode,
        address _tokenAddress,
        uint256 _value,
        bytes calldata extras
    )
        external
        payable
        returns (address);

    function createLeveragedPosition(
        address strategy,
        uint64 transactionCode,
        address _tokenAddress,
        uint256 _value,
        uint64 iteration,
        uint256 loopingThreshold,
        bytes calldata _extras
    )
        external
        payable
        returns (address);

    function depositPosition(
        address vault,
        address strategy,
        uint64 transactionCode,
        address _tokenAddress,
        uint256 _value,
        bytes calldata _extras
    )
        external
        payable;

    function withdrawFromPosition(
        address vault,
        address strategy,
        uint64 transactionCode,
        address _tokenAddress,
        uint256 _value,
        bytes calldata _extras
    )
        external
        payable;
}

File 7 of 8 : Helpers.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.28;

// common errors
error IncorrectTypeID(uint256 _typeId, address _sender);
error NegativePriceError();
error PriceStaleError();
error CallFailed();
error NotDepositContract(address _address);
error NotExecutor(address _address);
error NotStrategyContract(address _address);
error IncorrectTokenAddress(address _tokenAddress);
error IncorrectValue();
error IncorrectMessageAddress(address _sender);
error ZeroAddress();
error ZeroAmount();
error ZeroValue();
error MinimumDustAmountError();
error NonPayableFunction();
error DivideByZeroError();
error PermissionDenied();
error InvalidLendingThreshold();

error NotImplemented();

// common events

//deposit events

//deposit

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

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

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@spectra-core/src/=lib/spectra-core/src/",
    "@pythnetwork/pyth-sdk-solidity/=node_modules/@pythnetwork/pyth-sdk-solidity/",
    "hardhat/=node_modules/hardhat/",
    "@morpho-blue/=lib/morpho-blue/",
    "ds-test/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "morpho-blue/=lib/morpho-blue/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin-erc20-basic/=lib/spectra-core/lib/openzeppelin-contracts/contracts/token/ERC20/",
    "openzeppelin-erc20-extensions/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/",
    "openzeppelin-erc20/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/",
    "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
    "openzeppelin-math/=lib/spectra-core/lib/openzeppelin-contracts/contracts/utils/math/",
    "openzeppelin-proxy/=lib/spectra-core/lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/",
    "openzeppelin-utils/=lib/spectra-core/lib/openzeppelin-contracts/contracts/utils/",
    "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/",
    "spectra-core/=lib/spectra-core/",
    "v3-core/=lib/v3-core/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 50
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidLendingThreshold","type":"error"},{"inputs":[],"name":"InvalidStrategyMapping","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PermissionDenied","type":"error"},{"inputs":[],"name":"VaultNotRegistered","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"morphoBlueCaller","type":"address"}],"name":"MorphoBlueCallerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"positionManager","type":"address"}],"name":"PositionManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"VaultDepositFlagUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"VaultGlobalDepositFlagUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"lendingThreshold","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"iteration","type":"uint64"}],"name":"VaultRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"vaultRegistry","type":"address"}],"name":"VaultRegistryUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"strategy","type":"address"}],"name":"assertValidStrategy","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"getDepositEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMorphoBlueCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPositionManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStrategyManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"getVaultStrategyConfig","outputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"uint64","name":"iteration","type":"uint64"},{"internalType":"uint256","name":"lendingThreshold","type":"uint256"},{"internalType":"bool","name":"depositEnabled","type":"bool"}],"internalType":"struct IVaultManager.VaultStrategyConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategyManager","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"uint256","name":"lendingThreshold","type":"uint256"},{"internalType":"uint64","name":"iteration","type":"uint64"}],"name":"registerVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_morphoBlueCaller","type":"address"}],"name":"updateMorphoBlueCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_positionManager","type":"address"}],"name":"updatePositionManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vaultRegistry","type":"address"}],"name":"updateVaultRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"bool","name":"flag","type":"bool"}],"name":"upsertDepositEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"flag","type":"bool"}],"name":"upsertGlobalDepositFlag","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b610fcf806100d65f395ff3fe608060405234801561000f575f5ffd5b50600436106100dd575f3560e01c806374e417d71161008457806374e417d7146101d15780638da5cb5b146101d9578063b3d20ea4146101e1578063baa05361146101e9578063c43ab198146101fc578063dd9934131461020f578063f2fde38b14610222578063f714b46d14610235575f5ffd5b806332814ef5146100e15780633bdddc51146100f65780633e3cdb6f14610168578063485cc9551461017b5780635732a4031461018e5780636881d8cb146101a15780636a22dede146101b4578063715018a6146101c9575b5f5ffd5b6100f46100ef366004610dc9565b610258565b005b610109610104366004610e00565b610340565b60405161015f919081516001600160a01b039081168252602080840151909116908201526040808301516001600160401b0316908201526060808301519082015260809182015115159181019190915260a00190565b60405180910390f35b6100f4610176366004610e00565b610406565b6100f4610189366004610e1b565b610486565b6100f461019c366004610e47565b6105f2565b6100f46101af366004610e00565b6108d9565b6101bc610938565b60405161015f9190610eb6565b6100f4610955565b6101bc610968565b6101bc610982565b6101bc61098c565b6100f46101f7366004610e1b565b6109a9565b6100f461020a366004610eca565b6109fb565b6100f461021d366004610e00565b610a6f565b6100f4610230366004610e00565b610ace565b610248610243366004610e00565b610b14565b604051901515815260200161015f565b610260610bcf565b6001600160a01b0382166102875760405163d92e233d60e01b815260040160405180910390fd5b5f610290610c01565b6001600160a01b038481165f908152600483016020526040902060010154919250166102cf5760405163775a7b0960e11b815260040160405180910390fd5b6001600160a01b0383165f818152600483016020908152604091829020600301805486151560ff1990911681179091558251938452339184019190915282820152517f27816fb83e39161cefbc0a7ae01cf0a406eaafb872eb17febfdbe27d9594bda39181900360600190a1505050565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810182905290610372610c01565b6001600160a01b038481165f908152600483016020908152604091829020825160a0810184528154851681526001820154948516928101839052600160a01b9094046001600160401b0316928401929092526002820154606084015260039091015460ff1615156080830152919250906103ff5760405163775a7b0960e11b815260040160405180910390fd5b9392505050565b61040e610bcf565b6001600160a01b0381166104355760405163d92e233d60e01b815260040160405180910390fd5b61043e81610c25565b7fb3d5c275adb2767f0416e18fbca6239f10daafb0ab8f45378577b9a9b9ca9977335b604080516001600160a01b03928316815291841660208301520160405180910390a150565b5f61048f610c53565b805490915060ff600160401b82041615906001600160401b03165f811580156104b55750825b90505f826001600160401b031660011480156104d05750303b155b9050811580156104de575080155b156104fc5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561052657845460ff60401b1916600160401b1785555b6001600160a01b038716158061054357506001600160a01b038616155b156105615760405163d92e233d60e01b815260040160405180910390fd5b61056a86610c77565b5f610573610c01565b80546001600160a01b038a166001600160a01b0319909116178155600201805460ff60a01b1916600160a01b1790555083156105e957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f6105fb610c01565b60028101549091506001600160a01b0316336001600160a01b03161461063457604051630782484160e21b815260040160405180910390fd5b6001600160a01b038616158061065157506001600160a01b038516155b8061066357506001600160a01b038416155b156106815760405163d92e233d60e01b815260040160405180910390fd5b5f61068a610c01565b80546040516350a444ff60e11b81529192505f916001600160a01b039091169063a14889fe906106be908990600401610eb6565b60a060405180830381865afa1580156106d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106fd9190610f00565b905080608001518015610721575060018510806107215750670de0b6b3a764000085115b1561073f576040516329a0887360e01b815260040160405180910390fd5b6040518060a00160405280896001600160a01b03168152602001876001600160a01b03168152602001856001600160401b0316815260200186815260200160011515815250826004015f896001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a8154816001600160401b0302191690836001600160401b03160217905550606082015181600201556080820151816003015f6101000a81548160ff0219169083151502179055509050507f4d12f4d30e5b45d98853894adb3baea9911d82ab4737ca66d3fccb9a7fe0d5b088888888886040516108c79594939291906001600160a01b039586168152938516602085015291909316604083015260608201929092526001600160401b0391909116608082015260a00190565b60405180910390a15050505050505050565b6108e1610bcf565b6001600160a01b0381166109085760405163d92e233d60e01b815260040160405180910390fd5b61091181610c88565b7f9ee681927833c2398c73d0f5b2a218383929087bada1b839781887af24e6bb0233610461565b5f5f610942610c01565b600101546001600160a01b031692915050565b61095d610bcf565b6109665f610cb6565b565b5f5f610972610c01565b546001600160a01b031692915050565b5f5f610972610d10565b5f5f610996610c01565b600301546001600160a01b031692915050565b5f6109b2610c01565b6001600160a01b038481165f9081526004830160205260409020600101549192508381169116146109f657604051631a1e0c9760e01b815260040160405180910390fd5b505050565b610a03610bcf565b5f610a0c610c01565b60028101805460ff60a01b1916600160a01b8515150217905590507fe15678ce604340d86e0ea79f1d2fdaf4870e646ec52d5a249f5594e58fa8822733604080516001600160a01b03909216825284151560208301520160405180910390a15050565b610a77610bcf565b6001600160a01b038116610a9e5760405163d92e233d60e01b815260040160405180910390fd5b610aa781610d34565b7fd1cf9ec060140dddfc1418a2554bce7a5f3a5e919100a6173f01a6528282522733610461565b610ad6610bcf565b6001600160a01b038116610b08575f604051631e4fbdf760e01b8152600401610aff9190610eb6565b60405180910390fd5b610b1181610cb6565b50565b5f5f610b1e610c01565b6001600160a01b038481165f908152600483016020908152604091829020825160a0810184528154851681526001820154948516928101839052600160a01b9094046001600160401b0316928401929092526002820154606084015260039091015460ff161515608083015291925090610bab5760405163775a7b0960e11b815260040160405180910390fd5b80608001518015610bc757506002820154600160a01b900460ff165b949350505050565b33610bd8610982565b6001600160a01b031614610966573360405163118cdaa760e01b8152600401610aff9190610eb6565b7fb45665457e22a04f21e8b0e0228426dbc62808a09e5f9fb742c5de311d89460090565b5f610c2e610c01565b60020180546001600160a01b0319166001600160a01b03939093169290921790915550565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0090565b610c7f610d62565b610b1181610d87565b5f610c91610c01565b60010180546001600160a01b0319166001600160a01b03939093169290921790915550565b5f610cbf610d10565b80546001600160a01b038481166001600160a01b031983168117845560405193945091169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930090565b5f610d3d610c01565b60030180546001600160a01b0319166001600160a01b03939093169290921790915550565b610d6a610d8f565b61096657604051631afcd79f60e31b815260040160405180910390fd5b610ad6610d62565b5f610d98610c53565b54600160401b900460ff16919050565b6001600160a01b0381168114610b11575f5ffd5b8015158114610b11575f5ffd5b5f5f60408385031215610dda575f5ffd5b8235610de581610da8565b91506020830135610df581610dbc565b809150509250929050565b5f60208284031215610e10575f5ffd5b81356103ff81610da8565b5f5f60408385031215610e2c575f5ffd5b8235610e3781610da8565b91506020830135610df581610da8565b5f5f5f5f5f60a08688031215610e5b575f5ffd5b8535610e6681610da8565b94506020860135610e7681610da8565b93506040860135610e8681610da8565b92506060860135915060808601356001600160401b0381168114610ea8575f5ffd5b809150509295509295909350565b6001600160a01b0391909116815260200190565b5f60208284031215610eda575f5ffd5b81356103ff81610dbc565b8051610ef081610da8565b919050565b8051610ef081610dbc565b5f60a0828403128015610f11575f5ffd5b5060405160a081016001600160401b0381118282101715610f4057634e487b7160e01b5f52604160045260245ffd5b604052610f4c83610ee5565b8152610f5a60208401610ee5565b6020820152610f6b60408401610ee5565b6040820152610f7c60608401610ef5565b6060820152610f8d60808401610ef5565b6080820152939250505056fea26469706673582212201366a416592963616a82321b712341630d528635c0591b8870c549be94d8a0d864736f6c634300081c0033

Deployed Bytecode

0x608060405234801561000f575f5ffd5b50600436106100dd575f3560e01c806374e417d71161008457806374e417d7146101d15780638da5cb5b146101d9578063b3d20ea4146101e1578063baa05361146101e9578063c43ab198146101fc578063dd9934131461020f578063f2fde38b14610222578063f714b46d14610235575f5ffd5b806332814ef5146100e15780633bdddc51146100f65780633e3cdb6f14610168578063485cc9551461017b5780635732a4031461018e5780636881d8cb146101a15780636a22dede146101b4578063715018a6146101c9575b5f5ffd5b6100f46100ef366004610dc9565b610258565b005b610109610104366004610e00565b610340565b60405161015f919081516001600160a01b039081168252602080840151909116908201526040808301516001600160401b0316908201526060808301519082015260809182015115159181019190915260a00190565b60405180910390f35b6100f4610176366004610e00565b610406565b6100f4610189366004610e1b565b610486565b6100f461019c366004610e47565b6105f2565b6100f46101af366004610e00565b6108d9565b6101bc610938565b60405161015f9190610eb6565b6100f4610955565b6101bc610968565b6101bc610982565b6101bc61098c565b6100f46101f7366004610e1b565b6109a9565b6100f461020a366004610eca565b6109fb565b6100f461021d366004610e00565b610a6f565b6100f4610230366004610e00565b610ace565b610248610243366004610e00565b610b14565b604051901515815260200161015f565b610260610bcf565b6001600160a01b0382166102875760405163d92e233d60e01b815260040160405180910390fd5b5f610290610c01565b6001600160a01b038481165f908152600483016020526040902060010154919250166102cf5760405163775a7b0960e11b815260040160405180910390fd5b6001600160a01b0383165f818152600483016020908152604091829020600301805486151560ff1990911681179091558251938452339184019190915282820152517f27816fb83e39161cefbc0a7ae01cf0a406eaafb872eb17febfdbe27d9594bda39181900360600190a1505050565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810182905290610372610c01565b6001600160a01b038481165f908152600483016020908152604091829020825160a0810184528154851681526001820154948516928101839052600160a01b9094046001600160401b0316928401929092526002820154606084015260039091015460ff1615156080830152919250906103ff5760405163775a7b0960e11b815260040160405180910390fd5b9392505050565b61040e610bcf565b6001600160a01b0381166104355760405163d92e233d60e01b815260040160405180910390fd5b61043e81610c25565b7fb3d5c275adb2767f0416e18fbca6239f10daafb0ab8f45378577b9a9b9ca9977335b604080516001600160a01b03928316815291841660208301520160405180910390a150565b5f61048f610c53565b805490915060ff600160401b82041615906001600160401b03165f811580156104b55750825b90505f826001600160401b031660011480156104d05750303b155b9050811580156104de575080155b156104fc5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561052657845460ff60401b1916600160401b1785555b6001600160a01b038716158061054357506001600160a01b038616155b156105615760405163d92e233d60e01b815260040160405180910390fd5b61056a86610c77565b5f610573610c01565b80546001600160a01b038a166001600160a01b0319909116178155600201805460ff60a01b1916600160a01b1790555083156105e957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f6105fb610c01565b60028101549091506001600160a01b0316336001600160a01b03161461063457604051630782484160e21b815260040160405180910390fd5b6001600160a01b038616158061065157506001600160a01b038516155b8061066357506001600160a01b038416155b156106815760405163d92e233d60e01b815260040160405180910390fd5b5f61068a610c01565b80546040516350a444ff60e11b81529192505f916001600160a01b039091169063a14889fe906106be908990600401610eb6565b60a060405180830381865afa1580156106d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106fd9190610f00565b905080608001518015610721575060018510806107215750670de0b6b3a764000085115b1561073f576040516329a0887360e01b815260040160405180910390fd5b6040518060a00160405280896001600160a01b03168152602001876001600160a01b03168152602001856001600160401b0316815260200186815260200160011515815250826004015f896001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a8154816001600160401b0302191690836001600160401b03160217905550606082015181600201556080820151816003015f6101000a81548160ff0219169083151502179055509050507f4d12f4d30e5b45d98853894adb3baea9911d82ab4737ca66d3fccb9a7fe0d5b088888888886040516108c79594939291906001600160a01b039586168152938516602085015291909316604083015260608201929092526001600160401b0391909116608082015260a00190565b60405180910390a15050505050505050565b6108e1610bcf565b6001600160a01b0381166109085760405163d92e233d60e01b815260040160405180910390fd5b61091181610c88565b7f9ee681927833c2398c73d0f5b2a218383929087bada1b839781887af24e6bb0233610461565b5f5f610942610c01565b600101546001600160a01b031692915050565b61095d610bcf565b6109665f610cb6565b565b5f5f610972610c01565b546001600160a01b031692915050565b5f5f610972610d10565b5f5f610996610c01565b600301546001600160a01b031692915050565b5f6109b2610c01565b6001600160a01b038481165f9081526004830160205260409020600101549192508381169116146109f657604051631a1e0c9760e01b815260040160405180910390fd5b505050565b610a03610bcf565b5f610a0c610c01565b60028101805460ff60a01b1916600160a01b8515150217905590507fe15678ce604340d86e0ea79f1d2fdaf4870e646ec52d5a249f5594e58fa8822733604080516001600160a01b03909216825284151560208301520160405180910390a15050565b610a77610bcf565b6001600160a01b038116610a9e5760405163d92e233d60e01b815260040160405180910390fd5b610aa781610d34565b7fd1cf9ec060140dddfc1418a2554bce7a5f3a5e919100a6173f01a6528282522733610461565b610ad6610bcf565b6001600160a01b038116610b08575f604051631e4fbdf760e01b8152600401610aff9190610eb6565b60405180910390fd5b610b1181610cb6565b50565b5f5f610b1e610c01565b6001600160a01b038481165f908152600483016020908152604091829020825160a0810184528154851681526001820154948516928101839052600160a01b9094046001600160401b0316928401929092526002820154606084015260039091015460ff161515608083015291925090610bab5760405163775a7b0960e11b815260040160405180910390fd5b80608001518015610bc757506002820154600160a01b900460ff165b949350505050565b33610bd8610982565b6001600160a01b031614610966573360405163118cdaa760e01b8152600401610aff9190610eb6565b7fb45665457e22a04f21e8b0e0228426dbc62808a09e5f9fb742c5de311d89460090565b5f610c2e610c01565b60020180546001600160a01b0319166001600160a01b03939093169290921790915550565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0090565b610c7f610d62565b610b1181610d87565b5f610c91610c01565b60010180546001600160a01b0319166001600160a01b03939093169290921790915550565b5f610cbf610d10565b80546001600160a01b038481166001600160a01b031983168117845560405193945091169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930090565b5f610d3d610c01565b60030180546001600160a01b0319166001600160a01b03939093169290921790915550565b610d6a610d8f565b61096657604051631afcd79f60e31b815260040160405180910390fd5b610ad6610d62565b5f610d98610c53565b54600160401b900460ff16919050565b6001600160a01b0381168114610b11575f5ffd5b8015158114610b11575f5ffd5b5f5f60408385031215610dda575f5ffd5b8235610de581610da8565b91506020830135610df581610dbc565b809150509250929050565b5f60208284031215610e10575f5ffd5b81356103ff81610da8565b5f5f60408385031215610e2c575f5ffd5b8235610e3781610da8565b91506020830135610df581610da8565b5f5f5f5f5f60a08688031215610e5b575f5ffd5b8535610e6681610da8565b94506020860135610e7681610da8565b93506040860135610e8681610da8565b92506060860135915060808601356001600160401b0381168114610ea8575f5ffd5b809150509295509295909350565b6001600160a01b0391909116815260200190565b5f60208284031215610eda575f5ffd5b81356103ff81610dbc565b8051610ef081610da8565b919050565b8051610ef081610dbc565b5f60a0828403128015610f11575f5ffd5b5060405160a081016001600160401b0381118282101715610f4057634e487b7160e01b5f52604160045260245ffd5b604052610f4c83610ee5565b8152610f5a60208401610ee5565b6020820152610f6b60408401610ee5565b6040820152610f7c60608401610ef5565b6060820152610f8d60808401610ef5565b6080820152939250505056fea26469706673582212201366a416592963616a82321b712341630d528635c0591b8870c549be94d8a0d864736f6c634300081c0033

Block Transaction Difficulty 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
Loading...
Loading

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