Linea Testnet

Contract

0xa371FA57A42d9c72380e2959ceDbB21aE07AD210
Source Code Source Code

Overview

ETH Balance

Linea Sepolia LogoLinea Sepolia LogoLinea Sepolia Logo0 ETH

More Info

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Amount
Set Underlying P...100728942025-03-03 10:19:38345 days ago1740997178IN
0xa371FA57...aE07AD210
0 ETH0.000002610.09121816
Set Price100728912025-03-03 10:19:32345 days ago1740997172IN
0xa371FA57...aE07AD210
0 ETH0.000002590.09079804
Set Underlying P...100725742025-03-03 10:08:38345 days ago1740996518IN
0xa371FA57...aE07AD210
0 ETH0.000002640.09227901
Set Price100725732025-03-03 10:08:36345 days ago1740996516IN
0xa371FA57...aE07AD210
0 ETH0.000002630.09183417
Set Underlying P...93361932025-02-13 21:46:52363 days ago1739483212IN
0xa371FA57...aE07AD210
0 ETH0.000001820.06377031
Set Price93361912025-02-13 21:46:48363 days ago1739483208IN
0xa371FA57...aE07AD210
0 ETH0.000001820.06379028
Set Underlying P...93361252025-02-13 21:44:36363 days ago1739483076IN
0xa371FA57...aE07AD210
0 ETH0.000006140.13428572
Set Price93361242025-02-13 21:44:34363 days ago1739483074IN
0xa371FA57...aE07AD210
0 ETH0.000006140.13428572

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To Amount
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245771942026-02-11 9:32:4820 hrs ago1770802368
0xa371FA57...aE07AD210
0 ETH
245752222026-02-11 8:59:5621 hrs ago1770800396
0xa371FA57...aE07AD210
0 ETH
245752222026-02-11 8:59:5621 hrs ago1770800396
0xa371FA57...aE07AD210
0 ETH
245752222026-02-11 8:59:5621 hrs ago1770800396
0xa371FA57...aE07AD210
0 ETH
243726082026-02-07 10:44:454 days ago1770461085
0xa371FA57...aE07AD210
0 ETH
243726082026-02-07 10:44:454 days ago1770461085
0xa371FA57...aE07AD210
0 ETH
243726082026-02-07 10:44:454 days ago1770461085
0xa371FA57...aE07AD210
0 ETH
243725672026-02-07 10:43:234 days ago1770461003
0xa371FA57...aE07AD210
0 ETH
243725672026-02-07 10:43:234 days ago1770461003
0xa371FA57...aE07AD210
0 ETH
243725672026-02-07 10:43:234 days ago1770461003
0xa371FA57...aE07AD210
0 ETH
243229002026-02-06 7:06:135 days ago1770361573
0xa371FA57...aE07AD210
0 ETH
243229002026-02-06 7:06:135 days ago1770361573
0xa371FA57...aE07AD210
0 ETH
243229002026-02-06 7:06:135 days ago1770361573
0xa371FA57...aE07AD210
0 ETH
243228782026-02-06 7:05:295 days ago1770361529
0xa371FA57...aE07AD210
0 ETH
243228782026-02-06 7:05:295 days ago1770361529
0xa371FA57...aE07AD210
0 ETH
243228782026-02-06 7:05:295 days ago1770361529
0xa371FA57...aE07AD210
0 ETH
243228632026-02-06 7:04:595 days ago1770361499
0xa371FA57...aE07AD210
0 ETH
243228632026-02-06 7:04:595 days ago1770361499
0xa371FA57...aE07AD210
0 ETH
243228632026-02-06 7:04:595 days ago1770361499
0xa371FA57...aE07AD210
0 ETH
243228362026-02-06 7:04:055 days ago1770361445
0xa371FA57...aE07AD210
0 ETH
View All Internal Transactions
Loading...
Loading

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

Contract Name:
OracleMock

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 2499 runs

Other Settings:
london EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.28;

contract OracleMock {
    uint256 public price;
    uint256 public underlyingPrice;
    address public admin;
    mapping(address => uint8) public registeredDecimals;

    error OracleMock_NotAuthorized();

    constructor(address _admin) {
        admin = _admin;
    }

    function setDecimals(address token, uint8 dec) external {
        require(msg.sender == admin, OracleMock_NotAuthorized());
        registeredDecimals[token] = dec;
    }

    function decimals() external pure returns (uint8) {
        return 8;
    }

    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        roundId = 1;
        answer = int256(price);
        startedAt = block.timestamp;
        updatedAt = block.timestamp;
        answeredInRound = 1;
    }

    function latestAnswer() external view returns (int256) {
        return int256(price);
    }

    function latestTimestamp() external view returns (uint256) {
        return block.timestamp;
    }

    function setPrice(uint256 _price) external {
        require(msg.sender == admin, OracleMock_NotAuthorized());
        price = _price;
    }

    function setUnderlyingPrice(uint256 _price) external {
        require(msg.sender == admin, OracleMock_NotAuthorized());
        underlyingPrice = _price;
    }

    function getPrice(address) external view returns (uint256) {
        return price;
    }

    function getUnderlyingPrice(address) external view returns (uint256) {
        return underlyingPrice;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "risc0/=lib/risc0-ethereum/contracts/src/",
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
    "risc0-ethereum/=lib/risc0-ethereum/",
    "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 2499
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OracleMock_NotAuthorized","type":"error"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint8","name":"dec","type":"uint8"}],"name":"setDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setUnderlyingPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

0x6080604052348015600f57600080fd5b5060405161049a38038061049a833981016040819052602c916050565b600280546001600160a01b0319166001600160a01b0392909216919091179055607e565b600060208284031215606157600080fd5b81516001600160a01b0381168114607757600080fd5b9392505050565b61040d8061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806391b7f5ed1161008c578063f2259f9611610066578063f2259f961461018c578063f851a4401461019f578063fc57d4df146101e4578063feaf968c146101f957600080fd5b806391b7f5ed14610167578063a035b1fe1461017a578063efa32d491461018357600080fd5b806350d25bcd116100bd57806350d25bcd1461014457806357aefad21461014c5780638205bf6a1461016157600080fd5b8063313ce567146100e457806341976e09146100fe5780634201434814610121575b600080fd5b60085b60405160ff90911681526020015b60405180910390f35b61011361010c36600461035f565b5060005490565b6040519081526020016100f5565b6100e761012f36600461035f565b60036020526000908152604090205460ff1681565b600054610113565b61015f61015a366004610381565b61022c565b005b42610113565b61015f610175366004610381565b610269565b61011360005481565b61011360015481565b61015f61019a36600461039a565b6102a6565b6002546101bf9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f5565b6101136101f236600461035f565b5060015490565b6000546040805160018082526020820193909352429181018290526060810191909152608081019190915260a0016100f5565b60025473ffffffffffffffffffffffffffffffffffffffff163314610264576040516356936a7b60e11b815260040160405180910390fd5b600155565b60025473ffffffffffffffffffffffffffffffffffffffff1633146102a1576040516356936a7b60e11b815260040160405180910390fd5b600055565b60025473ffffffffffffffffffffffffffffffffffffffff1633146102de576040516356936a7b60e11b815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461035a57600080fd5b919050565b60006020828403121561037157600080fd5b61037a82610336565b9392505050565b60006020828403121561039357600080fd5b5035919050565b600080604083850312156103ad57600080fd5b6103b683610336565b9150602083013560ff811681146103cc57600080fd5b80915050925092905056fea26469706673582212201e4a5e0e620ecb32137157b78184c3d139406cf02f90e9af5da6d651e4cc46fa64736f6c634300081c0033000000000000000000000000cde13ff278bc484a09adb69ea1eed3caf6ea4e00

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806391b7f5ed1161008c578063f2259f9611610066578063f2259f961461018c578063f851a4401461019f578063fc57d4df146101e4578063feaf968c146101f957600080fd5b806391b7f5ed14610167578063a035b1fe1461017a578063efa32d491461018357600080fd5b806350d25bcd116100bd57806350d25bcd1461014457806357aefad21461014c5780638205bf6a1461016157600080fd5b8063313ce567146100e457806341976e09146100fe5780634201434814610121575b600080fd5b60085b60405160ff90911681526020015b60405180910390f35b61011361010c36600461035f565b5060005490565b6040519081526020016100f5565b6100e761012f36600461035f565b60036020526000908152604090205460ff1681565b600054610113565b61015f61015a366004610381565b61022c565b005b42610113565b61015f610175366004610381565b610269565b61011360005481565b61011360015481565b61015f61019a36600461039a565b6102a6565b6002546101bf9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f5565b6101136101f236600461035f565b5060015490565b6000546040805160018082526020820193909352429181018290526060810191909152608081019190915260a0016100f5565b60025473ffffffffffffffffffffffffffffffffffffffff163314610264576040516356936a7b60e11b815260040160405180910390fd5b600155565b60025473ffffffffffffffffffffffffffffffffffffffff1633146102a1576040516356936a7b60e11b815260040160405180910390fd5b600055565b60025473ffffffffffffffffffffffffffffffffffffffff1633146102de576040516356936a7b60e11b815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461035a57600080fd5b919050565b60006020828403121561037157600080fd5b61037a82610336565b9392505050565b60006020828403121561039357600080fd5b5035919050565b600080604083850312156103ad57600080fd5b6103b683610336565b9150602083013560ff811681146103cc57600080fd5b80915050925092905056fea26469706673582212201e4a5e0e620ecb32137157b78184c3d139406cf02f90e9af5da6d651e4cc46fa64736f6c634300081c0033

Block Transaction Gas Used Reward
view all blocks sequenced

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
0xa371FA57A42d9c72380e2959ceDbB21aE07AD210
Loading...
Loading
Loading...
Loading
[ 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.