vdAMM - Dependencies

Address.sol

This file contains the Solidity Address library that provides functionalities related to Ethereum addresses. It includes functions to check if an address is a contract, send value to an address, make various types of function calls, and verify call results.

Address

A library for Ethereum address-related operations.

isContract

isContract(address account) internal view returns (bool)

Checks if an address is a contract.

Parameters

  • account address: The address to be checked.

Return Values

  • bool: Returns true if the address is a contract.

sendValue

sendValue(address payable recipient, uint256 amount) internal

Sends amount wei to recipient.

Parameters

  • recipient address payable: The address to receive the wei.
  • amount uint256: The amount of wei to be sent.

Errors

  • Address: insufficient balance: Thrown if the contract does not have enough balance.
  • Address: unable to send value, recipient may have reverted: Thrown if the transfer fails.

functionCall

functionCall(address target, bytes memory data) internal returns (bytes memory)

Performs a function call to a target address with provided data.

Parameters

  • target address: The target address of the function call.
  • data bytes memory: The data to be sent with the function call.

Return Values

  • bytes memory: Returns the raw returned data.

Errors

  • Address: low-level call failed: Thrown if the function call fails.
Previous
unshETHZap-III.sol