ETH Price: $2,801.84 (+2.16%)

Contract

0x96c58797653E633dc48F1D1c3E3a6501B3771Be2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Price199285742024-05-22 23:02:35274 days ago1716418955IN
0x96c58797...1B3771Be2
0 ETH0.000280489.66038621

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

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

Contract Name:
FakeOracle

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 2 : FakeOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import { IOracle } from  "../../src/interfaces/IOracle.sol";

contract FakeOracle is IOracle {
    uint80 public roundId = 1;

    uint256 _price;
    uint256 _timestamp;

    mapping(uint80 => uint256) roundToPrice;
    mapping(uint80 => uint256) roundToTimestamp;

    constructor() {
        setPrice(1, 0);
        setTimestamp(block.timestamp, 0);
    }

    function price(uint80 id) external view returns (uint256) {
        if (id == 0) {
            id = roundId;
        }

        return roundToPrice[id];
    }

    function timestamp(uint80 id) external view returns (uint256) {
        if (id == 0) {
            id = roundId;
        }

        return roundToTimestamp[id];
    }

    function setPrice(uint256 price_, uint80 id) public {
        if (id == 0) {
            id = roundId;
        }

        roundToPrice[id] = price_;
    }

    function setTimestamp(uint256 timestamp_, uint80 id) public {
        if (id == 0) {
            id = roundId;
        }

        roundToTimestamp[id] = timestamp_;
    }

    function setRound(uint80 roundId_) public {
        roundId = roundId_;
    }
}

File 2 of 2 : IOracle.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.13;

interface IOracle {
    function price(uint80 roundId) external view returns (uint256);
    function timestamp(uint80 roundId) external view returns (uint256);
    function roundId() external view returns (uint80);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=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/",
    "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/",
    "lib/openzeppelin-contracts:@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint80","name":"id","type":"uint80"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundId","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price_","type":"uint256"},{"internalType":"uint80","name":"id","type":"uint80"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint80","name":"roundId_","type":"uint80"}],"name":"setRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp_","type":"uint256"},{"internalType":"uint80","name":"id","type":"uint80"}],"name":"setTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint80","name":"id","type":"uint80"}],"name":"timestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80632ef2bd40146100675780634dc0e5fa1461008d5780636c124e89146100a25780638cd221c9146100b5578063972a7e8f146100e0578063f011d95214610113575b600080fd5b61007a610075366004610230565b610126565b6040519081526020015b60405180910390f35b6100a061009b366004610252565b610164565b005b61007a6100b0366004610230565b61019d565b6000546100c8906001600160501b031681565b6040516001600160501b039091168152602001610084565b6100a06100ee366004610230565b6000805469ffffffffffffffffffff19166001600160501b0392909216919091179055565b6100a0610121366004610252565b6101db565b6000816001600160501b0316600003610148576000546001600160501b031691505b506001600160501b031660009081526003602052604090205490565b806001600160501b031660000361018357506000546001600160501b03165b6001600160501b0316600090815260046020526040902055565b6000816001600160501b03166000036101bf576000546001600160501b031691505b506001600160501b031660009081526004602052604090205490565b806001600160501b03166000036101fa57506000546001600160501b03165b6001600160501b0316600090815260036020526040902055565b80356001600160501b038116811461022b57600080fd5b919050565b60006020828403121561024257600080fd5b61024b82610214565b9392505050565b6000806040838503121561026557600080fd5b8235915061027560208401610214565b9050925092905056fea264697066735822122013e99977590fc4ea30f27f6b2ba823be2a4ab5947b854c8942d05114224442bc64736f6c63430008140033

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