Forkchoice Ethereum Mainnet

Address Contract Verified

Address 0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421
Balance 0 ETH
Nonce 1
Code Size 866 bytes
Indexed Transactions 0 (1 on-chain, <1% indexed)
External Etherscan · Sourcify

Contract Bytecode

866 bytes
Copy Bytecode
0x60806040818152600436101561001457600080fd5b600091823560e01c908163313ce567146102f357508063338346d2146102a75780637284e416146101a15763feaf968c1461004e57600080fd5b3461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d578051907f7a28fb88000000000000000000000000000000000000000000000000000000008252670de0b6b3a7640000600483015260208260248173ae7ab96520de3a18e5e111b5eaab095312d7fe845afa9182156101935783926100fc575b5091808360a094519382855260208501528301528060608301526080820152f35b90915060203d811161018c575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff82111761015f57602091839185528101031261015b575190826100db565b8280fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503d610109565b81513d85823e3d90fd5b5080fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d57805181810181811067ffffffffffffffff82111761027a578252601a81526020907f7773744554482f73744554482065786368616e676520726174650000000000008282015282519382859384528251928382860152825b84811061026457505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610228565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d576020905173ae7ab96520de3a18e5e111b5eaab095312d7fe848152f35b83903461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5780601260209252f3fea2646970667358221220209c58277eeec75c7c564902ed5d99b9d85b70cc50513d646c39752827e86bf764736f6c63430008150033

Verified Source Code Full Match

Compiler: v0.8.21+commit.d9974bed EVM: paris Optimization: Yes (999999 runs)
IStEth.sol 6 lines
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IStEth {
    function getPooledEthByShares(uint256) external view returns (uint256);
}
WstEthStEthExchangeRateChainlinkAdapter.sol 30 lines
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.21;

import {IStEth} from "./interfaces/IStEth.sol";
import {MinimalAggregatorV3Interface} from "./interfaces/MinimalAggregatorV3Interface.sol";

/// @title WstEthStEthExchangeRateChainlinkAdapter
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice wstETH/stETH exchange rate price feed.
/// @dev This contract should only be deployed on Ethereum and used as a price feed for Morpho oracles.
contract WstEthStEthExchangeRateChainlinkAdapter is MinimalAggregatorV3Interface {
    /// @inheritdoc MinimalAggregatorV3Interface
    // @dev The calculated price has 18 decimals precision, whatever the value of `decimals`.
    uint8 public constant decimals = 18;

    /// @notice The description of the price feed.
    string public constant description = "wstETH/stETH exchange rate";

    /// @notice The address of stETH on Ethereum.
    IStEth public constant ST_ETH = IStEth(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);

    /// @inheritdoc MinimalAggregatorV3Interface
    /// @dev Returns zero for roundId, startedAt, updatedAt and answeredInRound.
    /// @dev Silently overflows if `getPooledEthByShares`'s return value is greater than `type(int256).max`.
    function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
        // It is assumed that `getPooledEthByShares` returns a price with 18 decimals precision.
        return (0, int256(ST_ETH.getPooledEthByShares(1 ether)), 0, 0, 0);
    }
}
MinimalAggregatorV3Interface.sol 17 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

/// @dev Inspired by
/// https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol
/// @dev This is the minimal feed interface required by `MorphoChainlinkOracleV2`.
interface MinimalAggregatorV3Interface {
    /// @notice Returns the precision of the feed.
    function decimals() external view returns (uint8);

    /// @notice Returns Chainlink's `latestRoundData` return values.
    /// @notice Only the `answer` field is used by `MorphoChainlinkOracleV2`.
    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

Read Contract

ST_ETH 0x338346d2 → address
decimals 0x313ce567 → uint8
description 0x7284e416 → string
latestRoundData 0xfeaf968c → uint80, int256, uint256, uint256, uint80

Recent Transactions

This address has 1 on-chain transactions, but only <1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →