InfraredBERADepositor
Inherits: Upgradeable, IInfraredBERADepositor
Depositor to deposit BERA to CL for Infrared liquid staking token
State Variables
ETH1_ADDRESS_WITHDRAWAL_PREFIX
uint8 public constant ETH1_ADDRESS_WITHDRAWAL_PREFIX = 0x01;
DEPOSIT_CONTRACT
address public DEPOSIT_CONTRACT;
InfraredBERA
The address of InfraredBERA
address public InfraredBERA;
slips
Outstanding slips for deposits on previously minted ibera
mapping(uint256 => Slip) public slips;
fees
Amount of BERA internally set aside for deposit contract request fees
uint256 public fees;
nonceSlip
The next nonce to issue deposit slip for
uint256 public nonceSlip;
nonceSubmit
The next nonce to submit deposit slip for
uint256 public nonceSubmit;
Functions
initialize
Initialize the contract (replaces the constructor)
function initialize(
address _gov,
address _keeper,
address ibera,
address _depositContract
) public initializer;
Parameters
Name | Type | Description |
---|---|---|
_gov | address | Address for admin / gov to upgrade |
_keeper | address | Address for keeper |
ibera | address | The initial IBERA address |
_depositContract | address | The ETH2 (Berachain) Deposit Contract Address |
_enoughtime
Checks whether enough time has passed beyond min delay
function _enoughtime(uint96 then, uint96 current)
private
pure
returns (bool has);
Parameters
Name | Type | Description |
---|---|---|
then | uint96 | The block timestamp in past |
current | uint96 | The current block timestamp now |
Returns
Name | Type | Description |
---|---|---|
has | bool | Whether time between then and now exceeds forced min delay |
reserves
Amount of BERA internally set aside to execute deposit contract requests
function reserves() public view returns (uint256);
queue
Queues a deposit from InfraredBERA for chain deposit precompile escrowing msg.value in contract
function queue(uint256 amount) external payable returns (uint256 nonce);
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount of funds to deposit |
Returns
Name | Type | Description |
---|---|---|
nonce | uint256 | The nonce created when queueing the deposit |
execute
Executes a deposit to deposit precompile using escrowed funds
function execute(bytes calldata pubkey, uint256 amount) external;
Parameters
Name | Type | Description |
---|---|---|
pubkey | bytes | The pubkey to deposit validator funds to |
amount | uint256 | The amount of funds to use from escrow to deposit to validator |
Structs
Slip
struct Slip {
uint96 timestamp;
uint256 fee;
uint256 amount;
}