{"file_path":"src/wsteth-exchange-rate-adapter/WstEthStEthExchangeRateChainlinkAdapter.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity 0.8.21;\n\nimport {IStEth} from \"./interfaces/IStEth.sol\";\nimport {MinimalAggregatorV3Interface} from \"./interfaces/MinimalAggregatorV3Interface.sol\";\n\n/// @title WstEthStEthExchangeRateChainlinkAdapter\n/// @author Morpho Labs\n/// @custom:contact security@morpho.org\n/// @notice wstETH/stETH exchange rate price feed.\n/// @dev This contract should only be deployed on Ethereum and used as a price feed for Morpho oracles.\ncontract WstEthStEthExchangeRateChainlinkAdapter is MinimalAggregatorV3Interface {\n    /// @inheritdoc MinimalAggregatorV3Interface\n    // @dev The calculated price has 18 decimals precision, whatever the value of `decimals`.\n    uint8 public constant decimals = 18;\n\n    /// @notice The description of the price feed.\n    string public constant description = \"wstETH/stETH exchange rate\";\n\n    /// @notice The address of stETH on Ethereum.\n    IStEth public constant ST_ETH = IStEth(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\n\n    /// @inheritdoc MinimalAggregatorV3Interface\n    /// @dev Returns zero for roundId, startedAt, updatedAt and answeredInRound.\n    /// @dev Silently overflows if `getPooledEthByShares`'s return value is greater than `type(int256).max`.\n    function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {\n        // It is assumed that `getPooledEthByShares` returns a price with 18 decimals precision.\n        return (0, int256(ST_ETH.getPooledEthByShares(1 ether)), 0, 0, 0);\n    }\n}\n","deployed_bytecode":"0x60806040818152600436101561001457600080fd5b600091823560e01c908163313ce567146102f357508063338346d2146102a75780637284e416146101a15763feaf968c1461004e57600080fd5b3461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d578051907f7a28fb88000000000000000000000000000000000000000000000000000000008252670de0b6b3a7640000600483015260208260248173ae7ab96520de3a18e5e111b5eaab095312d7fe845afa9182156101935783926100fc575b5091808360a094519382855260208501528301528060608301526080820152f35b90915060203d811161018c575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff82111761015f57602091839185528101031261015b575190826100db565b8280fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503d610109565b81513d85823e3d90fd5b5080fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d57805181810181811067ffffffffffffffff82111761027a578252601a81526020907f7773744554482f73744554482065786368616e676520726174650000000000008282015282519382859384528251928382860152825b84811061026457505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610228565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d576020905173ae7ab96520de3a18e5e111b5eaab095312d7fe848152f35b83903461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5780601260209252f3fea2646970667358221220209c58277eeec75c7c564902ed5d99b9d85b70cc50513d646c39752827e86bf764736f6c63430008150033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":999999},"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/"],"viaIR":true},"optimization_runs":999999,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"0.8.21+commit.d9974bed","is_verified_via_verifier_alliance":true,"verified_at":"2026-02-24T10:44:30.974052Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6080806040523461001657610362908161001c8239f35b600080fdfe60806040818152600436101561001457600080fd5b600091823560e01c908163313ce567146102f357508063338346d2146102a75780637284e416146101a15763feaf968c1461004e57600080fd5b3461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d578051907f7a28fb88000000000000000000000000000000000000000000000000000000008252670de0b6b3a7640000600483015260208260248173ae7ab96520de3a18e5e111b5eaab095312d7fe845afa9182156101935783926100fc575b5091808360a094519382855260208501528301528060608301526080820152f35b90915060203d811161018c575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff82111761015f57602091839185528101031261015b575190826100db565b8280fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503d610109565b81513d85823e3d90fd5b5080fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d57805181810181811067ffffffffffffffff82111761027a578252601a81526020907f7773744554482f73744554482065786368616e676520726174650000000000008282015282519382859384528251928382860152825b84811061026457505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610228565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d576020905173ae7ab96520de3a18e5e111b5eaab095312d7fe848152f35b83903461019d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5780601260209252f3fea2646970667358221220209c58277eeec75c7c564902ed5d99b9d85b70cc50513d646c39752827e86bf764736f6c63430008150033","name":"WstEthStEthExchangeRateChainlinkAdapter","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"src/wsteth-exchange-rate-adapter/interfaces/IStEth.sol","source_code":"// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\ninterface IStEth {\n    function getPooledEthByShares(uint256) external view returns (uint256);\n}\n"},{"file_path":"src/wsteth-exchange-rate-adapter/interfaces/MinimalAggregatorV3Interface.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0;\n\n/// @dev Inspired by\n/// https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol\n/// @dev This is the minimal feed interface required by `MorphoChainlinkOracleV2`.\ninterface MinimalAggregatorV3Interface {\n    /// @notice Returns the precision of the feed.\n    function decimals() external view returns (uint8);\n\n    /// @notice Returns Chainlink's `latestRoundData` return values.\n    /// @notice Only the `answer` field is used by `MorphoChainlinkOracleV2`.\n    function latestRoundData()\n        external\n        view\n        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"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"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}