ozLoupeFacet
Contract for inspecting the main internal statistics of the L2 subsystem and how it is formed, like querying implementations and their functions.
It inherits the DiamondLoupeFacet contract from the Diamond pattern.
Open methods
facets *
function facets() external override view returns (struct Facet[] memory facets_);Inherited.
It gets all the implementations of the Diamond and their function selectors.
Return values:
Struct:
struct Facet {
address facetAddress;
bytes4[] functionSelectors;
}facetAddress
address
An implementation
functionSelectors
bytes4[ ]
Selectors of the implementation
Function:
facets_
Facet[ ]
Array where each element is an implementation with its selectors
facetAddress *
function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);Inherited.
Gets the implementation of a particular function selector.
Parameters:
_functionSelector
bytes4
Selector to query
Return values:
facetAddress_
address
Implementation of the queried selector
facetAddresses *
function facetAddresses() external view returns (address[] memory facetAddresses_);Inherited.
Gets *only* the addresses of the implementations of the Diamond.
Return values:
facetAddresses_
address[ ]
All the implementations
facetFunctionSelectors *
function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);Inherited.
Gets all the function selectors of a specific implementation.
Parameters:
_facet
address
Implementation to query
Return values:
facetFunctionSelectors_
bytes4[ ]
Selectors of the implementation
getAccountPayments
function getAccountPayments(address account_) external view returns(uint);Get the total amount of ETH done to an L1 Account.
Parameters:
account_
address
The Account to query
Return values:
uint256
Total amount of ETH received by the Account
getAUM
function getAUM() public view returns(uint wethUM, uint valueUM);Gets the total amount of assets the protocol has under management, both charged fees and yield generated in DeFi from those fees, expressed in ETH/WETH and USD (AUM)
Return values:
wethUM
uint256
AUM expressed in ETH/WETH
valueUM
uint256
AUM expressed in USD
getDefaultSlippage
function getDefaultSlippage() external view returns(uint);Gets the slippage used in non-user swaps, expressed in basis points.
Return values:
uint256
Slippage
getL1CheckStatus
function getL1CheckStatus() external view returns(bool);Gets the current status of the check for L1 token addresses done in exchangeToAccountToken(). More info here.
Return values:
boolean
If the L1 token check is enabled or not
getOzelIndex
function getOzelIndex() external view returns(uint);Gets the current value of the Ozel Index.
Return values:
uint256
Ozel Index
getOzelBalances
function getOzelBalances(address user_) external view returns(uint, uint);Gets how much a particular user could redeem from the protocol's AUM based on their OZL balance. Basically, their correspondent allocation.
Parameters:
user_
address
User to find out their allocation
Return values:
uint256
User's share expressed in ETH
uint256
User's share expressed in USD
getProtocolFee
function getProtocolFee() external view returns(uint);Gets the protocol's fee, expressed in basis points.
Return values:
uint256
The protocol's fee
getRegulatorCounter
function getRegulatorCounter() external view returns(uint);Gets the current iteration of the counter used as a released valve for the stabilization mechanism of the Ozel Index.
Return values:
uint256
Current iteration.
getTotalVolumeInETH
function getTotalVolumeInETH() external view returns(uint);Gets the total amount of ETH transfers received by all Accounts.
Return values:
uint256
Total ETH volume received
getTotalVolumeInUSD
function getTotalVolumeInUSD() external view returns(uint);getTotalVolumeInETH but expressed in USD terms using an updated ETH/USD feed provided on call by Chainlink's oracles.
Return values:
uint256
Total volume in USD
getUserByL1Account
function getUserByL1Account(address account_) external view returns(address);Gets the owner of an L1 Account.
Parameters:
account_
address
The Account
Return values:
address
Owner of the Account
queryTokenDatabase
function queryTokenDatabase(address token_) external view returns(bool);Queries if a token belongs to the groups of tokens an user can choose as the final destination on L2.
It's the L2 equivalent of queryTokenDatabase() from L1's StorageBeacon.
Parameters:
token_
address
Token to query in database
Return values:
boolean
If token_ belongs or not to the group
Last updated