Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xe15531bE...8f613C444 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AaveOracle
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.10;import {AggregatorInterface} from '../dependencies/chainlink/AggregatorInterface.sol';import {Errors} from '../protocol/libraries/helpers/Errors.sol';import {IACLManager} from '../interfaces/IACLManager.sol';import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';import {IAaveOracle} from '../interfaces/IAaveOracle.sol';/*** @title AaveOracle* @author Aave* @notice Contract to get asset prices, manage price sources and update the fallback oracle* - Use of Chainlink Aggregators as first source of price* - If the returned price by a Chainlink aggregator is <= 0, the call is forwarded to a fallback oracle* - Owned by the Aave governance*/contract AaveOracle is IAaveOracle {IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;// Map of asset price sources (asset => priceSource)mapping(address => AggregatorInterface) private assetsSources;IPriceOracleGetter private _fallbackOracle;address public immutable override BASE_CURRENCY;
12345678910111213141516171819// SPDX-License-Identifier: MIT// Chainlink Contracts v0.8pragma solidity ^0.8.0;interface AggregatorInterface {function latestAnswer() external view returns (int256);function latestTimestamp() external view returns (uint256);function latestRound() external view returns (uint256);function getAnswer(uint256 roundId) external view returns (int256);function getTimestamp(uint256 roundId) external view returns (uint256);event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IACLManager* @author Aave* @notice Defines the basic interface for the ACL Manager*/interface IACLManager {/*** @notice Returns the contract address of the PoolAddressesProvider* @return The address of the PoolAddressesProvider*/function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);/*** @notice Returns the identifier of the PoolAdmin role* @return The id of the PoolAdmin role*/function POOL_ADMIN_ROLE() external view returns (bytes32);/*** @notice Returns the identifier of the EmergencyAdmin role* @return The id of the EmergencyAdmin role
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;import {IPriceOracleGetter} from './IPriceOracleGetter.sol';import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol';/*** @title IAaveOracle* @author Aave* @notice Defines the basic interface for the Aave Oracle*/interface IAaveOracle is IPriceOracleGetter {/*** @dev Emitted after the base currency is set* @param baseCurrency The base currency of used for price quotes* @param baseCurrencyUnit The unit of the base currency*/event BaseCurrencySet(address indexed baseCurrency, uint256 baseCurrencyUnit);/*** @dev Emitted after the price source of an asset is updated* @param asset The address of the asset* @param source The price source of the asset*/event AssetSourceUpdated(address indexed asset, address indexed source);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IPoolAddressesProvider* @author Aave* @notice Defines the basic interface for a Pool Addresses Provider.*/interface IPoolAddressesProvider {/*** @dev Emitted when the market identifier is updated.* @param oldMarketId The old id of the market* @param newMarketId The new id of the market*/event MarketIdSet(string indexed oldMarketId, string indexed newMarketId);/*** @dev Emitted when the pool is updated.* @param oldAddress The old address of the Pool* @param newAddress The new address of the Pool*/event PoolUpdated(address indexed oldAddress, address indexed newAddress);/*** @dev Emitted when the pool configurator is updated.* @param oldAddress The old address of the PoolConfigurator
1234567891011121314151617181920212223242526// SPDX-License-Identifier: AGPL-3.0pragma solidity ^0.8.0;/*** @title IPriceOracleGetter* @author Aave* @notice Interface for the Aave price oracle.*/interface IPriceOracleGetter {/*** @notice Returns the base currency address* @dev Address 0x0 is reserved for USD as base currency.* @return Returns the base currency address.*/function BASE_CURRENCY() external view returns (address);/*** @notice Returns the base currency unit* @dev 1 ether for ETH, 1e8 for USD.* @return Returns the base currency unit.*/function BASE_CURRENCY_UNIT() external view returns (uint256);/*** @notice Returns the asset price in the base currency* @param asset The address of the asset
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;/*** @title Errors library* @author Aave* @notice Defines the error messages emitted by the different contracts of the Aave protocol*/library Errors {string public constant CALLER_NOT_POOL_ADMIN = '1'; // 'The caller of the function is not a pool admin'string public constant CALLER_NOT_EMERGENCY_ADMIN = '2'; // 'The caller of the function is not an emergency admin'string public constant CALLER_NOT_POOL_OR_EMERGENCY_ADMIN = '3'; // 'The caller of the function is not a pool or emergency admin'string public constant CALLER_NOT_RISK_OR_POOL_ADMIN = '4'; // 'The caller of the function is not a risk or pool admin'string public constant CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN = '5'; // 'The caller of the function is not an asset listing or pool admin'string public constant CALLER_NOT_BRIDGE = '6'; // 'The caller of the function is not a bridge'string public constant ADDRESSES_PROVIDER_NOT_REGISTERED = '7'; // 'Pool addresses provider is not registered'string public constant INVALID_ADDRESSES_PROVIDER_ID = '8'; // 'Invalid id for the pool addresses provider'string public constant NOT_CONTRACT = '9'; // 'Address is not a contract'string public constant CALLER_NOT_POOL_CONFIGURATOR = '10'; // 'The caller of the function is not the pool configurator'string public constant CALLER_NOT_ATOKEN = '11'; // 'The caller of the function is not an AToken'string public constant INVALID_ADDRESSES_PROVIDER = '12'; // 'The address of the pool addresses provider is invalid'string public constant INVALID_FLASHLOAN_EXECUTOR_RETURN = '13'; // 'Invalid return value of the flashloan executor function'string public constant RESERVE_ALREADY_ADDED = '14'; // 'Reserve has already been added to reserve list'string public constant NO_MORE_RESERVES_ALLOWED = '15'; // 'Maximum amount of reserves in the pool reached'string public constant EMODE_CATEGORY_RESERVED = '16'; // 'Zero eMode category is reserved for volatile heterogeneous assets'string public constant INVALID_EMODE_CATEGORY_ASSIGNMENT = '17'; // 'Invalid eMode category assignment to asset'
12345678910111213141516171819202122232425{"evmVersion": "berlin","libraries": {},"metadata": {"bytecodeHash": "ipfs","useLiteralContent": true},"optimizer": {"enabled": true,"runs": 100000},"remappings": [],"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"provider","type":"address"},{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"address[]","name":"sources","type":"address[]"},{"internalType":"address","name":"fallbackOracle","type":"address"},{"internalType":"address","name":"baseCurrency","type":"address"},{"internalType":"uint256","name":"baseCurrencyUnit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"source","type":"address"}],"name":"AssetSourceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"baseCurrency","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseCurrencyUnit","type":"uint256"}],"name":"BaseCurrencySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fallbackOracle","type":"address"}],"name":"FallbackOracleUpdated","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_CURRENCY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"}],"name":"getAssetsPrices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getSourceOfAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"address[]","name":"sources","type":"address[]"}],"name":"setAssetSources","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackOracle","type":"address"}],"name":"setFallbackOracle","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a35760003560e01c806392bf2be011610076578063abfd53101161005b578063abfd5310146101ba578063b3596f07146101cd578063e19f4700146101e057600080fd5b806392bf2be0146101615780639d23d9f21461019a57600080fd5b80630542975c146100a8578063170aee73146100f95780636210308c1461010e5780638c89b64f1461012c575b600080fd5b6100cf7f0000000000000000000000001190bd0b5ed2a58b39adead5d3e92463e6e09d0881565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61010c610107366004610a33565b610207565b005b60015473ffffffffffffffffffffffffffffffffffffffff166100cf565b6101537f0000000000000000000000000000000000000000000000000000000005f5e10081565b6040519081526020016100f0565b6100cf61016f366004610a33565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152602081905260409020541690565b6101ad6101a8366004610a9c565b61021b565b6040516100f09190610ade565b61010c6101c8366004610b22565b6102d0565b6101536101db366004610a33565b61034b565b6100cf7f000000000000000000000000000000000000000000000000000000000000000081565b61020f61059f565b610218816107d0565b50565b606060008267ffffffffffffffff81111561023857610238610b8e565b604051908082528060200260200182016040528015610261578160200160208202803683370190505b50905060005b838110156102c85761029985858381811061028457610284610bbd565b90506020020160208101906101db9190610a33565b8282815181106102ab576102ab610bbd565b6020908102919091010152806102c081610bec565b915050610267565b509392505050565b6102d861059f565b6103458484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061083f92505050565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8082166000818152602081905260408120549092908116917f000000000000000000000000000000000000000000000000000000000000000090911614156103ca57507f0000000000000000000000000000000000000000000000000000000005f5e10092915050565b73ffffffffffffffffffffffffffffffffffffffff8116610480576001546040517fb3596f0700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529091169063b3596f0790602401602060405180830381865afa158015610455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104799190610c4c565b9392505050565b60008173ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f19190610c4c565b90506000811315610503579392505050565b6001546040517fb3596f0700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529091169063b3596f0790602401602060405180830381865afa158015610573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105979190610c4c565b949350505050565b60007f0000000000000000000000001190bd0b5ed2a58b39adead5d3e92463e6e09d0873ffffffffffffffffffffffffffffffffffffffff1663707cd7166040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106309190610c65565b6040517f13ee32e000000000000000000000000000000000000000000000000000000000815233600482015290915073ffffffffffffffffffffffffffffffffffffffff8216906313ee32e090602401602060405180830381865afa15801561069d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c19190610c82565b8061075557506040517f7be53ca100000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821690637be53ca190602401602060405180830381865afa158015610731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107559190610c82565b6040518060400160405280600181526020017f3500000000000000000000000000000000000000000000000000000000000000815250906107cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c39190610ca4565b60405180910390fd5b5050565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fce7a780d33665b1ea097af5f155e3821b809ecbaa839d3b33aa83ba28168cefb90600090a250565b80518251146040518060400160405280600281526020017f3736000000000000000000000000000000000000000000000000000000000000815250906108b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c39190610ca4565b5060005b8251811015610a0c578181815181106108d1576108d1610bbd565b60200260200101516000808584815181106108ee576108ee610bbd565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081818151811061098057610980610bbd565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168382815181106109b0576109b0610bbd565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f22c5b7b2d8561d39f7f210b6b326a1aa69f15311163082308ac4877db6339dc160405160405180910390a380610a0481610bec565b9150506108b6565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461021857600080fd5b600060208284031215610a4557600080fd5b813561047981610a11565b60008083601f840112610a6257600080fd5b50813567ffffffffffffffff811115610a7a57600080fd5b6020830191508360208260051b8501011115610a9557600080fd5b9250929050565b60008060208385031215610aaf57600080fd5b823567ffffffffffffffff811115610ac657600080fd5b610ad285828601610a50565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610b1657835183529284019291840191600101610afa565b50909695505050505050565b60008060008060408587031215610b3857600080fd5b843567ffffffffffffffff80821115610b5057600080fd5b610b5c88838901610a50565b90965094506020870135915080821115610b7557600080fd5b50610b8287828801610a50565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610c45577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b600060208284031215610c5e57600080fd5b5051919050565b600060208284031215610c7757600080fd5b815161047981610a11565b600060208284031215610c9457600080fd5b8151801515811461047957600080fd5b600060208083528351808285015260005b81811015610cd157858101830151858201604001528201610cb5565b81811115610ce3576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea264697066735822122048c736a082ea9bf465eef1199ef1c1b44032c405582ae7bd11de321f554d06b064736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.