Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OracleFRAXBPEURChainlink
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-12-22 */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; /* * █ ***** ▓▓▓ * ▓▓▓▓▓▓▓ * ///. ▓▓▓▓▓▓▓▓▓▓▓▓▓ ***** //////// ▓▓▓▓▓▓▓ * ///////////// ▓▓▓ ▓▓ ////////////////// █ ▓▓ ▓▓ ▓▓ /////////////////////// ▓▓ ▓▓ ▓▓ ▓▓ //////////////////////////// ▓▓ ▓▓ ▓▓ ▓▓ /////////▓▓▓///////▓▓▓///////// ▓▓ ▓▓ ▓▓ ,////////////////////////////////////// ▓▓ ▓▓ ▓▓ ////////////////////////////////////////// ▓▓ ▓▓ //////////////////////▓▓▓▓///////////////////// ,//////////////////////////////////////////////////// .////////////////////////////////////////////////////////// .//////////////////////////██.,//////////////////////////█ .//////////////////////████..,./////////////////////██ ...////////////////███████.....,.////////////////███ ,.,////////////████████ ........,///////////████ .,.,//////█████████ ,.......///////████ ,..//████████ ........./████ ..,██████ .....,███ .██ ,.,█ ▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ */ 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 ); } // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } /// @title IAgToken /// @author Angle Labs, Inc. /// @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); } /// @title ICoreBorrow /// @author Angle Labs, Inc. /// @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); } /// @title IFlashAngle /// @author Angle Labs, Inc. /// @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; } /// @title ITreasury /// @author Angle Labs, Inc. /// @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; } /// @title IOracle /// @author Angle Labs, Inc. /// @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); /// @notice Array with the list of Chainlink feeds in the order in which they are read function circuitChainlink() external view returns (AggregatorV3Interface[] memory); } /// @title BaseOracleChainlinkMulti /// @author Angle Labs, Inc. /// @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); /// @inheritdoc IOracle function circuitChainlink() public view virtual returns (AggregatorV3Interface[] memory); /// @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); } } // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } //solhint-disable interface ICurveCryptoSwapPool is IERC20 { function A() external view returns (uint256); function get_virtual_price() external view returns (uint256); function calc_token_fee(uint256[3] memory amounts, uint256[3] memory xp) external view returns (uint256); function calc_token_amount(uint256[3] memory amounts, bool deposit) external view returns (uint256); function add_liquidity(uint256[3] memory amounts, uint256 min_mint_amount) external; function get_dy( int128 i, int128 j, uint256 dx ) external view returns (uint256); function exchange( int128 i, int128 j, uint256 dx, uint256 min_dy ) external; function remove_liquidity(uint256 _amount, uint256[3] memory min_amounts) external; function remove_liquidity_imbalance(uint256[3] memory amounts, uint256 max_burn_amount) external; function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount ) external; } /// @title OracleFRAXBPEURChainlink /// @author Angle Labs, Inc. /// @notice Gives a lower bound of the price of Curve FRAXBP in Euro in base 18 contract OracleFRAXBPEURChainlink is BaseOracleChainlinkMulti { string public constant DESCRIPTION = "crvFRAX/EUR Oracle"; ICurveCryptoSwapPool public constant FRAXBP = ICurveCryptoSwapPool(0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2); /// @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) {} function circuitChainlink() public pure override returns (AggregatorV3Interface[] memory) { AggregatorV3Interface[] memory _circuitChainlink = new AggregatorV3Interface[](3); // Chainlink FRAX/USD address _circuitChainlink[0] = AggregatorV3Interface(0xB9E1E3A9feFf48998E45Fa90847ed4D467E8BcfD); // Chainlink USDC/USD address _circuitChainlink[1] = AggregatorV3Interface(0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6); // Chainlink EUR/USD address _circuitChainlink[2] = AggregatorV3Interface(0xb49f677943BC038e9857d61E7d053CaA2C1734C1); return _circuitChainlink; } /// @inheritdoc IOracle function read() external view override returns (uint256 quoteAmount) { AggregatorV3Interface[] memory _circuitChainlink = circuitChainlink(); // We use 0 decimals when reading fees through `readChainlinkFeed` since all feeds have 8 decimals // and the virtual price of the Curve pool is given in 18 decimals, just like the amount of decimals // of the FRAXBP token uint256 fraxPrice = _readChainlinkFeed(1, _circuitChainlink[0], 1, 0); uint256 usdcPrice = _readChainlinkFeed(1, _circuitChainlink[1], 1, 0); // Picking the minimum price between FRAX and USDC, multiplying it by the pool's virtual price usdcPrice = usdcPrice >= fraxPrice ? fraxPrice : usdcPrice; quoteAmount = _readChainlinkFeed((FRAXBP.get_virtual_price() * usdcPrice), _circuitChainlink[2], 0, 0); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"FRAXBP","outputs":[{"internalType":"contract ICurveCryptoSwapPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_stalePeriod","type":"uint32"}],"name":"changeStalePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"circuitChainlink","outputs":[{"internalType":"contract AggregatorV3Interface[]","name":"","type":"address[]"}],"stateMutability":"pure","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"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610aec380380610aec83398101604081905261002f91610071565b600080546001600160c01b031916600160a01b63ffffffff94909416939093026001600160a01b031916929092176001600160a01b03919091161790556100c0565b6000806040838503121561008457600080fd5b825163ffffffff8116811461009857600080fd5b60208401519092506001600160a01b03811681146100b557600080fd5b809150509250929050565b610a1d806100cf6000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c80634994cc671461007d57806357de26a41461009b57806361d027b3146100b1578063630914d1146100d1578063a5b36a36146100e6578063b6fac8bb14610112578063f0f442601461012d578063f1ae885614610140575b600080fd5b61008561017e565b60405161009291906106cd565b60405180910390f35b6100a3610279565b604051908152602001610092565b6000546100c4906001600160a01b031681565b604051610092919061071a565b6100e46100df36600461072e565b610390565b005b6000546100fd90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610092565b6100c473dcef968d416a41cdac0ed8702fac8128a64241a281565b6100e461013b36600461075b565b610478565b61017160405180604001604052806012815260200171637276465241582f455552204f7261636c6560701b81525081565b6040516100929190610784565b604080516003808252608082019092526060916000919060208201848036833701905050905073b9e1e3a9feff48998e45fa90847ed4d467e8bcfd816000815181106101cc576101cc6107d2565b60200260200101906001600160a01b031690816001600160a01b031681525050738fffffd4afb6115b954bd326cbe7b4ba576818f681600181518110610214576102146107d2565b60200260200101906001600160a01b031690816001600160a01b03168152505073b49f677943bc038e9857d61e7d053caa2c1734c18160028151811061025c5761025c6107d2565b6001600160a01b0390921660209283029190910190910152919050565b60008061028461017e565b905060006102b16001836000815181106102a0576102a06107d2565b6020026020010151600160006105a4565b905060006102cd6001846001815181106102a0576102a06107d2565b9050818110156102dd57806102df565b815b90506103888173dcef968d416a41cdac0ed8702fac8128a64241a26001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b91906107e8565b6103659190610817565b84600281518110610378576103786107d2565b60200260200101516000806105a4565b935050505090565b60005460405163521d4de960e01b81526001600160a01b039091169063521d4de9906103c090339060040161071a565b602060405180830381865afa1580156103dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190610834565b61041e57604051632678482f60e21b815260040160405180910390fd5b6000805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040516333b52a9f60e11b81526001600160a01b039091169063676a553e906104a890339060040161071a565b602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e99190610834565b1580156105645750600054604051631c86b03760e31b81526001600160a01b039091169063e43581b89061052190339060040161071a565b602060405180830381865afa15801561053e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105629190610834565b155b156105825760405163b05b9b9f60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806000876001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e9190610872565b9450945050935093506000831315806106385750806001600160501b0316846001600160501b0316115b8061065a5750600054600160a01b900463ffffffff1661065883426108c2565b115b156106785760405163ae19356360e01b815260040160405180910390fd5b8260ff88166001036106af5761068f87600a6109b9565b610699828c610817565b6106a391906109c5565b955050505050506106c5565b806106bb88600a6109b9565b610699908c610817565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561070e5783516001600160a01b0316835292840192918401916001016106e9565b50909695505050505050565b6001600160a01b0391909116815260200190565b60006020828403121561074057600080fd5b813563ffffffff8116811461075457600080fd5b9392505050565b60006020828403121561076d57600080fd5b81356001600160a01b038116811461075457600080fd5b600060208083528351808285015260005b818110156107b157858101830151858201604001528201610795565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156107fa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761082e5761082e610801565b92915050565b60006020828403121561084657600080fd5b8151801515811461075457600080fd5b80516001600160501b038116811461086d57600080fd5b919050565b600080600080600060a0868803121561088a57600080fd5b61089386610856565b94506020860151935060408601519250606086015191506108b660808701610856565b90509295509295909350565b8181038181111561082e5761082e610801565b600181815b808511156109105781600019048211156108f6576108f6610801565b8085161561090357918102915b93841c93908002906108da565b509250929050565b6000826109275750600161082e565b816109345750600061082e565b816001811461094a576002811461095457610970565b600191505061082e565b60ff84111561096557610965610801565b50506001821b61082e565b5060208310610133831016604e8410600b8410161715610993575081810a61082e565b61099d83836108d5565b80600019048211156109b1576109b1610801565b029392505050565b60006107548383610918565b6000826109e257634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212200239a2b89b753d10613dd3bf84deffee455711beb5322347ab67a666f64a061f64736f6c63430008110033000000000000000000000000000000000000000000000000000000000002a3000000000000000000000000008667dbebf68b0bfa6db54f550f41be16c4067d60
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100785760003560e01c80634994cc671461007d57806357de26a41461009b57806361d027b3146100b1578063630914d1146100d1578063a5b36a36146100e6578063b6fac8bb14610112578063f0f442601461012d578063f1ae885614610140575b600080fd5b61008561017e565b60405161009291906106cd565b60405180910390f35b6100a3610279565b604051908152602001610092565b6000546100c4906001600160a01b031681565b604051610092919061071a565b6100e46100df36600461072e565b610390565b005b6000546100fd90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610092565b6100c473dcef968d416a41cdac0ed8702fac8128a64241a281565b6100e461013b36600461075b565b610478565b61017160405180604001604052806012815260200171637276465241582f455552204f7261636c6560701b81525081565b6040516100929190610784565b604080516003808252608082019092526060916000919060208201848036833701905050905073b9e1e3a9feff48998e45fa90847ed4d467e8bcfd816000815181106101cc576101cc6107d2565b60200260200101906001600160a01b031690816001600160a01b031681525050738fffffd4afb6115b954bd326cbe7b4ba576818f681600181518110610214576102146107d2565b60200260200101906001600160a01b031690816001600160a01b03168152505073b49f677943bc038e9857d61e7d053caa2c1734c18160028151811061025c5761025c6107d2565b6001600160a01b0390921660209283029190910190910152919050565b60008061028461017e565b905060006102b16001836000815181106102a0576102a06107d2565b6020026020010151600160006105a4565b905060006102cd6001846001815181106102a0576102a06107d2565b9050818110156102dd57806102df565b815b90506103888173dcef968d416a41cdac0ed8702fac8128a64241a26001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b91906107e8565b6103659190610817565b84600281518110610378576103786107d2565b60200260200101516000806105a4565b935050505090565b60005460405163521d4de960e01b81526001600160a01b039091169063521d4de9906103c090339060040161071a565b602060405180830381865afa1580156103dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190610834565b61041e57604051632678482f60e21b815260040160405180910390fd5b6000805463ffffffff60a01b1916600160a01b63ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040516333b52a9f60e11b81526001600160a01b039091169063676a553e906104a890339060040161071a565b602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e99190610834565b1580156105645750600054604051631c86b03760e31b81526001600160a01b039091169063e43581b89061052190339060040161071a565b602060405180830381865afa15801561053e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105629190610834565b155b156105825760405163b05b9b9f60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806000876001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e9190610872565b9450945050935093506000831315806106385750806001600160501b0316846001600160501b0316115b8061065a5750600054600160a01b900463ffffffff1661065883426108c2565b115b156106785760405163ae19356360e01b815260040160405180910390fd5b8260ff88166001036106af5761068f87600a6109b9565b610699828c610817565b6106a391906109c5565b955050505050506106c5565b806106bb88600a6109b9565b610699908c610817565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561070e5783516001600160a01b0316835292840192918401916001016106e9565b50909695505050505050565b6001600160a01b0391909116815260200190565b60006020828403121561074057600080fd5b813563ffffffff8116811461075457600080fd5b9392505050565b60006020828403121561076d57600080fd5b81356001600160a01b038116811461075457600080fd5b600060208083528351808285015260005b818110156107b157858101830151858201604001528201610795565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156107fa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761082e5761082e610801565b92915050565b60006020828403121561084657600080fd5b8151801515811461075457600080fd5b80516001600160501b038116811461086d57600080fd5b919050565b600080600080600060a0868803121561088a57600080fd5b61089386610856565b94506020860151935060408601519250606086015191506108b660808701610856565b90509295509295909350565b8181038181111561082e5761082e610801565b600181815b808511156109105781600019048211156108f6576108f6610801565b8085161561090357918102915b93841c93908002906108da565b509250929050565b6000826109275750600161082e565b816109345750600061082e565b816001811461094a576002811461095457610970565b600191505061082e565b60ff84111561096557610965610801565b50506001821b61082e565b5060208310610133831016604e8410600b8410161715610993575081810a61082e565b61099d83836108d5565b80600019048211156109b1576109b1610801565b029392505050565b60006107548383610918565b6000826109e257634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212200239a2b89b753d10613dd3bf84deffee455711beb5322347ab67a666f64a061f64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000002a3000000000000000000000000008667dbebf68b0bfa6db54f550f41be16c4067d60
-----Decoded View---------------
Arg [0] : _stalePeriod (uint32): 172800
Arg [1] : _treasury (address): 0x8667DBEBf68B0BFa6Db54f550f41Be16c4067d60
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000002a300
Arg [1] : 0000000000000000000000008667dbebf68b0bfa6db54f550f41be16c4067d60
Deployed Bytecode Sourcemap
24662:2123:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25254:638;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;25929:853;;;:::i;:::-;;;851:25:1;;;839:2;824:18;25929:853:0;705:177:1;17234:34:0;;;;;-1:-1:-1;;;;;17234:34:0;;;;;;;;;;:::i;20007:239::-;;;;;;:::i;:::-;;:::i;:::-;;17423:25;;;;;-1:-1:-1;;;17423:25:0;;;;;;;;;1567:10:1;1555:23;;;1537:42;;1525:2;1510:18;17423:25:0;1393:192:1;24795:110:0;;24862:42;24795:110;;20283:244;;;;;;:::i;:::-;;:::i;24731:57::-;;;;;;;;;;;;;;;-1:-1:-1;;;24731:57:0;;;;;;;;;;;;:::i;25254:638::-;25406:30;;;25434:1;25406:30;;;;;;;;;25312;;25355:48;;25406:30;;;;25312;;25406;;;;;-1:-1:-1;25406:30:0;25355:81;;25531:42;25486:17;25504:1;25486:20;;;;;;;;:::i;:::-;;;;;;:88;-1:-1:-1;;;;;25486:88:0;;;-1:-1:-1;;;;;25486:88:0;;;;;25669:42;25624:17;25642:1;25624:20;;;;;;;;:::i;:::-;;;;;;:88;-1:-1:-1;;;;;25624:88:0;;;-1:-1:-1;;;;;25624:88:0;;;;;25806:42;25761:17;25779:1;25761:20;;;;;;;;:::i;:::-;-1:-1:-1;;;;;25761:88:0;;;:20;;;;;;;;;;;:88;25867:17;25254:638;-1:-1:-1;25254:638:0:o;25929:853::-;25977:19;26009:48;26060:18;:16;:18::i;:::-;26009:69;;26339:17;26359:49;26378:1;26381:17;26399:1;26381:20;;;;;;;;:::i;:::-;;;;;;;26403:1;26406;26359:18;:49::i;:::-;26339:69;;26419:17;26439:49;26458:1;26461:17;26479:1;26461:20;;;;;;;;:::i;26439:49::-;26419:69;;26628:9;26615;:22;;:46;;26652:9;26615:46;;;26640:9;26615:46;26603:58;;26686:88;26735:9;24862:42;-1:-1:-1;;;;;26706:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:38;;;;:::i;:::-;26747:17;26765:1;26747:20;;;;;;;;:::i;:::-;;;;;;;26769:1;26772;26686:18;:88::i;:::-;26672:102;;25998:784;;;25929:853;:::o;20007:239::-;20080:8;;:41;;-1:-1:-1;;;20080:41:0;;-1:-1:-1;;;;;20080:8:0;;;;:29;;:41;;20110:10;;20080:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20075:78;;20130:23;;-1:-1:-1;;;20130:23:0;;;;;;;;;;;20075:78;20164:11;:26;;-1:-1:-1;;;;20164:26:0;-1:-1:-1;;;20164:26:0;;;;;;;;;;;;;20206:32;;1537:42:1;;;20206:32:0;;1525:2:1;1510:18;20206:32:0;;;;;;;20007:239;:::o;20283:244::-;20357:8;;:35;;-1:-1:-1;;;20357:35:0;;-1:-1:-1;;;;;20357:8:0;;;;:23;;:35;;20381:10;;20357:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20356:36;:72;;;;-1:-1:-1;20397:8:0;;:31;;-1:-1:-1;;;20397:31:0;;-1:-1:-1;;;;;20397:8:0;;;;:19;;:31;;20417:10;;20397:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20396:32;20356:72;20352:125;;;20450:27;;-1:-1:-1;;;20450:27:0;;;;;;;;;;;20352:125;20488:8;:31;;-1:-1:-1;;;;;;20488:31:0;-1:-1:-1;;;;;20488:31:0;;;;;;;;;;20283:244::o;19083:727::-;19262:7;19283:14;19299:12;19315:17;19334:22;19360:4;-1:-1:-1;;;;;19360:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;19282:100;;;;;;;;;19406:1;19397:5;:10;;:39;;;;19421:15;-1:-1:-1;;;;;19411:25:0;:7;-1:-1:-1;;;;;19411:25:0;;19397:39;:84;;;-1:-1:-1;19470:11:0;;-1:-1:-1;;;19470:11:0;;;;19440:27;19458:9;19440:15;:27;:::i;:::-;:41;19397:84;19393:132;;;19503:22;;-1:-1:-1;;;19503:22:0;;;;;;;;;;;19393:132;19566:5;19667:15;;;19681:1;19667:15;19663:139;;19722:12;19726:8;19722:2;:12;:::i;:::-;19692:25;19706:11;19692;:25;:::i;:::-;19691:44;;;;:::i;:::-;19684:51;;;;;;;;;19663:139;19791:11;19774:12;19778:8;19774:2;:12;:::i;:::-;19759:28;;:11;:28;:::i;19083:727::-;;;;;;;:::o;14:686:1:-;213:2;265:21;;;335:13;;238:18;;;357:22;;;184:4;;213:2;436:15;;;;410:2;395:18;;;184:4;479:195;493:6;490:1;487:13;479:195;;;558:13;;-1:-1:-1;;;;;554:39:1;542:52;;649:15;;;;614:12;;;;590:1;508:9;479:195;;;-1:-1:-1;691:3:1;;14:686;-1:-1:-1;;;;;;14:686:1:o;887:220::-;-1:-1:-1;;;;;1068:32:1;;;;1050:51;;1038:2;1023:18;;887:220::o;1112:276::-;1170:6;1223:2;1211:9;1202:7;1198:23;1194:32;1191:52;;;1239:1;1236;1229:12;1191:52;1278:9;1265:23;1328:10;1321:5;1317:22;1310:5;1307:33;1297:61;;1354:1;1351;1344:12;1297:61;1377:5;1112:276;-1:-1:-1;;;1112:276:1:o;1826:286::-;1885:6;1938:2;1926:9;1917:7;1913:23;1909:32;1906:52;;;1954:1;1951;1944:12;1906:52;1980:23;;-1:-1:-1;;;;;2032:31:1;;2022:42;;2012:70;;2078:1;2075;2068:12;2117:548;2229:4;2258:2;2287;2276:9;2269:21;2319:6;2313:13;2362:6;2357:2;2346:9;2342:18;2335:34;2387:1;2397:140;2411:6;2408:1;2405:13;2397:140;;;2506:14;;;2502:23;;2496:30;2472:17;;;2491:2;2468:26;2461:66;2426:10;;2397:140;;;2401:3;2586:1;2581:2;2572:6;2561:9;2557:22;2553:31;2546:42;2656:2;2649;2645:7;2640:2;2632:6;2628:15;2624:29;2613:9;2609:45;2605:54;2597:62;;;;2117:548;;;;:::o;2802:127::-;2863:10;2858:3;2854:20;2851:1;2844:31;2894:4;2891:1;2884:15;2918:4;2915:1;2908:15;2934:184;3004:6;3057:2;3045:9;3036:7;3032:23;3028:32;3025:52;;;3073:1;3070;3063:12;3025:52;-1:-1:-1;3096:16:1;;2934:184;-1:-1:-1;2934:184:1:o;3123:127::-;3184:10;3179:3;3175:20;3172:1;3165:31;3215:4;3212:1;3205:15;3239:4;3236:1;3229:15;3255:168;3328:9;;;3359;;3376:15;;;3370:22;;3356:37;3346:71;;3397:18;;:::i;:::-;3255:168;;;;:::o;3636:277::-;3703:6;3756:2;3744:9;3735:7;3731:23;3727:32;3724:52;;;3772:1;3769;3762:12;3724:52;3804:9;3798:16;3857:5;3850:13;3843:21;3836:5;3833:32;3823:60;;3879:1;3876;3869:12;3918:175;3996:13;;-1:-1:-1;;;;;4038:30:1;;4028:41;;4018:69;;4083:1;4080;4073:12;4018:69;3918:175;;;:::o;4098:473::-;4201:6;4209;4217;4225;4233;4286:3;4274:9;4265:7;4261:23;4257:33;4254:53;;;4303:1;4300;4293:12;4254:53;4326:39;4355:9;4326:39;:::i;:::-;4316:49;;4405:2;4394:9;4390:18;4384:25;4374:35;;4449:2;4438:9;4434:18;4428:25;4418:35;;4493:2;4482:9;4478:18;4472:25;4462:35;;4516:49;4560:3;4549:9;4545:19;4516:49;:::i;:::-;4506:59;;4098:473;;;;;;;;:::o;4576:128::-;4643:9;;;4664:11;;;4661:37;;;4678:18;;:::i;4709:422::-;4798:1;4841:5;4798:1;4855:270;4876:7;4866:8;4863:21;4855:270;;;4935:4;4931:1;4927:6;4923:17;4917:4;4914:27;4911:53;;;4944:18;;:::i;:::-;4994:7;4984:8;4980:22;4977:55;;;5014:16;;;;4977:55;5093:22;;;;5053:15;;;;4855:270;;;4859:3;4709:422;;;;;:::o;5136:806::-;5185:5;5215:8;5205:80;;-1:-1:-1;5256:1:1;5270:5;;5205:80;5304:4;5294:76;;-1:-1:-1;5341:1:1;5355:5;;5294:76;5386:4;5404:1;5399:59;;;;5472:1;5467:130;;;;5379:218;;5399:59;5429:1;5420:10;;5443:5;;;5467:130;5504:3;5494:8;5491:17;5488:43;;;5511:18;;:::i;:::-;-1:-1:-1;;5567:1:1;5553:16;;5582:5;;5379:218;;5681:2;5671:8;5668:16;5662:3;5656:4;5653:13;5649:36;5643:2;5633:8;5630:16;5625:2;5619:4;5616:12;5612:35;5609:77;5606:159;;;-1:-1:-1;5718:19:1;;;5750:5;;5606:159;5797:34;5822:8;5816:4;5797:34;:::i;:::-;5867:6;5863:1;5859:6;5855:19;5846:7;5843:32;5840:58;;;5878:18;;:::i;:::-;5916:20;;5136:806;-1:-1:-1;;;5136:806:1:o;5947:131::-;6007:5;6036:36;6063:8;6057:4;6036:36;:::i;6083:217::-;6123:1;6149;6139:132;;6193:10;6188:3;6184:20;6181:1;6174:31;6228:4;6225:1;6218:15;6256:4;6253:1;6246:15;6139:132;-1:-1:-1;6285:9:1;;6083:217::o
Swarm Source
ipfs://0239a2b89b753d10613dd3bf84deffee455711beb5322347ab67a666f64a061f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.