ETH Price: $2,623.31 (-1.78%)
Gas: 1 Gwei

Contract

0xa12059746F0673Eb3a83B1192c37F0b07a0Faab4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.00039014.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.00039014.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.00039014.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.00039014.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.000390144.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.000390054.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.000390144.03713159
Set Asset Source202755652024-07-10 10:41:2330 days ago1720608083IN
0xa1205974...07a0Faab4
0 ETH0.000390144.03713159
Set Asset Source202755642024-07-10 10:41:1130 days ago1720608071IN
0xa1205974...07a0Faab4
0 ETH0.000467714.01980003
Set Asset Source202755642024-07-10 10:41:1130 days ago1720608071IN
0xa1205974...07a0Faab4
0 ETH0.000467764.01980003
Set Asset Source202755642024-07-10 10:41:1130 days ago1720608071IN
0xa1205974...07a0Faab4
0 ETH0.000467764.01980003
Set Asset Source202755642024-07-10 10:41:1130 days ago1720608071IN
0xa1205974...07a0Faab4
0 ETH0.000467764.01980003
0x60806040202755642024-07-10 10:41:1130 days ago1720608071IN
 Create: OracleRouter
0 ETH0.005741234.01980003

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleRouter

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 1000 runs

Other Settings:
london EvmVersion
File 1 of 11 : OracleRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol";
import { IOracleRouter } from "./interfaces/IOracleRouter.sol";
import { Errors } from "./libraries/Errors.sol";
import { IAggregatorV2V3 } from "./interfaces/IAggregatorV2V3.sol";
import { IPyth } from "./interfaces/IPyth.sol";
import { PythStructs } from "./interfaces/PythStructs.sol";

/// @custom:security-contact [email protected]
contract OracleRouter is Ownable, IOracleRouter {
    //////////////// <*_*> Storage <*_*> ////////////////
    /// @dev Mapping of asset address to its price feed data
    mapping(address => PriceFeedData) public feeds;

    /// @dev Mapping of asset address to its fallback price feed data
    mapping(address => PriceFeedData) public fallbackFeeds;

    /// @dev Mapping of oracle provider type to its address
    mapping(IOracleRouter.OracleProviderType => OracleProvider) private oracleProviders;

    /// @dev The base currency unit
    uint256 public constant BASE_CURRENCY_UNIT = 1e18;

    ////////////////// =^..^= Events =^..^= //////////////////
    event FeedUpdated(address asset, address feedAddress, bytes32 feedId, uint256 heartbeat);
    event FallbackFeedUpdated(address asset, address feedAddress, bytes32 feedId, uint256 heartbeat);
    event PricesUpdated();

    //////////////// <*_*> Structs <*_*> ////////////////
    struct PriceFeedData {
        /// required by Chainlink
        address feedAddress;
        /// required by Pyth and API3
        bytes32 feedId;
        uint256 heartbeat;
        OracleProviderType oracleProviderType;
        bool isSet;
    }

    struct OracleProvider {
        address oracleProviderAddress;
        function(PriceFeedData memory) view returns (bool, uint256) getPrice;
    }

    constructor(address _pyth) Ownable() {
        oracleProviders[OracleProviderType.Chainlink] = OracleProvider(address(0x0), _getChainlinkPrice);
        oracleProviders[OracleProviderType.Pyth] = OracleProvider(_pyth, _getPythPrice);
    }

    ////////////////// ô¿ô External Functions ô¿ô //////////////////

    /// @notice Set the source of an asset
    /// @param _asset The address of the asset
    /// @param _feedAddress The address of the feed
    /// @param _feedId The id of the feed
    /// @param _heartbeat The heartbeat of the feed
    /// @param _oracleType The type of the oracle, CL is 0, Pyth is 1 and so on
    /// @param isFallback True if the feed is a fallback
    function setAssetSource(
        address _asset,
        address _feedAddress,
        bytes32 _feedId,
        uint256 _heartbeat,
        IOracleRouter.OracleProviderType _oracleType,
        bool isFallback
    ) external override onlyOwner {
        _setAssetSource(_asset, _feedAddress, _feedId, _heartbeat, _oracleType, isFallback);
    }

    /**
     * @notice Updates multiple price feeds on Pyth oracle
     * @param priceUpdateData received from Pyth network and used to update the oracle
     */
    function updateUnderlyingPrices(bytes[] calldata priceUpdateData) external payable override {
        IPyth pyth = IPyth(oracleProviders[OracleProviderType.Pyth].oracleProviderAddress);
        uint256 fee = pyth.getUpdateFee(priceUpdateData);
        pyth.updatePriceFeeds{ value: fee }(priceUpdateData);
        // Send all remaining eth back to the sender
        msg.sender.call{ value: msg.value - fee }("");
        emit PricesUpdated();
    }

    /// @notice Get the prices of multiple assets
    /// @param assets The addresses of the assets
    /// @return uint256[] The prices of the assets
    function getAssetsPrices(address[] calldata assets) external view override returns (uint256[] memory) {
        uint256 length = assets.length;
        uint256[] memory prices = new uint256[](length);
        for (uint256 i = 0; i < length;) {
            prices[i] = getAssetPrice(assets[i]);
            unchecked {
                ++i;
            }
        }
        return prices;
    }

    /// @notice Get the source of an asset. Tries to get the primary feed, then the fallback feed address
    /// @notice If no feed is set, returns address(0)
    /// @param asset The address of the asset
    /// @return address The address of the feed or in case of pyth, return feed id
    function getSourceOfAsset(address asset) external view override returns (address, bytes32) {
        PriceFeedData memory feed = feeds[address(asset)];
        if (feed.isSet) {
            return (feed.feedAddress, feed.feedId);
            // Check fallback feed if no primary feed is set
        } else {
            feed = fallbackFeeds[address(asset)];
            if (feed.isSet) {
                return (feed.feedAddress, feed.feedId);
            }
        }
        return (address(0), bytes32(0));
    }

    ////////////////// ô¿ô Public Functions ô¿ô //////////////////

    /// @notice Get the price of an asset
    /// @param asset The address of the asset
    function getAssetPrice(address asset) public view override returns (uint256) {
        PriceFeedData memory feed = feeds[address(asset)];

        if (!feed.isSet) {
            revert Errors.NoFeedSet();
        }

        bool success;
        uint256 price;
        (success, price) = oracleProviders[feed.oracleProviderType].getPrice(feed);
        // If the price is not available, try the fallback feed
        if (!success) {
            feed = fallbackFeeds[address(asset)];
            // If there is no fallback feed, revert
            if (!feed.isSet) {
                revert Errors.NoFallbackFeedSet();
            }
            (success, price) = oracleProviders[feed.oracleProviderType].getPrice(feed);
            // If the price is not available from the fallback feed, revert
            if (!success) {
                revert Errors.NoPriceAvailable();
            }
        }
        // Price cannot be 0
        if (price == 0) {
            revert Errors.NoPriceAvailable();
        }
        return price;
    }

    ////////////////// ô¿ô Internal Functions ô¿ô  //////////////////

    /// @notice Internal function to set the source of an asset
    /// @param _asset The address of the asset
    /// @param _feedAddress The address of the feed
    /// @param _feedId The id of the feed
    /// @param _heartbeat The heartbeat of the feed
    /// @param _oracleType The type of the oracle
    /// @param isFallback True if the feed is a fallback
    function _setAssetSource(
        address _asset,
        address _feedAddress,
        bytes32 _feedId,
        uint256 _heartbeat,
        IOracleRouter.OracleProviderType _oracleType,
        bool isFallback
    ) internal {
        if (_oracleType == OracleProviderType.Chainlink) {
            if (_feedAddress == address(0)) {
                revert Errors.InvalidFeed();
            }
        } else if (_oracleType == OracleProviderType.Pyth) {
            if (_feedId == bytes32(0)) {
                revert Errors.InvalidFeed();
            }
        } else {
            revert Errors.InvalidOracleProviderType();
        }

        if (!isFallback) {
            feeds[_asset] = PriceFeedData(_feedAddress, _feedId, _heartbeat, _oracleType, true);
            emit FeedUpdated(_asset, _feedAddress, _feedId, _heartbeat);
        } else {
            fallbackFeeds[_asset] = PriceFeedData(_feedAddress, _feedId, _heartbeat, _oracleType, true);
            emit FallbackFeedUpdated(_asset, _feedAddress, _feedId, _heartbeat);
        }
    }

    /// @notice Get the underlying price of an asset from a Chainlink aggregator
    /// @param feed The feed data
    /// @return bool True if the price is available, false if not
    /// @return uint256 The price of the asset
    function _getChainlinkPrice(PriceFeedData memory feed) internal view returns (bool, uint256) {
        IAggregatorV2V3 chainlinkAggregator = IAggregatorV2V3(feed.feedAddress);
        uint256 chainlinkDecimals = chainlinkAggregator.decimals();
        if (chainlinkDecimals > 18) {
            revert Errors.DecimalsOutOfRange(chainlinkDecimals);
        }
        uint256 decimalDelta = 18 - chainlinkDecimals;

        (, int256 answer,, uint256 updatedAt,) = chainlinkAggregator.latestRoundData();
        if (answer < 0) {
            revert Errors.NegativeChainlinkPriceValue(answer);
        }

        return
            block.timestamp <= updatedAt + feed.heartbeat ? (true, uint256(answer) * (10 ** decimalDelta)) : (false, 0);
    }

    /// @notice return price of an asset from Pyth
    /// @param feed contains feedId required by Pyth
    /// @return bool True if the price is available, false if not
    /// @return uint256 The price of the asset scaled to 1e18
    function _getPythPrice(PriceFeedData memory feed) internal view returns (bool, uint256) {
        IPyth pyth = IPyth(oracleProviders[OracleProviderType.Pyth].oracleProviderAddress);

        PythStructs.Price memory priceData = pyth.getPriceUnsafe(feed.feedId);

        if (priceData.expo > 18 || priceData.expo < -18) {
            revert Errors.ExponentOutOfRange(priceData.expo);
        }
        if (priceData.price < 0) {
            revert Errors.NegativePythPriceValue(priceData.price);
        }

        return block.timestamp <= priceData.publishTime + feed.heartbeat
            ? (true, uint256(int256(priceData.price)) * (10 ** (18 - SignedMath.abs(priceData.expo))))
            : (false, 0);
    }
}

