ETH Price: $1,906.07 (-5.92%)

Contract

0x28897036f8459bFBa886083dD6b4Ce4d2f14a57F
 

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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1A6BDB22...5F058183D
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
WEETHExchangeRateOracle

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 2 : WEETHExchangeRateOracle.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;

import { IPriceSource } from "./interfaces/IPriceSource.sol";

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

/**
 *  @title WEETHExchangeRateOracle
 *  @dev   Provides weETH / USD by multiplying the weETH exchange rate by ETH / USD.
 *         This provides a "non-market" price. Any depeg event will be ignored.
 */
contract WEETHExchangeRateOracle {

    /// @notice Etherfi restaked wrapped eth token contract.
    IWrappedEtherfiRestakedEth public immutable weeth;

    /// @notice The price source for ETH / USD.
    IPriceSource public immutable ethSource;

    constructor(address _weeth, address _ethSource) {
        // 8 decimals required as AaveOracle assumes this
        require(IPriceSource(_ethSource).decimals() == 8, "WEETHExchangeRateOracle/invalid-decimals");
        
        weeth     = IWrappedEtherfiRestakedEth(_weeth);
        ethSource = IPriceSource(_ethSource);
    }

    function latestAnswer() external view returns (int256) {
        int256 ethUsd       = ethSource.latestAnswer();
        int256 exchangeRate = int256(weeth.getRate());

        if (ethUsd <= 0 || exchangeRate <= 0) {
            return 0;
        }

        return exchangeRate * ethUsd / 1e18;
    }

    function decimals() external pure returns (uint8) {
        return 8;
    }

}

File 2 of 2 : IPriceSource.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.0;

interface IPriceSource {
    function latestAnswer() external view returns (int256);
    function decimals() external view returns (uint8);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc20-helpers/=lib/erc20-helpers/src/",
    "forge-std/=lib/forge-std/src/",
    "sparklend-v1-core/=lib/sparklend-v1-core/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "sparklend-address-registry/=lib/sparklend-address-registry/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_weeth","type":"address"},{"internalType":"address","name":"_ethSource","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"ethSource","outputs":[{"internalType":"contract IPriceSource","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weeth","outputs":[{"internalType":"contract IWrappedEtherfiRestakedEth","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce5671461005157806350d25bcd146100655780635b7312a21461007b578063e225c3a7146100ba575b600080fd5b604051600881526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f000000000000000000000000b20a1374efcafa32f701ab14316fa2e5b3400ed581565b6040516001600160a01b03909116815260200161005c565b6100a27f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee81565b6000807f000000000000000000000000b20a1374efcafa32f701ab14316fa2e5b3400ed56001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101669190610231565b905060007f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee6001600160a01b031663679aefce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ec9190610231565b90506000821315806101ff575060008113155b1561020d5760009250505090565b670de0b6b3a76400006102208383610260565b61022a9190610296565b9250505090565b60006020828403121561024357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820260008212600160ff1b8414161561027c5761027c61024a565b81810583148215176102905761029061024a565b92915050565b6000826102b357634e487b7160e01b600052601260045260246000fd5b600160ff1b8214600019841416156102cd576102cd61024a565b50059056fea2646970667358221220a2b905d33e5556bce33566ae38205238022d6cd8e73b67f6ce9a9d201062c91e64736f6c63430008140033

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
Loading...
Loading
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.