ETH Price: $3,321.74 (+1.55%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Submit Rate217426832025-01-31 6:20:3518 hrs ago1738304435IN
0x64A58568...bAc03517d
0 ETH0.002811064.46183286
Submit Rate217354992025-01-30 6:15:4742 hrs ago1738217747IN
0x64A58568...bAc03517d
0 ETH0.002902664.3777588
Submit Rate217283482025-01-29 6:18:352 days ago1738131515IN
0x64A58568...bAc03517d
0 ETH0.002554944.76873548
Submit Rate217211852025-01-28 6:18:593 days ago1738045139IN
0x64A58568...bAc03517d
0 ETH0.002035496.54572498
Submit Rate217140352025-01-27 6:21:474 days ago1737958907IN
0x64A58568...bAc03517d
0 ETH0.001996439.74625353
Submit Rate217068452025-01-26 6:16:595 days ago1737872219IN
0x64A58568...bAc03517d
0 ETH0.00229475.28801627
Submit Rate216996962025-01-25 6:21:236 days ago1737786083IN
0x64A58568...bAc03517d
0 ETH0.001971167.71766662
Submit Rate216925192025-01-24 6:18:237 days ago1737699503IN
0x64A58568...bAc03517d
0 ETH0.001972388.8350632
Submit Rate216853552025-01-23 6:19:358 days ago1737613175IN
0x64A58568...bAc03517d
0 ETH0.001991217.13928111
Submit Rate216781752025-01-22 6:15:479 days ago1737526547IN
0x64A58568...bAc03517d
0 ETH0.0020144210.22028224
Submit Rate216710242025-01-21 6:18:2310 days ago1737440303IN
0x64A58568...bAc03517d
0 ETH0.001972298.84828956
Submit Rate216638642025-01-20 6:18:5911 days ago1737353939IN
0x64A58568...bAc03517d
0 ETH0.0037324931.23456246
Submit Rate216566772025-01-19 6:15:1112 days ago1737267311IN
0x64A58568...bAc03517d
0 ETH0.0021454412.67716056
Submit Rate216495302025-01-18 6:18:3513 days ago1737181115IN
0x64A58568...bAc03517d
0 ETH0.0030223824.30643217
Submit Rate216423942025-01-17 6:22:1114 days ago1737094931IN
0x64A58568...bAc03517d
0 ETH0.002066596.28426158
Submit Rate216352022025-01-16 6:17:3515 days ago1737008255IN
0x64A58568...bAc03517d
0 ETH0.002525974.81357243
Submit Rate216280282025-01-15 6:14:3516 days ago1736921675IN
0x64A58568...bAc03517d
0 ETH0.002274095.34648233
Submit Rate216208742025-01-14 6:16:5917 days ago1736835419IN
0x64A58568...bAc03517d
0 ETH0.002547444.77985214
Submit Rate216137382025-01-13 6:20:3518 days ago1736749235IN
0x64A58568...bAc03517d
0 ETH0.002574614.74001623
Submit Rate216065542025-01-12 6:15:4719 days ago1736662547IN
0x64A58568...bAc03517d
0 ETH0.002399775.04064591
Submit Rate215995592025-01-11 6:50:1120 days ago1736578211IN
0x64A58568...bAc03517d
0 ETH0.002186925.64108944
Submit Rate215923712025-01-10 6:44:5921 days ago1736491499IN
0x64A58568...bAc03517d
0 ETH0.002070336.25429057
Submit Rate215851722025-01-09 6:35:3522 days ago1736404535IN
0x64A58568...bAc03517d
0 ETH0.002083616.16196217
Submit Rate215779952025-01-08 6:34:4723 days ago1736318087IN
0x64A58568...bAc03517d
0 ETH0.001973257.62318167
Submit Rate215707612025-01-07 6:19:5924 days ago1736230799IN
0x64A58568...bAc03517d
0 ETH0.001973517.6039991
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RocketOvmPriceMessenger

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 5 : RocketOvmPriceMessenger.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;

import "@rocketpool/interface/RocketStorageInterface.sol";
import "@rocketpool/interface/network/RocketNetworkBalancesInterface.sol";
import "@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol";

import "./RocketOvmPriceOracle.sol";

/// @author Kane Wallmann (Rocket Pool)
/// @notice Retrieves the rETH exchange rate from Rocket Pool and submits it to the oracle contract on OVM
contract RocketOvmPriceMessenger {
    // Immutables
    ICrossDomainMessenger immutable ovmL1CrossDomainMessenger;
    RocketStorageInterface immutable rocketStorage;
    RocketOvmPriceOracle immutable rocketL2OvmPriceOracle;
    bytes32 immutable rocketNetworkBalancesKey;

    /// @notice The most recently submitted rate
    uint256 lastRate;

    constructor(RocketStorageInterface _rocketStorage, RocketOvmPriceOracle _rocketL2OvmPriceOracle, ICrossDomainMessenger _ovmL1CrossDomainMessenger) {
        rocketStorage = _rocketStorage;
        rocketL2OvmPriceOracle = _rocketL2OvmPriceOracle;
        ovmL1CrossDomainMessenger = _ovmL1CrossDomainMessenger;
        // Precompute storage key for RocketNetworkBalances address
        rocketNetworkBalancesKey = keccak256(abi.encodePacked("contract.address", "rocketNetworkBalances"));
    }

    /// @notice Returns whether the rate has changed since it was last submitted
    function rateStale() external view returns (bool) {
        return rate() != lastRate;
    }

    /// @notice Returns the calculated rETH exchange rate
    function rate() public view returns (uint256) {
        // Retrieve the inputs from RocketNetworkBalances and calculate the rate
        RocketNetworkBalancesInterface rocketNetworkBalances = RocketNetworkBalancesInterface(rocketStorage.getAddress(rocketNetworkBalancesKey));
        uint256 supply = rocketNetworkBalances.getTotalRETHSupply();
        if (supply == 0) {
            return 0;
        }
        return 1 ether * rocketNetworkBalances.getTotalETHBalance() / supply;
    }

    /// @notice Submits the current rETH exchange rate to the OVM cross domain messenger contract
    function submitRate() external {
        lastRate = rate();
        // Send the cross chain message
        ovmL1CrossDomainMessenger.sendMessage(
            address(rocketL2OvmPriceOracle),
            abi.encodeWithSelector(
                rocketL2OvmPriceOracle.updateRate.selector,
                lastRate
            ),
            500000
        );
    }
}

File 2 of 5 : RocketStorageInterface.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketStorageInterface {

    // Deploy status
    function getDeployedStatus() external view returns (bool);

    // Guardian
    function getGuardian() external view returns(address);
    function setGuardian(address _newAddress) external;
    function confirmGuardian() external;

    // Getters
    function getAddress(bytes32 _key) external view returns (address);
    function getUint(bytes32 _key) external view returns (uint);
    function getString(bytes32 _key) external view returns (string memory);
    function getBytes(bytes32 _key) external view returns (bytes memory);
    function getBool(bytes32 _key) external view returns (bool);
    function getInt(bytes32 _key) external view returns (int);
    function getBytes32(bytes32 _key) external view returns (bytes32);

    // Setters
    function setAddress(bytes32 _key, address _value) external;
    function setUint(bytes32 _key, uint _value) external;
    function setString(bytes32 _key, string calldata _value) external;
    function setBytes(bytes32 _key, bytes calldata _value) external;
    function setBool(bytes32 _key, bool _value) external;
    function setInt(bytes32 _key, int _value) external;
    function setBytes32(bytes32 _key, bytes32 _value) external;

    // Deleters
    function deleteAddress(bytes32 _key) external;
    function deleteUint(bytes32 _key) external;
    function deleteString(bytes32 _key) external;
    function deleteBytes(bytes32 _key) external;
    function deleteBool(bytes32 _key) external;
    function deleteInt(bytes32 _key) external;
    function deleteBytes32(bytes32 _key) external;

    // Arithmetic
    function addUint(bytes32 _key, uint256 _amount) external;
    function subUint(bytes32 _key, uint256 _amount) external;

    // Protected storage
    function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address);
    function setWithdrawalAddress(address _nodeAddress, address _newWithdrawalAddress, bool _confirm) external;
    function confirmWithdrawalAddress(address _nodeAddress) external;
}

