ETH Price: $3,190.36 (+2.37%)

Contract

0xC0cdD1176aA1624b89B7476142b41C04414afaa0

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Transfer Ownersh...750394322023-03-29 21:55:11472 days ago1680126911IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000059350.1
Update Price750386132023-03-29 21:51:36472 days ago1680126696IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000062050.1
Update Price750370002023-03-29 21:44:36472 days ago1680126276IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000058990.1
Update Price750354012023-03-29 21:37:35472 days ago1680125855IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000055360.1
Update Price750293482023-03-29 21:11:37472 days ago1680124297IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000051790.1
Update Price750286412023-03-29 21:08:36472 days ago1680124116IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000053810.1
Update Price750279552023-03-29 21:05:36472 days ago1680123936IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000053810.1
Update Price750270172023-03-29 21:01:36472 days ago1680123696IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000057430.1
Update Price750265552023-03-29 20:59:36472 days ago1680123576IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000057430.1
Update Price750258402023-03-29 20:56:36472 days ago1680123396IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000058990.1
Update Price750251442023-03-29 20:53:36472 days ago1680123216IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000058990.1
Update Price750249162023-03-29 20:52:36472 days ago1680123156IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000058990.1
Update Price750242092023-03-29 20:49:36472 days ago1680122976IN
Dopex: rDPX Custom Price Oracle
0 ETH0.00006130.1
Update Price750239792023-03-29 20:48:36472 days ago1680122916IN
Dopex: rDPX Custom Price Oracle
0 ETH0.00006130.1
Update Price750230222023-03-29 20:44:36472 days ago1680122676IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000061740.1
Update Price750155012023-03-29 20:12:37472 days ago1680120757IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000055680.1
Update Price749916702023-03-29 18:31:36472 days ago1680114696IN
Dopex: rDPX Custom Price Oracle
0 ETH0.00007090.1
Update Price749871582023-03-29 18:12:37472 days ago1680113557IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000059810.1
Update Price749616892023-03-29 16:26:36472 days ago1680107196IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000065110.1
Update Price749561422023-03-29 16:03:37472 days ago1680105817IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000061190.1
Update Price749474922023-03-29 15:27:36472 days ago1680103656IN
Dopex: rDPX Custom Price Oracle
0 ETH0.0000710.1
Update Price749426672023-03-29 15:07:36472 days ago1680102456IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000072150.1
Update Price749322582023-03-29 14:24:37472 days ago1680099877IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000048080.1
Update Price749065032023-03-29 12:37:37472 days ago1680093457IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000041950.1
Update Price748483782023-03-29 8:36:36472 days ago1680078996IN
Dopex: rDPX Custom Price Oracle
0 ETH0.000072190.1
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To Value
720358492023-03-21 6:50:12480 days ago1679381412
Dopex: rDPX Custom Price Oracle
0 ETH
720358492023-03-21 6:50:12480 days ago1679381412
Dopex: rDPX Custom Price Oracle
0 ETH
719799612023-03-21 2:59:12481 days ago1679367552
Dopex: rDPX Custom Price Oracle
0 ETH
719619112023-03-21 1:43:51481 days ago1679363031
Dopex: rDPX Custom Price Oracle
0 ETH
719619112023-03-21 1:43:51481 days ago1679363031
Dopex: rDPX Custom Price Oracle
0 ETH
719619112023-03-21 1:43:51481 days ago1679363031
Dopex: rDPX Custom Price Oracle
0 ETH
719619112023-03-21 1:43:51481 days ago1679363031
Dopex: rDPX Custom Price Oracle
0 ETH
719617652023-03-21 1:43:14481 days ago1679362994
Dopex: rDPX Custom Price Oracle
0 ETH
719617652023-03-21 1:43:14481 days ago1679362994
Dopex: rDPX Custom Price Oracle
0 ETH
719617652023-03-21 1:43:14481 days ago1679362994
Dopex: rDPX Custom Price Oracle
0 ETH
719617652023-03-21 1:43:14481 days ago1679362994
Dopex: rDPX Custom Price Oracle
0 ETH
719609872023-03-21 1:39:55481 days ago1679362795
Dopex: rDPX Custom Price Oracle
0 ETH
719609872023-03-21 1:39:55481 days ago1679362795
Dopex: rDPX Custom Price Oracle
0 ETH
719609872023-03-21 1:39:55481 days ago1679362795
Dopex: rDPX Custom Price Oracle
0 ETH
719609872023-03-21 1:39:55481 days ago1679362795
Dopex: rDPX Custom Price Oracle
0 ETH
719608352023-03-21 1:39:23481 days ago1679362763
Dopex: rDPX Custom Price Oracle
0 ETH
719608352023-03-21 1:39:23481 days ago1679362763
Dopex: rDPX Custom Price Oracle
0 ETH
719608352023-03-21 1:39:23481 days ago1679362763
Dopex: rDPX Custom Price Oracle
0 ETH
719608352023-03-21 1:39:23481 days ago1679362763
Dopex: rDPX Custom Price Oracle
0 ETH
718906252023-03-20 20:38:39481 days ago1679344719
Dopex: rDPX Custom Price Oracle
0 ETH
718906252023-03-20 20:38:39481 days ago1679344719
Dopex: rDPX Custom Price Oracle
0 ETH
718906252023-03-20 20:38:39481 days ago1679344719
Dopex: rDPX Custom Price Oracle
0 ETH
718906252023-03-20 20:38:39481 days ago1679344719
Dopex: rDPX Custom Price Oracle
0 ETH
718551402023-03-20 18:10:28481 days ago1679335828
Dopex: rDPX Custom Price Oracle
0 ETH
718551402023-03-20 18:10:28481 days ago1679335828
Dopex: rDPX Custom Price Oracle
0 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RdpxCustomPriceOracle

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 3 : RdpxCustomPriceOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

