Contract 0x252c07e0356d3b1a8ce273e39885b094053137b9

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8c167f6726f8bc432703f0e2ab8799bc231cca28f65246c7d00689fb442b4938Update Price51690832022-01-28 12:27:118 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000559671381 ETH
0xf31a1e9badff8af8e546bc28040daa66e17c849df7931a01a0b91ec92927eb99Update Price51689862022-01-28 12:24:1311 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000559671381 ETH
0x8f9633e2669193362b76f10251e7093f255c2b204b8eba132aefb79dac0d43ccUpdate Price51683122022-01-28 11:54:4341 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000559671381 ETH
0xaa63d5a307ef4477855cb3b8c439ea10ceb0defe386d8150c8e338f65908bf10Update Price51676972022-01-28 11:24:011 hr 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000571573198 ETH
0x8056b616b9f52fffce9050cb1b0881cbb6af7227196cb068d029f81f9e6b190cUpdate Price51670332022-01-28 10:54:181 hr 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000569802223 ETH
0x4a6dab478fca933d6f10b22084079d62434d0f8648a3a686ecc7fe9dd3066001Update Price51665372022-01-28 10:24:332 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000577017363 ETH
0x76ffe36cbf20a003133a54c7a9adf5190e97420d278d50c58120d5a793068210Update Price51658802022-01-28 9:54:182 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000578816354 ETH
0xd5f529ba78a0bea433bdf86ec581ed0d0961966cf716577ca7a02188380ac8b9Update Price51652562022-01-28 9:24:103 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000578816354 ETH
0x4ec8b76295651a58dca49b030975d9ffa216c52b413bd1fc8eb127af31e31cbaUpdate Price51645882022-01-28 8:54:383 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000587705823 ETH
0x95e01c284d356c7b10afd9d41d4b4007ad1cafbac2415910f0b42c462ff029e4Update Price51636832022-01-28 8:24:084 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.00059397786 ETH
0x3abe55b9dfc2c7a192a140f9af311fb804d67e650020ee920bda815d31f0607dUpdate Price51626112022-01-28 7:58:034 hrs 37 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.00059397786 ETH
0x99799dfed52c71e8f2839e5d37a7b433c74f61600e7e646f23d54cbd9dde1442Update Price51624792022-01-28 7:54:504 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000595823974 ETH
0xc48063bab4d430480a4d0afadd2e787a2ee9c1c8fb6c8de0dfa64d928e4696c0Update Price51618042022-01-28 7:24:015 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.00059397786 ETH
0xdd135f0c36240aef2f4c9c3b6a475450736dc5e978b551e2d01b1901a7751d2cUpdate Price51611642022-01-28 6:54:445 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.00059397786 ETH
0x0eebb282e638745512352d385bfef57c107bad6733e62f40e2d9e97adbb90c4cUpdate Price51604262022-01-28 6:24:296 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000607017232 ETH
0xaa8fe1d5987fe1efe0f6f39da1352d52814b6ba033def603887c9b9a7ed5abf3Update Price51598482022-01-28 5:53:566 hrs 42 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608903873 ETH
0xc1337fbe14853e75a18d20771e873800edf326dfa79803e60f887e1bd093de46Update Price51592612022-01-28 5:23:407 hrs 12 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000607017232 ETH
0xf07baf6127c4061a8bc86111c5022e51cad682cab2d9e2c44051d917f01ce007Update Price51586872022-01-28 4:54:397 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000605130591 ETH
0x3800f36fb9d9179caa4900efc11e2e02522a1e7d05432b2c099de603db9a45baUpdate Price51579762022-01-28 4:24:358 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608903873 ETH
0xfce323c9d147135f1cfe5e4680313a8c8a42b073a9c412da9f4ea12860b3f4ffUpdate Price51572442022-01-28 3:53:508 hrs 42 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608903873 ETH
0xedcc3d59d7331e53efdb33b69663091da92f34ae594df8eedabbadb78ded5204Update Price51564762022-01-28 3:24:399 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000610720115 ETH
0x6471942d069c973655c8c6fca19a29cf7e59b65dbccbafa0b20fd4f01e81bb0bUpdate Price51556352022-01-28 2:54:289 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608827847 ETH
0xdbbfdef7c398f9dc676687493a14a09f0f49c6b0a33822449e98737e2c4ae418Update Price51549442022-01-28 2:24:1410 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608827847 ETH
0xa25c36d8bde134568dc08cd824cb49bdcc8d1b7610cde1f741b9c6eb19503677Update Price51541662022-01-28 1:54:5310 hrs 41 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000608827847 ETH
0x3aae308b0c66c26d7ed4f8c9875bbe4752dce2637a17d1aff123652766a25931Update Price51534012022-01-28 1:24:2711 hrs 11 mins ago0xc490de9ca4e020f16f3d768b6a4f6fff513e117b IN  0x252c07e0356d3b1a8ce273e39885b094053137b90 ETH0.000610720115 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DpxCustomPriceOracle

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity Standard Json-Input format)

File 1 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 2 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;
    }
}

File 3 of 3 : DpxCustomPriceOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

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

contract DpxCustomPriceOracle 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;
    }
}

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

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"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103af8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063053f14da14610067578063715018a6146100835780638d6cc56d1461008d5780638da5cb5b146100a0578063e1aa6036146100bb578063f2fde38b146100c3575b600080fd5b61007060015481565b6040519081526020015b60405180910390f35b61008b6100d6565b005b61007061009b3660046102fb565b610115565b6000546040516001600160a01b03909116815260200161007a565b6100706101a9565b61008b6100d1366004610314565b610210565b6000546001600160a01b031633146101095760405162461bcd60e51b815260040161010090610344565b60405180910390fd5b61011360006102ab565b565b600080546001600160a01b031633146101405760405162461bcd60e51b815260040161010090610344565b816101a05760405162461bcd60e51b815260206004820152602a60248201527f437573746f6d50726963654f7261636c653a20546f6b656e20707269636520636044820152690616e6e6f7420626520360b41b6064820152608401610100565b50600181905590565b6000600154600014156102095760405162461bcd60e51b815260206004820152602260248201527f437573746f6d50726963654f7261636c653a204c617374207072696365203d3d604482015261020360f41b6064820152608401610100565b5060015490565b6000546001600160a01b0316331461023a5760405162461bcd60e51b815260040161010090610344565b6001600160a01b03811661029f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610100565b6102a8816102ab565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030d57600080fd5b5035919050565b60006020828403121561032657600080fd5b81356001600160a01b038116811461033d57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220337ee1e6939380e00e4aaefbc7e13a5a3e7418cf9a7e4185f9032f96c05d950f64736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.