File 3 of 5 : RocketNetworkBalancesInterface.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketNetworkBalancesInterface {
    function getBalancesBlock() external view returns (uint256);
    function getLatestReportableBlock() external view returns (uint256);
    function getTotalETHBalance() external view returns (uint256);
    function getStakingETHBalance() external view returns (uint256);
    function getTotalRETHSupply() external view returns (uint256);
    function getETHUtilizationRate() external view returns (uint256);
    function submitBalances(uint256 _block, uint256 _total, uint256 _staking, uint256 _rethSupply) external;
    function executeUpdateBalances(uint256 _block, uint256 _totalEth, uint256 _stakingEth, uint256 _rethSupply) external;
}

File 4 of 5 : ICrossDomainMessenger.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.9.0;

/**
 * @title ICrossDomainMessenger
 */
interface ICrossDomainMessenger {
    /**********
     * Events *
     **********/

    event SentMessage(
        address indexed target,
        address sender,
        bytes message,
        uint256 messageNonce,
        uint256 gasLimit
    );
    event RelayedMessage(bytes32 indexed msgHash);
    event FailedRelayedMessage(bytes32 indexed msgHash);

    /*************
     * Variables *
     *************/

    function xDomainMessageSender() external view returns (address);

    /********************
     * Public Functions *
     ********************/

