LSDVault - Dependencies

SafeERC20.sol

SafeERC20.sol is a Solidity library that provides wrappers around ERC20 operations that throw on failure. It supports tokens that return no value and instead revert or throw on failure, assuming non-reverting calls to be successful. This library is designed to make ERC20 token transfers safer and easier to work with in smart contracts.

A library that provides safe wrappers around the common ERC20 token operations.

safeTransfer(IERC20 token, address to, uint256 value) Safely transfers tokens from the contract to another address.

  • token IERC20: The token to be transferred.
  • to address: The address to receive the tokens.
  • value uint256: The number of tokens to be transferred.

safeTransferFrom(IERC20 token, address from, address to, uint256 value) Safely transfers tokens from one address to another.

  • token IERC20: The token to be transferred.
  • from address: The address to send the tokens from.
  • to address: The address to receive the tokens.
  • value uint256: The number of tokens to be transferred.

safeApprove(IERC20 token, address spender, uint256 value) Safely approves another address to spend tokens on behalf of the contract.

  • token IERC20: The token to be approved.
  • spender address: The address which will spend the tokens.
  • value uint256: The number of tokens to be approved for spending.

safeIncreaseAllowance(IERC20 token, address spender, uint256 value) Safely increases the allowance of another address to spend tokens on behalf of the contract.

  • token IERC20: The token to be approved.
  • spender address: The address which will spend the tokens.
  • value uint256: The number of tokens to increase the allowance by.

safeDecreaseAllowance(IERC20 token, address spender, uint256 value) Safely decreases the allowance of another address to spend tokens on behalf of the contract.

  • token IERC20: The token to be approved.
  • spender address: The address which will spend the tokens.
  • value uint256: The number of tokens to decrease the allowance by.
Previous
ReentrancyGuard.sol