File 2 of 11 : 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 11 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 4 of 11 : IOracleRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

import "@radiant-v2-core/interfaces/IPriceOracleGetter.sol";

interface IOracleRouter is IPriceOracleGetter {
    enum OracleProviderType {
        Chainlink,
        Pyth
    }
    /**
     * @notice Get the underlying price of a kToken asset
     * @param asset to get the underlying price of
     * @return The underlying asset price
     *  Zero means the price is unavailable.
     */

    /// @notice Gets a list of prices from a list of assets addresses
    /// @param assets The list of assets addresses
    function getAssetsPrices(address[] calldata assets) external view returns (uint256[] memory);

    /// @notice Gets the address of the source for an asset address
    /// @param asset The address of the asset
    /// @return address The address of the source, bytes32 The id of the source
    function getSourceOfAsset(address asset) external view returns (address, bytes32);

    /// @notice Set the source of an asset
    /// @param _asset The address of the asset
    /// @param _feedAddress The address of the feed
    /// @param _feedId The id of the feed
    /// @param _heartbeat The heartbeat of the feed
    /// @param _oracleType The type of the oracle
    /// @param isFallback True if the feed is a fallback
    function setAssetSource(
        address _asset,
        address _feedAddress,
        bytes32 _feedId,
        uint256 _heartbeat,
        OracleProviderType _oracleType,
        bool isFallback
    ) external;

    /**
     * @notice Updates multiple price feeds on Pyth oracle
     * @param priceUpdateData received from Pyth network and used to update the oracle
     */
    function updateUnderlyingPrices(bytes[] calldata priceUpdateData) external payable;
}

File 5 of 11 : Errors.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

/**
 * @title Errors library
 * @author Aave & Radiant
 * @custom:security-contact [email protected]
 * @notice Defines the error messages emitted by the different contracts of the Aave & Radiant protocols
 * @dev Error messages prefix glossary:
 *  - VL = ValidationLogic
 *  - MATH = Math libraries
 *  - CT = Common errors between tokens (AToken, VariableDebtToken and StableDebtToken)
 *  - AT = AToken
 *  - SDT = StableDebtToken
 *  - VDT = VariableDebtToken
 *  - LP = LendingPool
 *  - LPAPR = LendingPoolAddressesProviderRegistry
 *  - LPC = LendingPoolConfiguration
 *  - RL = ReserveLogic
 *  - LPCM = LendingPoolCollateralManager
 *  - P = Pausable
 */
