ArcticArchitectureLens
Functions
totalAssets
Calculates the total assets held in the BoringVault for a given vault and accountant.
function totalAssets(
BoringVault boringVault,
AccountantWithRateProviders accountant
)
external
view
returns (ERC20 asset, uint256 assets);
Parameters
boringVault
BoringVault
The BoringVault contract.
accountant
AccountantWithRateProviders
The AccountantWithRateProviders contract.
Returns
asset
ERC20
The ERC20 asset, assets
is given in terms of.
assets
uint256
The total assets held in the vault.
previewDeposit
Calculates the number of shares that will be received for a given deposit amount in the BoringVault.
function previewDeposit(
ERC20 depositAsset,
uint256 depositAmount,
BoringVault boringVault,
AccountantWithRateProviders accountant
)
external
view
returns (uint256 shares);
Parameters
depositAsset
ERC20
The ERC20 asset being deposited.
depositAmount
uint256
The amount of the asset being deposited.
boringVault
BoringVault
The BoringVault contract.
accountant
AccountantWithRateProviders
The AccountantWithRateProviders contract.
Returns
shares
uint256
The number of shares that will be received.
balanceOf
Retrieves the balance of shares for a given account in the BoringVault.
function balanceOf(address account, BoringVault boringVault) external view returns (uint256 shares);
Parameters
account
address
The address of the account.
boringVault
BoringVault
The BoringVault contract.
Returns
shares
uint256
The balance of shares for the account.
balanceOfInAssets
Calculates the balance of a user in terms of asset for a given account in the BoringVault.
function balanceOfInAssets(
address account,
BoringVault boringVault,
AccountantWithRateProviders accountant
)
external
view
returns (uint256 assets);
Parameters
account
address
The address of the account.
boringVault
BoringVault
The BoringVault contract.
accountant
AccountantWithRateProviders
The AccountantWithRateProviders contract.
Returns
assets
uint256
The balance of assets for the account.
exchangeRate
Retrieves the current exchange rate from the AccountantWithRateProviders contract.
function exchangeRate(AccountantWithRateProviders accountant) external view returns (uint256 rate);
Parameters
accountant
AccountantWithRateProviders
The AccountantWithRateProviders contract.
Returns
rate
uint256
The current exchange rate.
checkUserDeposit
Checks if a user's deposit meets certain conditions.
function checkUserDeposit(
address account,
ERC20 depositAsset,
uint256 depositAmount,
BoringVault boringVault,
TellerWithMultiAssetSupport teller
)
external
view
returns (bool);
Parameters
account
address
The address of the user.
depositAsset
ERC20
The ERC20 asset being deposited.
depositAmount
uint256
The amount of the asset being deposited.
boringVault
BoringVault
The BoringVault contract.
teller
TellerWithMultiAssetSupport
The TellerWithMultiAssetSupport contract.
Returns
<none>
bool
A boolean indicating if the user's deposit meets the conditions.
checkUserDepositWithPermit
Checks if a user's deposit (with permit) meets certain conditions.
function checkUserDepositWithPermit(
address account,
ERC20 depositAsset,
uint256 depositAmount,
TellerWithMultiAssetSupport teller
)
external
view
returns (bool);
Parameters
account
address
The address of the user.
depositAsset
ERC20
The ERC20 asset being deposited.
depositAmount
uint256
The amount of the asset being deposited.
teller
TellerWithMultiAssetSupport
The TellerWithMultiAssetSupport contract.
Returns
<none>
bool
A boolean indicating if the user's deposit meets the conditions.
userUnlockTime
Retrieves the unlock time for a user's shares in the TellerWithMultiAssetSupport contract.
function userUnlockTime(address account, TellerWithMultiAssetSupport teller) external view returns (uint256 time);
Parameters
account
address
The address of the user.
teller
TellerWithMultiAssetSupport
The TellerWithMultiAssetSupport contract.
Returns
time
uint256
The unlock time for the user's shares.
isTellerPaused
Checks if the TellerWithMultiAssetDepositSupport contract is paused.
function isTellerPaused(TellerWithMultiAssetSupport teller) external view returns (bool);
Was this helpful?