S Price: $0.070769 (-0.69%)
Gas: 55 Gwei

Contract

0x1c6f404800bA49Ed581af734eA0d25c0c7d017B2

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set Remote Gas D...603231762026-01-13 20:57:0910 days ago1768337829IN
Hyperlane: Storage Gas Oracle
0 S0.06016750
Set Remote Gas D...598408572026-01-07 16:22:4516 days ago1767802965IN
Hyperlane: Storage Gas Oracle
0 S0.001634950
Set Remote Gas D...597742742026-01-06 19:49:3017 days ago1767728970IN
Hyperlane: Storage Gas Oracle
0 S0.001634350
Set Remote Gas D...597741082026-01-06 19:45:3417 days ago1767728734IN
Hyperlane: Storage Gas Oracle
0 S0.001634950
Set Remote Gas D...595904172026-01-04 15:00:2719 days ago1767538827IN
Hyperlane: Storage Gas Oracle
0 S0.0304766550
Set Remote Gas D...595904132026-01-04 15:00:2319 days ago1767538823IN
Hyperlane: Storage Gas Oracle
0 S0.0326249550
Set Remote Gas D...594414792026-01-02 15:29:5721 days ago1767367797IN
Hyperlane: Storage Gas Oracle
0 S0.060188750
Set Remote Gas D...580967982025-12-16 19:11:4638 days ago1765912306IN
Hyperlane: Storage Gas Oracle
0 S0.062307650
Set Remote Gas D...577760942025-12-12 15:30:3842 days ago1765553438IN
Hyperlane: Storage Gas Oracle
0 S0.0774041585.38227465
Set Remote Gas D...571636442025-12-04 16:37:0750 days ago1764866227IN
Hyperlane: Storage Gas Oracle
0 S0.065333950
Set Remote Gas D...555871312025-11-17 18:06:4867 days ago1763402808IN
Hyperlane: Storage Gas Oracle
0 S0.0436304550
Set Remote Gas D...536647982025-11-04 23:18:1380 days ago1762298293IN
Hyperlane: Storage Gas Oracle
0 S0.0777241665.9829057
Set Remote Gas D...526317522025-10-30 14:36:0785 days ago1761834967IN
Hyperlane: Storage Gas Oracle
0 S0.059740950
Set Remote Gas D...523578742025-10-29 4:46:3787 days ago1761713197IN
Hyperlane: Storage Gas Oracle
0 S0.001633750
Set Remote Gas D...520425372025-10-27 13:48:0588 days ago1761572885IN
Hyperlane: Storage Gas Oracle
0 S0.0597427550
Set Remote Gas D...501978722025-10-11 14:37:24104 days ago1760193444IN
Hyperlane: Storage Gas Oracle
0 S0.059740350
Set Remote Gas D...500901112025-10-11 0:37:09105 days ago1760143029IN
Hyperlane: Storage Gas Oracle
0 S0.0023104470.63415185
Set Remote Gas D...499101082025-10-09 15:22:08106 days ago1760023328IN
Hyperlane: Storage Gas Oracle
0 S0.0030604661.23253333
Set Remote Gas D...495343342025-10-06 15:11:22109 days ago1759763482IN
Hyperlane: Storage Gas Oracle
0 S0.0368162550
Set Remote Gas D...490874602025-10-02 11:13:19114 days ago1759403599IN
Hyperlane: Storage Gas Oracle
0 S0.001633150
Set Remote Gas D...490836342025-10-02 10:22:28114 days ago1759400548IN
Hyperlane: Storage Gas Oracle
0 S0.063161850
Set Remote Gas D...486380412025-09-28 22:43:33117 days ago1759099413IN
Hyperlane: Storage Gas Oracle
0 S0.0017929354.89358974
Set Remote Gas D...486373852025-09-28 22:33:31117 days ago1759098811IN
Hyperlane: Storage Gas Oracle
0 S0.001633750.00001111
Set Remote Gas D...486369732025-09-28 22:27:57117 days ago1759098477IN
Hyperlane: Storage Gas Oracle
0 S0.001633750
Set Remote Gas D...486367742025-09-28 22:24:51117 days ago1759098291IN
Hyperlane: Storage Gas Oracle
0 S0.001633750
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StorageGasOracle

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;

// ============ Internal Imports ============
import {IGasOracle} from "../../interfaces/IGasOracle.sol";
import {PackageVersioned} from "../../PackageVersioned.sol";

