Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Oracle3CRVEURChainlink
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "borrow/oracle/BaseOracleChainlinkMulti.sol";
import "../../../interfaces/external/curve/ICurveCryptoSwapPool.sol";
/// @title Oracle3CRVEURChainlink
/// @author Angle Labs, Inc.
/// @notice Gives a lower bound of the price of Curve 3CRV in Euro in base 18
contract Oracle3CRVEURChainlink is BaseOracleChainlinkMulti {
string public constant DESCRIPTION = "3Crv/EUR Oracle";
ICurveCryptoSwapPool public constant USDBP = ICurveCryptoSwapPool(0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7);
constructor(uint32 _stalePeriod, address _treasury) BaseOracleChainlinkMulti(_stalePeriod, _treasury) {}
function circuitChainlink() public pure override returns (AggregatorV3Interface[] memory) {
AggregatorV3Interface[] memory _circuitChainlink = new AggregatorV3Interface[](4);
// Chainlink DAI/USD address
_circuitChainlink[0] = AggregatorV3Interface(0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9);
// Chainlink USDC/USD address
_circuitChainlink[1] = AggregatorV3Interface(0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6);
// Chainlink USDT/USD address
_circuitChainlink[2] = AggregatorV3Interface(0x3E7d1eAB13ad0104d2750B8863b489D65364e32D);
// Chainlink EUR/USD address
_circuitChainlink[3] = 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 3CRV token
uint256 daiPrice = _readChainlinkFeed(1, _circuitChainlink[0], 1, 0);
uint256 usdcPrice = _readChainlinkFeed(1, _circuitChainlink[1], 1, 0);
uint256 usdtPrice = _readChainlinkFeed(1, _circuitChainlink[2], 1, 0);
// Picking the minimum price between DAI, USDC and USDT, multiplying it by the pool's virtual price
usdcPrice = usdcPrice >= daiPrice ? (daiPrice >= usdtPrice ? usdtPrice : daiPrice) : usdcPrice >= usdtPrice
? usdtPrice
: usdcPrice;
quoteAmount = _readChainlinkFeed((USDBP.get_virtual_price() * usdcPrice), _circuitChainlink[3], 0, 0);
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
//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;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
/// @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);
/// @notice Get the associated treasury
function treasury() external view returns (address);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
/// @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);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
import "./IAgToken.sol";
import "./ICoreBorrow.sol";
/// @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;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
import "./ITreasury.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
/// @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);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
import "./IAgToken.sol";
import "./ICoreBorrow.sol";
import "./IFlashAngle.sol";
/// @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;
}// 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 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);
}
}// 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
);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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);
}{
"remappings": [
"@chainlink/=node_modules/@chainlink/",
"@ensdomains/=lib/borrow-contracts/node_modules/@ensdomains/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@uniswap/=lib/borrow-contracts/node_modules/@uniswap/",
"borrow-contracts/=lib/borrow-contracts/",
"borrow/=lib/borrow-contracts/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"forge-std/=lib/forge-std/src/",
"hardhat-deploy/=node_modules/hardhat-deploy/",
"hardhat/=node_modules/hardhat/"
],
"optimizer": {
"enabled": true,
"runs": 1000000
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"USDBP","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
608060405234801561001057600080fd5b50604051610df1380380610df183398101604081905261002f91610071565b600080546001600160c01b031916600160a01b63ffffffff94909416939093026001600160a01b031916929092176001600160a01b03919091161790556100c0565b6000806040838503121561008457600080fd5b825163ffffffff8116811461009857600080fd5b60208401519092506001600160a01b03811681146100b557600080fd5b809150509250929050565b610d22806100cf6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063630914d11161005b578063630914d11461011d578063a5b36a3614610132578063f0f442601461016f578063f1ae88561461018257600080fd5b806339fc4bca1461008d5780634994cc67146100d257806357de26a4146100e757806361d027b3146100fd575b600080fd5b6100a873bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100da6101cb565b6040516100c99190610924565b6100ef61036a565b6040519081526020016100c9565b6000546100a89073ffffffffffffffffffffffffffffffffffffffff1681565b61013061012b36600461097e565b6104c7565b005b60005461015a9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016100c9565b61013061017d3660046109ab565b610612565b6101be6040518060400160405280600f81526020017f334372762f455552204f7261636c65000000000000000000000000000000000081525081565b6040516100c991906109e1565b60408051600480825260a08201909252606091600091906020820160808036833701905050905073aed0c38402a5d19df6e4c03f4e2dced6e29c1ee98160008151811061021a5761021a610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050738fffffd4afb6115b954bd326cbe7b4ba576818f68160018151811061027c5761027c610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050733e7d1eab13ad0104d2750b8863b489d65364e32d816002815181106102de576102de610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073b49f677943bc038e9857d61e7d053caa2c1734c18160038151811061034057610340610a4d565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152919050565b6000806103756101cb565b905060006103a260018360008151811061039157610391610a4d565b6020026020010151600160006107be565b905060006103be60018460018151811061039157610391610a4d565b905060006103da60018560028151811061039157610391610a4d565b9050828210156103f857808210156103f25781610408565b80610408565b808310156104065782610408565b805b91506104be8273bebc44782c7db0a1a60cb6fe97d0b483032ff1c773ffffffffffffffffffffffffffffffffffffffff1663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104919190610a7c565b61049b9190610ac4565b856003815181106104ae576104ae610a4d565b60200260200101516000806107be565b94505050505090565b6000546040517f521d4de900000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063521d4de990602401602060405180830381865afa158015610535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105599190610ae1565b61058f576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040517f676a553e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063676a553e90602401602060405180830381865afa158015610680573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a49190610ae1565b15801561074057506000546040517fe43581b800000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063e43581b890602401602060405180830381865afa15801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190610ae1565b155b15610777576040517fb05b9b9f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060008060008773ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108359190610b22565b94509450509350935060008313158061086557508069ffffffffffffffffffff168469ffffffffffffffffffff16115b80610898575060005474010000000000000000000000000000000000000000900463ffffffff166108968342610b72565b115b156108cf576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260ff8816600103610906576108e687600a610ca5565b6108f0828c610ac4565b6108fa9190610cb1565b9550505050505061091c565b8061091288600a610ca5565b6108f0908c610ac4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561097257835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101610940565b50909695505050505050565b60006020828403121561099057600080fd5b813563ffffffff811681146109a457600080fd5b9392505050565b6000602082840312156109bd57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146109a457600080fd5b600060208083528351808285015260005b81811015610a0e578581018301518582016040015282016109f2565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610a8e57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610adb57610adb610a95565b92915050565b600060208284031215610af357600080fd5b815180151581146109a457600080fd5b805169ffffffffffffffffffff81168114610b1d57600080fd5b919050565b600080600080600060a08688031215610b3a57600080fd5b610b4386610b03565b9450602086015193506040860151925060608601519150610b6660808701610b03565b90509295509295909350565b81810381811115610adb57610adb610a95565b600181815b80851115610bde57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610bc457610bc4610a95565b80851615610bd157918102915b93841c9390800290610b8a565b509250929050565b600082610bf557506001610adb565b81610c0257506000610adb565b8160018114610c185760028114610c2257610c3e565b6001915050610adb565b60ff841115610c3357610c33610a95565b50506001821b610adb565b5060208310610133831016604e8410600b8410161715610c61575081810a610adb565b610c6b8383610b85565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610c9d57610c9d610a95565b029392505050565b60006109a48383610be6565b600082610ce7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220fb75147d581309b5a933ca39fc3941337a5a9f2ee7431df2dbde5399e15f987f64736f6c63430008110033000000000000000000000000000000000000000000000000000000000002a3000000000000000000000000008667dbebf68b0bfa6db54f550f41be16c4067d60
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063630914d11161005b578063630914d11461011d578063a5b36a3614610132578063f0f442601461016f578063f1ae88561461018257600080fd5b806339fc4bca1461008d5780634994cc67146100d257806357de26a4146100e757806361d027b3146100fd575b600080fd5b6100a873bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100da6101cb565b6040516100c99190610924565b6100ef61036a565b6040519081526020016100c9565b6000546100a89073ffffffffffffffffffffffffffffffffffffffff1681565b61013061012b36600461097e565b6104c7565b005b60005461015a9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016100c9565b61013061017d3660046109ab565b610612565b6101be6040518060400160405280600f81526020017f334372762f455552204f7261636c65000000000000000000000000000000000081525081565b6040516100c991906109e1565b60408051600480825260a08201909252606091600091906020820160808036833701905050905073aed0c38402a5d19df6e4c03f4e2dced6e29c1ee98160008151811061021a5761021a610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050738fffffd4afb6115b954bd326cbe7b4ba576818f68160018151811061027c5761027c610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050733e7d1eab13ad0104d2750b8863b489d65364e32d816002815181106102de576102de610a4d565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073b49f677943bc038e9857d61e7d053caa2c1734c18160038151811061034057610340610a4d565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152919050565b6000806103756101cb565b905060006103a260018360008151811061039157610391610a4d565b6020026020010151600160006107be565b905060006103be60018460018151811061039157610391610a4d565b905060006103da60018560028151811061039157610391610a4d565b9050828210156103f857808210156103f25781610408565b80610408565b808310156104065782610408565b805b91506104be8273bebc44782c7db0a1a60cb6fe97d0b483032ff1c773ffffffffffffffffffffffffffffffffffffffff1663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104919190610a7c565b61049b9190610ac4565b856003815181106104ae576104ae610a4d565b60200260200101516000806107be565b94505050505090565b6000546040517f521d4de900000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063521d4de990602401602060405180830381865afa158015610535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105599190610ae1565b61058f576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527f4040b15332969bfd8b2035c1a701c8e13f2b5d62ce89b311684a601b2eb44e019060200160405180910390a150565b6000546040517f676a553e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063676a553e90602401602060405180830381865afa158015610680573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a49190610ae1565b15801561074057506000546040517fe43581b800000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091169063e43581b890602401602060405180830381865afa15801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190610ae1565b155b15610777576040517fb05b9b9f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060008060008773ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108359190610b22565b94509450509350935060008313158061086557508069ffffffffffffffffffff168469ffffffffffffffffffff16115b80610898575060005474010000000000000000000000000000000000000000900463ffffffff166108968342610b72565b115b156108cf576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260ff8816600103610906576108e687600a610ca5565b6108f0828c610ac4565b6108fa9190610cb1565b9550505050505061091c565b8061091288600a610ca5565b6108f0908c610ac4565b949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561097257835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101610940565b50909695505050505050565b60006020828403121561099057600080fd5b813563ffffffff811681146109a457600080fd5b9392505050565b6000602082840312156109bd57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146109a457600080fd5b600060208083528351808285015260005b81811015610a0e578581018301518582016040015282016109f2565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610a8e57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610adb57610adb610a95565b92915050565b600060208284031215610af357600080fd5b815180151581146109a457600080fd5b805169ffffffffffffffffffff81168114610b1d57600080fd5b919050565b600080600080600060a08688031215610b3a57600080fd5b610b4386610b03565b9450602086015193506040860151925060608601519150610b6660808701610b03565b90509295509295909350565b81810381811115610adb57610adb610a95565b600181815b80851115610bde57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610bc457610bc4610a95565b80851615610bd157918102915b93841c9390800290610b8a565b509250929050565b600082610bf557506001610adb565b81610c0257506000610adb565b8160018114610c185760028114610c2257610c3e565b6001915050610adb565b60ff841115610c3357610c33610a95565b50506001821b610adb565b5060208310610133831016604e8410600b8410161715610c61575081810a610adb565b610c6b8383610b85565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610c9d57610c9d610a95565b029392505050565b60006109a48383610be6565b600082610ce7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220fb75147d581309b5a933ca39fc3941337a5a9f2ee7431df2dbde5399e15f987f64736f6c63430008110033
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
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.