ETH Price: $4,123.32 (+2.89%)

Contract

0x1e5be5059d4A95297604355Dc6abD0Baf036cc95

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

N/A
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

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

Contract Name:
HardPegOracleWrapper

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
 *    _____     ______   ______     __     __   __     __     ______   __  __       *
 *   /\  __-.  /\__  _\ /\  == \   /\ \   /\ "-.\ \   /\ \   /\__  _\ /\ \_\ \      *
 *   \ \ \/\ \ \/_/\ \/ \ \  __<   \ \ \  \ \ \-.  \  \ \ \  \/_/\ \/ \ \____ \     *
 *    \ \____-    \ \_\  \ \_\ \_\  \ \_\  \ \_\\"\_\  \ \_\    \ \_\  \/\_____\    *
 *     \/____/     \/_/   \/_/ /_/   \/_/   \/_/ \/_/   \/_/     \/_/   \/_____/    *
 *                                                                                  *
 * ————————————————————————————————— dtrinity.org ————————————————————————————————— *
 *                                                                                  *
 *                                         ▲                                        *
 *                                        ▲ ▲                                       *
 *                                                                                  *
 * ———————————————————————————————————————————————————————————————————————————————— *
 * dTRINITY Protocol: https://github.com/dtrinity                                   *
 * ———————————————————————————————————————————————————————————————————————————————— */

pragma solidity ^0.8.20;

import "../interface/IOracleWrapper.sol";

contract HardPegOracleWrapper is IOracleWrapper {
  uint256 public immutable pricePeg;
  address public immutable BASE_CURRENCY;

  uint256 public BASE_CURRENCY_UNIT;

  constructor(address _baseCurrency, uint256 _baseCurrencyUnit, uint256 _pricePeg) {
    BASE_CURRENCY = _baseCurrency;
    BASE_CURRENCY_UNIT = _baseCurrencyUnit;
    pricePeg = _pricePeg;
  }

  /**
   * @dev Get the price info of an asset
   */
  function getPriceInfo(
    address // asset
  ) external view returns (uint256 price, bool isAlive) {
    return (pricePeg, true);
  }

  /**
   * @dev Get the price of an asset
   */
  function getAssetPrice(
    address // asset
  ) external view override returns (uint256) {
    return pricePeg;
  }
}

// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
 *    _____     ______   ______     __     __   __     __     ______   __  __       *
 *   /\  __-.  /\__  _\ /\  == \   /\ \   /\ "-.\ \   /\ \   /\__  _\ /\ \_\ \      *
 *   \ \ \/\ \ \/_/\ \/ \ \  __<   \ \ \  \ \ \-.  \  \ \ \  \/_/\ \/ \ \____ \     *
 *    \ \____-    \ \_\  \ \_\ \_\  \ \_\  \ \_\\"\_\  \ \_\    \ \_\  \/\_____\    *
 *     \/____/     \/_/   \/_/ /_/   \/_/   \/_/ \/_/   \/_/     \/_/   \/_____/    *
 *                                                                                  *
 * ————————————————————————————————— dtrinity.org ————————————————————————————————— *
 *                                                                                  *
 *                                         ▲                                        *
 *                                        ▲ ▲                                       *
 *                                                                                  *
 * ———————————————————————————————————————————————————————————————————————————————— *
 * dTRINITY Protocol: https://github.com/dtrinity                                   *
 * ———————————————————————————————————————————————————————————————————————————————— */

pragma solidity ^0.8.20;

/**
 * @dev Interface for the individual oracle wrappers, to unify interface between different oracle providers
 */
interface IOracleWrapper {
  /**
   * @notice Returns the base currency address
   * @dev Address 0x0 is commonly used for USD, but can be any token address based on the implementation.
   * @return Returns the base currency address.
   */
  function BASE_CURRENCY() external view returns (address);

  /**
   * @notice Returns the base currency unit
   * @dev Represents the decimal precision of the base currency (e.g., 1e8 for USD, 1e18 for ETH).
   * @return Returns the base currency unit.
   */
  function BASE_CURRENCY_UNIT() external view returns (uint256);

  /**
   * @notice Returns the asset price in the base currency
   * @param asset The address of the asset
   * @return The price of the asset
   */
  function getAssetPrice(address asset) external view returns (uint256);

  /**
   * @notice Returns the price and alive status of an asset
   * @param asset The address of the asset
   * @return price The price of the asset
   * @return isAlive The alive status of the asset
   */
  function getPriceInfo(address asset) external view returns (uint256 price, bool isAlive);
}

Settings
{
  "evmVersion": "paris",
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_baseCurrency","type":"address"},{"internalType":"uint256","name":"_baseCurrencyUnit","type":"uint256"},{"internalType":"uint256","name":"_pricePeg","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BASE_CURRENCY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getPriceInfo","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"isAlive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePeg","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

0x60c060405234801561001057600080fd5b5060405161027d38038061027d83398101604081905261002f91610048565b6001600160a01b0390921660a05260005560805261008b565b60008060006060848603121561005d57600080fd5b83516001600160a01b038116811461007457600080fd5b602085015160409095015190969495509392505050565b60805160a0516101c26100bb600039600061012201526000818160610152818160b0015260fb01526101c26000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80636af8ecae1461005c5780638c89b64f146100965780638edbf4361461009f578063b3596f07146100ea578063e19f47001461011d575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61008360005481565b6100d56100ad36600461015c565b507f000000000000000000000000000000000000000000000000000000000000000090600190565b6040805192835290151560208301520161008d565b6100836100f836600461015c565b507f000000000000000000000000000000000000000000000000000000000000000090565b6101447f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161008d565b60006020828403121561016e57600080fd5b81356001600160a01b038116811461018557600080fd5b939250505056fea2646970667358221220dab71ee1ad2092fdb8bce4f40c7156bf86e6c3f76dc26a0c220c4be60b0341bf64736f6c63430008160033000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab620000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a7640000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c80636af8ecae1461005c5780638c89b64f146100965780638edbf4361461009f578063b3596f07146100ea578063e19f47001461011d575b600080fd5b6100837f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b6040519081526020015b60405180910390f35b61008360005481565b6100d56100ad36600461015c565b507f0000000000000000000000000000000000000000000000000de0b6b3a764000090600190565b6040805192835290151560208301520161008d565b6100836100f836600461015c565b507f0000000000000000000000000000000000000000000000000de0b6b3a764000090565b6101447f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab6281565b6040516001600160a01b03909116815260200161008d565b60006020828403121561016e57600080fd5b81356001600160a01b038116811461018557600080fd5b939250505056fea2646970667358221220dab71ee1ad2092fdb8bce4f40c7156bf86e6c3f76dc26a0c220c4be60b0341bf64736f6c63430008160033

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