IInfraredBERAWithdrawor
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
Name | Type | Description |
---|---|---|
pubkey | bytes | The 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
Name | Type | Description |
---|---|---|
nonce | uint256 | The nonce associated with the claim |
Returns
Name | Type | Description |
---|---|---|
receiver | address | The address of the receiver of bera funds to be claimed |
timestamp | uint96 | The block.timestamp at which withdraw request was issued |
fee | uint256 | The fee escrow amount set aside for withdraw precompile request |
amountSubmit | uint256 | The amount of bera left to be submitted for withdraw request |
amountProcess | uint256 | The 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
Name | Type | Description |
---|---|---|
receiver | address | The address to receive withdrawn funds |
amount | uint256 | The amount of funds to withdraw |
Returns
Name | Type | Description |
---|---|---|
nonce | uint256 | The 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
Name | Type | Description |
---|---|---|
pubkey | bytes | The validator's public key to withdraw from |
amount | uint256 | The 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
Name | Type | Description |
---|---|---|
receiver | address | The address that will receive the withdrawn BERA |
nonce | uint256 | The unique identifier for this withdrawal request |
amount | uint256 | The amount of BERA to be withdrawn |
Execute
Emitted when a withdrawal is executed
event Execute(bytes pubkey, uint256 start, uint256 end, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
pubkey | bytes | The validator's public key |
start | uint256 | The starting nonce |
end | uint256 | The ending nonce |
amount | uint256 | The amount of BERA withdrawn |
Process
Emitted when a withdrawal is processed
event Process(address indexed receiver, uint256 nonce, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
receiver | address | The address receiving the withdrawn BERA |
nonce | uint256 | The nonce of the processed withdrawal |
amount | uint256 | The amount of BERA processed |
Sweep
Emitted when funds are swept from a force-exited validator
event Sweep(address indexed receiver, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
receiver | address | The address receiving the swept BERA |
amount | uint256 | The amount of BERA swept |