library Errors {
    // Common errors
    error AddressZero();
    error AmountZero();
    error NotAContract();
    error NotAuthorized();

    // Oracle specific errors
    error NoFeedSet();
    error NoFallbackFeedSet();
    error NoPriceAvailable();
    error PoolDisabled();
    error PoolNotDisabled();
    // Oracle specific errors
    error RoundNotComplete();

    // Oracles General errors
    error InvalidOracleProviderType();
    error InvalidFeed();
    error NegativePythPriceValue(int64 price);
    error NegativeChainlinkPriceValue(int256 answer);
    error ExponentOutOfRange(int32 expo);

    // Riz Registry errors
    error PoolRegisteredAlready();
    error NoAddressProvider();
    error NotLPConfigurator();

    // Riz LockZap errors
    error CannotRizZap();
    error InvalidLendingPool();
    error InvalidRatio();
    error InvalidLockLength();
    error SlippageTooHigh();
    error SpecifiedSlippageExceedLimit();
    error InvalidZapETHSource();
    error ReceivedETHOnAlternativeAssetZap();
    error InsufficientETH();
    error SwapFailed(address asset, uint256 amount);
    error WrongRoute(address fromToken, address toToken);

    // RizLendingPoolConfigurator errors
    error DecimalsOutOfRange(uint256 decimals);

    // RizLendingPoolAddressesProvider errors
    error InvalidId(bytes32 id);
    error MarketIdAlreadySet();

    // Riz Leverager errors
    error ReceiveNotAllowed();
    error FallbackNotAllowed();

    /// @notice Disallow a loop count of 0
    error InvalidLoopCount();

    /// @notice Thrown when deployer sets the margin too high
    error MarginTooHigh();

    // Revenue Management errors
    error OutputTokenConfigLengthMismatch();
    error InputTokenConfigLengthMismatch();
    error IndexOutOfBounds();
    error OutputTokenBalanceOutOfRange();
    error TokenAlreadyAdded();
    error TokenNotPresent();
    error PercentageMismatch();
    error InvalidSwapStrategy();
    error DexSwapFailed();
    error ReceivedLessThanMinOutput();
    error InvalidInputData();
    error AddressNotApproved();
    error NativeAssetsNotSupported();
    error DuplicateOutputToken();

    // Bad Debt Manager errors
    error OnlyLendingPool();
    error UserAlreadyWithdrawn();
    error BadDebtIsZero();
    error UserAllowanceZero();
    error NotEmergencyAdmin();
    error InvalidAssetsLength();

    // BaseStrategy errors
    error NotSelf();

    // TokenizedStrategy errors
    error ReentrantCall();
    error NotManagement();
    error NotKeeper();
    error NotEmergencyAuthorized();
    error AlreadyInitialized();
    error InvalidChainID();
    error CannotBeSelf();
    error ZeroShares();
    error ZeroAssets();
    error DepositMoreThanMax();
    error MintMoreThanMax();
    error WithdrawMoreThanMax();
    error RedeemMoreThanMax();
    error SelfMint();
    error ExceedsMaxBPS();
    error TooMuchLoss();
    error NotShutdown();
    error NotPending();
    error ExceedsMaxFee();
    error TooLong();
    error InvalidTransfer();
    error CannotMintToAddressZero();
    error CannotBurnToAddressZero();
    error CannotApproveAddressZero();
    error InsufficientAllowance();
    error PermitDeadlineExpired();
    error InvalidSigner();

    // Common aave errors
    string public constant CALLER_NOT_POOL_ADMIN = "33"; // 'The caller must be the pool admin'
    string public constant BORROW_ALLOWANCE_NOT_ENOUGH = "59"; // User borrows on behalf, but allowance are too small

    // Contract specific errors
    string public constant VL_INVALID_AMOUNT = "1"; // 'Amount must be greater than 0'
    string public constant VL_NO_ACTIVE_RESERVE = "2"; // 'Action requires an active reserve'
    string public constant VL_RESERVE_FROZEN = "3"; // 'Action cannot be performed because the reserve is frozen'
    string public constant VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH = "4"; // 'The current liquidity is not enough'
    string public constant VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE = "5"; // 'User cannot withdraw more than the available
        // balance'
    string public constant VL_TRANSFER_NOT_ALLOWED = "6"; // 'Transfer cannot be allowed.'
    string public constant VL_BORROWING_NOT_ENABLED = "7"; // 'Borrowing is not enabled'
    string public constant VL_INVALID_INTEREST_RATE_MODE_SELECTED = "8"; // 'Invalid interest rate mode selected'
    string public constant VL_COLLATERAL_BALANCE_IS_0 = "9"; // 'The collateral balance is 0'
    string public constant VL_HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = "10"; // 'Health factor is lesser than
        // the liquidation threshold'
    string public constant VL_COLLATERAL_CANNOT_COVER_NEW_BORROW = "11"; // 'There is not enough collateral to cover a
        // new borrow'
    string public constant VL_STABLE_BORROWING_NOT_ENABLED = "12"; // stable borrowing not enabled
    string public constant VL_COLLATERAL_SAME_AS_BORROWING_CURRENCY = "13"; // collateral is (mostly) the same currency
        // that is being borrowed
    string public constant VL_AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = "14"; // 'The requested amount is greater than
        // the max loan size in stable rate mode
    string public constant VL_NO_DEBT_OF_SELECTED_TYPE = "15"; // 'for repayment of stable debt, the user needs to have
        // stable debt, otherwise, he needs to have variable debt'
    string public constant VL_NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = "16"; // 'To repay on behalf of an user an
        // explicit amount to repay is needed'
    string public constant VL_NO_STABLE_RATE_LOAN_IN_RESERVE = "17"; // 'User does not have a stable rate loan in
        // progress on this reserve'
    string public constant VL_NO_VARIABLE_RATE_LOAN_IN_RESERVE = "18"; // 'User does not have a variable rate loan in
        // progress on this reserve'
    string public constant VL_UNDERLYING_BALANCE_NOT_GREATER_THAN_0 = "19"; // 'The underlying balance needs to be
        // greater than 0'
    string public constant VL_DEPOSIT_ALREADY_IN_USE = "20"; // 'User deposit is already being used as collateral'
    string public constant LP_NOT_ENOUGH_STABLE_BORROW_BALANCE = "21"; // 'User does not have any stable rate loan for
        // this reserve'
    string public constant LP_INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = "22"; // 'Interest rate rebalance conditions
        // were not met'
    string public constant LP_LIQUIDATION_CALL_FAILED = "23"; // 'Liquidation call failed'
    string public constant LP_NOT_ENOUGH_LIQUIDITY_TO_BORROW = "24"; // 'There is not enough liquidity available to
        // borrow'
    string public constant LP_REQUESTED_AMOUNT_TOO_SMALL = "25"; // 'The requested amount is too small for a FlashLoan.'
    string public constant LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = "26"; // 'The actual balance of the protocol is
        // inconsistent'
    string public constant LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = "27"; // 'The caller of the function is not the
        // lending pool configurator'
    string public constant LP_INCONSISTENT_FLASHLOAN_PARAMS = "28";
    string public constant CT_CALLER_MUST_BE_LENDING_POOL = "29"; // 'The caller of this function must be a lending
        // pool'
    string public constant CT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = "30"; // 'User cannot give allowance to himself'
    string public constant CT_TRANSFER_AMOUNT_NOT_GT_0 = "31"; // 'Transferred amount needs to be greater than zero'
    string public constant RL_RESERVE_ALREADY_INITIALIZED = "32"; // 'Reserve has already been initialized'
    string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = "34"; // 'The liquidity of the reserve needs to be 0'
    string public constant LPC_INVALID_ATOKEN_POOL_ADDRESS = "35"; // 'The liquidity of the reserve needs to be 0'
    string public constant LPC_INVALID_STABLE_DEBT_TOKEN_POOL_ADDRESS = "36"; // 'The liquidity of the reserve needs to
        // be 0'
    string public constant LPC_INVALID_VARIABLE_DEBT_TOKEN_POOL_ADDRESS = "37"; // 'The liquidity of the reserve needs
        // to be 0'
    string public constant LPC_INVALID_STABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = "38"; // 'The liquidity of the reserve
        // needs to be 0'
    string public constant LPC_INVALID_VARIABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = "39"; // 'The liquidity of the reserve
        // needs to be 0'
    string public constant LPC_INVALID_ADDRESSES_PROVIDER_ID = "40"; // 'The liquidity of the reserve needs to be 0'
    string public constant LPC_INVALID_CONFIGURATION = "75"; // 'Invalid risk parameters for the reserve'
    string public constant LPC_CALLER_NOT_EMERGENCY_ADMIN = "76"; // 'The caller must be the emergency admin'
    string public constant LPAPR_PROVIDER_NOT_REGISTERED = "41"; // 'Provider is not registered'
    string public constant LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = "42"; // 'Health factor is not below the threshold'
    string public constant LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = "43"; // 'The collateral chosen cannot be liquidated'
    string public constant LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = "44"; // 'User did not borrow the specified
        // currency'
    string public constant LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = "45"; // "There isn't enough liquidity available to
        // liquidate"
    string public constant LPCM_NO_ERRORS = "46"; // 'No errors'
    string public constant LP_INVALID_FLASHLOAN_MODE = "47"; //Invalid flashloan mode selected
    string public constant MATH_MULTIPLICATION_OVERFLOW = "48";
    string public constant MATH_ADDITION_OVERFLOW = "49";
    string public constant MATH_DIVISION_BY_ZERO = "50";
    string public constant RL_LIQUIDITY_INDEX_OVERFLOW = "51"; //  Liquidity index overflows uint128
    string public constant RL_VARIABLE_BORROW_INDEX_OVERFLOW = "52"; //  Variable borrow index overflows uint128
    string public constant RL_LIQUIDITY_RATE_OVERFLOW = "53"; //  Liquidity rate overflows uint128
    string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = "54"; //  Variable borrow rate overflows uint128
    string public constant RL_STABLE_BORROW_RATE_OVERFLOW = "55"; //  Stable borrow rate overflows uint128
    string public constant CT_INVALID_MINT_AMOUNT = "56"; //invalid amount to mint
    string public constant LP_FAILED_REPAY_WITH_COLLATERAL = "57";
    string public constant CT_INVALID_BURN_AMOUNT = "58"; //invalid amount to burn
    string public constant LP_FAILED_COLLATERAL_SWAP = "60";
    string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = "61";
    string public constant LP_REENTRANCY_NOT_ALLOWED = "62";
    string public constant LP_CALLER_MUST_BE_AN_ATOKEN = "63";
    string public constant LP_IS_PAUSED = "64"; // 'Pool is paused'
    string public constant LP_NO_MORE_RESERVES_ALLOWED = "65";
    string public constant LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = "66";
    string public constant RC_INVALID_LTV = "67";
    string public constant RC_INVALID_LIQ_THRESHOLD = "68";
    string public constant RC_INVALID_LIQ_BONUS = "69";
    string public constant RC_INVALID_DECIMALS = "70";
    string public constant RC_INVALID_RESERVE_FACTOR = "71";
    string public constant LPAPR_INVALID_ADDRESSES_PROVIDER_ID = "72";
    string public constant VL_INCONSISTENT_FLASHLOAN_PARAMS = "73";
    string public constant LP_INCONSISTENT_PARAMS_LENGTH = "74";
    string public constant UL_INVALID_INDEX = "77";
    string public constant LP_NOT_CONTRACT = "78";
    string public constant SDT_STABLE_DEBT_OVERFLOW = "79";
    string public constant SDT_BURN_EXCEEDS_BALANCE = "80";

    /**
     * @dev Custom Radiant codes added +200 to avoid conflicts with the AaveV2/V3 ones
     * @custom:borrow-and-supply-caps
     */
    string public constant INVALID_BORROW_CAP = "201"; // Invalid borrow cap value
    string public constant INVALID_SUPPLY_CAP = "202"; // Invalid supply cap value
    string public constant BORROW_CAP_EXCEEDED = "203"; // Borrow cap is exceeded
    string public constant SUPPLY_CAP_EXCEEDED = "204"; // Supply cap is exceeded

    enum CollateralManagerErrors {
        NO_ERROR,
        NO_COLLATERAL_AVAILABLE,
        COLLATERAL_CANNOT_BE_LIQUIDATED,
        CURRRENCY_NOT_BORROWED,
        HEALTH_FACTOR_ABOVE_THRESHOLD,
        NOT_ENOUGH_LIQUIDITY,
        NO_ACTIVE_RESERVE,
        HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD,
        INVALID_EQUAL_ASSETS_TO_SWAP,
        FROZEN_RESERVE
    }
}

