ozCutFacet

Implementation in charge of key system configuration, and of adding/removing/replacing functions from the Diamond structure.

Functions with "*" are inherited from other contracts.

Github repo here.

Owner methods

changeDefaultSlippage

function changeDefaultSlippage(uint bps_) external;

Changes the slippage used in certain non-user swaps. These ones are:

Parameters:

Name
Type
Description

bps_

uint256

New slippage (expressed in basis points)

changeL1Check

function changeL1Check(bool newState_) external;

Enables/disables the check done in exchangeToAccountToken() that verifies if the token of the incoming Account comes from L1 or L2.

Parameters:

Name
Type
Description

newState_

boolean

If the L1 check needs to be done or not

changeProtocolFee

function changeProtocolFee(uint bps_) external;

Changes the fee that the protocol charges.

Name
Type
Description

bps_

uint256

New protocol fee (expressed in basis points)

changeRevenueToken

function changeRevenueToken(address newToken_) external;

Changes the token on which the owner would receive their revenue, after being computed.

Parameters:

Name
Type
Description

newToken_

address

New revenue token

changeUniPoolFee

function changeUniPoolFee(uint24 newPoolFee_) external;

Changes the fee -which would change the pool itself- used on the Uniswap swap that computes the owner's revenue.

Parameters:

Name
Type
Description

newPoolFee_

uint24

New pool fee

diamondCut *

function diamondCut(
        struct FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
) external;

Inherited from EIP-2535's DiamondCutFacet contract.

It adds/removes/replaces functions from the Diamond structure, and optionally it can execute a callback upon addition/removal/replacement.

Parameters:

Name
Type
Description

_diamondCut

FacetCut[ ]

Each group/struct is the contract address of the change, the action to perform, and the functions selectors in question.

_init

address

Contract where to execute the callback.

_calldata

bytes

Bytecode of the callback (including selector)

Parameters:

  • Depositing the charged fees into DeFi.

  • Compute the owner's revenue.

enableWithdrawals

function enableWithdrawals(bool state_) external;

Enable users to withdraw the protocol's revenue, in direct proportion to each user's OZL balance.

Parameters:

Name
Type
Description

state_

boolean

New status of withdrawals

setAuthorizedCaller

function setAuthorizedCaller(address caller_, bool newStatus_) external;

Authorizes or revoke access of new addresses for calling the main entry function in L2 (exchangeToAccountToken())

Parameters:

Name
Type
Description

caller_

address

Msg.sender of entry L2 call

newStatus_

boolean

Can or can't call

Last updated