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 patternarrow-up-right.

circle-info

Functions with "*" are inherited from other contracts.

Github repo herearrow-up-right.

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;
}
Name
Type
Description

facetAddress

address

An implementation

functionSelectors

bytes4[ ]

Selectors of the implementation

Function:

Name
Type
Description

facets_

Facet[ ]

Array where each element is an implementation with its selectors

facetAddress *

Inherited.

Gets the implementation of a particular function selector.

Parameters:

Name
Type
Description

_functionSelector

bytes4

Selector to query

Return values:

Name
Type
Description

facetAddress_

address

Implementation of the queried selector

facetAddresses *

Inherited.

Gets *only* the addresses of the implementations of the Diamond.

Return values:

Name
Type
Description

facetAddresses_

address[ ]

All the implementations

facetFunctionSelectors *

Inherited.

Gets all the function selectors of a specific implementation.

Parameters:

Name
Type
Description

_facet

address

Implementation to query

Return values:

Name
Type
Description

facetFunctionSelectors_

bytes4[ ]

Selectors of the implementation

getAccountPayments

Get the total amount of ETH done to an L1 Account.

Parameters:

Name
Type
Description

account_

address

The Account to query

Return values:

Type
Description

uint256

Total amount of ETH received by the Account

getAUM

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:

Name
Type
Description

wethUM

uint256

AUM expressed in ETH/WETH

valueUM

uint256

AUM expressed in USD

getDefaultSlippage

Gets the slippage used in non-user swaps, expressed in basis points.

Return values:

Type
Description

uint256

Slippage

getL1CheckStatus

Gets the current status of the check for L1 token addresses done in exchangeToAccountToken(). More info here.

Return values:

Type
Description

boolean

If the L1 token check is enabled or not

getOzelIndex

Gets the current value of the Ozel Index.

Return values:

Type
Description

uint256

Ozel Index

getOzelBalances

Gets how much a particular user could redeem from the protocol's AUM based on their OZL balance. Basically, their correspondent allocation.

Parameters:

Name
Type
Description

user_

address

User to find out their allocation

Return values:

Type
Description

uint256

User's share expressed in ETH

uint256

User's share expressed in USD

getProtocolFee

Gets the protocol's fee, expressed in basis points.

Return values:

Type
Description

uint256

The protocol's fee

getRegulatorCounter

Gets the current iteration of the counter used as a released valve for the stabilization mechanism of the Ozel Index.

Return values:

Type
Description

uint256

Current iteration.

getTotalVolumeInETH

Gets the total amount of ETH transfers received by all Accounts.

Return values:

Type
Description

uint256

Total ETH volume received

getTotalVolumeInUSD

getTotalVolumeInETH but expressed in USD terms using an updated ETH/USD feed provided on call by Chainlink's oraclesarrow-up-right.

Return values:

Type
Description

uint256

Total volume in USD

getUserByL1Account

Gets the owner of an L1 Account.

Parameters:

Name
Type
Description

account_

address

The Account

Return values:

Type
Description

address

Owner of the Account

queryTokenDatabase

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:

Name
Type
Description

token_

address

Token to query in database

Return values:

Type
Description

boolean

If token_ belongs or not to the group

Last updated