ETH Price: $2,981.52 (+2.11%)
Gas: 1 Gwei

Contract

0x848bA006252aEcAAE67f74b95AF49cAB69308634
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040176126282023-07-03 9:44:11368 days ago1688377451IN
 Contract Creation
0 ETH0.0680948465

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
NFTOracle

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : NFTOracle.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;

import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IERC20MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
import {INFTOracle} from "../interfaces/INFTOracle.sol";
import {BlockContext} from "../utils/BlockContext.sol";
import {Errors} from "../libraries/helpers/Errors.sol";

contract NFTOracle is INFTOracle, Initializable, OwnableUpgradeable {
  /// @dev When calling getPrice() of a non-minted tokenId it returns '0', shouldn't this revert with an error?
  /// @notice The whenNotPaused modifier is not being used!
  /// @notice INFTOracle.sol is not being used, it is redundant and it hasn't an implementation
  /*//////////////////////////////////////////////////////////////
                        EVENTS
  //////////////////////////////////////////////////////////////*/
  /**
   * @dev Emitted when a collection is added to the oracle
   * @param collection The added collection
   **/
  event CollectionAdded(address indexed collection);
  /**
   * @dev Emitted when a collection is removed from the oracle
   * @param collection The removed collection
   **/
  event CollectionRemoved(address indexed collection);
  /**
   * @dev Emitted when a price is added for an NFT asset
   * @param _collection The NFT collection
   * @param _tokenId The NFT token Id
   **/
  event NFTPriceAdded(address indexed _collection, uint256 _tokenId, uint256 _price);

  /**
   * @dev Emitted when the pause status is set to a collection
   * @param paused the new pause status
   **/
  event CollectionPaused(bool indexed paused);
  /*//////////////////////////////////////////////////////////////
                        ERRORS
  //////////////////////////////////////////////////////////////*/
  error NotAdmin();
  error NonExistingCollection(address collection);
  error AlreadyExistingCollection();
  error NFTPaused();
  error ArraysLengthInconsistent();
  error PriceIsZero();
  /*//////////////////////////////////////////////////////////////
                      GENERAL VARIABLES
  //////////////////////////////////////////////////////////////*/
  //Map collection address to token ID. Then map token ID with token price
  mapping(address => mapping(uint256 => uint256)) public nftPrices;
  //Keeps track of collections currently supported by the protocol
  mapping(address => bool) public collections;

  mapping(address => bool) public collectionPaused;

  mapping(address => bool) public isPriceManager;
  /*//////////////////////////////////////////////////////////////
                        MODIFIERS
  //////////////////////////////////////////////////////////////*/
  modifier onlyPriceManager() {
    require(isPriceManager[msg.sender], Errors.CALLER_NOT_PRICE_MANAGER);
    _;
  }

  modifier onlyExistingCollection(address _collection) {
    bool collectionExists = collections[_collection];
    if (!collectionExists) revert NonExistingCollection(_collection);
    _;
  }

  modifier onlyNonExistingCollection(address _collection) {
    bool collectionExists = collections[_collection];
    if (collectionExists) revert AlreadyExistingCollection();
    _;
  }

  modifier whenNotPaused(address _nftContract) {
    _whenNotPaused(_nftContract);
    _;
  }

  /*//////////////////////////////////////////////////////////////
                        INITIALIZERS
  //////////////////////////////////////////////////////////////*/

  /**
   * @dev Function is invoked by the proxy contract when the NFTOracle contract is added to the
   * LendPoolAddressesProvider of the market.
   * @param _admin The admin address
   **/
  function initialize(address _admin, address _lendPoolConfigurator) public initializer {
    require(_admin != address(0), Errors.INVALID_ZERO_ADDRESS);
    __Ownable_init();
    isPriceManager[_admin] = true;
    isPriceManager[_lendPoolConfigurator] = true;
  }

  /*//////////////////////////////////////////////////////////////
                        MAIN LOGIC
  //////////////////////////////////////////////////////////////*/
  /**
  @dev adds a collection to the oracle
  @param _collection the NFT collection to add
   */
  function addCollection(address _collection) external onlyOwner {
    _addCollection(_collection);
  }

  /**
  @dev removes a collection from the oracle
  @param _collection the NFT collection to remove
   */
  function removeCollection(address _collection) external onlyOwner {
    _removeCollection(_collection);
  }

  /*//////////////////////////////////////////////////////////////
                        INTERNALS
  //////////////////////////////////////////////////////////////*/
  /**
  @dev adds a collection to the oracle
  @param _collection the NFT collection to add
   */
  function _addCollection(address _collection) internal onlyNonExistingCollection(_collection) {
    collections[_collection] = true;
    emit CollectionAdded(_collection);
  }

  /**
  @dev removes a collection from the oracle
  @param _collection the NFT collection to remove
   */
  function _removeCollection(address _collection) internal onlyExistingCollection(_collection) {
    delete collections[_collection];
    emit CollectionRemoved(_collection);
  }

  /**
   * @dev checks whether the NFT oracle is paused
   * @param _contract The NFTOracle address
   **/
  function _whenNotPaused(address _contract) internal view {
    bool _paused = collectionPaused[_contract];
    if (_paused) revert NFTPaused();
  }

  /**
  @dev sets the price for a given NFT 
  @param _collection the NFT collection
  @param _tokenId the NFT token Id
  @param _price the price to set to the token
   */
  function _setNFTPrice(
    address _collection,
    uint256 _tokenId,
    uint256 _price
  ) internal onlyExistingCollection(_collection) whenNotPaused(_collection) {
    if (_price <= 0) revert PriceIsZero();
    nftPrices[_collection][_tokenId] = _price;
    emit NFTPriceAdded(_collection, _tokenId, _price);
  }

  /*//////////////////////////////////////////////////////////////
                        GETTERS & SETTERS
  //////////////////////////////////////////////////////////////*/
  /**
   * @inheritdoc INFTOracle
   */
  function setPause(address _collection, bool paused) external override onlyOwner onlyExistingCollection(_collection) {
    collectionPaused[_collection] = paused;
    emit CollectionPaused(paused);
  }

  function setPriceManagerStatus(address newPriceManager, bool val) external onlyOwner {
    require(newPriceManager != address(0), Errors.NFTO_INVALID_PRICEM_ADDRESS);
    isPriceManager[newPriceManager] = val;
  }

  /**
  @dev adds multiple collections to the oracle
  @param _collections the array NFT collections to add
   */
  function setCollections(address[] calldata _collections) external onlyOwner {
    uint256 collectionsLength = _collections.length;

    for (uint256 i; i != collectionsLength; ) {
      _addCollection(_collections[i]);
      unchecked {
        ++i;
      }
    }
  }

  /**
   * @inheritdoc INFTOracle
   */
  function getNFTPrice(
    address _collection,
    uint256 _tokenId
  ) external view override onlyExistingCollection(_collection) returns (uint256) {
    if (nftPrices[_collection][_tokenId] == 0) revert PriceIsZero();
    return nftPrices[_collection][_tokenId];
  }

  /**
   * @inheritdoc INFTOracle
   */
  function setNFTPrice(address _collection, uint256 _tokenId, uint256 _price) external override onlyPriceManager {
    _setNFTPrice(_collection, _tokenId, _price);
  }

  /**
   * @inheritdoc INFTOracle
   */
  function getMultipleNFTPrices(
    address[] calldata _collections,
    uint256[] calldata _tokenIds
  ) external view override returns (uint256[] memory) {
    uint256 collectionsLength = _collections.length;
    if (collectionsLength != _tokenIds.length) revert ArraysLengthInconsistent();

    uint256[] memory _nftPrices = new uint256[](collectionsLength);

    for (uint256 i; i != collectionsLength; ) {
      _nftPrices[i] = this.getNFTPrice(_collections[i], _tokenIds[i]);
      unchecked {
        i = i + 1;
      }
    }

    return _nftPrices;
  }

  /**
   * @inheritdoc INFTOracle
   */
  function setMultipleNFTPrices(
    address[] calldata _collections,
    uint256[] calldata _tokenIds,
    uint256[] calldata _prices
  ) external override onlyPriceManager {
    uint256 collectionsLength = _collections.length;
    if (collectionsLength != _tokenIds.length || collectionsLength != _prices.length) revert ArraysLengthInconsistent();
    for (uint256 i; i != collectionsLength; ) {
      _setNFTPrice(_collections[i], _tokenIds[i], _prices[i]);
      unchecked {
        i = i + 1;
      }
    }
  }
}

