APE Price: $0.66 (+1.05%)

Contract Diff Checker

Contract Name:
IOUFeed

Contract Source Code:

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

/**
 * @dev Interface for Chainlink feeds
 */
interface IChainlinkFeed {
    function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80);

    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import "../interfaces/IChainlinkFeed.sol";

/**
 * @dev Mock CL Feed contract for an IOU token hardcoded at 1e8 price
 */
contract IOUFeed is IChainlinkFeed {
    function decimals() external pure returns (uint8) {
        return 8;
    }

    /**
     * @dev Returns a hardcoded 1e8 price for a mock token
     */
    function latestRoundData() external pure returns (uint80, int256 priceUsd, uint256, uint256, uint80) {
        return (0, 1e8, 0, 0, 0);
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):