Overview
ETH Balance
ETH Value
$0.00Multichain Info
Latest 25 from a total of 35 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Remote Gas D... | 14830086 | 23 hrs ago | IN | 0 ETH | 0.00000274 | ||||
| Set Remote Gas D... | 13450653 | 16 days ago | IN | 0 ETH | 0.00000253 | ||||
| Set Remote Gas D... | 13400212 | 17 days ago | IN | 0 ETH | 0.00000141 | ||||
| Set Remote Gas D... | 13280532 | 18 days ago | IN | 0 ETH | 0.0000014 | ||||
| Set Remote Gas D... | 13020688 | 21 days ago | IN | 0 ETH | 0.0000026 | ||||
| Set Remote Gas D... | 12660804 | 26 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12657913 | 26 days ago | IN | 0 ETH | 0.00000259 | ||||
| Set Remote Gas D... | 12356615 | 29 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12356013 | 29 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12355681 | 29 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12355495 | 29 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12084824 | 32 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 12081722 | 32 days ago | IN | 0 ETH | 0.0000014 | ||||
| Set Remote Gas D... | 12069462 | 32 days ago | IN | 0 ETH | 0.00000269 | ||||
| Set Remote Gas D... | 10861325 | 46 days ago | IN | 0 ETH | 0.0000025 | ||||
| Set Remote Gas D... | 10680077 | 49 days ago | IN | 0 ETH | 0.00000251 | ||||
| Set Remote Gas D... | 10679451 | 49 days ago | IN | 0 ETH | 0.00000141 | ||||
| Set Remote Gas D... | 10584381 | 50 days ago | IN | 0 ETH | 0.00000252 | ||||
| Set Remote Gas D... | 10268340 | 53 days ago | IN | 0 ETH | 0.00000251 | ||||
| Set Remote Gas D... | 10171827 | 54 days ago | IN | 0 ETH | 0.00000138 | ||||
| Set Remote Gas D... | 9996096 | 56 days ago | IN | 0 ETH | 0.00000296 | ||||
| Set Remote Gas D... | 9995544 | 56 days ago | IN | 0 ETH | 0.00000153 | ||||
| Set Remote Gas D... | 6955587 | 92 days ago | IN | 0 ETH | 0.00000122 | ||||
| Set Remote Gas D... | 4878433 | 116 days ago | IN | 0 ETH | 0.00000129 | ||||
| Set Remote Gas D... | 4544630 | 120 days ago | IN | 0 ETH | 0.00000133 |
View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// 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;
}
}// 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);
}{
"evmVersion": "paris",
"libraries": {},
"optimizer": {
"enabled": true,
"runs": 999999
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
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"}]Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107658061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b366004610571565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f36600461059e565b61021f565b005b610134610261565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600681526020017f372e312e3130000000000000000000000000000000000000000000000000000081525081565b6040516101189190610613565b6100f36101bd366004610571565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610680565b610275565b61013461021a3660046106b6565b610331565b610227610342565b8060005b8181101561025b57610253848483818110610248576102486106ce565b9050606002016103c3565b60010161022b565b50505050565b610269610342565b61027360006104fc565b565b61027d610342565b73ffffffffffffffffffffffffffffffffffffffff8116610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61032e816104fc565b50565b610339610342565b61032e816103c3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031c565b60405180604001604052808260200160208101906103e191906106fd565b6fffffffffffffffffffffffffffffffff16815260200161040860608401604085016106fd565b6fffffffffffffffffffffffffffffffff1690526001600061042d6020850185610571565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000293169290921790915561048690820182610571565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104bd60408401602085016106fd565b6104cd60608501604086016106fd565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058357600080fd5b813563ffffffff8116811461059757600080fd5b9392505050565b600080602083850312156105b157600080fd5b823567ffffffffffffffff808211156105c957600080fd5b818501915085601f8301126105dd57600080fd5b8135818111156105ec57600080fd5b86602060608302850101111561060157600080fd5b60209290920196919550909350505050565b60006020808352835180602085015260005b8181101561064157858101830151858201604001528201610625565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461059757600080fd5b6000606082840312156106c857600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561070f57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461059757600080fdfea26469706673582212204efa10d9b461a7870eff8f7b9a0c9dda0918bbec96e88b191476b9fd51d9706f64736f6c63430008160033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c806393c448471161005b57806393c4484714610166578063b08e56d0146101af578063f2fde38b146101f9578063f3a1495f1461020c57600080fd5b806360fcef7c1461008d578063698faffc14610121578063715018a6146101365780638da5cb5b1461013e575b600080fd5b6100f361009b366004610571565b63ffffffff166000908152600160209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff808216808552700100000000000000000000000000000000909204169290910182905291565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b61013461012f36600461059e565b61021f565b005b610134610261565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101a26040518060400160405280600681526020017f372e312e3130000000000000000000000000000000000000000000000000000081525081565b6040516101189190610613565b6100f36101bd366004610571565b6001602052600090815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b610134610207366004610680565b610275565b61013461021a3660046106b6565b610331565b610227610342565b8060005b8181101561025b57610253848483818110610248576102486106ce565b9050606002016103c3565b60010161022b565b50505050565b610269610342565b61027360006104fc565b565b61027d610342565b73ffffffffffffffffffffffffffffffffffffffff8116610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61032e816104fc565b50565b610339610342565b61032e816103c3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031c565b60405180604001604052808260200160208101906103e191906106fd565b6fffffffffffffffffffffffffffffffff16815260200161040860608401604085016106fd565b6fffffffffffffffffffffffffffffffff1690526001600061042d6020850185610571565b63ffffffff1681526020808201929092526040016000208251928201516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000293169290921790915561048690820182610571565b63ffffffff167fb48c1cb713397fc0c0649596c221270fec0b3de3f85ccf6a734411a2fe57a6946104bd60408401602085016106fd565b6104cd60608501604086016106fd565b604080516fffffffffffffffffffffffffffffffff93841681529290911660208301520160405180910390a250565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561058357600080fd5b813563ffffffff8116811461059757600080fd5b9392505050565b600080602083850312156105b157600080fd5b823567ffffffffffffffff808211156105c957600080fd5b818501915085601f8301126105dd57600080fd5b8135818111156105ec57600080fd5b86602060608302850101111561060157600080fd5b60209290920196919550909350505050565b60006020808352835180602085015260005b8181101561064157858101830151858201604001528201610625565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561069257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461059757600080fd5b6000606082840312156106c857600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561070f57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461059757600080fdfea26469706673582212204efa10d9b461a7870eff8f7b9a0c9dda0918bbec96e88b191476b9fd51d9706f64736f6c63430008160033
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.