Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Asset Source... | 10267305 | 18 hrs ago | IN | 0 S | 0.00330685 | ||||
Set Asset Source... | 7516980 | 14 days ago | IN | 0 S | 0.00330685 | ||||
Set Asset Source... | 6777367 | 20 days ago | IN | 0 S | 0.00330565 | ||||
Set Asset Source... | 6777320 | 20 days ago | IN | 0 S | 0.00330625 | ||||
Set Asset Source... | 6777280 | 20 days ago | IN | 0 S | 0.00330685 | ||||
Set Asset Source... | 6777234 | 20 days ago | IN | 0 S | 0.00330685 |
Loading...
Loading
Contract Name:
AaveFallbackOracle
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.10; import {IChainlinkOracle} from "IChainlinkOracle.sol"; import {Errors} from "Errors.sol"; import {IACLManager} from "IACLManager.sol"; import {IPoolAddressesProvider} from "IPoolAddressesProvider.sol"; import {IPriceOracleGetter} from "IPriceOracleGetter.sol"; import {IAaveOracle} from "IAaveOracle.sol"; import {IPyth, Price} from "IPyth.sol"; /** * @title AaveOracle * @author Aave * @notice Contract to get asset prices, supportts chainlink or Pyth Oracle will try to query chainlink first, and fallback to pyth in case chainlink is not avalaible */ contract AaveFallbackOracle { IPoolAddressesProvider public immutable ADDRESSES_PROVIDER; // Map of asset price sources (asset => priceSource) on chainlink mapping(address => address) public chainlinkAssetsSources; mapping(address => bytes32) public pythAssetsSources; address public pythOracleAddress; uint8 private constant STANDARD_DECIMALS = 8; int32 private constant TARGET_EXPO = -8; event AssetSourcesUpdated(address indexed asset, address chainlinkSource, bytes32 pythSource); event PythOracleAddressUpdated(address oldAddress, address newAddress); /** * @dev Only asset listing or pool admin can call functions marked by this modifier. */ modifier onlyAssetListingOrPoolAdmins() { _onlyAssetListingOrPoolAdmins(); _; } /** * @notice Constructor * @param provider The address of the new PoolAddressesProvider */ constructor( IPoolAddressesProvider provider, address _pythOracleAddress ) { ADDRESSES_PROVIDER = provider; pythOracleAddress = _pythOracleAddress; } /** * @notice Sets the price feed sources for a list of assets * @param assets The addresses of the assets * @param chainlinkSources The addresses of the Chainlink price feeds * @param pythFeedId The Pyth price feed IDs */ function setAssetSources( address[] calldata assets, address[] calldata chainlinkSources, bytes32[] calldata pythFeedId ) external onlyAssetListingOrPoolAdmins { _setAssetsSources(assets, chainlinkSources, pythFeedId); } /** * @notice Internal function to set the sources for each asset * @param assets The addresses of the assets * @param chainlinkSources The address of the chainlink source of each asset * @param pythFeedId the feed id of pyth for each asset */ function _setAssetsSources(address[] memory assets, address[] memory chainlinkSources, bytes32[] memory pythFeedId) internal { require(assets.length == chainlinkSources.length, Errors.INCONSISTENT_PARAMS_LENGTH); require(assets.length == pythFeedId.length, Errors.INCONSISTENT_PARAMS_LENGTH); for (uint256 i = 0; i < assets.length; i++) { chainlinkAssetsSources[assets[i]] = chainlinkSources[i]; pythAssetsSources[assets[i]] = pythFeedId[i]; emit AssetSourcesUpdated(assets[i], chainlinkSources[i], pythFeedId[i]); } } /** * @notice Updates the Pyth oracle address * @param newAddress The new Pyth oracle address */ function setPythOracleAddress(address newAddress) external onlyAssetListingOrPoolAdmins { require(newAddress != address(0), "Invalid address"); address oldAddress = pythOracleAddress; pythOracleAddress = newAddress; emit PythOracleAddressUpdated(oldAddress, newAddress); } /** * @notice Gets the price from a Chainlink oracle * @param sourceAddress The address of the Chainlink price feed * @return The normalized price with 8 decimals */ function getChainlinkPrice(address sourceAddress) public view returns (uint256) { IChainlinkOracle chainlinkOracle = IChainlinkOracle(sourceAddress); uint256 decimals = chainlinkOracle.decimals(); (, int256 price, , , ) = chainlinkOracle.latestRoundData(); if (decimals > STANDARD_DECIMALS) { return uint256(price) / (10 ** (decimals - STANDARD_DECIMALS)); } else if (decimals < STANDARD_DECIMALS) { return uint256(price) * (10 ** (STANDARD_DECIMALS - decimals)); } return uint256(price); } /** * @notice Gets the price from the Pyth oracle * @param pythPriceId The Pyth price feed ID * @return The normalized price with 8 decimals */ function getPythPrice(bytes32 pythPriceId) public view returns (uint256) { IPyth pythOracle = IPyth(pythOracleAddress); Price memory priceData = pythOracle.getPrice(pythPriceId); int32 expo = priceData.expo; int64 price = priceData.price; require(price > 0, "Pyth response : price is negative or null"); uint64 unsignedPrice = uint64(price); if (expo > TARGET_EXPO) { return unsignedPrice / (10 ** uint32(expo - TARGET_EXPO)); } else if (expo < TARGET_EXPO) { return unsignedPrice * (10 ** uint32(TARGET_EXPO - expo)); } else { return unsignedPrice; } } /** * @notice Gets the price of an asset, trying Chainlink first then Pyth as fallback * @param asset The address of the asset * @return The normalized price with 8 decimals */ function getAssetPrice(address asset) public view returns (uint256) { address chainLinkSourceAddress = chainlinkAssetsSources[asset]; bytes32 pythPriceId = pythAssetsSources[asset]; uint256 price; if (chainLinkSourceAddress != address(0)) { price = getChainlinkPrice(chainLinkSourceAddress); if (price == 0 && pythPriceId != bytes32(0)) { price = getPythPrice(pythPriceId); } } else if (pythPriceId != bytes32(0)) { price = getPythPrice(pythPriceId); } if (price > 0) { return price; } revert("No reliable price source found"); } /** * @notice Gets the prices for a list of assets * @param assets The addresses of the assets * @return An array of normalized prices with 8 decimals */ function getAssetsPrices( address[] calldata assets ) external view returns (uint256[] memory) { uint256[] memory prices = new uint256[](assets.length); for (uint256 i = 0; i < assets.length; i++) { prices[i] = getAssetPrice(assets[i]); } return prices; } /** * @notice Gets both Chainlink and Pyth sources for an asset * @param asset The address of the asset * @return The Chainlink source address and Pyth price feed ID */ function getSourceOfAsset(address asset) external view returns (address, bytes32) { return (chainlinkAssetsSources[asset], pythAssetsSources[asset]); } /** * @dev Checks if the caller has asset listing or pool admin rights */ function _onlyAssetListingOrPoolAdmins() internal view { IACLManager aclManager = IACLManager(ADDRESSES_PROVIDER.getACLManager()); require( aclManager.isAssetListingAdmin(msg.sender) || aclManager.isPoolAdmin(msg.sender), Errors.CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN ); } }
pragma solidity ^0.8.10; interface IChainlinkOracle { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: BUSL-1.1 pragma 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' string public constant RESERVE_LIQUIDITY_NOT_ZERO = '18'; // 'The liquidity of the reserve needs to be 0' string public constant FLASHLOAN_PREMIUM_INVALID = '19'; // 'Invalid flashloan premium' string public constant INVALID_RESERVE_PARAMS = '20'; // 'Invalid risk parameters for the reserve' string public constant INVALID_EMODE_CATEGORY_PARAMS = '21'; // 'Invalid risk parameters for the eMode category' string public constant BRIDGE_PROTOCOL_FEE_INVALID = '22'; // 'Invalid bridge protocol fee' string public constant CALLER_MUST_BE_POOL = '23'; // 'The caller of this function must be a pool' string public constant INVALID_MINT_AMOUNT = '24'; // 'Invalid amount to mint' string public constant INVALID_BURN_AMOUNT = '25'; // 'Invalid amount to burn' string public constant INVALID_AMOUNT = '26'; // 'Amount must be greater than 0' string public constant RESERVE_INACTIVE = '27'; // 'Action requires an active reserve' string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' string public constant INVALID_DECIMALS = '66'; // 'Invalid decimals parameter of the underlying asset of the reserve' string public constant INVALID_RESERVE_FACTOR = '67'; // 'Invalid reserve factor parameter for the reserve' string public constant INVALID_BORROW_CAP = '68'; // 'Invalid borrow cap for the reserve' string public constant INVALID_SUPPLY_CAP = '69'; // 'Invalid supply cap for the reserve' string public constant INVALID_LIQUIDATION_PROTOCOL_FEE = '70'; // 'Invalid liquidation protocol fee for the reserve' string public constant INVALID_EMODE_CATEGORY = '71'; // 'Invalid eMode category for the reserve' string public constant INVALID_UNBACKED_MINT_CAP = '72'; // 'Invalid unbacked mint cap for the reserve' string public constant INVALID_DEBT_CEILING = '73'; // 'Invalid debt ceiling for the reserve string public constant INVALID_RESERVE_INDEX = '74'; // 'Invalid reserve index' string public constant ACL_ADMIN_CANNOT_BE_ZERO = '75'; // 'ACL admin cannot be set to the zero address' string public constant INCONSISTENT_PARAMS_LENGTH = '76'; // 'Array parameters that should be equal length are not' string public constant ZERO_ADDRESS_NOT_VALID = '77'; // 'Zero address not valid' string public constant INVALID_EXPIRATION = '78'; // 'Invalid expiration' string public constant INVALID_SIGNATURE = '79'; // 'Invalid signature' string public constant OPERATION_NOT_SUPPORTED = '80'; // 'Operation not supported' string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled }
// SPDX-License-Identifier: AGPL-3.0 pragma 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 */ function EMERGENCY_ADMIN_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the RiskAdmin role * @return The id of the RiskAdmin role */ function RISK_ADMIN_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the FlashBorrower role * @return The id of the FlashBorrower role */ function FLASH_BORROWER_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the Bridge role * @return The id of the Bridge role */ function BRIDGE_ROLE() external view returns (bytes32); /** * @notice Returns the identifier of the AssetListingAdmin role * @return The id of the AssetListingAdmin role */ function ASSET_LISTING_ADMIN_ROLE() external view returns (bytes32); /** * @notice Set the role as admin of a specific role. * @dev By default the admin role for all roles is `DEFAULT_ADMIN_ROLE`. * @param role The role to be managed by the admin role * @param adminRole The admin role */ function setRoleAdmin(bytes32 role, bytes32 adminRole) external; /** * @notice Adds a new admin as PoolAdmin * @param admin The address of the new admin */ function addPoolAdmin(address admin) external; /** * @notice Removes an admin as PoolAdmin * @param admin The address of the admin to remove */ function removePoolAdmin(address admin) external; /** * @notice Returns true if the address is PoolAdmin, false otherwise * @param admin The address to check * @return True if the given address is PoolAdmin, false otherwise */ function isPoolAdmin(address admin) external view returns (bool); /** * @notice Adds a new admin as EmergencyAdmin * @param admin The address of the new admin */ function addEmergencyAdmin(address admin) external; /** * @notice Removes an admin as EmergencyAdmin * @param admin The address of the admin to remove */ function removeEmergencyAdmin(address admin) external; /** * @notice Returns true if the address is EmergencyAdmin, false otherwise * @param admin The address to check * @return True if the given address is EmergencyAdmin, false otherwise */ function isEmergencyAdmin(address admin) external view returns (bool); /** * @notice Adds a new admin as RiskAdmin * @param admin The address of the new admin */ function addRiskAdmin(address admin) external; /** * @notice Removes an admin as RiskAdmin * @param admin The address of the admin to remove */ function removeRiskAdmin(address admin) external; /** * @notice Returns true if the address is RiskAdmin, false otherwise * @param admin The address to check * @return True if the given address is RiskAdmin, false otherwise */ function isRiskAdmin(address admin) external view returns (bool); /** * @notice Adds a new address as FlashBorrower * @param borrower The address of the new FlashBorrower */ function addFlashBorrower(address borrower) external; /** * @notice Removes an address as FlashBorrower * @param borrower The address of the FlashBorrower to remove */ function removeFlashBorrower(address borrower) external; /** * @notice Returns true if the address is FlashBorrower, false otherwise * @param borrower The address to check * @return True if the given address is FlashBorrower, false otherwise */ function isFlashBorrower(address borrower) external view returns (bool); /** * @notice Adds a new address as Bridge * @param bridge The address of the new Bridge */ function addBridge(address bridge) external; /** * @notice Removes an address as Bridge * @param bridge The address of the bridge to remove */ function removeBridge(address bridge) external; /** * @notice Returns true if the address is Bridge, false otherwise * @param bridge The address to check * @return True if the given address is Bridge, false otherwise */ function isBridge(address bridge) external view returns (bool); /** * @notice Adds a new admin as AssetListingAdmin * @param admin The address of the new admin */ function addAssetListingAdmin(address admin) external; /** * @notice Removes an admin as AssetListingAdmin * @param admin The address of the admin to remove */ function removeAssetListingAdmin(address admin) external; /** * @notice Returns true if the address is AssetListingAdmin, false otherwise * @param admin The address to check * @return True if the given address is AssetListingAdmin, false otherwise */ function isAssetListingAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: AGPL-3.0 pragma 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 * @param newAddress The new address of the PoolConfigurator */ event PoolConfiguratorUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the price oracle is updated. * @param oldAddress The old address of the PriceOracle * @param newAddress The new address of the PriceOracle */ event PriceOracleUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the ACL manager is updated. * @param oldAddress The old address of the ACLManager * @param newAddress The new address of the ACLManager */ event ACLManagerUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the ACL admin is updated. * @param oldAddress The old address of the ACLAdmin * @param newAddress The new address of the ACLAdmin */ event ACLAdminUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the price oracle sentinel is updated. * @param oldAddress The old address of the PriceOracleSentinel * @param newAddress The new address of the PriceOracleSentinel */ event PriceOracleSentinelUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the pool data provider is updated. * @param oldAddress The old address of the PoolDataProvider * @param newAddress The new address of the PoolDataProvider */ event PoolDataProviderUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when a new proxy is created. * @param id The identifier of the proxy * @param proxyAddress The address of the created proxy contract * @param implementationAddress The address of the implementation contract */ event ProxyCreated( bytes32 indexed id, address indexed proxyAddress, address indexed implementationAddress ); /** * @dev Emitted when a new non-proxied contract address is registered. * @param id The identifier of the contract * @param oldAddress The address of the old contract * @param newAddress The address of the new contract */ event AddressSet(bytes32 indexed id, address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the implementation of the proxy registered with id is updated * @param id The identifier of the contract * @param proxyAddress The address of the proxy contract * @param oldImplementationAddress The address of the old implementation contract * @param newImplementationAddress The address of the new implementation contract */ event AddressSetAsProxy( bytes32 indexed id, address indexed proxyAddress, address oldImplementationAddress, address indexed newImplementationAddress ); /** * @notice Returns the id of the Aave market to which this contract points to. * @return The market id */ function getMarketId() external view returns (string memory); /** * @notice Associates an id with a specific PoolAddressesProvider. * @dev This can be used to create an onchain registry of PoolAddressesProviders to * identify and validate multiple Aave markets. * @param newMarketId The market id */ function setMarketId(string calldata newMarketId) external; /** * @notice Returns an address by its identifier. * @dev The returned address might be an EOA or a contract, potentially proxied * @dev It returns ZERO if there is no registered address with the given id * @param id The id * @return The address of the registered for the specified id */ function getAddress(bytes32 id) external view returns (address); /** * @notice General function to update the implementation of a proxy registered with * certain `id`. If there is no proxy registered, it will instantiate one and * set as implementation the `newImplementationAddress`. * @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit * setter function, in order to avoid unexpected consequences * @param id The id * @param newImplementationAddress The address of the new implementation */ function setAddressAsProxy(bytes32 id, address newImplementationAddress) external; /** * @notice Sets an address for an id replacing the address saved in the addresses map. * @dev IMPORTANT Use this function carefully, as it will do a hard replacement * @param id The id * @param newAddress The address to set */ function setAddress(bytes32 id, address newAddress) external; /** * @notice Returns the address of the Pool proxy. * @return The Pool proxy address */ function getPool() external view returns (address); /** * @notice Updates the implementation of the Pool, or creates a proxy * setting the new `pool` implementation when the function is called for the first time. * @param newPoolImpl The new Pool implementation */ function setPoolImpl(address newPoolImpl) external; /** * @notice Returns the address of the PoolConfigurator proxy. * @return The PoolConfigurator proxy address */ function getPoolConfigurator() external view returns (address); /** * @notice Updates the implementation of the PoolConfigurator, or creates a proxy * setting the new `PoolConfigurator` implementation when the function is called for the first time. * @param newPoolConfiguratorImpl The new PoolConfigurator implementation */ function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; /** * @notice Returns the address of the price oracle. * @return The address of the PriceOracle */ function getPriceOracle() external view returns (address); /** * @notice Updates the address of the price oracle. * @param newPriceOracle The address of the new PriceOracle */ function setPriceOracle(address newPriceOracle) external; /** * @notice Returns the address of the ACL manager. * @return The address of the ACLManager */ function getACLManager() external view returns (address); /** * @notice Updates the address of the ACL manager. * @param newAclManager The address of the new ACLManager */ function setACLManager(address newAclManager) external; /** * @notice Returns the address of the ACL admin. * @return The address of the ACL admin */ function getACLAdmin() external view returns (address); /** * @notice Updates the address of the ACL admin. * @param newAclAdmin The address of the new ACL admin */ function setACLAdmin(address newAclAdmin) external; /** * @notice Returns the address of the price oracle sentinel. * @return The address of the PriceOracleSentinel */ function getPriceOracleSentinel() external view returns (address); /** * @notice Updates the address of the price oracle sentinel. * @param newPriceOracleSentinel The address of the new PriceOracleSentinel */ function setPriceOracleSentinel(address newPriceOracleSentinel) external; /** * @notice Returns the address of the data provider. * @return The address of the DataProvider */ function getPoolDataProvider() external view returns (address); /** * @notice Updates the address of the data provider. * @param newDataProvider The address of the new DataProvider */ function setPoolDataProvider(address newDataProvider) external; }
// SPDX-License-Identifier: AGPL-3.0 pragma 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 * @return The price of the asset */ function getAssetPrice(address asset) external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0 pragma 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); /** * @dev Emitted after the address of fallback oracle is updated * @param fallbackOracle The address of the fallback oracle */ event FallbackOracleUpdated(address indexed fallbackOracle); /** * @notice Returns the PoolAddressesProvider * @return The address of the PoolAddressesProvider contract */ function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); /** * @notice Sets or replaces price sources of assets * @param assets The addresses of the assets * @param sources The addresses of the price sources */ function setAssetSources(address[] calldata assets, address[] calldata sources) external; /** * @notice Sets the fallback oracle * @param fallbackOracle The address of the fallback oracle */ function setFallbackOracle(address fallbackOracle) external; /** * @notice Returns a list of prices from a list of assets addresses * @param assets The list of assets addresses * @return The prices of the given assets */ function getAssetsPrices(address[] calldata assets) external view returns (uint256[] memory); /** * @notice Returns the address of the source for an asset address * @param asset The address of the asset * @return The address of the source */ function getSourceOfAsset(address asset) external view returns (address); /** * @notice Returns the address of the fallback oracle * @return The address of the fallback oracle */ function getFallbackOracle() external view returns (address); }
pragma solidity ^0.8.10; struct Price { // Price int64 price; // Confidence interval uint64 conf; // Price exponent int32 expo; // Unix timestamp describing when the price was published uint publishTime; } interface IPyth { function getPrice(bytes32 priceId) external view returns (Price memory); function getEmaPrice(bytes32 priceId) external view returns (Price memory); function getPriceUnsafe(bytes32 priceId) external view returns (Price memory); function getUpdateFee(bytes[] calldata priceUpdateData) external view returns (uint256); function updatePriceFeeds(bytes[] calldata priceUpdateData) external payable; }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 999 }, "libraries": { "AaveFallbackOracle.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"provider","type":"address"},{"internalType":"address","name":"_pythOracleAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"chainlinkSource","type":"address"},{"indexed":false,"internalType":"bytes32","name":"pythSource","type":"bytes32"}],"name":"AssetSourcesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"PythOracleAddressUpdated","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"chainlinkAssetsSources","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"sourceAddress","type":"address"}],"name":"getChainlinkPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"pythPriceId","type":"bytes32"}],"name":"getPythPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getSourceOfAsset","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pythAssetsSources","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythOracleAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"address[]","name":"chainlinkSources","type":"address[]"},{"internalType":"bytes32[]","name":"pythFeedId","type":"bytes32[]"}],"name":"setAssetSources","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setPythOracleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516112dd3803806112dd83398101604081905261002f9161006f565b6001600160a01b03918216608052600280546001600160a01b031916919092161790556100a9565b6001600160a01b038116811461006c57600080fd5b50565b6000806040838503121561008257600080fd5b825161008d81610057565b602084015190925061009e81610057565b809150509250929050565b6080516112136100ca6000396000818160d3015261083d01526112136000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80639d23d9f211610081578063d066e03d1161005b578063d066e03d146101f7578063d240072714610220578063f6e252201461024057600080fd5b80639d23d9f2146101a3578063b3596f07146101c3578063bd58fe56146101e457600080fd5b806326657b36116100b257806326657b361461012757806384bd32b31461013a57806392bf2be01461014d57600080fd5b80630542975c146100ce5780630712e4ba14610112575b600080fd5b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610125610120366004610c53565b610253565b005b610125610135366004610cc3565b61032f565b6002546100f5906001600160a01b031681565b61018461015b366004610c53565b6001600160a01b0390811660009081526020818152604080832054600190925290912054911691565b604080516001600160a01b039093168352602083019190915201610109565b6101b66101b1366004610d5d565b6103dd565b6040516101099190610d9f565b6101d66101d1366004610c53565b610494565b604051908152602001610109565b6101d66101f2366004610c53565b610558565b6100f5610205366004610c53565b6000602081905290815260409020546001600160a01b031681565b6101d661022e366004610c53565b60016020526000908152604090205481565b6101d661024e366004610de3565b610697565b61025b610839565b6001600160a01b0381166102b65760405162461bcd60e51b815260206004820152600f60248201527f496e76616c69642061646472657373000000000000000000000000000000000060448201526064015b60405180910390fd5b600280546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f8f230a287e7464fabcbf2f4b5563dd31c97e67f396a1e26e3e7f242d593087f7910160405180910390a15050565b610337610839565b6103d586868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610a2092505050565b505050505050565b606060008267ffffffffffffffff8111156103fa576103fa610dfc565b604051908082528060200260200182016040528015610423578160200160208202803683370190505b50905060005b8381101561048a5761045b85858381811061044657610446610e12565b90506020020160208101906101d19190610c53565b82828151811061046d5761046d610e12565b60209081029190910101528061048281610e3e565b915050610429565b5090505b92915050565b6001600160a01b03808216600090815260208181526040808320546001909252822054919216908282156104f0576104cb83610558565b9050801580156104da57508115155b156104eb576104e882610697565b90505b610502565b8115610502576104ff82610697565b90505b801561051057949350505050565b60405162461bcd60e51b815260206004820152601e60248201527f4e6f2072656c6961626c6520707269636520736f7572636520666f756e64000060448201526064016102ad565b6000808290506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c29190610e59565b60ff1690506000826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610e9b565b505050915050600860ff1682111561066657610648600883610eeb565b61065390600a610fe6565b61065d9082610ff2565b95945050505050565b600882101561068f5761067a826008610eeb565b61068590600a610fe6565b61065d9082611014565b949350505050565b6002546040517f31d98b3f000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b031690829082906331d98b3f90602401608060405180830381865afa1580156106fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610722919061105d565b60408101518151919250906000600782900b136107a75760405162461bcd60e51b815260206004820152602960248201527f5079746820726573706f6e7365203a207072696365206973206e65676174697660448201527f65206f72206e756c6c000000000000000000000000000000000000000000000060648201526084016102ad565b80600719600384900b13156107ec576107c2600719846110ed565b6107cd90600a611137565b6107e19067ffffffffffffffff8316610ff2565b979650505050505050565b600719600384900b121561082557610806836007196110ed565b61081190600a611137565b6107e19067ffffffffffffffff8316611014565b67ffffffffffffffff169695505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663707cd7166040518163ffffffff1660e01b8152600401602060405180830381865afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611149565b6040517f13ee32e00000000000000000000000000000000000000000000000000000000081523360048201529091506001600160a01b038216906313ee32e090602401602060405180830381865afa15801561091d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109419190611166565b806109c857506040517f7be53ca10000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03821690637be53ca190602401602060405180830381865afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c89190611166565b6040518060400160405280600181526020017f350000000000000000000000000000000000000000000000000000000000000081525090610a1c5760405162461bcd60e51b81526004016102ad9190611188565b5050565b8151835114604051806040016040528060028152602001611b9b60f11b81525090610a5e5760405162461bcd60e51b81526004016102ad9190611188565b508051835114604051806040016040528060028152602001611b9b60f11b81525090610a9d5760405162461bcd60e51b81526004016102ad9190611188565b5060005b8351811015610c3557828181518110610abc57610abc610e12565b6020026020010151600080868481518110610ad957610ad9610e12565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818181518110610b3757610b37610e12565b602002602001015160016000868481518110610b5557610b55610e12565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550838181518110610b9357610b93610e12565b60200260200101516001600160a01b03167f89a3c8b34c4379c4fc6691873763bfe343e6a816cd985364a54820757583c4c2848381518110610bd757610bd7610e12565b6020026020010151848481518110610bf157610bf1610e12565b6020026020010151604051610c1b9291906001600160a01b03929092168252602082015260400190565b60405180910390a280610c2d81610e3e565b915050610aa1565b50505050565b6001600160a01b0381168114610c5057600080fd5b50565b600060208284031215610c6557600080fd5b8135610c7081610c3b565b9392505050565b60008083601f840112610c8957600080fd5b50813567ffffffffffffffff811115610ca157600080fd5b6020830191508360208260051b8501011115610cbc57600080fd5b9250929050565b60008060008060008060608789031215610cdc57600080fd5b863567ffffffffffffffff80821115610cf457600080fd5b610d008a838b01610c77565b90985096506020890135915080821115610d1957600080fd5b610d258a838b01610c77565b90965094506040890135915080821115610d3e57600080fd5b50610d4b89828a01610c77565b979a9699509497509295939492505050565b60008060208385031215610d7057600080fd5b823567ffffffffffffffff811115610d8757600080fd5b610d9385828601610c77565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610dd757835183529284019291840191600101610dbb565b50909695505050505050565b600060208284031215610df557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415610e5257610e52610e28565b5060010190565b600060208284031215610e6b57600080fd5b815160ff81168114610c7057600080fd5b805169ffffffffffffffffffff81168114610e9657600080fd5b919050565b600080600080600060a08688031215610eb357600080fd5b610ebc86610e7c565b9450602086015193506040860151925060608601519150610edf60808701610e7c565b90509295509295909350565b600082821015610efd57610efd610e28565b500390565b600181815b80851115610f3d578160001904821115610f2357610f23610e28565b80851615610f3057918102915b93841c9390800290610f07565b509250929050565b600082610f545750600161048e565b81610f615750600061048e565b8160018114610f775760028114610f8157610f9d565b600191505061048e565b60ff841115610f9257610f92610e28565b50506001821b61048e565b5060208310610133831016604e8410600b8410161715610fc0575081810a61048e565b610fca8383610f02565b8060001904821115610fde57610fde610e28565b029392505050565b6000610c708383610f45565b60008261100f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561102e5761102e610e28565b500290565b805167ffffffffffffffff81168114610e9657600080fd5b8051600381900b8114610e9657600080fd5b60006080828403121561106f57600080fd5b6040516080810181811067ffffffffffffffff821117156110a057634e487b7160e01b600052604160045260246000fd5b6040528251600781900b81146110b557600080fd5b81526110c360208401611033565b60208201526110d46040840161104b565b6040820152606083015160608201528091505092915050565b60008160030b8360030b6000811281637fffffff190183128115161561111557611115610e28565b81637fffffff01831381161561112d5761112d610e28565b5090039392505050565b6000610c7063ffffffff841683610f45565b60006020828403121561115b57600080fd5b8151610c7081610c3b565b60006020828403121561117857600080fd5b81518015158114610c7057600080fd5b600060208083528351808285015260005b818110156111b557858101830151858201604001528201611199565b818111156111c7576000604083870101525b50601f01601f191692909201604001939250505056fea2646970667358221220153c90e2c0ae14a730a622aeabacc17379c1e3b56310e2602aaeb57a2a66d0b564736f6c634300080a003300000000000000000000000024835e3da1b402f8037e3ce6de4a701677fa1b540000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80639d23d9f211610081578063d066e03d1161005b578063d066e03d146101f7578063d240072714610220578063f6e252201461024057600080fd5b80639d23d9f2146101a3578063b3596f07146101c3578063bd58fe56146101e457600080fd5b806326657b36116100b257806326657b361461012757806384bd32b31461013a57806392bf2be01461014d57600080fd5b80630542975c146100ce5780630712e4ba14610112575b600080fd5b6100f57f00000000000000000000000024835e3da1b402f8037e3ce6de4a701677fa1b5481565b6040516001600160a01b0390911681526020015b60405180910390f35b610125610120366004610c53565b610253565b005b610125610135366004610cc3565b61032f565b6002546100f5906001600160a01b031681565b61018461015b366004610c53565b6001600160a01b0390811660009081526020818152604080832054600190925290912054911691565b604080516001600160a01b039093168352602083019190915201610109565b6101b66101b1366004610d5d565b6103dd565b6040516101099190610d9f565b6101d66101d1366004610c53565b610494565b604051908152602001610109565b6101d66101f2366004610c53565b610558565b6100f5610205366004610c53565b6000602081905290815260409020546001600160a01b031681565b6101d661022e366004610c53565b60016020526000908152604090205481565b6101d661024e366004610de3565b610697565b61025b610839565b6001600160a01b0381166102b65760405162461bcd60e51b815260206004820152600f60248201527f496e76616c69642061646472657373000000000000000000000000000000000060448201526064015b60405180910390fd5b600280546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f8f230a287e7464fabcbf2f4b5563dd31c97e67f396a1e26e3e7f242d593087f7910160405180910390a15050565b610337610839565b6103d586868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610a2092505050565b505050505050565b606060008267ffffffffffffffff8111156103fa576103fa610dfc565b604051908082528060200260200182016040528015610423578160200160208202803683370190505b50905060005b8381101561048a5761045b85858381811061044657610446610e12565b90506020020160208101906101d19190610c53565b82828151811061046d5761046d610e12565b60209081029190910101528061048281610e3e565b915050610429565b5090505b92915050565b6001600160a01b03808216600090815260208181526040808320546001909252822054919216908282156104f0576104cb83610558565b9050801580156104da57508115155b156104eb576104e882610697565b90505b610502565b8115610502576104ff82610697565b90505b801561051057949350505050565b60405162461bcd60e51b815260206004820152601e60248201527f4e6f2072656c6961626c6520707269636520736f7572636520666f756e64000060448201526064016102ad565b6000808290506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c29190610e59565b60ff1690506000826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610e9b565b505050915050600860ff1682111561066657610648600883610eeb565b61065390600a610fe6565b61065d9082610ff2565b95945050505050565b600882101561068f5761067a826008610eeb565b61068590600a610fe6565b61065d9082611014565b949350505050565b6002546040517f31d98b3f000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b031690829082906331d98b3f90602401608060405180830381865afa1580156106fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610722919061105d565b60408101518151919250906000600782900b136107a75760405162461bcd60e51b815260206004820152602960248201527f5079746820726573706f6e7365203a207072696365206973206e65676174697660448201527f65206f72206e756c6c000000000000000000000000000000000000000000000060648201526084016102ad565b80600719600384900b13156107ec576107c2600719846110ed565b6107cd90600a611137565b6107e19067ffffffffffffffff8316610ff2565b979650505050505050565b600719600384900b121561082557610806836007196110ed565b61081190600a611137565b6107e19067ffffffffffffffff8316611014565b67ffffffffffffffff169695505050505050565b60007f00000000000000000000000024835e3da1b402f8037e3ce6de4a701677fa1b546001600160a01b031663707cd7166040518163ffffffff1660e01b8152600401602060405180830381865afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611149565b6040517f13ee32e00000000000000000000000000000000000000000000000000000000081523360048201529091506001600160a01b038216906313ee32e090602401602060405180830381865afa15801561091d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109419190611166565b806109c857506040517f7be53ca10000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03821690637be53ca190602401602060405180830381865afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c89190611166565b6040518060400160405280600181526020017f350000000000000000000000000000000000000000000000000000000000000081525090610a1c5760405162461bcd60e51b81526004016102ad9190611188565b5050565b8151835114604051806040016040528060028152602001611b9b60f11b81525090610a5e5760405162461bcd60e51b81526004016102ad9190611188565b508051835114604051806040016040528060028152602001611b9b60f11b81525090610a9d5760405162461bcd60e51b81526004016102ad9190611188565b5060005b8351811015610c3557828181518110610abc57610abc610e12565b6020026020010151600080868481518110610ad957610ad9610e12565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818181518110610b3757610b37610e12565b602002602001015160016000868481518110610b5557610b55610e12565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550838181518110610b9357610b93610e12565b60200260200101516001600160a01b03167f89a3c8b34c4379c4fc6691873763bfe343e6a816cd985364a54820757583c4c2848381518110610bd757610bd7610e12565b6020026020010151848481518110610bf157610bf1610e12565b6020026020010151604051610c1b9291906001600160a01b03929092168252602082015260400190565b60405180910390a280610c2d81610e3e565b915050610aa1565b50505050565b6001600160a01b0381168114610c5057600080fd5b50565b600060208284031215610c6557600080fd5b8135610c7081610c3b565b9392505050565b60008083601f840112610c8957600080fd5b50813567ffffffffffffffff811115610ca157600080fd5b6020830191508360208260051b8501011115610cbc57600080fd5b9250929050565b60008060008060008060608789031215610cdc57600080fd5b863567ffffffffffffffff80821115610cf457600080fd5b610d008a838b01610c77565b90985096506020890135915080821115610d1957600080fd5b610d258a838b01610c77565b90965094506040890135915080821115610d3e57600080fd5b50610d4b89828a01610c77565b979a9699509497509295939492505050565b60008060208385031215610d7057600080fd5b823567ffffffffffffffff811115610d8757600080fd5b610d9385828601610c77565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610dd757835183529284019291840191600101610dbb565b50909695505050505050565b600060208284031215610df557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415610e5257610e52610e28565b5060010190565b600060208284031215610e6b57600080fd5b815160ff81168114610c7057600080fd5b805169ffffffffffffffffffff81168114610e9657600080fd5b919050565b600080600080600060a08688031215610eb357600080fd5b610ebc86610e7c565b9450602086015193506040860151925060608601519150610edf60808701610e7c565b90509295509295909350565b600082821015610efd57610efd610e28565b500390565b600181815b80851115610f3d578160001904821115610f2357610f23610e28565b80851615610f3057918102915b93841c9390800290610f07565b509250929050565b600082610f545750600161048e565b81610f615750600061048e565b8160018114610f775760028114610f8157610f9d565b600191505061048e565b60ff841115610f9257610f92610e28565b50506001821b61048e565b5060208310610133831016604e8410600b8410161715610fc0575081810a61048e565b610fca8383610f02565b8060001904821115610fde57610fde610e28565b029392505050565b6000610c708383610f45565b60008261100f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561102e5761102e610e28565b500290565b805167ffffffffffffffff81168114610e9657600080fd5b8051600381900b8114610e9657600080fd5b60006080828403121561106f57600080fd5b6040516080810181811067ffffffffffffffff821117156110a057634e487b7160e01b600052604160045260246000fd5b6040528251600781900b81146110b557600080fd5b81526110c360208401611033565b60208201526110d46040840161104b565b6040820152606083015160608201528091505092915050565b60008160030b8360030b6000811281637fffffff190183128115161561111557611115610e28565b81637fffffff01831381161561112d5761112d610e28565b5090039392505050565b6000610c7063ffffffff841683610f45565b60006020828403121561115b57600080fd5b8151610c7081610c3b565b60006020828403121561117857600080fd5b81518015158114610c7057600080fd5b600060208083528351808285015260005b818110156111b557858101830151858201604001528201611199565b818111156111c7576000604083870101525b50601f01601f191692909201604001939250505056fea2646970667358221220153c90e2c0ae14a730a622aeabacc17379c1e3b56310e2602aaeb57a2a66d0b564736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000024835e3da1b402f8037e3ce6de4a701677fa1b540000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43
-----Decoded View---------------
Arg [0] : provider (address): 0x24835e3Da1B402f8037e3ce6dE4a701677fa1b54
Arg [1] : _pythOracleAddress (address): 0x2880aB155794e7179c9eE2e38200202908C17B43
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000024835e3da1b402f8037e3ce6de4a701677fa1b54
Arg [1] : 0000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.