Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 2.44 KB

File metadata and controls

87 lines (63 loc) · 2.44 KB

Fee Vaults

Fee vaults are simple contracts that collect the three types of fees in Citrea.

You can find these contracts in the following addresses.

Fee Vault Address
BaseFeeVault 0x3100000000000000000000000000000000000003
L1FeeVault 0x3100000000000000000000000000000000000004
PriorityFeeVault 0x3100000000000000000000000000000000000005

Currently all these three contracts have the same logic, yet they can be upgraded in case the need arises to do a programmatic redirection of fees.

State Structure

address public recipient;

Address to send the accumulated fees.


uint256 public minWithdraw;

Minimum required fee amount to be accumulated in the contract before it can be withdrawn to the recipient address, this is 0 by default.

Access Control Structure

modifier onlyOwner()

Ensures that only the contract owner can call the function (inherited from Ownable).

Functions

function withdraw() external

Sends the accumulated fees to recipient address.


function setRecipient(address _recipient) external onlyOwner

Changes the recipient address.

Parameters Description
address _recipient Address of the new recipient

function setMinWithdraw(uint256 _minWithdraw) external onlyOwner

Changes the minimum withdraw amount.

Parameters Description
uint256 _minWithdraw New minimum withdraw amount

Events

event RecipientUpdated(address oldRecipient, address newRecipient)

Emitted when the recipient address is changed.

Parameters Description
address oldRecipient Old recipient address
address newRecipient New recipient address

event MinWithdrawUpdated(uint256 oldMinWithdraw, uint256 newMinWithdraw)

Emitted when the minimum withdraw amount is changed.

Parameters Description
uint256 oldMinWithdraw Old minimum withdraw amount
uint256 newMinWithdraw New minimum withdraw amount