    /**
     * Sends a cross domain message to the target messenger.
     * @param _target Target contract address.
     * @param _message Message to send to the target.
     * @param _gasLimit Gas limit for the provided message.
     */
    function sendMessage(
        address _target,
        bytes calldata _message,
        uint32 _gasLimit
    ) external;
}

File 5 of 5 : RocketOvmPriceOracle.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;

import "@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol";

/// @author Kane Wallmann (Rocket Pool)
/// @notice Receives updates from L1 on the canonical rETH exchange rate
contract RocketOvmPriceOracle {
    // Events
    event RateUpdated(uint256 rate);

    // Immutables
    ICrossDomainMessenger immutable ovmL2CrossDomainMessenger;

    /// @notice The rETH exchange rate in the form of how much ETH 1 rETH is worth
    uint256 public rate;

    /// @notice The timestamp of the block in which the rate was last updated
    uint256 public lastUpdated;

    /// @notice Set to the contract on L1 that has permission to update the rate
    address public owner;

    constructor(address _l2CrossDomainMessenger) {
        ovmL2CrossDomainMessenger = ICrossDomainMessenger(_l2CrossDomainMessenger);
        owner = msg.sender;
    }

    /// @notice Hands ownership to the L1 price messenger contract
    function setOwner(address _newOwner) external {
        require(msg.sender == owner, "Only owner");
        owner = _newOwner;
    }

    /// @notice Called by the messenger contract on L1 to update the exchange rate
    function updateRate(uint256 _newRate) external {
        // Only calls originating from L1 owner can update the rate
        require(
            msg.sender == address(ovmL2CrossDomainMessenger)
            && ovmL2CrossDomainMessenger.xDomainMessageSender() == owner,
            "Only owner"
        );
        // Set rate and last updated timestamp
        rate = _newRate;
        lastUpdated = block.timestamp;
        // Emit event
        emit RateUpdated(_newRate);
    }
}