File 6 of 11 : IAggregatorV2V3.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

/**
 * @title The V2 & V3 Aggregator Interface
 * @notice Solidity V0.5 does not allow interfaces to inherit from other
 * interfaces so this contract is a combination of v0.5 AggregatorInterface.sol
 * and v0.5 AggregatorV3Interface.sol.
 */
interface IAggregatorV2V3 {
    //
    // V2 Interface:
    //
    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 timestamp);
    event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);

    //
    // V3 Interface:
    //
    function decimals() external view returns (uint8);
    function description() external view returns (string memory);
    function version() external view returns (uint256);

    // getRoundData and latestRoundData should both raise "No data present"
    // if they do not have data to report, instead of returning unset values
    // which could be misinterpreted as actual reported values.
    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);
}

File 7 of 11 : IPyth.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./PythStructs.sol";
import "./IPythEvents.sol";

/// @title Consume prices from the Pyth Network (https://pyth.network/).
/// @dev Please refer to the guidance at https://docs.pyth.network/consumers/best-practices for how to consume prices
/// safely.
/// @author Pyth Data Association
interface IPyth is IPythEvents {
    /// @notice Returns the period (in seconds) that a price feed is considered valid since its publish time
    function getValidTimePeriod() external view returns (uint256 validTimePeriod);

    /// @notice Returns the price and confidence interval.
    /// @dev Reverts if the price has not been updated within the last `getValidTimePeriod()` seconds.
    /// @param id The Pyth Price Feed ID of which to fetch the price and confidence interval.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getPrice(bytes32 id) external view returns (PythStructs.Price memory price);

    /// @notice Returns the exponentially-weighted moving average price and confidence interval.
    /// @dev Reverts if the EMA price is not available.
    /// @param id The Pyth Price Feed ID of which to fetch the EMA price and confidence interval.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getEmaPrice(bytes32 id) external view returns (PythStructs.Price memory price);

    /// @notice Returns the price of a price feed without any sanity checks.
    /// @dev This function returns the most recent price update in this contract without any recency checks.
    /// This function is unsafe as the returned price update may be arbitrarily far in the past.
    ///
    /// Users of this function should check the `publishTime` in the price to ensure that the returned price is
    /// sufficiently recent for their application. If you are considering using this function, it may be
    /// safer / easier to use either `getPrice` or `getPriceNoOlderThan`.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);

    /// @notice Returns the price that is no older than `age` seconds of the current time.
    /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in
    /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently
    /// recently.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);

    /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks.
    /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available.
    /// However, if the price is not recent this function returns the latest available price.
    ///
    /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that
    /// the returned price is recent or useful for any particular application.
    ///
    /// Users of this function should check the `publishTime` in the price to ensure that the returned price is
    /// sufficiently recent for their application. If you are considering using this function, it may be
    /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getEmaPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);

    /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds
    /// of the current time.
    /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in
    /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently
    /// recently.
    /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.
    function getEmaPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);

    /// @notice Update price feeds with given update messages.
    /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling
    /// `getUpdateFee` with the length of the `updateData` array.
    /// Prices will be updated if they are more recent than the current stored prices.
    /// The call will succeed even if the update is not the most recent.
    /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid.
    /// @param updateData Array of price update data.
    function updatePriceFeeds(bytes[] calldata updateData) external payable;

    /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is
    /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the
    /// given `publishTimes` for the price feeds and does not read the actual price update publish time within
    /// `updateData`.
    ///
    /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling
    /// `getUpdateFee` with the length of the `updateData` array.
    ///
    /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime
    /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have
    /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas.
    /// Otherwise, it calls updatePriceFeeds method to update the prices.
    ///
    /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid.
    /// @param updateData Array of price update data.
    /// @param priceIds Array of price ids.
    /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]`
    function updatePriceFeedsIfNecessary(
        bytes[] calldata updateData,
        bytes32[] calldata priceIds,
        uint64[] calldata publishTimes
    ) external payable;

    /// @notice Returns the required fee to update an array of price updates.
    /// @param updateData Array of price update data.
    /// @return feeAmount The required fee in Wei.
    function getUpdateFee(bytes[] calldata updateData) external view returns (uint256 feeAmount);

    /// @notice Parse `updateData` and return price feeds of the given `priceIds` if they are all published
    /// within `minPublishTime` and `maxPublishTime`.
    ///
    /// You can use this method if you want to use a Pyth price at a fixed time and not the most recent price;
    /// otherwise, please consider using `updatePriceFeeds`. This method does not store the price updates on-chain.
    ///
    /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling
    /// `getUpdateFee` with the length of the `updateData` array.
    ///
    ///
    /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is
    /// no update for any of the given `priceIds` within the given time range.
    /// @param updateData Array of price update data.
    /// @param priceIds Array of price ids.
    /// @param minPublishTime minimum acceptable publishTime for the given `priceIds`.
    /// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`.
    /// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order).
    function parsePriceFeedUpdates(
        bytes[] calldata updateData,
        bytes32[] calldata priceIds,
        uint64 minPublishTime,
        uint64 maxPublishTime
    ) external payable returns (PythStructs.PriceFeed[] memory priceFeeds);
}

File 8 of 11 : PythStructs.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

