ETH Price: $3,325.95 (+6.68%)

Contract

0x2eD19c9a1bDCB06c22341ee75576A8B0B9167e14

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PushPriceFeed

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 1 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;

import "../Dependencies/Ownable.sol";

contract PushPriceFeed is Ownable {
    
    uint256 public lastGoodPrice;

    constructor(address _owner) Ownable(_owner) {}

    function fetchPrice() external returns (uint256, bool) {
        return (lastGoodPrice, false);
    }

    function setPrice(uint256 _price) external onlyOwner {
        lastGoodPrice = _price;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;

/**
 * Based on OpenZeppelin's Ownable contract:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.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.
 *
 * 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.
 */
contract Ownable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting `initialOwner` as the initial owner.
     */
    constructor(address initialOwner) {
        _owner = initialOwner;
        emit OwnershipTransferred(address(0), initialOwner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     *
     * NOTE: This function is not safe, as it doesn’t check owner is calling it.
     * Make sure you check it before calling it.
     */
    function _renounceOwnership() internal {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }
}

Settings
{
  "evmVersion": "cancun",
  "libraries": {},
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "openzeppelin/=lib/V2-gov/lib/openzeppelin-contracts/",
    "@chimera/=lib/V2-gov/lib/chimera/src/",
    "@openzeppelin/contracts/=lib/V2-gov/lib/openzeppelin-contracts/contracts/",
    "Solady/=lib/Solady/src/",
    "V2-gov/=lib/V2-gov/",
    "chimera/=lib/V2-gov/lib/chimera/src/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "v4-core/=lib/V2-gov/lib/v4-core/"
  ],
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"fetchPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastGoodPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b5060405161024238038061024283398101604081905261002e9161007c565b5f80546001600160a01b0319166001600160a01b03831690811782556040518392907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506100a9565b5f6020828403121561008c575f80fd5b81516001600160a01b03811681146100a2575f80fd5b9392505050565b61018c806100b65f395ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c80630490be83146100595780630fdb11cf146100755780638da5cb5b1461008b5780638f32d59b146100a557806391b7f5ed146100bd575b5f80fd5b61006260015481565b6040519081526020015b60405180910390f35b600154604080519182525f60208301520161006c565b5f546040516001600160a01b03909116815260200161006c565b6100ad6100d2565b604051901515815260200161006c565b6100d06100cb36600461013f565b6100e2565b005b5f546001600160a01b0316331490565b6100ea6100d2565b61013a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b600155565b5f6020828403121561014f575f80fd5b503591905056fea2646970667358221220803e85c1ed44860d08335cd5ec52e1213ccf2e3e85b06cd68aeb816a21cb24be64736f6c63430008180033000000000000000000000000919d5a6f2cbc0731380c26b4ac4f6183dd3a40c8

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610055575f3560e01c80630490be83146100595780630fdb11cf146100755780638da5cb5b1461008b5780638f32d59b146100a557806391b7f5ed146100bd575b5f80fd5b61006260015481565b6040519081526020015b60405180910390f35b600154604080519182525f60208301520161006c565b5f546040516001600160a01b03909116815260200161006c565b6100ad6100d2565b604051901515815260200161006c565b6100d06100cb36600461013f565b6100e2565b005b5f546001600160a01b0316331490565b6100ea6100d2565b61013a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b600155565b5f6020828403121561014f575f80fd5b503591905056fea2646970667358221220803e85c1ed44860d08335cd5ec52e1213ccf2e3e85b06cd68aeb816a21cb24be64736f6c63430008180033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000919d5a6f2cbc0731380c26b4ac4f6183dd3a40c8

-----Decoded View---------------
Arg [0] : _owner (address): 0x919D5a6F2CBc0731380C26B4AC4f6183dD3A40C8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000919d5a6f2cbc0731380c26b4ac4f6183dd3a40c8


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.