Contract 0x5199ba2B0EE6cc970F42ab35BBEd3a265c542991 1

 
Txn Hash Method
Block
From
To
Value
0xe586d01c77b29b24ca5d880fc3ce95c51bce5ef5e5eab620c5210a5eb040a9610x60806040183316362022-08-08 13:44:11598 days 12 hrs agoAngle Protocol: Deployer IN  Create: OracleOPEURChainlinkOptimism0 ETH0.000450608280.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa4ec0df467b74e8ffc777008ea68570175524334bfd04a112175c8ed98be26f21075455572023-07-30 4:04:51242 days 21 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0xa4ec0df467b74e8ffc777008ea68570175524334bfd04a112175c8ed98be26f21075455572023-07-30 4:04:51242 days 21 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0xa4ec0df467b74e8ffc777008ea68570175524334bfd04a112175c8ed98be26f21075455572023-07-30 4:04:51242 days 21 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0xeea307022ed6f81b7894d76b07bf8a793d301cb064990241c30a27480fb6f4961073557112023-07-25 18:36:39247 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0xeea307022ed6f81b7894d76b07bf8a793d301cb064990241c30a27480fb6f4961073557112023-07-25 18:36:39247 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0xeea307022ed6f81b7894d76b07bf8a793d301cb064990241c30a27480fb6f4961073557112023-07-25 18:36:39247 days 7 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x5372f6e750436c926d87bf7cd3a28ee4f0ac7cfcf18210e7b1ddf06e285233991073543592023-07-25 17:51:35247 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x5372f6e750436c926d87bf7cd3a28ee4f0ac7cfcf18210e7b1ddf06e285233991073543592023-07-25 17:51:35247 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x5372f6e750436c926d87bf7cd3a28ee4f0ac7cfcf18210e7b1ddf06e285233991073543592023-07-25 17:51:35247 days 7 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x0c45fbd1253551ecd8748f5fcb7755be223f48ffbc5428ccf5aaef8b3d4d023a1073397082023-07-25 9:43:13247 days 16 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x0c45fbd1253551ecd8748f5fcb7755be223f48ffbc5428ccf5aaef8b3d4d023a1073397082023-07-25 9:43:13247 days 16 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x0c45fbd1253551ecd8748f5fcb7755be223f48ffbc5428ccf5aaef8b3d4d023a1073397082023-07-25 9:43:13247 days 16 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x3de1d0fddc015d9c4724964c2de1979dd667ad875162c04bcd2caca72d9979f81071753282023-07-21 14:23:53251 days 11 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x3de1d0fddc015d9c4724964c2de1979dd667ad875162c04bcd2caca72d9979f81071753282023-07-21 14:23:53251 days 11 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x3de1d0fddc015d9c4724964c2de1979dd667ad875162c04bcd2caca72d9979f81071753282023-07-21 14:23:53251 days 11 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x46873ff28e988faddb60c150e74b63ad32136d3e9fb744e884a8a9835caba3151070955362023-07-19 18:04:09253 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x46873ff28e988faddb60c150e74b63ad32136d3e9fb744e884a8a9835caba3151070955362023-07-19 18:04:09253 days 7 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x46873ff28e988faddb60c150e74b63ad32136d3e9fb744e884a8a9835caba3151070955362023-07-19 18:04:09253 days 7 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x71ca07d777d67145f078a094fb6f8f8582abaddbc70859ed71c753e8ea754b351069991422023-07-17 12:31:01255 days 13 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x71ca07d777d67145f078a094fb6f8f8582abaddbc70859ed71c753e8ea754b351069991422023-07-17 12:31:01255 days 13 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x71ca07d777d67145f078a094fb6f8f8582abaddbc70859ed71c753e8ea754b351069991422023-07-17 12:31:01255 days 13 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x3284e69401dc75129d2b58918633e844c67d76c97398238c0e118dadb661ee821069942072023-07-17 9:46:31255 days 16 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
0x3284e69401dc75129d2b58918633e844c67d76c97398238c0e118dadb661ee821069942072023-07-17 9:46:31255 days 16 hrs ago Angle Protocol: agEUR - OP Oracle 0x0d276fc14719f9292d5c1ea2198673d1f42692460 ETH
0x3284e69401dc75129d2b58918633e844c67d76c97398238c0e118dadb661ee821069942072023-07-17 9:46:31255 days 16 hrs ago Angle Protocol: agEUR - OP Manager Angle Protocol: agEUR - OP Oracle0 ETH
0x380e8bc4b7307c87d236592eea4819b628873f7aa88b60ce1e47a47ced2d5a871069878932023-07-17 6:16:03255 days 19 hrs ago Angle Protocol: agEUR - OP Oracle 0x3626369857a10ccc6cc3a6e4f5c2f5984a519f200 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleOPEURChainlinkOptimism

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 9 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {

  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 2 of 9 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 3 of 9 : IAgToken.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

/// @title IAgToken
/// @author Angle Core Team
/// @notice Interface for the stablecoins `AgToken` contracts
/// @dev This interface only contains functions of the `AgToken` contract which are called by other contracts
/// of this module or of the first module of the Angle Protocol
interface IAgToken is IERC20Upgradeable {
    // ======================= Minter Role Only Functions ===========================

    /// @notice Lets the `StableMaster` contract or another whitelisted contract mint agTokens
    /// @param account Address to mint to
    /// @param amount Amount to mint
    /// @dev The contracts allowed to issue agTokens are the `StableMaster` contract, `VaultManager` contracts
    /// associated to this stablecoin as well as the flash loan module (if activated) and potentially contracts
    /// whitelisted by governance
    function mint(address account, uint256 amount) external;

    /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`
    /// @param amount Amount of tokens to burn
    /// @param burner Address to burn from
    /// @param sender Address which requested the burn from `burner`
    /// @dev This method is to be called by a contract with the minter right after being requested
    /// to do so by a `sender` address willing to burn tokens from another `burner` address
    /// @dev The method checks the allowance between the `sender` and the `burner`
    function burnFrom(
        uint256 amount,
        address burner,
        address sender
    ) external;

    /// @notice Burns `amount` tokens from a `burner` address
    /// @param amount Amount of tokens to burn
    /// @param burner Address to burn from
    /// @dev This method is to be called by a contract with a minter right on the AgToken after being
    /// requested to do so by an address willing to burn tokens from its address
    function burnSelf(uint256 amount, address burner) external;

    // ========================= Treasury Only Functions ===========================

    /// @notice Adds a minter in the contract
    /// @param minter Minter address to add
    /// @dev Zero address checks are performed directly in the `Treasury` contract
    function addMinter(address minter) external;

    /// @notice Removes a minter from the contract
    /// @param minter Minter address to remove
    /// @dev This function can also be called by a minter wishing to revoke itself
    function removeMinter(address minter) external;

    /// @notice Sets a new treasury contract
    /// @param _treasury New treasury address
    function setTreasury(address _treasury) external;

    // ========================= External functions ================================

    /// @notice Checks whether an address has the right to mint agTokens
    /// @param minter Address for which the minting right should be checked
    /// @return Whether the address has the right to mint agTokens or not
    function isMinter(address minter) external view returns (bool);
}

File 4 of 9 : ICoreBorrow.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

/// @title ICoreBorrow
/// @author Angle Core Team
/// @notice Interface for the `CoreBorrow` contract
/// @dev This interface only contains functions of the `CoreBorrow` contract which are called by other contracts
/// of this module
interface ICoreBorrow {
    /// @notice Checks if an address corresponds to a treasury of a stablecoin with a flash loan
    /// module initialized on it
    /// @param treasury Address to check
    /// @return Whether the address has the `FLASHLOANER_TREASURY_ROLE` or not
    function isFlashLoanerTreasury(address treasury) external view returns (bool);

    /// @notice Checks whether an address is governor of the Angle Protocol or not
    /// @param admin Address to check
    /// @return Whether the address has the `GOVERNOR_ROLE` or not
    function isGovernor(address admin) external view returns (bool);

    /// @notice Checks whether an address is governor or a guardian of the Angle Protocol or not
    /// @param admin Address to check
    /// @return Whether the address has the `GUARDIAN_ROLE` or not
    /// @dev Governance should make sure when adding a governor to also give this governor the guardian
    /// role by calling the `addGovernor` function
    function isGovernorOrGuardian(address admin) external view returns (bool);
}

File 5 of 9 : IFlashAngle.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "./IAgToken.sol";
import "./ICoreBorrow.sol";

/// @title IFlashAngle
/// @author Angle Core Team
/// @notice Interface for the `FlashAngle` contract
/// @dev This interface only contains functions of the contract which are called by other contracts
/// of this module
interface IFlashAngle {
    /// @notice Reference to the `CoreBorrow` contract managing the FlashLoan module
    function core() external view returns (ICoreBorrow);

    /// @notice Sends the fees taken from flash loans to the treasury contract associated to the stablecoin
    /// @param stablecoin Stablecoin from which profits should be sent
    /// @return balance Amount of profits sent
    /// @dev This function can only be called by the treasury contract
    function accrueInterestToTreasury(IAgToken stablecoin) external returns (uint256 balance);

    /// @notice Adds support for a stablecoin
    /// @param _treasury Treasury associated to the stablecoin to add support for
    /// @dev This function can only be called by the `CoreBorrow` contract
    function addStablecoinSupport(address _treasury) external;

    /// @notice Removes support for a stablecoin
    /// @param _treasury Treasury associated to the stablecoin to remove support for
    /// @dev This function can only be called by the `CoreBorrow` contract
    function removeStablecoinSupport(address _treasury) external;

    /// @notice Sets a new core contract
    /// @param _core Core contract address to set
    /// @dev This function can only be called by the `CoreBorrow` contract
    function setCore(address _core) external;
}

File 6 of 9 : IOracle.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "./ITreasury.sol";

/// @title IOracle
/// @author Angle Core Team
/// @notice Interface for the `Oracle` contract
/// @dev This interface only contains functions of the contract which are called by other contracts
/// of this module
interface IOracle {
    /// @notice Reads the rate from the Chainlink circuit and other data provided
    /// @return quoteAmount The current rate between the in-currency and out-currency in the base
    /// of the out currency
    /// @dev For instance if the out currency is EUR (and hence agEUR), then the base of the returned
    /// value is 10**18
    function read() external view returns (uint256);

    /// @notice Changes the treasury contract
    /// @param _treasury Address of the new treasury contract
    /// @dev This function can be called by an approved `VaultManager` contract which can call
    /// this function after being requested to do so by a `treasury` contract
    /// @dev In some situations (like reactor contracts), the `VaultManager` may not directly be linked
    /// to the `oracle` contract and as such we may need governors to be able to call this function as well
    function setTreasury(address _treasury) external;

    /// @notice Reference to the `treasury` contract handling this `VaultManager`
    function treasury() external view returns (ITreasury treasury);
}

File 7 of 9 : ITreasury.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "./IAgToken.sol";
import "./ICoreBorrow.sol";
import "./IFlashAngle.sol";

/// @title ITreasury
/// @author Angle Core Team
/// @notice Interface for the `Treasury` contract
/// @dev This interface only contains functions of the `Treasury` which are called by other contracts
/// of this module
interface ITreasury {
    /// @notice Stablecoin handled by this `treasury` contract
    function stablecoin() external view returns (IAgToken);

    /// @notice Checks whether a given address has the  governor role
    /// @param admin Address to check
    /// @return Whether the address has the governor role
    /// @dev Access control is only kept in the `CoreBorrow` contract
    function isGovernor(address admin) external view returns (bool);

    /// @notice Checks whether a given address has the guardian or the governor role
    /// @param admin Address to check
    /// @return Whether the address has the guardian or the governor role
    /// @dev Access control is only kept in the `CoreBorrow` contract which means that this function
    /// queries the `CoreBorrow` contract
    function isGovernorOrGuardian(address admin) external view returns (bool);

    /// @notice Checks whether a given address has well been initialized in this contract
    /// as a `VaultManager``
    /// @param _vaultManager Address to check
    /// @return Whether the address has been initialized or not
    function isVaultManager(address _vaultManager) external view returns (bool);

    /// @notice Sets a new flash loan module for this stablecoin
    /// @param _flashLoanModule Reference to the new flash loan module
    /// @dev This function removes the minting right to the old flash loan module and grants
    /// it to the new module
    function setFlashLoanModule(address _flashLoanModule) external;
}

File 8 of 9 : BaseOracleChainlinkMulti.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

import "../interfaces/IOracle.sol";
import "../interfaces/ITreasury.sol";

/// @title BaseOracleChainlinkMulti
/// @author Angle Core Team
/// @notice Base Contract to be overriden by all contracts of the protocol
/// @dev This base contract concerns an oracle that uses Chainlink with multiple pools to read from
/// @dev All gas-efficient implementation of the `OracleChainlinkMulti` contract should inherit from this
abstract contract BaseOracleChainlinkMulti is IOracle {
    // ========================= Parameters and References =========================

    /// @inheritdoc IOracle
    ITreasury public override treasury;
    /// @notice Represent the maximum amount of time (in seconds) between each Chainlink update
    /// before the price feed is considered stale
    uint32 public stalePeriod;

    // =================================== Event ===================================

    event StalePeriodUpdated(uint32 _stalePeriod);

    // =================================== Errors ===================================

    error InvalidChainlinkRate();
    error NotGovernorOrGuardian();
    error NotVaultManagerOrGovernor();

    /// @notice Constructor for an oracle using Chainlink with multiple pools to read from
    /// @param _stalePeriod Minimum feed update frequency for the oracle to not revert
    /// @param _treasury Treasury associated to the VaultManager which reads from this feed
    constructor(uint32 _stalePeriod, address _treasury) {
        stalePeriod = _stalePeriod;
        treasury = ITreasury(_treasury);
    }

    // ============================= Reading Oracles ===============================

    /// @inheritdoc IOracle
    function read() external view virtual override returns (uint256 quoteAmount);

    /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to
    /// the out-currency
    /// @param quoteAmount The amount for which to compute the price expressed with base decimal
    /// @param feed Chainlink feed to query
    /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided
    /// to the `quoteAmount`
    /// @param decimals Number of decimals of the corresponding Chainlink pair
    /// @return The `quoteAmount` converted in out-currency
    function _readChainlinkFeed(
        uint256 quoteAmount,
        AggregatorV3Interface feed,
        uint8 multiplied,
        uint256 decimals
    ) internal view returns (uint256) {
        (uint80 roundId, int256 ratio, , uint256 updatedAt, uint80 answeredInRound) = feed.latestRoundData();
        if (ratio <= 0 || roundId > answeredInRound || block.timestamp - updatedAt > stalePeriod)
            revert InvalidChainlinkRate();
        uint256 castedRatio = uint256(ratio);
        // Checking whether we should multiply or divide by the ratio computed
        if (multiplied == 1) return (quoteAmount * castedRatio) / (10**decimals);
        else return (quoteAmount * (10**decimals)) / castedRatio;
    }

    // ======================= Governance Related Functions ========================

    /// @notice Changes the stale period
    /// @param _stalePeriod New stale period (in seconds)
    function changeStalePeriod(uint32 _stalePeriod) external {
        if (!treasury.isGovernorOrGuardian(msg.sender)) revert NotGovernorOrGuardian();
        stalePeriod = _stalePeriod;
        emit StalePeriodUpdated(_stalePeriod);
    }

    /// @inheritdoc IOracle
    function setTreasury(address _treasury) external override {
        if (!treasury.isVaultManager(msg.sender) && !treasury.isGovernor(msg.sender))
            revert NotVaultManagerOrGovernor();
        treasury = ITreasury(_treasury);
    }
}

File 9 of 9 : OracleOPEURChainlinkOptimism.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.12;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

import "../../BaseOracleChainlinkMulti.sol";

/// @title OracleOPEURChainlinkOptimism
/// @author Angle Core Team
/// @notice Gives the price of OP in Euro in base 18
/// @dev This contract is built to be deployed on Optimism
contract OracleOPEURChainlinkOptimism is BaseOracleChainlinkMulti {
    uint256 public constant OUTBASE = 10**18;
    string public constant DESCRIPTION = "OP/EUR Oracle";

    /// @notice Constructor of the contract
    /// @param _stalePeriod Minimum feed update frequency for the oracle to not revert
    /// @param _treasury Treasury associated to the `VaultManager` which reads from this feed
    constructor(uint32 _stalePeriod, address _treasury) BaseOracleChainlinkMulti(_stalePeriod, _treasury) {}

    /// @inheritdoc IOracle
    function read() external view override returns (uint256 quoteAmount) {
        quoteAmount = OUTBASE;
        AggregatorV3Interface[2] memory circuitChainlink = [
            // Oracle OP/USD
            AggregatorV3Interface(0x0D276FC14719f9292D5C1eA2198673d1f4269246),
            // Oracle EUR/USD
            AggregatorV3Interface(0x3626369857A10CcC6cc3A6e4f5C2f5984a519F20)
        ];
        uint8[2] memory circuitChainIsMultiplied = [1, 0];
        uint8[2] memory chainlinkDecimals = [8, 8];
        for (uint256 i = 0; i < circuitChainlink.length; i++) {
            quoteAmount = _readChainlinkFeed(
                quoteAmount,
                circuitChainlink[i],
                circuitChainIsMultiplied[i],
                chainlinkDecimals[i]
            );
        }
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint32","name":"_stalePeriod","type":"uint32"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidChainlinkRate","type":"error"},{"inputs":[],"name":"NotGovernorOrGuardian","type":"error"},{"inputs":[],"name":"NotVaultManagerOrGovernor","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_stalePeriod","type":"uint32"}],"name":"StalePeriodUpdated","type":"event"},{"inputs":[],"name":"DESCRIPTION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OUTBASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_stalePeriod","type":"uint32"}],"name":"changeStalePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"read","outputs":[{"internalType":"uint256","name":"quoteAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stalePeriod","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610ba4380380610ba483398101604081905261002f91610071565b600080546001600160c01b031916600160a01b63ffffffff94909416939093026001600160a01b031916929092176001600160a01b03919091161790556100c0565b6000806040838503121561008457600080fd5b825163ffffffff8116811461009857600080fd5b60208401519092506001600160a01b03811681146100b557600080fd5b809150509250929050565b610ad5806100cf6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80636c47d3311161005b5780636c47d331146100f7578063a5b36a3614610106578063f0f4426014610143578063f1ae88561461015657600080fd5b806357de26a41461008257806361d027b31461009d578063630914d1146100e2575b600080fd5b61008a61019f565b6040519081526020015b60405180910390f35b6000546100bd9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610094565b6100f56100f03660046106e4565b610286565b005b61008a670de0b6b3a764000081565b60005461012e9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610094565b6100f5610151366004610711565b6103d1565b6101926040518060400160405280600d81526020017f4f502f455552204f7261636c650000000000000000000000000000000000000081525081565b6040516100949190610747565b604080518082018252730d276fc14719f9292d5c1ea2198673d1f42692468152733626369857a10ccc6cc3a6e4f5c2f5984a519f20602080830191909152825180840184526001815260008183018190528451808601909552600880865292850192909252670de0b6b3a76400009390915b600281101561027f5761026b85858360028110610230576102306107ba565b6020020151858460028110610247576102476107ba565b602002015185856002811061025e5761025e6107ba565b602002015160ff1661057d565b94508061027781610818565b915050610211565b5050505090565b6000546040517f521d4de900000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063521d4de990602401602060405180830381865afa1580156102f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103189190610851565b61034e576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040517f676a553e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063676a553e90602401602060405180830381865afa15801561043f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104639190610851565b1580156104ff57506000546040517fe43581b800000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063e43581b890602401602060405180830381865afa1580156104d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fd9190610851565b155b15610536576040517fb05b9b9f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060008060008773ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f49190610892565b94509450509350935060008313158061062457508069ffffffffffffffffffff168469ffffffffffffffffffff16115b80610657575060005474010000000000000000000000000000000000000000900463ffffffff1661065583426108e2565b115b1561068e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600160ff891614156106c6576106a687600a610a1b565b6106b0828c610a27565b6106ba9190610a64565b955050505050506106dc565b806106d288600a610a1b565b6106b0908c610a27565b949350505050565b6000602082840312156106f657600080fd5b813563ffffffff8116811461070a57600080fd5b9392505050565b60006020828403121561072357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461070a57600080fd5b600060208083528351808285015260005b8181101561077457858101830151858201604001528201610758565b81811115610786576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561084a5761084a6107e9565b5060010190565b60006020828403121561086357600080fd5b8151801515811461070a57600080fd5b805169ffffffffffffffffffff8116811461088d57600080fd5b919050565b600080600080600060a086880312156108aa57600080fd5b6108b386610873565b94506020860151935060408601519250606086015191506108d660808701610873565b90509295509295909350565b6000828210156108f4576108f46107e9565b500390565b600181815b8085111561095257817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610938576109386107e9565b8085161561094557918102915b93841c93908002906108fe565b509250929050565b60008261096957506001610a15565b8161097657506000610a15565b816001811461098c5760028114610996576109b2565b6001915050610a15565b60ff8411156109a7576109a76107e9565b50506001821b610a15565b5060208310610133831016604e8410600b84101617156109d5575081810a610a15565b6109df83836108f9565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610a1157610a116107e9565b0290505b92915050565b600061070a838361095a565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610a5f57610a5f6107e9565b500290565b600082610a9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea26469706673582212208820e5e43a2d5d4e0b7155a4a5dc0fc60e7c96d882dd7be620542c5d4cd7316b64736f6c634300080c0033000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000e9f183fc656656f1f17af1f2b0df79b8ff9ad8ed

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80636c47d3311161005b5780636c47d331146100f7578063a5b36a3614610106578063f0f4426014610143578063f1ae88561461015657600080fd5b806357de26a41461008257806361d027b31461009d578063630914d1146100e2575b600080fd5b61008a61019f565b6040519081526020015b60405180910390f35b6000546100bd9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610094565b6100f56100f03660046106e4565b610286565b005b61008a670de0b6b3a764000081565b60005461012e9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610094565b6100f5610151366004610711565b6103d1565b6101926040518060400160405280600d81526020017f4f502f455552204f7261636c650000000000000000000000000000000000000081525081565b6040516100949190610747565b604080518082018252730d276fc14719f9292d5c1ea2198673d1f42692468152733626369857a10ccc6cc3a6e4f5c2f5984a519f20602080830191909152825180840184526001815260008183018190528451808601909552600880865292850192909252670de0b6b3a76400009390915b600281101561027f5761026b85858360028110610230576102306107ba565b6020020151858460028110610247576102476107ba565b602002015185856002811061025e5761025e6107ba565b602002015160ff1661057d565b94508061027781610818565b915050610211565b5050505090565b6000546040517f521d4de900000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063521d4de990602401602060405180830381865afa1580156102f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103189190610851565b61034e576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040517f676a553e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063676a553e90602401602060405180830381865afa15801561043f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104639190610851565b1580156104ff57506000546040517fe43581b800000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063e43581b890602401602060405180830381865afa1580156104d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fd9190610851565b155b15610536576040517fb05b9b9f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060008060008773ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f49190610892565b94509450509350935060008313158061062457508069ffffffffffffffffffff168469ffffffffffffffffffff16115b80610657575060005474010000000000000000000000000000000000000000900463ffffffff1661065583426108e2565b115b1561068e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600160ff891614156106c6576106a687600a610a1b565b6106b0828c610a27565b6106ba9190610a64565b955050505050506106dc565b806106d288600a610a1b565b6106b0908c610a27565b949350505050565b6000602082840312156106f657600080fd5b813563ffffffff8116811461070a57600080fd5b9392505050565b60006020828403121561072357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461070a57600080fd5b600060208083528351808285015260005b8181101561077457858101830151858201604001528201610758565b81811115610786576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561084a5761084a6107e9565b5060010190565b60006020828403121561086357600080fd5b8151801515811461070a57600080fd5b805169ffffffffffffffffffff8116811461088d57600080fd5b919050565b600080600080600060a086880312156108aa57600080fd5b6108b386610873565b94506020860151935060408601519250606086015191506108d660808701610873565b90509295509295909350565b6000828210156108f4576108f46107e9565b500390565b600181815b8085111561095257817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610938576109386107e9565b8085161561094557918102915b93841c93908002906108fe565b509250929050565b60008261096957506001610a15565b8161097657506000610a15565b816001811461098c5760028114610996576109b2565b6001915050610a15565b60ff8411156109a7576109a76107e9565b50506001821b610a15565b5060208310610133831016604e8410600b84101617156109d5575081810a610a15565b6109df83836108f9565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610a1157610a116107e9565b0290505b92915050565b600061070a838361095a565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610a5f57610a5f6107e9565b500290565b600082610a9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea26469706673582212208820e5e43a2d5d4e0b7155a4a5dc0fc60e7c96d882dd7be620542c5d4cd7316b64736f6c634300080c0033

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

000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000e9f183fc656656f1f17af1f2b0df79b8ff9ad8ed

-----Decoded View---------------
Arg [0] : _stalePeriod (uint32): 172800
Arg [1] : _treasury (address): 0xe9f183FC656656f1F17af1F2b0dF79b8fF9ad8eD

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000002a300
Arg [1] : 000000000000000000000000e9f183fc656656f1f17af1f2b0df79b8ff9ad8ed


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.