vdAMM - Dependencies
IERC20.sol
This file defines the interface of the ERC20 standard as defined in the EIP. It includes functions for transferring tokens, checking balances, and setting allowances. It also emits events for token transfers and approvals.
IERC20
The IERC20 interface defines the standard functions that a ERC20 token contract should implement.
totalSupply
function totalSupply() external view returns (uint256)
Returns the total supply of tokens in existence.
Return Values
- uint256: The total supply of tokens.
balanceOf
function balanceOf(address account) external view returns (uint256)
Returns the amount of tokens owned by account
.
Parameters
- account address: The address of the account.
Return Values
- uint256: The amount of tokens owned by the account.
transfer
function transfer(address recipient, uint256 amount) external returns (bool)
Transfers amount
tokens from the caller's account to recipient
.
Parameters
- recipient address: The address of the recipient.
- amount uint256: The amount of tokens to transfer.
Return Values
- bool: A boolean indicating whether the operation succeeded.
allowance
function allowance(address owner, address spender) external view returns (uint256)
Returns the remaining number of tokens that spender
can spend on behalf of owner
.
Parameters
- owner address: The address of the owner.
- spender address: The address of the spender.
Return Values
- uint256: The remaining number of tokens that the spender can spend.
approve
function approve(address spender, uint256 amount) external returns (bool)
Sets amount
as the allowance of spender
over the caller's tokens.
Parameters
- spender address: The address of the spender.
- amount uint256: The amount of tokens to approve.
Return Values
- bool: A boolean indicating whether the operation succeeded.
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool)
Transfers amount
tokens from sender
to recipient
using the allowance mechanism.
Parameters
- sender address: The address of the sender.
- recipient address: The address of the recipient.
- amount uint256: The amount of tokens to transfer.
Return Values
- bool: A boolean indicating whether the operation succeeded.