// ============ External Imports ============
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @notice A gas oracle that uses data stored within the contract.
 * @dev This contract is intended to be owned by an address that will
 * update the stored remote gas data.
 */
contract StorageGasOracle is IGasOracle, Ownable, PackageVersioned {
    // ============ Public Storage ============

    /// @notice Keyed by remote domain, gas data on that remote domain.
    mapping(uint32 => IGasOracle.RemoteGasData) public remoteGasData;

    // ============ Events ============

    /**
     * @notice Emitted when an entry in `remoteGasData` is set.
     * @param remoteDomain The remote domain in which the gas data was set for.
     * @param tokenExchangeRate The exchange rate of the remote native token quoted in the local native token.
     * @param gasPrice The gas price on the remote chain.
     */
    event RemoteGasDataSet(
        uint32 indexed remoteDomain,
        uint128 tokenExchangeRate,
        uint128 gasPrice
    );

    struct RemoteGasDataConfig {
        uint32 remoteDomain;
        uint128 tokenExchangeRate;
        uint128 gasPrice;
    }

    // ============ External Functions ============

    /**
     * @notice Returns the stored `remoteGasData` for the `_destinationDomain`.
     * @param _destinationDomain The destination domain.
     * @return tokenExchangeRate The exchange rate of the remote native token quoted in the local native token.
     * @return gasPrice The gas price on the remote chain.
     */
    function getExchangeRateAndGasPrice(
        uint32 _destinationDomain
    )
        external
        view
        override
        returns (uint128 tokenExchangeRate, uint128 gasPrice)
    {
        // Intentionally allow unset / zero values
        IGasOracle.RemoteGasData memory _data = remoteGasData[
            _destinationDomain
        ];
        return (_data.tokenExchangeRate, _data.gasPrice);
    }

    /**
     * @notice Sets the remote gas data for many remotes at a time.
     * @param _configs The configs to use when setting the remote gas data.
     */
    function setRemoteGasDataConfigs(
        RemoteGasDataConfig[] calldata _configs
    ) external onlyOwner {
        uint256 _len = _configs.length;
        for (uint256 i = 0; i < _len; i++) {
            _setRemoteGasData(_configs[i]);
        }
    }

    /**
     * @notice Sets the remote gas data using the values in `_config`.
     * @param _config The config to use when setting the remote gas data.
     */
    function setRemoteGasData(
        RemoteGasDataConfig calldata _config
    ) external onlyOwner {
        _setRemoteGasData(_config);
    }

    // ============ Internal functions ============

    /**
     * @notice Sets the remote gas data using the values in `_config`.
     * @param _config The config to use when setting the remote gas data.
     */
    function _setRemoteGasData(RemoteGasDataConfig calldata _config) internal {
        remoteGasData[_config.remoteDomain] = IGasOracle.RemoteGasData({
            tokenExchangeRate: _config.tokenExchangeRate,
            gasPrice: _config.gasPrice
        });

        emit RemoteGasDataSet(
            _config.remoteDomain,
            _config.tokenExchangeRate,
            _config.gasPrice
        );
    }
}

// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;

interface IGasOracle {
    struct RemoteGasData {
        // The exchange rate of the remote native token quoted in the local native token.
        // Scaled with 10 decimals, i.e. 1e10 is "one".
        uint128 tokenExchangeRate;
        uint128 gasPrice;
    }

    function getExchangeRateAndGasPrice(
        uint32 _destinationDomain
    ) external view returns (uint128 tokenExchangeRate, uint128 gasPrice);
}

File 3 of 5 : PackageVersioned.sol
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;

/**
 * @title PackageVersioned
 * @notice Package version getter for contracts
 **/