contract PythStructs {
    // A price with a degree of uncertainty, represented as a price +- a confidence interval.
    //
    // The confidence interval roughly corresponds to the standard error of a normal distribution.
    // Both the price and confidence are stored in a fixed-point numeric representation,
    // `x * (10^expo)`, where `expo` is the exponent.
    //
    // Please refer to the documentation at https://docs.pyth.network/price-feeds/best-practices for how
    // to use this price safely.
    struct Price {
        // Price
        int64 price;
        // Confidence interval around the price
        uint64 conf;
        // Price exponent
        int32 expo;
        // Unix timestamp describing when the price was published
        uint256 publishTime;
    }

    // PriceFeed represents a current aggregate price from pyth publisher feeds.
    struct PriceFeed {
        // The price ID.
        bytes32 id;
        // Latest available price
        Price price;
        // Latest available exponentially-weighted moving average price
        Price emaPrice;
    }
}

File 9 of 11 : 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 10 of 11 : IPriceOracleGetter.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;

/**
 * @title IPriceOracleGetter interface
 * @notice Interface for the Aave price oracle.
 **/

interface IPriceOracleGetter {
	/**
	 * @dev returns the asset price in ETH
	 * @param asset the address of the asset
	 * @return the ETH price of the asset
	 **/
	function getAssetPrice(address asset) external view returns (uint256);
}

File 11 of 11 : IPythEvents.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @title IPythEvents contains the events that Pyth contract emits.
/// @dev This interface can be used for listening to the updates for off-chain and testing purposes.
interface IPythEvents {
    /// @dev Emitted when the price feed with `id` has received a fresh update.
    /// @param id The Pyth Price Feed ID.
    /// @param publishTime Publish time of the given price update.
    /// @param price Price of the given price update.
    /// @param conf Confidence interval of the given price update.
    event PriceFeedUpdate(bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf);