File 2 of 10 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 3 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @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 a proxied contract can't have 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.
 *
 * 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 initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 4 of 10 : IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

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

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

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

File 5 of 10 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 10 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 10 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../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 {
        __Context_init_unchained();
    }

    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;
    }
    uint256[50] private __gap;
}

File 8 of 10 : INFTOracle.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;

/************
@title INFTOracle interface
@notice Interface for NFT price oracle.*/
interface INFTOracle {
  /* CAUTION: Price uint is ETH based (WEI, 18 decimals) */
  /**
  @dev returns the NFT price for a given NFT
  @param _collection the NFT collection
  @param _tokenId the NFT token Id
   */
  function getNFTPrice(address _collection, uint256 _tokenId) external view returns (uint256);

  /**
  @dev returns the NFT price for a given array of NFTs
  @param _collections the array of NFT collections
  @param _tokenIds the array NFT token Id
   */
  function getMultipleNFTPrices(address[] calldata _collections, uint256[] calldata _tokenIds)
    external
    view
    returns (uint256[] memory);

  /**
  @dev sets the price for a given NFT 
  @param _collection the NFT collection
  @param _tokenId the NFT token Id
  @param _price the price to set to the token
  */
  function setNFTPrice(
    address _collection,
    uint256 _tokenId,
    uint256 _price
  ) external;

