### Proposal Setup Verification Test Source: https://docs.olympusdao.finance/main/governance/proposal_submission A mandatory dummy test to verify that the proposal's setUp function executes correctly. ```solidity // [DO NOT DELETE] Dummy test to ensure that `setUp` is executed function testProposal() public { assertTrue(true); } ``` -------------------------------- ### Initialize Operator Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Operator.sol/contract.Operator Performs setup actions required to start market operations after policy approval. ```solidity function initialize() external onlyRole(OPERATOR_ADMIN_ROLE); ``` -------------------------------- ### Install Module Internal Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/Kernel.sol/contract.Kernel Internal function to install a new module. ```solidity function _installModule(Module newModule_) internal; ``` -------------------------------- ### All Keycodes State Variable Source: https://docs.olympusdao.finance/main/contracts/docs/src/Kernel.sol/contract.Kernel Array containing all currently installed modules. ```solidity Keycode[] public allKeycodes ``` -------------------------------- ### INIT() Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/ISubmodule.sol/interface.ISubmodule Initialization function called when the submodule is installed or upgraded. ```APIDOC ## function INIT() ### Description Initialization function for the submodule. This function is called when the submodule is installed or upgraded by the module and must be gated by onlyParent. ``` -------------------------------- ### installSubmodule Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/IPriceConfigv2.sol/interface.IPriceConfigv2 Installs a new submodule on the designated module. ```APIDOC ## function installSubmodule(address submodule_) ### Description Installs a new submodule on the designated module. ### Parameters - **submodule_** (address) - The address of the submodule to install ``` -------------------------------- ### Get configured assets Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/interfaces/IAssetManager.sol/interface.IAssetManager Returns a list of all currently configured assets. ```solidity function getConfiguredAssets() external view returns (IERC20[] memory assets); ``` -------------------------------- ### getCoolerFactories Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/interfaces/ICoolerV2Migrator.sol/interface.ICoolerV2Migrator Get the list of CoolerFactories. ```APIDOC ## getCoolerFactories ### Description Get the list of CoolerFactories. ### Response - **coolerFactories** (address[]) - The list of CoolerFactories. ``` -------------------------------- ### getSubmodules Source: https://docs.olympusdao.finance/main/contracts/docs/src/Submodules.sol/abstract.ModuleWithSubmodules Retrieves an array of all currently installed submodules. ```APIDOC ## function getSubmodules() ### Description Returns an array of SubKeycodes for all submodules currently installed. ### Returns - **SubKeycode[]** - List of installed submodule keycodes. ``` -------------------------------- ### Initialize Submodule Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/ISubmodule.sol/interface.ISubmodule Initialization function called during submodule installation or upgrade; must be gated by onlyParent. ```solidity function INIT() external; ``` -------------------------------- ### getUserRedemptionCount Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositRedemptionVault.sol/contract.DepositRedemptionVault Gets the number of redemptions a user has started. ```APIDOC ## getUserRedemptionCount ### Description Returns the total count of redemptions initiated by a specific user. ### Parameters - **user_** (address) - Required - The address of the user ### Response - **count** (uint16) - The number of redemptions ``` -------------------------------- ### Configure MCP Server in Client Settings Source: https://docs.olympusdao.finance/main/for-agents/mcp/other-clients Example configuration format for clients requiring a command and arguments entry. ```json { "mcpServers": { "olympus": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.olympusdao.finance/mcp"] } } } ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Emergency.sol/contract.Emergency Initializes the policy with the provided kernel. ```solidity constructor(Kernel kernel_) Policy(kernel_); ``` -------------------------------- ### getUserRedemptions Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositRedemptionVault.sol/contract.DepositRedemptionVault Gets all redemptions for a user. ```APIDOC ## getUserRedemptions ### Description Returns an array of all redemptions for a user. Note that this function is gas-intensive for users with many redemptions. ### Parameters - **user_** (address) - Required - The address of the user ### Response - **redemptions** (UserRedemption[]) - The array of redemptions ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/DLGTE/OlympusGovDelegation.sol/contract.OlympusGovDelegation Initializes the module with the kernel, gOHM address, and delegate escrow factory. ```solidity constructor(Kernel kernel_, address gohm_, DelegateEscrowFactory delegateEscrowFactory_) Module(kernel_) DLGTEv1(gohm_); ``` -------------------------------- ### Execute Submodule Actions Source: https://docs.olympusdao.finance/main/contracts/docs/src/Submodules.sol/abstract.ModuleWithSubmodules Perform an action on an installed submodule using its keycode and calldata. ```solidity function execOnSubmodule(SubKeycode subKeycode_, bytes memory callData_) external permissioned returns (bytes memory); ``` -------------------------------- ### Contract Initialization and Configuration Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/YieldRepurchaseFacility.sol/contract.YieldRepurchaseFacility Functions for deploying and configuring the facility. ```solidity constructor(Kernel kernel_, address ohm_, address sReserve_, address teller_, address auctioneer_) Policy(kernel_); ``` ```solidity function initialize(uint256 initialReserveBalance, uint256 initialConversionRate, uint256 initialYield) external onlyRole("loop_daddy"); ``` ```solidity function configureDependencies() external override returns (Keycode[] memory dependencies); ``` ```solidity function requestPermissions() external view override returns (Permissions[] memory permissions); ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/pOLY.sol/contract.pOLY Initializes the pOLY policy with required dependencies and parameters. ```solidity constructor( Kernel kernel_, address previous_, address previousGenesis_, address ohm_, address gohm_, address dai_, address dao_, uint256 maximumAllocated_ ) Policy(kernel_); ``` -------------------------------- ### getPeriodicTasks Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/interfaces/IPeriodicTaskManager.sol/interface.IPeriodicTaskManager Gets all periodic tasks. ```APIDOC ## function getPeriodicTasks() ### Description Gets all periodic tasks. ### Returns - **_tasks** (address[]) - An array of all periodic tasks in order - **_customSelectors** (bytes4[]) - An array of all custom selectors in order ``` -------------------------------- ### Get Price or Unit Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/price/PriceCache.sol/contract.PriceCache Retrieves the price and timestamp for a given asset. ```solidity function _getPriceOrUnit(address asset_) internal view returns (uint256 price_, uint48 timestamp_); ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/ReserveWrapper.sol/contract.ReserveWrapper Initializes the policy with the kernel, reserve, and sReserve addresses. ```solidity constructor(address kernel_, address reserve_, address sReserve_) Policy(Kernel(kernel_)); ``` -------------------------------- ### getOracles Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Gets all deployed oracle addresses. ```APIDOC ## getOracles() ### Description Gets all deployed oracle addresses. ### Returns - **oracles** (address[]) - Array of all oracle addresses. ``` -------------------------------- ### Initialize price module Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/OlympusPrice.sol/contract.OlympusPrice Activates the module after deployment or configuration changes. ```solidity function initialize(uint256[] memory startObservations_, uint48 lastObservationTime_) external override permissioned; ``` -------------------------------- ### getOracle Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Gets the oracle address for a maxAge. ```APIDOC ## getOracle(uint48 maxAge_) ### Description Gets the oracle address for a maxAge. ### Parameters - **maxAge_** (uint48) - The maximum age used by the oracle. ### Returns - **oracle** (address) - The oracle address, or address(0) if not found. ``` -------------------------------- ### getAuctionParameters Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the current auction parameters. ```APIDOC ## getAuctionParameters ### Description Get the current auction parameters. ### Returns - **auctionParameters** (AuctionParameters) - Auction parameters ``` -------------------------------- ### Constructor Initialization Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/MINTR/OlympusMinter.sol/contract.OlympusMinter Initializes the module with the kernel and OHM token address. ```solidity constructor(Kernel kernel_, address ohm_) Module(kernel_); ``` -------------------------------- ### getCurrentTickSize Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the current tick size. ```APIDOC ## getCurrentTickSize ### Description Get the current tick size. ### Returns - **tickSize** (uint256) - The current tick size ``` -------------------------------- ### Get asset configuration Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/interfaces/IAssetManager.sol/interface.IAssetManager Retrieves the configuration details for a specific asset. ```solidity function getAssetConfiguration(IERC20 asset_) external view returns (AssetConfiguration memory configuration); ``` -------------------------------- ### getPreviousTick Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the previous tick of the auction. ```APIDOC ## getPreviousTick ### Description Get the previous tick of the auction. ### Parameters - **depositPeriod_** (uint8) - The deposit period ### Returns - **tick** (Tick) - Tick info ``` -------------------------------- ### Initialize OIP_170_Script constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/OIP_170.sol/contract.OIP_170_Script Initializes the script suite with the defined address path and the OIP_170 contract instance. ```solidity constructor() ScriptSuite(ADDRESSES_PATH, new OIP_170()); ``` -------------------------------- ### Manage Submodules Source: https://docs.olympusdao.finance/main/contracts/docs/src/Submodules.sol/abstract.ModuleWithSubmodules Functions for installing and upgrading submodules, requiring permissioned access. ```solidity function installSubmodule(Submodule newSubmodule_) external permissioned; ``` ```solidity function upgradeSubmodule(Submodule newSubmodule_) external permissioned; ``` -------------------------------- ### getTokenOperator Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ReceiptTokenManager.sol/contract.ReceiptTokenManager Gets the operator of a specific token. ```APIDOC ## function getTokenOperator(uint256 tokenId_) ### Description Gets the operator of a token. ### Parameters - **tokenId_** (uint256) - The token ID ### Returns - **operator** (address) - The operator address ``` -------------------------------- ### Assemble flashloan parameters Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/LoanConsolidator.sol/contract.LoanConsolidator Prepares the necessary data structures and amounts required to execute a flashloan for loan migration. ```solidity function _getFlashloanParameters( Clearinghouse clearinghouseFrom_, Clearinghouse clearinghouseTo_, Cooler coolerFrom_, Cooler coolerTo_, uint256[] calldata ids_, MigrationType migrationType_, IERC20 reserveFrom_, IERC20 reserveTo_ ) internal view returns (uint256 flashloanAmount, FlashLoanData memory flashloanParams); ``` -------------------------------- ### getTokenOwner Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ReceiptTokenManager.sol/contract.ReceiptTokenManager Gets the owner of a specific token. ```APIDOC ## function getTokenOwner(uint256 tokenId_) ### Description Gets the owner of a token. ### Parameters - **tokenId_** (uint256) - The token ID ### Returns - **owner** (address) - The token owner ``` -------------------------------- ### getPositionLiquidity Source: https://docs.olympusdao.finance/main/contracts/docs/src/libraries/UniswapV3/Positions.sol/library.UniswapV3Positions Gets the amount of liquidity in the position. ```APIDOC ## function getPositionLiquidity(IUniswapV3Pool pool_, int24 tickLower_, int24 tickUpper_, address owner_) ### Description Gets the amount of liquidity in the position. ### Parameters - **pool_** (IUniswapV3Pool) - The address of the Uniswap V3 pool - **tickLower_** (int24) - The lower tick of the position - **tickUpper_** (int24) - The upper tick of the position - **owner_** (address) - The owner of the position ### Returns - **uint128** - The amount of liquidity ``` -------------------------------- ### installSubmodule Source: https://docs.olympusdao.finance/main/contracts/docs/src/Submodules.sol/abstract.ModuleWithSubmodules Installs a new submodule. Requires permission and validates that the submodule is a contract with a matching keycode prefix. ```APIDOC ## function installSubmodule(Submodule newSubmodule_) ### Description Installs a new submodule into the module. The operation will revert if the submodule is not a contract, has an invalid keycode prefix, or if the caller lacks permission. ### Parameters - **newSubmodule_** (Submodule) - The new submodule contract to install. ``` -------------------------------- ### Initialize CoolerComposites contract Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/CoolerComposites.sol/contract.CoolerComposites Constructor for setting the cooler and owner addresses. ```solidity constructor(IMonoCooler cooler_, address owner_) Owned(owner_); ``` -------------------------------- ### getPeriodicTasks Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/BasePeriodicTaskManager.sol/abstract.BasePeriodicTaskManager Gets all periodic tasks and their selectors. ```APIDOC ## function getPeriodicTasks() ### Description Returns arrays of all periodic tasks and their corresponding custom selectors. ### Returns - **address[]** - An array of all periodic tasks - **bytes4[]** - An array of all custom selectors ``` -------------------------------- ### Create a new oracle Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Deploys a new oracle instance parameterized by a specific maxAge and custom parameters. ```solidity function createOracle(uint48 maxAge_, bytes calldata customParams_) external returns (address oracle); ``` -------------------------------- ### getReceiptTokenManager Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Gets the receipt token manager contract. ```APIDOC ## getReceiptTokenManager() ### Description Gets the receipt token manager contract. ### Returns - **manager** (IReceiptTokenManager) - The receipt token manager contract ``` -------------------------------- ### Initialize CCIPBurnMintTokenPool Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/bridge/CCIPBurnMintTokenPool.sol/contract.CCIPBurnMintTokenPool The constructor initializes the policy with the kernel, OHM token address, RMN proxy, and CCIP router. ```solidity constructor(address kernel_, address ohm_, address rmnProxy_, address ccipRouter_) Policy(Kernel(kernel_)) TokenPool(IERC20(ohm_), 9, new address[](0), rmnProxy_, ccipRouter_); ``` -------------------------------- ### initialize Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IsOHM.sol/interface.IsOHM Initializes the contract with staking and treasury addresses. ```APIDOC ## function initialize(address _stakingContract, address _treasury) ### Description Initializes the contract with staking and treasury addresses. ### Parameters - **_stakingContract** (address) - The address of the staking contract. - **_treasury** (address) - The address of the treasury. ``` -------------------------------- ### getBorrowingCapacity Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Gets the available borrowing capacity for an operator. ```APIDOC ## getBorrowingCapacity(IERC20 asset_, address operator_) ### Description Gets the available borrowing capacity for a specific operator and asset. ### Parameters - **asset_** (IERC20) - Required - The address of the underlying asset - **operator_** (address) - Required - The address of the operator ### Returns - **capacity** (uint256) - The available borrowing capacity for the operator ``` -------------------------------- ### getBorrowedAmount Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Gets the current borrowed amount for an operator. ```APIDOC ## getBorrowedAmount(IERC20 asset_, address operator_) ### Description Gets the current borrowed amount for a specific operator and asset. ### Parameters - **asset_** (IERC20) - Required - The address of the underlying asset - **operator_** (address) - Required - The address of the operator ### Returns - **borrowed** (uint256) - The current borrowed amount for the operator ``` -------------------------------- ### Constructor and Metadata Functions Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/submodules/feeds/BalancerPoolTokenPrice.sol/contract.BalancerPoolTokenPrice Initialization and identification functions for the submodule. ```solidity constructor(Module parent_, IVault balVault_) Submodule(parent_); ``` ```solidity function SUBKEYCODE() public pure override returns (SubKeycode); ``` ```solidity function VERSION() public pure override returns (uint8 major, uint8 minor); ``` -------------------------------- ### Constructor Definition Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/ContractRegistryAdmin.sol/contract.ContractRegistryAdmin Initializes the policy with the kernel address. ```solidity constructor(address kernel_) Policy(Kernel(kernel_)); ``` -------------------------------- ### getPriceCache Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Gets the configured price cache policy. ```APIDOC ## getPriceCache() ### Description Gets the configured price cache policy. ### Returns - **policy** (address) - The price cache policy address. ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/submodules/feeds/ERC4626Price.sol/contract.ERC4626Price Initializes the submodule with the parent module. ```solidity constructor(Module parent_) Submodule(parent_); ``` -------------------------------- ### getAuctionResultsNextIndex Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the index of the next auction result. ```APIDOC ## getAuctionResultsNextIndex ### Description Get the index of the next auction result. ### Returns - **index** (uint8) - The index where the next auction result will be stored ``` -------------------------------- ### Print proposal inputs Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/ProposalScript.sol/abstract.ProposalScript Outputs the inputs required for the proposal. ```solidity function printProposalInputs() public; ``` -------------------------------- ### getAuctionResults Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the auction results for the tracking period. ```APIDOC ## getAuctionResults ### Description Get the auction results for the tracking period. ### Returns - **results** (int256[]) - The auction results, where a positive number indicates an over-subscription for the day. ``` -------------------------------- ### getDayState Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the auction state for the current day. ```APIDOC ## getDayState ### Description Get the auction state for the current day. ### Returns - **day** (Day) - Day info ``` -------------------------------- ### Initialize OlympusBoostedLiquidityRegistry Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/BLREG/OlympusBoostedLiquidityRegistry.sol/contract.OlympusBoostedLiquidityRegistry Constructor for the registry module, requiring a kernel instance. ```solidity constructor(Kernel kernel_) Module(kernel_); ``` -------------------------------- ### getUserRedemption Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositRedemptionVault.sol/contract.DepositRedemptionVault Gets the details of a specific user redemption. ```APIDOC ## getUserRedemption ### Description Retrieves the details of a specific redemption by ID for a user. ### Parameters - **user_** (address) - Required - The address of the user - **redemptionId_** (uint16) - Required - The ID of the redemption ### Response - **redemption** (UserRedemption) - The details of the redemption ``` -------------------------------- ### convertedToken Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ConvertibleDepositFacility.sol/contract.ConvertibleDepositFacility Get the address of the token that is converted to by the facility. ```APIDOC ## convertedToken() ### Description Returns the address of the token that is converted to by the facility. ``` -------------------------------- ### Constructor definition Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/cooler/CoolerTreasuryBorrower.sol/contract.CoolerTreasuryBorrower Initializes the policy with the kernel and sUSDS address. ```solidity constructor(address kernel_, address susds_) Policy(Kernel(kernel_)); ``` -------------------------------- ### getTokenDepositPeriod Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ReceiptTokenManager.sol/contract.ReceiptTokenManager Gets the deposit period of a specific token. ```APIDOC ## function getTokenDepositPeriod(uint256 tokenId_) ### Description Gets the deposit period of a token. ### Parameters - **tokenId_** (uint256) - The token ID ### Returns - **depositPeriod** (uint8) - The deposit period ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Distributor/Distributor.sol/contract.Distributor Initializes the Distributor contract with kernel, token, staking, and rate parameters. ```solidity constructor(Kernel kernel_, address ohm_, address staking_, uint256 initialRate_) Policy(kernel_); ``` -------------------------------- ### getTokenAsset Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ReceiptTokenManager.sol/contract.ReceiptTokenManager Gets the underlying asset of a specific token. ```APIDOC ## function getTokenAsset(uint256 tokenId_) ### Description Gets the asset of a token. ### Parameters - **tokenId_** (uint256) - The token ID ### Returns - **asset** (IERC20) - The underlying asset ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/cooler/CoolerLtvOracle.sol/contract.CoolerLtvOracle Initializes the CoolerLtvOracle with kernel, tokens, and initial LTV configuration parameters. ```solidity constructor( address kernel_, address collateralToken_, address debtToken_, uint96 initialOriginationLtv_, uint96 maxOriginationLtvDelta_, uint32 minOriginationLtvTargetTimeDelta_, uint96 maxOriginationLtvRateOfChange_, uint16 maxLiquidationLtvPremiumBps_, uint16 liquidationLtvPremiumBps_ ) Policy(Kernel(kernel_)); ``` -------------------------------- ### getRewardTokens Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/BoostedLiquidity/interfaces/IBLVaultManager.sol/interface.IBLVaultManager Gets all the reward tokens from the Aura pool. ```APIDOC ## function getRewardTokens() ### Description Gets all the reward tokens from the Aura pool. ### Returns - **rewardTokens** (address[]) - The addresses of the reward tokens ``` -------------------------------- ### Create New Oracle Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IOracleFactory.sol/interface.IOracleFactory Deploys a new oracle for a specified base and quote token pair with defined constraints. ```solidity function createOracle(address baseToken_, address quoteToken_, uint48 maxAge_, bytes calldata customParams_) external returns (address oracle); ``` -------------------------------- ### Get Clearinghouses Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/CoolerV2Migrator.sol/contract.CoolerV2Migrator Retrieves the list of all registered clearinghouses. ```solidity function _getClearinghouses() internal view returns (address[] memory clearinghouses); ``` -------------------------------- ### Initialize UniswapV3Price Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/submodules/feeds/UniswapV3Price.sol/contract.UniswapV3Price Constructor to initialize the submodule with parent module, block time, and factory address. ```solidity constructor(Module parent_, uint32 averageBlockTimeSeconds_, address uniswapV3Factory_) Submodule(parent_); ``` -------------------------------- ### Get Execution Window Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/utils/TimelockQueue.sol/abstract.TimelockQueue Returns the configured execution window for queued actions in seconds. ```solidity function _executionWindow() internal view virtual returns (uint48 executionWindow_); ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/CoolerV2Migrator.sol/contract.CoolerV2Migrator Initializes the CoolerV2Migrator contract with necessary addresses and ownership. ```solidity constructor( address owner_, address coolerV2_, address dai_, address usds_, address gohm_, address migrator_, address flash_, address chreg_, address[] memory coolerFactories_ ) Owned(owner_); ``` -------------------------------- ### lastActive Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Get the timestamp when the range was last active. ```APIDOC ## function lastActive(bool high_) ### Description Get the timestamp when the range was last active. ### Parameters - **high_** (bool) - Required - Specifies the side of the range to get timestamp for (true = high side, false = low side). ### Returns - (uint256) - The timestamp of the last activity. ``` -------------------------------- ### market Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Get the market ID for a side of the range. ```APIDOC ## function market(bool high_) ### Description Get the market ID for a side of the range. ### Parameters - **high_** (bool) - Required - Specifies the side of the range to get market for (true = high side, false = low side). ### Returns - (uint256) - The market ID. ``` -------------------------------- ### Initialize Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IsOHM.sol/interface.IsOHM Initializes the contract with staking and treasury addresses. ```solidity function initialize(address _stakingContract, address _treasury) external; ``` -------------------------------- ### Initialize the Registry Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/CHREG/OlympusClearinghouseRegistry.sol/contract.OlympusClearinghouseRegistry Constructor for initializing the module with a kernel, an active clearinghouse, and a list of inactive ones. ```solidity constructor(Kernel kernel_, address active_, address[] memory inactive_) Module(kernel_); ``` -------------------------------- ### spread Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Get the spread for the wall or cushion band. ```APIDOC ## function spread(bool high_, bool wall_) ### Description Get the spread for the wall or cushion band. ### Parameters - **high_** (bool) - Required - Specifies the side of the range to get the spread for (true = high side, false = low side). - **wall_** (bool) - Required - Specifies the band to get the spread for (true = wall, false = cushion). ### Returns - (uint256) - The spread value. ``` -------------------------------- ### getProposalQuorum Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/governance/GovernorBravoDelegate.sol/contract.GovernorBravoDelegate Gets the quorum required for a specific proposal. ```APIDOC ## getProposalQuorum(uint256 proposalId) ### Description Gets the quorum required for a given proposal. ### Parameters - **proposalId** (uint256) - Required - the id of the proposal ### Returns - **uint256** - The quorum required for the given proposal ``` -------------------------------- ### Retrieve Instructions Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/INSTR/OlympusInstructions.sol/contract.OlympusInstructions Retrieves a list of instructions from an external contract. ```solidity function getInstructions(uint256 instructionsId_) public view override returns (Instruction[] memory); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/ReserveMigrator.sol/contract.ReserveMigrator Initializes the contract with the kernel and migration addresses. ```solidity constructor(Kernel kernel_, address sFrom_, address sTo_, address migrator_) Policy(kernel_); ``` -------------------------------- ### getPeriodicTaskAtIndex Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/interfaces/IPeriodicTaskManager.sol/interface.IPeriodicTaskManager Gets a periodic task at a specific index. ```APIDOC ## function getPeriodicTaskAtIndex(uint256 index_) ### Description Gets a periodic task at a specific index. ### Parameters - **index_** (uint256) - The index of the task to get ### Returns - **_task** (address) - The address of the periodic task at the specified index - **_customSelector** (bytes4) - The custom selector for the task (or 0) ``` -------------------------------- ### queueExecOnSubmodule Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/IPriceConfigv2.sol/interface.IPriceConfigv2 Queues an action on a PRICE submodule. This action is timelocked and requires the submodule to be installed. ```APIDOC ## function queueExecOnSubmodule(bytes20 subKeycode_, bytes calldata data_) returns (uint64 actionId_) ### Description Queues an action on a PRICE submodule. The action is not performed until the queued action is executed. This function reverts if the submodule is not installed. ### Parameters - **subKeycode_** (bytes20) - The bytes20 keycode of the submodule to call - **data_** (bytes) - The calldata to send to the submodule ### Returns - **actionId_** (uint64) - The queued action ID ``` -------------------------------- ### Get Module For Keycode Mapping Source: https://docs.olympusdao.finance/main/contracts/docs/src/Kernel.sol/contract.Kernel Mapping of module address to its corresponding keycode. ```solidity mapping(Keycode => Module) public getModuleForKeycode ``` -------------------------------- ### getPeriodicTaskIndex Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/BasePeriodicTaskManager.sol/abstract.BasePeriodicTaskManager Gets the index of a specific periodic task. ```APIDOC ## function getPeriodicTaskIndex(address task_) ### Description Finds the index of a given task address. ### Parameters - **task_** (address) - Required - The periodic task to find ### Returns - **uint256** - The index of the task, or type(uint256).max if not found ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/libraries/ERC6909Wrappable.sol/abstract.ERC6909Wrappable Initializes the contract with the address of the ERC20 implementation. ```solidity constructor(address erc20Implementation_) ; ``` -------------------------------- ### Get loan for collateral Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Clearinghouse.sol/contract.Clearinghouse Computes the loan amount and debt for a given collateral amount. ```solidity function getLoanForCollateral(uint256 collateral_) public pure returns (uint256, uint256); ``` -------------------------------- ### Initialize ProposalScript constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/ProposalScript.sol/abstract.ProposalScript Initializes the contract with the provided IProposal interface. ```solidity constructor(IProposal _proposal) ScriptSuite(ADDRESSES_PATH, _proposal); ``` -------------------------------- ### getPeriodicTaskCount Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/BasePeriodicTaskManager.sol/abstract.BasePeriodicTaskManager Gets the total number of periodic tasks. ```APIDOC ## function getPeriodicTaskCount() ### Description Returns the total number of periodic tasks currently managed. ### Returns - **uint256** - The number of periodic tasks ``` -------------------------------- ### Initialize CoolerV2DelegatesForHohmProposal Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/CoolerV2DelegatesForHohmProposal.sol/contract.CoolerV2ProposalScript Constructor for the proposal script that initializes the base ProposalScript with a new instance of CoolerV2DelegatesForHohmProposal. ```solidity constructor() ProposalScript(new CoolerV2DelegatesForHohmProposal()); ``` -------------------------------- ### NewRound event Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/AggregatorV2V3Interface.sol/interface.AggregatorInterface Emitted when a new round is started. ```solidity event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt); ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/cooler/DelegateEscrowFactory.sol/contract.DelegateEscrowFactory Initializes the factory with the gOHM address. ```solidity constructor(address gohm_) ; ``` -------------------------------- ### execOnSubmodule Source: https://docs.olympusdao.finance/main/contracts/docs/src/Submodules.sol/abstract.ModuleWithSubmodules Executes a call on an installed submodule. Requires permission. ```APIDOC ## function execOnSubmodule(SubKeycode subKeycode_, bytes memory callData_) ### Description Performs an action on an installed submodule. Reverts if the submodule is not installed, the caller is not permissioned, or the call reverts. ### Parameters - **subKeycode_** (SubKeycode) - The SubKeycode of the submodule to call. - **callData_** (bytes) - The calldata to send to the submodule. ### Returns - **bytes** - The return data from the submodule call. ``` -------------------------------- ### Initialize OracleProposalScript Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/OracleProposal.sol/contract.OracleProposalScript Constructor for initializing the OracleProposalScript with a new OracleProposal instance. ```solidity constructor() ProposalScript(new OracleProposal()); ``` -------------------------------- ### getReceiptTokenIds Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Gets all receipt token IDs owned by this contract. ```APIDOC ## getReceiptTokenIds() ### Description Gets all receipt token IDs owned by this contract. ### Returns - **tokenIds** (uint256[]) - Array of receipt token IDs ``` -------------------------------- ### initialize Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Operator.sol/contract.Operator Initializes the Operator to begin market operations. ```APIDOC ## initialize() ### Description Initializes the Operator to begin market operations. This function executes actions required to start operations that cannot be done prior to the Operator policy being approved by the Kernel. Restricted to OPERATOR_ADMIN_ROLE. ``` -------------------------------- ### getAuctionTrackingPeriod Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the number of days that auction results are tracked for. ```APIDOC ## getAuctionTrackingPeriod ### Description Get the number of days that auction results are tracked for. ### Returns - **daysTracked** (uint8) - The number of days that auction results are tracked for ``` -------------------------------- ### Create Oracle Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/price/BaseOracleFactory.sol/abstract.BaseOracleFactory Creates a new oracle instance for a given token pair and configuration. ```solidity function createOracle(address baseToken_, address quoteToken_, uint48 maxAge_, bytes calldata customParams_) external override onlyEnabled onlyOracleManagerOrAdminRole nonReentrant returns (address oracle); ``` -------------------------------- ### getSizeFor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/EmissionManager.sol/contract.EmissionManager Get the auction tick size for a given target. ```APIDOC ## getSizeFor ### Description Get the auction tick size for a given target. Returns the standard tick size if the target emission is at least the standard tick size; otherwise, 0 is returned. ### Parameters - **target** (uint256) - Required - Size of day's CD auction ### Signature `function getSizeFor(uint256 target) public view returns (uint256 size)` ``` -------------------------------- ### previewMigrate(uint256 amount_) Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/V1Migrator.sol/contract.V1Migrator Previews the OHM v2 amount that will be received for a given OHM v1 amount. ```APIDOC ## function previewMigrate(uint256 amount_) ### Description Performs the gOHM conversion calculation to preview the OHM v2 amount received without state changes. ### Parameters - **amount_** (uint256) - The amount of OHM v1 to preview (9 decimals). ### Returns - **ohmV2Amount_** (uint256) - The amount of OHM v2 that would be received (9 decimals). ``` -------------------------------- ### Get Supply Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/EmissionManager.sol/contract.EmissionManager Returns the supply of gOHM in OHM denomination. ```solidity function getSupply() public view returns (uint256 supply); ``` -------------------------------- ### Get Reserves Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/EmissionManager.sol/contract.EmissionManager Returns the current reserves in the reserve denomination. ```solidity function getReserves() public view returns (uint256 reserves); ``` -------------------------------- ### Get Policy Version Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/ContractRegistryAdmin.sol/contract.ContractRegistryAdmin Returns the current version of the policy. ```solidity function VERSION() external pure returns (uint8); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/DEPOS/OlympusDepositPositionManager.sol/contract.OlympusDepositPositionManager Initializes the contract with the kernel and token renderer addresses. ```solidity constructor(address kernel_, address tokenRenderer_) Module(Kernel(kernel_)) ERC721("Olympus Deposit Position", "ODP"); ``` -------------------------------- ### price Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Get the price for the wall or cushion for a side of the range. ```APIDOC ## function price(bool high_, bool wall_) ### Description Get the price for the wall or cushion for a side of the range. ### Parameters - **high_** (bool) - Required - Specifies the side of the range to get the price for (true = high side, false = low side). - **wall_** (bool) - Required - Specifies the band to get the price for (true = wall, false = cushion). ### Returns - (uint256) - The price of the specified band. ``` -------------------------------- ### Initialize Registry Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RGSTY/OlympusContractRegistry.sol/contract.OlympusContractRegistry Constructor for the Olympus Contract Registry, requiring a valid kernel address. ```solidity constructor(address kernel_) Module(Kernel(kernel_)); ``` -------------------------------- ### active Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Get the status of a side of the range (whether it is active or not). ```APIDOC ## function active(bool high_) ### Description Get the status of a side of the range (whether it is active or not). ### Parameters - **high_** (bool) - Required - Specifies the side of the range to get status for (true = high side, false = low side). ### Returns - (bool) - Returns true if the side is active, false otherwise. ``` -------------------------------- ### Initialize OlympusPrice contract Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/OlympusPrice.sol/contract.OlympusPrice Constructor for the OlympusPrice module, requiring kernel and price feed interfaces. ```solidity constructor( Kernel kernel_, AggregatorV2V3Interface ohmEthPriceFeed_, uint48 ohmEthUpdateThreshold_, AggregatorV2V3Interface reserveEthPriceFeed_, uint48 reserveEthUpdateThreshold_, uint48 observationFrequency_, uint48 movingAverageDuration_, uint256 minimumTargetPrice_ ) Module(kernel_); ``` -------------------------------- ### Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/OlympusAuthority.sol/contract.OlympusAuthority Initializes the contract with the specified addresses for the governor, guardian, policy, and vault roles. ```solidity constructor(address _governor, address _guardian, address _policy, address _vault) OlympusAccessControlled(IOlympusAuthority(address(this))); ``` -------------------------------- ### getPositionTokensOwed Source: https://docs.olympusdao.finance/main/contracts/docs/src/libraries/UniswapV3/Positions.sol/library.UniswapV3Positions Gets the tokens owed (collected but unwithdrawn) for the position. ```APIDOC ## function getPositionTokensOwed(IUniswapV3Pool pool_, int24 tickLower_, int24 tickUpper_, address owner_) ### Description Gets the tokens owed (collected but unwithdrawn) for the position. ### Parameters - **pool_** (IUniswapV3Pool) - The address of the Uniswap V3 pool - **tickLower_** (int24) - The lower tick of the position - **tickUpper_** (int24) - The upper tick of the position - **owner_** (address) - The owner of the position ### Returns - **uint128** - The amount of token0 tokens owed - **uint128** - The amount of token1 tokens owed ``` -------------------------------- ### Get Index Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IsOHM.sol/interface.IsOHM Returns the current index value. ```solidity function index() external view returns (uint256); ``` -------------------------------- ### Initialize OlympusRange Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/RANGE/OlympusRange.sol/contract.OlympusRange Constructor for initializing the module with kernel, tokens, and spread configurations. ```solidity constructor( Kernel kernel_, ERC20 ohm_, ERC20 reserve_, uint256 thresholdFactor_, uint256[2] memory lowSpreads_, // [cushion, wall] uint256[2] memory highSpreads_ // [cushion, wall] ) Module(kernel_); ``` -------------------------------- ### getPeriodicTaskAtIndex Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/BasePeriodicTaskManager.sol/abstract.BasePeriodicTaskManager Gets a periodic task and its selector at a specific index. ```APIDOC ## function getPeriodicTaskAtIndex(uint256 index_) ### Description Retrieves the address and custom selector for a task at the specified index. ### Parameters - **index_** (uint256) - Required - The index of the task to get ### Returns - **address** - The address of the periodic task - **bytes4** - The custom selector for the task ``` -------------------------------- ### Store Instructions Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/INSTR/OlympusInstructions.sol/contract.OlympusInstructions Stores a list of instructions for future execution; requires appropriate permissions. ```solidity function store(Instruction[] calldata instructions_) external override permissioned returns (uint256); ``` -------------------------------- ### Initialize ChainlinkPriceFeeds Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/submodules/feeds/ChainlinkPriceFeeds.sol/contract.ChainlinkPriceFeeds Constructor for the submodule. ```solidity constructor(Module parent_) Submodule(parent_); ``` -------------------------------- ### Initialize Parthenon Contract Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Parthenon.sol/contract.Parthenon Constructor for the Parthenon policy, requiring a Kernel instance. ```solidity constructor(Kernel kernel_) Policy(kernel_); ``` -------------------------------- ### Get All Asset Periods Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Retrieves an array of all configured asset periods. ```solidity function getAssetPeriods() external view override returns (AssetPeriod[] memory assetPeriods); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/ConvertibleDepositActivator.sol/contract.ConvertibleDepositActivator Initializes the activator with required system contract addresses. ```solidity constructor( address owner_, address depositManager_, address cdFacility_, address cdAuctioneer_, address redemptionVault_, address emissionManager_, address heart_, address reserveWrapper_ ) Owned(owner_); ``` -------------------------------- ### Get Deposit Periods Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Retrieves the list of enabled deposit periods. ```solidity function getDepositPeriods() external view returns (uint8[] memory periods); ``` -------------------------------- ### initialize Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/price/PriceConfig.sol/contract.OlympusPriceConfig Initializes the price module with starting observations and the last observation timestamp. This must be called after deployment or when updating specific configuration parameters. ```APIDOC ## initialize(uint256[] startObservations_, uint48 lastObservationTime_) ### Description Initializes the price module. Access is restricted to the 'price_admin' role. ### Parameters - **startObservations_** (uint256[]) - Required - Array of observations to initialize the moving average with. - **lastObservationTime_** (uint48) - Required - Unix timestamp of the last observation provided. ``` -------------------------------- ### Get Deposit Asset Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Retrieves the ERC20 asset used for deposits. ```solidity function getDepositAsset() external view returns (IERC20 asset); ``` -------------------------------- ### Initialize OlympusERC20 Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/OlympusERC20.sol/contract.OlympusERC20Token Initializes the contract with the specified authority, setting the token name, symbol, and decimals. ```solidity constructor(address _authority) ERC20("Olympus", "OHM", 9) ERC20Permit("Olympus") OlympusAccessControlled(IOlympusAuthority(_authority)); ``` -------------------------------- ### previewBid Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositAuctioneer.sol/interface.IConvertibleDepositAuctioneer Get the amount of OHM tokens that could be converted for a bid. ```APIDOC ## previewBid ### Description Get the amount of OHM tokens that could be converted for a bid. ### Parameters - **depositPeriod_** (uint8) - The deposit period - **depositAmount_** (uint256) - Amount of deposit asset to deposit ### Returns - **ohmOut** (uint256) - Amount of OHM tokens that the deposit could be converted to ``` -------------------------------- ### Configure factory settings Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Administrative functions to toggle oracle creation and update the price cache policy. ```solidity function enableCreation() external; ``` ```solidity function disableCreation() external; ``` ```solidity function setPriceCache(address policy_) external; ``` -------------------------------- ### Get Authorized Operators Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IDepositFacility.sol/interface.IDepositFacility Retrieves the list of all currently authorized operators. ```solidity function getOperators() external view returns (address[] memory operators); ``` -------------------------------- ### Initialize ERC20Permit Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/OlympusERC20.sol/abstract.ERC20Permit Constructor to initialize the EIP-712 domain separator with a token name. ```solidity constructor(string memory name) EIP712(name, "1"); ``` -------------------------------- ### Enable Implementation Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ConvertibleDepositAuctioneer.sol/contract.ConvertibleDepositAuctioneer Internal function to initialize auction parameters, tick steps, and tracking periods using encoded data. ```solidity function _enable(bytes calldata enableData_) internal override; ``` -------------------------------- ### Get Redemption Loan Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositRedemptionVault.sol/contract.DepositRedemptionVault Retrieves the loan details for a specific redemption. ```solidity function getRedemptionLoan(address user_, uint16 redemptionId_) external view returns (Loan memory); ``` -------------------------------- ### Initialize EmissionManagerProposalScript Source: https://docs.olympusdao.finance/main/contracts/docs/src/proposals/EmissionManagerProposal.sol/contract.EmissionManagerProposalScript Constructor for the script that initializes the base ProposalScript with a new EmissionManagerProposal instance. ```solidity constructor() ProposalScript(new EmissionManagerProposal()); ``` -------------------------------- ### Get Order Details Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/LimitOrders.sol/contract.CDAuctioneerLimitOrders Retrieves a limit order by its unique ID. ```solidity function getOrder(uint256 orderId_) external view returns (LimitOrder memory); ``` -------------------------------- ### Get Contract Version Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/LoanConsolidator.sol/contract.LoanConsolidator Returns the current version number of the contract. ```solidity function VERSION() external pure returns (uint256); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/DepositManager.sol/contract.DepositManager Initializes the contract with kernel and token manager addresses. ```solidity constructor(address kernel_, address tokenManager_) Policy(Kernel(kernel_)); ``` -------------------------------- ### Initialize Policy Contract Source: https://docs.olympusdao.finance/main/contracts/docs/src/Kernel.sol/abstract.Policy Constructor for the Policy contract, initializing the KernelAdapter with the provided kernel instance. ```solidity constructor(Kernel kernel_) KernelAdapter(kernel_); ``` -------------------------------- ### Get Converted Token Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ConvertibleDepositFacility.sol/contract.ConvertibleDepositFacility Returns the address of the token that the facility converts into. ```solidity function convertedToken() external view returns (address); ``` -------------------------------- ### Queue Proposal Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/governance/GovernorBravoDelegate.sol/contract.GovernorBravoDelegate Queues a successful proposal for execution. ```solidity function queue(uint256 proposalId) external; ``` -------------------------------- ### Get Configuration Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Operator.sol/contract.Operator Retrieves the current configuration of the Operator as a Config struct. ```solidity function config() external view override returns (Config memory); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Burner.sol/contract.Burner Initializes the policy with the kernel and OHM token address. ```solidity constructor(Kernel kernel_, ERC20 ohm_) Policy(kernel_); ``` -------------------------------- ### Get Status Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Operator.sol/contract.Operator Retrieves the current status of the Operator as a Status struct. ```solidity function status() external view override returns (Status memory); ``` -------------------------------- ### Initialize Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/cooler/DelegateEscrow.sol/contract.DelegateEscrow Initializes the clone, restricted to the factory contract. ```solidity function initialize() external onlyFactory; ``` -------------------------------- ### Get Premium Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/EmissionManager.sol/contract.EmissionManager Returns the current premium as a percentage where 1e18 is 100%. ```solidity function getPremium() public view returns (uint256); ``` -------------------------------- ### Initialize PriceCache Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/price/PriceCache.sol/contract.PriceCache Constructor for initializing the policy with the kernel and unit of account settings. ```solidity constructor(Kernel kernel_, uint8 unitOfAccountDecimals_, string memory unitOfAccountSymbol_) Policy(kernel_); ``` -------------------------------- ### getLpBalance Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/BoostedLiquidity/interfaces/IBLVault.sol/interface.IBLVault Gets the LP balance of the contract based on its deposits to Aura. ```APIDOC ## getLpBalance() ### Description Gets the LP balance of the contract based on its deposits to Aura. ### Returns - **uint256** - LP balance deposited into Aura ``` -------------------------------- ### Get moving average Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/OlympusPrice.sol/contract.OlympusPrice Calculates the moving average over the defined window. ```solidity function getMovingAverage() public view override returns (uint256); ``` -------------------------------- ### Preview Fill Order Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/LimitOrders.sol/contract.CDAuctioneerLimitOrders Simulates a fill order to check feasibility and expected outcomes. ```solidity function previewFillOrder(uint256 orderId_, uint256 fillAmount_) external view returns (bool canFill, string memory reason, uint256 effectivePrice, uint256 incentive); ``` -------------------------------- ### Get last price Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/PRICE/OlympusPrice.sol/contract.OlympusPrice Retrieves the last stored price observation. ```solidity function getLastPrice() external view override returns (uint256); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/ClaimTransfer.sol/contract.ClaimTransfer Initializes the contract with the required token addresses. ```solidity constructor(address poly_, address ohm_, address dai_, address gohm_) ; ``` -------------------------------- ### getConfiguredAssets Source: https://docs.olympusdao.finance/main/contracts/docs/src/bases/interfaces/IAssetManager.sol/interface.IAssetManager Retrieves a list of all currently configured assets. ```APIDOC ## function getConfiguredAssets() ### Description Returns an array of all assets that are currently configured in the system. ### Response - **assets** (IERC20[]) - The list of configured assets. ``` -------------------------------- ### Get head timestamp Source: https://docs.olympusdao.finance/main/contracts/docs/src/libraries/TimestampLinkedList.sol/library.TimestampLinkedList Returns the most recent (head) timestamp in the list. ```solidity function getHead(List storage list) internal view returns (uint48); ``` -------------------------------- ### getCachedPrice Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IPriceCache.sol/interface.IPriceCache Gets the last cached snapshot for a pair in requested orientation. ```APIDOC ## function getCachedPrice(address asset_, address quote_) ### Description Get the last cached snapshot for a pair in requested orientation. Returns a zeroed snapshot for valid pairs when no snapshot exists in the current cache epoch. ### Parameters - **asset_** (address) - Asset in requested orientation - **quote_** (address) - Quote in requested orientation ### Returns - **cachedPrice** (CachedPrice) - Last cached pair snapshot data; all fields are zero when no snapshot exists ``` -------------------------------- ### Enable the contract Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/CoolerComposites.sol/contract.CoolerComposites Enables the contract, requiring owner permissions. ```solidity function enable(bytes calldata) external onlyOwner; ``` -------------------------------- ### Get Treasury Address Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IsOHM.sol/interface.IsOHM Returns the address of the treasury contract. ```solidity function treasury() external view returns (address); ``` -------------------------------- ### Get gOHM Address Function Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IsOHM.sol/interface.IsOHM Returns the address of the gOHM contract. ```solidity function gOHM() external view returns (address); ``` -------------------------------- ### Constructor Definition Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Distributor/ZeroDistributor.sol/contract.ZeroDistributor Initializes the contract with the staking address. ```solidity constructor(address staking_) ; ``` -------------------------------- ### getInstructions Source: https://docs.olympusdao.finance/main/contracts/docs/src/modules/INSTR/OlympusInstructions.sol/contract.OlympusInstructions Retrieves a list of instructions from an outside contract by their ID. ```APIDOC ## getInstructions(uint256 instructionsId_) ### Description View function for retrieving a list of Instructions in an outside contract. ### Parameters - **instructionsId_** (uint256) - Required - The unique identifier for the instructions set. ### Returns - **Instruction[]** (memory) - A list of instructions. ``` -------------------------------- ### Get Auctioneer Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IBondAggregator.sol/interface.IBondAggregator Retrieves the auctioneer associated with a specific market ID. ```solidity function getAuctioneer(uint256 id_) external view returns (IBondAuctioneer); ``` -------------------------------- ### enableCreation Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/price/IERC7726OracleFactory.sol/interface.IERC7726OracleFactory Enables oracle creation. ```APIDOC ## enableCreation() ### Description Enables oracle creation. ``` -------------------------------- ### Get Account Balance Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/OlympusERC20.sol/interface.IERC20 Returns the token balance of a specific account. ```solidity function balanceOf(address account) external view returns (uint256); ``` -------------------------------- ### Get Total Supply Source: https://docs.olympusdao.finance/main/contracts/docs/src/external/OlympusERC20.sol/interface.IERC20 Returns the total amount of tokens in existence. ```solidity function totalSupply() external view returns (uint256); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/deposits/ConvertibleDepositFacility.sol/contract.ConvertibleDepositFacility Initializes the contract with kernel and deposit manager addresses. ```solidity constructor(address kernel_, address depositManager_) BaseDepositFacility(kernel_, depositManager_); ``` -------------------------------- ### Construct Proposal Actions Source: https://docs.olympusdao.finance/main/governance/proposal_submission Helper functions to push actions to the proposal queue, with an overload for zero-value transactions. ```solidity // @dev push an action to the proposal function \_pushAction( uint256 value, address target, bytes memory data, string memory \_description ) internal { actions.push( Action({ value: value, target: target, arguments: data, description: \_description }) ); } // @dev push an action to the proposal with a value of 0 function _pushAction( address target, bytes memory data, string memory _description ) internal { _pushAction(0, target, data, _description); } ``` -------------------------------- ### Preview conversion results Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IConvertibleDepositFacility.sol/interface.IConvertibleDepositFacility Calculates the expected receipt tokens and OHM output for a potential conversion without executing the transaction. ```solidity function previewConvert(address account_, uint256[] memory positionIds_, uint256[] memory amounts_) external view returns (uint256 receiptTokenIn, uint256 convertedTokenOut); ``` -------------------------------- ### Extract substring Source: https://docs.olympusdao.finance/main/contracts/docs/src/libraries/String.sol/library.String Returns a substring defined by start and end indices. ```solidity function substring(string memory str_, uint256 startIndex_, uint256 endIndex_) internal pure returns (string memory); ``` -------------------------------- ### Data Structures Source: https://docs.olympusdao.finance/main/contracts/docs/src/periphery/CoolerV2Migrator.sol/contract.CoolerV2Migrator Core structs used for tracking Cooler data, totals, and flash loan parameters. ```solidity struct CoolerData { Cooler cooler; ERC20 debtToken; uint8 numLoans; } ``` ```solidity struct CoolerTotal { uint256 daiPrincipal; uint256 daiInterest; uint256 usdsPrincipal; uint256 usdsInterest; } ``` ```solidity struct FlashLoanData { CoolerData[] coolers; address currentOwner; address newOwner; uint256 usdsRequired; IDLGTEv1.DelegationRequest[] delegationRequests; } ``` -------------------------------- ### Initiate an Auction Source: https://docs.olympusdao.finance/main/contracts/docs/src/interfaces/IEasyAuction.sol/interface.IEasyAuction Initiates a new auction through the Gnosis Auctions protocol with specified token parameters and constraints. ```solidity function initiateAuction( ERC20 tokenToSell, ERC20 biddingToken, uint256 lastCancellation, uint256 auctionEnd, uint96 auctionAmount, uint96 minimumTotalPurchased, uint256 minimumPurchaseAmount, uint256 minFundingThreshold, bool isAtomicClosureAllowed, address accessManager, bytes calldata accessManagerData ) external returns (uint256); ``` -------------------------------- ### Get Redemption Loan Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IDepositRedemptionVault.sol/interface.IDepositRedemptionVault Retrieves the loan details for a specific user and redemption. ```solidity function getRedemptionLoan(address user_, uint16 redemptionId_) external view returns (Loan memory loan); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/V1Migrator.sol/contract.V1Migrator Initializes the V1Migrator with the kernel, token addresses, and merkle root. ```solidity constructor(Kernel kernel_, IERC20 ohmV1_, IgOHM gOHM_, bytes32 merkleRoot_) Policy(kernel_); ``` -------------------------------- ### Contract Constructor Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/Heart.sol/contract.OlympusHeart Initializes the policy with kernel and distributor dependencies, and sets reward parameters. ```solidity constructor(Kernel kernel_, IDistributor distributor_, uint256 maxReward_, uint48 auctionDuration_) Policy(kernel_); ``` -------------------------------- ### Get All User Redemptions Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IDepositRedemptionVault.sol/interface.IDepositRedemptionVault Retrieves an array of all redemptions associated with a specific user. ```solidity function getUserRedemptions(address user_) external view returns (UserRedemption[] memory); ``` -------------------------------- ### Get Authorized Facilities Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/interfaces/deposits/IDepositRedemptionVault.sol/interface.IDepositRedemptionVault Retrieves an array of all currently authorized facility addresses. ```solidity function getAuthorizedFacilities() external view returns (address[] memory facilities); ``` -------------------------------- ### Enable Oracle Source: https://docs.olympusdao.finance/main/contracts/docs/src/policies/price/ERC7726OracleFactory.sol/contract.ERC7726OracleFactory Enables a specific factory-created oracle. Requires admin or oracle manager roles. ```solidity function enableOracle(address oracle_) external override onlyEnabled onlyOracleManagerOrAdminRole nonReentrant; ```