Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Multi Chain
Multichain Addresses
4 addresses found via BlockscanLatest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 13013299 | 593 days 10 hrs ago | IN | Create: WstETHRateProvider | 0 ETH | 0.00878164 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
WstETHRateProvider
Compiler Version
v0.7.1+commit.f4a555be
Optimization Enabled:
Yes with 9999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; import "./interfaces/IRateProvider.sol"; import "./interfaces/ICToken.sol"; /** * @title cToken Rate Provider * @notice Returns the value of a cToken in terms of its underlying */ contract CTokenRateProvider is IRateProvider { ICToken public immutable cToken; constructor(ICToken _cToken) { require(_cToken.isCToken(), "Provided address is not cToken"); cToken = _cToken; } /** * @return the value of RateProvider's cToken in terms of its underlying */ function getRate() external view override returns (uint256) { return cToken.exchangeRateStored(); } }
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; // TODO: pull this from the monorepo interface IRateProvider { function getRate() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; interface ICToken { /** * @notice Indicator that this is a CToken contract (for inspection) */ function isCToken() external view returns (bool); /** * @notice Calculates the exchange rate from the underlying to the CToken */ function exchangeRateStored() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.7.0; import "./interfaces/IRateProvider.sol"; import "./interfaces/IwstETH.sol"; /** * @title Wrapped stETH Rate Provider * @notice Returns the value of wstETH in terms of stETH */ contract WstETHRateProvider is IRateProvider { IwstETH public immutable wstETH; constructor(IwstETH _wstETH) { wstETH = _wstETH; } /** * @return the value of wstETH in terms of stETH */ function getRate() external view override returns (uint256) { return wstETH.stEthPerToken(); } }
// SPDX-FileCopyrightText: 2021 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.1; /** * @title StETH token wrapper with static balances. * @dev It's an ERC20 token that represents the account's share of the total * supply of stETH tokens. WstETH token's balance only changes on transfers, * unlike StETH that is also changed when oracles report staking rewards and * penalties. It's a "power user" token for DeFi protocols which don't * support rebasable tokens. * * The contract is also a trustless wrapper that accepts stETH tokens and mints * wstETH in return. Then the user unwraps, the contract burns user's wstETH * and sends user locked stETH in return. * * The contract provides the staking shortcut: user can send ETH with regular * transfer and get wstETH in return. The contract will send ETH to Lido submit * method, staking it and wrapping the received stETH. * */ interface IwstETH { /** * @notice Get amount of wstETH for a one stETH * @return Amount of stETH for 1 wstETH */ function stEthPerToken() external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 9999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IwstETH","name":"_wstETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wstETH","outputs":[{"internalType":"contract IwstETH","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516101e33803806101e38339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b031661017961006a600039806088528060ae52506101796000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634aa07e641461003b578063679aefce1461006c575b600080fd5b610043610086565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100746100aa565b60408051918252519081900360200190f35b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663035faf826040518163ffffffff1660e01b815260040160206040518083038186803b15801561011257600080fd5b505afa158015610126573d6000803e3d6000fd5b505050506040513d602081101561013c57600080fd5b505190509056fea2646970667358221220ea76cab9de832dbe7dd8e95e2f7455ec90d1a6e7f91a1e03ec840a8393d33dbc64736f6c634300070100330000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
-----Decoded View---------------
Arg [0] : _wstETH (address): 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ 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.