  /**
  @dev sets the price for a given NFT 
  @param _collections the array of NFT collections
  @param _tokenIds the array of  NFT token Ids
  @param _prices the array of prices to set to the given tokens
   */
  function setMultipleNFTPrices(
    address[] calldata _collections,
    uint256[] calldata _tokenIds,
    uint256[] calldata _prices
  ) external;

  /**
  @dev sets the pause status of the NFT oracle
  @param _nftContract the of NFT collection
  @param val the value to set the pausing status (true for paused, false for unpaused)
   */
  function setPause(address _nftContract, bool val) external;
}

File 9 of 10 : Errors.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;

/**
 * @title Errors library
 * @author BendDao; Forked and edited by Unlockd
 * @notice Defines the error messages emitted by the different contracts of the Unlockd protocol
 */
library Errors {
  enum ReturnCode {
    SUCCESS,
    FAILED
  }

  string public constant SUCCESS = "0";

  //common errors
  string public constant CALLER_NOT_POOL_ADMIN = "100"; // 'The caller must be the pool admin'
  string public constant CALLER_NOT_ADDRESS_PROVIDER = "101";
  string public constant INVALID_FROM_BALANCE_AFTER_TRANSFER = "102";
  string public constant INVALID_TO_BALANCE_AFTER_TRANSFER = "103";
  string public constant CALLER_NOT_ONBEHALFOF_OR_IN_WHITELIST = "104";
  string public constant CALLER_NOT_POOL_LIQUIDATOR = "105";
  string public constant INVALID_ZERO_ADDRESS = "106";
  string public constant CALLER_NOT_LTV_MANAGER = "107";
  string public constant CALLER_NOT_PRICE_MANAGER = "108";
  string public constant CALLER_NOT_UTOKEN_MANAGER = "109";

  //math library errors
  string public constant MATH_MULTIPLICATION_OVERFLOW = "200";
  string public constant MATH_ADDITION_OVERFLOW = "201";
  string public constant MATH_DIVISION_BY_ZERO = "202";

  //validation & check errors
  string public constant VL_INVALID_AMOUNT = "301"; // 'Amount must be greater than 0'
  string public constant VL_NO_ACTIVE_RESERVE = "302"; // 'Action requires an active reserve'
  string public constant VL_RESERVE_FROZEN = "303"; // 'Action cannot be performed because the reserve is frozen'
  string public constant VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE = "304"; // 'User cannot withdraw more than the available balance'
  string public constant VL_BORROWING_NOT_ENABLED = "305"; // 'Borrowing is not enabled'
  string public constant VL_COLLATERAL_BALANCE_IS_0 = "306"; // 'The collateral balance is 0'
  string public constant VL_HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = "307"; // 'Health factor is lesser than the liquidation threshold'
  string public constant VL_COLLATERAL_CANNOT_COVER_NEW_BORROW = "308"; // 'There is not enough collateral to cover a new borrow'
  string public constant VL_NO_DEBT_OF_SELECTED_TYPE = "309"; // 'for repayment of stable debt, the user needs to have stable debt, otherwise, he needs to have variable debt'
  string public constant VL_NO_ACTIVE_NFT = "310";
  string public constant VL_NFT_FROZEN = "311";
  string public constant VL_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = "312"; // 'User did not borrow the specified currency'
  string public constant VL_INVALID_HEALTH_FACTOR = "313";
  string public constant VL_INVALID_ONBEHALFOF_ADDRESS = "314";
  string public constant VL_INVALID_TARGET_ADDRESS = "315";
  string public constant VL_INVALID_RESERVE_ADDRESS = "316";
  string public constant VL_SPECIFIED_LOAN_NOT_BORROWED_BY_USER = "317";
  string public constant VL_SPECIFIED_RESERVE_NOT_BORROWED_BY_USER = "318";
  string public constant VL_HEALTH_FACTOR_HIGHER_THAN_LIQUIDATION_THRESHOLD = "319";
  string public constant VL_TIMEFRAME_EXCEEDED = "320";
  string public constant VL_VALUE_EXCEED_TREASURY_BALANCE = "321";

  //lend pool errors
  string public constant LP_CALLER_NOT_LEND_POOL_CONFIGURATOR = "400"; // 'The caller of the function is not the lending pool configurator'
  string public constant LP_IS_PAUSED = "401"; // 'Pool is paused'
  string public constant LP_NO_MORE_RESERVES_ALLOWED = "402";
  string public constant LP_NOT_CONTRACT = "403";
  string public constant LP_BORROW_NOT_EXCEED_LIQUIDATION_THRESHOLD = "404";
  string public constant LP_BORROW_IS_EXCEED_LIQUIDATION_PRICE = "405";
  string public constant LP_NO_MORE_NFTS_ALLOWED = "406";
  string public constant LP_INVALID_USER_NFT_AMOUNT = "407";
  string public constant LP_INCONSISTENT_PARAMS = "408";
  string public constant LP_NFT_IS_NOT_USED_AS_COLLATERAL = "409";
  string public constant LP_CALLER_MUST_BE_AN_UTOKEN = "410";
  string public constant LP_INVALID_NFT_AMOUNT = "411";
  string public constant LP_NFT_HAS_USED_AS_COLLATERAL = "412";
  string public constant LP_DELEGATE_CALL_FAILED = "413";
  string public constant LP_AMOUNT_LESS_THAN_EXTRA_DEBT = "414";
  string public constant LP_AMOUNT_LESS_THAN_REDEEM_THRESHOLD = "415";
  string public constant LP_AMOUNT_GREATER_THAN_MAX_REPAY = "416";
  string public constant LP_NFT_TOKEN_ID_EXCEED_MAX_LIMIT = "417";
  string public constant LP_NFT_SUPPLY_NUM_EXCEED_MAX_LIMIT = "418";
  string public constant LP_CALLER_NOT_LEND_POOL_LIQUIDATOR_NOR_GATEWAY = "419";
  string public constant LP_CONSECUTIVE_BIDS_NOT_ALLOWED = "420";
  string public constant LP_INVALID_OVERFLOW_VALUE = "421";
  string public constant LP_CALLER_NOT_NFT_HOLDER = "422";
  string public constant LP_NFT_NOT_ALLOWED_TO_SELL = "423";
  string public constant LP_RESERVES_WITHOUT_ENOUGH_LIQUIDITY = "424";
  string public constant LP_COLLECTION_NOT_SUPPORTED = "425";
  string public constant LP_MSG_VALUE_DIFFERENT_FROM_CONFIG_FEE = "426";
  string public constant LP_INVALID_SAFE_HEALTH_FACTOR = "427";
  string public constant LP_AMOUNT_LESS_THAN_DEBT = "428";
  string public constant LP_AMOUNT_DIFFERENT_FROM_REQUIRED_BUYOUT_PRICE = "429";
  string public constant LP_CALLER_NOT_DEBT_TOKEN_MANAGER = "430";
  string public constant LP_CALLER_NOT_RESERVOIR_OR_DEBT_MARKET = "431";

  //lend pool loan errors
  string public constant LPL_CLAIM_HASNT_STARTED_YET = "479";
  string public constant LPL_INVALID_LOAN_STATE = "480";
  string public constant LPL_INVALID_LOAN_AMOUNT = "481";
  string public constant LPL_INVALID_TAKEN_AMOUNT = "482";
  string public constant LPL_AMOUNT_OVERFLOW = "483";
  string public constant LPL_BID_PRICE_LESS_THAN_DEBT_PRICE = "484";
  string public constant LPL_BID_PRICE_LESS_THAN_HIGHEST_PRICE = "485";
  string public constant LPL_BID_REDEEM_DURATION_HAS_END = "486";
  string public constant LPL_BID_USER_NOT_SAME = "487";
  string public constant LPL_BID_REPAY_AMOUNT_NOT_ENOUGH = "488";
  string public constant LPL_BID_AUCTION_DURATION_HAS_END = "489";
  string public constant LPL_BID_AUCTION_DURATION_NOT_END = "490";
  string public constant LPL_BID_PRICE_LESS_THAN_BORROW = "491";
  string public constant LPL_INVALID_BIDDER_ADDRESS = "492";
  string public constant LPL_AMOUNT_LESS_THAN_BID_FINE = "493";
  string public constant LPL_INVALID_BID_FINE = "494";
  string public constant LPL_BID_PRICE_LESS_THAN_MIN_BID_REQUIRED = "495";
  string public constant LPL_BID_NOT_BUYOUT_PRICE = "496";
  string public constant LPL_BUYOUT_DURATION_HAS_END = "497";
  string public constant LPL_BUYOUT_PRICE_LESS_THAN_BORROW = "498";
  string public constant LPL_CALLER_MUST_BE_MARKET_ADAPTER = "499";

  //common token errors
  string public constant CT_CALLER_MUST_BE_LEND_POOL = "500"; // 'The caller of this function must be a lending pool'
  string public constant CT_INVALID_MINT_AMOUNT = "501"; //invalid amount to mint
  string public constant CT_INVALID_BURN_AMOUNT = "502"; //invalid amount to burn
  string public constant CT_BORROW_ALLOWANCE_NOT_ENOUGH = "503";
  string public constant CT_CALLER_MUST_BE_DEBT_MARKET = "504"; // 'The caller of this function must be a debt market'

  //reserve logic errors
  string public constant RL_RESERVE_ALREADY_INITIALIZED = "601"; // 'Reserve has already been initialized'
  string public constant RL_LIQUIDITY_INDEX_OVERFLOW = "602"; //  Liquidity index overflows uint128
  string public constant RL_VARIABLE_BORROW_INDEX_OVERFLOW = "603"; //  Variable borrow index overflows uint128
  string public constant RL_LIQUIDITY_RATE_OVERFLOW = "604"; //  Liquidity rate overflows uint128
  string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = "605"; //  Variable borrow rate overflows uint128

  //configure errors
  string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = "700"; // 'The liquidity of the reserve needs to be 0'
  string public constant LPC_INVALID_CONFIGURATION = "701"; // 'Invalid risk parameters for the reserve'
  string public constant LPC_CALLER_NOT_EMERGENCY_ADMIN = "702"; // 'The caller must be the emergency admin'
  string public constant LPC_INVALID_UNFT_ADDRESS = "703";
  string public constant LPC_INVALIED_LOAN_ADDRESS = "704";
  string public constant LPC_NFT_LIQUIDITY_NOT_0 = "705";
  string public constant LPC_PARAMS_MISMATCH = "706"; // NFT assets & token ids mismatch
  string public constant LPC_FEE_PERCENTAGE_TOO_HIGH = "707";
  string public constant LPC_INVALID_LTVMANAGER_ADDRESS = "708";
  string public constant LPC_INCONSISTENT_PARAMS = "709";
  string public constant LPC_INVALID_SAFE_HEALTH_FACTOR = "710";
  //reserve config errors
  string public constant RC_INVALID_LTV = "730";
  string public constant RC_INVALID_LIQ_THRESHOLD = "731";
  string public constant RC_INVALID_LIQ_BONUS = "732";
  string public constant RC_INVALID_DECIMALS = "733";
  string public constant RC_INVALID_RESERVE_FACTOR = "734";
  string public constant RC_INVALID_REDEEM_DURATION = "735";
  string public constant RC_INVALID_AUCTION_DURATION = "736";
  string public constant RC_INVALID_REDEEM_FINE = "737";
  string public constant RC_INVALID_REDEEM_THRESHOLD = "738";
  string public constant RC_INVALID_MIN_BID_FINE = "739";
  string public constant RC_INVALID_MAX_BID_FINE = "740";
  string public constant RC_INVALID_MAX_CONFIG_TIMESTAMP = "741";

  //address provider erros
  string public constant LPAPR_PROVIDER_NOT_REGISTERED = "760"; // 'Provider is not registered'
  string public constant LPAPR_INVALID_ADDRESSES_PROVIDER_ID = "761";

  //NFTOracleErrors
  string public constant NFTO_INVALID_PRICEM_ADDRESS = "900";

  //Debt Market
  string public constant DM_CALLER_NOT_THE_OWNER = "1000";
  string public constant DM_DEBT_SHOULD_EXIST = "1001";
  string public constant DM_INVALID_AMOUNT = "1002";
  string public constant DM_FAIL_ON_SEND_ETH = "1003";
  string public constant DM_DEBT_SHOULD_NOT_BE_SOLD = "1004";
  string public constant DM_DEBT_ALREADY_EXIST = "1005";
  string public constant DM_LOAN_SHOULD_EXIST = "1006";
  string public constant DM_AUCTION_ALREADY_ENDED = "1007";
  string public constant DM_BID_PRICE_HIGHER_THAN_SELL_PRICE = "1008";
  string public constant DM_BID_PRICE_LESS_THAN_PREVIOUS_BID = "1009";
  string public constant DM_INVALID_SELL_TYPE = "1010";
  string public constant DM_AUCTION_NOT_ALREADY_ENDED = "1011";
  string public constant DM_INVALID_CLAIM_RECEIVER = "1012";
  string public constant DM_AMOUNT_DIFFERENT_FROM_SELL_PRICE = "1013";
  string public constant DM_BID_PRICE_LESS_THAN_MIN_BID_PRICE = "1014";
  string public constant DM_BORROWED_AMOUNT_DIVERGED = "1015";
  string public constant DM_INVALID_AUTHORIZED_ADDRESS = "1016";
  string public constant DM_CALLER_NOT_THE_OWNER_OR_AUTHORIZED = "1017";
  string public constant DM_INVALID_DELTA_BID_PERCENT = "1018";
  string public constant DM_IS_PAUSED = "1019";
}