    /// @dev Emitted when a batch price update is processed successfully.
    /// @param chainId ID of the source chain that the batch price update comes from.
    /// @param sequenceNumber Sequence number of the batch price update.
    event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@uniswap/v2-core/contracts/=lib/uniswap-v2-core/contracts/",
    "@layerzerolabs/solidity-examples/contracts/=lib/layer-zero/contracts/",
    "@radiant-v2-core/interfaces/=lib/radiant-v2-core/contracts/main/interfaces/",
    "@radiant-v2-core/lending/=lib/radiant-v2-core/contracts/main/lending/",
    "@radiant-v2-core/radiant/=lib/radiant-v2-core/contracts/main/radiant/",
    "@radiant-v2-core/mocks/=lib/radiant-v2-core/contracts/main/test/",
    "@balancer-labs/v2-interfaces/=lib/balancer-v2-monorepo/pkg/interfaces/",
    "@bgd-labs-stk-v3/contracts/=lib/bgd-labs-stk-v3/src/contracts/",
    "aave-token-v3/=lib/bgd-labs-stk-v3/lib/aave-token-v3/src/",
    "@aave/core-v3/=lib/bgd-labs-stk-v3/lib/aave-address-book/lib/aave-v3-core/",
    "@aave/periphery-v3/=lib/bgd-labs-stk-v3/lib/aave-address-book/lib/aave-v3-periphery/",
    "aave-address-book/=lib/bgd-labs-stk-v3/lib/aave-address-book/src/",
    "aave-helpers/=lib/bgd-labs-stk-v3/lib/aave-helpers/",
    "aave-token-v2/=lib/bgd-labs-stk-v3/lib/aave-token-v3/lib/aave-token-v2/contracts/",
    "aave-v3-core/=lib/bgd-labs-stk-v3/lib/aave-address-book/lib/aave-v3-core/",
    "aave-v3-periphery/=lib/bgd-labs-stk-v3/lib/aave-address-book/lib/aave-v3-periphery/",
    "balancer-v2-monorepo/=lib/balancer-v2-monorepo/",
    "bgd-labs-stk-v3/=lib/bgd-labs-stk-v3/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "governance-crosschain-bridges/=lib/bgd-labs-stk-v3/lib/aave-helpers/lib/governance-crosschain-bridges/",
    "layer-zero/=lib/layer-zero/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "radiant-v2-core/=lib/radiant-v2-core/contracts/",
    "solidity-utils/=lib/bgd-labs-stk-v3/lib/aave-helpers/lib/solidity-utils/",
    "uniswap-v2-core/=lib/uniswap-v2-core/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pyth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"DecimalsOutOfRange","type":"error"},{"inputs":[{"internalType":"int32","name":"expo","type":"int32"}],"name":"ExponentOutOfRange","type":"error"},{"inputs":[],"name":"InvalidFeed","type":"error"},{"inputs":[],"name":"InvalidOracleProviderType","type":"error"},{"inputs":[{"internalType":"int256","name":"answer","type":"int256"}],"name":"NegativeChainlinkPriceValue","type":"error"},{"inputs":[{"internalType":"int64","name":"price","type":"int64"}],"name":"NegativePythPriceValue","type":"error"},{"inputs":[],"name":"NoFallbackFeedSet","type":"error"},{"inputs":[],"name":"NoFeedSet","type":"error"},{"inputs":[],"name":"NoPriceAvailable","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"feedAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"feedId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"heartbeat","type":"uint256"}],"name":"FallbackFeedUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"feedAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"feedId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"heartbeat","type":"uint256"}],"name":"FeedUpdated","type":"event"},{"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":[],"name":"PricesUpdated","type":"event"},{"inputs":[],"name":"BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fallbackFeeds","outputs":[{"internalType":"address","name":"feedAddress","type":"address"},{"internalType":"bytes32","name":"feedId","type":"bytes32"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"enum IOracleRouter.OracleProviderType","name":"oracleProviderType","type":"uint8"},{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeds","outputs":[{"internalType":"address","name":"feedAddress","type":"address"},{"internalType":"bytes32","name":"feedId","type":"bytes32"},{"internalType":"uint256","name":"heartbeat","type":"uint256"},{"internalType":"enum IOracleRouter.OracleProviderType","name":"oracleProviderType","type":"uint8"},{"internalType":"bool","name":"isSet","type":"bool"}],"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":"asset","type":"address"}],"name":"getSourceOfAsset","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"_asset","type":"address"},{"internalType":"address","name":"_feedAddress","type":"address"},{"internalType":"bytes32","name":"_feedId","type":"bytes32"},{"internalType":"uint256","name":"_heartbeat","type":"uint256"},{"internalType":"enum IOracleRouter.OracleProviderType","name":"_oracleType","type":"uint8"},{"internalType":"bool","name":"isFallback","type":"bool"}],"name":"setAssetSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"priceUpdateData","type":"bytes[]"}],"name":"updateUnderlyingPrices","outputs":[],"stateMutability":"payable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001f4438038062001f448339810160408190526200003491620004fd565b6200003f3362000152565b604051806040016040528060006001600160a01b03168152602001620001a260201b620009c7176001600160401b0316815250600360008060018111156200008b576200008b6200052f565b60018111156200009f576200009f6200052f565b81526020808201929092526040908101600090812084518154958501516001600160a01b039182166001600160e01b031997881617600160a01b6001600160401b039283168102919091179093558451808601909552968116845262000337851b62000b761787168486019081526001909352600390945291517fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c80549251909616909202931691161717905562000815565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000836000015190506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000215919062000545565b60ff1690506012811115620002455760405163179a89b960e31b8152600481018290526024015b60405180910390fd5b60006200025482601262000580565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801562000298573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002be9190620005b7565b509350509250506000821215620002ec57604051631feb864760e11b8152600481018390526024016200023c565b6040880151620002fd90826200060c565b4211156200030e5760008062000329565b60016200031d84600a62000724565b62000329908462000732565b965096505050505050915091565b60016000908152600360209081527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5490830151604080516396834ad360e01b815260048101929092525183926001600160a01b031691839183916396834ad39160248083019260809291908290030181865afa158015620003bd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003e391906200077f565b90506012816040015160030b1380620004045750601119816040015160030b125b1562000430576040808201519051637c6c877160e01b815260039190910b60048201526024016200023c565b6000816000015160070b12156200046457805160405163d9057f0d60e01b815260079190910b60048201526024016200023c565b846040015181606001516200047a91906200060c565b4211156200048b57600080620004d5565b6001620004aa826040015160030b620004e060201b62000d4b1760201c565b620004b790601262000580565b620004c490600a62000724565b8251620004d5919060070b62000732565b935093505050915091565b600080821215620004f55781600003620004f7565b815b92915050565b6000602082840312156200051057600080fd5b81516001600160a01b03811681146200052857600080fd5b9392505050565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156200055857600080fd5b815160ff811681146200052857600080fd5b634e487b7160e01b600052601160045260246000fd5b6000828210156200059557620005956200056a565b500390565b80516001600160501b0381168114620005b257600080fd5b919050565b600080600080600060a08688031215620005d057600080fd5b620005db866200059a565b945060208601519350604086015192506060860151915062000600608087016200059a565b90509295509295909350565b600082198211156200062257620006226200056a565b500190565b600181815b80851115620006685781600019048211156200064c576200064c6200056a565b808516156200065a57918102915b93841c93908002906200062c565b509250929050565b6000826200068157506001620004f7565b816200069057506000620004f7565b8160018114620006a95760028114620006b457620006d4565b6001915050620004f7565b60ff841115620006c857620006c86200056a565b50506001821b620004f7565b5060208310610133831016604e8410600b8410161715620006f9575081810a620004f7565b62000705838362000627565b80600019048211156200071c576200071c6200056a565b029392505050565b600062000528838362000670565b60008160001904831182151516156200074f576200074f6200056a565b500290565b80516001600160401b0381168114620005b257600080fd5b8051600381900b8114620005b257600080fd5b6000608082840312156200079257600080fd5b604051608081016001600160401b0381118282101715620007c357634e487b7160e01b600052604160045260246000fd5b6040528251600781900b8114620007d957600080fd5b8152620007e96020840162000754565b6020820152620007fc604084016200076c565b6040820152606083015160608201528091505092915050565b61171f80620008256000396000f3fe6080604052600436106100bc5760003560e01c80638da5cb5b11610074578063b3596f071161004e578063b3596f0714610278578063f2fde38b14610298578063f84054b3146102b857600080fd5b80638da5cb5b146101e457806392bf2be01461020c5780639d23d9f21461024b57600080fd5b80632fba4aa9116100a55780632fba4aa91461014a578063715018a6146101a55780638c89b64f146101ba57600080fd5b80631fb0b5a7146100c157806329f9c4a614610135575b600080fd5b3480156100cd57600080fd5b5061011b6100dc36600461115c565b600260208190526000918252604090912080546001820154928201546003909201546001600160a01b0390911692919060ff8082169161010090041685565b60405161012c959493929190611194565b60405180910390f35b610148610143366004611234565b6102d8565b005b34801561015657600080fd5b5061011b61016536600461115c565b600160208190526000918252604090912080549181015460028201546003909201546001600160a01b039093169290919060ff8082169161010090041685565b3480156101b157600080fd5b5061014861047e565b3480156101c657600080fd5b506101d6670de0b6b3a764000081565b60405190815260200161012c565b3480156101f057600080fd5b506000546040516001600160a01b03909116815260200161012c565b34801561021857600080fd5b5061022c61022736600461115c565b610492565b604080516001600160a01b03909316835260208301919091520161012c565b34801561025757600080fd5b5061026b610266366004611234565b6105f8565b60405161012c9190611276565b34801561028457600080fd5b506101d661029336600461115c565b6106a7565b3480156102a457600080fd5b506101486102b336600461115c565b610914565b3480156102c457600080fd5b506101486102d33660046112ba565b6109a9565b6001600090815260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c546040517fd47eed450000000000000000000000000000000000000000000000000000000081526001600160a01b039091169190829063d47eed45906103519087908790600401611358565b602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039291906113f3565b9050816001600160a01b031663ef9e5e288286866040518463ffffffff1660e01b81526004016103c3929190611358565b6000604051808303818588803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b5050505050336001600160a01b0316813461040b9190611422565b604051600081818185875af1925050503d8060008114610447576040519150601f19603f3d011682016040523d82523d6000602084013e61044c565b606091505b50506040517f50cf648ca06d54ba1c9146903ca81ec64d809adc4e1430d85dda94720ea8528e9150600090a150505050565b610486610d62565b6104906000610dbc565b565b6001600160a01b038082166000908152600160208181526040808420815160a0810183528154909616865280840154928601929092526002820154908501526003810154929384938493919291606084019160ff16908111156104f7576104f761117e565b60018111156105085761050861117e565b815260039190910154610100900460ff1615156020909101526080810151909150156105405780516020909101519094909350915050565b6001600160a01b03808516600090815260026020818152604092839020835160a0810185528154909516855260018082015492860192909252918201549284019290925260038101549091606084019160ff16908111156105a3576105a361117e565b60018111156105b4576105b461117e565b815260039190910154610100900460ff1615156020909101526080810151909150156105ec5780516020909101519094909350915050565b50600093849350915050565b60608160008167ffffffffffffffff81111561061657610616611439565b60405190808252806020026020018201604052801561063f578160200160208202803683370190505b50905060005b8281101561069c576106778686838181106106625761066261144f565b9050602002016020810190610293919061115c565b8282815181106106895761068961144f565b6020908102919091010152600101610645565b509150505b92915050565b6001600160a01b038082166000908152600160208181526040808420815160a0810183528154909616865280840154928601929092526002820154908501526003810154929384939092606084019160ff16908111156107095761070961117e565b600181111561071a5761071a61117e565b815260039190910154610100900460ff1615156020909101526080810151909150610771576040517f4b846ba500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806107d88360036000866060015160018111156107925761079261117e565b60018111156107a3576107a361117e565b815260200190815260200160002060000160149054906101000a90048015611138021767ffffffffffffffff1663ffffffff16565b9092509050816108ee576001600160a01b03808616600090815260026020818152604092839020835160a0810185528154909516855260018082015492860192909252918201549284019290925260038101549091606084019160ff16908111156108455761084561117e565b60018111156108565761085661117e565b815260039190910154610100900460ff16151560209091015260808101519093506108ad576040517f1135638a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cb8360036000866060015160018111156107925761079261117e565b9092509050816108ee57604051631821d12360e31b815260040160405180910390fd5b8061090c57604051631821d12360e31b815260040160405180910390fd5b949350505050565b61091c610d62565b6001600160a01b03811661099d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6109a681610dbc565b50565b6109b1610d62565b6109bf868686868686610e19565b505050505050565b6000806000836000015190506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a379190611465565b60ff1690506012811115610a7a576040517fbcd44dc800000000000000000000000000000000000000000000000000000000815260048101829052602401610994565b6000610a87826012611422565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee91906114a2565b509350509250506000821215610b33576040517f3fd70c8e00000000000000000000000000000000000000000000000000000000815260048101839052602401610994565b6040880151610b4290826114f2565b421115610b5157600080610b68565b6001610b5e84600a6115ee565b610b6890846115fa565b965096505050505050915091565b60016000908152600360209081527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5490830151604080517f96834ad300000000000000000000000000000000000000000000000000000000815260048101929092525183926001600160a01b031691839183916396834ad39160248083019260809291908290030181865afa158015610c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c389190611643565b90506012816040015160030b1380610c585750601119816040015160030b125b15610c9b5760408082015190517f7c6c877100000000000000000000000000000000000000000000000000000000815260039190910b6004820152602401610994565b6000816000015160070b1215610ce65780516040517fd9057f0d00000000000000000000000000000000000000000000000000000000815260079190910b6004820152602401610994565b84604001518160600151610cfa91906114f2565b421115610d0957600080610d40565b6001610d1b826040015160030b610d4b565b610d26906012611422565b610d3190600a6115ee565b8251610d40919060070b6115fa565b935093505050915091565b600080821215610d5e57816000036106a1565b5090565b6000546001600160a01b031633146104905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610994565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826001811115610e2d57610e2d61117e565b1415610e5f576001600160a01b038516610e5a576040516301f86e1760e41b815260040160405180910390fd5b610ec9565b6001826001811115610e7357610e7361117e565b1415610e975783610e5a576040516301f86e1760e41b815260040160405180910390fd5b6040517f5f53190f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611000576040518060a00160405280866001600160a01b03168152602001858152602001848152602001836001811115610f0657610f0661117e565b8152600160209182018190526001600160a01b0389811660009081528284526040908190208551815473ffffffffffffffffffffffffffffffffffffffff19169316929092178255928401518183015591830151600283015560608301516003830180549192909160ff1916908381811115610f8457610f8461117e565b02179055506080918201516003909101805461ff00191661010092151592909202919091179055604080516001600160a01b03808a16825288166020820152908101869052606081018590527f5f6f651912ed6dc0bb0e3759055ed34e69a156c1ce175817213eaccbd71c85b3910160405180910390a16109bf565b6040518060a00160405280866001600160a01b031681526020018581526020018481526020018360018111156110385761103861117e565b8152600160209182018190526001600160a01b03898116600090815260028085526040918290208651815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835593850151828401558401519281019290925560608301516003830180549192909160ff19169083818111156110b9576110b961117e565b02179055506080918201516003909101805461ff00191661010092151592909202919091179055604080516001600160a01b03808a16825288166020820152908101869052606081018590527fba4de6fdbbb67a457da6a88f5baaec6bb2fe4bc61c4a74a8731c70602ae9a4b7910160405180910390a1505050505050565b6104906116d3565b80356001600160a01b038116811461115757600080fd5b919050565b60006020828403121561116e57600080fd5b61117782611140565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386168152602081018590526040810184905260a08101600284106111d057634e487b7160e01b600052602160045260246000fd5b83606083015282151560808301529695505050505050565b60008083601f8401126111fa57600080fd5b50813567ffffffffffffffff81111561121257600080fd5b6020830191508360208260051b850101111561122d57600080fd5b9250929050565b6000806020838503121561124757600080fd5b823567ffffffffffffffff81111561125e57600080fd5b61126a858286016111e8565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156112ae57835183529284019291840191600101611292565b50909695505050505050565b60008060008060008060c087890312156112d357600080fd5b6112dc87611140565b95506112ea60208801611140565b9450604087013593506060870135925060808701356002811061130c57600080fd5b915060a0870135801515811461132157600080fd5b809150509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208082528181018390526000906040600585901b8401810190840186845b878110156113e657868403603f190183528135368a9003601e1901811261139d57600080fd5b8901803567ffffffffffffffff8111156113b657600080fd5b8036038b13156113c557600080fd5b6113d2868289850161132f565b955050509184019190840190600101611377565b5091979650505050505050565b60006020828403121561140557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156114345761143461140c565b500390565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561147757600080fd5b815160ff8116811461117757600080fd5b805169ffffffffffffffffffff8116811461115757600080fd5b600080600080600060a086880312156114ba57600080fd5b6114c386611488565b94506020860151935060408601519250606086015191506114e660808701611488565b90509295509295909350565b600082198211156115055761150561140c565b500190565b600181815b8085111561154557816000190482111561152b5761152b61140c565b8085161561153857918102915b93841c939080029061150f565b509250929050565b60008261155c575060016106a1565b81611569575060006106a1565b816001811461157f5760028114611589576115a5565b60019150506106a1565b60ff84111561159a5761159a61140c565b50506001821b6106a1565b5060208310610133831016604e8410600b84101617156115c8575081810a6106a1565b6115d2838361150a565b80600019048211156115e6576115e661140c565b029392505050565b6000611177838361154d565b60008160001904831182151516156116145761161461140c565b500290565b805167ffffffffffffffff8116811461115757600080fd5b8051600381900b811461115757600080fd5b60006080828403121561165557600080fd5b6040516080810181811067ffffffffffffffff8211171561168657634e487b7160e01b600052604160045260246000fd5b6040528251600781900b811461169b57600080fd5b81526116a960208401611619565b60208201526116ba60408401611631565b6040820152606083015160608201528091505092915050565b634e487b7160e01b600052605160045260246000fdfea2646970667358221220cdbc45c5d84130c14e976541e5ed280411c8d02d0f441507811891f1e1e4771964736f6c634300080c00330000000000000000000000004305fb66699c3b2702d4d05cf36551390a4c69c6

