ETH Price: $2,659.91 (+0.65%)

Contract

0x60a50662A240908c3B0d5fc25E4E21e4930AE91A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...195296732024-03-28 2:34:59319 days ago1711593299IN
0x60a50662...4930AE91A
0 ETH0.0008083428.2174631
Update Oracle Fo...190836332024-01-25 12:29:35382 days ago1706185775IN
0x60a50662...4930AE91A
0 ETH0.0009479730.69781345
Update Oracle Fo...187809722023-12-14 1:00:11424 days ago1702515611IN
0x60a50662...4930AE91A
0 ETH0.0021497844.80482689
Update Oracle Fo...187809652023-12-14 0:58:47424 days ago1702515527IN
0x60a50662...4930AE91A
0 ETH0.001946540.56817017
Transfer Ownersh...182775962023-10-04 13:56:47495 days ago1696427807IN
0x60a50662...4930AE91A
0 ETH0.000283849.9083174
Update Oracle Fo...182621922023-10-02 10:16:47497 days ago1696241807IN
0x60a50662...4930AE91A
0 ETH0.000417468.70065944
Update Oracle Fo...182621822023-10-02 10:14:47497 days ago1696241687IN
0x60a50662...4930AE91A
0 ETH0.000400398.34491894
Update Oracle Fo...182621792023-10-02 10:14:11497 days ago1696241651IN
0x60a50662...4930AE91A
0 ETH0.000423748.83162077
Update Oracle Fo...182621762023-10-02 10:13:35497 days ago1696241615IN
0x60a50662...4930AE91A
0 ETH0.000441089.19294154
Update Oracle Fo...182621732023-10-02 10:12:59497 days ago1696241579IN
0x60a50662...4930AE91A
0 ETH0.000466989.73272631

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218168412025-02-10 14:53:352 hrs ago1739199215
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218162592025-02-10 12:56:234 hrs ago1739192183
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218136092025-02-10 4:03:5913 hrs ago1739160239
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218131722025-02-10 2:36:2314 hrs ago1739154983
0x60a50662...4930AE91A
0 ETH
218115552025-02-09 21:10:4720 hrs ago1739135447
0x60a50662...4930AE91A
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PriceOracleAggregator

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : PriceOracleAggregator.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import '../interfaces/IOracle.sol';
import '../interfaces/IPriceOracleAggregator.sol';

contract PriceOracleAggregator is IPriceOracleAggregator, Ownable {
    /// @notice token to the oracle address
    mapping(address => IOracle) public assetToOracle;

    constructor() Ownable() {}

    /// @notice adds oracle for an asset e.g. ETH
    /// @param _asset the oracle for the asset
    /// @param _oracle the oracle address
    function updateOracleForAsset(
        address _asset,
        IOracle _oracle
    ) external override onlyOwner {
        require(address(_oracle) != address(0), 'INVALID_ORACLE');
        assetToOracle[_asset] = _oracle;
        emit UpdateOracle(_asset, _oracle);
    }

    /// @notice returns price of token in USD
    /// @param _token view price of token
    function viewPriceInUSD(
        address _token
    ) external view override returns (uint256) {
        require(address(assetToOracle[_token]) != address(0), 'INVALID_ORACLE');
        return assetToOracle[_token].viewPriceInUSD();
    }
}

File 2 of 6 : Ownable.sol
// 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);
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 4 of 6 : Context.sol
// 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 5 of 6 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IOracle {
    function viewPriceInUSD() external view returns (uint256);
}

File 6 of 6 : IPriceOracleAggregator.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import {IOracle} from './IOracle.sol';

interface IPriceOracleAggregator {
    event UpdateOracle(address token, IOracle oracle);

    function updateOracleForAsset(address _asset, IOracle _oracle) external;

    function viewPriceInUSD(address _token) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"contract IOracle","name":"oracle","type":"address"}],"name":"UpdateOracle","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetToOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"contract IOracle","name":"_oracle","type":"address"}],"name":"updateOracleForAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"viewPriceInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104a08061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80632e00d245146100675780635df52114146100ad578063715018a6146100c25780638da5cb5b146100ca578063eb9d14a9146100db578063f2fde38b146100fc575b600080fd5b6100906100753660046103f4565b6001602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c06100bb366004610418565b61010f565b005b6100c06101ce565b6000546001600160a01b0316610090565b6100ee6100e93660046103f4565b6101e2565b6040519081526020016100a4565b6100c061010a3660046103f4565b6102bc565b610117610335565b6001600160a01b0381166101635760405162461bcd60e51b815260206004820152600e60248201526d494e56414c49445f4f5241434c4560901b60448201526064015b60405180910390fd5b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fb1d1442dba579887e297ac433e5716c847abf2dc052ee9de4869b7b1b8f6206d910160405180910390a15050565b6101d6610335565b6101e0600061038f565b565b6001600160a01b0381811660009081526001602052604081205490911661023c5760405162461bcd60e51b815260206004820152600e60248201526d494e56414c49445f4f5241434c4560901b604482015260640161015a565b6001600160a01b0380831660009081526001602090815260409182902054825163f55fa17f60e01b8152925193169263f55fa17f9260048082019392918290030181865afa158015610292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b69190610451565b92915050565b6102c4610335565b6001600160a01b0381166103295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161015a565b6103328161038f565b50565b6000546001600160a01b031633146101e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461033257600080fd5b60006020828403121561040657600080fd5b8135610411816103df565b9392505050565b6000806040838503121561042b57600080fd5b8235610436816103df565b91506020830135610446816103df565b809150509250929050565b60006020828403121561046357600080fd5b505191905056fea264697066735822122001e73b9ba6ff5370d6a56b8719ed7a5b41604fbe92af3aa7c256ba1a5879783a64736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80632e00d245146100675780635df52114146100ad578063715018a6146100c25780638da5cb5b146100ca578063eb9d14a9146100db578063f2fde38b146100fc575b600080fd5b6100906100753660046103f4565b6001602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c06100bb366004610418565b61010f565b005b6100c06101ce565b6000546001600160a01b0316610090565b6100ee6100e93660046103f4565b6101e2565b6040519081526020016100a4565b6100c061010a3660046103f4565b6102bc565b610117610335565b6001600160a01b0381166101635760405162461bcd60e51b815260206004820152600e60248201526d494e56414c49445f4f5241434c4560901b60448201526064015b60405180910390fd5b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fb1d1442dba579887e297ac433e5716c847abf2dc052ee9de4869b7b1b8f6206d910160405180910390a15050565b6101d6610335565b6101e0600061038f565b565b6001600160a01b0381811660009081526001602052604081205490911661023c5760405162461bcd60e51b815260206004820152600e60248201526d494e56414c49445f4f5241434c4560901b604482015260640161015a565b6001600160a01b0380831660009081526001602090815260409182902054825163f55fa17f60e01b8152925193169263f55fa17f9260048082019392918290030181865afa158015610292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b69190610451565b92915050565b6102c4610335565b6001600160a01b0381166103295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161015a565b6103328161038f565b50565b6000546001600160a01b031633146101e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461033257600080fd5b60006020828403121561040657600080fd5b8135610411816103df565b9392505050565b6000806040838503121561042b57600080fd5b8235610436816103df565b91506020830135610446816103df565b809150509250929050565b60006020828403121561046357600080fd5b505191905056fea264697066735822122001e73b9ba6ff5370d6a56b8719ed7a5b41604fbe92af3aa7c256ba1a5879783a64736f6c63430008110033

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.