LibAddress
This library helps manipulating addresses.
State Variables
ETH1_PREFIX
The base mask used to generate a bytes32 withdrawal credential from an address.
uint256 constant ETH1_PREFIX = 0x0100000000000000000000000000000000000000000000000000000000000000;
Functions
toWithdrawalCredentials
Utility to convert an address into withdrawal credentials.
function toWithdrawalCredentials(address addr) internal pure returns (bytes32);
Parameters
| Name | Type | Description |
|---|---|---|
addr | address | The address receiving the withdrawal of the validator |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | The bytes32 withdrawal credentials |
fromWithdrawalCredentials
Utility to convert withdrawal credentials back to an address.
function fromWithdrawalCredentials(bytes32 withdrawalCredentials) internal pure returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
withdrawalCredentials | bytes32 | The Withdrawal Credentials to convert |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The withdrawal account |