LibAddress

Git Source

Functions

safeCall

Perform a low level call and raise error if failed

function safeCall(address destination, uint256 value, bytes memory payload)
    internal
    returns (bool, uint256);

Parameters

NameTypeDescription
destinationaddressThe address that will be called
valueuint256The amount of Wei to be transferred through the call
payloadbytesThe payload, which—in the case of Solidity contracts—encodes a function call

Returns

NameTypeDescription
<none>boolWhether the caller had enough Ether to make the call, and the balance before the call
<none>uint256

safeDelegateCall

Perform a delegate call and raise error if failed

function safeDelegateCall(address destination, bytes memory payload) internal;

Parameters

NameTypeDescription
destinationaddressThe address that will be called
payloadbytesThe payload, which—in the case of Solidity libraries—encodes a function call