ETH Price: $3,775.80 (-1.85%)
Gas: 7 Gwei

Contract

0xCC701e2D472dFa2857Bf9AE24c263DAa39fD2C61
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60a06040194752692024-03-20 10:18:5970 days ago1710929939IN
 Create: MstETHRateProvider
0 ETH0.004140630.96243684

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MstETHRateProvider

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 4 : MstETHRateProvider.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

import "../interfaces/IRateProvider.sol";
import "../interfaces/IMLRT.sol";
/**
 * @title MST Rate Provider
 * @notice Returns the rate of 1 mstETH in terms of stETH
 */

contract MstETHRateProvider is IRateProvider {
    address public immutable mstETH;

    constructor(address _mstETH) {
        mstETH = _mstETH;
    }

    /**
     * @return uint256  the rate of 1 mstETH in terms of stETH
     */
    function getRate() external view override returns (uint256) {
        return IMLRT(mstETH).exchangeRateToLST();
    }
}

File 2 of 4 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 4 of 4 : IMLRT.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMLRT is IERC20 {
    function updateExchangeRateToLST(uint256 _newRate) external;

    function exchangeRateToLST() external view returns (uint256);

    function underlyingAsset() external view returns (address);
}

File 5 of 4 : IRateProvider.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

interface IRateProvider {
    function getRate() external view returns (uint256);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_mstETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mstETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b506040516101fd3803806101fd83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161016d61009060003960008181605b01526099015261016d6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063679aefce1461003b5780638f008d5814610056575b600080fd5b610043610095565b6040519081526020015b60405180910390f35b61007d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161004d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b38362146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610119919061011e565b905090565b60006020828403121561013057600080fd5b505191905056fea2646970667358221220acb86b483ac8ed73ecbbfa525a4721f3d3ad1d205cf18114388b097d8f7f61aa64736f6c6343000815003300000000000000000000000049446a0874197839d15395b908328a74ccc96bc0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063679aefce1461003b5780638f008d5814610056575b600080fd5b610043610095565b6040519081526020015b60405180910390f35b61007d7f00000000000000000000000049446a0874197839d15395b908328a74ccc96bc081565b6040516001600160a01b03909116815260200161004d565b60007f00000000000000000000000049446a0874197839d15395b908328a74ccc96bc06001600160a01b031663b38362146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610119919061011e565b905090565b60006020828403121561013057600080fd5b505191905056fea2646970667358221220acb86b483ac8ed73ecbbfa525a4721f3d3ad1d205cf18114388b097d8f7f61aa64736f6c63430008150033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000049446a0874197839d15395b908328a74ccc96bc0

-----Decoded View---------------
Arg [0] : _mstETH (address): 0x49446A0874197839D15395B908328a74ccc96Bc0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000049446a0874197839d15395b908328a74ccc96bc0


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
[ Download: CSV Export  ]

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.