abstract contract PackageVersioned {
    // GENERATED CODE - DO NOT EDIT
    string public constant PACKAGE_VERSION = "5.8.3";
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"remoteDomain","type":"uint32"},{"indexed":false,"internalType":"uint128","name":"tokenExchangeRate","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"gasPrice","type":"uint128"}],"name":"RemoteGasDataSet","type":"event"},{"inputs":[],"name":"PACKAGE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_destinationDomain","type":"uint32"}],"name":"getExchangeRateAndGasPrice","outputs":[{"internalType":"uint128","name":"tokenExchangeRate","type":"uint128"},{"internalType":"uint128","name":"gasPrice","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"remoteGasData","outputs":[{"internalType":"uint128","name":"tokenExchangeRate","type":"uint128"},{"internalType":"uint128","name":"gasPrice","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"remoteDomain","type":"uint32"},{"internalType":"uint128","name":"tokenExchangeRate","type":"uint128"},{"internalType":"uint128","name":"gasPrice","type":"uint128"}],"internalType":"struct StorageGasOracle.RemoteGasDataConfig","name":"_config","type":"tuple"}],"name":"setRemoteGasData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"remoteDomain","type":"uint32"},{"internalType":"uint128","name":"tokenExchangeRate","type":"uint128"},{"internalType":"uint128","name":"gasPrice","type":"uint128"}],"internalType":"struct StorageGasOracle.RemoteGasDataConfig[]","name":"_configs","type":"tuple[]"}],"name":"setRemoteGasDataConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107cd8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b36600461057b565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f3660046105a8565b61021f565b005b61013461026b565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600581526020017f352e382e3300000000000000000000000000000000000000000000000000000081525081565b604051610118919061061d565b6100f36101bd36600461057b565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610689565b61027f565b61013461021a3660046106bf565b61033b565b61022761034c565b8060005b8181101561026557610253848483818110610248576102486106d7565b9050606002016103cd565b8061025d81610706565b91505061022b565b50505050565b61027361034c565b61027d6000610506565b565b61028761034c565b73ffffffffffffffffffffffffffffffffffffffff811661032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61033881610506565b50565b61034361034c565b610338816103cd565b60005473ffffffffffffffffffffffffffffffffffffffff16331461027d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610326565b60405180604001604052808260200160208101906103eb9190610765565b6fffffffffffffffffffffffffffffffff1681526020016104126060840160408501610765565b6fffffffffffffffffffffffffffffffff16905260016000610437602085018561057b565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000029316929092179091556104909082018261057b565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104c76040840160208501610765565b6104d76060850160408601610765565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058d57600080fd5b813563ffffffff811681146105a157600080fd5b9392505050565b600080602083850312156105bb57600080fd5b823567ffffffffffffffff808211156105d357600080fd5b818501915085601f8301126105e757600080fd5b8135818111156105f657600080fd5b86602060608302850101111561060b57600080fd5b60209290920196919550909350505050565b600060208083528351808285015260005b8181101561064a5785810183015185820160400152820161062e565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069b57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105a157600080fd5b6000606082840312156106d157600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361075e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60006020828403121561077757600080fd5b81356fffffffffffffffffffffffffffffffff811681146105a157600080fdfea26469706673582212207fbd9eeb6805eeee715f10eab8a3245bd81e124ed0fb170bb75e24a8637afc5164736f6c63430008130033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b36600461057b565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f3660046105a8565b61021f565b005b61013461026b565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600581526020017f352e382e3300000000000000000000000000000000000000000000000000000081525081565b604051610118919061061d565b6100f36101bd36600461057b565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610689565b61027f565b61013461021a3660046106bf565b61033b565b61022761034c565b8060005b8181101561026557610253848483818110610248576102486106d7565b9050606002016103cd565b8061025d81610706565b91505061022b565b50505050565b61027361034c565b61027d6000610506565b565b61028761034c565b73ffffffffffffffffffffffffffffffffffffffff811661032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61033881610506565b50565b61034361034c565b610338816103cd565b60005473ffffffffffffffffffffffffffffffffffffffff16331461027d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610326565b60405180604001604052808260200160208101906103eb9190610765565b6fffffffffffffffffffffffffffffffff1681526020016104126060840160408501610765565b6fffffffffffffffffffffffffffffffff16905260016000610437602085018561057b565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000029316929092179091556104909082018261057b565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104c76040840160208501610765565b6104d76060850160408601610765565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058d57600080fd5b813563ffffffff811681146105a157600080fd5b9392505050565b600080602083850312156105bb57600080fd5b823567ffffffffffffffff808211156105d357600080fd5b818501915085601f8301126105e757600080fd5b8135818111156105f657600080fd5b86602060608302850101111561060b57600080fd5b60209290920196919550909350505050565b600060208083528351808285015260005b8181101561064a5785810183015185820160400152820161062e565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069b57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105a157600080fd5b6000606082840312156106d157600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361075e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60006020828403121561077757600080fd5b81356fffffffffffffffffffffffffffffffff811681146105a157600080fdfea26469706673582212207fbd9eeb6805eeee715f10eab8a3245bd81e124ed0fb170bb75e24a8637afc5164736f6c63430008130033

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.