File 10 of 10 : BlockContext.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.4;

// wrap block.xxx functions for testing
// only support timestamp and number so far
abstract contract BlockContext {
  //◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤ add state variables below ◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤//

  //◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣ add state variables above ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣//
  uint256[50] private __gap;

  function _blockTimestamp() internal view virtual returns (uint256) {
    return block.timestamp;
  }

  function _blockNumber() internal view virtual returns (uint256) {
    return block.number;
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"AlreadyExistingCollection","type":"error"},{"inputs":[],"name":"ArraysLengthInconsistent","type":"error"},{"inputs":[],"name":"NFTPaused","type":"error"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"NonExistingCollection","type":"error"},{"inputs":[],"name":"NotAdmin","type":"error"},{"inputs":[],"name":"PriceIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"}],"name":"CollectionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"paused","type":"bool"}],"name":"CollectionPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"}],"name":"CollectionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"NFTPriceAdded","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"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collectionPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collections","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_collections","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"getMultipleNFTPrices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getNFTPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_lendPoolConfigurator","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPriceManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"}],"name":"removeCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_collections","type":"address[]"}],"name":"setCollections","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_collections","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"setMultipleNFTPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setNFTPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"bool","name":"paused","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPriceManager","type":"address"},{"internalType":"bool","name":"val","type":"bool"}],"name":"setPriceManagerStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c8063a174e77a116100a2578063c38d332611610071578063c38d33261461024b578063cb053db41461026e578063cf9e0b1514610281578063e922a4bc146102a4578063f2fde38b146102b757600080fd5b8063a174e77a146101ff578063bc24179314610212578063bccdb0f714610225578063c22dc7221461023857600080fd5b8063715018a6116100de578063715018a61461018357806378d930c01461018b5780637ad8c88b146101c45780638da5cb5b146101e457600080fd5b806335ef9ce11461011057806343add2e614610125578063485cc9551461015d5780635028d05a14610170575b600080fd5b61012361011e366004610f56565b6102ca565b005b610148610133366004610e6e565b60666020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61012361016b366004610e8f565b610353565b61012361017e366004610e6e565b610490565b6101236104c6565b6101b6610199366004610efb565b606560209081526000928352604080842090915290825290205481565b604051908152602001610154565b6101d76101d2366004610f96565b6104fc565b60405161015491906110ad565b6033546040516001600160a01b039091168152602001610154565b61012361020d366004610e6e565b61069c565b6101b6610220366004610efb565b6106cf565b610123610233366004610fff565b610782565b610123610246366004610ec1565b6108a6565b610148610259366004610e6e565b60676020526000908152604090205460ff1681565b61012361027c366004610ec1565b61096c565b61014861028f366004610e6e565b60686020526000908152604090205460ff1681565b6101236102b2366004610f24565b610a03565b6101236102c5366004610e6e565b610a5d565b6033546001600160a01b031633146102fd5760405162461bcd60e51b81526004016102f490611144565b60405180910390fd5b8060005b81811461034d5761034584848381811061032b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103409190610e6e565b610af5565b600101610301565b50505050565b600054610100900460ff1661036e5760005460ff1615610372565b303b155b6103d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102f4565b600054610100900460ff161580156103f7576000805461ffff19166101011790555b60408051808201909152600381526218981b60e91b60208201526001600160a01b0384166104385760405162461bcd60e51b81526004016102f491906110f1565b50610441610b80565b6001600160a01b038381166000908152606860205260408082208054600160ff199182168117909255938616835291208054909216179055801561048b576000805461ff00191690555b505050565b6033546001600160a01b031633146104ba5760405162461bcd60e51b81526004016102f490611144565b6104c381610bb7565b50565b6033546001600160a01b031633146104f05760405162461bcd60e51b81526004016102f490611144565b6104fa6000610c49565b565b60608382811461051f57604051636f0fc0df60e01b815260040160405180910390fd5b60008167ffffffffffffffff81111561054857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610571578160200160208202803683370190505b50905060005b828114610691573063bc2417938989848181106105a457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105b99190610e6e565b8888858181106105d957634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e087901b1681526001600160a01b039094166004850152602002919091013560248301525060440160206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065e9190611095565b82828151811061067e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152600101610577565b509695505050505050565b6033546001600160a01b031633146106c65760405162461bcd60e51b81526004016102f490611144565b6104c381610af5565b6001600160a01b038216600090815260666020526040812054839060ff1680610716576040516305c0b1f960e51b81526001600160a01b03831660048201526024016102f4565b6001600160a01b03851660009081526065602090815260408083208784529091529020546107575760405163907adecd60e01b815260040160405180910390fd5b5050506001600160a01b03919091166000908152606560209081526040808320938352929052205490565b33600090815260686020908152604091829020548251808401909352600383526206260760eb1b9183019190915260ff166107d05760405162461bcd60e51b81526004016102f491906110f1565b508483811415806107e15750808214155b156107ff57604051636f0fc0df60e01b815260040160405180910390fd5b60005b81811461089c5761089488888381811061082c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108419190610e6e565b87878481811061086157634e487b7160e01b600052603260045260246000fd5b9050602002013586868581811061088857634e487b7160e01b600052603260045260246000fd5b90506020020135610c9b565b600101610802565b5050505050505050565b6033546001600160a01b031633146108d05760405162461bcd60e51b81526004016102f490611144565b6001600160a01b038216600090815260666020526040902054829060ff1680610917576040516305c0b1f960e51b81526001600160a01b03831660048201526024016102f4565b6001600160a01b038416600090815260676020526040808220805460ff1916861515908117909155905190917f0120cb1c549b487fa5baf2c29b6c0cdc8d5a7d346ad38522af17c56dc365278c91a250505050565b6033546001600160a01b031633146109965760405162461bcd60e51b81526004016102f490611144565b60408051808201909152600381526203930360ec1b60208201526001600160a01b0383166109d75760405162461bcd60e51b81526004016102f491906110f1565b506001600160a01b03919091166000908152606860205260409020805460ff1916911515919091179055565b33600090815260686020908152604091829020548251808401909352600383526206260760eb1b9183019190915260ff16610a515760405162461bcd60e51b81526004016102f491906110f1565b5061048b838383610c9b565b6033546001600160a01b03163314610a875760405162461bcd60e51b81526004016102f490611144565b6001600160a01b038116610aec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f4565b6104c381610c49565b6001600160a01b038116600090815260666020526040902054819060ff168015610b32576040516308891e4760e01b815260040160405180910390fd5b6001600160a01b038316600081815260666020526040808220805460ff19166001179055517f7701426aaa4c0c88a30924a7aba88dce66b18c4020b54e4e19c9e0eb0abc29929190a2505050565b600054610100900460ff16610ba75760405162461bcd60e51b81526004016102f490611179565b610baf610d72565b6104fa610d99565b6001600160a01b038116600090815260666020526040902054819060ff1680610bfe576040516305c0b1f960e51b81526001600160a01b03831660048201526024016102f4565b6001600160a01b038316600081815260666020526040808220805460ff19169055517fa0691bd707b2f65c33c8343d61c274df72c6b5007937dcfbc31aa5a0d0f6fe3c9190a2505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316600090815260666020526040902054839060ff1680610ce2576040516305c0b1f960e51b81526001600160a01b03831660048201526024016102f4565b84610cec81610dc9565b60008411610d0d5760405163907adecd60e01b815260040160405180910390fd5b6001600160a01b038616600081815260656020908152604080832089845282529182902087905581518881529081018790527fefb7ff4f7186f49cd4a74fd93e1343ae362d1f42c418ef442189e771f60d1f1b910160405180910390a2505050505050565b600054610100900460ff166104fa5760405162461bcd60e51b81526004016102f490611179565b600054610100900460ff16610dc05760405162461bcd60e51b81526004016102f490611179565b6104fa33610c49565b6001600160a01b03811660009081526067602052604090205460ff168015610e0457604051637a94835f60e11b815260040160405180910390fd5b5050565b80356001600160a01b0381168114610e1f57600080fd5b919050565b60008083601f840112610e35578182fd5b50813567ffffffffffffffff811115610e4c578182fd5b6020830191508360208260051b8501011115610e6757600080fd5b9250929050565b600060208284031215610e7f578081fd5b610e8882610e08565b9392505050565b60008060408385031215610ea1578081fd5b610eaa83610e08565b9150610eb860208401610e08565b90509250929050565b60008060408385031215610ed3578182fd5b610edc83610e08565b915060208301358015158114610ef0578182fd5b809150509250929050565b60008060408385031215610f0d578182fd5b610f1683610e08565b946020939093013593505050565b600080600060608486031215610f38578081fd5b610f4184610e08565b95602085013595506040909401359392505050565b60008060208385031215610f68578182fd5b823567ffffffffffffffff811115610f7e578283fd5b610f8a85828601610e24565b90969095509350505050565b60008060008060408587031215610fab578081fd5b843567ffffffffffffffff80821115610fc2578283fd5b610fce88838901610e24565b90965094506020870135915080821115610fe6578283fd5b50610ff387828801610e24565b95989497509550505050565b60008060008060008060608789031215611017578182fd5b863567ffffffffffffffff8082111561102e578384fd5b61103a8a838b01610e24565b90985096506020890135915080821115611052578384fd5b61105e8a838b01610e24565b90965094506040890135915080821115611076578384fd5b5061108389828a01610e24565b979a9699509497509295939492505050565b6000602082840312156110a6578081fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b818110156110e5578351835292840192918401916001016110c9565b50909695505050505050565b6000602080835283518082850152825b8181101561111d57858101830151858201604001528201611101565b8181111561112e5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212201e58f2c3af9ec2073b2c0350a1c922d5bbee54c89f6dc6b200d15d09e55866c764736f6c63430008040033

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
[ Download: CSV Export  ]

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.