ETH Price: $3,413.40 (-0.97%)

Contract

0x905b7dAbCD3Ce6B792D874e303D336424Cdb1421
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WstEthStEthExchangeRateChainlinkAdapter

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 999999 runs

Other Settings:
paris EvmVersion
File 1 of 3 : WstEthStEthExchangeRateChainlinkAdapter.sol
// 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);
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IStEth {
    function getPooledEthByShares(uint256) external view returns (uint256);
}

// 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);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "morpho-blue/=lib/morpho-blue/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"ST_ETH","outputs":[{"internalType":"contract IStEth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"}]

6080806040523461001657610362908161001c8239f35b600080fdfe60806040818152600436101561001457600080fd5b600091823560e01c908163313ce567146102f357508063338346d2146102a75780637284e416146101a15763feaf968c1461004e57600080fd5b3461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d578051907f7a28fb88000000000000000000000000000000000000000000000000000000008252670de0b6b3a7640000600483015260208260248173ae7ab96520de3a18e5e111b5eaab095312d7fe845afa9182156101935783926100fc575b5091808360a094519382855260208501528301528060608301526080820152f35b90915060203d811161018c575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff82111761015f57602091839185528101031261015b575190826100db565b8280fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503d610109565b81513d85823e3d90fd5b5080fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d57805181810181811067ffffffffffffffff82111761027a578252601a81526020907f7773744554482f73744554482065786368616e676520726174650000000000008282015282519382859384528251928382860152825b84811061026457505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610228565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d576020905173ae7ab96520de3a18e5e111b5eaab095312d7fe848152f35b83903461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5780601260209252f3fea2646970667358221220209c58277eeec75c7c564902ed5d99b9d85b70cc50513d646c39752827e86bf764736f6c63430008150033

Deployed Bytecode

0x60806040818152600436101561001457600080fd5b600091823560e01c908163313ce567146102f357508063338346d2146102a75780637284e416146101a15763feaf968c1461004e57600080fd5b3461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d578051907f7a28fb88000000000000000000000000000000000000000000000000000000008252670de0b6b3a7640000600483015260208260248173ae7ab96520de3a18e5e111b5eaab095312d7fe845afa9182156101935783926100fc575b5091808360a094519382855260208501528301528060608301526080820152f35b90915060203d811161018c575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff82111761015f57602091839185528101031261015b575190826100db565b8280fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503d610109565b81513d85823e3d90fd5b5080fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d57805181810181811067ffffffffffffffff82111761027a578252601a81526020907f7773744554482f73744554482065786368616e676520726174650000000000008282015282519382859384528251928382860152825b84811061026457505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610228565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d576020905173ae7ab96520de3a18e5e111b5eaab095312d7fe848152f35b83903461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5780601260209252f3fea2646970667358221220209c58277eeec75c7c564902ed5d99b9d85b70cc50513d646c39752827e86bf764736f6c63430008150033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

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.