Zenith EVM Explorer
K
DashboardBlocksTransactionsLinked TransactionsContractsTokensFaucetStatsAPI
DashboardBlocksTxsLinkedContracts
Back/0xbdaa...b79d

Contract

Contract
CSV
0xbdaaa4a4...6d0fb79d

Balance

0 $ZTH

Type

Contract

Transactions

0

Contract Interaction
ownerview
priceview
Contract ABIVerified · FixedPriceOracle

This contract's methods and events are decoded across the explorer.

Prefer source verification? Verify from Foundry or Hardhat against the Etherscan-compatible API to publish the full source too.

Source CodeFixedPriceOracleExact match
Compiler: v0.8.28+commit.7893614aOptimization: No
// File: src/FixedPriceOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

import {IOracle} from "morpho-blue/interfaces/IOracle.sol";

/// @notice Testnet-only oracle returning an owner-set price.
/// @dev Price of 1 collateral unit in loan units, scaled by 1e36 (Morpho convention).
contract FixedPriceOracle is IOracle {
    address public owner;
    uint256 public price;

    event PriceSet(uint256 price);

    constructor(uint256 initialPrice) {
        owner = msg.sender;
        price = initialPrice;
        emit PriceSet(initialPrice);
    }

    function setPrice(uint256 newPrice) external {
        require(msg.sender == owner, "not owner");
        price = newPrice;
        emit PriceSet(newPrice);
    }
}


// File: ../vault-v2/lib/morpho-blue/src/interfaces/IOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

/// @title IOracle
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Interface that oracles used by Morpho must implement.
/// @dev It is the user's responsibility to select markets with safe oracles.
interface IOracle {
    /// @notice Returns the price of 1 asset of collateral token quoted in 1 asset of loan token, scaled by 1e36.
    /// @dev It corresponds to the price of 10**(collateral token decimals) assets of collateral token quoted in
    /// 10**(loan token decimals) assets of loan token with `36 + loan token decimals - collateral token decimals`
    /// decimals of precision.
    function price() external view returns (uint256);
}

Constructor arguments (ABI-encoded)

000000000000000000000000000000000000000006765c793fa10079d0000000
All
Incoming
Outgoing
Transactions (0)

No transactions found

This address has no recorded transactions yet