LSDVault Contracts
LSDVault-II.sol
Note
Split reference
This reference file was too long so it is split into multiple chunks. This is chunk number II.
This Solidity file appears to be part of a smart contract related to a financial protocol involving 'LSD' tokens. It includes functions for enabling and disabling LSDs, toggling various settings (like weight caps and absolute caps), depositing LSDs, and getting various data about the LSDs, such as their price, index, and balances. It also includes some helper functions for the user interface and Zap/AMM.
function enableLSD(address _lsd) public onlyOwner onlyWhenPaused
This function enables a given LSD token. It verifies the LSD in darknet and ensures that the LSD has been set weights.
_lsd
address
: The address of the LSD token to be enabled.void
: This function does not return a value.
function disableLSD(address _lsd) external onlyOwner onlyWhenPaused
This function disables a given LSD token. It resets the LSD's configurations to zero.
_lsd
address
: The address of the LSD token to be disabled.void
: This function does not return a value.
function deposit(address lsd, uint256 amount) external onlyZap nonReentrant
This function allows a user to deposit a specified amount of a given LSD token, while checking against cap.
lsd
address
: The address of the LSD token to be deposited.amount
uint256
: The amount of the LSD token to be deposited.void
: This function does not return a value.
function getPrice(address lsd) public view returns (uint256)
This function returns the price of a given LSD token.
lsd
address
: The address of the LSD token whose price is to be fetched.uint256
: The price of the LSD token.