ETH Price: $2,048.05 (-0.05%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

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

Contract Source Code Verified (Exact Match)

Contract Name:
RsEthToEthExchangeRateAdapter

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 999999 runs

Other Settings:
cancun EvmVersion
File 1 of 4 : RsEthToEthExchangeRateAdapter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.20;

import { IKelpLRTConfig } from "src/interfaces/kelp/IKelpLRTConfig.sol";
import { IKelpLRTOracle } from "src/interfaces/kelp/IKelpLRTOracle.sol";
import { IMinimalAggregatorV3Interface } from "src/interfaces/IMinimalAggregatorV3Interface.sol";

/// @title RsEthToEthExchangeRateAdapter
/// @author Origami Finance
/// @custom:contact [email protected]
/// @notice rsETH/ETH exchange rate price feed.
/// @dev This contract should only be deployed on Ethereum.
contract RsEthToEthExchangeRateAdapter is IMinimalAggregatorV3Interface {
    /// @inheritdoc IMinimalAggregatorV3Interface
    // @dev The calculated price has 18 decimals precision, whatever the value of `decimals`.
    uint8 public constant override decimals = 18;

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

    /// @notice The address of the Kelp LRT Config contract in Ethereum.
    IKelpLRTConfig public constant KELP_LRT_CONFIG = IKelpLRTConfig(0x947Cb49334e6571ccBFEF1f1f1178d8469D65ec7);

    bytes32 public constant LRT_ORACLE = keccak256("LRT_ORACLE");

    /// @inheritdoc IMinimalAggregatorV3Interface
    /// @dev Returns zero for roundId, startedAt, updatedAt and answeredInRound.
    /// @dev Silently overflows if `rsETHPrice`'s return value is greater than `type(int256).max`.
    function latestRoundData() external view override returns (uint80, int256, uint256, uint256, uint80) {
        IKelpLRTOracle lrtOracle = IKelpLRTOracle(KELP_LRT_CONFIG.getContract(LRT_ORACLE));
        uint256 rate = lrtOracle.rsETHPrice();
        return (0, int256(rate), 0, 0, 0);
    }
}

File 2 of 4 : IKelpLRTConfig.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IKelpLRTConfig {
    function getContract(bytes32 contractId) external view returns (address);
}

File 3 of 4 : IKelpLRTOracle.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IKelpLRTOracle {
    function rsETHPrice() external view returns (uint256);
}

File 4 of 4 : IMinimalAggregatorV3Interface.sol
// 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 IMinimalAggregatorV3Interface {
    /// @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": [
    "forge-std/=lib/forge-std/src/",
    "src/=src/",
    "test/=test/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"KELP_LRT_CONFIG","outputs":[{"internalType":"contract IKelpLRTConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LRT_ORACLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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"}]

6080604052348015600e575f80fd5b5061036d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610064575f3560e01c80637284e4161161004d5780637284e416146100bc578063b1d7f9fc14610105578063feaf968c14610145575f80fd5b80630454cc9014610068578063313ce567146100a2575b5f80fd5b61008f7f0900d19e2faab4e79535bcc1cfdb63996d43c8e38d9a260cf2b01e820b5f84d481565b6040519081526020015b60405180910390f35b6100aa601281565b60405160ff9091168152602001610099565b6100f86040518060400160405280601781526020017f72734554482f4554482065786368616e6765207261746500000000000000000081525081565b60405161009991906102bc565b61012073947cb49334e6571ccbfef1f1f1178d8469d65ec781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610099565b61014d610184565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a001610099565b5f805f805f8073947cb49334e6571ccbfef1f1f1178d8469d65ec773ffffffffffffffffffffffffffffffffffffffff1663e16c7d987f0900d19e2faab4e79535bcc1cfdb63996d43c8e38d9a260cf2b01e820b5f84d46040518263ffffffff1660e01b81526004016101f991815260200190565b602060405180830381865afa158015610214573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610238919061030f565b90505f8173ffffffffffffffffffffffffffffffffffffffff1663b4b464346040518163ffffffff1660e01b8152600401602060405180830381865afa158015610284573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a89190610349565b5f9890975088965086955085945092505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561031f575f80fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610342575f80fd5b9392505050565b5f60208284031215610359575f80fd5b505191905056fea164736f6c6343000819000a

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610064575f3560e01c80637284e4161161004d5780637284e416146100bc578063b1d7f9fc14610105578063feaf968c14610145575f80fd5b80630454cc9014610068578063313ce567146100a2575b5f80fd5b61008f7f0900d19e2faab4e79535bcc1cfdb63996d43c8e38d9a260cf2b01e820b5f84d481565b6040519081526020015b60405180910390f35b6100aa601281565b60405160ff9091168152602001610099565b6100f86040518060400160405280601781526020017f72734554482f4554482065786368616e6765207261746500000000000000000081525081565b60405161009991906102bc565b61012073947cb49334e6571ccbfef1f1f1178d8469d65ec781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610099565b61014d610184565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a001610099565b5f805f805f8073947cb49334e6571ccbfef1f1f1178d8469d65ec773ffffffffffffffffffffffffffffffffffffffff1663e16c7d987f0900d19e2faab4e79535bcc1cfdb63996d43c8e38d9a260cf2b01e820b5f84d46040518263ffffffff1660e01b81526004016101f991815260200190565b602060405180830381865afa158015610214573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610238919061030f565b90505f8173ffffffffffffffffffffffffffffffffffffffff1663b4b464346040518163ffffffff1660e01b8152600401602060405180830381865afa158015610284573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a89190610349565b5f9890975088965086955085945092505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f6020828403121561031f575f80fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610342575f80fd5b9392505050565b5f60208284031215610359575f80fd5b505191905056fea164736f6c6343000819000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.