Deployed Bytecode

0x6080604052600436106100bc5760003560e01c80638da5cb5b11610074578063b3596f071161004e578063b3596f0714610278578063f2fde38b14610298578063f84054b3146102b857600080fd5b80638da5cb5b146101e457806392bf2be01461020c5780639d23d9f21461024b57600080fd5b80632fba4aa9116100a55780632fba4aa91461014a578063715018a6146101a55780638c89b64f146101ba57600080fd5b80631fb0b5a7146100c157806329f9c4a614610135575b600080fd5b3480156100cd57600080fd5b5061011b6100dc36600461115c565b600260208190526000918252604090912080546001820154928201546003909201546001600160a01b0390911692919060ff8082169161010090041685565b60405161012c959493929190611194565b60405180910390f35b610148610143366004611234565b6102d8565b005b34801561015657600080fd5b5061011b61016536600461115c565b600160208190526000918252604090912080549181015460028201546003909201546001600160a01b039093169290919060ff8082169161010090041685565b3480156101b157600080fd5b5061014861047e565b3480156101c657600080fd5b506101d6670de0b6b3a764000081565b60405190815260200161012c565b3480156101f057600080fd5b506000546040516001600160a01b03909116815260200161012c565b34801561021857600080fd5b5061022c61022736600461115c565b610492565b604080516001600160a01b03909316835260208301919091520161012c565b34801561025757600080fd5b5061026b610266366004611234565b6105f8565b60405161012c9190611276565b34801561028457600080fd5b506101d661029336600461115c565b6106a7565b3480156102a457600080fd5b506101486102b336600461115c565b610914565b3480156102c457600080fd5b506101486102d33660046112ba565b6109a9565b6001600090815260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c546040517fd47eed450000000000000000000000000000000000000000000000000000000081526001600160a01b039091169190829063d47eed45906103519087908790600401611358565b602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039291906113f3565b9050816001600160a01b031663ef9e5e288286866040518463ffffffff1660e01b81526004016103c3929190611358565b6000604051808303818588803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b5050505050336001600160a01b0316813461040b9190611422565b604051600081818185875af1925050503d8060008114610447576040519150601f19603f3d011682016040523d82523d6000602084013e61044c565b606091505b50506040517f50cf648ca06d54ba1c9146903ca81ec64d809adc4e1430d85dda94720ea8528e9150600090a150505050565b610486610d62565b6104906000610dbc565b565b6001600160a01b038082166000908152600160208181526040808420815160a0810183528154909616865280840154928601929092526002820154908501526003810154929384938493919291606084019160ff16908111156104f7576104f761117e565b60018111156105085761050861117e565b815260039190910154610100900460ff1615156020909101526080810151909150156105405780516020909101519094909350915050565b6001600160a01b03808516600090815260026020818152604092839020835160a0810185528154909516855260018082015492860192909252918201549284019290925260038101549091606084019160ff16908111156105a3576105a361117e565b60018111156105b4576105b461117e565b815260039190910154610100900460ff1615156020909101526080810151909150156105ec5780516020909101519094909350915050565b50600093849350915050565b60608160008167ffffffffffffffff81111561061657610616611439565b60405190808252806020026020018201604052801561063f578160200160208202803683370190505b50905060005b8281101561069c576106778686838181106106625761066261144f565b9050602002016020810190610293919061115c565b8282815181106106895761068961144f565b6020908102919091010152600101610645565b509150505b92915050565b6001600160a01b038082166000908152600160208181526040808420815160a0810183528154909616865280840154928601929092526002820154908501526003810154929384939092606084019160ff16908111156107095761070961117e565b600181111561071a5761071a61117e565b815260039190910154610100900460ff1615156020909101526080810151909150610771576040517f4b846ba500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806107d88360036000866060015160018111156107925761079261117e565b60018111156107a3576107a361117e565b815260200190815260200160002060000160149054906101000a90048015611138021767ffffffffffffffff1663ffffffff16565b9092509050816108ee576001600160a01b03808616600090815260026020818152604092839020835160a0810185528154909516855260018082015492860192909252918201549284019290925260038101549091606084019160ff16908111156108455761084561117e565b60018111156108565761085661117e565b815260039190910154610100900460ff16151560209091015260808101519093506108ad576040517f1135638a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cb8360036000866060015160018111156107925761079261117e565b9092509050816108ee57604051631821d12360e31b815260040160405180910390fd5b8061090c57604051631821d12360e31b815260040160405180910390fd5b949350505050565b61091c610d62565b6001600160a01b03811661099d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6109a681610dbc565b50565b6109b1610d62565b6109bf868686868686610e19565b505050505050565b6000806000836000015190506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a379190611465565b60ff1690506012811115610a7a576040517fbcd44dc800000000000000000000000000000000000000000000000000000000815260048101829052602401610994565b6000610a87826012611422565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee91906114a2565b509350509250506000821215610b33576040517f3fd70c8e00000000000000000000000000000000000000000000000000000000815260048101839052602401610994565b6040880151610b4290826114f2565b421115610b5157600080610b68565b6001610b5e84600a6115ee565b610b6890846115fa565b965096505050505050915091565b60016000908152600360209081527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5490830151604080517f96834ad300000000000000000000000000000000000000000000000000000000815260048101929092525183926001600160a01b031691839183916396834ad39160248083019260809291908290030181865afa158015610c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c389190611643565b90506012816040015160030b1380610c585750601119816040015160030b125b15610c9b5760408082015190517f7c6c877100000000000000000000000000000000000000000000000000000000815260039190910b6004820152602401610994565b6000816000015160070b1215610ce65780516040517fd9057f0d00000000000000000000000000000000000000000000000000000000815260079190910b6004820152602401610994565b84604001518160600151610cfa91906114f2565b421115610d0957600080610d40565b6001610d1b826040015160030b610d4b565b610d26906012611422565b610d3190600a6115ee565b8251610d40919060070b6115fa565b935093505050915091565b600080821215610d5e57816000036106a1565b5090565b6000546001600160a01b031633146104905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610994565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826001811115610e2d57610e2d61117e565b1415610e5f576001600160a01b038516610e5a576040516301f86e1760e41b815260040160405180910390fd5b610ec9565b6001826001811115610e7357610e7361117e565b1415610e975783610e5a576040516301f86e1760e41b815260040160405180910390fd5b6040517f5f53190f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611000576040518060a00160405280866001600160a01b03168152602001858152602001848152602001836001811115610f0657610f0661117e565b8152600160209182018190526001600160a01b0389811660009081528284526040908190208551815473ffffffffffffffffffffffffffffffffffffffff19169316929092178255928401518183015591830151600283015560608301516003830180549192909160ff1916908381811115610f8457610f8461117e565b02179055506080918201516003909101805461ff00191661010092151592909202919091179055604080516001600160a01b03808a16825288166020820152908101869052606081018590527f5f6f651912ed6dc0bb0e3759055ed34e69a156c1ce175817213eaccbd71c85b3910160405180910390a16109bf565b6040518060a00160405280866001600160a01b031681526020018581526020018481526020018360018111156110385761103861117e565b8152600160209182018190526001600160a01b03898116600090815260028085526040918290208651815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835593850151828401558401519281019290925560608301516003830180549192909160ff19169083818111156110b9576110b961117e565b02179055506080918201516003909101805461ff00191661010092151592909202919091179055604080516001600160a01b03808a16825288166020820152908101869052606081018590527fba4de6fdbbb67a457da6a88f5baaec6bb2fe4bc61c4a74a8731c70602ae9a4b7910160405180910390a1505050505050565b6104906116d3565b80356001600160a01b038116811461115757600080fd5b919050565b60006020828403121561116e57600080fd5b61117782611140565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386168152602081018590526040810184905260a08101600284106111d057634e487b7160e01b600052602160045260246000fd5b83606083015282151560808301529695505050505050565b60008083601f8401126111fa57600080fd5b50813567ffffffffffffffff81111561121257600080fd5b6020830191508360208260051b850101111561122d57600080fd5b9250929050565b6000806020838503121561124757600080fd5b823567ffffffffffffffff81111561125e57600080fd5b61126a858286016111e8565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156112ae57835183529284019291840191600101611292565b50909695505050505050565b60008060008060008060c087890312156112d357600080fd5b6112dc87611140565b95506112ea60208801611140565b9450604087013593506060870135925060808701356002811061130c57600080fd5b915060a0870135801515811461132157600080fd5b809150509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208082528181018390526000906040600585901b8401810190840186845b878110156113e657868403603f190183528135368a9003601e1901811261139d57600080fd5b8901803567ffffffffffffffff8111156113b657600080fd5b8036038b13156113c557600080fd5b6113d2868289850161132f565b955050509184019190840190600101611377565b5091979650505050505050565b60006020828403121561140557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156114345761143461140c565b500390565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561147757600080fd5b815160ff8116811461117757600080fd5b805169ffffffffffffffffffff8116811461115757600080fd5b600080600080600060a086880312156114ba57600080fd5b6114c386611488565b94506020860151935060408601519250606086015191506114e660808701611488565b90509295509295909350565b600082198211156115055761150561140c565b500190565b600181815b8085111561154557816000190482111561152b5761152b61140c565b8085161561153857918102915b93841c939080029061150f565b509250929050565b60008261155c575060016106a1565b81611569575060006106a1565b816001811461157f5760028114611589576115a5565b60019150506106a1565b60ff84111561159a5761159a61140c565b50506001821b6106a1565b5060208310610133831016604e8410600b84101617156115c8575081810a6106a1565b6115d2838361150a565b80600019048211156115e6576115e661140c565b029392505050565b6000611177838361154d565b60008160001904831182151516156116145761161461140c565b500290565b805167ffffffffffffffff8116811461115757600080fd5b8051600381900b811461115757600080fd5b60006080828403121561165557600080fd5b6040516080810181811067ffffffffffffffff8211171561168657634e487b7160e01b600052604160045260246000fd5b6040528251600781900b811461169b57600080fd5b81526116a960208401611619565b60208201526116ba60408401611631565b6040820152606083015160608201528091505092915050565b634e487b7160e01b600052605160045260246000fdfea2646970667358221220cdbc45c5d84130c14e976541e5ed280411c8d02d0f441507811891f1e1e4771964736f6c634300080c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004305fb66699c3b2702d4d05cf36551390a4c69c6

-----Decoded View---------------
Arg [0] : _pyth (address): 0x4305FB66699C3B2702D4d05CF36551390A4c69C6

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004305fb66699c3b2702d4d05cf36551390a4c69c6


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.