Skip to content
Verified contractPartialMIT

PendleExchangeRateOracleWrapper

Address0x105035baad706f3660fc54df9c620a0d54c3cf7f
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.34

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
Yes, 1,000,000 runs
EVM version
cancun
Via IR
yes
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,484,175
Creation transaction
0x839e254a52…742c6bc474

src/offchain-helpers/PendleExchangeRateOracleWrapper.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

import {IPExchangeRateOracle} from "@pendle/sy/contracts/interfaces/IPExchangeRateOracle.sol";

contract PendleExchangeRateOracleWrapper {
    address public immutable oracle;

    constructor(address _oracle) {
        oracle = _oracle;
    }

    function exchangeRate() external view returns (uint256) {
        return IPExchangeRateOracle(oracle).getExchangeRate();
    }
}

lib/pendle-sy/contracts/interfaces/IPExchangeRateOracle.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IPExchangeRateOracle {
    function getExchangeRate() external view returns (uint256);
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "none",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 1000000,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@pendle/core-v2/=lib/pendle-core-v2/",
    "@pendle/sy/=lib/pendle-sy/",
    "forge-std/=lib/forge-std/",
    "vendor/=vendor/",
    "vendor-locked/=vendor-locked/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "hardhat/=node_modules/hardhat/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.