LibAddress
Functions
safeCall
Perform a low level call and raise error if failed
Can be used to transfer Ether to EOAs by passing a non-zero value and an empty payload. Solidity contracts will accept such message calls through the receive() payable entrypoint.
function safeCall(address destination, uint256 value, bytes memory payload) internal;
Parameters
| Name | Type | Description |
|---|---|---|
destination | address | The address that will be called |
value | uint256 | The amount of Wei to be transferred through the call |
payload | bytes | The payload, which—in the case of Solidity contracts—encodes a function call |
safeDelegateCall
Perform a delegate call and raise error if failed
function safeDelegateCall(address destination, bytes memory payload) internal;
Parameters
| Name | Type | Description |
|---|---|---|
destination | address | The address that will be called |
payload | bytes | The payload, which—in the case of Solidity libraries—encodes a function call |