Contract 0x58bc6da61a00310ebc519fcf8c0d55493c529341

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa545b197d77732ef23f1927d2c633b078da33cce037c1f5d23d98384135dc39c0x60806040191816002022-08-02 9:18:06116 days 9 hrs ago0xde485812e28824e542b9c2270b6b8ed9232b7d0b IN  Create: DpxCallPriceOracleV20 ETH0.000410930648 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0bbfaad79162a2c59eeae2c5024f860a5eb84682651ce3d3f16474dfbe62ca64413087622022-11-26 8:09:2810 hrs 24 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x0bbfaad79162a2c59eeae2c5024f860a5eb84682651ce3d3f16474dfbe62ca64413087622022-11-26 8:09:2810 hrs 24 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x0bbfaad79162a2c59eeae2c5024f860a5eb84682651ce3d3f16474dfbe62ca64413087622022-11-26 8:09:2810 hrs 24 mins ago 0x0dc96f38980144ebffe745706dfee92622dba829 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x05e7aced3b7727f9129e6d302b488cd8a1e0c817 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x05e7aced3b7727f9129e6d302b488cd8a1e0c817 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x05e7aced3b7727f9129e6d302b488cd8a1e0c817 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x47a2711b72275556c6dbf7b9018cb83abf15f233b3eb4bcda4dfed084d6df8d0413058842022-11-26 7:55:0010 hrs 38 mins ago 0x05e7aced3b7727f9129e6d302b488cd8a1e0c817 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x10fd85ec522c245a63239b9fc64434f58520bd1f 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x10fd85ec522c245a63239b9fc64434f58520bd1f 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xfdb631f5ee196f0ed6faa767959853a9f217697d0 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x10fd85ec522c245a63239b9fc64434f58520bd1f 0x58bc6da61a00310ebc519fcf8c0d55493c5293410 ETH
0x06c27fe0614acb9cb9e6c749a354c1a77bc3605cfbe3d9eb7d58aad284257677410779372022-11-25 11:36:511 day 6 hrs ago 0x58bc6da61a00310ebc519fcf8c0d55493c529341 0xc373b9db0707fd451bc56ba5e9b029ba26629df00 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DpxCallPriceOracleV2

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 5 : AggregatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorInterface {
  function latestAnswer() external view returns (int256);

  function latestTimestamp() external view returns (uint256);

  function latestRound() external view returns (uint256);

  function getAnswer(uint256 roundId) external view returns (int256);

  function getTimestamp(uint256 roundId) external view returns (uint256);

  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);

  event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}

File 2 of 5 : AggregatorV2V3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./AggregatorInterface.sol";
import "./AggregatorV3Interface.sol";

interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}

File 3 of 5 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 4 of 5 : IPriceOracle.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface IPriceOracle {
    function getCollateralPrice() external view returns (uint256);

    function getUnderlyingPrice() external view returns (uint256);
}

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

// Interfaces
import {AggregatorV2V3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
import {IPriceOracle} from "../../../interfaces/IPriceOracle.sol";

contract DpxCallPriceOracleV2 is IPriceOracle {
    AggregatorV2V3Interface internal priceFeed;
    AggregatorV2V3Interface internal sequencerUptimeFeed;

    uint256 public constant GRACE_PERIOD_TIME = 3600;

    error SequencerDown();
    error GracePeriodNotOver();
    error HeartbeatNotFulfilled();

    /**
     * Network: Arbitrum Mainnet
     * Data Feed: DPX/USD
     * Data Feed Proxy Address: 0xc373B9DB0707fD451Bc56bA5E9b029ba26629DF0
     * Sequencer Uptime Proxy Address: 0xFdB631F5EE196F0ed6FAa767959853A9F217697D
     */
    constructor() {
        priceFeed = AggregatorV2V3Interface(
            0xc373B9DB0707fD451Bc56bA5E9b029ba26629DF0
        );
        sequencerUptimeFeed = AggregatorV2V3Interface(
            0xFdB631F5EE196F0ed6FAa767959853A9F217697D
        );
    }

    /// @notice Returns the collateral price
    function getCollateralPrice() external view returns (uint256) {
        return getUnderlyingPrice();
    }

    /// @notice Returns the underlying price
    function getUnderlyingPrice() public view returns (uint256) {
        (, int256 answer, uint256 startedAt, , ) = sequencerUptimeFeed
            .latestRoundData();

        // Answer == 0: Sequencer is up
        // Answer == 1: Sequencer is down
        bool isSequencerUp = answer == 0;
        if (!isSequencerUp) {
            revert SequencerDown();
        }

        // Make sure the grace period has passed after the sequencer is back up.
        uint256 timeSinceUp = block.timestamp - startedAt;
        if (timeSinceUp <= GRACE_PERIOD_TIME) {
            revert GracePeriodNotOver();
        }

        (, int256 price, , uint256 updatedAt, ) = priceFeed.latestRoundData();

        if ((block.timestamp - updatedAt) > 86400) {
            revert HeartbeatNotFulfilled();
        }

        return uint256(price);
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"GracePeriodNotOver","type":"error"},{"inputs":[],"name":"HeartbeatNotFulfilled","type":"error"},{"inputs":[],"name":"SequencerDown","type":"error"},{"inputs":[],"name":"GRACE_PERIOD_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollateralPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b031990811673c373b9db0707fd451bc56ba5e9b029ba26629df0179091556001805490911673fdb631f5ee196f0ed6faa767959853a9f217697d1790556102ea806100686000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063468f02d214610046578063ed2f860314610060578063f7683bbc14610069575b600080fd5b61004e610071565b60405190815260200160405180910390f35b61004e610e1081565b61004e610211565b6000806000600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156100c457600080fd5b505afa1580156100d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fc919061023f565b5091945092505082159050806101245760405162032b3d60e81b815260040160405180910390fd5b6000610130834261028f565b9050610e1081116101545760405163d15f73b560e01b815260040160405180910390fd5b6000805460408051633fabe5a360e21b8152905183926001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b15801561019957600080fd5b505afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d1919061023f565b509350509250506201518081426101e8919061028f565b111561020757604051632c02772b60e21b815260040160405180910390fd5b5095945050505050565b600061021b610071565b905090565b805169ffffffffffffffffffff8116811461023a57600080fd5b919050565b600080600080600060a0868803121561025757600080fd5b61026086610220565b945060208601519350604086015192506060860151915061028360808701610220565b90509295509295909350565b6000828210156102af57634e487b7160e01b600052601160045260246000fd5b50039056fea26469706673582212208d256b923a3bc77dcf933a9277d8a24724a15619123246c9bb52f49aebfdd36964736f6c63430008090033

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