Settings
{
  "remappings": [
    "@eth-optimism/=lib/optimism/packages/contracts/",
    "@rocketpool/=lib/rocketpool/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "fx-portal/=lib/fx-portal/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "optimism/=lib/optimism/",
    "rocketpool/=lib/rocketpool/",
    "v2-testnet-contracts/=lib/v2-testnet-contracts/",
    "src/=src/",
    "test/=test/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorage","type":"address"},{"internalType":"contract RocketOvmPriceOracle","name":"_rocketL2OvmPriceOracle","type":"address"},{"internalType":"contract ICrossDomainMessenger","name":"_ovmL1CrossDomainMessenger","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rateStale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"submitRate","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61010060405234801561001157600080fd5b506040516106d03803806106d0833981016040819052610030916100c6565b6001600160a01b0392831660a05290821660c05216608052604080516f636f6e74726163742e6164647265737360801b6020828101919091527f726f636b65744e6574776f726b42616c616e63657300000000000000000000006030830152825160258184030181526045909201909252805191012060e052610113565b6001600160a01b03811681146100c357600080fd5b50565b6000806000606084860312156100db57600080fd5b83516100e6816100ae565b60208501519093506100f7816100ae565b6040850151909250610108816100ae565b809150509250925092565b60805160a05160c05160e05161058661014a600039600060ab015260006103480152600060eb0152600061031b01526105866000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632c4e722e146100465780639c14b3a814610061578063ee0eb4a11461006b575b600080fd5b61004e610083565b6040519081526020015b60405180910390f35b61006961026f565b005b6100736103a9565b6040519015158152602001610058565b6040517f21f8a7210000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906321f8a72190602401602060405180830381865afa158015610132573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015691906103bc565b905060008173ffffffffffffffffffffffffffffffffffffffff1663c4c8d0ad6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c991906103f9565b9050806000036101dc5760009250505090565b808273ffffffffffffffffffffffffffffffffffffffff1663964d042c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024c91906103f9565b61025e90670de0b6b3a7640000610412565b6102689190610476565b9250505090565b610277610083565b6000819055604080516024808201939093528151808203909301835260440181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69ea177100000000000000000000000000000000000000000000000000000000179052517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691633dbb202b91610375917f0000000000000000000000000000000000000000000000000000000000000000916207a120906004016104b1565b600060405180830381600087803b15801561038f57600080fd5b505af11580156103a3573d6000803e3d6000fd5b50505050565b600080546103b5610083565b1415905090565b6000602082840312156103ce57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146103f257600080fd5b9392505050565b60006020828403121561040b57600080fd5b5051919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610471577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b6000826104ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b73ffffffffffffffffffffffffffffffffffffffff8416815260006020606081840152845180606085015260005b818110156104fb578681018301518582016080015282016104df565b8181111561050d576000608083870101525b5063ffffffff9490941660408401525050601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016016080019291505056fea2646970667358221220d09e858121f40cfbb257b37ef5629c6b47fff307c04bc4add57ef1aee2d12b4164736f6c634300080f00330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46000000000000000000000000658843bb859b7b85ceab5cf77167e3f0a78dfe7f000000000000000000000000866e82a600a1414e583f7f13623f1ac5d58b0afa

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c80632c4e722e146100465780639c14b3a814610061578063ee0eb4a11461006b575b600080fd5b61004e610083565b6040519081526020015b60405180910390f35b61006961026f565b005b6100736103a9565b6040519015158152602001610058565b6040517f21f8a7210000000000000000000000000000000000000000000000000000000081527f7630e125f1c009e5fc974f6dae77c6d5b1802979b36e6d7145463c21782af01e6004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa4616906321f8a72190602401602060405180830381865afa158015610132573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061015691906103bc565b905060008173ffffffffffffffffffffffffffffffffffffffff1663c4c8d0ad6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c991906103f9565b9050806000036101dc5760009250505090565b808273ffffffffffffffffffffffffffffffffffffffff1663964d042c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024c91906103f9565b61025e90670de0b6b3a7640000610412565b6102689190610476565b9250505090565b610277610083565b6000819055604080516024808201939093528151808203909301835260440181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69ea177100000000000000000000000000000000000000000000000000000000179052517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000866e82a600a1414e583f7f13623f1ac5d58b0afa1691633dbb202b91610375917f000000000000000000000000658843bb859b7b85ceab5cf77167e3f0a78dfe7f916207a120906004016104b1565b600060405180830381600087803b15801561038f57600080fd5b505af11580156103a3573d6000803e3d6000fd5b50505050565b600080546103b5610083565b1415905090565b6000602082840312156103ce57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146103f257600080fd5b9392505050565b60006020828403121561040b57600080fd5b5051919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610471577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b6000826104ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b73ffffffffffffffffffffffffffffffffffffffff8416815260006020606081840152845180606085015260005b818110156104fb578681018301518582016080015282016104df565b8181111561050d576000608083870101525b5063ffffffff9490941660408401525050601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016016080019291505056fea2646970667358221220d09e858121f40cfbb257b37ef5629c6b47fff307c04bc4add57ef1aee2d12b4164736f6c634300080f0033

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

0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46000000000000000000000000658843bb859b7b85ceab5cf77167e3f0a78dfe7f000000000000000000000000866e82a600a1414e583f7f13623f1ac5d58b0afa

-----Decoded View---------------
Arg [0] : _rocketStorage (address): 0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46
Arg [1] : _rocketL2OvmPriceOracle (address): 0x658843BB859B7b85cEAb5cF77167e3F0a78dFE7f
Arg [2] : _ovmL1CrossDomainMessenger (address): 0x866E82a600A1414e583f7F13623F1aC5d58b0Afa

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
Arg [1] : 000000000000000000000000658843bb859b7b85ceab5cf77167e3f0a78dfe7f
Arg [2] : 000000000000000000000000866e82a600a1414e583f7f13623f1ac5d58b0afa


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.