// Contracts
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';

contract RdpxCustomPriceOracle is Ownable {
    /*==== PUBLIC VARS ====*/

    uint256 public lastPrice;

    /*==== SETTER FUNCTIONS (ONLY OWNER) ====*/

    /**
     * @notice Updates the last price of the token
     * @param price price
     * @return price of the token
     */
    function updatePrice(uint256 price) external onlyOwner returns (uint256) {
        require(price != 0, 'CustomPriceOracle: Token price cannot be 0');

        lastPrice = price;

        return price;
    }

    /*==== VIEWS ====*/

    /**
     * @notice Gets the price of the token
     * @return price
     */
    function getPriceInUSD() external view returns (uint256) {
        require(lastPrice != 0, 'CustomPriceOracle: Last price == 0');

        return lastPrice;
    }
}

File 2 of 3 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _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);
    }
}

File 3 of 3 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"getPriceInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"uint256","name":"price","type":"uint256"}],"name":"updatePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103af8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063053f14da14610067578063715018a6146100835780638d6cc56d1461008d5780638da5cb5b146100a0578063e1aa6036146100bb578063f2fde38b146100c3575b600080fd5b61007060015481565b6040519081526020015b60405180910390f35b61008b6100d6565b005b61007061009b3660046102fb565b610115565b6000546040516001600160a01b03909116815260200161007a565b6100706101a9565b61008b6100d1366004610314565b610210565b6000546001600160a01b031633146101095760405162461bcd60e51b815260040161010090610344565b60405180910390fd5b61011360006102ab565b565b600080546001600160a01b031633146101405760405162461bcd60e51b815260040161010090610344565b816101a05760405162461bcd60e51b815260206004820152602a60248201527f437573746f6d50726963654f7261636c653a20546f6b656e20707269636520636044820152690616e6e6f7420626520360b41b6064820152608401610100565b50600181905590565b6000600154600014156102095760405162461bcd60e51b815260206004820152602260248201527f437573746f6d50726963654f7261636c653a204c617374207072696365203d3d604482015261020360f41b6064820152608401610100565b5060015490565b6000546001600160a01b0316331461023a5760405162461bcd60e51b815260040161010090610344565b6001600160a01b03811661029f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610100565b6102a8816102ab565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030d57600080fd5b5035919050565b60006020828403121561032657600080fd5b81356001600160a01b038116811461033d57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212209f88efa1028a5f5f83a13e4bc4e575897ffd6abc1b83d6f093a8775410dab44f64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063053f14da14610067578063715018a6146100835780638d6cc56d1461008d5780638da5cb5b146100a0578063e1aa6036146100bb578063f2fde38b146100c3575b600080fd5b61007060015481565b6040519081526020015b60405180910390f35b61008b6100d6565b005b61007061009b3660046102fb565b610115565b6000546040516001600160a01b03909116815260200161007a565b6100706101a9565b61008b6100d1366004610314565b610210565b6000546001600160a01b031633146101095760405162461bcd60e51b815260040161010090610344565b60405180910390fd5b61011360006102ab565b565b600080546001600160a01b031633146101405760405162461bcd60e51b815260040161010090610344565b816101a05760405162461bcd60e51b815260206004820152602a60248201527f437573746f6d50726963654f7261636c653a20546f6b656e20707269636520636044820152690616e6e6f7420626520360b41b6064820152608401610100565b50600181905590565b6000600154600014156102095760405162461bcd60e51b815260206004820152602260248201527f437573746f6d50726963654f7261636c653a204c617374207072696365203d3d604482015261020360f41b6064820152608401610100565b5060015490565b6000546001600160a01b0316331461023a5760405162461bcd60e51b815260040161010090610344565b6001600160a01b03811661029f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610100565b6102a8816102ab565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030d57600080fd5b5035919050565b60006020828403121561032657600080fd5b81356001600160a01b038116811461033d57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212209f88efa1028a5f5f83a13e4bc4e575897ffd6abc1b83d6f093a8775410dab44f64736f6c63430008090033

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