ETH Price: $3,331.29 (-3.93%)
Gas: 7.95 Gwei

Contract

0x4cB8d6DCd56d6b371210E70837753F2a835160c4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

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:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OneETHPriceOracle

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 10000 runs

Other Settings:
shanghai EvmVersion
File 1 of 3 : OneETHPriceOracle.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

import { UtilLib } from "../utils/UtilLib.sol";
import { IPriceFetcher } from "../interfaces/IPriceFetcher.sol";

/// @title OneETHPriceOracle Contract
/// @notice contract that returns 1e18 as the exchange rate of asset/ETH
contract OneETHPriceOracle is IPriceFetcher {
    /// @return assetPrice 1e18 as the exchange rate of asset/ETH
    function getAssetPrice(address) external pure returns (uint256) {
        return 1e18;
    }
}

File 2 of 3 : UtilLib.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

/// @title UtilLib - Utility library
/// @notice Utility functions
library UtilLib {
    error ZeroAddressNotAllowed();

    /// @dev zero address check modifier
    /// @param address_ address to check
    function checkNonZeroAddress(address address_) internal pure {
        if (address_ == address(0)) revert ZeroAddressNotAllowed();
    }
}

File 3 of 3 : IPriceFetcher.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

interface IPriceFetcher {
    function getAssetPrice(address asset) external view returns (uint256);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "hardhat/=node_modules/hardhat/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solidity-code-metrics/=node_modules/solidity-code-metrics/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

608060405234801561000f575f80fd5b5060c28061001c5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063b3596f0714602a575b5f80fd5b604260353660046054565b50670de0b6b3a764000090565b60405190815260200160405180910390f35b5f602082840312156063575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146085575f80fd5b939250505056fea2646970667358221220d1a8b611849eb97dfa6a02d70289f3a956bcf2331039aeb130fff6aa5dac6d0764736f6c63430008150033

Deployed Bytecode

0x6080604052348015600e575f80fd5b50600436106026575f3560e01c8063b3596f0714602a575b5f80fd5b604260353660046054565b50670de0b6b3a764000090565b60405190815260200160405180910390f35b5f602082840312156063575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146085575f80fd5b939250505056fea2646970667358221220d1a8b611849eb97dfa6a02d70289f3a956bcf2331039aeb130fff6aa5dac6d0764736f6c63430008150033

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.