ETH Price: $4,137.85 (-0.99%)

Contract

0xA9Adb480F10547f10202173a49b7F52116304476

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Set Remote Gas D...148300862025-10-27 13:48:1723 hrs ago1761572897IN
0xA9Adb480...116304476
0 ETH0.000002740.00100026
Set Remote Gas D...134506532025-10-11 14:37:4416 days ago1760193464IN
0xA9Adb480...116304476
0 ETH0.000002530.00100026
Set Remote Gas D...134002122025-10-11 0:37:0317 days ago1760143023IN
0xA9Adb480...116304476
0 ETH0.000001410.00100026
Set Remote Gas D...132805322025-10-09 15:22:2318 days ago1760023343IN
0xA9Adb480...116304476
0 ETH0.00000140.00100026
Set Remote Gas D...130206882025-10-06 15:11:3921 days ago1759763499IN
0xA9Adb480...116304476
0 ETH0.00000260.00100026
Set Remote Gas D...126608042025-10-02 11:13:3526 days ago1759403615IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...126579132025-10-02 10:25:2426 days ago1759400724IN
0xA9Adb480...116304476
0 ETH0.000002590.00100026
Set Remote Gas D...123566152025-09-28 22:43:4629 days ago1759099426IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...123560132025-09-28 22:33:4429 days ago1759098824IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...123556812025-09-28 22:28:1229 days ago1759098492IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...123554952025-09-28 22:25:0629 days ago1759098306IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...120848242025-09-25 19:13:5532 days ago1758827635IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...120817222025-09-25 18:22:1332 days ago1758824533IN
0xA9Adb480...116304476
0 ETH0.00000140.00100026
Set Remote Gas D...120694622025-09-25 14:57:5332 days ago1758812273IN
0xA9Adb480...116304476
0 ETH0.000002690.00100026
Set Remote Gas D...108613252025-09-11 15:22:1646 days ago1757604136IN
0xA9Adb480...116304476
0 ETH0.00000250.00100026
Set Remote Gas D...106800772025-09-09 13:01:2849 days ago1757422888IN
0xA9Adb480...116304476
0 ETH0.000002510.00100026
Set Remote Gas D...106794512025-09-09 12:51:0249 days ago1757422262IN
0xA9Adb480...116304476
0 ETH0.000001410.00100026
Set Remote Gas D...105843812025-09-08 10:26:3250 days ago1757327192IN
0xA9Adb480...116304476
0 ETH0.000002520.00100026
Set Remote Gas D...102683402025-09-04 18:39:1153 days ago1757011151IN
0xA9Adb480...116304476
0 ETH0.000002510.00100026
Set Remote Gas D...101718272025-09-03 15:50:3854 days ago1756914638IN
0xA9Adb480...116304476
0 ETH0.000001380.00100026
Set Remote Gas D...99960962025-09-01 15:01:4756 days ago1756738907IN
0xA9Adb480...116304476
0 ETH0.000002960.00100026
Set Remote Gas D...99955442025-09-01 14:52:3556 days ago1756738355IN
0xA9Adb480...116304476
0 ETH0.000001530.00100026
Set Remote Gas D...69555872025-07-28 10:26:3892 days ago1753698398IN
0xA9Adb480...116304476
0 ETH0.000001220.00100034
Set Remote Gas D...48784332025-07-04 9:27:24116 days ago1751621244IN
0xA9Adb480...116304476
0 ETH0.000001290.0010108
Set Remote Gas D...45446302025-06-30 12:44:01120 days ago1751287441IN
0xA9Adb480...116304476
0 ETH0.000001330.00100025
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.22+commit.4fc1097e

Optimization Enabled:
Yes with 999999 runs

Other Settings:
paris EvmVersion
// 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
// 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;
    }
}

File 4 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 = "7.1.10";
}

// 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);
}

Settings
{
  "evmVersion": "paris",
  "libraries": {},
  "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"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107658061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b366004610571565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f36600461059e565b61021f565b005b610134610261565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600681526020017f372e312e3130000000000000000000000000000000000000000000000000000081525081565b6040516101189190610613565b6100f36101bd366004610571565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610680565b610275565b61013461021a3660046106b6565b610331565b610227610342565b8060005b8181101561025b57610253848483818110610248576102486106ce565b9050606002016103c3565b60010161022b565b50505050565b610269610342565b61027360006104fc565b565b61027d610342565b73ffffffffffffffffffffffffffffffffffffffff8116610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61032e816104fc565b50565b610339610342565b61032e816103c3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031c565b60405180604001604052808260200160208101906103e191906106fd565b6fffffffffffffffffffffffffffffffff16815260200161040860608401604085016106fd565b6fffffffffffffffffffffffffffffffff1690526001600061042d6020850185610571565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000293169290921790915561048690820182610571565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104bd60408401602085016106fd565b6104cd60608501604086016106fd565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058357600080fd5b813563ffffffff8116811461059757600080fd5b9392505050565b600080602083850312156105b157600080fd5b823567ffffffffffffffff808211156105c957600080fd5b818501915085601f8301126105dd57600080fd5b8135818111156105ec57600080fd5b86602060608302850101111561060157600080fd5b60209290920196919550909350505050565b60006020808352835180602085015260005b8181101561064157858101830151858201604001528201610625565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461059757600080fd5b6000606082840312156106c857600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561070f57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461059757600080fdfea26469706673582212204efa10d9b461a7870eff8f7b9a0c9dda0918bbec96e88b191476b9fd51d9706f64736f6c63430008160033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b366004610571565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f36600461059e565b61021f565b005b610134610261565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600681526020017f372e312e3130000000000000000000000000000000000000000000000000000081525081565b6040516101189190610613565b6100f36101bd366004610571565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610680565b610275565b61013461021a3660046106b6565b610331565b610227610342565b8060005b8181101561025b57610253848483818110610248576102486106ce565b9050606002016103c3565b60010161022b565b50505050565b610269610342565b61027360006104fc565b565b61027d610342565b73ffffffffffffffffffffffffffffffffffffffff8116610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61032e816104fc565b50565b610339610342565b61032e816103c3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031c565b60405180604001604052808260200160208101906103e191906106fd565b6fffffffffffffffffffffffffffffffff16815260200161040860608401604085016106fd565b6fffffffffffffffffffffffffffffffff1690526001600061042d6020850185610571565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000293169290921790915561048690820182610571565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104bd60408401602085016106fd565b6104cd60608501604086016106fd565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058357600080fd5b813563ffffffff8116811461059757600080fd5b9392505050565b600080602083850312156105b157600080fd5b823567ffffffffffffffff808211156105c957600080fd5b818501915085601f8301126105dd57600080fd5b8135818111156105ec57600080fd5b86602060608302850101111561060157600080fd5b60209290920196919550909350505050565b60006020808352835180602085015260005b8181101561064157858101830151858201604001528201610625565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461059757600080fd5b6000606082840312156106c857600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561070f57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461059757600080fdfea26469706673582212204efa10d9b461a7870eff8f7b9a0c9dda0918bbec96e88b191476b9fd51d9706f64736f6c63430008160033

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