IInfraredBERAWithdrawor

Git Source

Functions

InfraredBERA

The address of the InfraredBERA contract

function InfraredBERA() external view returns (address);

sweep

Sweeps forced withdrawals to InfraredBERA to re-stake principal

Only callable when withdrawals are disabled and by keeper

function sweep(bytes calldata pubkey) external;

Parameters

NameTypeDescription
pubkeybytesThe validator's public key to sweep funds from

requests

Outstanding requests for claims on previously burnt ibera

function requests(uint256 nonce)
    external
    view
    returns (
        address receiver,
        uint96 timestamp,
        uint256 fee,
        uint256 amountSubmit,
        uint256 amountProcess
    );

Parameters

NameTypeDescription
nonceuint256The nonce associated with the claim

Returns

NameTypeDescription
receiveraddressThe address of the receiver of bera funds to be claimed
timestampuint96The block.timestamp at which withdraw request was issued
feeuint256The fee escrow amount set aside for withdraw precompile request
amountSubmituint256The amount of bera left to be submitted for withdraw request
amountProcessuint256The amount of bera left to be processed for withdraw request

fees

Amount of BERA internally set aside for withdraw precompile request fees

function fees() external view returns (uint256);

reserves

Amount of BERA internally set aside to process withdraw compile requests from funds received on successful requests

function reserves() external view returns (uint256);

rebalancing

Amount of BERA internally rebalancing amongst Infrared validators

function rebalancing() external view returns (uint256);

nonceRequest

The next nonce to issue withdraw request for

function nonceRequest() external view returns (uint256);

nonceSubmit

The next nonce to submit withdraw request for

function nonceSubmit() external view returns (uint256);

nonceProcess

The next nonce in queue to process claims for

function nonceProcess() external view returns (uint256);

queue

Queues a withdraw request from InfraredBERA

Requires msg.value to cover minimum withdrawal fee

function queue(address receiver, uint256 amount)
    external
    payable
    returns (uint256 nonce);

Parameters

NameTypeDescription
receiveraddressThe address to receive withdrawn funds
amountuint256The amount of funds to withdraw

Returns

NameTypeDescription
nonceuint256The unique identifier for this withdrawal request

execute

Executes a withdraw request to withdraw precompile

Payable to cover any additional fees required by precompile

Only callable by keeper

function execute(bytes calldata pubkey, uint256 amount) external payable;

Parameters

NameTypeDescription
pubkeybytesThe validator's public key to withdraw from
amountuint256The amount of BERA to withdraw

process

Processes the funds received from withdraw precompile

Reverts if balance has not increased by full amount of request

Processes requests in FIFO order based on nonce

function process() external;

Events

Queue

Emitted when a withdrawal is queued

event Queue(address indexed receiver, uint256 nonce, uint256 amount);

Parameters

NameTypeDescription
receiveraddressThe address that will receive the withdrawn BERA
nonceuint256The unique identifier for this withdrawal request
amountuint256The amount of BERA to be withdrawn

Execute

Emitted when a withdrawal is executed

event Execute(bytes pubkey, uint256 start, uint256 end, uint256 amount);

Parameters

NameTypeDescription
pubkeybytesThe validator's public key
startuint256The starting nonce
enduint256The ending nonce
amountuint256The amount of BERA withdrawn

Process

Emitted when a withdrawal is processed

event Process(address indexed receiver, uint256 nonce, uint256 amount);

Parameters

NameTypeDescription
receiveraddressThe address receiving the withdrawn BERA
nonceuint256The nonce of the processed withdrawal
amountuint256The amount of BERA processed

Sweep

Emitted when funds are swept from a force-exited validator

event Sweep(address indexed receiver, uint256 amount);

Parameters

NameTypeDescription
receiveraddressThe address receiving the swept BERA
amountuint256The amount of BERA swept